19.12.2016 Views

Architectural_Design_with_SketchUp

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 6 Creating Geometry Using Ruby Scripting<br />

Figure 6.25: Modified panels and the two attractor boxes<br />

Solar-Responsive <strong>Design</strong><br />

This script does not use attractors per se. It is, however, an example of how you could use a<br />

direction (expressed as a vector) to drive your design. To make our design more responsive<br />

to lighting, we’ll use the “south” direction in our model to modify the shape of components<br />

that we place on a curved surface.<br />

To accomplish this, we’ll reuse the code from the Placing Components on Faces script<br />

from earlier. All we need to do this time is modify the section that transforms the copied<br />

ComponentInstance.<br />

You can try this if you have various faces in your selection as well as one component. The<br />

example shown in Figure 6.26, uses a curved surface that was subdivided into many faces<br />

and the same circle component as was used <strong>with</strong> the earlier code. Once you have these, select<br />

them, copy the following code into the Ruby Code Editor, and click on Run.<br />

# Maps a component onto the center of all selected faces and<br />

# scales based on south orientation<br />

271

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!