[Grasshopper] Smooth pipe made from grid lines and partial deletion [Data download available]

[Grasshopper]格子線を滑らかなパイプでつなぐ+部分削除[データも配布] grasshopper EN

In this article, we will explain how to connect the grid lines with smooth pipes using Grasshopper, and how to delete the area around the specified point’s attractor.


↑Youtube Channel

Video

Model Images

Model Image1
Model Image2
Model Image3

The top three images show the attractor in different positions.

Model Image4
Model Image5
Model Image6

The top three images are from Grasshopper.

Model Image7
Model Image8
Model Image9
Model Image10

The top four images show the model exported on Rhinoceros.

rendering

The image above shows the final rendering.

Click here to download the Grasshopper file

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

Grasshopper recipe

①Rectangle ②Surface ③Unit Z ④Extrude ⑤Deconstruct Brep ⑥Brep Wireframe ⑦Multiple Curves ⑧Explode Tree ⑨Closest point ⑩Line ⑪Merge ⑫Shatter ⑬Curve Middle ⑭Point ⑮Closest Points ⑯Cull Index ⑰MultiPipe

Grasshopper recipe1
Click to zoom
Grasshopper recipe2
Click to zoom

Grid lines

First, we create grid lines.

square

In a Rectangle (X and Y), enter the values for the lengths of the sides.

This time, connect 2000 to both.

Then a square line is created, as shown in the image above.

Surface

Then connect the Rectangle (R) to a Surface.

Then a surface is created from the lines, as in the image above.

Cube

Then connect 20000 from earlier to an Unit Z.

In addition, connect the Unit Z to an Extrude(D).

In addition, connect the Surface to the Extrude(B).

Then a cube is created, as shown in the image above.

Explode

Then connect the Extrude to a Deconstruct Brep.

Then the cube is decomposed and you get 6 faces.

Lines

Then connect the Deconstruct Brep(F) to a Brep Wireframe(B).

In addition, connect the number of divisions to the Brep Wireframe(D).

Then straight lines are created to divide each face into 10 x 10 pieces, as shown in the image above.

Intersection

Then connect the Brep Wireframe to a Multiple Curves.

Then you can get the intersection points of the lines, as in the image above.

Match outputs

Then connect the Multiple Curves(P) to an Explode Tree.

At this point, right click on the Multiple Curves and select Match outputs.

Then 6 terminals are created on the right side, which is the number of faces.

Lines

Then place three Closest Point and Line.

And connect them as shown in the image above.

create Lines

This will create lines connecting points in opposite directions, as shown in the image above.

Flatten

Then connect the three Line to a Merge.

Now you can combine the line data into one.

At this point, right click on the Merge(R) and set Flatten.

Inttersection

Then connect the Merge to a Multiple Curves.

Then you can get information on where the lines intersect.

Divide

Then connect the Multiple Curves(tA) to a Shatter(t).

In addition, connect the Merge to a Shatter(C).

Then the lines will be split at the point where they intersect, as shown in the image above.

At this point, right click on the Shatter(S) and set Flatten.

Grid lines

This completes the creation of the grid lines.

Middle points

Then connect the Shatter to a Curve Middle.

Then the midpoint of each line is retrieved.

Point

Then create any attractor point.

This time, the point is stored in Point.

Surrounding points

Connect the Point to a Closest Points (P).

In addition, connect the Curve Middle to the Closest Points (C).

In addition, connect the number of points to be retrieved to the Closest Points(N).

This time, we are connecting 500.

Then we can get information about the points around the attractor point, as shown in the image above.

Delete

Then connect the Closest Points(i) to a Cull Index(I).

In addition, connect the Shatter to a Cull Index(L).

Then the lines corresponding to the acquired midpoints are removed, as shown in the image above.

Pipe

Then connect the Cull Index to a MultiPipe (Curves).

Furthermore, connect the numerical value of the size of the joins to MultiPipe(NodeSize).

Furthermore, connect the numerical value of the magnification factor for the middle size of the join to MultiPipe(StrutSize).

In addition, connect 1 to MultiPipe(Caps).

This will create a smooth pipe with rounded corners, as shown in the image above.

Complete

This completes the process.

That’s all.

Comment

Translate »