diff --git a/src/geode/inspector/topology/brep_surfaces_topology.cpp b/src/geode/inspector/topology/brep_surfaces_topology.cpp index 8b97a87..026e277 100644 --- a/src/geode/inspector/topology/brep_surfaces_topology.cpp +++ b/src/geode/inspector/topology/brep_surfaces_topology.cpp @@ -218,45 +218,44 @@ namespace geode } const auto line_uuids = internal::components_uuids( brep_, unique_vertex_index, Line3D::component_type_static() ); - // if( line_uuids.empty() ) - // { - // bool has_corner_internal_to_all_surfaces{ false }; - // for( const auto& cmv : - // brep_.component_mesh_vertices( unique_vertex_index ) ) - // { - // if( cmv.component_id.type() - // != Corner3D::component_type_static() ) - // { - // continue; - // } - // const auto& corner = brep_.corner( cmv.component_id.id() ); - // for( const auto& surface_id : surface_uuids ) - // { - // const auto& surface = brep_.surface( surface_id ); - // if( surface.is_active() - // && !brep_.is_internal( corner, surface ) ) - // { - // return absl::StrCat( "unique vertex ", - // unique_vertex_index, " at position [", - // corner.mesh().point( cmv.vertex ).string(), - // "] is part of multiple active Surfaces, and not " - // "part of any Line, but is part of Corner ", - // corner.name(), " (", corner.id().string(), - // "), which is not internal to active Surface ", - // surface.name(), " (", surface_id.string(), ")." - // ); - // } - // } - // has_corner_internal_to_all_surfaces = true; - // } - // if( !has_corner_internal_to_all_surfaces ) - // { - // return absl::StrCat( "unique vertex ", unique_vertex_index, - // " is part of multiple active Surfaces, and not part of " - // "any Line, but not part of any Corner internal to all " - // "Surfaces." ); - // } - // } + if( line_uuids.empty() ) + { + bool has_corner_internal_to_all_surfaces{ false }; + for( const auto& cmv : + brep_.component_mesh_vertices( unique_vertex_index ) ) + { + if( cmv.component_id.type() + != Corner3D::component_type_static() ) + { + continue; + } + const auto& corner = brep_.corner( cmv.component_id.id() ); + for( const auto& surface_id : surface_uuids ) + { + const auto& surface = brep_.surface( surface_id ); + if( surface.is_active() + && !brep_.is_internal( corner, surface ) ) + { + return absl::StrCat( "unique vertex ", + unique_vertex_index, " at position [", + corner.mesh().point( cmv.vertex ).string(), + "] is part of multiple active Surfaces, and not " + "part of any Line, but is part of Corner ", + corner.name(), " (", corner.id().string(), + "), which is not internal to active Surface ", + surface.name(), " (", surface_id.string(), ")." ); + } + } + has_corner_internal_to_all_surfaces = true; + } + if( !has_corner_internal_to_all_surfaces ) + { + return absl::StrCat( "unique vertex ", unique_vertex_index, + " is part of multiple active Surfaces, and not part of " + "any Line, but not part of any Corner internal to all " + "Surfaces." ); + } + } if( line_uuids.size() == 1 ) { index_t nb_cmv_lines{ 0 }; diff --git a/tests/inspector/test-solid-adjacency.cpp b/tests/inspector/test-solid-adjacency.cpp index 265a896..f7e52c5 100644 --- a/tests/inspector/test-solid-adjacency.cpp +++ b/tests/inspector/test-solid-adjacency.cpp @@ -167,6 +167,7 @@ int main() try { geode::InspectorInspectorLibrary::initialize(); + geode::Logger::set_level( geode::Logger::LEVEL::debug ); check_adjacency(); check_non_adjacency_no_bijection(); check_non_adjacency_wrong_facet();