mathandy / svgpathtools

A collection of tools for manipulating and analyzing SVG Path objects and Bezier curves.
MIT License
557 stars 142 forks source link

Point Fitting #146

Open aconz2 opened 3 years ago

aconz2 commented 3 years ago

First off, thanks for a great library. I've been using it extensively in various projects and is awesome!

There are two things I'd like to suggest adding that I already have code for, just want to see if you want it integrated.

The first is Catmull-Rom spline fitting and the other is the fitting used in Inkscape's "auto-smooth" node. I have gists that implement each (the Catmull-Rom doesn't directly produce a svgpathtools.Path but I think I have that in some other code and its not hard.

So would you accept a PR with that added? Where do you think that should be added? Happy to send a PR if you give me direction or if its easier to just DIY that's great too.

I think the most straightforward API of List[complex] -> svg.Path is suitable for each.