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

Function intersectionFromMeshTriPoint

source/MRMesh/MROneMeshContours.cpp:341–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341OneMeshIntersection intersectionFromMeshTriPoint( const Mesh& mesh, const MeshTriPoint& mtp )
342{
343 OneMeshIntersection res;
344 res.coordinate = mesh.triPoint( mtp );
345 auto e = mtp.onEdge( mesh.topology );
346 if ( e )
347 {
348 auto v = mtp.inVertex( mesh.topology );
349 if ( v )
350 res.primitiveId = v;
351 else
352 res.primitiveId = e.e;
353 }
354 else
355 res.primitiveId = mesh.topology.left( mtp.e );
356 return res;
357}
358
359// this function orient intersected edges to start from left part of path and end on right, also remove duplicates
360SurfacePath formatSurfacePath( const MeshTopology& topology, const SurfacePath& path )

Calls 4

triPointMethod · 0.80
leftMethod · 0.80
onEdgeMethod · 0.45
inVertexMethod · 0.45

Tested by

no test coverage detected