Grasshopper

algorithmic modeling for Rhino

Using a cluster (or a new component I created) in ghPython

Hi,


I have a new cluster named: "CurveSimilarity", and want to use this cluster in the ghPython component (or in any other way in ghPython)

I thought I need to add this cluster in the tool bar and only after that to use it that way:

import ghpythonlib.components as ghcomp

res = ghcomp.CurveSimilarity(crv1, crv2)

How do I do each step?

Thanks!

Views: 666

Replies to This Discussion

Hi NaamaGal

at the time of writing, Python components are excluded from ghpythonlib.components.

You see, there is a problem of choosing what is more important:

1. is it more important that compiled component are able to use ghpythonlib.components?

or

2. is it more important that compiled components can be found within ghpythonlib.components?

The two options pretty much exclude one another. Otherwise, a GhPython component could be used to compile a compiled component that uses another compiled component via ghpythonlib.components. Given the current implmentation and the limitations of the Grasshopper SDK, which component should be loaded first?

Presently, option 1 was chosen.

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

if that is the case, is there a way to create for-loops using the pre-defined grasshopper components?

thanks

Usually there is no need. Grasshopper handles per-group repetition for you :)

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service