Grasshopper

algorithmic modeling for Rhino

Subtraction of Random spherical volume from prismatic cube

Hello Everyone,

I'm new to grasshopper and have a simple problem that seems to be easy to solve having the required knowledge.

I have to extracting the volume of intersected spheres from a bulk pristine volume as shown in attached image.

It would be grateful if someone help me to model.Thanks in advance.

Regards
Vignesh

Views: 1401

Attachments:

Replies to This Discussion

You may find the attached useful (WARNING: Rhino is NOT a solid modeller > for big numbers of spheres be prepared [better avoid it]).

Works in 2 "modes":

Inspection (NOTE: the main point is that you can control - if you want - the spheres: avoiding clash situations) 

Swiss cheese:

Attachments:

BTW: I would strongly recommend to avoid doing "hollow" operations in a surface modeller like Rhino

Imagine 2 cubes that rotate around 2 circles.

Depending on their relative positions we asking for a "subtraction" of the smaller from the bigger.

If the bigger contains the smaller this is a classic hollow operation in solid modellers (doable but ... not "by the book", read below). BTW: If a hollow result occurs ... the black one is a "portion" of the result in order to visualize the thing.

If they intersect the (normal) result is what you expect.

But ... if they are apart each other ... and you still use the very same Method (Brep.MergeBreps) "freaky" things happen (Note: this Method is not available as native GH component AND is not recommended as well). I mean whilst 2 things are around ... JUST one is reported as closed Brep (LOL):

 

Attachments:

I've made parts like this for 3D printing using these steps:

1. Make a solid Brep from a curved surface

2. Scale the surface from STep 1 to be slightly larger and populate it with random points

3. Create a sphere at each of the points

4. Use SDiff to subtract the spheres from the Brep in step 1.

Varying the scale factor in Step 2 moves the spheres closer to or farther away from the solid Brep. You can also change the size of the spheres - or do both. For fancier results you can arrange the spheres in patterns by creating the Step 2 points in non-random ways. For even fancier results you can substitute some other closed Brep for the spheres - I've liked using 7-pointed non-overlapping star shapes.

As Peter and others have pointed out, SDiff can take a long time to process, so start with relatively few points/shapess to subtract. 

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service