Open Eric-R-Liang opened 4 years ago
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
I am using the boolean addition filter to merge the individual meshes
Can you share these meshes for us to try?
Yep, there is a total of 8 meshes. Meshes.zip
This will get you a little closer. I'm afraid that the meshes are really far apart and it won't be possible to merge them all without corrupting the mesh as increasing tolerance
starts to cause the faces to collapse.
import pyvista as pv
block = pv.MultiBlock()
[block.append(pv.read('Component_%d.stl' % i)) for i in range(1, 9)]
combined = block.combine(True).extract_surface()
merged = combined.clean(tolerance=0.6)
merged.plot(show_edges=True, lighting=True, background='w')
Thanks a lot for the suggestion. Just as a side note, I have a mesh like this: tunnel_mesh.obj.zip
I want to systematically split it into individual components (doesn't matter if the 'component' is composed of 1 or multiple segments of the initial geometry, like using a bounding box for example, and within each bounding box there can be multiple segments), and remove 1 or multiple of those components. And I want to essentially, remove 1 or more of those components from the initial geometry (via boolean subtract maybe). Is there a way to do that?
I've tried using the clip_box method but I can't figure out a way to use it to systematically break down the geometry and adjust the number of components that I want split into.
This might be a good example for https://github.com/pyvista/pyvista/pull/797.
For the time being, I'd use several clip planes spaced at regular intervals along the XZ and YZ planes. Use mesh.bounds
to determine your initial ranges and then generate several planes to clip your mesh.
When I merge multiple triangulated meshes together, the resulting geometry has small gaps between its components. It seems like the gaps occur at the merging points.
How can I get rid of those gaps without distorting the triangulations? Thanks.