Grasshopper

algorithmic modeling for Rhino

Hi all,

I have just created a python script filled with conditional statements for a component. However, I have a bit of confusion along the way. 

What I wanted to do is to have the output a of the component to be a single or list of numbers as highlighted in the picture above. However, the output a seems to be giving that result. Do any of you have any suggestions as to how to fix this? The python script is attached in this discussion. Thank you in advance for your help. I very much appreciate it.

Views: 1703

Attachments:

Replies to This Discussion

Hi SXS,

What is the class used for?
I would suggest to use concepts that are alien later, first concentrate on conditionals, if that one is the task at hand.

Try to express all your logic in conditionals, then you can make functions, then, if necessary, classes.

Also, I would suggest to go through the whole RhinoScript 101 for Python in Rhino.

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

Hi Giulio,

I apologize for the late reply. At first I was planning to use the classes so that it will make the script more neat and clean. But I think I should follow your advice and write the conditionals first and then the classes if needed. Thank you very much for your advice. 

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