fitCrv - impression

Version 8 (8.8.24149.15002, 2024-05-28)

_fitCrv is not very precise in respecting the tolerance input / option.
in above example / attached file
fitting with 0.1 will result in 0.3 deviation

fitcrv_error.3dm (3.0 MB)

thanks Tom,
RH-82376 fitCrv: inaccurate result

1 Like

this one is even much worth -
the green curve is the input
the violett the result of fitCrv with 0.1 mm, Degree 3

fitcrv_bug_02.3dm (3.0 MB)

Version 8 (8.9.24171.03002, 2024-06-19) Mac os x 13.6.7 (22G720) Intel

locking at the youtrack - you re working on it - would appreciate if you have a look at this case too. thanks.

@Tom_P the fix Mikko made works also well on your second example:

Edit: It looks like that curve would work in an earlier version too. I cannot make it go haywire like you show

thanks for looking at it.
the fix should be in the release candidate i am running ?
Version 8 (8.9.24171.03002, 2024-06-19) Mac os x 13.6.7 (22G720) Intel ??

@Tom_P I tried in that version as well, but don’t see the wobbly curves you are getting. I wonder what I am doing differently

maybe the angle-option is the artistic trick ?

I see. I think your expectation of FitCrv is a bit too high. The tool is designed to fit a curve through more or less evenly spaced points and that’s why it oscillates off track with this input and settings

Maybe it can be improved by analyzing the curve first and then make the tool sample the straight segments more often.

In any case, not sure what your end goal is with this curve. I would simply use. _BoundingBox and _FilletCorners R30 to get a clean result.

it is from a custom slicer software for concrete 3d printing.
the curve is a contour of a mesh.

the end goal is to have nice nc-code to be sent to the machine - and hopefully a single robust workflow for the customer…

adding more points to the polyline and then fit it gives a nicer result.
… let s see I might code something - or over different workflows depending on the geometry.

Basically if you explode the curve, rebuild the long curves to an amount of points that make the segments close to the shorter curves’ length and stitch back together you’ll likely get a better fit