Grasshopper

algorithmic modeling for Rhino

I have divided a curve, then vector 2p between the division points, and the unwrapped, shifted list of the same points.

Since it's unwrapped, i lose one point in the list, so the shift list has one less element in it.

Shouldn't this be a , when it's missing the second point?

Views: 314

Replies to This Discussion

If the data matching algorithm of the Vector2PT component is set to the default "Longest List", then it will attempt to match the last point in the original list of divided points with whatever makes the most sense. In this case, the last point in the (shorter) shifted list will be used twice.

Switching the DataMatching to "Shortest List" instead is not a quick solution, since Vector2PT has 3 inputs, and you're probably not overriding the U value. Which means there is only 1 U value and it will cause the whole matching scheme to be aborted after the first run.

The best solution is to also remove the last item from the original list of points. That way the two point lists are properly matched up before you run into Vector2PT, and there is no more need for Grasshopper to try and make the best of it.

--
David Rutten
david@mcneel.com
Seattle, WA
Thank you David.

Now that i've progressed further with the definition i'm not entirely sure if this is a problem. Could you possibly take a look at the image i'm posting?

The receiver is getting point info, in many different branches. Underneath the lines (i'm just using them so i have a better idea what my vectors are) are multiple curves. So the receiver has point info in multiple branches. The first set of vector i created from these points, and a shifted list. The second set of vectors is created from the shifted list, and the shifted shifted list. So in this image i end up with 3 and 2 vectors per branch in these two lists.

What i want to achieve, is to turn get the angle information, where these vectors exist. There will be no such information, for the first point, and the last point, since no two vectors converge there. At least thats how i want my angle list to look like - to correspond with the point list.

I get two nulls at the end of the list, because of the discrepancy in the number of vectors. I shifted this list, by -1 to get it to correspond with the points. But it produces errors along the line. I want to use mass addition, on these values but it doesn't work with the .

Is there a way to turn these into zero?

I could clean the tree and remove these (or fix the angles/vectors and skip the alltogether?), but i am not sure how to add another item at the start and end of every branch. Plus, these branches wont always have the same amount of items.
Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service