Ellipse
- class compas.geometry.Ellipse(plane, major, minor, **kwargs)[source]
Bases:
Primitive
A ellipse is defined by a plane and a major and minor axis.
- Parameters
plane ([point, vector] |
Plane
) – The plane of the ellipse.major (float) – The major of the ellipse.
minor (float) – The minor of the ellipse.
- Attributes
plane (
Plane
) – The plane of the ellipse.major (float) – The major of the ellipse.
minor (float) – The minor of the ellipse.
normal (
Vector
, read-only) – The normal of the ellipse.center (
Point
, read-only) – The center of the ellipse.area (float, read-only) – The area of the ellipse.
circumference (float, read-only) – The circumference of the ellipse.
Examples
>>> from compas.geometry import Plane >>> from compas.geometry import Ellipse >>> plane = Plane([0, 0, 0], [0, 0, 1]) >>> ellipse = Ellipse(plane, 2, 1)
Methods
Construct a ellipse from its data representation.
Transform the ellipse.
Inherited Methods
Converts the instance to a string.
Make an independent copy of the data object.
Construct an object from serialized data contained in a JSON file.
Construct an object from serialized data contained in a JSON string.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Convert an object to its native data representation.
Serialize the data representation of an object to a JSON file.
Serialize the data representation of an object to a JSON string.
Returns a transformed copy of this geometry.
Validate the object's data against its data schema.
Validate the object's data against its json schema.