From 4fa967b240ea4ab57ab10de703a8533d1fd2c16f Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Wed, 13 May 2020 14:12:37 +0200 Subject: [PATCH] Arch: Fixed export of non-ortho extrusions to IFC --- src/Mod/Arch/exportIFC.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Arch/exportIFC.py b/src/Mod/Arch/exportIFC.py index 711776a20e..e00e1185e9 100644 --- a/src/Mod/Arch/exportIFC.py +++ b/src/Mod/Arch/exportIFC.py @@ -1925,11 +1925,10 @@ def getRepresentation(ifcfile,context,obj,forcebrep=False,subtraction=False,tess if (not shapes) and obj.isDerivedFrom("Part::Extrusion"): import ArchComponent pstr = str([v.Point for v in obj.Base.Shape.Vertexes]) - pr = obj.Base.Shape.copy() - pr.scale(preferences['SCALE_FACTOR']) profile,pl = ArchComponent.Component.rebase(obj,obj.Base.Shape) + profile.scale(preferences['SCALE_FACTOR']) pl.Base = pl.Base.multiply(preferences['SCALE_FACTOR']) - profile = getProfile(ifcfile,pr) + profile = getProfile(ifcfile,profile) if profile: profiledefs[pstr] = profile ev = obj.Dir @@ -1937,6 +1936,7 @@ def getRepresentation(ifcfile,context,obj,forcebrep=False,subtraction=False,tess if l: ev.multiply(l) ev.multiply(preferences['SCALE_FACTOR']) + ev = pl.Rotation.inverted().multVec(ev) xvc = ifcbin.createIfcDirection(tuple(pl.Rotation.multVec(FreeCAD.Vector(1,0,0)))) zvc = ifcbin.createIfcDirection(tuple(pl.Rotation.multVec(FreeCAD.Vector(0,0,1)))) ovc = ifcbin.createIfcCartesianPoint(tuple(pl.Base))