Skip to content

Commit 29ed8ad

Browse files
committed
fix(SolidMesh): remove wrong test in degenerated check
1 parent 5c1c5fd commit 29ed8ad

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/geode/mesh/core/solid_mesh.cpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -412,13 +412,11 @@ namespace geode
412412

413413
public:
414414
explicit Impl( SolidMesh& solid )
415-
: polyhedron_around_vertex_(
416-
solid.vertex_attribute_manager()
415+
: polyhedron_around_vertex_( solid.vertex_attribute_manager()
417416
.template find_or_create_attribute< VariableAttribute,
418417
PolyhedronVertex >(
419418
"polyhedron_around_vertex", PolyhedronVertex{} ) ),
420-
polyhedra_around_vertex_(
421-
solid.vertex_attribute_manager()
419+
polyhedra_around_vertex_( solid.vertex_attribute_manager()
422420
.template find_or_create_attribute< VariableAttribute,
423421
CachedPolyhedra >(
424422
POLYHEDRA_AROUND_VERTEX_NAME, CachedPolyhedra{} ) )
@@ -908,10 +906,6 @@ namespace geode
908906
max_area_facet = f;
909907
}
910908
}
911-
if( max_area < GLOBAL_EPSILON )
912-
{
913-
return true;
914-
}
915909
const auto vertices = polyhedron_vertices( polyhedron_id );
916910
const auto normal =
917911
polyhedron_facet_normal( { polyhedron_id, max_area_facet } );
@@ -924,8 +918,7 @@ namespace geode
924918
Plane plane{ normal.value(), this->point( facet_vertices[0] ) };
925919
for( const auto vertex_id : vertices )
926920
{
927-
if( absl::c_find( facet_vertices, vertex_id )
928-
!= facet_vertices.end() )
921+
if( absl::c_contains( facet_vertices, vertex_id ) )
929922
{
930923
continue;
931924
}
@@ -1260,7 +1253,7 @@ namespace geode
12601253
{
12611254
facet_vertices.push_back(
12621255
vertices[polyhedron_facet_vertex_id( { facet, v } )
1263-
.vertex_id] );
1256+
.vertex_id] );
12641257
}
12651258
}
12661259
return facets_vertices;

0 commit comments

Comments
 (0)