Skip to content

FILT: Add filter to extract microstructure triple lines from surface meshes - #1729

Open
imikejackson wants to merge 1 commit into
BlueQuartzSoftware:developfrom
imikejackson:topic/add_triple_line_option
Open

FILT: Add filter to extract microstructure triple lines from surface meshes#1729
imikejackson wants to merge 1 commit into
BlueQuartzSoftware:developfrom
imikejackson:topic/add_triple_line_option

Conversation

@imikejackson

Copy link
Copy Markdown
Contributor

No description provided.

@imikejackson
imikejackson force-pushed the topic/add_triple_line_option branch from c072c2a to 1d92ae0 Compare August 25, 2026 20:17
Extracts the triple lines of a multi-material surface mesh into a
self-contained Edge Geometry.

A mesh edge is a triple line segment when the unique Feature Ids across
the Face Labels of the triangles sharing it number three or more. Feature
Id -1 (outside the volume) counts only when Include Exterior Triple Lines
is enabled, which turns interior-only extraction into one that also finds
grain boundaries reaching the free surface.

Because the lines are extracted from whatever Triangle Geometry is
supplied, placing the filter after a smoothing step yields triple lines
that lie exactly on the smoothed surface. An option on the surface
meshers could not do that, since it can only see the mesh as generated.
The created geometry carries a NumFeatures value per segment (3 for a
triple line, 4 for a quadruple point line) and a Node Types array copied
from the source mesh, so it can be consumed directly by filters that
require one, such as Laplacian Smoothing.

The shared implementation lives in MeshingUtilities::GenerateTripleLines
so it is reachable from other plugins. Node Types is copied through only;
it is never consulted to decide whether an edge is a triple line, and the
header says so at the point a future reader would be tempted otherwise.
Using the count of triangles sharing an edge was likewise considered and
rejected: it cannot express the interior-only case, and it misreports
non-manifold pinches as quadruple lines.

Also removes 505 lines of dormant, unreachable triple line code from
QuickSurfaceMesh. Both prior implementations sat behind a macro that is
never defined and neither worked: one corrupted every vertex Y coordinate
and wrote its two-component edge list at stride three, the other read
Node Types from the Face Labels path and never set the edge list.

Preflight rejects Face Labels or Node Types arrays whose tuple counts do
not match the geometry's face and vertex counts, which would otherwise
read past the end of an array during execute.

Tests are built on hand-derived expected values rather than stored
meshes: a flat boundary yields no triple lines, an interior junction
yields one segment with three Features, a quadruple point yields four,
and a four-grain block run through all three surface meshers yields
consistent topology. Vertex compaction, the exterior toggle, and the
Node Types pass-through are each covered.

Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
@imikejackson
imikejackson force-pushed the topic/add_triple_line_option branch from 1d92ae0 to 49263db Compare August 27, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant