| 25 | } |
| 26 | |
| 27 | bool 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 |
no test coverage detected