BIM: NativeIFC 2D support - section planes

This commit is contained in:
Yorik van Havre
2024-09-30 14:58:11 +02:00
committed by Yorik van Havre
parent c0d452f6c5
commit 14585a760e
9 changed files with 240 additions and 48 deletions

View File

@@ -62,6 +62,12 @@ class Arch_SectionPlane:
FreeCADGui.doCommand("section = Arch.makeSectionPlane("+ss+")")
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()
if len(sel) == 1 and getattr(sel[0], "IfcClass", None) == "IfcProject":
# remove the IFC project, otherwise we can't aggregate (circular loop)
FreeCADGui.doCommand("section.Objects = []")
#FreeCADGui.addModule("nativeifc.ifc_tools")
#p = "FreeCAD.ActiveDocument."+sel[0].Name
#FreeCADGui.doCommand("nativeifc.ifc_tools.aggregate(section,"+p+")")

View File

@@ -93,6 +93,11 @@ class BIM_TDView:
page.addView(view)
if page.Scale:
view.Scale = page.Scale
if "ShapeMode" in draft.PropertiesList:
draft.ShapeMode = "Shape"
for child in draft.OutListRecursive:
if "ShapeMode" in child.PropertiesList:
child.ShapeMode = "Shape"
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()