From 3965b50ae005fea8bf57b8fcc3fb8451139a1e32 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Tue, 17 Jul 2018 21:41:19 -0300 Subject: [PATCH] Arch: Fixed wrong Floor height on IFC import --- src/Mod/Arch/importIFC.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index 912c856896..1d79b29a40 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -694,6 +694,7 @@ def insert(filename,docname,skip=[],only=[],root=None): if FreeCAD.GuiUp and baseobj: if hasattr(baseobj,"ViewObject"): baseobj.ViewObject.hide() + if ptype == "IfcBuildingStorey": obj.Placement.Base.z = product.Elevation*1000 # setting role @@ -737,6 +738,7 @@ def insert(filename,docname,skip=[],only=[],root=None): for freecadtype,ifctypes in typesmap.items(): if ptype in ifctypes: obj = getattr(Arch,"make"+freecadtype)(baseobj=baseobj,name=name) + if ptype == "IfcBuildingStorey": obj.Placement.Base.z = product.Elevation*1000 elif baseobj: obj = Arch.makeComponent(baseobj,name=name,delete=True) @@ -748,6 +750,7 @@ def insert(filename,docname,skip=[],only=[],root=None): for freecadtype,ifctypes in typesmap.items(): if ptype in ifctypes: obj = getattr(Arch,"make"+freecadtype)(baseobj=baseobj,name=name) + if ptype == "IfcBuildingStorey": obj.Placement.Base.z = product.Elevation*1000 elif baseobj: obj = FreeCAD.ActiveDocument.addObject("Part::Feature",name) obj.Shape = shape