Cushion Panels Script in Python for GH

cp002pp

This is a code snippet I have been using long time ago written in VB. Just thought of re-writing the code in Python, which is clearer to understand, but I had some problems with datatrees so I had to change the structure of code resulting into a few more lines of code.

cp001pp

This routine utilizes rhinocommon (if you are looking for rhinoscript methods here, in this blog, you are terribly wrong), and simple list management. The code is pretty straightforward, as you can see.

#Library imports
#1
import Rhino.Geometry as rc

#main routine
data_T = []
data_T2 = []
breps = []

for i in range(len(panels)):
    temp_list = []
    temp_list2 = []
    cn = centroids[i]
    nrm = normals[i]
    upper_p = cn+(nrm*height)
    upper_p = rc.Point(upper_p)
    lower_p = cn-(nrm*height)
    lower_p = rc.Point(lower_p)
    temp_list.append(panels[i])
    temp_list.append(upper_p)
    temp_list2.append(panels[i])
    temp_list2.append(lower_p)
    data_T.append(temp_list)
    data_T2.append(temp_list2)

for j in range(len(data_T)):
    ienum = data_T[j]
    ienum2 = data_T2[j]
    b = rc.Brep.CreatePatch(ienum,10,10,0.0005)
    b2 = rc.Brep.CreatePatch(ienum2,10,10,0.0005)
    breps.append(b)
    breps.append(b2)

#outputs
cushion_panels = breps

You can download the definition along  with the python code here.

cushionpanelsdef

Nudibranch + Millipede | Realitme Flowing Isosurface Definition

RealtimeFlowingIsosurface

I know I haven’t properly updated the Nudibranch examples on the GH forum, however since I have been getting a lot of requests to display what and how exactly this isosurface snapshot from the previous post about the release of Nudibranch works, i decided to spent a few hours to document this process and also share the definition. Take a look at the following video.

This definition uses two Nudibranch components the Satellites and the AttractorValues, combined with the Millipede’s isosurface component. Three or more satellite entities create a 3d non-uniformal field of values from 0.00 to 0.5  these values are fed to the isosurface component and Voila!!.  No hustle animated complexity defined by certain rules ( number of attractors, equation for the values distribution <cos,sinc ect>.

You can download the definition as usual from the [Sub]code page.

And of course you must have Nudibranch and Millipede installed..

flowingisosurf

Enjoy.! :)

Nudibranch | Add-on for Grasshopper3d

nudibranch_icon0001

Long time no see. Been very busy in the last couple of months…:( However I am particularly happy about this post. For the past month I had the chance to work on something that has been on my mind at least two years now. And finally the time has come when I manage to publicly release Nudibranch  a new Add-on for Grasshopper3d.

What is a Nudibranch????????? Specifically Glaucus Atlanticus..

The Nudibrach Add-in for Grasshopper3d is a set of components facilitating and automating Grasshopper’s capacity to generate distance-based value fields, in addition to moving particles through attractor defined vector-fields while creating animated simulations of these particles.

In particular, Nudibranch aims to automate the attractor development process (one or multiple), while covering most of the frequently used cases, without however intending to replace or render useless the basic understanding of how attractors operate. Furthermore, three animation components enable the real-time interaction between attractors and the affected data.

Since this is the first release of Nudibranch and it might still contain  bugs. Please use it “as is”, it does not come with warranties. Please give credit where credit is due according to the license file.

You can download Nudibranch from the  Food4Rhino website, along with other useful plug-ins.

A brief documentation and generic examples are also included in the download folder.

I plan to share my experiments with Nudibranch through this blog and via the Grasshopper community group. If you create an interesting design, or even better if you want to share some feedback and your thoughts on Nudibranch just drop a line. It will be really appreciated.

Finally I would like to thank Mateusz, Michael, Andrea, Angel, Arthur, Angel, Tudor for testing Nudibranch out and shared their valuable feedback…

Enjoy,

M.

nudibranchtestnudibranch001enudibranch0012enudibranch0y012e

Creative Commons License

Nudibranch Copyright (C) 2013 by Marios Tsiliakos is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Permissions beyond the scope of this license may be available at www.digitalsubstance.wordpress.com.