Demo entry 6317271

Grasshopper mesh from closed polylines

   

Submitted by anonymous on Nov 05, 2016 at 17:09
Language: Python. Code size: 382 Bytes.

# V: list of Point3d
# F: tree of int

import Grasshopper
appdata = Grasshopper.Folders.DefaultAssemblyFolder

import 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)

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).