コード例 #1
0
ファイル: PointKdtree.py プロジェクト: I--Fox--I/pycam
 def __init__(self, points=None, cutoff=5, cutoff_distance=0.5,
         tolerance=epsilon):
     if points is None:
         points = []
     self._n = None
     self.tolerance = tolerance
     nodes = []
     for p in points:
         n = Node(p, (p.x, p.y, p.z))
         nodes.append(n)
     kdtree.__init__(self, nodes, cutoff, cutoff_distance)
コード例 #2
0
 def __init__(self,
              points=None,
              cutoff=5,
              cutoff_distance=0.5,
              tolerance=epsilon):
     if points is None:
         points = []
     self._n = None
     self.tolerance = tolerance
     nodes = []
     for p in points:
         n = Node(p, p)
         nodes.append(n)
     kdtree.__init__(self, nodes, cutoff, cutoff_distance)
コード例 #3
0
ファイル: PointKdtree.py プロジェクト: chriskyfung/MakerDroid
 def __init__(self, points=None, cutoff=5, cutoff_distance=0.5,
         tolerance=epsilon):
     if points is None:
         points = []
     self._n = None
     self.tolerance = tolerance
     nodes = []
     for p in points:
         n = Node()
         n.point = p
         n.bound = []
         n.bound.append(p.x)
         n.bound.append(p.y)
         n.bound.append(p.z)
         nodes.append(n)
     kdtree.__init__(self, nodes, cutoff, cutoff_distance)
コード例 #4
0
 def __init__(self,
              points=None,
              cutoff=5,
              cutoff_distance=0.5,
              tolerance=epsilon):
     if points is None:
         points = []
     self._n = None
     self.tolerance = tolerance
     nodes = []
     for p in points:
         n = Node()
         n.point = p
         n.bound = []
         n.bound.append(p.x)
         n.bound.append(p.y)
         n.bound.append(p.z)
         nodes.append(n)
     kdtree.__init__(self, nodes, cutoff, cutoff_distance)