mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
Fix #3366. Fix crash in IfcDiff if you are comparing a model with no geometry.
This commit is contained in:
@@ -29,9 +29,10 @@ import multiprocessing
|
|||||||
import ifcopenshell
|
import ifcopenshell
|
||||||
import ifcopenshell.geom
|
import ifcopenshell.geom
|
||||||
import ifcopenshell.util.element
|
import ifcopenshell.util.element
|
||||||
|
import ifcopenshell.util.selector
|
||||||
import ifcopenshell.util.placement
|
import ifcopenshell.util.placement
|
||||||
import ifcopenshell.util.classification
|
import ifcopenshell.util.classification
|
||||||
import ifcopenshell.util.selector
|
import ifcopenshell.util.representation
|
||||||
from deepdiff import DeepDiff
|
from deepdiff import DeepDiff
|
||||||
|
|
||||||
|
|
||||||
@@ -141,8 +142,9 @@ class IfcDiff:
|
|||||||
continue
|
continue
|
||||||
if should_check_geometry:
|
if should_check_geometry:
|
||||||
# Option 1: check everything heuristically using the iterator (seems faster)
|
# Option 1: check everything heuristically using the iterator (seems faster)
|
||||||
potential_old_changes.append(old)
|
if ifcopenshell.util.representation.get_representation(new, "Model", "Body", "MODEL_VIEW"):
|
||||||
potential_new_changes.append(new)
|
potential_old_changes.append(old)
|
||||||
|
potential_new_changes.append(new)
|
||||||
# Option 2: check first using Python, then fallback to iterator (twice as slow)
|
# Option 2: check first using Python, then fallback to iterator (twice as slow)
|
||||||
# diff = self.diff_element_basic_geometry(old, new)
|
# diff = self.diff_element_basic_geometry(old, new)
|
||||||
# if diff:
|
# if diff:
|
||||||
|
|||||||
Reference in New Issue
Block a user