mxdraw 0.1.172 → 0.1.174

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mxdraw.d.ts CHANGED
@@ -2289,6 +2289,16 @@ declare class MxDrawObject extends Node<MxDrawEvents, Node<any, any>> {
2289
2289
  * ```
2290
2290
  */
2291
2291
  getMxCurrentSelect(): Array<number>;
2292
+ /**
2293
+ * 得到图上当前选择的MxCAD对象.
2294
+ * @returns Array<number> 返回对象的id数组.
2295
+ * @example
2296
+ * ```typescript
2297
+ *
2298
+ *
2299
+ * ```
2300
+ */
2301
+ getMxCADCurrentSelect(): Array<number>;
2292
2302
  /**
2293
2303
  * 把对象添加到当前选择中.
2294
2304
  * @returns void
@@ -3085,6 +3095,14 @@ declare class MrxDbgUtilsClass {
3085
3095
  * ```
3086
3096
  */
3087
3097
  selectEnt(strPrompt?: string, filter?: any): Promise<number[]>;
3098
+ /**
3099
+ * 交互动态绘制一个矩形框.
3100
+ * @param pt1 矩形框绘制基点.
3101
+ * @param strPrompt 提示字符串
3102
+ * @example
3103
+ * ```
3104
+ */
3105
+ getCorner(pt1: THREE.Vector3, strPrompt?: string, drawSelectCroner?: boolean, detailedResult?: Function): Promise<THREE.Vector3 | null>;
3088
3106
  }
3089
3107
  declare const MrxDbgUtils: MrxDbgUtilsClass;
3090
3108
 
