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

Generating fractal space frames

Structures under compression load are less efficient than the same structures under tension load. Instead of material breaking, yielding which determines design of a structure, at compression structures – buckling occurs before mentioned events.

By replacing straight beam elements under compression, with a series of fractal space frames (two tetrahedra on both end, and a stack of polyhedra in between) and distributing the initial compression force into tension and compression members of the space frame, R.S.Farr and Y.Mao succeeded in lowering down the amount of required material tens, several hundred times[1].

truss

Read more of this post

Export volume, mass, weight and volume centroids from Rhino to .csv file

An interesting topic emerged at Mcneel forums: calculating Rhino solid’s volume, mass, weight and centroids. Then exporting that data into .csv file.
The following modest rhinoscript function tackles this issue. Check it at github.

Depending on Rhino unit system, data will be exported with following units:

units: Millimeters:    length(mm), volume(mm3), mass(g), weight(N – Newtons)
units: Centimeters:    length(cm), volume(cm3), mass(g), weight(N)
units: Meters:    length(m), volume(m3), mass(kg), weight(N)
units: Inches:    length(in), volume(in3), mass(oz – ounce), weight(N)
units: Feets:    length(ft), volume(ft3), mass(lb), weight(N)

Function additionally labels object’s number’s and volume centroid points are added to the Rhino file:

 

rhinoCSV

Exported .csv:

excelCSV

Water supply design definition

d_sa_zigom

I created a Grasshopper definition which designs cold water supply branched network, by using Joseph Brix methode.
Unit load according to German standard DIN1988-W308.
Definition uses an evolutionary algorithm – Octopus to determine the most efficient solution in terms of energy losses along the network.

Read more of this post

Business hotel

9g

Location: Nis, Serbia

Area:  12500 m2 (object) + 8000m2 (surrounding area)

Proposal

Competition required creating a modern hotel building on a river bank. Location is surrounded from one side by river and on the other by residential homes, with a few alien modern business buildings. Required capacity should be 80 rooms, out of which 70% double rooms, 20% single bedrooms and 10% suites.

Read more of this post

Grasshopper to RFEM/RSTAB

I made an example of exporting data from Rhino/Grasshopper into Dlubal’s RFEM, by using Excel spreadsheets.
The same method can be used for RSTAB.
RFEM/RSTAB are structural analysis and design softwares:
www.dlubal.com

Video show changes in geometry of grid shell and space frame in Grasshopper, which are then reflected to the geometry in RFEM/RSTAB ready for analysis:

Sierpinski pyramids

This project represents my experiment to create Sierpinski square-based pyramids as fractals and also an example of feedback loops usage within Grasshopper.

Code allows manipulation of size of pyramids and the number of iterations within (number of pyramid sub levels). Each one of these three has a different sub level.

Read more of this post

Follow

Get every new post delivered to your Inbox.