import { AcApContext } from '../../app'; import { AcEdCommand } from '../../editor'; /** * Command to create one arc. * * Supported input flows align with AutoCAD ARC command options: * - Start/Second/End (3-point) * - Start/Center/End, Start/Center/Angle, Start/Center/Chord Length * - Start/End/Center, Start/End/Angle, Start/End/Direction, Start/End/Radius * - Center/Start/End, Center/Start/Angle, Center/Start/Chord Length */ export declare class AcApArcCmd extends AcEdCommand { /** * Creates ARC command instance. */ constructor(); /** * Command entry point. * * Supports initial Start-point branch and Center-first branch. * * @param context - Current app context. */ execute(context: AcApContext): Promise; /** * Executes one preselected ARC branch. * * This method is used only when a scripted caller queued an entry token * before invoking `ARC`. Instead of starting at the standard root prompt, the * command jumps directly into the requested option family so the user still * interacts with a single `ARC` command while shortcuts can open a more * specific workflow. * * @param context - Current app context. * @param entryMode - Resolved scripted branch to execute. */ private executeEntryMode; /** * Consumes one optional scripted ARC entry token when present. * * This keeps `ARC` as a single command while still allowing ribbon shortcuts * to preselect a specific option family or exact branch. * * The next queued scripted token is treated as an ARC entry selector only * when it matches a known token in {@link ARC_ENTRY_MODE_BY_TOKEN}. Unknown * input is left untouched so the ordinary command prompts can consume it as * regular scripted input. * * @returns Resolved entry mode, or `'default'` when no special entry token is * queued. */ private consumeEntryMode; /** * Adds one localized keyword to a prompt options object. * * @param prompt - Prompt options to extend. * @param key - Keyword i18n key suffix. */ private addKeyword; /** * Appends created arc entity to model space. * * @param context - Current app context. * @param arc - Arc definition to append. */ private appendArc; /** * Emits one warning message for invalid geometry input. * * @param key - Invalid-input category key. */ private warnInvalidGeometry; /** * Prompts one start point. * * This helper is shared by several scripted entry branches that need to begin * directly at a known Start-point step instead of the normal ARC root prompt. * * @returns Selected start point, or `undefined` when the user cancels or the * prompt does not complete successfully. */ private promptStartPoint; /** * Prompts one center point, optionally using a base point for feedback. * * When a base point is provided, the prompt mirrors the standard ARC UX by * enabling dashed reference feedback from the previously chosen point. * * @param basePoint - Optional reference point. * @returns Selected center point, or `undefined` when the prompt is aborted. */ private promptCenterPoint; /** * Prompts one end point, optionally using a base point for feedback. * * This helper is used by the scripted entry paths that need a plain End-point * acquisition step before resuming the standard ARC family logic. * * @param basePoint - Optional reference point. * @returns Selected end point, or `undefined` when the prompt is aborted. */ private promptEndPoint; /** * Prompts the second point on the arc in the 3-point workflow. * * This is distinct from {@link promptEndPoint} because the 3-point ARC flow * uses a different prompt message and semantic meaning: the second point lies * somewhere on the arc, not necessarily at its final endpoint. * * @param start - Arc start point. * @returns Selected second point, or `undefined` when the prompt is aborted. */ private promptSecondPoint; /** * Runs the exact 3-point flow selected by a scripted entry token. * * This bypasses the ordinary ARC root prompt and immediately acquires the * Start and Second points required for the 3-point construction, then reuses * the existing shared finalization logic. * * @param context - Current app context. */ private runExactThreePointFlow; /** * Runs the Start-Center option family from an explicit entry token. * * This mode corresponds to the AutoCAD-style branch where the command is * already committed to the Start/Center family, but the final sub-option * (End, Angle, or Chord Length) is still chosen interactively. * * @param context - Current app context. */ private runStartCenterFlowFromEntry; /** * Runs one exact Start-Center-* flow selected by a scripted entry token. * * Unlike {@link runStartCenterFlowFromEntry}, this method locks both the * option family and the terminal construction variant up front. It is used by * ribbon dropdown items that represent a fully specified ARC recipe. * * @param context - Current app context. * @param variant - Terminal Start-Center variant to execute after Start and * Center are collected. */ private runExactStartCenterFlow; /** * Runs one exact Center-Start-* flow selected by a scripted entry token. * * This mirrors {@link runExactStartCenterFlow} for the Center-first ARC * family, allowing a shortcut to bypass the default root prompt and enter one * fully specified Center/Start branch directly. * * @param context - Current app context. * @param variant - Terminal Center-Start variant to execute after Center and * Start are collected. */ private runExactCenterStartFlow; /** * Runs one exact Start-End-* flow selected by a scripted entry token. * * This path is used when a shortcut already knows that the Start-End family * should be used and only needs the command to perform the exact terminal * construction indicated by `variant`. * * @param context - Current app context. * @param variant - Terminal Start-End variant to execute after Start and End * are collected. */ private runExactStartEndFlow; /** * Runs the Start-End option family from an explicit entry token. * * This mode corresponds to the AutoCAD-style Start/End branch where the * family is preselected, but the final option (Center, Angle, Direction, or * Radius) is still chosen through the usual interactive prompts. * * @param context - Current app context. */ private runStartEndFlowFromEntry; /** * Prompts one start point using the given center point as reference. * * The supplied center point is used as the base point so the visual feedback * matches the standard Center/Start ARC family experience. * * @param center - Arc center point. * @returns Selected start point, or `undefined` when the prompt is aborted. */ private promptStartPointFromCenter; /** * Finishes one exact Center-Start-End style flow with end-point preview. * * This helper exists because the exact scripted branch needs the same live * preview behavior as the interactive Center/Start/End path, but without the * intermediate option-selection prompt used by the generic family handler. * * @param context - Current app context. * @param center - Arc center point. * @param start - Arc start point. */ private finishExactCenterStartEnd; /** * Gets direction factor from Ctrl-toggle state. * * @returns `1` for normal direction, `-1` for flipped direction. */ private getArcDirectionFactor; /** * Applies Ctrl direction factor to orientation sign. * * @param sign - Base orientation sign. * @returns Possibly flipped orientation sign. */ private applyCtrlDirectionSign; /** * Applies Ctrl direction factor to a signed numeric input. * * @param value - Signed value (angle/chord/radius). * @returns Value with direction factor applied. */ private applyCtrlDirectionValue; /** * Gets whether current Ctrl-toggle indicates direction reversal. * * @returns `true` when direction is flipped. */ private isCtrlDirectionFlipped; /** * Handles Start-first main branch. * * Flow: * - Start -> Second -> End (3-point) * - Start -> Center -> ... * - Start -> End -> ... * * @param context - Current app context. * @param start - Start point picked by user. */ private runStartFlow; /** * Completes 3-point arc flow (Start/Second/End). * * @param context - Current app context. * @param start - Start point. * @param second - Point on arc. */ private finishThreePointArc; /** * Runs Center-first branch: * Center -> Start -> (End | Angle | Chord Length) * * @param context - Current app context. */ private runCenterStartFlow; /** * Runs Start->Center branch: * Start -> Center -> (End | Angle | Chord Length) * * @param context - Current app context. * @param start - Start point. */ private runStartCenterFlow; /** * Shared handler for center-start option family. * * Supports: * - End point picking * - Included angle input * - Chord length input * * @param context - Current app context. * @param center - Arc center. * @param start - Arc start point. */ private finishCenterStartFlow; /** * Handles Start-End option family. * * Supports: * - Start -> End -> Center * - Start -> End -> Angle * - Start -> End -> Direction * - Start -> End -> Radius * * @param context - Current app context. * @param start - Arc start point. */ private runStartEndFlow; /** * Converts degrees to radians. * * @param degree - Angle in degrees. * @returns Angle in radians. */ private degToRad; } //# sourceMappingURL=AcApArcCmd.d.ts.map