def point(self, x, y, z): if self._n: n = self._n n.bound = (x, y, z) else: n = Node(None, (x, y, z)) (nn, dist) = self.nearest_neighbor(n, self.dist) if nn and (dist < self.tolerance): self._n = n return nn.obj else: n.obj = (x, y, z) self._n = None self.insert(n) return n.obj
def Point(self, x, y, z): if self._n: n = self._n n.bound = (x, y, z) else: n = Node(None, (x, y, z)) (nn, dist) = self.nearest_neighbor(n, self.dist) if nn and (dist < self.tolerance): self._n = n return nn.obj else: n.obj = (x, y, z) self._n = None self.insert(n) return n.obj