From 6d2877444c4b062918395732d42a08f9fd82ff70 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Fri, 4 Dec 2015 07:17:46 +0100 Subject: [PATCH] Arch: ifc: fix import of archobj walls if structobj import is activated --- src/Mod/Arch/importIFC.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index 1807ba7ff..13649bbf2 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -328,12 +328,6 @@ def insert(filename,docname,skip=[],only=[],root=None): settings.set(settings.USE_WORLD_COORDS,True) if SEPARATE_OPENINGS: settings.set(settings.DISABLE_OPENING_SUBTRACTIONS,True) - if MERGE_MODE_STRUCT != 3: - try: - settings.set(settings.INCLUDE_CURVES,True) - except: - FreeCAD.Console.PrintError("Set INCLUDE_CURVES failed. IfcOpenShell seams to be an Outdated Developer Version.\n") - FreeCAD.Console.PrintError("Import of StructuralAnalysisView Entities will not work!\n") sites = ifcfile.by_type("IfcSite") buildings = ifcfile.by_type("IfcBuilding") floors = ifcfile.by_type("IfcBuildingStorey") @@ -427,8 +421,10 @@ def insert(filename,docname,skip=[],only=[],root=None): shape = None archobj = True # assume all objects not in structuralifcobjects are architecture + structobj = False if ptype in structuralifcobjects: archobj = False + structobj = True if DEBUG: print " (struct)", else: if DEBUG: print " (arch)", @@ -459,6 +455,10 @@ def insert(filename,docname,skip=[],only=[],root=None): sharedobjects[bid] = None store = bid + if structobj: + settings.set(settings.INCLUDE_CURVES,True) + else: + settings.set(settings.INCLUDE_CURVES,False) try: cr = ifcopenshell.geom.create_shape(settings,product) brep = cr.geometry.brep_data @@ -474,10 +474,10 @@ def insert(filename,docname,skip=[],only=[],root=None): shape.scale(1000.0) # IfcOpenShell always outputs in meters if not shape.isNull(): - if (MERGE_MODE_ARCH > 0 and archobj) or not archobj: + if (MERGE_MODE_ARCH > 0 and archobj) or structobj: if ptype == "IfcSpace": # do not add spaces to compounds if DEBUG: print "skipping space ",pid - elif not archobj: + elif structobj: structshapes[pid] = shape if DEBUG: print shape.Solids," ", baseobj = shape