From 7a30f0e8ba094f6e2b4aa43e58206afa431baec1 Mon Sep 17 00:00:00 2001 From: paullee0 Date: Sun, 19 Jan 2020 03:57:22 +0800 Subject: [PATCH] [ArchWindow] getSubVolume() Bug - When the Window is a Clone, HoleWire in original is ignored getSubVolume() - - When Windown is a Clone, HoleWire in Clone is tested - However, if HoleWire is not set, no further check if HoleWire in Original is set - The original code direclty check the Base's Wires BoundBox as HoleWire --- src/Mod/Arch/ArchWindow.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Mod/Arch/ArchWindow.py b/src/Mod/Arch/ArchWindow.py index 8433b41f06..7fc7ab2d14 100644 --- a/src/Mod/Arch/ArchWindow.py +++ b/src/Mod/Arch/ArchWindow.py @@ -1349,10 +1349,18 @@ class _Window(ArchComponent.Component): # finding which wire to use to drill the hole f = None - if hasattr(obj,"HoleWire"): + if hasattr(obj,"HoleWire"): # the code have not checked whether this is a clone and use the original's HoleWire; if HoleWire is set in this object, even it is a clone, the original's BoundBox/HoleWire is overridden if obj.HoleWire > 0: if obj.HoleWire <= len(base.Shape.Wires): f = base.Shape.Wires[obj.HoleWire-1] + + if not f: + if Draft.isClone(obj,"Window"): + # check original HoleWire then + if orig.HoleWire > 0: + if orig.HoleWire <= len(base.Shape.Wires): + f = base.Shape.Wires[obj.HoleWire-1] + if not f: # finding biggest wire in the base shape max_length = 0