algorithmic modeling for Rhino
Hi Everyone,
I'm looking to recreate a two dimensional cracking technique from python script into grasshopper, whilst also transferring it to 3D. It's relatively simple, drawing a line between the centre of the (in 2D case - closed polyline) the extremities, and then sub dividing and repeating.
I've started this off in 3D by creating a box, finding the centriod and then creating lines between the centroid and exterior vertices. Ideally I then want to create these "triangles" into surfaces, find the centre point of all of those, and then repeat (even better would be to somehow have the repeat count on a slider of some sort)
I'm attaching a couple of screen shots to help explain what I'm trying to achieve, would be very grateful if anyone had any suggestions, also included the grasshopper file, though I apologise in advance for how messy it is!
Tags:
Space ???
But there's no space since a given Brep (say: the oldBrep) is "split":..
try{Brep piece1 = oldBrep.Trim(plane, tolerance)[0];}
catch{} // i.e. if error occurs > who cares?
...With a random plane. Note: The parts of Brep that lie inside (opposite the normal) of the plane are retained.
Then ... play it again Sam:
plane.Flip();
try{Brep piece2 = oldBrep.Trim(plane, tolerance)[0];}
catch{} // i.e. if error occurs > who cares?
BTW: In the forthcoming V3A using a randomly defined polyline as the "cutter" may yield a collection of Breps ... but that's another animal.
Or you mean that you actually want a space - i.e. a "separation layer" - between the pieces (for the glue) ???
Restart from node zero (depth of answers ... etc etc).
WIP V3A tech preview:
BTW: Some stuff is missing: using ultra secret pieces of code in the new LOL point option (that MAY or MAY not yield results [life's a game]):
Hi Peter,
WIP version looks great!
any chace youd be able to upload it (even if your not entirely done)? I've got some experiments to do for tomorrow and it would be great to use this updated version!
Thansk again,
H
WIP Zigzag slicing mode removed (poses more questions than provides answers > overkill AND the art of pointless AND very slow).
With regard the "radial cracks" demonstrated some answers before ... unfortunately appears impossible to remove sensitive pieces of code and achieve something that works.
Note: For the demo cases used in V3A load Rhino file first.
Brief explanation with regard the LOL stuff:
Imagine a given Brep within the recursion procedure. Then imagine the Brep Bounding Box. Then define a random point inside the Box. This may (or may not) being contained in the Brep. Then define a random slicing plane with origin the above point.
So depending on your Karma ... you may (or may not) get a slice. If you combine all the above freaky stuff you get this :
Failures [slicing thin air] are reported as well: but what this means? rather nothing I confess.
Note: rollTheBones it doesn't do nothing in particular ... it just forces the C# to re-execute ... meaning another chaotic result.
Moral: Kill Bill
Hi Peter,
Thanks for all the help with this again, I've been doing alot of experimenting and my project is really getting under way now so a big thank you for that. I was just hoping for a slight adjustment to the script it that was at all possible...
Basically I'm using the inverse of the boxes created to form a structural system to apply across my scheme, using my own breps (so no need for the brep library after all :D) Now the images below are just an example, and I may have mentioned this before... But im looking to control the size of the "gaps" between the broken pieces so they were all equal, and ideally 1m.
Red arrows here are the distances that I want to make equal
I'm using the "solid difference" command to get the inverse result of the broken pieces, but somethimes it doesnt work properly, and some pieces arnt "cut away" im scaling down the original brep by a fraction to use as one of the input parameters
You can see the result of this here, where a large chunk of the brep has remained solid.
Hope your able to help!
Best Wishes,
Holly
Well ... that's easy to do it.
Requires just some "mods" in the slicing logic, so to speak: i.e. "bounce" the plane "along" the plane.ZAxis (+sliceWidth/2.0, - sliceWidth/2.0 and make actually 2 consecutive slices instead of one ...
... but due to the random nature of the process (i.e. the normal vector of the slicing plane) there's no guarantee that a slice with a width could yield always things on "both sides" (anyway if this happens you'll get a void).
I'll post the update as soon as is ready.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by