Merge pull request #4449 from paullee0/ArchSectionPlane_BugFixes_01

[ArchSectionPlane]  Fix Swing for Windows(Doors) Link in ArchView/TD
This commit is contained in:
Yorik van Havre
2021-02-15 13:25:36 +01:00
committed by GitHub

View File

@@ -379,7 +379,7 @@ def getSVG(source,
drafts.append(o)
elif not o.isDerivedFrom("App::DocumentObjectGroup"):
nonspaces.append(o)
if Draft.getType(o) == "Window":
if Draft.getType(o.getLinkedObject()) == "Window": # To support Link of Windows(Doors)
windows.append(o)
objs = nonspaces
@@ -580,11 +580,12 @@ def getSVG(source,
if windows:
sh = []
for w in windows:
if not hasattr(w.Proxy,"sshapes"):
w.Proxy.execute(w)
if hasattr(w.Proxy,"sshapes"):
if w.Proxy.sshapes and (w.Name in cutwindows):
c = Part.makeCompound(w.Proxy.sshapes)
wlo = w.getLinkedObject() # To support Link of Windows(Doors)
if not hasattr(wlo.Proxy,"sshapes"):
wlo.Proxy.execute(wlo)
if hasattr(wlo.Proxy,"sshapes"):
if wlo.Proxy.sshapes and (w.Name in cutwindows):
c = Part.makeCompound(wlo.Proxy.sshapes)
c.Placement = w.Placement
sh.append(c)
# buggy for now...