| 239 | } |
| 240 | |
| 241 | static 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 | |
| 260 | Expected<void> toBinaryStl( const Mesh & mesh, const std::filesystem::path & file, const SaveSettings & settings ) |
| 261 | { |
no test coverage detected