|
|
|
||||||||||||||||||||||
|
|
|
Rhino has a handy feature called ‘Scripting’ where a series of commands can be saved and run. This is ideal for repetitive sequences or special purpose functions. Rhino has some powerful mesh tools, but as a NURBS modeller these are secondary to the main curve, surface and solid tools. We are using a NURBS model to generate the mesh models we need for our digital model. This could be done entirely using the various ‘mesh from model’ tools already in the Rhino toolbox, but some fine control over polygon formation would be useful. We will now script such a tool, then make a new button on the Rhino workspace and apply the script. |
|
|
|
2. Have a look at ‘Scripting’ in the Rhino help files. We can save just this sequence as a script. However, at the stages where we selected the surface and points in the sequence above, we need to interrupt the script so that we can select the surface and location of the point we want. The script command for this interruption is ‘Pause’. We also need to know what the script commands are for 3-D Face and On Surface snap. We can either look them up ( or some of them, not all seem to be listed!) in the Help/Command List, or simply click on the appropriate button or menu item and watch the Command line where it will be echoed. |
|
|
|
|
4. So we can see the script command for the On Surface snap is ‘OnSrf’ . From the Help files we find out that the script equivilent of hitting enter, to finish a command, is simply ‘Enter’, and that ‘!’ at the beginning of a script cancels any current, unfinished command. We have enough for a script! |
|
|
|
|
|
7. We could run these scripts from the script plug-in, or even pasteing them into the command line, but that is almost as clumsy as the original sequence of commands selected from the menus. Rhino has a much neater way of implimenting special commands such as this, and that is to make a new button and attach our scripts to it. |
|
|
||||||||||||||||||||||||||||||||||||
|
A big thank you to the guys on the Rhino Users Newsgroup, in particular Mitch, who helped us greatly with this tool. If you have any questions about Rhino, this newsgroup would be an excellent place to ask them. Click here to find them. |
|
|
||||||