algorithmic modeling for Rhino
Hi I am trying to program in Python something like the geometry pipeline component where you can obtain all the geometry contained in a layer whose name contains a string of characters.
Input: string of characters contained in the layer name.
Output: all the geometry contained in those layer(s).
I tried this:
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino as rh
import GhPython as gp
sc.doc = rh.RhinoDoc.ActiveDoc
layers = rs.LayerNames()
a = filter (lambda w: x in w, layers)
for i in a:
obj = sc.doc.Objects.FindByLayer(i)
b = obj
But I have not been able to make it work, it does not output the geometry elements.
Someone knows how to solve this?
Thanks in advance,
Alejandro
Tags:
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
© 2024 Created by Scott Davidson. Powered by