mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
Fix bug where models that might have invalid shapes or 2D far shapes might break georeferencing and model loading.
This commit is contained in:
@@ -574,7 +574,13 @@ class IfcImporter:
|
|||||||
return
|
return
|
||||||
if not self.does_element_likely_have_geometry_far_away(element):
|
if not self.does_element_likely_have_geometry_far_away(element):
|
||||||
continue
|
continue
|
||||||
shape = ifcopenshell.geom.create_shape(self.settings, element)
|
try:
|
||||||
|
shape = ifcopenshell.geom.create_shape(self.settings, element)
|
||||||
|
except:
|
||||||
|
try:
|
||||||
|
shape = ifcopenshell.geom.create_shape(self.settings_body_2d, element)
|
||||||
|
except:
|
||||||
|
continue
|
||||||
m = shape.transformation.matrix.data
|
m = shape.transformation.matrix.data
|
||||||
mat = np.array(
|
mat = np.array(
|
||||||
([m[0], m[3], m[6], m[9]], [m[1], m[4], m[7], m[10]], [m[2], m[5], m[8], m[11]], [0, 0, 0, 1])
|
([m[0], m[3], m[6], m[9]], [m[1], m[4], m[7], m[10]], [m[2], m[5], m[8], m[11]], [0, 0, 0, 1])
|
||||||
|
|||||||
Reference in New Issue
Block a user