From e8c33cbcdda5bd4bc7a5fa4d81b41aee8511a9d9 Mon Sep 17 00:00:00 2001 From: Michael Dawson-Haggerty Date: Wed, 7 Aug 2024 15:01:35 -0400 Subject: [PATCH] hotfix for type hint on reduce_cascade --- trimesh/boolean.py | 12 ++++++------ trimesh/creation.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/trimesh/boolean.py b/trimesh/boolean.py index 05896097a..c0c48c417 100644 --- a/trimesh/boolean.py +++ b/trimesh/boolean.py @@ -8,7 +8,7 @@ import numpy as np from . import exceptions, interfaces -from .typed import Callable, Optional, Sequence +from .typed import Callable, Optional, ArrayLike try: from manifold3d import Manifold, Mesh @@ -18,7 +18,7 @@ def difference( - meshes: Sequence, engine: Optional[str] = None, check_volume: bool = True, **kwargs + meshes: ArrayLike, engine: Optional[str] = None, check_volume: bool = True, **kwargs ): """ Compute the boolean difference between a mesh an n other meshes. @@ -48,7 +48,7 @@ def difference( def union( - meshes: Sequence, engine: Optional[str] = None, check_volume: bool = True, **kwargs + meshes: ArrayLike, engine: Optional[str] = None, check_volume: bool = True, **kwargs ): """ Compute the boolean union between a mesh an n other meshes. @@ -79,7 +79,7 @@ def union( def intersection( - meshes: Sequence, engine: Optional[str] = None, check_volume: bool = True, **kwargs + meshes: ArrayLike, engine: Optional[str] = None, check_volume: bool = True, **kwargs ): """ Compute the boolean intersection between a mesh and other meshes. @@ -108,7 +108,7 @@ def intersection( def boolean_manifold( - meshes: Sequence, + meshes: ArrayLike, operation: str, check_volume: bool = True, **kwargs, @@ -165,7 +165,7 @@ def boolean_manifold( return out_mesh -def reduce_cascade(operation: Callable, items: Sequence): +def reduce_cascade(operation: Callable, items: ArrayLike): """ Call an operation function in a cascaded pairwise way against a flat list of items. diff --git a/trimesh/creation.py b/trimesh/creation.py index 5b0b4ac0b..fb998855d 100644 --- a/trimesh/creation.py +++ b/trimesh/creation.py @@ -1226,7 +1226,7 @@ def axis( axis_length = origin_size * 10.0 # generate a ball for the origin - axis_origin = uv_sphere(radius=origin_size, count=[10, 10]) + axis_origin = icosphere(radius=origin_size) axis_origin.apply_transform(transform) # apply color to the origin ball