@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
138 lines • 4.73 kB
TypeScript
import { AcGeBox3d, AcGeMatrix3d, AcGePlane, AcGePoint3d, AcGePoint3dLike, AcGePointLike, AcGeVector3d, AcGeVector3dLike } from '../math';
import { AcGeCurve3d } from './AcGeCurve3d';
/**
* The class represeting both full circles and circular arcs in 3d space. The ellipse arc is
* defined by a center point, radius, start angle, end angle, a normal vector, and a reference
* vector. If start angle is equal to 0 and end angle is equal to 2 * Math.PI, it represents
* a full circle.
*/
export declare class AcGeCircArc3d extends AcGeCurve3d {
private _center;
private _radius;
private _startAngle;
private _endAngle;
private _normal;
private _refVec;
/**
* Compute center point of the arc given three points
* @param startPoint Input start point of the arc
* @param endPoint Input end point of the arc
* @param pointOnArc Input one point on the arc (P3)
* @returns Return center point of the arc
*/
static computeCenterPoint(startPoint: AcGePoint3dLike, endPoint: AcGePoint3dLike, pointOnArc: AcGePoint3dLike): AcGePoint3d | null;
/**
* Create arc by three points
* @param startPoint Input the start point
* @param endPoint Input the end point
* @param pointOnArc Input one point between the start point and the end point
*/
static createByThreePoints(startPoint: AcGePoint3dLike, endPoint: AcGePoint3dLike, pointOnArc: AcGePoint3dLike): AcGeCircArc3d | undefined;
/**
* Create a 3d circular arc.
* @param center The center point of the arc.
* @param radius The radius of the arc.
* @param startAngle The start angle of the arc.
* @param endAngle The end angle of the arc.
* @param normal The normal vector of the plane in which the arc lies.
* @param refVec The reference vector from which angles are measured. Default value is x axis.
*/
constructor(center: AcGePointLike, radius: number, startAngle: number, endAngle: number, normal: AcGeVector3dLike, refVec?: AcGeVector3dLike);
/**
* Center of circular arc
*/
get center(): AcGePoint3d;
set center(value: AcGePointLike);
/**
* Radius of circular arc
*/
get radius(): number;
set radius(value: number);
/**
* Start angle in radians of circular arc in the range 0 to 2 * PI.
*/
get startAngle(): number;
set startAngle(value: number);
/**
* End angle in radians of circular arc in the range 0 to 2 * PI.
*/
get endAngle(): number;
set endAngle(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;
/**
* Return true if the arc is clockwise from startAngle to endAngle
*/
get clockwise(): boolean;
/**
* Normal vector defining the plane of the circular arc
*/
get normal(): AcGeVector3d;
set normal(value: AcGeVector3dLike);
/**
* The unit reference vector of circular arc
*/
get refVec(): AcGeVector3d;
set refVec(value: AcGeVector3dLike);
/**
* The start point of circular arc
*/
get startPoint(): AcGePoint3d;
/**
* The end point of circular arc
*/
get endPoint(): AcGePoint3d;
/**
* @inheritdoc
*/
get length(): number;
/**
* @inheritdoc
*/
calculateBoundingBox(): AcGeBox3d;
/**
* Return true if its start point is identical to its end point. Otherwise, return false.
*/
get closed(): boolean;
/**
* Divide this arc into the specified nubmer of points
* those points as an array of points.
* @param numPoints Input the nubmer of points returned
* @returns Return an array of point
*/
getPoints(numPoints: number): AcGePoint3d[];
/**
* @inheritdoc
*/
transform(matrix: AcGeMatrix3d): this;
/**
* @inheritdoc
*/
copy(value: AcGeCircArc3d): this;
/**
* @inheritdoc
*/
clone(): AcGeCircArc3d;
/**
* Calculate angle between the specified vec and the reference vector of this arc.
* @param vec Input one vector
* @returns Return angle between the specified vec and the reference vector of this arc.
*/
getAngle(vec: AcGeVector3d): number;
/**
* Returns the point on the arc at a specific angle.
* @param angle The angle at which to get the point.
*/
getPointAtAngle(angle: number): AcGePoint3d;
/**
* Return the plane in which the circular arc lies.
*/
get plane(): AcGePlane;
}
//# sourceMappingURL=AcGeCircArc3d.d.ts.map