Grasshopper

algorithmic modeling for Rhino

Hello,

I have a drawing with some polysurfaces. Each polysurface has a name, so I can call, move and rotate them anyway I like, from Python.

However, when I use BooleanSplit (or BooleanDifference, to cut away some intersection between two objects), a new object is generated without a name.

Does anyone know how to call an object (or more specifically a polysurface) within box X1,Y1,Z1 and X2,Y2,Z2?

Or something similar to reselect an object?

Note that I don't want to use a mouse/pointer or click the object (because of the repetitive nature of the drawing, which is why I use Python).

Thanks in advance! :-)

Views: 624

Replies to This Discussion

Have you looked at the native Geometry Pipeline component? or the Dynamic Pipeline from Human? These will automatically retrieve geometry from a layer - avoiding any repetitive clicking.

Will dive into it.

Thanks for the reply!

Will keep you posted as to whether it works.

Geometry Pipeline component and dynamic pipeline are not available in Python and don't appear to work for objects other than pipelines.

But thanks for the suggestion!

Problem solved: use rs.BooleanDifference-function with delete_input-flag on True as such

newObjectToBeCutInNextIteration = rs.BooleanDifference(objectToBeCut,cutter,delete_input=True)

newCutter = addSphere([0,0,0]) #create new cutting object, becaus old one is deleted automatically by booleandifference-function

Note that this is a workaround unfortunately, but solves the problem for this time.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service