I am new to grasshopper, and have come to the software with a specific problem I am wanting to solve.
I have six volume meshes that make up the faces of a cuboid.
The constructed cube is not necessarily watertight.
I want to extract a solid mesh that represents the void enclosed by the six volumes.
I have tried a few methods so far without success, such as spiting the volumes into surfaces, and using the internal surfaces to define a new mesh, however, I have not been able to identify “internal” surfaces.
I would be grateful for any suggestions.
Here is the model Space Extract.3dm (38.7 KB)
3. Attach minimal versions of all the relevant files
If you have a
gh file you have a question about, attach it to the post. Do not expect that people will recreate a file based on a screen-shot because that’s a lot of pointless work. It’s also a good idea to remove everything non-essential from a
gh file. You can use the Internalise Data menu option to cut everything to the left of a parameter
Thanks for the reply Rickson, I have edited my question to include the model.
Have a look here. Theres gotta be an easier way to get a box around four points in space though?
voidbox.gh (22.2 KB)
This is a way using Boundary Volume. Space Extract_re.gh
Got a little closer with the points-based approach, still not quite what @HS_Kim got.
His surface-based approach is more accurate (ie: actually solving the problem)!
voidbox.gh (24.4 KB)
Thanks Amir! this is exactly what I was after. would it be possible to talk me through the thinking behind thi please as I am new to Grasshopper.
I got all of your breps corner points & grouped them, getting 8 “corner groups”. Their average is our temporary “center point”. Grabbing the closest point of each corner group to our center point gives us the 8 points describing the final box.
HS_Kims box is more accurate in a way since it generates the shape using the bordering surfaces. I guess that’s what you were after. Zoom in and compare them to see the differences.
Thanks HS_Kim, this appears to be doing exactly what I want, and according to Amir, it is superior to his solution. Would it be possible to explain how it works please?
one thing that really helps is to only show selected components.
To reverse engineer the script start selecting components from the beginning, plugin in panels to see what is being output, how its being used and what is being generated.
Generating grasshopper scripts is generally a iterative process, with the ultimate solution coming after understanding via working through the issues. Something Kim has done for many years. Hence he can provide an elegant solution fairly easily.
Thanks everyone for your help, especially Amir and HS_Kim!! you did exactly what I asked for.
I have spent the morning analysing your sololutions, and with advice from Rickson, I believe I have a good understanding of how they work.
I am wondering if I could extend the problem to cover a couple of other use cases. Specifically, oddly shaped rooms:
and rooms with doors or windows
which the current solution seems to struggle with.
unnamed.gh (20.8 KB)
Space Extract.3dm (69.3 KB)
In this case, it works but can’t guarantee that it’s a general solution for this sort. Space Extract_reV2.gh
Thanks HS_Kim! really appreciate all the help, very kind of you.