Skip to content

Commit 657e96f

Browse files
committed
fix(Blocks Topology): fix issue on boundary finding graph create
fix #142
1 parent 68080b8 commit 657e96f

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

src/geode/inspector/topology/brep_blocks_topology.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ namespace
150150
surface_uuids_to_graph_edges,
151151
geode::BijectiveMapping< geode::uuid, geode::index_t >&
152152
line_uuids_to_graph_vertices,
153-
geode::Graph& graph,
153+
const geode::Graph& graph,
154154
geode::GraphBuilder& graph_builder )
155155
{
156156
for( const auto& line : brep.lines() )
@@ -167,6 +167,10 @@ namespace
167167
for( const auto& boundary_line :
168168
brep.boundaries( incident_surface ) )
169169
{
170+
if( line.id() == boundary_line.id() )
171+
{
172+
continue;
173+
}
170174
const auto boundary_line_vertex =
171175
line_uuids_to_graph_vertices.in2out(
172176
boundary_line.id() );

tests/data/cube_segmented.og_brep

918 KB
Binary file not shown.

tests/inspector/test-brep.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,16 +413,32 @@ void check_wrong_bsurfaces_model()
413413
}
414414
}
415415

416+
void check_segmented_cube()
417+
{
418+
const auto model_brep = geode::load_brep(
419+
absl::StrCat( geode::DATA_PATH, "cube_segmented.og_brep" ) );
420+
const geode::BRepInspector brep_inspector{ model_brep };
421+
const auto result = brep_inspector.inspect_brep();
422+
423+
geode::Logger::info( "cube_segmented topology is ",
424+
brep_inspector.brep_topology_is_valid() ? "valid." : "invalid." );
425+
426+
const auto nb_component_meshes_issues =
427+
launch_component_meshes_validity_checks( result.meshes, false );
428+
}
429+
416430
int main()
417431
{
418432
try
419433
{
420434
geode::InspectorInspectorLibrary::initialize();
435+
geode::Logger::set_level( geode::Logger::LEVEL::debug );
421436
check_model_a1( false );
422437
check_model_a1_valid( false );
423438
check_model_mss( false );
424439
check_model_D( false );
425440
check_wrong_bsurfaces_model();
441+
check_segmented_cube();
426442
geode::Logger::info( "TEST SUCCESS" );
427443
return 0;
428444
}

0 commit comments

Comments
 (0)