Skip to content

Reply To: STL voxelization



Actually the stl-file was not water-tight. Closing the holes removes the artifacts as expected.
However, I had assumed that it also works for untight STL files which is indicated by the constructor’s documentation of the STLreader, since it defines a ray for each of the major directions x, y and z and performs a majority vote on the three test results.
So if a node is exactly at the inlet or outlet, it should indicate correctly.

But according to this, the reason for the cross-shaped artefact could be the following.
If a node of the octree is slightly off the inlet or outlet location, due to the floating point precision for example, the full node would be indicated as inside or outside according to the node’s position. Now the node could, of course, span a larger volume eventually reaching inside the geometry, since there is no face that would lead to another split into child nodes.
Same is true for adjacent nodes, but not for diagonally adjacent ones, leading to a different indication and therefore can be seen as a cross.

So now I wouldn’t consider this a bug as well – thanks for investigating with me!