import { AcDbPolyline, AcGePoint2d, AcGePoint2dLike } from '@mlightcad/data-model'; import { AcApContext } from '../../app'; import { AcEdBaseView, AcEdCommand, AcEdPreviewJig } from '../../editor'; /** * Preview jig that dynamically updates a polyline while the user is acquiring * the *next* point. * * Responsibilities: * - Keep the already-confirmed vertices visible. * - Add a transient "current" vertex that follows the cursor. * - Update the bulge of the last confirmed vertex to preview arc/line changes. * * Why this jig exists: * - Point acquisition needs *live* geometry updates as the cursor moves. * - We update the polyline incrementally (add/remove a single temp vertex) * instead of `reset()` to avoid flicker and preserve transient state. */ export declare class AcApPolylineJig extends AcEdPreviewJig { private _polyline; private _points; private _bulges; private _currentBulge?; private _bulgeProvider?; private _baseCount; private _hasTemp; private _appliedBulge?; /** * Creates a polyline jig. * * @param view - The associated view */ /** * Create a polyline preview jig for point acquisition. * * @param view - The associated view for transient rendering. * @param points - Confirmed polyline vertices. * @param bulges - Bulge values aligned with `points`. * @param currentBulge - Optional fixed bulge used for the preview segment. * @param bulgeProvider - Optional function to compute bulge based on the * current cursor point. */ constructor(view: AcEdBaseView, points: AcGePoint2d[], bulges: (number | undefined)[], currentBulge?: number, bulgeProvider?: (endPoint: AcGePoint2dLike) => number | undefined); /** * The transient polyline entity being previewed. */ get entity(): AcDbPolyline; /** * Update the preview polyline as the cursor moves. * * This updates: * - The bulge of the last confirmed vertex (if needed). * - A single temporary vertex representing the current cursor position. */ update(point: AcGePoint2dLike): void; /** * Seed the preview entity with the confirmed vertices. */ private addBaseVertices; } /** * Command to create one polyline. */ export declare class AcApPolylineCmd extends AcEdCommand { constructor(); /** * Bulge for the complementary arc on the same circle (same endpoints and start * tangent): included angle `2π - |θ|` instead of `θ`. * * @param bulge - Bulge of the current arc segment. * @returns Bulge for the other arc on the same circle. */ private complementBulge; /** * Bulge used when Ctrl is pressed during PLINE arc: the complementary arc on the * opposite side of the chord (negated complement). This matches AutoCAD — the * rest of the circle, bulging to the other side of the current segment. * * @param bulge - Bulge of the current arc segment. * @returns Bulge for the Ctrl-toggle preview/result. */ private flipArcBulgeForCtrl; /** * Arc center from chord endpoints and bulge (polyline arc convention). */ private computeArcCenterFromBulge; /** * Forward tangent at a point on a circular arc, from center and sweep direction. */ private getGeometricTangentAtPoint; /** * Tangent direction (radians) at the end of an arc segment, along polyline flow. */ private getArcTangentAtEnd; /** * Incoming tangent at the last vertex (direction of the previous segment). */ private getIncomingTangentRadians; /** * Bulge for an arc through `start` and `end` that is tangent to `tangentRad` at `start`. */ private computeBulgeFromTangentDirection; /** * Bulge from a known center, sweeping in the direction that matches `tangentRad` * at `start` (including included angles greater than 180°). * * Orientation follows the same rule as {@link createArcFromStartEndDirection} in * `AcApArcCmd`: compare the incoming tangent with the start radius vector. */ private computeBulgeFromCenterWithTangent; /** * Bulge for an arc with a fixed included angle that is tangent at `start`. */ private computeBulgeFromTangentAndIncludedAngle; private computeBulgeFromCenter; private computeCircleCenter; private computeBulgeFromThreePoints; private computeBulgeFromRadius; execute(context: AcApContext): Promise; } //# sourceMappingURL=AcApPolylineCmd.d.ts.map