algorithmic modeling for Rhino
Im sure its a very simple logic problem, but i am not getting it right now, i am trying to place different bricks, broken at different angles sequentially.
I am getting in a list of Breps and the start point, after which the bricks are placed at the vertex of the previous brick. This works out fine, now with the list of angles of all the broken edges, i am trying to rotate them, this is where im stuck, not all the bricks seem to have been rotated.
any help would be grateful, thanks in advance, im writing the code below, if needed i can send or attach the file. here is an image of the bricks not rotated. Doubt01.jpg
//Global Variables
Point3d[] p = new Point3d[8];
Vector3d v2 = new Vector3d(0, 0, 1);
//Move first Brick to Start Point
b[0].Translate(v);
//Move rest of the Bricks to a vertice from the previous Bricks
for (int i = 1; i < b.Count; i++){
p = b[i - 1].DuplicateVertices();
Point3d p1 = p[x];
Vector3d v1 = new Vector3d(p1);
b[i].Translate(v1);
double a1 = 1.570796 - a[i - 1];
b[i].Rotate(a1, v2, p1);
}
A = b;
Tags:
Welcome to
Grasshopper
© 2025 Created by Scott Davidson.
Powered by