[Grasshopper] How to Use Line to Set and Create a Line from Two Points

[Grasshopper] How to Use Line to Set and Create a Line from Two Points Grasshopper component EN

This article explains how to use Line to set and create a line defined by two points.

Line1
Line2

On the Grasshopper, it is represented by either of the two above.


↑Youtube Channel

Set the line segment formed by two points

Using Line, you can set a straight line that can be created from two points.

Set the line segment formed by two points

Components used: ①Construct Point ②Line ③Line

Please note that in addition to this Line, there is also a Line component with the same name.

The other Line component creates a straight line from two points.

With that in mind, let’s look at an example of setting a line segment defined by two points.

This time, we create two points and set the line formed by these two points in the Line variable.

First, prepare two Construct Point.

If no numerical values are entered, the point will be created at the origin position 0,0,0.

This time, by entering 100 into the Construct Point(X and Y) of one of the two Construct Points, we created a point at the position 100,100,0.

Then, connect the two Construct Point to the other line(A and B).

Then, a straight line connecting the two points was created.

Finally, connect the other line to this line.

a straight line was set

Then, a straight line was set in the Line like this.

In this way, you can set a line in Line.

Continuous straight lines or curves cannot be set

Continuous straight lines or curves cannot be set
Click to Zoom.

Components used: ① Construct Point ② PolyLine ③ Interpolate ④ Line

Line cannot set continuous straight lines or curves.

For example, let’s create three points and connect them with continuous straight lines and curves.

First, prepare three Construct Point.

We entered 100 for the second Construct Point(X and Y) values, and 200 for the third Construct Point(X).

Then, points will be created at the positions 0,0,0, 100,100,0, and 200,0,0.

Next, connect the three Construct Points to the PolyLine(V) and Interpolate(V) respectively.

Then, the consecutive straight line and curve were created.

Then, the consecutive straight line and curve were created.

Then, connect PolyLine and Interpolate to Line respectively.

Then, an error will appear on Line.

This is because Line only set straight lines formed by two points.

By utilizing this property, you can distinguish between a straight line that can be drawn through two points and a continuous straight line or curve.

Set and create straight lines directly

You can also directly set or create straight lines in Line.

Set one Line

For a single line, right-click Line and select “Set one Line”.

Then, the screen will switch to Rhinoceros.

Then, the screen will switch to Rhinoceros.

two points

Then, specify two points on Rhino.

a line was created

Then, a line was created and set in Line.

the situation on Rhino

This is the situation on Rhino.

Set Multiple Lines

To set multiple lines, right-click the Line and select “Set Multiple Lines”.

create multiple straight lines on Rhino

Then, as before, create multiple straight lines on Rhino.

multiple lines were created

Then, multiple lines were created and set in Line.

situation on Rhino

This is the situation on Rhino.

Manage Line Collection

To manage and edit set lines, right-click on Line and select “Manage Line Collection”.

Line settings screen

Then, this Line settings screen will appear.

he green icon

Click the green icon in the upper left to add a straight line.

create a line on Rhino

After clicking, create a line on Rhino.

a straight line was added

Then, a straight line was added like this.

red icon

With the line data selected, click the red icon in the upper left corner to delete the line.

deleted

In this way, the line has been deleted.

hierarchy

Click the icon in the top-left corner to create a hierarchy.

the hierarchy has been created

In this way, the hierarchy has been created.

edit the start and end point coordinates

With a line selected, you can edit the start and end point coordinates by changing the XYZ values for End and Start in the right pane.

List of Grasshopper articles using Line component↓

Comment

Translate »