Skip to content

Commit 7e83a8b

Browse files
authored
Merge pull request #182 from Geode-solutions/fix/checks_on_block_boundaries-not_called
fix(BlockTopology): Fixed call to checks on block surface boundaries
2 parents bad5f63 + 2888de9 commit 7e83a8b

8 files changed

Lines changed: 297 additions & 141 deletions

File tree

.clang-format

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# DO NOT MODIFY DIRECTLY THIS FILE
2-
# LOOK AT https://github.com/Geode-solutions/actions
31
AccessModifierOffset: -4
42
AlignAfterOpenBracket: DontAlign
53
AlignConsecutiveAssignments: false

bindings/python/tests/inspection/test-py-brep.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ def check_a1(verbose):
221221
else:
222222
print("model_A1 topology is invalid.")
223223
nb_model_issues = launch_topological_validity_checks(result.topology, verbose)
224-
if nb_model_issues != 5201:
224+
if nb_model_issues != 5191:
225225
raise ValueError(
226-
"[Test] model model_A1 should have 5201 unique vertices with topological problems."
226+
"[Test] model model_A1 should have 5191 unique vertices with topological problems."
227227
)
228228
nb_component_meshes_issues = launch_component_meshes_validity_checks(
229229
result.meshes, verbose
@@ -242,9 +242,9 @@ def inspect_model_A1(model_brep, verbose):
242242
else:
243243
print("model_A1_valid topology is invalid.")
244244
nb_model_issues = launch_topological_validity_checks(result.topology, verbose)
245-
if nb_model_issues != 5201:
245+
if nb_model_issues != 5191:
246246
raise ValueError(
247-
"[Test] model model_A1_valid should have 5201 topological problems."
247+
"[Test] model model_A1_valid should have 5191 topological problems."
248248
)
249249
nb_component_meshes_issues = launch_component_meshes_validity_checks(
250250
result.meshes, verbose
@@ -268,9 +268,9 @@ def inspect_model_mss(model_brep, verbose):
268268
else:
269269
print("model mss topology is invalid.")
270270
nb_model_issues = launch_topological_validity_checks(result.topology, verbose)
271-
if nb_model_issues != 52:
271+
if nb_model_issues != 50:
272272
raise ValueError(
273-
"[Test] model mss.og_strm should have 37 topological problems, not "
273+
"[Test] model mss.og_strm should have 50 topological problems, not "
274274
+ str(nb_model_issues)
275275
)
276276
nb_component_meshes_issues = launch_component_meshes_validity_checks(

bindings/python/tests/validity/test-py-brep-validity.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,22 @@ def data_dir():
3838
def check_a1():
3939
model_brep = geode.load_brep(data_dir() + "/model_A1.og_brep")
4040
result = validity.is_brep_valid(model_brep)
41-
if result.nb_issues()!=7:
42-
raise ValueError( "[Test] model model_A1 should have 7 issues." )
41+
if result.nb_issues()!=8:
42+
raise ValueError( "[Test] model model_A1 should have 8 issues." )
4343

4444

4545
def check_a1_valid():
4646
model_brep = geode.load_brep(data_dir() + "/model_A1_valid.og_brep")
4747
result = validity.is_brep_valid(model_brep)
48-
if result.nb_issues()!=7:
49-
raise ValueError( "[Test] model model_A1_valid should have 7 issues." )
48+
if result.nb_issues()!=8:
49+
raise ValueError( "[Test] model model_A1_valid should have 8 issues." )
5050

5151

5252
def check_model_mss():
5353
model_brep = geode.load_brep(data_dir() + "/mss.og_brep")
5454
result = validity.is_brep_valid(model_brep)
55-
if result.nb_issues()!=5:
56-
raise ValueError( "[Test] model_mss should have 5 issues." )
55+
if result.nb_issues()!=4:
56+
raise ValueError( "[Test] model_mss should have 4 issues." )
5757

5858

5959
def check_model_D():

include/geode/inspector/inspection/topology/brep_blocks_topology.hpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,18 @@ namespace geode
4949
"Blocks without mesh (uuid listed)"
5050
};
5151
InspectionIssues< uuid > wrong_block_boundary_surface{
52-
"Surfaces incorrectly bounding Blocks (uuids listed)"
52+
"Blocks with boundary surface(s) not linked to another boundary "
53+
"Surface by a line (Surface shouldn't be boundary or there is a "
54+
"hole in the block boundaries)"
5355
};
5456
InspectionIssuesMap< index_t > blocks_not_linked_to_a_unique_vertex{
55-
"Blocks containing mesh vertices not linked to unique vertices"
57+
"Blocks mesh vertices not linked to unique vertices"
58+
};
59+
InspectionIssues< uuid > blocks_with_not_closed_boundary_surfaces{
60+
"Blocks with non-closed boundary Surfaces"
61+
};
62+
InspectionIssues< index_t > model_boundaries_dont_form_a_closed_surface{
63+
"ModelBoundaries do not form a valid closed surface"
5664
};
5765
InspectionIssues< index_t >
5866
unique_vertices_part_of_two_blocks_and_no_boundary_surface{
@@ -73,12 +81,6 @@ namespace geode
7381
unique_vertices_linked_to_a_single_and_invalid_surface{
7482
"unique vertices linked to a single Surface that is invalid"
7583
};
76-
InspectionIssues< uuid > blocks_with_not_closed_boundary_surfaces{
77-
"Blocks with non-closed boundary Surfaces"
78-
};
79-
InspectionIssues< index_t > model_boundaries_dont_form_a_closed_surface{
80-
"ModelBoundaries are not valid"
81-
};
8284
InspectionIssues< index_t >
8385
unique_vertex_linked_to_multiple_invalid_surfaces{
8486
"unique vertices linked to multiple Surfaces in an invalid way"

0 commit comments

Comments
 (0)