Fit Curve in a set of Points (PointCloud)

Hello
My goal is to adjust a polyline in a selection of points to draw a tube. I tried it with the tool from LunchBox with Machine Learning. But I cannot achieve that the curve runs cleanly within the points.
Does anyone have a good idea how to do that? In the end I want to be able to apply it to 3D points.

Thanks for the help

An example file is attached
Example_LinearRegression.gh (17.3 KB)

Not sure the problem is well defined. Can you provide an example (maybe just draw on a screenshot) with a curve, that represents the desired result? Or something that resembles it?

Example_LinearRegression Edited v0.gh (15.1 KB)
Nautilus, Clipper.
Not sure if this is a good idea.

1 Like

You can try for curve fitting online free by SplineCloud. It allows you to upload your points and fit a smooth curve through them. You can adjust the fitting degree to get a clean result, which can be useful for creating a tube. While it doesn’t directly create a tube, the curve it generates can be used in 3D applications afterward.