Hi,
V5
having made a section through a mesh I wish to show a more average curve before the item rusted and pitted. repeat on a few more sections and average curve them.
I have turned it into points using ‘divide’.
If I run a right click on the curve tool and run CurveThroughPt I get a result following precisely the points, when I want a less wriggly result.
What can I do ?
I have a tool for average of curves for the second stage.
Hi Steve - I don’t see how you’re going to do better than to draw your own clean curve using the points as reference - only you know what details are important.
Hi Pascal,
there is a circle through points that does a best fit, and a line through points doing a best fit,.
If I draw a curve I might end up selecting a high point and another one when a best fit would consider all and best fit through them. It might recognise an arc fits when I might by clicking on points end up with no radii as such.
I would prefer a best fit curve tool in an automatic way rather than have to try and visualise what would result with such.
CurveThroughPt Degree=1 and select the points. This creates a polyline with the vertices at the input points.
Alternative 1 FitCrv with the polyline as the input. *FitCrv uses the vertices of a polyline as input. Experimentation with the fit tolerance and angle tolerance may be needed.
Alternative 2 RebuildCrvNonuniform with the polyline as the input.
*Experimentation with the fit tolerance and MaxPointCount may be needed.
Delete the polyline.
@pascal There should be a command similar to FitCrv and RebuildCrvNonUniform which uses points directly instead of having to create the intermediate polyline. Also FitCrv the user should have a MaxPointCount option.
I need to smooth out the ripples in the black lines (sections through the mesh), then get an average curve fitting the five.
I tried the three suggestions,
RebuildCrvNonuniform works a little on this, (pink) then what do I use to get average of the 5 pink results.
Not sure what you’re asking for here - a better smoothing tool or a tool for averaging the five curves into one?
Just in case it’s the second one, here is a simple Grasshopper definition and a similar script for averaging a set of curves. Note that the curves must all be either open or closed and all must have their directions aligned before applying. Works by sampling (dividing) all the curves at a user-specified sample number, then averaging the corresponding points on each curve - then running a degree 3 interpolate curve through the resulting average points.