CurvedShapesWorkbench icon indicating copy to clipboard operation
CurvedShapesWorkbench copied to clipboard

CurvedSegment: "Twist Reverse" on same-shape part causes part crash

Open AIRCAP opened this issue 4 months ago • 1 comments

11:13:11  Traceback (most recent call last):
  File "~/.local/share/FreeCAD/Mod/CurvedShapes/./CurvedSegment.py", line 105, in execute
    self.makeRibs(fp)
  File "~/.local/share/FreeCAD/Mod/CurvedShapes/./CurvedSegment.py", line 140, in makeRibs
    ribs = makeRibsSameShape(fp, fp.Items, False, makeStartEnd)
  File "~/.local/share/FreeCAD/Mod/CurvedShapes/./CurvedSegment.py", line 278, in makeRibsSameShape
    newpoles.append(vectorMiddlePlane(poles1[p], poles2[p], fraction, plane)-fraction*offset)
<class 'IndexError'>: list index out of range
11:13:11  Recompute failed!

this triggers #46 and the part is permanently broken (will never recompute again even if parameters are changed)

my line numbers don't match master, 278 is

                else:
                    newpoles.append(vectorMiddlePlane(poles1[p], poles2[p], fraction, plane))

the reason is hat reorderpoints() somehow gives not enough points. (2 out of 8 in the example file)

example file: reorderpointsbug.zip

AIRCAP avatar Oct 02 '24 09:10 AIRCAP