On 18-Oct-2013 15:32, Markus Engel wrote:
The default tolerance didn't change but the code in sp-ellipse.cpp did. A few revisions ago the ellipses were created by explicitly calculating four Bezier (!) curves so there was no need for any conversion. Now I changed this to creating elliptical arcs and let 2geom do the calculation. Have a look at this bug report: https://bugs.launchpad.net/inkscape/+bug/1235504 . Try the patch I attached there (e_to_b.patch).
I see it, but don't understand why:
Geom::cubicbezierpath_from_sbasis
generates so many beziers for an elliptical arc with a fit parameter of 0.1.
Ellipses are approximated very well by 4 beziers. Presumably the EllipticalArcs you use now are perfect segments of an Ellipse. (Otherwise, why bother with them? How many are you using, 4?) I would have assumed that an Elliptical arc perfectly representing 1/4 of an ellipse should have converted as well to a single Bezier curve as 1/4 of the ellipse did. Or was the conversion from some other function and not cubicbezierpath_from_sbasis()? The patch changes the fit parameter from 0.1 to 1.0, which seems like an awfully big change to make it do what you want. Is it maybe the case that somehow the cubicbezierpath_from_sbasis() algorithm starts with the assumption that it must use at least two bezier segments, that is, that it must split the curve into >=2 Beziers, and only omits the second one with an extreme parameter change?
Regards,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech