-
Notifications
You must be signed in to change notification settings - Fork 29
Enhance ElviraAlgorithm so it can output plane offset and point mesh. #1570
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
Enhance ElviraAlgorithm so it can output plane offset and point mesh. #1570
Conversation
…a field and a pointmesh option that lets it output point meshes.
… Added some 3D tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @BradWhitlock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the documentation!
src/axom/mir/ElviraAlgorithm.hpp
Outdated
// The last fragment's normals are just (1,0,0). | ||
//const double *normalPtr = fragmentVectorsView.data() + (fragmentIndex * numVectorComponents); | ||
// It seems more useful to emit the opposite of the last fragment's normal instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
construction debris? Or need to keep?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reworked that comment so it retains what I wanted without being an old line of code.
output is comprised of shapes that result from several cuts of the input zones, the resulting | ||
topology is not necessarily water-tight and it consists of polygons for 2D and polyhedra for 3D. | ||
output is typically comprised of shapes that result from several cuts of the input zones, | ||
the resulting topology is not necessarily water-tight and it consists of polygons for 2D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Readability suggestion: break sentence so we have "...is not necessarily water-tight. It consists of polygons..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it.
The ELVIRA algorithm also supports a mode where it instead creates a mesh consisting of | ||
points at the centers of the polygonal/polyhedral zone centers and emits the points in | ||
place of the other zones. This output mode is used to save work when the algorithm is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused by this sentence: please clarify. I think you mean something like
"The ELVIRA algorithm also supports a mode where it creates points instead of a polygonal/polyhedral mesh. The points are located where the centroids of the zone faces would have been. This output mode is used..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or does pointmesh
produce points only at the centroids of new fragment cut planes/facets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, I read it more carefully. Do you mean "A point is created at the centroid of each zone." ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried again. pointmesh
makes a point at the origin of every clipping plane. A zone with 3 materials would make 3 clipping planes (2 are at the same place with opposite normals). A zone with 1 material does not get clipped so the point goes at the zone centroid. This mode is for when wants the plane origin and normal and is not that interested in the clipped zone fragments - so we make points instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Much clearer.
+---------------------------------+------------------------------------------------------+ | ||
| Option | Description | | ||
+=================================+======================================================+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please state the default behavior. I am guessing that if plane
or pointmesh
is omitted, the behavior is the same as specifying 0
. What is the default for point_tolerance
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added defaults in the table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, Brad!
This PR resolves #1565.
axom::mir::ElviraAlgorithm
class so it can output plane normal and offset for the planes used to clip zone fragments. These fields are output when the "plane" option is set to values other than zero.axom::mir::ElviraAlgorithm
to accept a "pointmesh" option that causes the algorithm to generate a mesh consisting of points located at the zone fragment clipping plane origins instead of making the usual polygonal or polyhedral meshes. This skips more costly work involved in generating the usual geometry when the user only wants the clipping planes.