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.
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
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)!
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.