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?
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.
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).
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?
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