Grasshopper

algorithmic modeling for Rhino

hi everyone,

I have a list of curves (pic.a) and I want to divide them into an equal n of divisions. as you can see from pic.b, the divisions are applied only for the curve assigned to the last value of i. on the other hand, if I input this list of curves into a new py component, then everything works. (pic.c)

what am I missing?

Views: 985

Attachments:

Replies to This Discussion

  1. The curve input params in your GH file don't have internalized data.
  2. function.gh uses "return (allpts)" instead of "# return (selcrv)" (commented out!); for the component's intended use, this seems correct.  You would need to combine the points for both curves to get the 'points' output?
  3. function_correct.gh uses two different versions of Python code; one uses "return (selcrv)", the second returns points...  I guess I don't understand your question?
  4. Why bother with Python for this instead of using straight GH?  If this is just for learning Python, why not ask in the "VB, C# and Python" forum?

hi joseph,

thanks for your quick response.

yes, I am learning scripting and I would like to stay within python to resolve the issues given in my brief. you made me realised I  posted this discussion in the wrong forum. i will move it.

about my question, the result in pic c is what i am trying to achieve with the 20150718_function.gh but "return (allpts)" will only give one list of points. i want to apply the n_divisions to all curves in the list 'selcrv' and receive a series of list of points (as shown in 20150718_function_correct.gh).

I hope this makes it clearer

Attachments:

HI Fabio
Check the attached file

hi Naruto,

thanks for you reply. there is no attached file. can you please resend it?

I'm very sorry,No upload successfully

Attachments:

thank you very much Naruto. this gives me the change to know more about python (data trees, paths). very appreciated.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service