Consistent Path Interpolation #69
Labels
Status: Available
No one has claimed responsibility for resolving this issue.
Topic: Interpolation
Topic: Tooling
Type: Enhancement
New feature or request
So recently I had moved the interpolation to each individual path instead of a global setting. And in my investigations of the tooling (which I am currently in the process of turning into an SMO) I realized that for cubic beziers (which are almost certainly in the path data if your path is curved at all) there is a number of points -- not distance like overall interpolation for the path-- for the curves.
While this might not seem problematic at first, consider the fact that a path can have hugely varying curve sizes. So say there is a huge curve and a tiny curve (like photo two), under the current system, both will have the same number of points.
And even though everything will have the same interpolation applied to it later, when defining the shape of the curve, it is better to have as many points as possible. However, it does not need to be greater than the overall path interpolation distance (so say your curve is 15 um long and you have an interpolation of 0.1 um, any value greater than 150 is not going to make a difference on that curve besides messing up how long it is going to take to write it. And in that same vein, the current system can actually allow users to mess up the values.
So here is my proposal: We calculate the length of the bezier curve and find the number of points needed by dividing the total length by the interpolation length. If you look up how to calculate the length of a bezier curve you quickly find out that it does not have a closed form solution. This isn't actually a problem though, as we can choose a large number of points (say 10000) and use that to fairly accurately and quickly find the length of the curve. From the length we can determine the new number of points using the interpolation distance as well.
I have made a quick demonstration of what I am talking about and added it to this post.
Path Interpolation.zip
The text was updated successfully, but these errors were encountered: