diff --git a/src/Mod/Arch/ArchCommands.py b/src/Mod/Arch/ArchCommands.py index f33878dbe..6d27cf721 100644 --- a/src/Mod/Arch/ArchCommands.py +++ b/src/Mod/Arch/ArchCommands.py @@ -676,7 +676,7 @@ def getBrepFacesData(obj,scale=1): sols = [] for sol in obj.Shape.Solids: s = [] - for face in obj.Shape.Faces: + for face in sol.Faces: f = [] f.append(getTuples(face.OuterWire,scale,normal=face.normalAt(0,0),close=False)) for wire in face.Wires: diff --git a/src/Mod/Arch/ArchFrame.py b/src/Mod/Arch/ArchFrame.py index 892a83d03..ea0d24150 100644 --- a/src/Mod/Arch/ArchFrame.py +++ b/src/Mod/Arch/ArchFrame.py @@ -157,6 +157,13 @@ class _ViewProviderFrame(ArchComponent.ViewProviderComponent): def getIcon(self): import Arch_rc return ":/icons/Arch_Frame_Tree.svg" + + def claimChildren(self): + p = [] + if hasattr(self,"Object"): + if self.Object.Profile: + p = [self.Object.Profile] + return ArchComponent.ViewProviderComponent.claimChildren(self)+p if FreeCAD.GuiUp: FreeCADGui.addCommand('Arch_Frame',_CommandFrame()) diff --git a/src/Mod/Arch/ifcWriter.py b/src/Mod/Arch/ifcWriter.py index 0b156f7de..9b348e590 100644 --- a/src/Mod/Arch/ifcWriter.py +++ b/src/Mod/Arch/ifcWriter.py @@ -488,7 +488,7 @@ class IfcDocument(object): if shapes.is_a("IfcExtrudedAreaSolid"): solidType = "SweptSolid" shapes = [shapes] - reps = [create(self._fileobject,"IfcShapeRepresentation",[self._repcontext,'Body',solidType,[shape]]) for shape in shapes] + reps = [create(self._fileobject,"IfcShapeRepresentation",[self._repcontext,'Body',solidType,[shape for shape in shapes]])] return reps def addColor(self,rgb,rep): @@ -509,7 +509,7 @@ class IfcDocument(object): def addCircle(self,radius): """addCircle(radius): creates a polyline from the given points""" - lpl = self.addPlacement(flat=True) + lpl = self.addPlacement(local=False,flat=True) cir = create(self._fileobject,"IfcCircleProfileDef",["AREA",None,lpl,float(radius)]) return cir @@ -527,6 +527,8 @@ class IfcDocument(object): """addExtrudedPolyline(points,extrusion,[placement,color]): makes an extruded polyline from the given points and the given extrusion vector""" pol = self.addPolyline(points) + if not placement: + placement = self.addPlacement(local=False) exp = self.addExtrusion(pol,extrusion,placement) if color: self.addColor(color,exp) @@ -537,7 +539,7 @@ class IfcDocument(object): from the given radius and the given extrusion vector""" cir = self.addCircle(radius) if not placement: - placement = self.addPlacement(origin=center) + placement = self.addPlacement(origin=center,local=False) exp = self.addExtrusion(cir,extrusion,placement) if color: self.addColor(color,exp) diff --git a/src/Mod/Arch/importIFC.py b/src/Mod/Arch/importIFC.py index fc81f5cac..2c724a58d 100644 --- a/src/Mod/Arch/importIFC.py +++ b/src/Mod/Arch/importIFC.py @@ -44,7 +44,6 @@ supportedIfcTypes = ["IfcSite", "IfcBuilding", "IfcBuildingStorey", "IfcBeam", " "IfcSlab", "IfcStair", "IfcStairFlight", "IfcWall", "IfcWallStandardCase", "IfcWindow", "IfcWindowStandardCase", "IfcBuildingElementProxy", "IfcPile", "IfcFooting", "IfcReinforcingBar", "IfcTendon"] - # TODO : shading device not supported? if open.__module__ == '__builtin__': @@ -73,7 +72,7 @@ def insert(filename,docname,skip=None): def getConfig(): "Gets Arch IFC import preferences" - global CREATE_IFC_GROUPS, ASMESH, PREFIX_NUMBERS, FORCE_PYTHON_PARSER, SEPARATE_OPENINGS, SEPARATE_PLACEMENTS, JOINSOLIDS, AGGREGATE_WINDOWS + global SKIP, CREATE_IFC_GROUPS, ASMESH, PREFIX_NUMBERS, FORCE_PYTHON_PARSER, SEPARATE_OPENINGS, SEPARATE_PLACEMENTS, JOINSOLIDS, AGGREGATE_WINDOWS CREATE_IFC_GROUPS = False IMPORT_IFC_FURNITURE = False ASMESH = ["IfcFurnishingElement"] @@ -96,9 +95,6 @@ def getConfig(): if asmeshlist: ASMESH = asmeshlist.split(",") - # TODO provisorily skipped objects - SKIP.extend(["IfcAnnotation"]) - def getIfcOpenShell(): "locates and imports ifcopenshell" try: