Hi,
Sorry if this has been answered elsewhere but I couldn’t seem to find a solution to a seemingly simple problem.
I am trying to divide a curve with specific start and end points into a a series of lines with a fixed length. The exact input curve is not important but rather an “optimized” curve with specific length segments. I am able to create the fixed length segments but the result can’t maintain consistent “smooth” angles at the ends. Is there a solution to make the angles between each segment consistent? Again, it’s fine if the the overall curve changes.
Thanks!
Try the Rod component in the Goals - Angle tab
Thanks! Rod seems to help quite a bit. But for some reason it changes the length of the segments slightly. Maybe I’m doing something wrong?
Difficult to say without being able to see all the values. A file would help…
You can try to increase the strength on the Length (Line) component.
Thanks again for the quick response Martin. The Length (Line) Strength also helped, maybe negligible but it’s still not super optimized. Meaning the last segment is somehow still kinking differently…
All the values are set to defaults, file is linked here:
Optimize Curve for Panels.gh (15.7 KB)
you need to internalize the curve
Ah, my bad. Should be in here now.
Optimize Curve for Panels.gh (16.9 KB)
Thanks!
The ‘Rod’ goal also affects the segment lengths - trying to keep them close to their starting lengths or a factor of this.
Instead you can use the Angle goal directly like this:
Optimize Curve for Panels_.gh (18.1 KB)
1 Like
It looks quite ok if you use the segments of the polyline for the Line goal instead of the shattered base curve…
1 Like
Thanks. In this case because the Polyline is a division of the original curve so the last segment which is less than 60 is getting ignored, which is changing the end point of the original curve which should be fixed. I was trying to keep the end points fixed and then use the script to make a new curve with the same end points (length of overall curve and angles can change) that is now perfectly divisible by 60.
If you want to fix the ends to the ends of your original curve, use Anchors, like this:
SegmentLengths_.gh (12.8 KB)
1 Like
This is perfect Daniel, thanks so much!