[ArchSectionPlane] Fix Swing Symbol for Windows(Doors) Link in ArchView/TechDraw

Forum Discussion  :  [ Link in Arch/BIM -- 4 ] Link of Door : Swing Not Shown in ArchView/TechDraw
- https://forum.freecadweb.org/viewtopic.php?f=23&t=55526
This commit is contained in:
paul lee
2021-02-14 03:13:36 +08:00
parent c8f9197bf0
commit f521d8ca6b

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...