Grasshopper

algorithmic modeling for Rhino

Hi everybody.

I'm new to python and I guess that this will be an easy one for you guys.

I don’t know why the result for this script is 60 items larger than the input list. I’ve noticed that is exactly 60 items larger and that the extra items are value = 4. Moreover the number of extra items match the amount of items with value = 1.

Please can anyone help me!!

Thanks in advance

MC.!

Views: 395

Attachments:

Replies to This Discussion

Hi emeceo,

try the following.

Hope this helps,

Miguel

BTW: your code seems correct from what I can tell. Can you share the input list? this will help pinpoint the mistake.

Attachments:

Hi Miguel.

Thanks for the replie. I try what you sent but it doesn’t work, you end up with the same amount of items but almost every one of them is out of bounds. Take a look to the GH file; I think the problem is like you said in the imput list in fact I also try rounding the numbers no to INT but a float with less decimals and the same problem.

Attachments:

line 4 should look like this. if 0<= j <=1/4:

that should make it work.

Got it !!

you where wright with the j and the newj because in the first if the j was replaced by 1, then in the last if 3/4 < j >= 1.00 there was extra values = to 1 to evaluate !!!!

Miguel, thanks for your help

MC

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service