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

Function getNotDegenTris

source/MRMesh/MRMeshSave.cpp:241–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241static FaceBitSet getNotDegenTris( const Mesh &mesh )
242{
243 MR_TIMER;
244 FaceBitSet notDegenTris = mesh.topology.getValidFaces();
245 BitSetParallelFor( notDegenTris, [&]( FaceId f )
246 {
247 VertId a, b, c;
248 mesh.topology.getTriVerts( f, a, b, c );
249 assert( a.valid() && b.valid() && c.valid() );
250
251 const Vector3f& ap = mesh.points[a];
252 const Vector3f& bp = mesh.points[b];
253 const Vector3f& cp = mesh.points[c];
254 if ( ap == bp || bp == cp || cp == ap )
255 notDegenTris.reset( f );
256 } );
257 return notDegenTris;
258}
259
260Expected<void> toBinaryStl( const Mesh & mesh, const std::filesystem::path & file, const SaveSettings & settings )
261{

Callers 2

toBinaryStlFunction · 0.85
toAsciiStlFunction · 0.85

Calls 4

BitSetParallelForFunction · 0.85
getTriVertsMethod · 0.80
validMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected