WebCAD-Lib-TS API 文档 - v1.0.0
    Preparing search index...

    Class PointInputOptions

    点输入选项类

    用于配置 getPoint 函数的行为。这是命令开发中最常用的输入选项类。 支持基点设置、对象捕捉、正交模式、极坐标追踪等多种功能。

    const options = new PointInputOptions("指定第一点:");
    const result = await getPoint(options);
    const options = new PointInputOptions("指定下一点:");
    options.useBasePoint = true;
    options.basePoint = lastPoint;
    const result = await getPoint(options);
    const options = new PointInputOptions("指定点[撤销(U)/闭合(C)]:");
    options.keywords = ["U", "C"];
    const result = await getPoint(options);
    if (result.stringResult === "U") {
    // 用户选择了撤销
    }
    Index

    Constructors

    Properties

    useBasePoint: boolean

    是否使用基点,用于绘制橡皮筋线

    basePoint: Point2D

    基点坐标,配合 useBasePoint 使用

    useOsnap: boolean

    是否启用对象捕捉

    useOrthoMode: boolean

    是否使用正交模式

    forceOrthomode: boolean

    是否强制正交模式

    ignoreOrthomode: boolean

    是否忽略正交模式

    defaultKeyword: string

    默认关键字

    allowNumberResult: boolean

    是否允许数字输入结果

    isMtpMode: boolean

    是否为多点追踪模式

    hideRubberBand: boolean

    是否隐藏橡皮筋线

    forceOsmode: number

    强制对象捕捉模式

    useForceOsmode: boolean

    是否使用强制对象捕捉模式

    automateStr: string

    自动化输入字符串

    isAutomation: boolean

    是否为自动化模式

    hideCrossHairCursor: boolean

    是否隐藏十字光标

    useforceAngle: boolean

    是否使用强制角度

    forceAngle: number

    强制角度值

    ignorePolarMode: boolean

    是否忽略极坐标模式

    message: string

    提示消息

    keywords: string[]

    可选的关键字列表

    callback: (canvasPoint: Point2D, originalPoint?: Point2D) => void

    回调函数