@@ -3239,7 +3257,7 @@ declare class McEdGetPointWorldDrawObject {
3239
3257
  * pWorldDraw.getColor()
3240
3258
  * ```
3241
3259
  */
3242
- getColor(): void;
3260
+ getColor(): number | string | THREE.Color;
3243
3261
  /**
3244
3262
  * 动态绘制一个自定义实体
3245
3263
  * @returns
@@ -3286,6 +3304,28 @@ declare enum MxCursorType {
3286
3304
  kRect = 1,
3287
3305
  kCross = 2
3288
3306
  }
3307
+ declare enum DynamicInputType {
3308
+ kNoInput = 0,
3309
+ kXYCoordInput = 1,
3310
+ kDistanceInput = 2,
3311
+ kDynTip = 3,
3312
+ kAutoInput = 4,
3313
+ kAngleInput = 5
3314
+ }
3315
+ declare enum DetailedResult {
3316
+ kUnknown = 1,
3317
+ kTouchDownIn = 2,
3318
+ kTouchUpIn = 3,
3319
+ kMouseLeftIn = 4,
3320
+ kMouseLeftUpIn = 5,
3321
+ kMouseRightIn = 6,
3322
+ kKeyIn = 7,
3323
+ kCoordIn = 8,
3324
+ kNullEnterIn = 9,
3325
+ kNullSpaceIn = 10,
3326
+ kEcsIn = 11,
3327
+ kNewCommadIn = 12
3328
+ }
3289
3329
  /**
3290
3330
  * MrxDbgUiPrPoint 用于构建一个取点对象
3291
3331
  * @example ```typescript
@@ -3294,6 +3334,7 @@ declare enum MxCursorType {
3294
3334
  */
3295
3335
  declare class MrxDbgUiPrPoint {
3296
3336
  private _MrxDbgUiPrPoint;
3337
+ private status;
3297
3338
  constructor();
3298
3339
  /**
3299
3340
  * 返回关键字列表
@@ -3366,6 +3407,11 @@ declare class MrxDbgUiPrPoint {
3366
3407
  * @returns void
3367
3408
  */
3368
3409
  setUseBasePt(useIt: boolean): void;
3410
+ /**
3411
+ * 返回交互操作退出的详细原因
3412
+ */
3413
+ getDetailedResult(): DetailedResult;
3414
+ getStatus(): MrxDbgUiPrBaseReturn;
3369
3415
  /**
3370
3416
  * 开始动态拖动
3371
3417
  * @param retcall 回调参数status {@link MrxDbgUiPrBaseReturn | 状态值}
@@ -3387,7 +3433,6 @@ declare class MrxDbgUiPrPoint {
3387
3433
  drawReserve(callAddEntity?: (ent: THREE.Object3D) => void): void;
3388
3434
  /**
3389
3435
  * 设置需要的Touche输入类型,默认值是 {@link MxType.InputToucheType.kGetBegan}
3390
- *
3391
3436
  */
3392
3437
  setInputToucheType(toucheType: number): void;
3393
3438
  /**
@@ -3402,6 +3447,14 @@ declare class MrxDbgUiPrPoint {
3402
3447
  * 返回光标类型
3403
3448
  */
3404
3449
  getCursorType(): MxCursorType;
3450
+ /**
3451
+ * 设置动态输入类型
3452
+ */
3453
+ setDynamicInputType(type: DynamicInputType): void;
3454
+ /**
3455
+ * 返回动态输入类型
3456
+ */
3457
+ getDynamicInputType(): DynamicInputType;
3405
3458
  }
3406
3459
 
3407
3460
  declare function drawMxDbImage(): void;
@@ -3882,7 +3935,7 @@ declare class MxDbShape extends MxDbEntity {
3882
3935
  declare class MxDbEllipseShape extends MxDbShape {
3883
3936
  constructor();
3884
3937
  getTypeName(): string;
3885
- /** 弧中心点 */
3938
+ /** 圆心 */
3886
3939
  center: three.Vector3;
3887
3940
  setCenter(center: THREE.Vector3): this;
3888
3941
  /** X轴椭圆弧半径 默认当前坐标转换下的10像素 */
@@ -3943,6 +3996,7 @@ declare function drawMx3PointArc(): void;
3943
3996
  declare class Mx3PointArc extends MxDbCircleShape {
3944
3997
  static cmd: string;
3945
3998
  static draw: typeof drawMx3PointArc;
3999
+ static isRegister: boolean;
3946
4000
  constructor();
3947
4001
  point1: three.Vector3;
3948
4002
  point2: three.Vector3;
@@ -3957,11 +4011,11 @@ declare class Mx3PointArc extends MxDbCircleShape {
3957
4011
  worldDraw(pWorldDraw: McGiWorldDraw): void;
3958
4012
  getGripPoints(): THREE.Vector3[];
3959
4013
  /** 计算三个控制点的角度 */
3960
- compute3PointAngle(): number[];
4014
+ compute3PointAngle(point1?: three.Vector3, point2?: three.Vector3, point3?: three.Vector3): number[];
3961
4015
  /** 根据三个控制点更新圆心 */
3962
- upDateCenter(point1: THREE.Vector3, point2: THREE.Vector3, point3: THREE.Vector3): three.Vector3;
4016
+ upDateCenter(point1?: three.Vector3, point2?: three.Vector3, point3?: three.Vector3): three.Vector3;
3963
4017
  /** 根据圆心和一个控制点自动更新半径大小 */
3964
- upDateRadius(point: THREE.Vector3): number;
4018
+ upDateRadius(point?: three.Vector3): number;
3965
4019
  /** 根据 三个控制点到圆心的角度 更新顺逆时针绘制 */
3966
4020
  upDataClockwise(angle1: number, angle2: number, angle3: number): void;
3967
4021
  /** 更新数据信息 */
@@ -3971,6 +4025,18 @@ declare class Mx3PointArc extends MxDbCircleShape {
3971
4025
  moveGripPointsAt(index: number, offset: THREE.Vector3): boolean;
3972
4026
  }
3973
4027
 
4028
+ declare class Mx2PointArc extends Mx3PointArc {
4029
+ static cmd: string;
4030
+ static draw: () => Promise<void>;
4031
+ static isRegister: boolean;
4032
+ getTypeName(): string;
4033
+ create(): Mx2PointArc;
4034
+ get startPoint(): three.Vector3;
4035
+ set startPoint(v: three.Vector3);
4036
+ get endPoint(): three.Vector3;
4037
+ set endPoint(v: three.Vector3);
4038
+ }
4039
+
3974
4040
  declare function drawMxDbCoord(): void;
3975
4041
 
3976
4042
  /**
@@ -4925,6 +4991,8 @@ type Mx_MxDb2LineAngularDimension = MxDb2LineAngularDimension;
4925
4991
  declare const Mx_MxDb2LineAngularDimension: typeof MxDb2LineAngularDimension;
4926
4992
  type Mx_Mx3PointArc = Mx3PointArc;
4927
4993
  declare const Mx_Mx3PointArc: typeof Mx3PointArc;
4994
+ type Mx_Mx2PointArc = Mx2PointArc;
4995
+ declare const Mx_Mx2PointArc: typeof Mx2PointArc;
4928
4996
  type Mx_MxDbCoord = MxDbCoord;
4929
4997
  declare const Mx_MxDbCoord: typeof MxDbCoord;
4930
4998
  type Mx_MxDbLine = MxDbLine;
@@ -4998,6 +5066,10 @@ type Mx_MxDbSplineCurve = MxDbSplineCurve;
4998
5066
  declare const Mx_MxDbSplineCurve: typeof MxDbSplineCurve;
4999
5067
  type Mx_MxCursorType = MxCursorType;
5000
5068
  declare const Mx_MxCursorType: typeof MxCursorType;
5069
+ type Mx_DetailedResult = DetailedResult;
5070
+ declare const Mx_DetailedResult: typeof DetailedResult;
5071
+ type Mx_DynamicInputType = DynamicInputType;
5072
+ declare const Mx_DynamicInputType: typeof DynamicInputType;
5001
5073
  declare namespace Mx {
5002
5074
  export {
5003
5075
  Mx_loadCoreCode as loadCoreCode,
@@ -5020,6 +5092,7 @@ declare namespace Mx {
5020
5092
  Mx_MxDbPolyline as MxDbPolyline,
5021
5093
  Mx_MxDb2LineAngularDimension as MxDb2LineAngularDimension,
5022
5094
  Mx_Mx3PointArc as Mx3PointArc,
5095
+ Mx_Mx2PointArc as Mx2PointArc,
5023
5096
  Mx_MxDbCoord as MxDbCoord,
5024
5097
  Mx_MxDbLine as MxDbLine,
5025
5098
  Mx_MxDbRect as MxDbRect,
@@ -5059,6 +5132,8 @@ declare namespace Mx {
5059
5132
  Mx_Layer as Layer,
5060
5133
  Mx_MxDbSplineCurve as MxDbSplineCurve,
5061
5134
  Mx_MxCursorType as MxCursorType,
5135
+ Mx_DetailedResult as DetailedResult,
5136
+ Mx_DynamicInputType as DynamicInputType,
5062
5137
  };
5063
5138
  }
5064
5139
 
@@ -5069,4 +5144,4 @@ declare global {
5069
5144
  }
5070
5145
  }
5071
5146
 
5072
- export { Layer, McEdGetPointWorldDrawObject, McGePoint3d, McGePoint3dArray, McGeTool, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrBaseReturn, MrxDbgUiPrPoint, MrxDbgUtils, Mx3PointArc, MxCADObject, MxCursorType, MxDb2LineAngularDimension, MxDbAlignedDimension, MxDbAnyLine, MxDbArcShapeDraw, MxDbArea, MxDbArrow, MxDbCircleArc, MxDbCircleShape, MxDbCloudLine, MxDbCoord, MxDbDatabase, MxDbEllipse, MxDbEllipseArc, MxDbEllipseShape, MxDbEntity, MxDbGradientLine, MxDbGroup, MxDbHatch, MxDbImage, MxDbLayerTableRecord, MxDbLeadComment, MxDbLeadTag, MxDbLine, MxDbLineShape, MxDbPolyline, MxDbRect, MxDbRectBoxLeadComment, MxDbRegularPolygon, MxDbRegularPolygonShape, MxDbRingShape, MxDbSVG, MxDbSVGText, MxDbShape, MxDbSplineCurve, MxDbStarShape, MxDbText, MxDrawObject, MxFilters, MxFun, MxPaintBrush, MxThreeJS, MxType, Mxassembly, Mx as default, loadCoreCode, store, useCanvasResizeListener };
5147
+ export { DetailedResult, DynamicInputType, Layer, McEdGetPointWorldDrawObject, McGePoint3d, McGePoint3dArray, McGeTool, McGiWorldDraw, McGiWorldDrawType, MrxDbgUiPrBaseReturn, MrxDbgUiPrPoint, MrxDbgUtils, Mx2PointArc, Mx3PointArc, MxCADObject, MxCursorType, MxDb2LineAngularDimension, MxDbAlignedDimension, MxDbAnyLine, MxDbArcShapeDraw, MxDbArea, MxDbArrow, MxDbCircleArc, MxDbCircleShape, MxDbCloudLine, MxDbCoord, MxDbDatabase, MxDbEllipse, MxDbEllipseArc, MxDbEllipseShape, MxDbEntity, MxDbGradientLine, MxDbGroup, MxDbHatch, MxDbImage, MxDbLayerTableRecord, MxDbLeadComment, MxDbLeadTag, MxDbLine, MxDbLineShape, MxDbPolyline, MxDbRect, MxDbRectBoxLeadComment, MxDbRegularPolygon, MxDbRegularPolygonShape, MxDbRingShape, MxDbSVG, MxDbSVGText, MxDbShape, MxDbSplineCurve, MxDbStarShape, MxDbText, MxDrawObject, MxFilters, MxFun, MxPaintBrush, MxThreeJS, MxType, Mxassembly, Mx as default, loadCoreCode, store, useCanvasResizeListener };