Let us consider the following example. This is a standart Matlab function, so everyone can access "BracketWithHole.stl".
figure
gm = importGeometry("BracketWithHole.stl");
pdegplot(gm,"FaceLabels","on")
My goal is this: The STL geometry is to be "inserted" into a 3D matrix. The areas of the matrix that lie outside the geometry should have a value of 1; those that lie inside the geometry should have a value of 0.
Here is a 2D example: All places in the matrix that are "empty" receive a 0; all others receive a 1.
Edit: length, height and width of the 3D-matrix need not be the same