I’m looking for a way to do boolean operations between two STLs in Paraview. Unions, Differences, etc…
This is unfortunately for a compute environment that doesn’t have Meshlab, Blender, etc…, but it DOES have Paraview.
I’ve looked around and it seems that there’s not a way to do this directly, but maybe it can be done with a script? Does anybody have experience with this?
BooleanOperation.xml (3.1 KB) is an XML plugin you can load from the Tools -> Manage Plugins… menu item. In the plugin manager dialog, click “Load New…” and navigate to where you saved this XML plugin. Click OK. After you have loaded it, you will have a Boolean Operation filter available in the Filters menu. Click on a polydata source and apply this filter. In the dialog that appears, you can pick a second polydata source.
@cory.quammen,
I would like to run this Plugin to detect interference (Intersection) between parts.
I start with a MultiBlockDataSet of unstructured grids. I run Merge Blocks on this and get an Unstructured Grid. Then I tried a Programmable Filter to run the vtkGeometryFilter on the unstructured grid and output a Polygonal mesh for use with the BooleanOperation. However, the Programmable filter output is a polygonal mesh of quads rather than hexs, and the BooleanOperation fails due to “No points/cells to operate on”.
Is there a way to convert an unstructured grid of hex elements to a Polygonal mesh of hex elements in order to use your plugin?
Thanks for any hints - I am probably not setting something in the vtkGeometryFilter, but I have no clue.
Dennis
P.S. 5 work days til retirement, but I hope to knock this out before I leave!
@DennisConklin The Boolean Operation filter operates only on two input polydata consisting of only triangles. To compute with an intersection occurs between two blocks consisting of hex meshes you would first need to extract those blocks (Extract Block), Merge Blocks into an unstructured grid, Extract Surface to get the quad mesh, and then finally apply Triangulate to produce a polydata consisting of triangles.
This checks only if two blocks intersect, however, so you would need to do the same operation pairwise for each set of potentially overlapping blocks. You could do some preliminary checks like require that bounding boxes overlap before doing the more computationally intensive mesh intersection test to speed things up.
@cory.quammen Everytime I try this I get a segmentation error crash. I can’t believe that my datasets are big enough to actually run out of memory, so I’m thinking something else is going on. Any other restrictions that you can think of for this procedure??
@cory.quammen Thank you so much for providing the plugin. Is there a reason its not included in Paraview? is there a separate repo that provides a collection of things like this that aren’t standard? e.g. “dev”, ot “canary” filters or ones that aren’t currently robust for mainstream use?
@kayarre It’s not included in ParaView because the boolean operations filter isn’t terribly reliable. There is not a repository for such things that I know of, but it’s an interesting idea to have one.