Grasshopper

algorithmic modeling for Rhino

Hello,

I've been trying different methods, getting inspiration from the forum's other questions, but i couldnt solve it at the end, that's why i come to ask for a little help.

Actually i used point coordinates to make lines. I wanted to repeat those sequences of lines, at their end.

I made a little drawing in purple on my image to explain visually what i want to do.

I tried duplicate/move.

I tried orient.

But there is always bugs.. as what i want to do is really simple!

Thank you for your help..

Daniel

Views: 981

Attachments:

Replies to This Discussion

For example, using duplicate and move, i cant duplicate more than one time. The following duplicates are on the same coordinates

'ill try to hoopsnake the sequence, maybe itll work.

if someone has another easier solution ill be happy to know it

When we start talking about looping, I would prefer to use a bit of C# code. 

Set up a C# component with inputs called g, v and n. Set g to GeometryBase, v to Vector3d and n to integer. 

The code you need is below. You just need the bit between the outermost set of curly brackets.

private void RunScript(GeometryBase g, Vector3d v, int n, ref object A)
{

//return list
var rtngeom = new List<GeometryBase>();

//n is the number of copies
//g is the input geometry
for (int i = 0; i < n; i++)
{
rtngeom.Add(g.Duplicate());
}

//v is the vector we want to move between two copies
for (int i = 0; i < n; i++)
{
rtngeom[i].Translate(v * i);
}

A = rtngeom;

}

Actually, just looked at your image again and realised that there is a very simple way to do it! You had the right idea, you just needed to multiply your vector for each copy.

Hi Dan, you could make use of the LinearArray component (in tab Transform > Array)

Attachments:

THANK YOU ALL

so i've taken a little of the two answers :)

I had to join the curve and multiply it.

Ill try to learn a little of arraypolyline as im not familiar with it.

thank you for you help !

Attachments:

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