Python Documentation
scikdtree
- class scikdtree.scikdtree.Box(*args, **kwargs)
- clipToVoxel(self, points: collections.abc.Sequence[collections.abc.Sequence[float]]) list[list[float]]
Clips vertices to this box.
- property maxPoint
(self) -> list[float]
- property minPoint
(self) -> list[float]
- rayBoxIntersection(self, origin: collections.abc.Sequence[float], inverseRay: collections.abc.Sequence[float]) tuple[float, float]
Calculates the intersection points of a ray and a box.
- splitBox(self, plane: scikdtree.scikdtree.Plane) tuple[scikdtree.scikdtree.Box, scikdtree.scikdtree.Box]
Splits this box into two new boxes.
- surfaceArea(self) float
Calculates the surface area of a box.
- class scikdtree.scikdtree.GeometryObject
- vertex_indices(self) list[int]
Get the indices of the corner vertices.
- vertices(self) list[list[float]]
Get the corner vertices of the geometry object.
- class scikdtree.scikdtree.KDTree(*args, **kwargs)
- countIntersections(self, origin: collections.abc.Sequence[float], ray: collections.abc.Sequence[float]) int
Count intersections of a ray with the KDTree.
- geometry(self) collections.abc.Iterator[scikdtree.scikdtree.GeometryObject]
Get the geometry objects of the KDTree.
- getIntersections(self, origin: collections.abc.Sequence[float], ray: collections.abc.Sequence[float]) list[list[float]]
Get intersection points of a ray with the KDTree.
- planes(self) collections.abc.Iterator[tuple[scikdtree.scikdtree.Plane, scikdtree.scikdtree.Box]]
Iterate over the planes in the KDTree.
- prebuildTree(self) scikdtree.scikdtree.KDTree
Prebuild the KDTree for faster queries.
- printTree(self) None
Print the KDTree structure.
- set_loglevel = <nanobind.nb_func object>
- class scikdtree.scikdtree.LogLevel(*values)
- CRITICAL = 5
- DEBUG = 1
- ERR = 4
- INFO = 2
- OFF = 6
- TRACE = 0
- WARN = 3
- class scikdtree.scikdtree.Plane(*args, **kwargs)
- property axisCoordinate
(self) -> float
- normal(self, returnFlipped: bool = False) list[float]
Returns the normal vector for this plane.
- property orientation
(self) -> scikdtree.scikdtree.Direction
- originPoint(self) list[float]
Returns the origin point of the plane.
- rayPlaneIntersection(self, origin: collections.abc.Sequence[float], inverseRay: collections.abc.Sequence[float]) float
Intersects a ray with the plane.
- class scikdtree.scikdtree.PlaneSelectionAlgorithm(*values)
- LOG = 3
- LOGSQUARED = 2
- NOTREE = 0
- QUADRATIC = 1
- scikdtree.plotting.plot_kd_tree(kdtree: KDTree, title: str = 'KDTree', outpath: str = None, show_gui: bool = False, print_to_stdout: bool = True) Figure
Plots a 3d KD-Tree using matplotlib
- Parameters:
show_gui – Shows the resulting plot in a gui. Attention: this blocks the program until the plot window is closed.
print_to_stdout – If True, prints the progress of plotting to stdout. Otherwise compute silent. Useful for keeping logs clean.
title – Sets the title of the plot
outpath – Where to save the resulting plot. If None, the plot will not be saved.
kdtree (KDTree) – The KDTree to plot
- Returns:
The resulting matplotlib figure
- Return type:
plt.Figure