09-27-2021, 02:24 PM
(09-27-2021, 07:22 AM)Ofnuts Wrote: OK, good to know. So we just need a script that goes from a long string of anchors to multiple paths with just two anchors
I don't know what you are after but I guess you know it best. I made such plugin: it chops a path at its anchors into small paths. I hope this is what you meant.
To get the plugin, go to
http://kmarkku.arkku.net/Path_modify_fil...aster.html
and click the bottom Download button. Unzip. Put the file chop_path.py in the user's plug-ins folder. Restart Gimp. In the Paths tab, right-click the path you want to chop. Follow the links
Tools > Modify path > ...
and click "Chop the path at its anchors". Press OK. See the result.
Optionally you can, instead of getting a long list of 2-anchor paths as the result, tell the plugin to merge them down into one path with 2-anchor strokes.
I must say that I am always very much amazed when I manage in something so easily. The secret here is the data structures that I developed for my Parametric curves. And all the other pieces of code that I have been amassing. And the experience. If I had to do this using only how Gimp represents paths natively (x,y,x,y,x,y,...) I probably wouldn't even have tried.
If the plugin works wrong or if it is not quite what was needed, just tell me. If instead of a plugin you need a function to be embedded in another plugin, please use the code freely.