mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +00:00
Fix location for parented and constrained objects
This commit is contained in:
@@ -215,7 +215,7 @@ class IfcParser():
|
|||||||
|
|
||||||
def resolve_array_modifier(self, product):
|
def resolve_array_modifier(self, product):
|
||||||
object = product['raw']
|
object = product['raw']
|
||||||
instance_objects = [(object, object.location)]
|
instance_objects = [(object, object.matrix_world.translation)]
|
||||||
global_id_index = 0
|
global_id_index = 0
|
||||||
for instance in self.get_instances(object):
|
for instance in self.get_instances(object):
|
||||||
created_instances = []
|
created_instances = []
|
||||||
@@ -251,7 +251,7 @@ class IfcParser():
|
|||||||
product = {
|
product = {
|
||||||
'ifc': None,
|
'ifc': None,
|
||||||
'raw': object,
|
'raw': object,
|
||||||
'location': object.location,
|
'location': object.matrix_world.translation,
|
||||||
'up_axis': object.matrix_world.to_quaternion() @ Vector((0, 0, 1)),
|
'up_axis': object.matrix_world.to_quaternion() @ Vector((0, 0, 1)),
|
||||||
'forward_axis': object.matrix_world.to_quaternion() @ Vector((1, 0, 0)),
|
'forward_axis': object.matrix_world.to_quaternion() @ Vector((1, 0, 0)),
|
||||||
'class': self.get_ifc_class(object.name),
|
'class': self.get_ifc_class(object.name),
|
||||||
@@ -685,7 +685,7 @@ class IfcParser():
|
|||||||
type = {
|
type = {
|
||||||
'ifc': None,
|
'ifc': None,
|
||||||
'raw': object,
|
'raw': object,
|
||||||
'location': object.location,
|
'location': object.translation,
|
||||||
'up_axis': object.matrix_world.to_quaternion() @ Vector((0, 0, 1)),
|
'up_axis': object.matrix_world.to_quaternion() @ Vector((0, 0, 1)),
|
||||||
'forward_axis': object.matrix_world.to_quaternion() @ Vector((1, 0, 0)),
|
'forward_axis': object.matrix_world.to_quaternion() @ Vector((1, 0, 0)),
|
||||||
'psets': ['{}/{}'.format(pset.name, pset.file) for pset in
|
'psets': ['{}/{}'.format(pset.name, pset.file) for pset in
|
||||||
|
|||||||
Reference in New Issue
Block a user