Oops.
-------- Original Message -------- Subject: Re: [Inkscape-devel] Help with cubicsuperpath.parsePath and format formatPath in an extension Date: Thu, 17 Dec 2009 14:04:34 -0600 From: Aaron Spike <aaron@...749...> To: Rob Antonishen <rob.antonishen@...400...> References: <3644709b0912170707n29d9e56p7792f768996a5a9@...401...> <3644709b0912170834h47bf4ef4s1530569d71f3a227@...401...>
Rob Antonishen wrote:
OK - it isn't just me.
I tested the fractalize extension, the add nodes extension, and the jitter nodes extension.
In all cases, when starting with a closed path the result is an open path with two additional nodes.
So these are all broken. For example, jitter nodes on a 4 node closed shape (use a large jitter) will create a shape with 6 nodes, with the last 2 open (attached)
You are correct. cubicsuperpath.py does not maintain the open/closed property of paths. I wouldn't say that it is broken because it has always been this way. It makes other changes to the path data too; it converts all segments to one or more cubic bezier segments. Its just not as good for round tripping path data as simplepath.
This is on windows in inkscape .47 release.
This is not platform or version specific.
So what can you do? Well, I haven't thought through this yet. But maybe you could make csp's inner lists a special list subclass that has a property for the closedness. Or maybe you could add an optional parameter to formatPath (or a new function, if that is better API) that closes the path if the first and last points are coincident.
Aaron Spike