Grasshopper

algorithmic modeling for Rhino

Hi there,

I'm trying to understand how to use "class" in gh-python.

I have two python script each with and without "class".

Can anyone explain me why the output is different?

and feels like I don't need "class" since gh-python component works like "class".

As always I appreciate your time.

Thanks in advance.

 

Views: 301

Attachments:

Replies to This Discussion

Hi Jooyoung,

You could use both class and procedural function solutions. And you did everything right.
Just at class solution, forgot to assign the values you get from your tanPoints() function to the ghpython component's "a" output:

tanL_obj = TanLines(x,y)
a = tanL_obj.tanPoints()

Thanks djordje for quick reply!!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service