avoid intersections and identifcal faces _create_polyhedron

This commit is contained in:
Laura Klünder 2017-11-18 16:19:28 +01:00
parent c1634c7520
commit 391e2dffa2

View file

@ -669,6 +669,12 @@ class LevelGeometries:
if not isinstance(lower, np.ndarray):
lower = np.full(self.vertices.shape[0], fill_value=lower, dtype=np.int32)
# lower should always be lower or equal than upper
lower = np.minimum(upper, lower)
# remove faces that have identical upper and lower coordinates
geom_faces = geom_faces[(upper[geom_faces]-lower[geom_faces]).any(axis=1)]
mesh = Mesh()
# top faces