algorithmic modeling for Rhino
Following on from the images I posted recently (here),
I am now making available the source script for Cytoskeleton.
First, to explain the name:
In 1903 Nikolai K Koltsov proposed that the shape of cells was determined by a network of tubules that he termed the cytoskeleton
(the name comes from Cyto- meaning cell or hollow vessel)
This is another wireframe thickening tool, intended for 3d printing use.
In contrast to exoskeleton (which works on general line networks), this works exclusively on lines which form the edges of meshes. The additional connectivity information present in this case makes it possible to produce an output with all quads, and moreover, a quad mesh with all even valence vertices.
Because it works on a Plankton mesh, the input can be made of ngons. We can also input a triangular mesh, apply the dual operation, and then thicken the edges of the resulting polygon mesh. This works well in combination with the remeshing script I posted here, for getting approximately equal edge lengths. This can be used to quickly turn any closed mesh into a lightweight hexagonal (mostly - with a few pentagons and heptagons for curvature) frame structure.
The even valence quad mesh property of the resulting thickened mesh means we can also use the mesh direction-sorting and directional-subdivision tools from Kangaroo (described here).
When combined with Weaverbird's Catmull-Clark subdivision, this allows us to smooth the mesh, while also having control over how much 'webbing' occurs at the nodes:
One could even combine the resulting surfaces with all sorts of relaxation, or developable strip unrolling...
The code is there for you to read, so feel free to experiment and make adjustments to it. Hopefully it is fairly self explanatory.
Please feel free to ask any questions or suggest improvements, or just show off anything you create using this.
and yes - because the input and output are both meshes, you can apply it recursively!
This script references version 0.3.0 of Plankton, which you can download here:
Tags:
I am also getting the same error as Shalom. I also have the newest version and am not sure what I am doing wrong.
Thanks
I got this error: [A]Plankton.PlanktonMesh cannot be cast to [B]Plankton.PlanktonMesh. Type A originates from 'Plankton, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null' in the context 'LoadNeither' at location 'C:\Users\loo\AppData\Roaming\Grasshopper\Libraries\Plankton.dll'. Type B originates from 'Plankton, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null' in the context 'LoadFrom' at location 'C:\USERS\loo\DESKTOP\plankton\Plankton.dll'. (line: 75)
my grasshopper version: 0.9.0072
Hope your reply! Thanks.
See my reply to Simon above
Sorry to have troubled you. I made a mistake. Now I delete the dll file at location of destop. It solves, Thanks!!
I would like to just apply this Cytoskeleton to a flat plane for now. Later I would like to manipulate the plane.
Many others helped me figure this out - here's what I learned to help any others trying to solve the same problem (especially those like me who are new to Grasshopper).
This is an example of how to take a network of lines (i.e. a graph) and make a Plankton Mesh, from which you can use Cytoskeleton to make a solid mesh (and then smooth it with Weaverbird).
Note similar results could be achieved with the following:
Working backwards, here is the GhPython script from Will Pearson that builds a Plankton Mesh from vertices and faces. The vertices are a list of 3D coordinates, the faces are a tree a lists, with each list containing the indices of vertices that form a closed loop. From Will, "Plankton only handles manifold meshes, i.e. meshes which have a front and a back. This orientation is determined by the "right-hand rule" i.e. if the vertices of a face are ordered counter-clockwise then the face normal will be out of the page/screen."
# V: list of Point3d
# F: tree of intimport Grasshopper
appdata = Grasshopper.Folders.DefaultAssemblyFolderimport clr
clr.AddReferenceToFileAndPath(appdata + "Plankton.dll")import Plankton
pmesh = Plankton.PlanktonMesh()
for pt in V:
pmesh.Vertices.Add(pt.X, pt.Y, pt.Z)for face in F.Branches:
face = list(face)[:-1]
pmesh.Faces.AddFace(face)
These vertices and faces are precisely the output from Starling. Starling takes in a list of Polylines which form the (properly oriented) face loops.
The polyline face loops can be generated...
The latter was achieved using the Surface Split command, then converting the face edges (converted to curves) into polyline loops to represent faces.
just wanted to say thank you for taking the time to share this!
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by