MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / isClosedContourTrivial

Function isClosedContourTrivial

source/MRMesh/MRIntersectionContour.cpp:27–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27bool isClosedContourTrivial( const MeshTopology& topology, const OneMeshContour& contour )
28{
29 assert( contour.closed );
30 FaceBitSet fbs( topology.faceSize() );
31 for ( const auto& inter : contour.intersections )
32 {
33 assert( std::holds_alternative<EdgeId>( inter.primitiveId ) );
34 auto eid = std::get<EdgeId>( inter.primitiveId );
35 if ( auto l = topology.left( eid ) )
36 fbs.set( l );
37 }
38 auto boundary = findLeftBoundary( topology, fbs );
39 if ( boundary.empty() )
40 return false;
41 auto fillRes = fillContourLeft( topology, boundary.front() );
42 return !fillRes.test( topology.right( boundary.front().front() ) );
43}
44
45// store data about connected intersections
46// indexed flat: if edgeAtriB then index = index in edgeAtriB vector

Callers 1

Calls 8

findLeftBoundaryFunction · 0.85
fillContourLeftFunction · 0.85
faceSizeMethod · 0.80
leftMethod · 0.80
rightMethod · 0.80
setMethod · 0.45
emptyMethod · 0.45
testMethod · 0.45

Tested by

no test coverage detected