Exploding multiple curves in order

I’m working on a simple script to take a pair of inputted curves (from Rhino) and create a series of extrusions between the two curves.

It works when the input is two curves, but I’d like it to run when the input is a list of many pairs of curves. I believe I’m not handling the tree data correctly in the line component that creates the line between the two curves. All the other components seem to handle the tree data correctly.

problem is here (I think:)

This is what the output should be when selecting the two pairs of curves (achieved here by running the script twice, though).

any help is appreciated! I know that I’m just misunderstanding how to handle the data types, I just don’t know enough to understand how.

image

multi-extrude.3dm (8.4 MB)
slat generator v1.gh (20.1 KB)

Hi @alec.burney1

Let me know if this works for you.
FILE: 2021.05.29_slatgenerator_v1_sol1.gh (25.5 KB)

~ ~ ~ ~ ~ ~ ~ ~
Kaushik LS
Chennai, IN

@Kaushik
Thank you so much for the response. Thank you, especially for marking up your GH file with notes and explanations!

Your solution is much more elegant and direct than what I was working on. I am playing with your approach, but can’t think of a way to integrate it with the result that I am trying to achieve - the reason i ended up using tweencurves to define the center of the extrusion is in order to allow for a random (within parameters) width and spacing between extrusions.

I imagined the structure of that as using tweencurves to make a rail in the middle, evaluate length to locate a point based on the random adjustments, and curveclosestpoint to match that that random point back up to the two original curves and connect it with a line to make the extrusion.

Not elegant, and I can’t seem to find a way to integrate that with the nice straightforward GH that you posted, whether using evaluatelength or evaluatecurve on the two input curves (instead of on a tweened curve). The basic problem i think here is the length of the two input curves is not equal, so it gets odd trying to draw a line between them. But I’m having trouble thinking of another method.

Any thoughts? thank you so much for your time.

Hi,

If I’m not mistaken, you’re looking for a way to have unequal or randomized spacing between each members. And, since the curves are of different sizes, the angles of the connecting lines will also change. Is that what you’re aiming for? Or, is it the length of the connecting lines that are going to be random?

RandomPoints

yes, that’s correct - the width and spacing between the extrusions changes randomly.

the connecting lines are only what is needed to connect between the input curves.

Here’s an example generated from my initial script (above) - the performance is about right, but it doesn’t work for groups of curves, just one pair at a time. Mostly because I’m not handling the data in a way that makes sense, i think - it’s quite complicated compared to the streamlined solution you have above.

image

I think it’s fairly simple, you just need to edit one part.
Instead of the DivideCurve component, connect a EvalCurve component. The Parameter input of EvalCurve can be a list of random number between 0.00 and 1.00.

Just make sure the number of such points are equal on both EvalCurve components(that replace DivideCurve).

Here you go…
You might have to come up with a way to avoid potential intersection/classes between members though.

FILE: 2021.06.03_slatgenerator_v1_sol2.gh (19.7 KB)