mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Fix bug where IFC2X3 files cannot have coordinates reset properly
This commit is contained in:
@@ -529,7 +529,12 @@ class IfcImporter():
|
||||
# 12D can have some funky coordinates out of any sensible range. This
|
||||
# method will not work all the time, but will catch most issues.
|
||||
offset_point = None
|
||||
for point_list in self.file.by_type('IfcCartesianPointList3D'):
|
||||
try:
|
||||
point_lists = self.file.by_type('IfcCartesianPointList3D')
|
||||
except:
|
||||
# IFC2X3 does not have IfcCartesianPointList3D
|
||||
point_lists = []
|
||||
for point_list in point_lists:
|
||||
coord_list = [None] * len(point_list.CoordList)
|
||||
for i, point in enumerate(point_list.CoordList):
|
||||
if len(point) == 2 or not self.is_point_far_away(point):
|
||||
|
||||
@@ -8,7 +8,12 @@ class Patcher:
|
||||
# 12D can have some funky coordinates out of any sensible range. This
|
||||
# method will not work all the time, but will catch most issues.
|
||||
offset_point = None
|
||||
for point_list in self.file.by_type('IfcCartesianPointList3D'):
|
||||
try:
|
||||
point_lists = self.file.by_type('IfcCartesianPointList3D')
|
||||
except:
|
||||
# IFC2X3 does not have IfcCartesianPointList3D
|
||||
point_lists = []
|
||||
for point_list in point_lists:
|
||||
coord_list = [None] * len(point_list.CoordList)
|
||||
for i, point in enumerate(point_list.CoordList):
|
||||
if len(point) == 2 or not self.is_point_far_away(point):
|
||||
|
||||
Reference in New Issue
Block a user