topologicpy 0.8.95__py3-none-any.whl → 0.8.98__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
topologicpy/BVH.py CHANGED
@@ -342,12 +342,13 @@ class BVH:
342
342
  for topology in topologyList:
343
343
  if Topology.IsInstance(topology, "vertex"):
344
344
  x,y,z = Vertex.Coordinates(topology, mantissa=mantissa)
345
- points = [[x-tolerance, y-tolerance, z-tolerance], [x+tolerance, y+tolerance, z+tolerance]]
345
+ # points = [[x-tolerance, y-tolerance, z-tolerance], [x+tolerance, y+tolerance, z+tolerance]]
346
+ aabb_box = AABB(x-tolerance, y-tolerance, z-tolerance, x+tolerance, y+tolerance, z+tolerance)
346
347
  else:
347
348
  points = [Vertex.Coordinates(v, mantissa=mantissa) for v in Topology.Vertices(topology)]
348
- aabb_box = AABB.from_points(points, pad = tolerance)
349
+ aabb_box = AABB.from_points(points, pad = tolerance)
349
350
  return_topologies.extend([bvh.items[i] for i in BVH.QueryAABB(bvh, aabb_box)])
350
- return return_topologies
351
+ return return_topologies
351
352
 
352
353
  @staticmethod
353
354
  def Raycast(bvh, origin, direction: Tuple[float, float, float], mantissa: int = 6, silent: bool = False) -> List[int]:
topologicpy/Cell.py CHANGED
@@ -3549,8 +3549,9 @@ class Cell():
3549
3549
  sphere = Topology.Translate(sphere, 0, 0, radius)
3550
3550
  elif placement.lower() == "lowerleft":
3551
3551
  sphere = Topology.Translate(sphere, radius, radius, radius)
3552
- sphere = Topology.Orient(sphere, origin=Vertex.Origin(), dirA=[0, 0, 1], dirB=direction)
3553
- sphere = Topology.Place(sphere, originA=Vertex.Origin(), originB=origin)
3552
+
3553
+ if not direction == [0,0,1]:
3554
+ sphere = Topology.Orient(sphere, origin=origin, dirA=[0, 0, 1], dirB=direction)
3554
3555
  return sphere
3555
3556
 
3556
3557
  @staticmethod