Skip to content

Commit f6d60ae

Browse files
committed
fix test
1 parent cabceaf commit f6d60ae

1 file changed

Lines changed: 27 additions & 17 deletions

File tree

src/geode/inspector/inspection/topology/brep_corners_topology.cpp

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
#include <geode/mesh/core/point_set.hpp>
3030

31+
#include <geode/model/mixin/core/block.hpp>
3132
#include <geode/model/mixin/core/corner.hpp>
3233
#include <geode/model/mixin/core/line.hpp>
3334
#include <geode/model/representation/core/brep.hpp>
@@ -116,13 +117,9 @@ namespace geode
116117
}
117118
corner_found = true;
118119
const auto& corner_uuid = cmv.component_id.id();
119-
if( brep_.nb_embeddings( corner_uuid ) > 1 )
120+
if( brep_.nb_embeddings( corner_uuid ) == 0 )
120121
{
121-
return false;
122-
}
123-
if( brep_.nb_embeddings( corner_uuid ) != 1 )
124-
{
125-
if( brep_.nb_incidences( corner_uuid ) < 1 )
122+
if( brep_.nb_incidences( corner_uuid ) == 0 )
126123
{
127124
return false;
128125
}
@@ -131,10 +128,14 @@ namespace geode
131128
{
132129
return false;
133130
}
134-
if( corner_is_part_of_line_but_not_boundary( unique_vertex_index ) )
135-
{
136-
return false;
137-
}
131+
}
132+
if( corner_is_multiply_embedded( unique_vertex_index ) )
133+
{
134+
return false;
135+
}
136+
if( corner_is_part_of_line_but_not_boundary( unique_vertex_index ) )
137+
{
138+
return false;
138139
}
139140
return true;
140141
}
@@ -186,13 +187,22 @@ namespace geode
186187
&& brep_.corner( cmv.component_id.id() ).is_active()
187188
&& brep_.nb_embeddings( cmv.component_id.id() ) > 1 )
188189
{
189-
return absl::StrCat( "unique vertex ", unique_vertex_index,
190-
" is associated to Corner ",
191-
brep_.corner( cmv.component_id.id() )
192-
.name()
193-
.value_or( cmv.component_id.id().string() ),
194-
" (", cmv.component_id.id().string(),
195-
"), which is embedded in several components." );
190+
for( const auto& embedding :
191+
brep_.embeddings( cmv.component_id.id() ) )
192+
{
193+
if( embedding.type() == Block3D::component_type_static()
194+
&& brep_.block( embedding.id() ).is_active() )
195+
{
196+
return absl::StrCat( "unique vertex ",
197+
unique_vertex_index, " is associated to Corner ",
198+
brep_.corner( cmv.component_id.id() )
199+
.name()
200+
.value_or( cmv.component_id.id().string() ),
201+
" (", cmv.component_id.id().string(),
202+
"), which is embedded in several components "
203+
"including a Block." );
204+
}
205+
}
196206
}
197207
}
198208
return std::nullopt;

0 commit comments

Comments
 (0)