Is there a way in Grasshopper to brute-force the best-fitting curve to a leading curve, similar to what’s shown in this video (especially the screenshot)?
I have a set of curves that I want to automatically align and best-fit onto a single guiding/leading curve.
Any tips, components, or example definitions would be much appreciated; thanks!
Galapagos is the first thing that comes to mind. But maybe there are simpler ways. Please share your set of curves and target curve. Otherwise people who might want to help you will need to create this set themselves
test tower building.gh (6.6 KB)
thank you very much
I have read your question a couple of times + looked at video, and keep asking myself what you want to do ??
Please explain more. What curves have to be adjusted to what other curve?
Or are you searching the “center line” of the curve-with-points? (as suggested in the answer of @René_Corella ?)
Or you want a loft (multipe) around that curve (like the one with the loft?)
Or…
Regards, Eef
So i have a leading crv and smaller crvs, i want to brute force the smaller crvs to e fitted to the leading crvs, like attatching small sticks to eachother to follow a line, the sticks willnot be perfectly aligned to the line but resemble it, right?
thanks
test tower building_FF.gh (14.9 KB)
If I understand correctly.. this is my quick idea
align each of your database curves to the main curve (endpoints touching main curve), then make a polar array for each one and measure the deviation.. take the best
this is just an iteration, it will need a more correct setup with data trees and anemone
but I don’t know if I got the problem. also, the division of the database curves at the start is fixed or it is another parameter to be optimized? and you can use every peace of that databese just once or unlimited times?
I made little something with anemone:
test tower building_dfytz.gh (25.6 KB)
I think that is what you’re after. But it deletes used segments, and goes from bottom to the top, so it is not the most optimized option - because the piece that might be perfect use on the top, is already used (not as perfectly) on the bottom. So ideally we want to run this multiple times to check the fit
Oh also i am not testing rotation fit in this algorithm, unlike Fabio above
Hungarian algorithm to address suboptimal results
test tower building_dfytz4.gh (25.0 KB)
This version orients, tests fitness for rotation, flips the curve and tests fitness for rotation again. Then makes hungarian matrix to solve the best fitting across two lists

