# Array/offset circles on both side of curve

Hi,

I’m a novice when it comes to grasshopper. But i have been trying to make a small grasshopper script to help me place some circles along a curve. There needs to be circles on either side of the curve. The circles need to be offset from the original curve, and I need to be able to control that distance. I also need to control the distance between the circles and the radius. I got all of that working with divide by length. Maybe not in the simplest way but it works.
The original curve is contained between to curves that run in the opposite direction and the angle between the boundary curves and the original curve isn’t 90 deg.
My problem is that, depending on the angle between the line the circles sometimes end up outside the boundary.

The circles need to be placed within the two boundary curves and the distance needs to be a variable. But from here I am stuck
CurveDivideByLength.gh (10.9 KB)

Hi Erik,
this definition divides the two offsetted curves into a given number of points
it ignores the start/end point of the offsetted curves, the circles around which would partially fall outside your boundary
you can see the resulting distance between circles centers on the Panel component

do you need the circles to be mirrored along the original line or do you need to precisely control the distance between the circle centers?

CurveDivideByNumber.gh (14.3 KB)

I’m still on Rhino 5. So maybe that’s the reason why it’s behaving weird.

This is what i’m hoping for

I need to be able to control the distance from the center of the circle to the boundary.

Check this as well.

CurveDivideByLength_re.gh (9.2 KB)

2 Likes

Hi Kim,

I changed it a bit. And It works fine If I only take one element. But when I wan’t to do it on a random number of objects it’s doesn’t work. I’m not sure what to do with it. I guess it has something to do with
Curve/Line (CLX)?

Ekstra skiver.3dm (1.6 MB) CurveDivideByLength_re.gh (10.6 KB)

Check the attached gh file.

CurveDivideByLength_reV2.gh (13.8 KB)

Where do I find the “curve middle”? add on?

CurveDivideByLength_reV3.gh (13.9 KB)

1 Like

Perfect