## Projecting Geometry to Surface – Project Point – Example 20.3

To make your 2D information imported from Elk per Example 20.1 into a 3 Dimensional model, we will use various variations of the “Project” geometry components. The first one we will look at is “Project Point” and we will use this to move all of our building footprints to our topographical surface which we developed in Example 20.2. After we have the footprints at the right elevation, we will “Extrude” the buildings to create building masses. **Basic Process** Our first order of business will be to find the center point of each building, using the “Area” component right after drawing the building footprint Polylines. Next we plug these points into our “Project Point” component. We also plug our “Surface” into this component, as well as a directional vector, which will be “Vector Z” You will now see two sets of points. One on the 2D World XY Plane, and a second set with the same X and Y values, but with the Z value matching the surface we projected to. Now we want to “Move” our polylines (not the center points) from the original Centerpoints (A) to the newly projected points (B). We plug the polylines into the “Move Component” and the Vector we choose is generated with the “Vector 2Pt” component with the proper points A and B. Note, you will not see the Vector (the green arrows in Image 3 above) unless you use the optional “Vector Display” tool. Once the polylines are moved, you can change them into boundary Surfaces if you’d like.

**Further Steps** You may want to add some building massing as you create a 3D model. Since we usually don’t know the precise height of each building, it is not feasible to have a simple process to give a correct height for each building footprint, but in a model with hundreds, or even thousands of buildings, precision might not be always necessary, and you may just want to recreate the “feel” of the building massings. In the countryside, most buildings might just be 1 or 2 stories high, in a city in Germany, it might be mostly 4-5 story apartment blocks, etc. One way to easily create believable building massing is to randomly extrude buildings based on a height range. So for 1-2 story buildings you might have an extrusion height range of 4 to 8 meters (not counting a roof). For 4-5 story buildings you might use a range from 16 to 20 meters, etc. To do this, you use the random number generation process we’ve looked at in quite a few of the previous examples. Flatten you building footprints, use a list length component to determine the number of buildings, and generate a list of random numbers based on your desired range of heights. Extrude the polylines and add a “Cap holes” component to get a solid, or simply extrude the “Boundary Surface” and “Cap holes” is not necessary.

You may want to spend some time to develop a more elaborate building script. For example, the height could be proportional in some ways to the area, so that small footprint sheds don’t end up getting extruded to 4 stories tall. One thing I also tried was to make pitched roofs on all 4 sided building footprints in my model, where the pitch and orientation is adjustable. I also moved the footprints of the buildings twice. Once to the minimum spot elevation and one to the maximum, and then created a loft between the two to create a building foundation, so the buildings wouldn’t be floating in space. To make a model more believable, it could also be worthwhile to more carefully model well-known landmarks individually, but that is not a topic for here.

Hi !

I’m Japanese student majoring Architecture design in university.

Thank you for your good tutorial .

Can I ask you how you make pitched roof automatically with grasshopper?

Thanks,

LikeLike

The roof pitch procedure was a bit complicated especially for the detailed roof. But the basic logic is to find the midpoint of the 2 shortest lines (or 2 longest lines) of a four sided shape, and then to move the midpoint vertically based on the roof pitch ratio. Then two new lines can be drawn connecting this moved point back to the endpoints of the original line.

LikeLike