Comment 14 for bug 1118663

Revision history for this message
Alvin Penner (apenner) wrote :

yes, I think it would be best to submit this as a separate bug report. It is not clear to me what the difference is between the method currently used in cspsubdiv and the method that you are proposing. The intent of this routine, I think, is to decide how long each line segment should be. When doing this, the only thing that is relevant is the curvature. If I were designing something like this, I would not use the lengths of the Bezier control arms, nor would I impose a limit on the individual line lengths. What is needed is an estimate of the maximum perpendicular distance from the Bezier arc to a straight line joining the two endpoints. If this cannot be done analytically, then it can be done approximately, by calculating the maximum of the two known perpendicular distances between the Bezier control arms and the line joining the endpoints. Also, there is C code in the main body of Inkscape that does essentially the same job, and it might be worthwhile to find out how that code works.