From b704454e332cb637ec4cb213b8348670248fc795 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Fri, 25 Mar 2022 13:41:45 +0100 Subject: [PATCH] Arch: Fixed placement of rebars in IFC export --- src/Mod/Arch/ArchRebar.py | 4 ++-- src/Mod/Arch/exportIFC.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mod/Arch/ArchRebar.py b/src/Mod/Arch/ArchRebar.py index 27c60d1625..de824dc3ad 100644 --- a/src/Mod/Arch/ArchRebar.py +++ b/src/Mod/Arch/ArchRebar.py @@ -277,10 +277,10 @@ class _Rebar(ArchComponent.Component): wire = DraftGeomUtils.filletWire(wire,radius) wires = [] if obj.Amount == 1: - if size: + if size and father: offset = DraftVecUtils.scaleTo(axis,size/2) else: - offset = axis + offset = FreeCAD.Vector() wire.translate(offset) wires.append(wire) else: diff --git a/src/Mod/Arch/exportIFC.py b/src/Mod/Arch/exportIFC.py index 1aff5fe292..5f1f37932e 100644 --- a/src/Mod/Arch/exportIFC.py +++ b/src/Mod/Arch/exportIFC.py @@ -1704,7 +1704,7 @@ def getIfcTypeFromObj(obj): ifctype = obj.IfcType.replace(" ","") elif dtype in ["App::Part","Part::Compound"]: ifctype = "IfcElementAssembly" - elif dtype in ["App::DocumentObjctGroup"]: + elif dtype in ["App::DocumentObjectGroup"]: ifctype = "IfcGroup" else: ifctype = dtype @@ -2030,6 +2030,7 @@ def getRepresentation( # convert to meters r = rdata[1] * preferences['SCALE_FACTOR'] for w in rdata[0]: + w.Placement = w.Placement.multiply(obj.getGlobalPlacement()) w.scale(preferences['SCALE_FACTOR']) cur = createCurve(ifcfile,w) shape = ifcfile.createIfcSweptDiskSolid(cur,r)