import { AcApContext } from '../../app'; import { AcEdCommand } from '../../editor'; /** * Command to copy selected entities by cloning and translating them. * * Supported AutoCAD-like workflow: * 1) Select entities (or reuse preselection), * 2) Specify base point or choose `Displacement` / `Mode` / `Multiple`, * 3) Specify placement point, or create an evenly spaced array, * 4) Append cloned copies without modifying the originals. */ export declare class AcApCopyCmd extends AcEdCommand { private static _defaultMode; /** * Creates the COPY command and marks it as a review-mode command. */ constructor(); /** * Adds one localized keyword entry to a point/keyword prompt. * * @param prompt - Prompt instance that should expose the keyword. * @param key - Translation key suffix describing which keyword to add. */ private addKeyword; /** * Computes the vector from a copy base point to a target point. * * @param basePoint - Copy base point. * @param targetPoint - Destination point selected by the user. * @returns Translation vector that moves a clone from base to target. */ private computeDisplacement; /** * Scales a displacement for one copy in a repeated copy/array operation. * * @param displacement - Raw placement displacement from the base point. * @param factor - One-based copy index. * @param copyCount - Total number of copies to generate. * @param fitMode - Whether indexed copies should be distributed across the full span. * @returns Displacement assigned to the requested copy index. */ private scaleDisplacement; /** * Clones source entities and translates each clone batch into its final position. * * @param sourceEntities - Entities to duplicate. * @param displacement - Raw placement displacement from base point to end point. * @param copyCount - Number of translated copy batches to produce. * @param fitMode - Whether batches should be distributed evenly across the full displacement. * @returns Newly cloned and transformed entities ready to append to model space. */ private buildCopies; /** * Prompts the user to choose between single-copy and repeated-copy behavior. * * @param currentMode - Mode shown as the current default in the prompt. * @returns Selected mode, the current mode on empty input, or `undefined` on cancel/error. */ private promptCopyMode; /** * Collects array placement settings for the `Array` COPY option. * * The routine first asks for the number of items, then asks for the final * placement point. If the user chooses `Fit`, the returned placement marks * copies as evenly distributed across the overall span. * * @param context - Current application/document context. * @param sourceEntities - Entities used to build the transient preview. * @param basePoint - Array start point shared by all placements. * @returns Array placement settings, or `undefined` when input is canceled. */ private promptArrayPlacement; /** * Runs the placement loop that repeatedly creates copies until the command ends. * * @param context - Current application/document context. * @param sourceEntities - Entities selected for copying. * @param basePoint - Base/displacement point used by the current copy session. * @param copyMode - Whether the loop should stop after one placement or continue. * @param useDisplacementPrompt - Whether prompt text should describe displacement instead of second point placement. */ private executeCopyLoop; /** * Executes COPY using AutoCAD-like selection, base-point, and placement prompts. * * Existing selection is reused when available; otherwise the command requests * a new selection. The command then resolves copy mode/base point options and * appends cloned entities into model space for each accepted placement. * * @param context - Current application/document context. */ execute(context: AcApContext): Promise; } //# sourceMappingURL=AcApCopyCmd.d.ts.map