diff --git a/field.py b/field.py index 1a02636..7ad0200 100644 --- a/field.py +++ b/field.py @@ -787,24 +787,24 @@ class Features3d: return @property - def faces(self): return np.split(self._faces,self.offset) + def faces(self): return np.split(self._faces,self._offset) @property def points(self): return self._points @property - def cell_areas(self): return np.split(self._cellarea,self.offset) + def cell_areas(self): return np.split(self._cell_areas,self._offset) @property - def cell_volumes(self): return np.split(self._cellvol,self.offset) + def cell_volumes(self): return np.split(self._cell_volumes,self._offset) def area(self,feature): '''Returns the surface area of feature. If feature is None, total surface area of all features is returned.''' - if label is None: + if feature is None: return np.sum(self._cell_areas) else: - return np.sum(self.cell_areas[label-1]) + return np.sum(self.cell_areas[feature-1]) def areas(self): '''Returns a tuple with surface areas of all features.''' @@ -817,7 +817,7 @@ class Features3d: if self._faces is None: self.triangulate(contour_method=self.__TRI_CONTMETH, cellvol_normal_component=self.__TRI_NORMCOMP) - if label is None: + if feature is None: return np.sum(self._cell_volumes) else: return np.sum(self.cell_volumes[feature-1])