Skip to content

Commit 02fc0de

Browse files
committed
Py: Documentation fixes
1 parent f2a36b5 commit 02fc0de

4 files changed

Lines changed: 33 additions & 41 deletions

File tree

pysplashsurf/pysplashsurf/docs/source/api.rst

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,34 @@ Functions
1414
---------
1515

1616
.. autosummary::
17+
barnacle_decimation
1718
check_mesh_consistency
1819
convert_tris_to_quads
19-
create_aabb_object
20-
create_aabb_object_from_points
21-
create_mesh_with_data_object
22-
create_sph_interpolator_object
23-
decimation
20+
laplacian_smoothing_normals_parallel
21+
laplacian_smoothing_parallel
2422
marching_cubes_cleanup
2523
neighborhood_search_spatial_hashing_parallel
26-
par_laplacian_smoothing_inplace
27-
par_laplacian_smoothing_normals_inplace
2824
reconstruct_surface
2925
reconstruction_pipeline
30-
write_to_file
26+
triangulate_density_map
3127

3228
Classes
3329
-------
3430

3531
.. autosummary::
3632
Aabb3d
33+
MeshAttribute
3734
MeshWithData
3835
MixedTriQuadMesh3d
3936
NeighborhoodLists
4037
SphInterpolator
4138
SurfaceReconstruction
4239
TriMesh3d
43-
TriMeshWithData
4440
UniformGrid
45-
VertexVertexConnectivity
41+
VertexVertexConnectivity
42+
43+
Enums
44+
-----
45+
46+
.. autosummary::
47+
MeshType

