I am trying to create Revit curtain wall grid from lines/geometry in Rhino. I see this is still in WIP on the Rhino.Inside website, but if anyone’s done it successfully, I’d really appreciate the help.
I am struggling to get the interrupted grids like on the image below.
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.
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.
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:
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:
thanks a lot for sending the stuff through! It works great when revit/rhino units are set to feet, but once I change the revit/rhino units to mm or meters, I am not able to generate any gridlines (first python component gives null values). Am I missing something really obvious here? I have jumped into the coding world just recently, so apologies for asking silly questions.
Thanks! I’ll take a look, but coding isn’t my arena… yet. The Added Gridline is working great & is more critical to a current workflow, deleting was just a wish & isn’t difficult to do manually.
This is great, I know this is setting the grids for a curtain wall element, but is it possible to apply a set custom grid setout to a curtain wall type. I am assuming probably not as they most likely will not all be the same.
I believe I am having the same issues with the units as discussed above.
If I use the script I have attached below, it works perfectly when I use a revit in feet and a rhino in feet. However, when I runthe script after I change both programs to the mm units- the python script returns null values as opposed to adding a grid.
Can you let me know how I should deal with the conversion? thankyou
@ssw1 Okay see the attached please. I modified the python grid maker component to use the new Rhino.Inside.Revit api to convert Rhino units to Revit API units
# ...
clr.AddReference('RhinoInside.Revit')
from RhinoInside.Revit.Convert.Geometry import UnitConverter
# ...
x = UnitConverter.InHostUnits(P.X, DB.ParameterType.Length)
y = UnitConverter.InHostUnits(P.Y, DB.ParameterType.Length)
z = UnitConverter.InHostUnits(P.Z, DB.ParameterType.Length)
CGL = CG.AddGridLine(U, DB.XYZ(x,y,z), False)
# ...
I have a further question of this issue in relation to updating the placement of grid lines.
So I have successfully added the grid lines and that all works great based on the advice above.
Lets say that once I have placed all my curtain panels, I then want to actually adjust these locations of these grids. I just want to understand the process of this.
What I know I could do is add new grid lines and then remove the old grid lines- this would seem the easy way. The issue with this is that i want to keep the curtain panels I have already added in (lets just say someone has already tagged them etc). The issue comes if the grid distances become too small, then the famly will perhaps no longer be able to make (lets say the new grid to grid gap is 50mm and there are two extrusions in the family that are atleast 100mm wide.
the way I see around this issue is if its possible to simply take an existing grid line and give it new XY location, as opposed to the adding and then deleting method I mentioned above.
Hi @eirannejad
! I confuse about the graphical element .What is its input (is target curtain wall?)?
If it is curtain wall ,I need to have basic grid line of it ? As I use your code it does not have output data of the vertical and horizontal line .
Thanks a lot!
Hard to see what you’ve got going there, but to add a Gridline you need the CG, a boolean that determines U or V and a Point on the wall. I’m guessing you need to flip your Boolean.
This is great, it works! Thanks!
Will you include these components and even expand the Curtain Wall components more in the official package? I am thinking about the possibility to change Curtain Panel Types or other parameters. This way you could create patterns for the facade designs directly through Gh
And another question, i see that the Analyze Curtain Grid, gets the Glazed Panel type but i checked the Curtain Wall and i did not assign such panel.
Correct, Changing the Element Type is via Analyzing Curtain Grid is the way to change out the panel types.
Most of these initial python components will eventually made into Rhino.Inside.Revit Components. The development of stable core code is the priority, with components being secondary additions as time permits.