# Grid climb or rotate with multiple point?

Hi guys!

I am trying to make a model of a roof structure. Then I found this picture on Pinterest. The method for making this structure is like a vector field. But I cannot figure out what is the logic. Can anyone give me a suggestion about how to make a structure like this?

Any suggestions are appreciated!

Look at the field components in the vector tab.

For me you donâ€™t need vector field, it seems to be connexions between triangles.
For each edge of triangle, I put a middle point that is attracted by the middle.
Green curves are edges
Red curves are the attracted lines

These red lines are then Maelstrom 2 times

So a first GH script
twirl mesh.gh (20.6 KB)
twirl mesh.gh (25.9 KB)

5 Likes

Continuing to play a bit with that, definitively it uses dual of a triangular mesh. The logic is to generate curves form the mesh vertex to the frontier of the dual mesh.
I was obliged to make my own dual mesh to get the borders that are not in DualMesh from Daniel Piker

twirl_ pull to ground.gh (23.4 KB)

Hi Laurent, Thank you for your reply. I still have several questions about the logic. At first, you use Maelstrom component to create the rotation. Does it mean that if you have several rotation centers you should create the same number of points to match different centers? Secondly, I tried to make the same result as above pictures you posted. I divided curve by points and tried to pull each point to the ground by the distance from these points to each vertex. But I still cannot get what you posted above. Could you help me a little bit more with it or share your .gh file to me? Thank you!

I 'll answer you in a few hours. I made a custom component to deal with these problems

Here it is

It lacks many optimisation, changes â€¦
The first thing the script is doing is a dual mesh, using face center (from RhinoCommon) or Circumcenter .

Lines are done using the vertex to the dual lines,
*Distance (with unit) is the approximate distance between discetization on dual lines.

These lines are then divided in points, these points are then rotated and tranformed to curves and piped (piping is long).
twirl mesh.gh (35.2 KB)

6 Likes

Screen shots look great! Excellent hand-off to adjacent curves at tangent points.

An a special version for @Joseph_Oster â€śgrognonâ€ť (search the French meaning
twirl mesh for Joseph.gh (26.5 KB)

Thanks for trying:

This?

I donâ€™t give up
twirl mesh for Joseph.gh (26.5 KB)
I forgot a Multiplication

It is a pity that multiplication work better in GH1 than GH0.9. I was obliged to replace it with a scale.
As I use always Weld Vertices I thought it is in legacy GH. It could almost be replaced by a line of C# !!!

2 Likes

I got MeshEdit unzipped, unlocked(!) and installed. Now Multiplication is stopping me?

Not cool to downgrade, Rhinocommon has also new features that I didnâ€™t know. I tested it on Rhino 5.
twirl mesh for Joseph.gh (29.5 KB)
One Line in RH6
int edges = mesh.TopologyVertices.ConnectedEdges(topologyVertexIndex);

These Lines in RH5
int meshVertexIndices = mesh.TopologyVertices.MeshVertexIndices(topologyVertexIndex);
int connectedVertices = mesh.Vertices.GetConnectedVertices(meshVertexIndices[0]);
List edgesList = new List ();
for (int i = 0; i < connectedVertices.Length; i++)
{
int test = mesh.TopologyEdges.GetEdgeIndex(mesh.TopologyVertices.TopologyVertexIndex(meshVertexIndices[0]), mesh.TopologyVertices.TopologyVertexIndex(connectedVertices[i]));
if (test >= 0)
{
}
}
int edges = edgesList.ToArray();

1 Like

Works for me now, thank you! (Not sure what the C# component is doing though?)

It appears there are two duplicate curves (and six unique) in each branch of eight? Instead of 0â€¦7 , there should be six (0â€¦5) unique curves in each direction.

twirl_mesh_for_Joseph_2018Feb28b.gh (37.6 KB)

4 Likes