unwanted circular loops in Spiro Spline LPE [Patch #2]
Bug #415079 reported by
Alvin Penner
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The spiro spline LPE occasionally becomes unstable, in which case it may show multiple, nearly perfectly circular, loops in one segment. These are sometimes characterized by a segment in which both ends of the segment are rotated nearly exactly 180 degrees from where they were expected to be. Sample attached.
To post a comment you must log in.
Attached is a proposed patch which attempts to deal with this. It consists of a clamp on the angular error at each vertex, forcing it to be in the range (-pi, pi). This type of clamp is normally applied to all calculated values of all angles. However, since the angular error at a vertex is the sum of a number of different contributions, it appears to be sometimes necessary to re-apply the same clamp, just to be sure.
The patch has been tested offline in a stand-alone calculation, to confirm that it works; but it has not been tested inside Inkscape. Also, there is still some possible residual bad behaviour, but I believe that is a separate issue.