Still floors from 1 to 3 have opens windows, because the big geometry making that windows glass is open, and it doesn’t close with Cap command.
I think you should start with better and cleaner geometries, the beams of the windows have many wrong angles/orientations, and globally the geometry is very dirty.
You could replace the beam block with a simpler block, but that’s not the main problem.
Another solution is making a turntable animation in decent resolution and feed the images to a photogrammetry software…
Distance measurement is slow, and it’s dumb to do it in GH (huge lists, ultra slow).
Even by using millipede (which give the same result as my c# meshing), calculating the huge amount of distance values is a massive task for normal GH , it should be done, distance calc and meshing, all inside a single component, like dendro…
the actual signed-distance mesh iso surfacing of the starting 2 open meshes are actually many shells:
Hello Riccardo, nice experiments.
As Dendro is using OpenVdB I went to the documentation. The Mesh To Volume requires a closed mesh and is doing Signed Distance https://www.openvdb.org/documentation/doxygen/MeshToVolume_8h.html#details
I make some experiments with BandWidth and Isovalue, if isovalue is more than Zero and Bandwidth > 1 it could capture surfaces but it doesn’t seem reliable.
Cells size of 2 units, I’m scared to going down to 0.2 like with dendro.
(rough math, it can easily take 4 hours doing the same… but it would surely fail somewhere…)
I am using some c# custom methods, dendro probably use some deeper and more efficient stuff (c/c++ maybe?)
The bottom mesh is very complex, Mesh.ClosestPoint method is probably not best approach.
(splitting the task in regions or other optimizations is needed).
This is 1.5 minutes with cell size of 2.3 units:
Doing some further testing, it seems that @laurent_delrieu’s approach with populating mesh faces with points works in a fairly-reliable manner. It breaks apart with highly-varying mesh faces, where some are very small and others really big.
I got around it by populating points based on area - 1 point per 1 square meter of each face. It results in more consistent point distribution. Random spacing is probably not the best approach for this case, though, and a regular point distribution could be more promising.
Still didn’t get a chance to compile Cgal and try the Alpha Wrapping approach suggested earlier in this thread. Will report here once I wrapped my head around it.
I modified your C# script to populate mesh faces in a uniform way based on user-defined spacing value. It comes at a slight performance penalty but helps in scenarios where mesh faces vary a lot in size.