From c55848a5e7fa304e57403af260782e6885ad0fda Mon Sep 17 00:00:00 2001 From: yorikvanhavre Date: Sat, 10 Dec 2011 23:13:07 +0000 Subject: [PATCH] + allow holes & additions in Arch Structure git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5265 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d --- src/Mod/Arch/Structure.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Mod/Arch/Structure.py b/src/Mod/Arch/Structure.py index 5b503982a..c0c326990 100644 --- a/src/Mod/Arch/Structure.py +++ b/src/Mod/Arch/Structure.py @@ -140,6 +140,21 @@ class _Structure(Component.Component): base = Part.makePolygon([v1,v2,v3,v4,v1]) base = Part.Face(base) base = base.extrude(normal) + for app in obj.Additions: + base = base.oldFuse(app.Shape) + app.ViewObject.hide() # to be removed + for hole in obj.Subtractions: + cut = False + if hasattr(hole,"Proxy"): + if hasattr(hole.Proxy,"Subvolume"): + if hole.Proxy.Subvolume: + print "cutting subvolume",hole.Proxy.Subvolume + base = base.cut(hole.Proxy.Subvolume) + cut = True + if not cut: + if hasattr(obj,"Shape"): + base = base.cut(hole.Shape) + hole.ViewObject.hide() # to be removed if base: obj.Shape = base if not fcgeo.isNull(pl): obj.Placement = pl