Skip to content

Commit 4ff4b39

Browse files
committed
Get respecting entities
1 parent 0ebe396 commit 4ff4b39

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

mvd.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,19 @@ def get_non_respecting_entities(file, verification_matrix):
353353
return non_respecting
354354

355355

356+
357+
358+
def get_respecting_entities(file, verification_matrix):
359+
respecting = []
360+
for k, v in verification_matrix.items():
361+
entity = file.by_id(k)
362+
print(list(v.values()))
363+
if sum(v.values()) == 0:
364+
respecting.append(entity)
365+
366+
return respecting
367+
368+
356369
def visualize(file, not_respecting_entities):
357370
"""
358371
Visualize the instances of the entity type targeted by the mvdXML ConceptRoot.
@@ -385,9 +398,12 @@ def visualize(file, not_respecting_entities):
385398
else:
386399
c = (0, 1, 0.5, 1)
387400

388-
shape = ifcopenshell.geom.create_shape(s, el)
389-
# OCC.BRepTools.breptools_Write(shape.geometry, "test.brep")
390-
ds = ifcopenshell.geom.utils.display_shape(shape, clr=c)
401+
try:
402+
shape = ifcopenshell.geom.create_shape(s, el)
403+
# OCC.BRepTools.breptools_Write(shape.geometry, "test.brep")
404+
ds = ifcopenshell.geom.utils.display_shape(shape, clr=c)
405+
except:
406+
pass
391407

392408
viewer.FitAll()
393409

0 commit comments

Comments
 (0)