def _GetLimits(self): """ Get the limits in world coordinates between which the object exists. """ # Obtain untransformed coords (if not an empty set) if not self._points: return None else: x1, x2 = self._points[:,0].min(), self._points[:,0].max() y1, y2 = self._points[:,1].min(), self._points[:,1].max() z1, z2 = self._points[:,2].min(), self._points[:,2].max() # There we are return Wobject._GetLimits(self, x1, x2, y1, y2, z1, z2)
def _GetLimits(self): """ Get the limits in world coordinates between which the object exists. """ # Obtain untransformed coords (if not an empty set) if not self._points: return None p = self._points.data valid = np.isfinite(p[:,0]) * np.isfinite(p[:,1]) * np.isfinite(p[:,2]) validpoints = p[valid, :] x1, y1, z1 = validpoints.min(axis=0) x2, y2, z2 = validpoints.max(axis=0) # There we are return Wobject._GetLimits(self, x1, x2, y1, y2, z1, z2)
def _GetLimits(self): """ Get the limits in world coordinates between which the object exists. """ # Obtain untransformed coords (if not an empty set) if not self._points: return None p = self._points.data valid = np.isfinite(p[:, 0]) * np.isfinite(p[:, 1]) * np.isfinite(p[:, 2]) validpoints = p[valid, :] x1, y1, z1 = validpoints.min(axis=0) x2, y2, z2 = validpoints.max(axis=0) # There we are return Wobject._GetLimits(self, x1, x2, y1, y2, z1, z2)