Grasshopper

algorithmic modeling for Rhino

Hi All,
I am having some trouble with a euclidean sort of some points and also with the sweep_2_rails button...

Sorting: I want to sort some curve intersection points in the order they lie along the curve's length but the euclidean sort is ordering them by increasing x value (I think... I must confess I'm not 100% sure what a euclidean sort actually does :-( ). this works most of the time, but above a certain number of division points along the curve, this sort order is not right because the arc is more than 180degrees so, above a certain number of division points, the end points are not in the right order.

You can see this in the example attached that the model works up to 15 division points and after that, the intersection points on the rear arc are in the wrong order to draw the polyline through. Watch the sweep rails end up the wrong length near the ends of the arch!

Sweep2: This works if I pull out just the 2 rails and profile i want... you can change the index of the rails and profile from the lists and they work for each section of the arch but if i try to do all at once, nothing happens but I get no runtime errors. Why does it work one at a time, but not all at once?

Further work: I want to take each sweep surface and flatten them - any ideas how to do this in GH?
Then I want to lay the flattened surfaces out in a pattern on the x-y plane and apply an offset curve to them. The offset could be different in th x and y directions.

To get this model to work, set the first curve in the GH file to the front arc in the Rhino file and the second curve in the GH file to the rear arc.Then make sure the file button points to wherever you save the rails.txt file

Any help or advice would be appreciated and I hope you find this interesting!

Thanks!

Views: 1635

Attachments:

Replies to This Discussion

Hi Martyn,

I'm not able to have a look at the definitions at home but, this link might help on the sweep2 front: http://www.grasshopper3d.com/forum/topics/how-to-create-sweep2-with....

Also the method you are using to sort the points works only on the x component of the point. You should have a look at using the sort list component and ordering them based on the value of t along the curve. If no one else chimes in I could do an example tomorrow.
Here's the example of the Sorting:

Higher res below
Attachments:
Thanks for that Danny, i will give it a go.
I think the problem I have is that the points I am trying to sort have come from intersections on the curve with planes so i am not sure if the points still have the relationship with the curve that would allow me to sort by t. if that makes sense!
Is my point list just a list of intersection points rather than a list of points on a curve?

For the Sweep, I haven't checked the directions of the curves, but its weird how the sweep works one at a time, but not for all the rails together.

Many thanks for your help!
Both rails must be in the same direction in Rhino, you can't even flip one with the other as a guide curve in GH. That's why it works as singles.

As to the Plane intersect there will still be a value of t for the location of the intersect.

OK, thanks Danny,
I got this to work!
What are the buttons between the intersect and the sort button? I think I have a different version of GH as my buttons look different!
V0.6.0059
This new sort has had an effect on the sweep so i need to figure out what has happened here!
Attachments:
The Icon View can be found on the View menu along with draw fancy wires.

Those components are flatten the same as Right clicking on the input and selecting flatten. Note the difference in wires going from Dashed to Whole.

With regards to your new problem the data for your sections and rails is held on different branch levels but also all in one lump therefore not compatible. use the simplify component to remove overlapping branches and then Graft component to create an extra branch for each item.

fantastic, thanks again... I am at work now and shouldn't be messing with this, but will try for sure over the weekend.

Is the flatten surface (like the Rhino Command) possible in GH? If so, I (we) have almost cracked this!
Nice! That worked... I'm not entirely sure why so i guess i need to read a bit about simplify, graft and branch levels!

Thanks!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service