import { Point2d } from "../../../geometry3d/Point2dVector2d"; import { ImplicitCurve2d, ImplicitGeometryMarkup } from "./ImplicitCurve2d"; import { UnboundedCircle2dByCenterAndRadius } from "./UnboundedCircle2d"; import { UnboundedLine2dByPointAndNormal } from "./UnboundedLine2d"; /** * Itemization of constraints for line and circle construction. * Not all combinations are solvable! * @internal */ export declare enum ConstraintType { throughPoint = 0, radius = 1, perpendicularTo = 2, tangentTo = 3, curveLength = 4 } /** * Represents a single construction constraint used by `ConstraintSet`. * @internal */ export declare class ConstraintConstruction { constraintType: ConstraintType; curve?: ImplicitCurve2d; point?: Point2d; radius?: number; private constructor(); /** Create a constraint requiring the constructed geometry to pass through a point. */ static createThroughPoint(point: Point2d): ConstraintConstruction; /** Create a tangency constraint to a curve. */ static createTangentTo(curve: ImplicitCurve2d): ConstraintConstruction; /** Create a perpendicularity constraint to a curve. */ static createPerpendicularTo(curve: ImplicitCurve2d): ConstraintConstruction; /** Create a fixed-radius constraint. */ static createRadius(radius: number): ConstraintConstruction; /** * Return a clone of this constraint. * * point or curve referenced by this constraint are cloned. */ clone(): ConstraintConstruction; } /** * Collection of construction constraints for line and circle construction. * @internal */ export declare class ConstraintSet { private _constraints; private constructor(); /** Create an empty constraint set. */ static create(): ConstraintSet; /** Clone this constraint set. */ clone(): ConstraintSet; /** * Add a new constraint to the array. * @param constraint the constraint to add. * @returns true if the constraint was accepted. */ addConstraint(constraint: ConstraintConstruction): boolean; /** Count constraints of a specific type. */ countConstraintType(t: ConstraintType): number; /** Replace zero-radius circle tangency constraints with through-point constraints. */ convertZeroRadiusCirclesToThroughPoint(): void; /** Replace through-point constraints with tangency to zero-radius circles. */ convertThroughPointToZeroRadiusCircles(): void; /** Normalize all lines for the `tangentTo` constraint. */ normalizeLines(): void; /** * Return * * 1 if the constraint curve is UnboundedLine2dByPointAndNormal * * 2 if the constraint curve is UnboundedCircle2dByCenterAndRadius * * 0 otherwise * @param c the constraint. */ private static tangentGeometryLineCircleType; /** * Sort the given constraints with * * Primary sort is on constraint type * * For equal constraint type, apply ordering from tangentGeometryType function. */ static sortByConstraintTypeAndGeometryType(constraints: ConstraintConstruction[]): void; /** * Given an array of constraint requests (e.g. tangent to circle, tangent to line, etc), * construct all circles that satisfy the conditions. * * Circles are defined by 3 conditions, so there is null output for inputs with other than 3 constraints. * * Returns undefined if no solver is available for the requested constraints. * @returns Array of circles with markup about how or where the constraints are satisfied. */ constructConstrainedCircles(): ImplicitGeometryMarkup[] | undefined; /** * Given an array of constraint requests (e.g. tangent to circle, tangent to line, etc), * construct all lines that satisfy the conditions. * * Lines are defined by 2 conditions, so there is null output for inputs with other than 2 constraints. * * Returns undefined if no solver is available for the requested constraints. * @returns Array of lines with markup about how or where the constraints are satisfied. */ constructConstrainedLines(): ImplicitGeometryMarkup[] | undefined; } //# sourceMappingURL=ConstraintSet.d.ts.map