API Reference > geometry-core > Curve > Arc3d Arc3d Class Circular or elliptic arc. The angle to point equation is: ** X = center + cos(theta) * vector0 + sin(theta) * vector90 When the two vectors are perpendicular and have equal length, it is a true circle. Non-perpendicular vectors are always elliptic. vectors of unequal length are always elliptic. To create an ellipse in the common "major and minor axis" form of an ellipse: ** vector0 is the vector from the center to the major axis extreme. ** vector90 is the vector from the center to the minor axis extreme. ** note the constructing the vectors to the extreme points makes them perpendicular. The method toScaledMatrix3d () can be called to convert the unrestricted vector0,vector90 to perpendicular form. The unrestricted form is much easier to work with for common calculations -- stroking, projection to 2d, intersection with plane. Extends CurvePrimitive Implements BeJSONFunctions Methods Name Description allPerpendicularAngles(spacePoint: Point3d, _extend: boolean = true, _endpoints: boolean = false): number[] Return all angles (in radians) where the ellipse tangent is perpendicular to the vector to a spacePoint. angleToPointAndDerivative(theta: Angle, result?: Ray3d): Ray3d Evaluate the point and derivative with respect to the angle (in radians) announceClipIntervals(clipper: Clipper, announce?: AnnounceNumberNumberCurvePrimitive): boolean Find intervals of this CurvePrimitive that are interior to a clipper appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number compute intersections with a plane. areaToChordXY(fraction0: number, fraction1: number): number Return the (signed!) area between (a fractional portion of) the arc and the chord between those points circularRadius(): undefined | number If the arc is circular, return its radius. circularRadiusXY(): undefined | number Return true if the vector0 and vector90 are of equal length and perpendicular. clone(): Arc3d Return a clone of this arc. cloneAtZ(z?: number): Arc3d Return a clone of this arc, projected to given z value. cloneInRotatedBasis(theta: Angle): Arc3d Return an arc whose basis vectors are rotated by given angle within the current basis space. clonePartialCurve(fractionA: number, fractionB: number): undefined | CurvePrimitive Return (if possible) an arc which is a portion of this curve. cloneTransformed(transform: Transform): CurvePrimitive Return a clone of the arc, with transform applied closestPoint(spacePoint: Point3d, extend: VariantCurveExtendParameter, result?: CurveLocationDetail): CurveLocationDetail Return details of the closest point on the arc, optionally extending to full ellipse. computeStrokeCountForOptions(options?: StrokeOptions): number return the stroke count required for given options. curveLength(): number If this is a circular arc, return the simple length derived from radius and sweep. curveLengthBetweenFractions(fraction0: number, fraction1: number): number If this is a circular arc, return the simple length derived from radius and sweep. dispatchToGeometryHandler(handler: GeometryHandler): any Second step of double dispatch: call handler.handleArc3d(this) emitStrokableParts(handler: IStrokeHandler, options?: StrokeOptions): void Emit strokes to caller-supplied handler emitStrokes(dest: LineString3d, options?: StrokeOptions): void Emit strokes to caller-supplied linestring endPoint(result?: Point3d): Point3d Return the end point tof the arc. extendRange(range: Range3d, transform?: Transform): void Extend a range to include the range of the arc. fractionAndRadialFractionToPoint(arcFraction: number, radialFraction: number, result?: Point3d): Point3d Convert fractional arc and radial positions to xyz coordinates fractionToPoint(fraction: number, result?: Point3d): Point3d Convert a fractional position to xyz coordinates fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors Construct a plane with fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d Convert a fractional position to xyz coordinates and derivative with respect to fraction. getFractionToDistanceScale(): undefined | number The arc has simple proportional arc length if and only if it is a circular arc. isAlmostEqual(otherGeometry: GeometryQuery): boolean Test if this arc is almost equal to another GeometryQuery object isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean Return true if the ellipse center and basis vectors are in the plane isSameGeometryClass(other: GeometryQuery): boolean Test if this and other are both instances of Arc3d. matrixClone(): Matrix3d read property for (clone of!) matrix of vector0, vector90, unit normal maxVectorLength(): number Return the larger of the two defining vectors. moveSignedDistanceFromFraction(startFraction: number, signedDistance: number, allowExtension: undefined, result?: CurveLocationDetail): CurveLocationDetail * See extended comments on CurvePrimitive.moveSignedDistanceFromFraction otherArcAsLocalVectors(other: Arc3d): undefined | ArcVectors Compute the center and vectors of another arc as local coordinates within this arc's frame. quickEccentricity(): number Return a quick estimate of the eccentricity of the ellipse. quickLength(): number Return an approximate (but easy to compute) arc length. radiansToPoint(radians: number, result?: Point3d): Point3d Evaluate the point and derivative with respect to the angle (in radians) radiansToPointAndDerivative(radians: number, result?: Ray3d): Ray3d Evaluate the point and derivative with respect to the angle (in radians) radiansToRotatedBasis(radians: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors Return a parametric plane with reverseInPlace(): void Reverse the sweep of the arc. scaleAboutCenterInPlace(scaleFactor: number): void Scale the vector0 and vector90 vectors by scaleFactor set(center: Point3d, matrix: Matrix3d, sweep: undefined | AngleSweep): void Redefine the arc with (clones of) given data. setFrom(other: Arc3d): void Copy center, matrix, and sweep from other Arc3d. setFromJSON(json?: any): void Set this arc from a json object with these values: setRefs(center: Point3d, matrix: Matrix3d, sweep: AngleSweep): void Redefine the arc with (captured references to) given data. setVector0Vector90(vector0: Vector3d, vector90: Vector3d): void Replace the arc's 0 and 90 degree vectors. startPoint(result?: Point3d): Point3d Return the start point tof the arc. toJSON(): any Convert to a JSON object. toScaledMatrix3d(): { axes: Matrix3d, center: Point3d, r0: number, r90: number, sweep: AngleSweep } Return the arc definition with rigid matrix form with axis radii. toTransformedPoint4d(matrix: Matrix4d): { center: Point4d, sweep: AngleSweep, vector0: Point4d, vector90: Point4d } Return the arc definition with center, two vectors, and angle sweep, transformed to 4d points. toTransformedVectors(transform?: Transform): { center: Point3d, sweep: AngleSweep, vector0: Vector3d, vector90: Vector3d } Return the arc definition with center, two vectors, and angle sweep, optionally transformed. toVectors(): ArcVectors Return the arc definition with center, two vectors, and angle sweep; tryTransformInPlace(transform: Transform): boolean apply a transform to the arc basis vectors. create(center: undefined | Point3d, vector0: Vector3d, vector90: Vector3d, sweep?: AngleSweep, result?: Arc3d): Arc3d Static Creat an arc by center with vectors to points at 0 and 90 degrees in parameter space. createCenterNormalRadius(center: undefined | Point3d, normal: Vector3d, radius: number, result?: Arc3d): Arc3d Static Create a (full circular) arc from center, normal and radius createCircularStartMiddleEnd(pointA: Readonly<WritableXYAndZ>, pointB: Readonly<WritableXYAndZ>, pointC: Readonly<WritableXYAndZ>, result?: Arc3d): undefined | LineString3d | Arc3d Static Create a circular arc defined by start point, any intermediate point, and end point. createFilletArc(point0: Point3d, point1: Point3d, point2: Point3d, radius: number): ArcBlendData Static Determine an arc "at a point of inflection" of a point sequence. createRefs(center: Point3d, matrix: Matrix3d, sweep: AngleSweep, result?: Arc3d): Arc3d Static Create an arc, capturing references to center, matrix and sweep. createScaledXYColumns(center: undefined | Point3d, matrix: Matrix3d, radius0: number, radius90: number, sweep?: AngleSweep, result?: Arc3d): Arc3d Static Create an arc from center, x column to be scaled, and y column to be scaled. createUnitCircle(): Arc3d Static Create a new arc which is a unit circle centered at the origin. createXY(center: Point3d, radius: number, sweep: AngleSweep = ...): Arc3d Static Create a new arc which is parallel to the xy plane, with given center and radius and optional angle sweep. createXYEllipse(center: Point3d, radiusA: number, radiusB: number, sweep: AngleSweep = ...): Arc3d Static Create a new arc which is parallel to the xy plane, with given center and x,y radii, and optional angle sweep createXYZXYZXYZ(cx: number, cy: number, cz: number, ux: number, uy: number, uz: number, vx: number, vy: number, vz: number, sweep?: AngleSweep, result?: Arc3d): Arc3d Static Create an arc by center (cx,cy,xz) with vectors (ux,uy,uz) and (vx,vy,vz) to points at 0 and 90 degrees in parameter space. Inherited methods Name Inherited from Description addMappedStrokesToLineString3D(map: StrokeCountMap, linestring: LineString3d): number CurvePrimitive * evaluate strokes at fractions indicated in a StrokeCountMap. collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLinestrings: boolean = false): CurvePrimitive[] CurvePrimitive Return an array containing only the curve primitives. collectCurvePrimitivesGo(collectorArray: CurvePrimitive[], _smallestPossiblePrimitives: boolean, _explodeLinestrings: boolean = false): void CurvePrimitive Return an array containing only the curve primitives. computeAndAttachRecursiveStrokeCounts(options?: StrokeOptions, parentMap?: StrokeCountMap): void CurvePrimitive attach StrokeCountMap structure to this primitive (and recursively to any children) curveLengthWithFixedIntervalCountQuadrature(fraction0: number, fraction1: number, numInterval: number, numGauss: number = 5): number CurvePrimitive * Run an integration (with a default gaussian quadrature) with a fixed fractional step fractionAndDistanceToPointOnTangent(fraction: number, distance: number): Point3d CurvePrimitive Construct a point extrapolated along tangent at fraction. fractionToCurvature(fraction: number): undefined | number CurvePrimitive Returns the (absolute) curvature magnitude. fractionToFrenetFrame(fraction: number, result?: Transform): undefined | Transform CurvePrimitive Construct a frenet frame: fractionToPointAndUnitTangent(fraction: number, result?: Ray3d): Ray3d CurvePrimitive Returns a ray whose origin is the curve point and direction is the unit tangent. moveSignedDistanceFromFractionGeneric(startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail): CurveLocationDetail Protected CurvePrimitive Generic algorithm to search for point at signed distance from a fractional startPoint. range(transform?: Transform, result?: Range3d): Range3d CurvePrimitive return the range of the entire (tree) GeometryQuery tryTranslateInPlace(dx: number, dy: number = 0.0, dz: number = 0.0): boolean CurvePrimitive try to move the geometry by dx,dy,dz areAlmostEqual(a: undefined | GeometryQuery, b: undefined | GeometryQuery): boolean Static CurvePrimitive apply instance method isAlmostEqual if both are defined. installStrokeCountMap(curve: CurvePrimitive, curveMap: StrokeCountMap, parentMap?: StrokeCountMap): void Static CurvePrimitive final install step to save curveMap in curve. Properties Name Type Description center Accessor ReadOnly Point3d read property for (clone of) center curvePrimitiveType Readonly "arc" String name for schema properties isCircular Accessor ReadOnly boolean Return true if the vector0 and vector90 are of equal length and perpendicular. isExtensibleFractionSpace Accessor ReadOnly boolean An Arc3d extends along its complete elliptic arc matrixRef Accessor ReadOnly Matrix3d read property for (reference to !!) matrix of vector0, vector90, unit normal perpendicularVector Accessor ReadOnly Vector3d read property for (clone of) plane normal, with arbitrary length. quadratureGuassCount StaticReadonly "5" Gauss point quadrature count for evaluating curve length. quadratureIntervalAngleDegrees StaticReadonly "10" In quadrature for arc length, use this interval (divided by quickEccentricity) sweep Accessor AngleSweep Sweep of the angle. vector0 Accessor ReadOnly Vector3d read property for (clone of) vector0 vector90 Accessor ReadOnly Vector3d read property for (clone of) vector90 Inherited properties Name Type Inherited from Description children Accessor ReadOnly undefined | GeometryQuery[] CurvePrimitive return GeometryQuery children for recursive queries.* leaf classes do not need to implement. geometryCategory Readonly "curvePrimitive" CurvePrimitive String name for schema properties parent undefined | any CurvePrimitive data attached by various algorithms (e.g. strokeData undefined | StrokeCountMap CurvePrimitive data attached during stroking for facets. Defined in curve/Arc3d.ts Line 66 Last Updated: 12 June, 2024