@mlightcad/geometry-engine
Version:
The geometry-engine package provides comprehensive geometric entities, mathematical operations, and transformations for 2D and 3D space. This package mimics AutoCAD ObjectARX's AcGe (Geometry) classes and provides the mathematical foundation for CAD opera
105 lines • 4.11 kB
TypeScript
import { AcGeBox2d, AcGeMatrix2d, AcGePoint2d, AcGePoint3d, AcGePointLike } from '../math';
import { AcGeCurve2d } from './AcGeCurve2d';
/**
* Class representing a 3d ellipse arc defined by center, normal, majorAxis, majorAxisRadius,
* minorAxisRadius, startAngle, and endAngle.
* - The majorAxis vector represents half the major axis of the ellipse (that is, from the center
* point to the start point of the ellipse) and is the zero angle for startAngle and endAngle.
* - Positive angles are counter-clockwise when looking down the normal vector (that is, right-hand
* rule). A startAngle of 0 and endAngle of 2pi will produce a closed Ellipse.
* - If startAngle is equal to 0 and endAngle is equal to 2 * Math.PI, it represents a full 3d ellipse.
*/
export declare class AcGeEllipseArc2d extends AcGeCurve2d {
private _center;
private _majorAxisRadius;
private _minorAxisRadius;
private _startAngle;
private _endAngle;
private _clockwise;
private _rotation;
/**
* Construct an instance of the ellipse arc.
* @param center Center point of the ellipse.
* @param majorAxisRadius Major axis radius of the ellipse.
* @param minorAxisRadius Minor axis radius of the ellipse.
* @param startAngle Start angle of the ellipse arc in radians.
* @param endAngle End angle of the ellipse arc in radians.
* @param clockwise The flag Whether the ellipse arc is drawn clockwise. Default is false.
* @param rotation The rotation angle of the ellipse in radians, counterclockwise from the positive X
* axis (optional). Default is 0.
*/
constructor(center: AcGePointLike, majorAxisRadius: number, minorAxisRadius: number, startAngle?: number, endAngle?: number, clockwise?: boolean, rotation?: number);
/**
* Center of the ellipse in 3d space
*/
get center(): AcGePoint3d;
set center(value: AcGePointLike);
/**
* Major axis radius of the ellipse
*/
get majorAxisRadius(): number;
set majorAxisRadius(value: number);
/**
* Minor axis radius of the ellipse
*/
get minorAxisRadius(): number;
set minorAxisRadius(value: number);
/**
* Start angle of the ellipse arc in radians in the range -pi to pi.
*/
get startAngle(): number;
set startAngle(value: number);
/**
* End angle of the ellipse arc in radians in the range -pi to pi.
*/
get endAngle(): number;
set endAngle(value: number);
/**
* The flag Whether the ellipse arc is drawn clockwise. Default is false.
*/
get clockwise(): boolean;
set clockwise(value: boolean);
/**
* The rotation angle of the ellipse in radians, counterclockwise from the positive X axis (optional).
* Default is 0.
*/
get rotation(): number;
set rotation(value: number);
/**
* Return angle between endAngle and startAngle in range 0 to 2*PI
*/
get deltaAngle(): number;
/**
* Return true if the arc is a large arc whose delta angle value is greater than PI.
*/
get isLargeArc(): 0 | 1;
/**
* Compute the bounding box of the 3D ellipse arc.
* The bounding box is defined by its minimum and maximum x, y, and z coordinates.
* @returns Return bounding box containing the min and max coordinates
*/
calculateBoundingBox(): AcGeBox2d;
/**
* Return true if its start point is identical to its end point. Otherwise, return false.
*/
get closed(): boolean;
/**
* Return the point for a given position on the curve according to the arc length.
* @param t Input a position on the curve according to the arc length. Must be in the range [ 0, 1 ].
* @returns Return the point for a given position on the curve according to the arc length.
*/
getPoint(t: number): AcGePoint2d;
/**
* @inheritdoc
*/
transform(_matrix: AcGeMatrix2d): this;
/**
* @inheritdoc
*/
copy(value: AcGeEllipseArc2d): this;
/**
* @inheritdoc
*/
clone(): AcGeEllipseArc2d;
}
//# sourceMappingURL=AcGeEllipseArc2d.d.ts.map