Grasshopper

algorithmic modeling for Rhino

Hi,
Im struggeling with this problem:
I want to create a diamond shaped Grid on a lofted surface like in the image below.
I created the Subsurfaces by dividing the whole loft in horizontal stripes and each stripe in 8 segments. I´m getting the vertices for each rectangular panel with "Brep Components". This gives me a tree structure (see other image)
How do I get the trapezes now? Is there a way to shift branches?

thanks for your help.

Simon

Views: 1669

Attachments:

Replies to This Discussion

Hi Simon,

this entirely scripted definition should add polylines in the order you are trying to achieve: both the even and the odd quads are calculated. Additionally, the first and last row are also given as triangles.

____
Giulio Piacentino
giulio.piacentino@mcneel.com
Attachments:
Hi Giulio,
What does the Mod() function do in your script and in general?

When i evaluate the surfaces resulting from the application of your script i get normals facing different directions would there be a way to fix that?

Many thanks,

Arthur
This is What i am getting after trying every possible tricks to graft/flatten/dispatch/clean my lists:

Hi Arthur,

about the two questions:
- the % (Mod in VB.Net) gives the remainder of a division. Example: 16 % 5 = 1 because 16 / 5 = 3 with remainder 1. You can get the 3 with the integer division (int / int, or \ in Vb.Net).

- there's no need to graft or do anything with trees in the script above: it already handles all the shift logic internally. The letters give you a hint as to which part you are getting: E (even cells), O (odd cells), T (top triangles), etc. Try to draw the diagonals on paper to see which ones share a similarity, that's also what I did to write the script. It is rather repetitive and would need some pages to explain line by line.

Finally, I'm attaching a full and simple example showing how to use the script with normals. Please post your definition if you are encountering any other problem. The normals are all on the right side I hope (see pic).


Hope this helps,
Giulio
Attachments:
Thanks a lot Giulio!

Our posts were overlapping in time, i posted an image at the end of this conversation and also a different script i wrote with a friend to define a mesh from intersecting lines generated by short paths on a surface...

The input surface has to have a kink-free edge. but neither u nor v has to be periodic, would that be called an open surface?

Would it be possible for you to explain odd cells as opposed to even ones? Is that a result of this "shift logic" i mentionned in my early problem?

thanks again,

Arthur
Hi Giulio,
Thanks again for your solution.
Pretty helpful. Cu, Simon
Hi guys,
Thanks a lot for this very helpful discussion.
I am having troubles with the script... it draws triangles from the end to the beginning (see image attached). Do you know how i could avoid that?Giulio could you quickly describe how the script work?Would there be a way to use simple shift list components to get the points missing in the basic surface divide defintion (second image)...
thanks again,
Arthur



Hi Arthur, the script above is making diagonal quads based on a v-periodic surface. It did not work for you because you have a v-open surface. See "periodic surface what is it" if you want some explanations. The scripted definition below can cope with completely open surfaces (the case of a u+v periodic srf is not covered by this definition). It has different loops for all cases (even cells, odd cells, top triangles, etc...). HTH
Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service