
2013/2/21 mathog <mathog@...1176...>:
Can somebody tell me what is wrong with this code (fragments shown below). It throws some sort of exception which Inkscape catches when it gets down to
(*result).back().append(ls);
This is throwing Geom::ContinuityError, because the initial point of the segment you are appending does not match the final point of the path. If the path is empty and default-constructed, its final point is (0,0). Admittedly this is not good API design - in this case the final point should be undefined until the first append() call. This was probably done to represent degenerate 1-point subpaths which can be constructed in SVG.
This problem can be avoided by a) constructing the path with the initial point of the first segment as a parameter b) using Geom::SVGPathGenerator.
Regards, Krzysztof