pysplashsurf/pysplashsurf/docs/source/functions.rst

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,22 @@ All functions infer float precision based on the input (``np.float32`` or ``np.f
55

66
.. currentmodule:: pysplashsurf
77

8+
.. autofunction:: barnacle_decimation
9+
810
.. autofunction:: check_mesh_consistency
911

1012
.. autofunction:: convert_tris_to_quads
1113

12-
.. autofunction:: create_aabb_object
13-
14-
.. autofunction:: create_aabb_object_from_points
15-
16-
.. autofunction:: create_mesh_with_data_object
17-
18-
.. autofunction:: create_sph_interpolator_object
14+
.. autofunction:: laplacian_smoothing_normals_parallel
1915

20-
.. autofunction:: decimation
16+
.. autofunction:: laplacian_smoothing_parallel
2117

2218
.. autofunction:: marching_cubes_cleanup
2319

2420
.. autofunction:: neighborhood_search_spatial_hashing_parallel
2521

26-
.. autofunction:: par_laplacian_smoothing_inplace
27-
28-
.. autofunction:: par_laplacian_smoothing_normals_inplace
29-
3022
.. autofunction:: reconstruct_surface
3123

3224
.. autofunction:: reconstruction_pipeline
3325

34-
.. autofunction:: reconstruction_pipeline_multi
35-
36-
.. autofunction:: write_to_file
26+
.. autofunction:: triangulate_density_map

pysplashsurf/pysplashsurf/pysplashsurf.pyi

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class MeshWithData:
8484
@property
8585
def mesh(self) -> typing.Union[TriMesh3d, MixedTriQuadMesh3d]:
8686
r"""
87-
The contained mesh without associated data and attributes
87+
The wrapped mesh without associated data and attributes
8888
"""
8989
@property
9090
def point_attributes(self) -> dict[str, numpy.typing.NDArray]:
@@ -102,7 +102,7 @@ class MeshWithData:
102102
"""
103103
def copy_mesh(self) -> typing.Union[TriMesh3d, MixedTriQuadMesh3d]:
104104
r"""
105-
Returns a copy of the contained mesh without associated data and attributes
105+
Returns a copy of the wrapped mesh without associated data and attributes
106106
"""
107107
def copy(self) -> MeshWithData:
108108
r"""
@@ -132,7 +132,7 @@ class MeshWithData:
132132
"""
133133
def write_to_file(self, path:builtins.str | os.PathLike | pathlib.Path, *, file_format:typing.Optional[builtins.str]='vtk42') -> None:
134134
r"""
135-
Writes the mesh and its attributes to a file using `meshio.write_points_cells`
135+
Writes the mesh and its attributes to a file using ``meshio.write_points_cells``
136136
"""
137137

138138
class MixedTriQuadMesh3d:
@@ -163,7 +163,7 @@ class MixedTriQuadMesh3d:
163163
"""
164164
def write_to_file(self, path:builtins.str | os.PathLike | pathlib.Path, *, file_format:typing.Optional[builtins.str]='vtk42') -> None:
165165
r"""
166-
Writes the mesh to a file using `meshio.write_points_cells`
166+
Writes the mesh to a file using ``meshio.write_points_cells``
167167
"""
168168

169169
class NeighborhoodLists:
@@ -263,7 +263,7 @@ class TriMesh3d:
263263
"""
264264
def write_to_file(self, path:builtins.str | os.PathLike | pathlib.Path, *, file_format:typing.Optional[builtins.str]='vtk42') -> None:
265265
r"""
266-
Writes the mesh to a file using `meshio.write_points_cells`
266+
Writes the mesh to a file using ``meshio.write_points_cells``
267267
"""
268268

269269
class UniformGrid:
@@ -278,16 +278,16 @@ class VertexVertexConnectivity:
278278
"""
279279
def copy_connectivity(self) -> builtins.list[builtins.list[builtins.int]]:
280280
r"""
281-
Returns a copy of the contained connectivity data
281+
Returns a copy of the wrapped connectivity data
282282
"""
283283
def take_connectivity(self) -> builtins.list[builtins.list[builtins.int]]:
284284
r"""
285-
Returns the contained connectivity data by moving it out of this object (zero copy)
285+
Returns the wrapped connectivity data by moving it out of this object (zero copy)
286286
"""
287287

288288
class MeshType(Enum):
289289
r"""
290-
Enum specifying the type of mesh contained in a `MeshWithData`
290+
Enum specifying the type of mesh wrapped by a ``MeshWithData``
291291
"""
292292
Tri3d = ...
293293
r"""

pysplashsurf/src/mesh.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ impl PyVertexVertexConnectivity {
7676
#[gen_stub_pymethods]
7777
#[pymethods]
7878
impl PyVertexVertexConnectivity {
79-
/// Returns a copy of the contained connectivity data
79+
/// Returns a copy of the wrapped connectivity data
8080
pub fn copy_connectivity(&self) -> Vec<Vec<usize>> {
8181
self.connectivity.clone()
8282
}
8383

84-
/// Returns the contained connectivity data by moving it out of this object (zero copy)
84+
/// Returns the wrapped connectivity data by moving it out of this object (zero copy)
8585
pub fn take_connectivity(&mut self) -> Vec<Vec<usize>> {
8686
// TODO: Check if this is actually zero-copy with the conversion to Python lists
8787
std::mem::take(&mut self.connectivity)
@@ -205,7 +205,7 @@ impl PyTriMesh3d {
205205
PyVertexVertexConnectivity::new(connectivity)
206206
}
207207

208-
/// Writes the mesh to a file using `meshio.write_points_cells`
208+
/// Writes the mesh to a file using ``meshio.write_points_cells``
209209
#[pyo3(signature = (path, *, file_format = Some("vtk42")))]
210210
pub fn write_to_file<'py>(
211211
this: Bound<'py, Self>,
@@ -304,7 +304,7 @@ impl PyMixedTriQuadMesh3d {
304304
})
305305
}
306306

307-
/// Writes the mesh to a file using `meshio.write_points_cells`
307+
/// Writes the mesh to a file using ``meshio.write_points_cells``
308308
#[pyo3(signature = (path, *, file_format = Some("vtk42")))]
309309
pub fn write_to_file<'py>(
310310
this: Bound<'py, Self>,
@@ -336,7 +336,7 @@ where
336336
Ok(pyarray)
337337
}
338338

339-
/// Enum specifying the type of mesh contained in a `MeshWithData`
339+
/// Enum specifying the type of mesh wrapped by a ``MeshWithData``
340340
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
341341
#[gen_stub_pyclass_enum]
342342
#[pyclass]
@@ -644,7 +644,7 @@ impl PyMeshWithData {
644644
}
645645
}
646646

647-
/// The contained mesh without associated data and attributes
647+
/// The wrapped mesh without associated data and attributes
648648
#[getter]
649649
#[gen_stub(override_return_type(type_repr="typing.Union[TriMesh3d, MixedTriQuadMesh3d]", imports=()))]
650650
pub fn mesh<'py>(&self, py: Python<'py>) -> Py<PyAny> {
@@ -686,7 +686,7 @@ impl PyMeshWithData {
686686
.into_py_dict(py)
687687
}
688688

689-
/// Returns a copy of the contained mesh without associated data and attributes
689+
/// Returns a copy of the wrapped mesh without associated data and attributes
690690
#[gen_stub(override_return_type(type_repr="typing.Union[TriMesh3d, MixedTriQuadMesh3d]", imports=()))]
691691
pub fn copy_mesh<'py>(&self, py: Python<'py>) -> PyResult<Bound<'py, PyAny>> {
692692
match &self.mesh {
@@ -795,7 +795,7 @@ impl PyMeshWithData {
795795
Ok(())
796796
}
797797

798-
/// Writes the mesh and its attributes to a file using `meshio.write_points_cells`
798+
/// Writes the mesh and its attributes to a file using ``meshio.write_points_cells``
799799
#[pyo3(signature = (path, *, file_format = Some("vtk42")))]
800800
pub fn write_to_file<'py>(
801801
this: Bound<'py, Self>,

0 commit comments

Comments
 (0)