From 47ee1a89718442dd80969d6de752c9fe01dcc516 Mon Sep 17 00:00:00 2001 From: mmporong Date: Wed, 28 Oct 2026 11:07:38 +0900 Subject: [PATCH] Fix parameter names in three compas.geometry docstrings - Shear.from_entries: the argument is shear_entries, not shear_factors. - Polyline.split_by_length: remove the tol entry; the method has no tol argument (the docstring was copied from divide_by_length). - trimesh_gradient_numpy: the function takes one argument M = (V, F), not separate V and F arguments. --- CHANGELOG.md | 1 + src/compas/geometry/curves/polyline.py | 2 -- src/compas/geometry/shear.py | 2 +- src/compas/geometry/trimesh_gradient_numpy.py | 6 ++---- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec62de4c1632..4c24f03db714 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Changed `angle_vectors_projected` to raise `ValueError` when an input vector is parallel to projection normal. * Changed `angle_vectors` to raise `ValueError` when one of the input vectors is a zero-length vector instead of returning 0. * Changed `transformation_to_rhino` and `transformation_matrix_to_rhino` to assign the matrix components directly to the fields of `Rhino.Geometry.Transform` instead of looping over its indexer. About 11x faster per conversion, noticable when used inside an animation loop. +* Fixed the parameter names in the docstrings of `Shear.from_entries`, `Polyline.split_by_length` and `trimesh_gradient_numpy`. ### Removed diff --git a/src/compas/geometry/curves/polyline.py b/src/compas/geometry/curves/polyline.py index 37303e0c8433..8cb860109cc4 100644 --- a/src/compas/geometry/curves/polyline.py +++ b/src/compas/geometry/curves/polyline.py @@ -527,8 +527,6 @@ def split_by_length(self, length, strict=True): Length of the segments. strict : bool, optional If False, the remainder segment will be added even if it is smaller than the desired length - tol : float, optional - Floating point error tolerance. Returns ------- diff --git a/src/compas/geometry/shear.py b/src/compas/geometry/shear.py index 7de59bdc469e..7670fd20eb89 100644 --- a/src/compas/geometry/shear.py +++ b/src/compas/geometry/shear.py @@ -98,7 +98,7 @@ def from_entries(cls, shear_entries): Parameters ---------- - shear_factors : [float, float, float] + shear_entries : [float, float, float] The 3 shear factors for x-y, x-z, and y-z axes. Returns diff --git a/src/compas/geometry/trimesh_gradient_numpy.py b/src/compas/geometry/trimesh_gradient_numpy.py index 7987686fa4e4..a62429103ebb 100644 --- a/src/compas/geometry/trimesh_gradient_numpy.py +++ b/src/compas/geometry/trimesh_gradient_numpy.py @@ -11,10 +11,8 @@ def trimesh_gradient_numpy(M, rtype="array"): Parameters ---------- - V : array - Vertex coordinates of the mesh. - F : array - Face vertex indices of the mesh. + M : tuple[array, array] + A mesh represented by an array of vertex coordinates and an array of face vertex indices. rtype : {'array', 'csc', 'csr', 'coo', 'list'} Format of the result.