import { AngleSweep } from "../geometry3d/AngleSweep"; import { Ellipsoid, GeodesicPathPoint } from "../geometry3d/Ellipsoid"; import { IndexedXYZCollection } from "../geometry3d/IndexedXYZCollection"; import { Point3d, Vector3d } from "../geometry3d/Point3dVector3d"; import { Arc3d } from "./Arc3d"; import { CurveChain } from "./CurveCollection"; import { CurvePrimitive } from "./CurvePrimitive"; import { GeometryQuery } from "./GeometryQuery"; import { LineString3d } from "./LineString3d"; import { Loop } from "./Loop"; import { Path } from "./Path"; import { Angle } from "../geometry3d/Angle"; import { IntegratedSpiralTypeName } from "./spiral/TransitionSpiral3d"; /** * The `CurveFactory` class contains methods for specialized curve constructions. * @public */ export declare class CurveFactory { /** (cautiously) construct and save a line segment between fractional positions. */ private static addPartialSegment; /** * Create a circular arc from start point, tangent at start, and another point (endpoint) on the arc. * @param pointA * @param tangentA * @param pointB */ static createArcPointTangentPoint(pointA: Point3d, tangentA: Vector3d, pointB: Point3d): Arc3d | undefined; /** * Construct a sequence of alternating lines and arcs with the arcs creating tangent transition between consecutive edges. * * If the radius parameter is a number, that radius is used throughout. * * If the radius parameter is an array of numbers, `radius[i]` is applied at `point[i]`. * * Note that since no fillet is constructed at the initial or final point, those entries in `radius[]` are never referenced. * * A zero radius for any point indicates to leave the as a simple corner. * @param points point source * @param radius fillet radius or array of radii indexed to correspond to the points. * @param allowBackupAlongEdge true to allow edges to be created going "backwards" along edges if needed to create the blend. */ static createFilletsInLineString(points: LineString3d | IndexedXYZCollection | Point3d[], radius: number | number[], allowBackupAlongEdge?: boolean): Path | undefined; /** Create a `Loop` with given xy corners and fixed z. * * The corners always proceed counter clockwise from lower left. * * If the radius is too large for the outer rectangle size, it is reduced to half of the the smaller x or y size. */ static createRectangleXY(x0: number, y0: number, x1: number, y1: number, z?: number, filletRadius?: number): Loop; /** * If `arcB` is a continuation of `arcA`, extend `arcA` (in place) to include the range of `arcB` * * This only succeeds if the two arcs are part of identical complete arcs and end of `arcA` matches the beginning of `arcB`. * * "Reversed" * @param arcA * @param arcB */ static appendToArcInPlace(arcA: Arc3d, arcB: Arc3d, allowReverse?: boolean): boolean; /** * Return a `Path` containing arcs are on the surface of an ellipsoid and pass through a sequence of points. * * Each arc passes through the two given endpoints and in the plane containing the true surface normal at given `fractionForIntermediateNormal` * @param ellipsoid * @param pathPoints * @param fractionForIntermediateNormal fractional position for surface normal used to create the section plane. */ static assembleArcChainOnEllipsoid(ellipsoid: Ellipsoid, pathPoints: GeodesicPathPoint[], fractionForIntermediateNormal?: number): Path; private static appendGeometryQueryArray; /** * Create solid primitives for pipe segments (e.g. Cone or TorusPipe) around line and arc primitives. * @param centerline centerline geometry/ * @param pipeRadius radius of pipe. */ static createPipeSegments(centerline: CurvePrimitive | CurveChain, pipeRadius: number): GeometryQuery | GeometryQuery[] | undefined; /** * * Create section arcs for mitered pipe. * * At each end of each pipe, the pipe is cut by the plane that bisects the angle between successive pipe centerlines. * * The arc definitions are constructed so that lines between corresponding fractional positions on the arcs are * axial lines on the pipes. * * This means that each arc definition axes (aka vector0 and vector90) are _not_ perpendicular to each other. * @param centerline centerline of pipe * @param radius radius of arcs */ static createMiteredPipeSections(centerline: IndexedXYZCollection, radius: number): Arc3d[]; /** * Create a circular arc from start point, tangent at start, radius, optional plane normal, arc sweep * * The vector from start point to center is in the direction of upVector crossed with tangentA. * @param pointA start point * @param tangentA vector in tangent direction at the start * @param radius signed radius. * @param upVector optional out-of-plane vector. Defaults to positive Z * @param sweep angular range. If single `Angle` is given, start angle is at 0 degrees (the start point). * */ static createArcPointTangentRadius(pointA: Point3d, tangentA: Vector3d, radius: number, upVector?: Vector3d, sweep?: Angle | AngleSweep): Arc3d | undefined; /** * Compute 2 spirals (all in XY) for a symmetric line-to-line transition. * * First spiral begins at given start point. * * first tangent aims at shoulder * * outbound spiral joins line from shoulder to target. * @param spiralType name of spiral type. THIS MUST BE AN "Integrated" SPIRAL TYPE * @param startPoint inbound start point. * @param shoulder point target point for (both) spiral-to-line tangencies * @return array with the computed spirals, or undefined if failure. */ static createLineSpiralSpiralLine(spiralType: IntegratedSpiralTypeName, startPoint: Point3d, shoulderPoint: Point3d, targetPoint: Point3d): GeometryQuery[] | undefined; /** * Compute 2 spirals (all in XY) for a symmetric line-to-line transition. * * Spiral length is given. * * tangency points float on both lines. * @param spiralType name of spiral type. THIS MUST BE AN "Integrated" SPIRAL TYPE * @param pointA inbound start point. * @param shoulder point target point for (both) spiral-to-line tangencies * @param spiralLength for each part of the spiral pair. * @return array with the computed spirals, or undefined if failure. */ static createLineSpiralSpiralLineWithSpiralLength(spiralType: IntegratedSpiralTypeName, pointA: Point3d, pointB: Point3d, pointC: Point3d, spiralLength: number): GeometryQuery[] | undefined; /** * Compute 2 spirals and an arc (all in XY) for a symmetric line-to-line transition. * Spiral lengths and arc radius are given. (e.g. from design speed standards.) * @param spiralType name of spiral type. THIS MUST BE AN "Integrated" SPIRAL TYPE * @param pointA inbound start point. * @param pointB shoulder (target) point for (both) spiral-to-line tangencies * @param lengthA inbound spiral length * @param lengthB outbound spiral length * @return array with the computed spirals, or undefined if failure. */ static createLineSpiralArcSpiralLine(spiralType: IntegratedSpiralTypeName, pointA: Point3d, pointB: Point3d, pointC: Point3d, lengthA: number, lengthB: number, arcRadius: number): GeometryQuery[] | undefined; } //# sourceMappingURL=CurveFactory.d.ts.map