Rhino python scripts

A couple of rhino python scripts, someone may found useful:

Rename layer names in Rhino with/without asteriks symbol
Prompt for user input on word/character within layer names which needs
to be replaced. Convenient option includes asteriks symbol as a wildcard character. example:
– current layers: Layer01, Layer02, Layer03
– find: L*0*
– replace: Pl*1*
– results in: Player11, Player12, Player13
Layer names could be replaced on a number of levels: parent, sub-layer, sub-sub-layer or mutual combinations of mentioned three.

Select duplicate curves
Selects all duplicate curves in document, whether they’re positioned on top of each other (Rhino’s command “SelDup” would find these) or scattered around. It can remove flipped curves too.

Object names and number of its occurrences
Shows all object’s assigned names and counts the number of its occurrences. Results could be exported to .csv file or just presented on the screen in a form of a message box.

Return the top most group name of an object
Replicates the “ObjectTopGroup” RhinoScript function, which still hasn’t been implemented to PythonScript.
Returns the top most group name that an object is assigned. This function primarily applies to objects that are members of nested groups.

Select closed (solid) objects by Volume
Prompts the user to enter the desired volume amount, and selects the closed (solid) object with closest amount of volume, to the entered one

Advertisements