On 15/04/13 10:16, Jasper van de Gronde wrote:
If I understand correctly you roughly do the following:
- Find points on original curve(s).
- Estimate new curve.
- Find correspondence between points on the original curve and the new
curve. 4) Move new curve closer to original curve. 5) Repeat 3 and 4 until convergence.
Exactly.
- make -j3 takes > 2m to finish even when I only change one line in
bezier-utils.cpp on a Core2Duo, 2,4GHz, is that normal? make install then takes >1m. I use ccache, g++ and turned optimization off.
More or less, linking often takes most time for these small compiles.
I'd like to compile only the parts which are necessary for testing the algorithm. I will try to export sets of parameters given to the optimization function and have a smaller executable without the gui stuff for faster development.
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.
Can somebody verify that the error is not in my code?
Alexander