Curtain Wall Grid

Hey @danijelruso
Adding grid lines is quite a complex task due to the mathematical computation that is necessary to place the 2d line drawing of the grids over the actual geometry of the wall and calculate Grid insertion points. I have prepared an example here that I hope would be a starting point for your solution.

API Notes

  • Use the CurtainGrid.AddGridLine to create a new grid-line on a curtain-wall
  • Use CurtainGridLine.AddSegment and .RemoveSegment to turn the grid-line-segments on and off.
  • You can not turn off all the grid-line-segments on a grid-line
  • .AddGridLine allows for inserting grid-line-segments, however, you can not use .AddGridLine to insert multiple grid-line-segments on a grid-line axis. The first segment creates the grid-line and all other calls to .AddGridLine on the same grid-line axis will be ignored. A better way is to create the grid lines first, and then toggle (on/off) each grid-line-segment later.

Example Script

This definition uses two simple python components to Add grid-lines and later, remove the unnecessary grid-line-segments. It gets the grid-lines from a series of rhino lines, remaps them to the boundary and plane of the example wall:

Screen Shot 2020-06-08 at 18.30.08

Then it adds full grid-lines onto the curtain-grid. Later it analyzes the curtain-grid, grabs the grid-line-segments and by running a crude point-curve intersection logic, determines which grid-line-segments need to be turned off:

Screen Shot 2020-06-08 at 18.30.17

Hope this helps

add grid lines.zip (418.4 KB)

Note: Revit model is in 2020

7 Likes