Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crinkle clip duplicates cells in the unclipped surface #5667

Closed
swnlia001 opened this issue Feb 22, 2024 · 1 comment · Fixed by #6060
Closed

Crinkle clip duplicates cells in the unclipped surface #5667

swnlia001 opened this issue Feb 22, 2024 · 1 comment · Fixed by #6060
Labels
bug Uh-oh! Something isn't working as expected.

Comments

@swnlia001
Copy link

swnlia001 commented Feb 22, 2024

Describe the bug, what's wrong, and what you expected.

When I implement the crinkle clip feature in pyvista.DataSetFilters.clip and set crinkle=True and return_clipped=True there are common cells between the clipped and unclipped datasets. I would expect that the unclipped surface would be effectively the original surface, without the clipped part.

It would be great if this could be changed because I would like to continue clipping the unclipped surface again but without the duplicated cells at interface.

Thanks!

Steps to reproduce the bug.

import pyvista as pv
import numpy as np

dataset = pv.examples.download_bunny_coarse()
clipped, unclipped = dataset.clip('y', return_clipped=True, crinkle=True)

clipped.save(".../bunny_top.vtk")
unclipped.save(".../bunny_bottom.vtk")

System Information

--------------------------------------------------------------------------------
  Date: Thu Feb 22 15:43:29 2024 GMT Standard Time
            
                OS : Windows
            CPU(s) : 36
           Machine : AMD64
      Architecture : 64bit
               RAM : 255.7 GiB
       Environment : IPython
        GPU Vendor : NVIDIA Corporation
      GPU Renderer : Quadro RTX 4000/PCIe/SSE2
       GPU Version : 4.5.0 NVIDIA 536.67
  MathText Support : False
  Python 3.8.8 (default, Apr 13 2021, 15:08:03) [MSC v.1916 64 bit (AMD64)]
           pyvista : 0.42.2
               vtk : 9.2.6
             numpy : 1.20.1
        matplotlib : 3.3.4
            scooby : 0.7.2
             pooch : v1.7.0
            pillow : 8.2.0
           imageio : 2.9.0
             PyQt5 : 5.9.2
           IPython : 7.22.0
        ipywidgets : 7.6.3
             scipy : 1.6.2
              tqdm : 4.59.0
        jupyterlab : 3.0.14
      nest_asyncio : 1.5.1
  Intel(R) oneAPI Math Kernel Library Version 2021.2-Product Build 20210312
  for Intel(R) 64 architecture applications
--------------------------------------------------------------------------------

Screenshots

image

@swnlia001 swnlia001 added the bug Uh-oh! Something isn't working as expected. label Feb 22, 2024
@banesullivan
Copy link
Member

I think the changes in #6060 will fix this, would you please review these changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Uh-oh! Something isn't working as expected.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants