Ellipse#

class ansys.geometry.core.shapes.curves.ellipse.Ellipse(origin: beartype.typing.Union[numpy.ndarray, ansys.geometry.core.typing.RealSequence, ansys.geometry.core.math.point.Point3D], major_radius: beartype.typing.Union[pint.Quantity, ansys.geometry.core.misc.measurements.Distance, ansys.geometry.core.typing.Real], minor_radius: beartype.typing.Union[pint.Quantity, ansys.geometry.core.misc.measurements.Distance, ansys.geometry.core.typing.Real], reference: beartype.typing.Union[numpy.ndarray, ansys.geometry.core.typing.RealSequence, ansys.geometry.core.math.vector.UnitVector3D, ansys.geometry.core.math.vector.Vector3D] = UNITVECTOR3D_X, axis: beartype.typing.Union[numpy.ndarray, ansys.geometry.core.typing.RealSequence, ansys.geometry.core.math.vector.UnitVector3D, ansys.geometry.core.math.vector.Vector3D] = UNITVECTOR3D_Z)#

Bases: ansys.geometry.core.shapes.curves.curve.Curve

Provides 3D ellipse representation.

Parameters:
originUnion[ndarray, RealSequence, Point3D]

Origin of the ellipse.

major_radiusUnion[Quantity, Distance, Real]

Major radius of the ellipse.

minor_radiusUnion[Quantity, Distance, Real]

Minor radius of the ellipse.

referenceUnion[ndarray, RealSequence, UnitVector3D, Vector3D]

X-axis direction.

axisUnion[ndarray, RealSequence, UnitVector3D, Vector3D]

Z-axis direction.

Overview#

contains_param

Check a parameter is within the parametric range of the curve.

contains_point

Check a point is contained by the curve.

mirrored_copy

Create a mirrored copy of the ellipse along the y-axis.

evaluate

Evaluate the ellipse at the given parameter.

project_point

Project a point onto the ellipse and evaluate the ellipse.

is_coincident_ellipse

Determine if this ellipse is coincident with another.

transformed_copy

Create a transformed copy of the ellipse from a transformation matrix.

parameterization

Get the parametrization of the ellipse.

origin

Origin of the ellipse.

major_radius

Major radius of the ellipse.

minor_radius

Minor radius of the ellipse.

dir_x

X-direction of the ellipse.

dir_y

Y-direction of the ellipse.

dir_z

Z-direction of the ellipse.

eccentricity

Eccentricity of the ellipse.

linear_eccentricity

Linear eccentricity of the ellipse.

semi_latus_rectum

Semi-latus rectum of the ellipse.

perimeter

Perimeter of the ellipse.

area

Area of the ellipse.

__eq__

Equals operator for the Ellipse class.

Import detail#

from ansys.geometry.core.shapes.curves.ellipse import Ellipse

Property detail#

property Ellipse.origin: ansys.geometry.core.math.point.Point3D#

Origin of the ellipse.

property Ellipse.major_radius: pint.Quantity#

Major radius of the ellipse.

property Ellipse.minor_radius: pint.Quantity#

Minor radius of the ellipse.

property Ellipse.dir_x: ansys.geometry.core.math.vector.UnitVector3D#

X-direction of the ellipse.

property Ellipse.dir_y: ansys.geometry.core.math.vector.UnitVector3D#

Y-direction of the ellipse.

property Ellipse.dir_z: ansys.geometry.core.math.vector.UnitVector3D#

Z-direction of the ellipse.

property Ellipse.eccentricity: ansys.geometry.core.typing.Real#

Eccentricity of the ellipse.

property Ellipse.linear_eccentricity: pint.Quantity#

Linear eccentricity of the ellipse.

Notes

The linear eccentricity is the distance from the center to the focus.

property Ellipse.semi_latus_rectum: pint.Quantity#

Semi-latus rectum of the ellipse.

property Ellipse.perimeter: pint.Quantity#

Perimeter of the ellipse.

property Ellipse.area: pint.Quantity#

Area of the ellipse.

Method detail#

Ellipse.__eq__(other: Ellipse) bool#

Equals operator for the Ellipse class.

Ellipse.mirrored_copy() Ellipse#

Create a mirrored copy of the ellipse along the y-axis.

Returns:
Ellipse

New ellipse that is a mirrored copy of the original ellipse.

Ellipse.evaluate(parameter: ansys.geometry.core.typing.Real) EllipseEvaluation#

Evaluate the ellipse at the given parameter.

Parameters:
parameterReal

Parameter to evaluate the ellipse at.

Returns:
EllipseEvaluation

Resulting evaluation.

Ellipse.project_point(point: ansys.geometry.core.math.point.Point3D) EllipseEvaluation#

Project a point onto the ellipse and evaluate the ellipse.

Parameters:
pointPoint3D

Point to project onto the ellipse.

Returns:
EllipseEvaluation

Resulting evaluation.

Ellipse.is_coincident_ellipse(other: Ellipse) bool#

Determine if this ellipse is coincident with another.

Parameters:
otherEllipse

Ellipse to determine coincidence with.

Returns:
bool

True if this ellipse is coincident with the other, False otherwise.

Ellipse.transformed_copy(matrix: ansys.geometry.core.math.matrix.Matrix44) Ellipse#

Create a transformed copy of the ellipse from a transformation matrix.

Parameters:
matrixMatrix44

4x4 transformation matrix to apply to the ellipse.

Returns:
Ellipse

New ellipse that is the transformed copy of the original ellipse.

Ellipse.parameterization() ansys.geometry.core.shapes.parameterization.Parameterization#

Get the parametrization of the ellipse.

The parameter of an ellipse specifies the clockwise angle around the axis (right-hand corkscrew law), with a zero parameter at dir_x and a period of 2*pi.

Returns:
Parameterization

Information about how the ellipse is parameterized.

abstract Ellipse.contains_param(param: ansys.geometry.core.typing.Real) bool#

Check a parameter is within the parametric range of the curve.

abstract Ellipse.contains_point(point: ansys.geometry.core.math.point.Point3D) bool#

Check a point is contained by the curve.

The point can either lie within the curve or on its boundary.