mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 20:42:27 +00:00
Fix bug #1315 - regression in the absolute coordinate offset feature where I forgot to convert non-meter units.
This commit is contained in:
@@ -530,7 +530,6 @@ class IfcImporter:
|
|||||||
for i, point in enumerate(point_list.CoordList):
|
for i, point in enumerate(point_list.CoordList):
|
||||||
if len(point) == 3 and self.is_point_far_away(point):
|
if len(point) == 3 and self.is_point_far_away(point):
|
||||||
return point[0]
|
return point[0]
|
||||||
# offset_point = (point[0], point[1], point[2])
|
|
||||||
|
|
||||||
for point in self.file.by_type("IfcCartesianPoint"):
|
for point in self.file.by_type("IfcCartesianPoint"):
|
||||||
elements_checked += 1
|
elements_checked += 1
|
||||||
@@ -542,17 +541,6 @@ class IfcImporter:
|
|||||||
def apply_blender_offset_to_matrix(self, matrix):
|
def apply_blender_offset_to_matrix(self, matrix):
|
||||||
props = bpy.context.scene.BIMGeoreferenceProperties
|
props = bpy.context.scene.BIMGeoreferenceProperties
|
||||||
if props.has_blender_offset and props.blender_offset_type == "OBJECT_PLACEMENT":
|
if props.has_blender_offset and props.blender_offset_type == "OBJECT_PLACEMENT":
|
||||||
test = mathutils.Matrix(
|
|
||||||
ifcopenshell.util.geolocation.global2local(
|
|
||||||
matrix,
|
|
||||||
float(props.blender_eastings) * self.unit_scale,
|
|
||||||
float(props.blender_northings) * self.unit_scale,
|
|
||||||
float(props.blender_orthogonal_height) * self.unit_scale,
|
|
||||||
float(props.blender_x_axis_abscissa),
|
|
||||||
float(props.blender_x_axis_ordinate),
|
|
||||||
).tolist()
|
|
||||||
)
|
|
||||||
|
|
||||||
return mathutils.Matrix(
|
return mathutils.Matrix(
|
||||||
ifcopenshell.util.geolocation.global2local(
|
ifcopenshell.util.geolocation.global2local(
|
||||||
matrix,
|
matrix,
|
||||||
@@ -1396,9 +1384,9 @@ class IfcImporter:
|
|||||||
ordinate_index = 0
|
ordinate_index = 0
|
||||||
verts = [None] * len(geometry.verts)
|
verts = [None] * len(geometry.verts)
|
||||||
offset_point = (
|
offset_point = (
|
||||||
float(props.blender_eastings),
|
float(props.blender_eastings) * self.unit_scale,
|
||||||
float(props.blender_northings),
|
float(props.blender_northings) * self.unit_scale,
|
||||||
float(props.blender_orthogonal_height),
|
float(props.blender_orthogonal_height) * self.unit_scale,
|
||||||
)
|
)
|
||||||
for i, vert in enumerate(geometry.verts):
|
for i, vert in enumerate(geometry.verts):
|
||||||
if ordinate_index > 2:
|
if ordinate_index > 2:
|
||||||
|
|||||||
Reference in New Issue
Block a user