Arc

class compas.geometry.Arc(frame=None, radius=None, end_angle=None, start_angle=None, **kwargs)[source]

Bases: Primitive

Represents a portion of a circle’s arc.

Parameters
  • frame (Frame) – Coordinate frame at the center of the arc’s circle.

  • radius (float) – Radius of the arc’s circle.

  • end_angle (float) – The angle in radians of the end of this Arc.

  • start_angle – The angle in radians of the start of this Arc.

Attributes
  • length (float) – The length of the arc (radius * angle)

  • angle (float) – The sweep angle in radians (between incrementing end angle and start angle).

  • domain (tuple(float, float)) – A tuple containing the start and end angles of this arc, in radians.

  • center (Point) – The center point of the circle which coincides with this Arc.

  • circumference (float) – The circumference of the circle which coincides with this Arc.

  • diameter (float) – The diameter of the circle which coincides with this Arc.

Methods

from_circle

Creates an Arc from a circle and start and end angles.

Inherited Methods

ToString

Converts the instance to a string.

copy

Make an independent copy of the data object.

from_data

Construct an object of this type from the provided data.

from_json

Construct an object from serialized data contained in a JSON file.

from_jsonstring

Construct an object from serialized data contained in a JSON string.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_data

Convert an object to its native data representation.

to_json

Serialize the data representation of an object to a JSON file.

to_jsonstring

Serialize the data representation of an object to a JSON string.

transform

Transform the geometry.

transformed

Returns a transformed copy of this geometry.

validate_data

Validate the object's data against its data schema.

validate_json

Validate the object's data against its json schema.