The rod goal doesn’t work sometimes if the polyline is closed. In this case, there are identical lines that have opposite directions. In case if the polyline is not close and still there are such lines the solver works normally. But if I extend to the end it crashes.
@DanielPiker, @AndersDeleuran please help.
P.S. I tried also with separate angle and length goals. The same.
Rod.gh (18.2 KB)
If the input polyline is looping back on itself at the base, then this definition is creating a pair of line segments there for which the start particle of one is the same as the end particle of the other, and vice versa, so these 2 segments will always remain coincident and opposite in Kangaroo. Therefore the angle goal cannot possibly ever have any effect on them, as it cannot alter an angle which is defined by a single line.
I agree though that the solver still shouldn’t give an error in this case, and angle goals like this should just be ignored.
In the meantime though, you can cull the offending angle goal like this:
Rod_cull.gh (20.6 KB)
Thank you for the prompt help. I understand, but then shouldn’t it be the case also for the other intermediary segments that have coincident start/end? It worked for other overlaps, except the end segment.
Sorry, I realise the description above isn’t very clear. An angle goal acting on a pair of lines where the start point of one is the end point of the other is fine - this is the normal situation when they form a rod.
What is not okay is a pair of lines LA and LB where the start of LA is the end of LB, but the end of LA is also the start of LB.