so I have this script where I can move some control points and creating a curve from that.
But I have the problem that the curve has to have a minimum radius from 100mm and I haven’t found any solution. Is there a function like this in Grasshopper?
I put the script and a screenshot here maybe someone has the solution.
thanks a lot!
Hello- you can tag the curvature at the point locations and track them
but this is not necessarily the minimum - there may be a more direct way in GH but I do not see it yet, I think you many need a script someplace to locate the maximum curvature locations.
Thank you, I will try.
You can check the curvature radius at multiple points along your curves, then sort the results to get the minimum values.
Note that I’m sorting here by the length (circumference) of the curvature circles but the result is the same as sorting by radius. The Deconsruct Arc component takes about the same amount of time to run as the Curvature component, so I’m only getting the radius of the smallest circles to speed up the script.
The script takes ~30ms to run with 1,000 samples on the 2 curves from your script. It takes ~300ms to run with 10,000 samples but the increase in precision is minimal. If you want to run this on a large number of curves, you can choose the number of samples for a balance between speed and precision.
I also re-structured your script to use fewer components - if your prefer your original structure, you can use this same technique.
KurveErzeugen_re.gh (24.5 KB)
Thank you a lot!!
I will take some time tomorrow to have look in the details of your script.
I spend some time to check your script. Thank you again.
So for now I can see where the minimal radius is and how large it is but I still couldn’t find a solution to replace this radius with 100mm when it is smaller.
Do you or anybody else have an idea how to solve this?
Thanks a lot.
You can offset the curve 100 mm into one direction and then 100 mm back again with the corner option set to round.
minimum_radius.gh (18.3 KB)
Thank you Martin!
That works but just in one direction - when the curve is opening to the top the radius stays small. I tried to copy your elements and change the “-x” at the “offset” to “+x” but that doesn’t work. I’m sorry to ask for these things but I try to learn the program by myself and don’t know anyone who could help.
Yes, the example provided only does one side. But you can do the same thing again the opposite way.