From 645b0873bb8e80120ff8297ae985440f94181905 Mon Sep 17 00:00:00 2001 From: worbit Date: Fri, 27 Dec 2019 23:51:07 +0100 Subject: [PATCH] bug fixed --- src/compas_vol/microstructures/lattice.py | 2 +- src/compas_vol/modifications/multishell.py | 2 +- src/compas_vol/utilities/utils.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compas_vol/microstructures/lattice.py b/src/compas_vol/microstructures/lattice.py index 703fdf8..c83da5c 100644 --- a/src/compas_vol/microstructures/lattice.py +++ b/src/compas_vol/microstructures/lattice.py @@ -55,7 +55,7 @@ def frame(self, frame): @property def ltype(self): return self._ltype - + @property def lattice_type(self): return self.ltype, self.typenames[self.ltype] diff --git a/src/compas_vol/modifications/multishell.py b/src/compas_vol/modifications/multishell.py index 9042ced..1cf5153 100644 --- a/src/compas_vol/modifications/multishell.py +++ b/src/compas_vol/modifications/multishell.py @@ -48,7 +48,7 @@ def get_distance_numpy(self, x, y, z): sh = MultiShell(u, 1.0, 2.5) x, y, z = np.ogrid[-15:15:60j, -15:15:60j, -15:15:60j] - dm = sh.get_distance_numpy(x,y,z) + dm = sh.get_distance_numpy(x, y, z) plt.imshow(dm[:, :, 20], cmap='RdBu') # transpose because numpy indexing is 1)row 2) column instead of x y plt.show() diff --git a/src/compas_vol/utilities/utils.py b/src/compas_vol/utilities/utils.py index 87a9af9..513bfcd 100644 --- a/src/compas_vol/utilities/utils.py +++ b/src/compas_vol/utilities/utils.py @@ -173,6 +173,7 @@ def export_layer(distfield, resolution, level, filename='layerimage.png'): import numpy as np from skimage import io + # add support for marching squares > outline # x, y = np.ogrid[-10:10:resolution+0j, -10:10:resolution+0j] y, x = np.ogrid[-10:10:resolution*1j, -10:10:resolution*1j]