Generate buildings (community size) from CAD file for energy analysis

Hi all,

I am trying to generate some buildings (community size) from a CAD file and then to put them on a 3D terrain model in Rhino. After then I will perform energy simulation with UMI to analyze the performance of the community. But I have no idea how can I generate buildings from a CAD file and put them on a 3D terrain model in rhino.

community.dwg (43.3 KB)
community.3dm (7.2 MB)

Please let me know your thoughts. Thank you in advance to everyone!

1 Like

Hi HC -

When you import the DWG file into your 3dm file, you’ll have to:

  • scale the 2D curves to the correct size (that information is not available in the file)
  • move the shapes to the correct XY location relative to the terrain
  • extrude the 2D curves into solids
    • (for the “mountain”, you could use a cone)
    • it’s unclear if the height of shapes with a “podium” designate total height or height above podium
  • move the objects to the correct Z elevation

For the last step, you could use a script like this one:


1 Like

If you do try the script, according to your image, you have a huge number of buildings and quite a number of levels, so it will probably take a while… There is a status bar progress meter.

1 Like

I did try to extrude the curves from the CAD file and it works. I will try the python script later, may I know how to insert the script to the grasshopper?

Thank you!

Yes. It has around 200 buildings so that it is time consuming to do it one by one.


Hi @wim

I am trying to project the building (box) on either mesh or surface (attached file), but have no idea how to implement the python script for this task.

projection.3dm (6.9 MB)

It’s not clear from your file what you want to do - as the ‘buildings’ are not placed over the terrain…

The script is not designed for Grasshopper - it runs in the normal Rhino interface. Just save the script somewhere like your desktop, then call RunPythonScript and browse to the script file. It should ask you to select your building volumes first, then the terrain surface(s)/meshe(s). The buildings should be in the correct orientation vertically over the terrain before running the script, they are simply moved downward onto/into the terrain.

1 Like

Hi @Helvetosaur,

Very clear instruction. Thanks!

All the best,