Grasshopper

algorithmic modeling for Rhino

Hello,

I inputed points into python component, extracted coordinates and then change them...now I want to create new points in grasshopper with new coordinates... and I dont know what I'm doing wrong... Please look at attached pdf file.

point3d%20Objects%20Problem.pdf

I would be glad for any suggestion or help...

Regards,

Damir

Views: 526

Replies to This Discussion

Hi Damir,

Your pdf explanations always look useful, but it's mostly better to attach the .gh file too.

If you have some code, which you can't share, just remove it, and attach the part with "points" and "newPoints" lists generating one.

Hi Djordje,

It's not about that I dont want to share... but im working with API for software which needs to be used with Licence dongle... so my code would not be able to be run without it and thats why I tried to explain it in short document... but anyway I attached simplified version (shortened code) to point out my problem... and also how results look like on my computer...

Hope anyone can help me :)

Damir

Attachments:

The problem is with the scope of your "newPoints" list. It's defined locally in RectCushion function, meaning that ghpython output parameters do not "see" it. You have to return the newPoints list at the end of your RectCushion function, and then assign it to some output parameter (it can be "newPoints" again does not matter).

Either that or you should define the newPoints as a global list (without the need to return it at the end of the RectCushion function):

global newPoints
newPoints = []
...

Thank you very much for your time, Djordje.

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