Chapter 3 Command Scripting

Using Commandscripting to Create Complex Models and Scenes

Commandscripting excels at the creation and management of large complex models and files. Many of you may have created beautiful models that you wanted to combine into larger more complex models and scenes only to be thwarted by lack of machine power and time and patience. After all waiting ten minutes for a screen redraw or property change can deter even the most hardy of us from working with huge files. We realize that our machines are capable of so much more but who has the patience or time to work with these huge files and squeeze the most out of our resources?

The complete scene you see above was never saved to file. I never needed to. In this case I used commandscripting to evolve and render this very complex and high surface count model. It was actually faster to create the model by running the Commandscript than it would be loading the complete saved file from hard drive.

The main secret to creating complex scenes or models is the import file merge command in Rhino. By combining many smaller lesser models or components you file merge them into one complex model or scene. Sounds easy you say you don't need command scripting to do that you think. True but commandscripting allows you to really exploit this feature and to get the most out of it not just use it off the menu.

The important added benefit is that now you can combine many different what if modeling scenarios and just run them from scripts. Bonus is that commandscripting can set up and create complex renderings that can be executed when you are away from your computer. Another plus is that you can set up and manage levels of detail depending on the requirements of your scene or model. Commandscripting gives you an easy way to substitute reuse and replace parts of models or different components depending on what your particular project demands. For instance in the scene above I could substitute more detailed columns or real walls with studs and dry wall sheets instead of simple 3d planes. Let's face it there is a polygon limit but this technique helps you to logically get the most out of your machine. Once you have the placement coordinates for your parts or models you only need to change the files that are referenced to those points in the script in order to change what is in your model. This is much more efficient and easier than changing them by hand.

You will build on the techniques you learned in the last chapter when you were cutting and pasting 3d coordinates into your Commandscript and placing the cutout holes in the manifold block.

Even if you are not an architect or interested in historical architectural design this chapter will teach you skills that can be applied to any complex model or scene not only architectural subjects. I will show you how to script and build the two models as well as variations on them. The first model is a rotunda or circular temple. The second is a Pompeian courtyard. You will reuse the same components and learn how using them with different Rhino modeling commands will result in creating entirely different models.

Settings for this chapter 3

Creating Architectural Rotundas
Rotunda Entablature Script

Cplanes and Commandscripting
Drawing a free form Entablature
Adding a prebuilt column from a file
How to easily change and replace components
Using other Rhino modeling commands

Creating a Pompeian Peristyle Courtyard
Modeling the Oecus
Cplane technique
File merge technique
The complete Oecus file
Creating the Column placement script
Creating the Entablature and Roof Script
Simple Entablature and Roof plus Tuscan Columns Script
Complete Entablature and Roof Script with Detailed Columns
Test the various scenarios
Lighting and rendering details in Rhino
Creating the Garden
Putting the complete model together in simple form
The Complete script that references all the detailed models and the garden
Concluding remarks for this chapter and further ideas.