class trimesh.path.arc.ArcInfo(radius: float, center: numpy.ndarray[Any, numpy.dtype[numpy.float64]], normal: numpy.ndarray[Any, numpy.dtype[numpy.float64]] | None = None, angles: numpy.ndarray[Any, numpy.dtype[numpy.float64]] | None = None, span: float | None = None)#

Bases: object

__init__(radius: float, center: ndarray[Any, dtype[float64]], normal: ndarray[Any, dtype[float64]] | None = None, angles: ndarray[Any, dtype[float64]] | None = None, span: float | None = None) None#
angles: ndarray[Any, dtype[float64]] | None = None#
center: ndarray[Any, dtype[float64]]#
normal: ndarray[Any, dtype[float64]] | None = None#
radius: float#
span: float | None = None#
trimesh.path.arc.arc_center(points: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], return_normal: bool = True, return_angle: bool = True) ArcInfo#

Given three points on a 2D or 3D arc find the center, radius, normal, and angular span.

  • points ((3, dimension) float) – Points in space, where dimension is either 2 or 3

  • return_normal (bool) – If True calculate the 3D normal unit vector

  • return_angle (bool) – If True calculate the start and stop angle and span


Arc center, radius, and other information.

Return type:


trimesh.path.arc.discretize_arc(points, close=False, scale=1.0)#

Returns a version of a three point arc consisting of line segments.

  • points ((3, d) float) – Points on the arc where d in [2,3]

  • close (boolean) – If True close the arc into a circle

  • scale (float) – What is the approximate overall drawing scale Used to establish order of magnitude for precision


discrete – Connected points in space

Return type:

(m, d) float

trimesh.path.arc.to_threepoint(center, radius, angles=None)#

For 2D arcs, given a center and radius convert them to three points on the arc.

  • center ((2,) float) – Center point on the plane

  • radius (float) – Radius of arc

  • angles ((2,) float) – Angles in radians for start and end angle if not specified, will default to (0.0, pi)


three – Arc control points

Return type:

(3, 2) float