trimesh.path.arc.arc_center(points, return_normal=True, return_angle=True)

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



Contains arc center and other keys:

’center’ : (d,) float, cartesian center of the arc ‘radius’ : float, radius of the arc ‘normal’ : (3,) float, the plane normal. ‘angles’ : (2,) float, angle of start and end in radians ‘span’ : float, angle swept by the arc in radians

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