Hi Sandro,
I'll try my best to answer each of your questions:
On Tue, 2020-09-29 at 02:15 +0100, Sandro Duarte wrote:
How to convert the path to some sort of superpath but without converting it curves?
CubicSuperPaths are formatted as bezier lists. There aren't any strait lines, or even close path instructions. When they are converted back to paths these elements are inferred.
But as you can imagine inferring an arc would be really hard.
Does a command to do this exist or should I write a function to do it?
No function exists. Only write one if you really need to, and consider adding it to the super path or utilities functions so it's widely available. But...
And if I should write one, what's the format of a superpath so it could match with my function?
The format is bezier, so there's no format to fit an arc into it (that I know of).
What was the issues of having the transform matrix before converting it to a superpath?
There shouldn't be a problem with transforming paths, if there is and you are seeing some problematic results please report them. It's important to fix issues of transformation and path maths because they are key to so many complex extensions.
It is possible to do it the way i intend?
I don't think it is. It sounds very much like you need to take a step back from SuperPaths and use the regular segmented paths directly. This means looping through the path to get subpaths and then looping through those to get lists of Line, Curve, Arc objects.
It should be possible to get any information from the segments you would have gotten from the superpath. The logic for the conversion is in inkex/paths.py:1395 and it sounds like you may just need the previous coordinates, and be sure to convert to absolute coordinates to eliminate a source of uncertainty.
Come to chat.inkscape.org we have an extensions channel.
Best Regards, Martin Owens Herpetarium Janitor