Python bindings for splashsurf, a surface reconstruction library for SPH simulations.
Low maintenance activity. Last release 8 months ago, commits in 1 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install pysplashsurfpySplashsurf
pySplashsurf provides Python bindings for splashsurf, an open source surface reconstruction library for particle data from SPH simulations.
Detailed information on the surface reconstruction and library itself and its API can be found on the project website (splashsurf.physics-simulation.org) or the main repository.
Installation
Requires Python version 3.10+
pip install pysplashsurf
To install pysplashsurf with meshio support (which adds some additional IO functionality), use
pip install pysplashsurf[meshio]
This will add support for the .bgeo file extension to meshio, so that particle data in the BGEOV format can be read using meshio.
Meshio is also required for the write_to_file method from the bindings to work.
The rest of the package, including the CLI, will still work even if meshio is not installed.
Usage
pySplashsurf can either be used as a library in Python scripts or as a command line tool that provides the same interface as the original Rust splashsurf CLI itself.
CLI
To use the CLI, you can use the pysplashsurf command after installing the package:
pysplashsurf --help
For example, to reconstruct a surface from particle data in a VTK file with some smoothing:
pysplashsurf reconstruct particles.vtk -r=0.025 -l=2.0 -c=0.5 -t=0.6 --mesh-smoothing-weights=on --mesh-smoothing-iters=15 --normals=on --normals-smoothing-iters=10
For more information on the CLI and its arguments, refer to the splashsurf documentation.
Library
Example to reconstruct the surface from an input file, apply some post-processing methods and write the data back to a file: