Grasshopper

algorithmic modeling for Rhino

Hi.
I have a list containing the corners of different plane surfaces, now I wan't to use these corner points for a control point curve. But how do i get the the curve component to know only to make a curve for each surface. I have attached my list, it is split up into the corners of each surface.
Best regards Rasmus

Views: 737

Attachments:

Replies to This Discussion

The curve component will create one curve for every individual path. You already have the points separated in different paths, one path for every planar surface. You just need to connect the list of points to the curve component and it should create one curve for every planar surface.
If I understand you correctly ... it should work just fine, since the Curve component processes each data path separately, creating one curve for each point set.
Remember though, that three points are not enough to create a degree-3 curve...
Can we see a larger part of your definition?
it seems that my paths contains all of the corner points of volumes, not of each surface in the volume. If a have a list of surfaces can I then from that get a list of the corner points of these, divide in paths for each surface?
Explode (Brep Components) will come in handy.
Feed it with the list of planar surfaces and use the V output as the intput points for the Curve component.
yeah.... that works!! Nice. Now the only thing is that on some the surfaces it seems the points are not in the "correct" order for the curve if you know what I mean. Some of them ends up as "curls". Do you have a clever thought about this as well? :)
Again, it should work fine, but it could depend on how you created your surfaces. Please post the .ghx or a larger screenshot of the definition.
Yes sure. The thing is that I am using a VB script based on Gabe Smedresman's work. This creates the BRep's which I explode into it's planes, points and so on.
The screen-dump is attached.
Attachments:
I think i did that VB script :P. It creates the cells by the brute force voronoi method so it's really slow.
A simple way to fix your problem would be to use the join curves component on the edges of the surfaces and then use the explode curve component on those curves to get the points in the correct order.
Yes you did. It got it from another post where you attached it. Great work though. Just of couriosity...you say that it is slow, but is there another, "better" script? And what would the difference be? I am used to scripting in MatLab, so I am not used to the functions i VB, but it seems that I should learn them. I am gonna try your solution.
Well that method is as basic as it gets, so any other VB script you find for 3d voronoi should be the same or better in terms of speed. It's only faster than rhinoscript since it uses the SDK methods and such.
If you are using many points, Dimitrie Stefanescu (http://dimitrie.wordpress.com/) posted a definition that connects with a 3rd party software called qhull. It sends the points to qhull and then imports the generated geometry back into grasshopper. It should work much faster, but it's more difficult to set up. It behaves differently too. As he scripted it, it creates one individual surface per boundary. The script you are using creates closed solid blocks per cell.
Yeah I have been trying that definition as well, but I could not figure it out. I got a pretty weird shape that did not resemble a box, yours was much easier to use I think, and it works great for my project. And your solution worked perfectly.

Can you help me understand that method completely? When joining the curves it creates a list of all of the curves, and then it is exploded... when does the sorting happen? And with which logic?
Thanks man.
The sorting happens when you join the individual line segments that are extracted from the edges of the surface into a polyline. A polyline is a set of ordered points were the first point is connected to the second, the second to the third and so on and so forth. Since you are exploding the polyline, you get the points in their correct order.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service