Grasshopper

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!

Views: 5126

Attachments:

Replies to This Discussion

I've just realised the photo never attached... And now I'm away for the weekend!

I'm basically just referring to the space between the solid objects that are created within the frame of the box when the scaling is turned (off?)! Eg. The space between the first two objects is larger than the space between objects later in the subdivision process!

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) ???

There's no way to explain what I mean without a sketch or screenshot, forget I mentioned it for the mean time and I'll fill you in when I get back!

Were you able to upload the version with the cracking? Grasshopper site for mobile is quite frankly awful and I can't see if you had or not :)

Restart from node zero (depth of answers ... etc etc).

WIP V3A tech preview:

  • Minor issues addressed (2.78 divisions by zero, 4.45 NaN cases and other trivia).
  • Way faster code (by a colossal 0.0001%).
  • Only occasionally code is 10++ times slower (life sucks).
  • New LOL random point option added.
  • Kill "any brep you like" option added (see Holly in pieces).
  • Concave/Convex/Freaky pieces (check some Holly pieces).

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]):

And a blob under fire:

And using more ultra secret code > here's why programming is all about knowing when/why to stop, he he:

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.

 

Attachments:

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.

Although introducing a slice width to the equation appears elementary:

  ... there's cases that this needs further elaboration. Unfortunately there's mo time right now for that ... so you must wait a bit (probably this w/e). In the mean time here's a "suitable" preview of that new mode:

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