Grasshopper

algorithmic modeling for Rhino

Hi I´m beginner in Pythonscript and I don´t know how to solve this problem can anybody help me ????

Thanks 

Views: 958

Attachments:

Replies to This Discussion

Hi Ondrej

if you read the full statement, you can see that the bug is:

Runtime error (ValueErrorException): Could not convert 1.0 to a Vector3d Traceback:

line 398, in coerce3dvector, "C:\Users\Giulio\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\utility.py"

line 467, in VectorUnitize, "C:\Users\Giulio\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\pointvector.py"

line 16, in script

So the error is here:

    ec_normal = rs.VectorUnitize(e0_normal + e1_normal)

This means that e0_normal + e1_normal gives a number...

I suggest you write the script in the _EditPythonScript editor first, so you have debugging, and then copy-paste it to the GhPython component once it's ready.

Feel free to ask if you have more questions,

Kind regards,

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

Hi, Ondrej,

 

Took a quick look. And like Guilio said, the problem lies in line 16, both e0_normal and e1_normal are float values. They both come from the variable point_normals which is a 3d-vector. I guess though that you wanted to have it as a list of vectors, because your previous module returns a list of vectors. Try then to change your your parameter access to list access from item access to access the whole list at once. Does it work or did I misunderstood what you wanted?

 

Best,

Samuel

yhea in end it was porblem that i forgot it change to list access then it worked thanks

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service