AlphaShape#

class AlphaShape(mesh, repair=True)[source]#

Bases: TriangularMesh

Attributes

Methods

AlphaShape.fit(positions[, voxel_size, ...])

Alpha shape surface reconstruction.

classmethod fit(positions, voxel_size=1, alpha=1, target_edge_length=-1, smoothness=0.0, curvature_weight=0.0, pressure=0.0, boundary_ring=0, **kwargs)[source]#

Alpha shape surface reconstruction.

Parameters:
positionsnp.ndarray

Point coordinates with shape (n, 3).

voxel_sizefloat

Sampling rate of the input point cloud.

alphafloat

Alpha-shape parameter. Larger values yield coarser features. 1 produces a convex hull.

target_edge_lengthfloat

Target edge length for remeshing before fairing. -1 uses the average edge length of the mesh.

smoothnessfloat

Controls the balance between position anchoring and curvature minimization. 0 = vertices stay in place, 1 = full curvature minimization.

curvature_weightfloat

Weight for triharmonic (higher-order smoothing) energy.

pressurefloat

Internal mesh pressure along vertex normals.

boundary_ringint

Number of vertex rings around inferred vertices to include in fairing.

Returns:
AlphaShape

Reconstructed surface mesh.