Generating and manipulating grid frequently becomes basic step in the case of modeling facade modules through Grasshopper. However, as architectural context varies, grid which is generated based on the general XY plane may not adapt to variable cases. To deal with this situation, it is common to rather take surface from Rhino model and generate grid based on that.
To summarize, the goal of this post is,
"Generating grid on a input planar surface."
To acheive this goal, we'll take three steps.
Step 1. Making grid on a XY plane.
XY plane is default plane that Grassopper usually takes. We'll firstly make rectangular grid on this default plane.
Using componet rectangular grid which takes size X,Y and extent X,Y as input, the result will be like below. Note that current plane is set ot XY plane.
Step 2. Limiting grid extent by surface area.
As our final input will be surface area, the grid we make should automatically limit to the extent of X,Y size of our input surface. To do this, value of extent X,Y will take divided number of length X,Y by size of X,Y grid.
Resulted rhino viewport image will like below.
Step 3. Generating grid on the input planar surface.
Here's the last step. We gerated grid and made the grid extent to be limited by the input surface size. Finally, we want this script to work well despite the various direction and orientation of our input facade. To do this, we should orient our grid, which is readily made on XY plane to the surface XY plane.
Then how can we make XY plane following XY direction of surface? We can use reparametrize component to do this job.
As we can see in the pink bubble, using evaluate surface componet, we can analyze surface U,V direction which corresponds to X,Y direction of certain plane. Using U,V direction we can construct plane perpendicular to the surface.
Finally grid was generated in the input surface. As we used experession Floor(x), remains are deleted and grid extent is only generated in integer domain.
Orient is powerful tool, whenever we want transform geometry generated in certain plane to another plane. Using this script, we can make grid on the input surface and start making design alternatives based on this grid.
'Grasshopper' 카테고리의 다른 글
[Grasshopper] Generating perforated pattern (Square grid type) (0) | 2021.08.26 |
---|---|
[그래스호퍼] 그래스호퍼 Anemone 아네모네 루프 사용하기 (1) | 2021.08.15 |
[LADYBUG] 라이노 그래스호퍼 - 일사량 Radiation 계산하기 2/3 (3) | 2021.06.01 |
[LADYBUG] 라이노 그래스호퍼 - 일사량 Radiation 계산하기 1/3 (0) | 2021.05.26 |
[LADYBUG] 라이노 그래스호퍼 레이디버그 - 기상 데이터 epw 파일 (3) | 2021.05.23 |