API Overview

The main functionality of pysplashsurf is provided by the reconstruction_pipeline() function which implements all features of the splashsurf CLI including the surface reconstruction from particles and optional post-processing, and the reconstruct_surface() function which only performs the surface reconstruction itself.

Data types: The functions of the package accept Python float for scalar parameters and Numpy arrays of data-type np.float32 or np.float64 for array inputs (e.g. particle positions). Outputs will be of the same float precision as the input arrays. Array-like inputs have to be contiguous (C-order) in memory. All array-like and object type (e.g. Aabb3d) inputs to a function call have to use the same float data-type.

Functions

barnacle_decimation(mesh, *, keep_vertices)

Performs specialized decimation on the given mesh to prevent "barnacles" when applying weighted Laplacian smoothing

check_mesh_consistency(mesh, grid, *[, ...])

Checks the consistency of a reconstructed surface mesh (watertightness, manifoldness), optionally returns a string with details if problems are found

convert_tris_to_quads(mesh, *[, ...])

Converts triangles to quads by merging triangles sharing an edge if they fulfill the given criteria

laplacian_smoothing_normals_parallel(...)

Laplacian smoothing of a normal field

laplacian_smoothing_parallel(mesh, ...[, beta])

Laplacian smoothing of mesh vertices with feature weights

marching_cubes(values, *, ...[, ...])

Performs a standard marching cubes triangulation of a 3D array of values

marching_cubes_cleanup(mesh, grid, *[, ...])

Performs simplification on the given mesh inspired by the "Compact Contouring"/"Mesh displacement" approach by Doug Moore and Joe Warren

neighborhood_search_spatial_hashing_parallel(...)

Performs a neighborhood search using spatial hashing (multithreaded implementation)

reconstruct_surface(particles, *, ...[, ...])

Performs a surface reconstruction from the given particles without additional post-processing

reconstruction_pipeline(particles, *[, ...])

Runs the surface reconstruction pipeline for the given particle positions with optional post-processing

Classes

Aabb3d()

Three-dimensional axis-aligned bounding box defined by its minimum and maximum corners

MeshAttribute()

MeshWithData(mesh)

Mesh with attached point and cell attributes

MixedTriQuadMesh3d()

Mixed triangle and quad surface mesh in 3D

NeighborhoodLists()

Per particle neighborhood lists

SphInterpolator(particle_positions, ...)

Interpolator of per-particle quantities to arbitrary points using SPH interpolation (with cubic kernel)

SurfaceReconstruction()

Result returned by surface reconstruction functions with surface mesh and other data

TriMesh3d()

Triangle surface mesh in 3D

UniformGrid()

Struct containing the parameters of the uniform grid used for the surface reconstruction

VertexVertexConnectivity()

Vertex-vertex connectivity of a mesh

Enums

MeshType()

Enum specifying the type of mesh wrapped by a MeshWithData