algorithmic modeling for Rhino
Hey guys,
I have this code for random rectangles but now I want to transform the rectangles in surfaces and then extrude them, I tried with Nurbs and also with Brups but still getting errors. Any clue of what should I do?
Thankyou!!!!
//Create empty rectanles, breps list
List<Rectangle3d> rects = new List<Rectangle3d>();
List<Brep> collectBreps = new List<Brep>();
//Initialize a new instance of the Random class called random
Random random = new Random();
//Create a new unitZ vector
Vector3d unitZ = new Vector3d(0, 0, 1);
//Start a loop
for(int i = start; i <= end; i = i + 2) {
//Create random values
int randint = random.Next(0, 100);
int randint2 = random.Next(0, 10);
int randint3 = random.Next(0, 5);
//Create new Extrusions based on these random values
Point3d pt = new Point3d(i, randint, randint2);
Plane pln = new Plane(pt, unitZ);
Rectangle3d rect = new Rectangle3d(pln, randint3, randint3);
//Add all of these to the appropriate lists (Actually, since we are only using the rects you don't need the others FYI)
rects.Add(rect);
}
A = rects;
Tags:
Get this ... and have faith (for the usual updates, he he, that could add "some" spice to the steak).
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2025 Created by Scott Davidson.
Powered by