I have to deal with leaded windows in old houses like this quite a bit:
So I've written a script to generate sketches which are then fed into ArchWindow.makeWindow.
It all works fine until I try to add a hinge to to the top right casement (I know there isn't one in the photo above but added one for testing). The bottom left casement hinge works fine. The casements are added in the order bottom left, bottom right, top left, top right so the top right casement has the wires and edges with the highest ID numbers.
Code: Select all
Traceback (most recent call last):
File "/Users/rwoodhouse/Desktop/FreeCAD.app/Contents/Resources/Mod/Arch/ArchWindow.py", line 1223, in execute
shapes = self.buildShapes(obj)
File "/Users/rwoodhouse/Desktop/FreeCAD.app/Contents/Resources/Mod/Arch/ArchWindow.py", line 1050, in buildShapes
e = obj.Base.Shape.Edges[hinge]
<class 'IndexError'>: list index out of range
Code: Select all
>>> len(App.ActiveDocument.getObject("Sketch001").Shape.Edges)
168
Any thoughts?
Thanks.
OS: macOS 10.13
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16110 (Git)
Build type: Release
Branch: (HEAD detached at 0.18.1)
Hash: f7dccfaa909e5b9da26bf50c4a22ccca9bb10c40
Python version: 3.6.7
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)