Skip to content

Commit

Permalink
hotfix for type hint on reduce_cascade
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedh committed Aug 7, 2024
1 parent 0166cdb commit e8c33cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions trimesh/boolean.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -108,7 +108,7 @@ def intersection(


def boolean_manifold(
meshes: Sequence,
meshes: ArrayLike,
operation: str,
check_volume: bool = True,
**kwargs,
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion trimesh/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e8c33cb

Please sign in to comment.