Repository navigation
How to use fix Tunnels
#6302
Answered by
Fedr
Jun 23, 2026
Replies: 3 comments 2 replies
|
Please use the metrics as follows. Shortest: Most Curved: Most Concave: Most Convex: Least Curved: |
1 reply
|
Every tunnel on the mesh has two associated not-trivial (not-collapsible) co-loops. On your picture one is red, and the other one is green. MeshLib has a function to find one such loop given its associated loop: /// given not-separating loop on input, finds the loop (also not-separation) that
/// 1) goes from left side of input loop
/// 2) returns to the input loop from its right side
/// 3) goes along the input loop to become closed
/// such that the resulting loop has minimal sum of given metric for its edges;
/// edges 1) and 2) can be only inner or boundary to the given region (they must have region from left or from right)
MRMESH_API Expected<EdgeLoop> findSmallestMetricCoLoop( const MeshTopology& topology, const EdgeLoop& loop, const EdgeMetric& metric,
const FaceBitSet* region = nullptr );
/// same as \ref findMinimalCoLoop with euclidean edge length metric
MRMESH_API Expected<EdgeLoop> findShortestCoLoop( const MeshPart& mp, const EdgeLoop& loop );In you example, the co-loop is shorter, so the fix in #6305 will find it: But if you want to find not the shortest not-collapsible loops, that always the ones around the tunnel, then you should select between co-loops on your side, e.g. testing which one has central point outside of mesh. |
1 reply
Answer selected by
leye123
|
Yes, we include the improvement in the nearest release. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



Every tunnel on the mesh has two associated not-trivial (not-collapsible) co-loops. On your picture one is red, and the other one is green.
MeshLib has a function to find one such loop given its associated loop: