Tuesday, November 22, 2011

Smart Select Pt.2: Set Current Layer

I've been using this script since early this year. It started from our frustration at: "Which layer does this object belong to?" and "Why must I always look at the properties tab?". I wrote the script to help find and quickly do some layer management/ file cleanup:

DefaultLayer.rvb: alias "d" - used for steps 5 and 6

So pick your object, run the script, and choose the following:
1. Set current layer to the object's layer*
2. Select all objects on that layer
3. Hide all objects on that layer
4. Isolate all objects on that layer
5. Turn that layer off
6. Lock that layer
7. Do nothing, other than peek at which layer that object belonged to*.

*change the "Current Layer Background" to a bright color to really see that layer pop. Find it at Options --> RhinoOptions > Appearance > Colors > LayerDialogBox.

Rhino has most of these commands (SetLayertoObject, OneLayerOn, OneLayerOff, SelLayer), but typing/ clicking through them is way too much work.

photos coming soon...

Smart Select Pt.1: Select Similar Object

I'm working on a smarter selection tool for rhino, so I'm starting with the basics.

This script selects:
similar closed polysurfaces by volume and at least one other dimension...
similar open surfaces/ polysurfaces by surface area...
similar open or closed curves by length, control points...

So click any of those objects, and watch as the script picks up similar objects in your file!

SelSimilarObjects.rvb (remember to convert the .txt into .rvb)

Wednesday, October 12, 2011

Spatial Deform: Grasshopper Introduction

Rhino's CageEdit command's closest equivalent in grasshopper is Spatial Deform. The combination of an already powerful command with grasshopper's interactive nature makes this a very complicated and memory intensive tool to figure out and use. Other than this Q&A and this demo, I really can't find a good example of using Spatial Deform, so here goes a basic introduction:

To use Spatial Deform, you'll need to attach the following:
'G' - the rhino geometry to deform
'S' - a series of points that will define the cage
'F' - the forces applied to each of the points in 'S'
'f' - a falloff equation

Now this script takes advantage of Kangaroo's removeDuplicatePts. If you don't already have it, get it at their website.

Sunday, October 9, 2011

Match Cage Edit + FlowAlongSrf

Part 2 of the MatchCageEdit series shows how I can combine the script with rhino's FlowAlongSrf as a rough and quick paneling design tool. In many regards it is similar to a grasshopper CageEdit, but allows for easier manipulation.

Match Cage Edit


This is Part 1 of a three part exploration into Rhino's CageEdit and Cage commands.

In Rhino, I frequently use cage editing for sloppy massing control. However, it has the ability to become a powerful and accurate design tool if there was a bit more workflow control. Imagine if you were working on developing a two-piece composition with cage editing, and then you've decided that it really needed three pieces. How would you add another object to cage? What you would need to do is to start over with a new cage and slowly deforming the control points until it looks like the previous control/cage. Ugh!

The actual steps to rebuild a deformed cage is simple but tedious. That's why here is a script in the same vein as MatchProperties or MatchLayer:

MatchCageEdit.rvb (change .txt to .rvb)

Friday, September 30, 2011

Making Slabs with Grasshopper

Slab is a limited command in rhino, but it has its uses in quickly putting up simple extrusions. It's always annoying to change your workflow because a basic tool is missing in grasshopper, so:

The definition is really simple. A series of closed, planar curves, the offset (inwards or outwards), and the extrusion value. With those in place, the script does a few offsets and booleans, and then spits out the slabs.

Sunday, September 25, 2011

Label by Layer

Sometimes, while diagramming in rhino, it helps to easily see to which layer each object belongs. This script simply adds a text dot of 'layer name' at the center of each object, and then groups it with the object.

LabelByLayer.rvb - (change .txt to .rvb)

Rhino Hidden Line

A few of us at work had been complaining that Rhino did not have an easy to use hidden line feature. But there is, if you know how to set it up. It involves creating a "new display option" (AdvancedDisplay). 

I've written this .rvb script (for rhino4 or rhino5wip) that will allow you to easily toggle in and out of a hiddenline mode. 
SetHiddenLineMode.rvb - (change .txt to .rvb)
Hidden Line.ini - setup file with colors
Hidden Line White.ini - setup files with just white lines

Blog Updates

It's been a while since I've updated this blog, but I am going to restart with a focus on rhino tutorials.