If one performs a toSketch command/icon on a section through say a Mesh one ends up with a sketch made up of lines.
Curves are made up of a number of short lines and straight lines can be a mixture of short and long lines see
The to_Curve fit command/icon processes the selected sketch and performs
- Merges lines that have a very similar slope
- Tries to perform a BSpline fit using the geomdl python library.
My latest attempt is to start with 4 control points and calculate the hausdroff distance between the points being fitted and the evaluation points of the BSplne. I then increase the number of control points until the hausdroff distance no longer decreases.
This produces a better fit but still no cigar
One can get a good fit by having the same number of control points as point to be fitted but in the example above that would be 87 control points which is not really a solution in my opinion.
So I am open to suggestions, for example any idea how i could break the curve in the example into 3 or 4 sets for evaulation.
Current test file