Skip to content

Commit

Permalink
Fixes for the ArchWindow App Part workflow using a Part with a Cube S…
Browse files Browse the repository at this point in the history
…olid as the Subvolume
  • Loading branch information
sebjf committed Oct 17, 2021
1 parent 0926a41 commit d65c7ca
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Mod/Arch/ArchWindow.py
Expand Up @@ -111,7 +111,10 @@ def makeWindow(baseobj=None,width=None,height=None,parts=None,name=None):
obj.setExpression(prop, baseobj.Name+"."+p)

if obj.Base and FreeCAD.GuiUp:
obj.Base.ViewObject.DisplayMode = "Wireframe"
try:
obj.Base.ViewObject.DisplayMode = "Wireframe"
except ValueError:
pass #Not all objects support the wireframe mode
obj.Base.ViewObject.hide()
from DraftGui import todo
todo.delay(recolorize,[obj.Document.Name,obj.Name])
Expand Down Expand Up @@ -834,7 +837,7 @@ def execute(self,obj):
if shapes:
base = Part.makeCompound(shapes)
elif not obj.WindowParts:
if not obj.Base.Shape.isNull():
if hasattr(obj.Base,"Shape") and not obj.Base.Shape.isNull():
base = obj.Base.Shape.copy()
# obj placement is already added by applyShape() below
#if not DraftGeomUtils.isNull(pl):
Expand Down Expand Up @@ -877,7 +880,8 @@ def getSubVolume(self,obj,plac=None):
if not obj.Subvolume.Shape.isNull():
sh = obj.Subvolume.Shape.copy()
pl = FreeCAD.Placement(sh.Placement)
pl = pl.multiply(obj.Placement)
pl = obj.Base.Placement.multiply(pl)
pl = obj.Placement.multiply(pl)
if plac:
pl = pl.multiply(plac)
sh.Placement = pl
Expand Down

0 comments on commit d65c7ca

Please sign in to comment.