[Grasshopper] How to connect multiple circles with tangent lines or curves [Data download available]

[Grasshopper] How to connect multiple circles with tangent lines or curves [Data download available] Grasshopper component EN

This article explains how to connect multiple circles with tangent lines or curves.

3components

Tangent Lines (Ex), Tangent Lines (In), and Tangent Arcs can be used to connect multiple circles with tangent lines or curves.

Tangent Lines (Ex)

This is the case of Tangent Lines (Ex).

Tangent  Lines (In)

This is the case of Tangent Lines (In).

Tangent Arcs

This is the case of Tangent Arcs.

three circles

Depending on how you use it, it can be applied to multiple circles as shown in the image above.

remove excess lines

After explaining the three components, we will also explain how to remove excess lines.

thickness

We will also explain how to add thickness.

We will now explain them one at a time.

Click here to download the data for the Grasshopper used in this article.

Please refer to the Terms of Use regarding the use of the downloadable data.


↑Youtube Channel

Preparation of circles

First, create two circles.

You can create them on Rhinoceros, but this time we will create them on Grasshopper.

Circle

Components used: (1) Circle

Circle is used to create a circle.

Enter the coordinates of the center point of the circle (if not entered, the circle will be created at coordinates 0,0,0) in the Circle(P).

Enter a numerical value for the radius in the Circle(R).

In this case, we set one circle of radius 200 at position 0,0,0 and one circle of radius 300 at position 500,500,0.

two circles

Two such circles were then created.

We will now use these two circles for the explanation.

Tangent Lines (Ex)

Tangent Lines (Ex)

Components used: (1) Circle (2) Tangent Lines (Ex)

Tangent Lines (Ex) creates tangent lines between two circles.

Connect two Circles to the Tangent Lines (Ex)(A and B).

tangent lines

This creates tangent lines.

T1とT2端子から出力されるデータ

The Tangent Lines (Ex)(T1 and T2) outputs their respective line data.

respective line data

As you can see, the respective line data is output from the T1 and T2.

Tangent Lines (In)

Tangent Lines (In)

Components used: (1) Circle (2) Tangent Lines (In)

Tangent Lines (In) creates two tangent lines that intersect.

Connect two Circles to the Tangent Lines (In)(A and B).

intersecting tangent lines

As you can see, intersecting tangent lines are created.

T1とT2

The T1 and T2 output their respective line data.

each line data is output

As you can see, each line data is output.

Tangent Arcs

Tangent Arcs

Components used: (1) Circle (2) Tangent Arcs

Tangent Arcs can be used to create tangent curves by specifying the radius.

Connect two Circles to the Tangent Arcs(A and B).

Enter a numerical value for the radius in the Tangent Arcs(R).

In this case, 400 is entered.

 tangent curves are created

Then, tangent curves are created as shown here.

compared

We created a circle with a radius of 400 and compared them.

As you can see, a portion of the circle with a radius of 400 is used for the tangent curve.

respective curve data.

The Tangent Arcs(A and B) on the right side output the respective curve data.

the respective curve data is output from the A and B

As you can see, the respective curve data is output from the A and B.

When there are three or more circles

When there are three or more circles

Components used: (1) Circle (2) Tangent component (3) Curve

Even if there are three or more circles, you can combine them with each Tangent system component.

The image above shows the case of three circles.

In this case, only the outer curve is extracted by Curve, since the inner curve is not displayed.

3 circles

Then, the same could be done with 3 circles like this.

Erasing and merging excess lines and curves

Erasing and merging excess lines and curves

There are cases where you may want to erase the extra inner curves and merge them.

Therefore, we will also explain how to leave only the outer curves and merge them, as shown in the image above.

Components used
Click to Zoom

Components used: (1) Circle (2) Tangent component (3) Curve (4) Shatter (5) List Item (6) Join Curves

Start with extra curves

Start with extra curves like this.

Curve | Curve

Connect each circle and tangent curve to the Curve | Curve.

Do this for all the areas where the circle and the tangent curve touch.

In this case, we are using four Curve | Curves, since there are four locations.

intersection

Then, the data of the intersection of the circle and the tangent curve is extracted as shown here.

Shatter

Then, connect the Circle to the Shatter(C) and the Curve | Curve(tA) to the Shatter(t).

The tA provides data on the position of the point on the curve, and by using Shatter, the curve can be divided at that position.

the circle is divided into two curves

As you can see, the circle is divided into two curves at the position where the tangent curves touch.

red point

The circle is split at the position of the red point.

List Item

Then, by using List Item, the outer curve is extracted by specifying the index number.

Enter 0 or 1 in the List Item(i) to extract the outer or inner curve.

only the outer curves are extracted

Then, only the outer curves are extracted, as shown here.

Join Curves

Finally, use Join Curves to join the tangent curve and the curve extracted by List Item.

Flatten

At this point, right-click on the Join Curves(C) and set it to Flatten.

If you do not do this, the curves will not be joined.

the extra curves are removed

As a result, the extra curves are removed and joined as shown here.

.

Adding Thickness

Adding Thickness

Components used: (1) Extrude (2) Unit Z (3) Cap Holes

To add thickness, connect to Extrude(B) and connect to Unit Z(D) with the numerical value of the distance to be pushed out.

Then, by covering it with cap holes, you can add thickness.

thickness can now be added

As you can see, the thickness can now be added.

That’s all for this time.

Comment

Translate »