Skip to content

Commit

Permalink
[ArchWindow] getSubVolume() Bug - When the Window is a Clone, HoleWir…
Browse files Browse the repository at this point in the history
…e 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
  • Loading branch information
paullee0 authored and yorikvanhavre committed Jan 22, 2020
1 parent 98dfa25 commit 7a30f0e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Mod/Arch/ArchWindow.py
Expand Up @@ -1349,10 +1349,18 @@ def getSubVolume(self,obj,plac=None):
# 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
Expand Down

0 comments on commit 7a30f0e

Please sign in to comment.