pyvista-support icon indicating copy to clipboard operation
pyvista-support copied to clipboard

boolean operations errors

Open josepereiroml opened this issue 5 years ago • 6 comments

Hello I want to know how to do boolean operations on two meshes and I'm getting this error ERROR:root:No points to subdivide ERROR:root:No points/cells to operate on ERROR:root:No points/cells to operate on I think the problem is that I don't have the two meshes aligned do you know how can I align the two meshes and get the boolean difference? I've been trying to do it but I haven't been able to find a solution. Thank you.

josepereiroml avatar Nov 16 '20 04:11 josepereiroml

Hi and welcome! Thanks for posting your first issue in the PyVista project! Someone from @pyvista/developers will chime in before too long. If your question is support related, it may be automatically transferred to https://github.com/pyvista/pyvista-support

github-actions[bot] avatar Nov 16 '20 04:11 github-actions[bot]

you may need to share the meshes you're using and the code you're running for us to help

banesullivan avatar Nov 16 '20 18:11 banesullivan

objects.zip These are the 2 objects, there are a human. obj file and pants. obj file. Thank you very much.

josepereiroml avatar Nov 16 '20 19:11 josepereiroml

I forgot to ask if it's possible to save the resulting mesh in a .obj file? Thank you for your help

josepereiroml avatar Nov 18 '20 20:11 josepereiroml

Were you ever able to resolve this error? I have also encountered this and would like to know if you encountered a solution @josepereiroml. Thanks!

alexluuuu avatar Aug 18 '21 15:08 alexluuuu

For the exact files included above I don't think there exists an intersection between the pants.obj and human.obj files? From what I saw the human object would need to be scaled and rotated. In general as long as the polydata are represented as only triangles boolean operations should work (from my experience). So something like the following line might work in this case after some manipulation of the human or pants objects.

union_object = object_1.triangulate().boolean_union(object_2.triangulate())

Hopefully this is helpful! (apologies if it isn't)

pants_human_boolean_operation

zasexton avatar May 15 '22 01:05 zasexton