...
- 要打开新的Grasshopper脚本,请在Grasshopper环境中单击Grasshopper> Grasshopper,然后单击File> New document。保存文件。
- 在仪表模板中打开一个新的THCAD文件并保存。
- 要将新脚本链接到打开的.dwg文件,请单击“画布工具栏”中的“链接”按钮。
- 转到THCAD模型空间并绘制一个矩形。
注意:使用折线创建不规则几何形状。 - 将THCAD>输入几何>曲线组件拖放到Grasshopper画布上。
- 右键单击“曲线”组件,然后选择“设置一个THCAD曲线”。
- Go to the THCAD model space and select the rectangle.
Note: Save time with the Quad: select the curve in THCAD and then select ToGrasshopper under the Grasshopper tab of the Quad. A Grasshopper component appears in the upper left corner of your Grasshopper canvas. - Link the Curve component to a Surface > Freeform > Boundary Surfaces component
- Link this to a Surface > Freeform > Extrude component.
- In the Direction input of the Extrude component link a Vector > Vector > Unit Z component with Params > Input > Number Slider component. Set this to the height of your box, 17 for example. Note: you can edit the range and preciseness of the slider by right-clicking the component and selecting 'Edit...'. A dialog box pops up where you can set the digits and min and max value of the slider.
- You now have drawn a box in Grasshopper, using THCAD geometry as an input!
...
- Add the 'Start_3.ghx' code to the canvas.
- You do that by downloading the zip file at the bottom of this page and extracting its content.
- Then open the 'Start_3.ghx' file by going to File > Open Document... in your Grasshopper window.
- You can now select all of the Grasshopper code by hitting Ctrl+A on the keyboard and copy it using Ctrl+C.
- Then switch back to the document you were working on in the previous procedure by going to the upper right corner of the Grasshopper window and clicking on the title of the current document (Start_3).
- You then get a drop-down of all the active Grasshopper scripts, so open 'End_2.ghx'.
- Now click on the canvas and hit Ctrl+V to paste the 'Start_3.ghx'-code.
- This code has some post-baking settings of classified and baked beams and columns:
- The script uses the Get Properties Names component to display the BIM properties in the Property Category '.
- In those properties, it selects item 1 for the columns and item 0 for the beams, 'ColumnType' and 'BeamType' respectively.
- To conclude, it sets the properties to the value specified in the Panel components, using the Set Property Value components.
- To make the script work, bake the two Bake Building Element components that make up the railing.
- Now link the Building Element output of the Bake Building Element components to the respective Building Element input of the Get Properties Names components.
- 同样,将“烘焙建筑元素”组件的“建筑元素”输出链接到“设置属性值”组件的相应“建筑元素”输入。
- 如果现在在THCAD中选择一列并打开其属性,则ColumnType将设置为“钢柱”。当您更改面板组件的值时,THCAD中的属性会实时更改。
- 结果脚本:“ End_3.ghx”可在此页面底部的zip文件中找到。它可以与“ End_3.dwg”文件一起使用,在该文件中没有任何内容。烘焙所有建筑元素,以获取烘焙后设置。
Grasshopper中的THCAD工具集
...




