polylidar.Polylidar3D¶
- class polylidar.Polylidar3D¶
This class handles all data inputs: 2D points sets, 3D point clouds, 3D meshes. Will extract polygons from data.
- __init__(self, alpha=0.0, lmax=1.0, min_triangles=20, min_hole_vertices=3, z_thresh=0.0, norm_thresh=0.9, norm_thresh_min=0.9, task_threads=4)¶
Constructs a Polylidar3D object.
- Parameters
alpha (float, optional, default=0.0) – Maximum circumcircle radius of a triangle. Filters ‘big’ triangles. Only applicable for 2D point sets. A value of 0.0 makes this parameter ignored.
lmax (float, optional, default=1.0) – Maximum triangle edge length of a triangle in a planar segment. Filters ‘big’ triangles.
min_triangles (int, optional, default=20) – Minimum number of triangles in a planar triangle segment. Filters small planar segments very fast.
min_hole_vertices (int, optional, default=3) – Minimum number of vertices for a hole in a polygon. Filters small holes very fast.
z_thresh (float, optional, default=0.0) – Maximum point to plane distance during region growing (3D only). Forces planarity constraints. A value of 0.0 ignores this constraint.
norm_thresh (float, optional, default=0.9) – IGNORE - will be deprecated or repurposed (3D only)
norm_thresh_min (float, optional, default=0.9) – Minimum value of the dot product between a triangle and surface normal being extracted. Forces planarity constraint.
task_threads (int, optional, default=4) – Number of task threads that can be spawned.
- Returns
None
- extract_planes_and_polygons(*args, **kwargs)¶
Overloaded function.
extract_planes_and_polygons(self: polylidar_pybind.Polylidar3D, points: polylidar_pybind.MatrixDouble, plane_normal: List[float[3]] = [0.0, 0.0, 1.0]) -> Tuple[polylidar_pybind.HalfEdgeTriangulation, List[polylidar_pybind.VectorULongInt], List[polylidar_pybind.Polygon]]
Extract Planes and Polygons from a 2D point sets or unorganized 3D point clouds. Uses 2D Delaunay triangulation for 2D point sets. Uses 2.5 Delaunay triangulation for 3D point clouds. Only send 3D point clouds whose desired surface for extraction is already aligned with the XY Plane (e.g., airborne LiDAR point clouds)
extract_planes_and_polygons(self: polylidar_pybind.Polylidar3D, mesh: polylidar_pybind.HalfEdgeTriangulation, plane_normal: List[float[3]] = [0.0, 0.0, 1.0]) -> Tuple[List[polylidar_pybind.VectorULongInt], List[polylidar_pybind.Polygon]]
Extracts planes and polygons from a half-edge triangular mesh given a plane normal
extract_planes_and_polygons(self: polylidar_pybind.Polylidar3D, mesh: polylidar_pybind.HalfEdgeTriangulation, plane_normals: polylidar_pybind.MatrixDouble) -> Tuple[List[List[polylidar_pybind.VectorULongInt]], List[List[polylidar_pybind.Polygon]]]
Extracts planes and polygons from a half-edge triangular mesh given multiple dominant plane normals.
- extract_planes_and_polygons_optimized(*args, **kwargs)¶
Overloaded function.
extract_planes_and_polygons_optimized(self: polylidar_pybind.Polylidar3D, mesh: polylidar_pybind.HalfEdgeTriangulation, plane_normal: List[float[3]] = [0.0, 0.0, 1.0]) -> Tuple[List[polylidar_pybind.VectorULongInt], List[polylidar_pybind.Polygon]]
Extracts planes and polygons from a half-edge triangular mesh given a plane normal and makes use of task-based parallelism
extract_planes_and_polygons_optimized(self: polylidar_pybind.Polylidar3D, mesh: polylidar_pybind.HalfEdgeTriangulation, plane_normals: polylidar_pybind.MatrixDouble) -> Tuple[List[List[polylidar_pybind.VectorULongInt]], List[List[polylidar_pybind.Polygon]]]
Extracts planes and polygons from a half-edge triangular mesh given multiple dominant plane normals. Uses task-based parallelism.
- extract_planes_and_polygons_optimized_classified(self: polylidar_pybind.Polylidar3D, mesh: polylidar_pybind.HalfEdgeTriangulation, plane_normals: polylidar_pybind.MatrixDouble) Tuple[List[List[polylidar_pybind.VectorULongInt]], List[List[polylidar_pybind.Polygon]]] ¶
Extracts planes and polygons from a classified half-edge triangular mesh given multiple dominant plane normals. Uses task-based parallelism.
- extract_tri_set(self, mesh, plane_normals)¶
Extract the triangle set (dominant planar grouping) for each triangle. This is used for debugging/visualization.
- Parameters
plane_normals (polylidar_pybind.MatrixDouble) –
- Returns
polylidar_pybind.VectorUInt8
- property alpha¶
Maximum circumcircle radius of a triangle. Filters ‘big’ triangles. Only applicable for 2D point sets.
- property lmax¶
Maximum triangle edge length of a triangle in a planar segment. Filters ‘big’ triangles.
- property min_hole_vertices¶
Minimum number of vertices for a hole in a polygon. Filters small holes very fast.
- property min_triangles¶
Minimum number of triangles in a planar triangle segment. Filters small planar segments very fast.
- property norm_thresh¶
IGNORE - will be deprecated or repurposed (3D only)
- property norm_thresh_min¶
Minimum value of the dot product between a triangle and surface normal being extracted. Forces planar constraints.
- property z_thresh¶
Maximum point to plane distance during region growing (3D only). Forces planarity constraints. A value of 0.0 disables this constraint.