From f521d8ca6b7229c3ee61a0f98c27eb39104741f8 Mon Sep 17 00:00:00 2001 From: paul lee Date: Sun, 14 Feb 2021 03:13:36 +0800 Subject: [PATCH] [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 --- src/Mod/Arch/ArchSectionPlane.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Mod/Arch/ArchSectionPlane.py b/src/Mod/Arch/ArchSectionPlane.py index 9aa8818b2e..b38354a6eb 100644 --- a/src/Mod/Arch/ArchSectionPlane.py +++ b/src/Mod/Arch/ArchSectionPlane.py @@ -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...