Here’s a straight forward one. I am trying to extract the negative volume between, say a box and a sphere enclosed within it without intersecting its walls. I don’t think a Boolean operation like Solid Difference would work here since they aren’t intersecting. Any ideas?
Hey @Birk_Binnard, thanks a lot for the reply. It definitely does work for this specific case, but I think I was should have been a bit more clear that this was a simplification of my geometry.
Basically I have a population of 3D Voronoi cells bounded by a box as in the picture. I am trying to extract the trabecular volume (or the ‘veiny’ structure) passing between these cells.
Hello @PeterFotiadis, I really appreciate your response. Will this method still work for my actual case? Please find a better explanation of my geometry here: Subtracting non-intersecting solids - #4 by Ahmed_Zeid
Question: Even though I can’t write C# (or C+ or C++ or C%$) I can read it. But why should a GH user have to do this?
Answer (maybe): David needs more helpers.
well, consider that GH and its components are a sort of “camouflage” to bridge the gap of hardcore coding through visual programming
but actually not every single Rhinocommon “thing” is directly exposed in GH
on the other hand, many GH component are like “full packages” that use many different rhinocommon methods to spit out the desired result
long story short, everything you do through GH you could also do via code (for an expert and experianced programmer), while everything you do via code you might not be able to do reproduce that in GH alone
also, getting used to the simplicity GH spits out results becomes kind of addictive…
a couple of days ago I had to deal with finding the minimum cumulative rotating bounding box of many Breps, I did it in GH, it took like 3 minutes, then for some unbeknown reason I decided I wanted to do that also in Python… and MAN, I thought it would take me like 15 minutes but the situation became increasingly hard and increasingly alcoholic ![]()
Thanks inno - I think you are exactly correct. Which is why, when I got interested in 3D printing years ago, I opted for defining my 3D printable objects with GH and not with one of the various 3D CAD programs available at the time. Frankly I just found the graphical/parametric approach for designing geometry overwhelmingly appealing compared to everything else out there.
Would it cause the earth to explode if someone were to suggest stabilizing Rhino in favor of updating GH to have access to all of Rhino’s internal modules? I wonder how much new coding would be required to do this. And what would be the actual obstacles to do this? (I certainly don’t mean to bring down the wrath of McNeel on me for suggesting this, but it would be interesting to know both the technical and economc challenges this would create.)
@Birk_Binnard I’m not sure if this is exactly what you want but it might help you.
voronoi negspace.gh (30.8 KB)
7g8uP8lXC2MZhlU80ImW3.png)
can you post your geometry and explain exactly - better through a model - what you understand by trabecular volume ?
I’m assuming you are probably generating the voronoi3d cells in rhino, then scaling them down
so one idea is to split each original cell at its centroid (getting two “halves” ) and boolean diff both parts with the scaled part.
trabecular_volume_voronoi3d.gh (9.2 KB)
you won’t end up with a single object, but the resulting parts make up what i think you mean by trabecular volume
hint: to get the exact bounding box you’re after, you might want to pass the results to a solid intersection
btw, what is your final goal from doing this? 3d printing?
Hi @adel.albloushi and @noambdr, Thanks a lot for taking the time. I hope this image will better present what I am trying to do. I am trying to extract the geometry on the right from the scaled down Voronoi cells on the left.
Simply pass all the voronoi cells into the first input of solid difference component as a grafted list (right click select graft) and your geometry into the second input of the solid difference component
Also, invest some time in explaining your goals clearly. It seems to me that what you wanted to do in the first post of this topic is a different thing all together than your last post.
Lastly, do share a minimal version of your files so that we can help you better. Read The sticky post of this category
Forget Vor cells and the likes (and creating hollow solids [i.e. solids with pockets of thin air] - as I said above that’s very easy via code [but why bother?]).
Why the U turn? well … after step 4 (see below) nobody could guess the source logic (so to speak) of that liquid mess.
Do:
- Define an “envelope” Box, then a 3d grid, then create a Random set of mini “grid” Boxes (as Meshes). For a more “airy” result take care to define void spaces. Another - easier- way to do that is to create Random lines (using the Box sides grid pts) and then 3d pixelate (LOL) the lines…
- Append the mini Meshes into a Mesh M (see 4)… in such a way that only the skin Faces are sampled (see pics below).
- Define Random “anchor pockets” (i.e. all the quad pts sets from the Mesh M that are in contact with the Box as in 1.
- Relax (K2) the M like we do in tensile membranes (in fact you can do that - via code - without K2 … but that requires coding skills).
Some pics to get the gist.
You’re right! Perhaps I wasn’t as clear as I thought with my explanation from the get go. I’ll make sure to make people’s lives a bit easier with my next topic :D. Thanks
Interesting. I’ll give it a go.
So I was addressing this a bit wrong, instead of working out the negative volume between the scaled-down Voronoi cells and the bounding box, deconstructing the cells into their edges and feeding those into a multipipe component makes much more sense!
Two videos that are relevant:
1- https://www.youtube.com/watch?v=gbQKfK7wz1E&t=701s
2- https://www.youtube.com/watch?v=PIPbYFYGE9Y










