Skip to content

Conversation

@gunney1
Copy link
Contributor

@gunney1 gunney1 commented Sep 10, 2025

Summary

  • This PR is a feature. It does the following:

    • Adds geometry-specific optimizations for the mesh clipping.
    • Extends the MeshClipper test with the new geometries.
  • The following new classes implement the MeshClipperStrategy interface:

    • PlaneClipper for a plane geometry
    • TetClipper for a tetrahedron
    • HexClipper for a hexahedron
    • SphereClipper for a sphere
    • FSorClipper for a surface of revolution where the discrete curve r(z) is a function. Although the curve may have vertical segments, it may not double back in z. It can support stepped geometries but not hollow geometries. Cones and cylinders are supported by this implementation.
    • SorClipper for surface of revolution where the r(z) curve can double back on itself, for example to make a bowl.
    • TetMeshClipper for a general geometry described by a tetrahedral mesh.
  • New code are in namespace experimental, because this is still a work in progress.

Dependencies

The mesh clipping refactor includes multiple PRs. Please review these before this one.

Image of geometries supported (excluding the plane clipper)

visit0005

Performance comparison

This is a comparison of clipping times for the IntersectionShaper and the MeshClipper, showing the wall time it took to clip a sample of geometries. It uses the quest_shape_in_memory example for the IntersectionShaper and the quest_mesh_clipper test for the MeshClipper. The tests are run on the CPU on rzwhippet and on the GPU on rzadams. The mesh is 30^3 for the CPU and 100^3 for the GPU. Most of the geometries occupy about 1/16 of the mesh. Note that performance is highly configuration dependent, so this data does not tell the whole story. Furthermore, the amortization of shared costs in the new code was not used.

rzwhippet + seq, 303 mesh

Code plane tet tetmesh hex sphere cyl cone sor
IntersectionShaper 5.66 0.74 0.88 1.19 6.43 26.4 21.5 8.76
MeshClipper 0.02 0.08 0.33 0.30 0.76 3.93 4.69 6.20

rzadams + hip, 1003 mesh

Code plane tet tetmesh hex sphere cyl cone sor
IntersectionShaper .90 .48 .48 .53 .93 3.31 2.65 1.29
MeshClipper .10 .33 .38 .37 .66 .50 .58 .62

Clipper tests pass on whippet, ansel and adams,
except for Conduit mesh on ansel.
…ull.

I don't know the rationale for returning null, but accepting existing
groups is a needed functionality.  The alternative is to implement
something like walkPath where ever we need to check the links in
a path for existence.
…' into feature/gunney/shaping-refactor-and-perf
…' into feature/gunney/shaping-refactor-and-perf
Still needs TetMeshClipper::labelInOut implementation.
Compiles.  Not tested.
All geometry clipping tests are passing.
This lets new Geometry be added without changing the code.
Base automatically changed from feature/gunney/initial-mesh-clipper to develop November 6, 2025 00:32
@gunney1 gunney1 force-pushed the feature/gunney/shaping-refactor-and-perf branch from ac60395 to 843d175 Compare November 6, 2025 23:56
User has option to have MeshClipper log the stats or get the stats
to use.  There are now more data collected.  They are available
as clipping progresses and after clipping.
The new implementation fixes missing intersections and screens out more
hexes and tets.
This was temporarily removed for the initial refactor PR.
Previously, we compared a bounding box's bounding sphere.
Now, we use a bounding box itself.
Both 18-tet vs 24-tet decompositions are supported in the code,
but one is selected by the value of ShapeMesh::NUM_TETS_PER_HEX.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

high priority Quest Issues related to Axom's 'quest' component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants