I guess you need some sort of loop to get to that (and I believe that is what the Flexibility component is doing [I think also the standard gh component Divide Distance is doing the same, just without the option to use multiple distances])
with the 15% knowledge of Python I have, I would script it like this:
Divide curve by length in subcurves of [9 + 6 + 3]= 18
Divide every subcurve in subcurves of [9+6} =15. (the last second part of subcurve gives all the 18 - 15 = 3 parts
Use all the first subcurves (15 long) from step 2 divide them in subcurves of [ 9], giving you the parts with length 9 and length 6
So for every length you need 9, 6 and 3 you need a division in subcurve starting at the correct point.
NB: You could of course first do the 3 divisions giving you all the t-parameters and cut all the subcurves in one move.
NB1. Just after saving the answer another approach rises in my mind.
calculate the greatest common divisor (in this case 3, because 3 can divide 3, 6 and 9)
divide the curve in subcurves with length of 3
use a short list 1, 2, 3 tot join subcurves of 3 to lenghs (1x3) (2x3) and (3x3)
(off course also possible with floating point numbers)
PS; All thought from dividing by length. Dividing by distance will probably give incorrect numbers. (I will think further about doing simular with distances and polylines)
When cutting to a polyline using divide curve, it is inevitable you have some iterative process, where every next step start with the endpoint of the step before.
It also matters if it is a repeated pattern and it also matters with what number you start or the order of the 3 numbers.
Maybe I may do a suggestion to make the challenge more challenging.
Image you have a curve and have to transform it to a polyline with as less line-sections as possible. Line sections may have the length of 3, or 6 or 9.
And the greatest distance between curve and line-section may at any point be not more then x
That would give a great algorithm for building curves with standard pipes/staves
Thank you! I guess Surface | Curve intersection and loop are hard to avoid. I did make it with K2’s Line Length goal but that returns slightly inaccurate length when the curves are overly complex. And of cause, slow.
Which method are you referring to? I mentioned more then one.
BTW: Thinkering about it, does not mean I already have a working example
I will have to search myself to find a way to get there.
After “thinking” another hour or so, I cannot imagine a solution without any kind of loop.
One option I considered was to divide the curve in many points; find all points on the distances 3, 6 and 9. Find the most close points in the 3 list + 6 list; use the result to find most close points in the 9 list. In case it would work, if would need a lot of computer capacity to get a bit accurate result. millions of options would have to be calculated and culled afterwards. Not very usefull.
So I give up, and am interested in other ideas.