avoid intersections and identifcal faces _create_polyhedron
This commit is contained in:
parent
c1634c7520
commit
391e2dffa2
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue