Skip to content

Commit 41a1c48

Browse files
Fek04w1th0utnam3
authored andcommitted
Updated some docstrings
1 parent 3f1955c commit 41a1c48

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

pysplashsurf/pysplashsurf/__init__.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,8 @@ def decimation(
323323
):
324324
"""Barnacle decimation
325325
326+
For details see “Weighted Laplacian Smoothing for Surface Reconstruction of Particle-based Fluids” (Löschner, Böttcher, Jeske, Bender; 2023).
327+
326328
Parameters
327329
----------
328330
mesh: TriMesh3dF32 | TriMesh3dF64 | TriMeshWithDataF32 | TriMeshWithDataF64
@@ -354,8 +356,8 @@ def par_laplacian_smoothing_inplace(
354356
):
355357
"""Laplacian Smoothing with feature weights
356358
357-
Move each vertex towards the mean position of its neighbors.
358-
Factor beta in [0;1] proportional to amount of smoothing (for beta=1 each vertex is placed at the mean position).
359+
Move each vertex towards the mean position of its neighbors.\n
360+
Factor beta in [0;1] proportional to amount of smoothing (for beta=1 each vertex is placed at the mean position).\n
359361
Additionally, feature weights can be specified to apply a varying amount of smoothing over the mesh.
360362
361363
Parameters
@@ -390,7 +392,7 @@ def par_laplacian_smoothing_normals_inplace(
390392
vertex_connectivity: list[list[int]],
391393
iterations: int
392394
):
393-
"""Laplacian Smoothing of the vertex normals
395+
"""Laplacian smoothing of a normal field
394396
395397
Parameters
396398
----------
@@ -420,7 +422,7 @@ def neighborhood_search_spatial_hashing_parallel(
420422
):
421423
"""Performs a neighborhood search (multi-threaded implementation)
422424
423-
Returns the indices of all neighboring particles in the given search radius per particle as a `Vec<Vec<usize>>`.
425+
Returns the indices of all neighboring particles in the given search radius per particle as a `list[list[int]]`.
424426
425427
Parameters
426428
----------
@@ -450,7 +452,7 @@ def check_mesh_consistency(
450452
check_manifold: bool,
451453
debug: bool,
452454
):
453-
"""Check mesh consistency
455+
"""Checks the consistency of the mesh (currently checks for holes, non-manifold edges and vertices) and returns a string with debug information in case of problems
454456
455457
Parameters
456458
----------
@@ -485,12 +487,12 @@ def convert_tris_to_quads(
485487
normal_angle_limit_rad: float,
486488
max_interior_angle: float,
487489
):
488-
"""Converts triangles to quads
490+
"""Merges triangles sharing an edge to quads if they fulfill the given criteria
489491
490492
Parameters
491493
----------
492494
mesh: TriMesh3dF32 | TriMesh3dF64 | TriMeshWithDataF32 | TriMeshWithDataF64
493-
Triangular mesh object
495+
Triangular mesh object\n
494496
When called with a MeshWithData Object, the resulting MixedTriQuadMeshWithData won't inherit the cell attributes from the input.
495497
496498
non_squareness_limit: float
@@ -527,16 +529,16 @@ def reconstruction_pipeline(
527529
compute_normals=False, output_raw_normals=False, output_mesh_smoothing_weights=False, mesh_aabb_clamp_vertices=False,
528530
subdomain_grid=True, subdomain_num_cubes_per_dim=64, aabb_min=None, aabb_max=None, mesh_aabb_min=None, mesh_aabb_max=None
529531
):
530-
"""Surface reconstruction based on particle positions and post-processing
532+
"""Surface reconstruction based on particle positions with subsequent post-processing
531533
532534
Parameters
533535
----------
534536
particles: np.ndarray
535537
2-dimensional array containing all particle positions [[ax, ay, az], [bx, by, bz], ...]
536538
537539
attributes_to_interpolate: dict
538-
Dictionary containing all attributes to interpolate. The keys are the attribute names and the values are the corresponding 1D/2D arrays.
539-
The arrays must have the same length as the number of particles.
540+
Dictionary containing all attributes to interpolate. The keys are the attribute names and the values are the corresponding 1D/2D arrays.\n
541+
The arrays must have the same length as the number of particles. \n
540542
Supported array types are 2D float32/float64 arrays for vector attributes and 1D uint64/float32/float64 arrays for scalar attributes.
541543
542544
particle_radius: float
@@ -561,7 +563,7 @@ def reconstruction_pipeline(
561563
Flag to compute normals using SPH interpolation instead of geometry-based normals.
562564
563565
mesh_smoothing_weights: bool
564-
Flag to compute mesh smoothing weights
566+
Flag to compute mesh smoothing weights\n
565567
This implements the method from “Weighted Laplacian Smoothing for Surface Reconstruction of Particle-based Fluids” (Löschner, Böttcher, Jeske, Bender; 2023).
566568
567569
mesh_smoothing_weights_normalization: float
@@ -574,18 +576,18 @@ def reconstruction_pipeline(
574576
Number of iterations for the normal smoothing
575577
576578
mesh_cleanup: bool
577-
Flag to perform mesh cleanup
579+
Flag to perform mesh cleanup\n
578580
This implements the method from “Compact isocontours from sampled data” (Moore, Warren; 1992)
579581
580582
decimate_barnacles: bool
581-
Flag to perform barnacle decimation
583+
Flag to perform barnacle decimation\n
582584
For details see “Weighted Laplacian Smoothing for Surface Reconstruction of Particle-based Fluids” (Löschner, Böttcher, Jeske, Bender; 2023).
583585
584586
keep_vertices: bool
585587
Flag to keep any vertices without connectivity resulting from mesh cleanup or decimation step
586588
587589
compute_normals: bool
588-
Flag to compute normals
590+
Flag to compute normals\n
589591
If set to True, the normals will be computed and stored in the mesh.
590592
591593
output_raw_normals: bool

0 commit comments

Comments
 (0)