
On 15/04/13 23:28, Alexander Brock wrote:
I think I found a serious problem with the current code. _deleteStretch in src/ui/tool/path-manipulator.cpp puts 10 points from each bezier segment of the original curve into bezier_data but it seems to do a very poor job. I patched path-manipulator.cpp to write the points into "/tmp/inkscape-logfile" and plotted it using gnuplot, the points taken from the second segment don't lie on the original curve at all.
I think I figured this out. I made a simple curve with two segments, looked at the control points of the segments and found that the order was wrong:
Line 635 in path-manipulator.cpp:
Geom::CubicBezier bc(*cur, *cur->front(), *cur.next(), *cur.next()->back());
The third and the fourth argument should be switched:
Geom::CubicBezier bc(*cur, *cur->front(), *cur.next()->back(), *cur.next());
Alexander