# Evenly Space A Curve Along A Line?

I am trying to duplicate and evenly space the small “tab” curve along the edge of the pentagon. I would like to have three evenly space tabs along one edge of the shape, equidistant from both the vertices and each other. I have tried to orient the object along the curve then arraycrv but the “tab” object is not evenly spaced in the way I described above.

Can someone help me figure it out? A picture is below and I can attach more for clarification if needed.

Thank You!

Hi Adam- see the attached file- I used the ‘Distribute’ script here:
http://wiki.mcneel.com/people/pascalgolay

To evenly space three items, place five - the two end ones are there only to set the limits and can be deleted. The ones between need only lie on the line, the script will space them evenly- use Direction > User and set the direction snapping along the side of the shape and then set spacing style to ‘Gaps’
Tabs.3dm (40.3 KB)
-Pascal

1 Like

here’s the g_fabulous method if you don’t want to do maths and don’t have a distribute plugin available

(hopefully not as confusing as this drawing makes it out to be)

1 Like

You could use the Move command to position the tab along the curve. Then mirror it about a perpendicular curve (in blue) snapped to the mid point. You would then copy one of the tabs and with smart track on move snap it to the perpendicular curve.

hmm. i’m not quite following you.
is that ending up with 4 equal spaces?

Oops, missed that requirement.

come up with something else… i always like seeing the various quirky methods people can arrive at in these scenarios

(i mean, pascal’s script is the best one so the rest of the thread can be fun, right? )

 it sort of seems like ArrayLinear should have an option to do this except when you drag the objects to set the distance, you drag the last one in the array while the rest of them fall in between instead of dragging the 2nd one in the array to set individual spacing… does that make sense to anybody else? lol)

1 Like

Basic math stuff then draw line along the curve to spacing distance (4.5). Then mirror along a perp curve snapped to the mid point. Then copy and move as before. Jeff I like your latest method best super fast and simple, congrats.

Thank you everyone for the help, I will try the suggested methods out and ask again if I have any more questions.

Thanks!

Hi Pascal.
I’m trying to fit a few squares along a curve, but ArrayCrv doesn’t work because it doesn’t distribute the all the elements exactly inside the limits of the curve. I have tried ‘Distribute’ script, but it works only for straight lines.
What do I do?

duplicate (or Copy → In Place… etc) your curve then Extend it the length of one of your squares… ArrayCrv on that curve then delete it afterwards.

i haven’t tried it but it should do the trick…

Hi Joddys- try this: ArrayLinear the number of squares you want, Start Flow, set Rigid=Yes, Stretch=Yes. Choose the Line option as the base curve and snap to the to end corners along the base line of the array of squares. Then as the target curve, choose the curvey curve…

-Pascal
Flow.3dm (29.8 KB)

1 Like

Thanks Pascal. That’s what I was looking for. Is there a way to make this process as a single command?

The distribute method worked great for me, I aligned the object to the line
then followed the rest of the steps.

Hi Joddy- here is a quick and dirty RhinoScript-

To use the script, extract and save the .rvb file from the attached zip archive, then drag and drop the saved rvb over an open Rhino V4 or v5 window. This will load the script, set it up to load on startup in the future and register the alias

ArrayInCurveSpan
(sorry, that’s all I could manage on the spot)

that will run the script much like a regular command. An alias can be typed or added to a toolbar button or keyboard shortcut (F-key).

ArrayInCurveSpan.zip (1.0 KB)

-Pascal

hey pascal.
that made me try something similar on a straight target line and i’m not getting the results i would expect… i haven’t thought about it much so there may be something obvious i’m missing? or- how would you expect this to turn out?
(see notes in the file)

flowQ.3dm (81.4 KB)

thnks

[EDIT] hmm… yeah… i think i see why it’s doing that and it is probably working right… too tired to get a clear thought on it right now but it’s probably something to do with-- even though the boxes are equally spaced along the line, the midpoint to the first box is 1.5 then the spacing in the middle is 2 then 1.5 again at the end… so when the line stretches out with rigid boxes, the ratio doesn’t work out the same.

edit2-- well, the ratio stays the same… it’s just that the spacing doesn’t work out evenly anymore. etcetc… I’ll shut up now

Or take a look at http://jarek-rhinoscripts.blogspot.se/2008/12/arraycrvplus-v20.html
Really amazing tool Jarek makes!