Orient along curve produces multiple unwanted duplicates


I have been trying to create a gh definition that creates a chain with 2 different objects alternating each other. I have reached a point where I need to orient the objects on the curve but when I do so and bake the results I end up with multiple unwanted copies of the object on each of the desired positions on the curve.

Please note that my understanding of gh is very limited so I would appreciate it if you can provide a step by step guide to any solution you might think of


It’s better to attach a copy of your .gh file.

You have probably got the data structure wrong going in to the Orient component.

Also looks like you can do this better with DivCurve or HFrames or PFrames.

Attach your gh file!

Thank you for your quick response. Please find the gh def attached divide a curve into alternating straight sections.gh (11.9 KB)

you need to right click the Crv component and select “Internalise”
Do the same for the Group component so that your referenced geometry is inside the .gh file.

Your problems start when you use the Dash component. This turns one curve into 11 lines and effects the data structure to your Orient.

Can you internalise your data and describe what you are trying to do better?

I’ve added an example of DivideCrv and CurveFrames but I can see you are trying to do something with Offset to perhaps double up your geometry either side of the curve???

divide a curve into alternating straight sections.gh (19.0 KB)

Hello Martyn,

I have 2 different objects (let’s say rectangles A and B) with different lengths. I want to use those 2 objects to create a chain along a path by alternating them so the result will be chain A-B-A-B-A-B-A-B-A-B-A-B-A-B please find attached the updated definition.
Rectangle B starts where rectangle A intersects with the curve and so on.
I am not interested in dividing the curve into same length segments rather than making sure that the distance between the start and end of each curve segment is equal to length A then Length B and so on.

So what my definition was supposed to achieve was to take the initial curve, divide it into straight sections A,B and then take rectangle A and fit it in sections A and rectangle B fit it in sections B

Initially, I used a command called divide distance but I didn’t know how to add more than one length to alternate
divide a curve into alternating straight sections.gh (12.4 KB)

The reason you are getting duplicates is due to the data structure coming from the Dash component. It is a cunning use of Dash though. You could persevere with this but you need to get your head around the grafted list that comes from the Dash component

I’ve done this a slightly different way by creating a list of parameters and evaluating the curve at those parameters…

divide a curve into alternating straight sections v2.gh (22.0 KB)

Hey Martyn,

I apologize for the delayed response. Thanks for sending an updated version. I tried to open it but I get some compatibility errors in grasshopper (I suppose I have an older version) The file opens despite those but unfortunately, the definition doesn’t seem to work properly. Also due to my lack of knowledge, I have absolutely no understanding of the structure you created, so can’t really try any mods.

I have worked a bit more on my definition though, even though I decided to do what I wanted manually (I’ve been obsessed with this, to be honest) It seems that the issue was not due to the dash component but because of the 2line planes that I’ve tried to create for the orientation.

What I did was to define 3pt planes instead. Here is the updated def in case you want to check it out. I think it would be interesting if any transformations could be applied to A and B components such as mirroring or rotation but I don’t know how to select them individually divide a curve into alternating straight sections5.gh (14.1 KB)