Closed andir closed 7 months ago
Doh! You are right. It might have worked by accident in my case. That shouldn't be mixed up. I inteded for it to be the same as is done further down in the code. Otherwise this is again a wrong "precondition check" :-)
In one of my recent FreeCAD adventures I tried to create a curved segment between a sketch, a downscaled version of the sketch and a simple hullcurve. The CurvedShapeWB would always fail with an IndexError from within the
makeRibsSameShape
function. This was caused by a mismatch in poles between the two shapes. Something that should have been caught by the code in CurvedSegmentWorker::makeRibs.It turned out that the actual code for the (non-interpolated) ribs passed the
FirstParameter
andLastParameter
to thetoBSpline
function which the check in the Worker class didn't. Passing those parameters to the checking code ensured that my curve ended up in the interpolation code path and thus stopped throwing exceptions and produced the correct objects in FreeCAD.