mxcad 1.0.144 → 1.0.145

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/mxcad.d.ts CHANGED
@@ -36,6 +36,187 @@ export declare const MxTools: {
36
36
  _ML_String: typeof _ML_String;
37
37
  IsZero: typeof IsZero;
38
38
  };
39
+ /**
40
+ * 表示一个 Rx 对象的基类。
41
+ */
42
+ export declare class McRxObject {
43
+ /**
44
+ * 内部实现对象。
45
+ */
46
+ protected imp: any;
47
+ /**
48
+ * 构造函数。
49
+ * @param imp 内部实现对象。
50
+ */
51
+ constructor(imp?: any);
52
+ /**
53
+ * 获取内部实现对象。
54
+ * @returns 内部实现对象。
55
+ */
56
+ getImp(): any;
57
+ /**
58
+ * 初始化临时对象。
59
+ * @param imp 内部实现对象。
60
+ */
61
+ initTempObject(imp: any): void;
62
+ /**
63
+ * 获取对象名称。
64
+ */
65
+ get objectName(): string;
66
+ /**
67
+ * 获取 DXF 代码 0 的值。
68
+ */
69
+ get dxf0(): string;
70
+ /**
71
+ * 获取 JSON 格式的字符串。
72
+ * @returns JSON 格式的字符串。
73
+ */
74
+ getJson(): string;
75
+ /**
76
+ * 设置 JSON 格式的字符串。
77
+ * @param str JSON 格式的字符串。
78
+ * @returns 是否设置成功。
79
+ */
80
+ setJson(str: string): boolean;
81
+ isKindOf(sObjectName: string): boolean;
82
+ isNull(): any;
83
+ }
84
+ /**
85
+ * 枚举类型 McObjectIdType 表示对象的类型。
86
+ *
87
+ * @remarks
88
+ * - kMxCAD: CAD 对象。
89
+ * - kMxDraw: 绘图对象。
90
+ * - kInvalid:无效对象。
91
+ */
92
+ export declare enum McObjectIdType {
93
+ kMxCAD = 0,
94
+ kMxDraw = 1,
95
+ kInvalid = 2
96
+ }
97
+ /**
98
+ * McObjectId类表示一个模型对象的唯一标识符。
99
+ */
100
+ export declare class McObjectId {
101
+ id: number;
102
+ type: McObjectIdType;
103
+ /**
104
+ * 创建一个McObjectId实例。
105
+ * @param id 对象的唯一标识符。
106
+ * @param type 对象的类型。
107
+ */
108
+ constructor(id?: number, type?: McObjectIdType);
109
+ /**
110
+ * id是否有效.
111
+ */
112
+ isValid(): boolean;
113
+ /**
114
+ * id是指向的以像,是否是删除状态.
115
+ */
116
+ isErase(): boolean;
117
+ /**
118
+ * 删除对象。
119
+ */
120
+ erase(isErase?: boolean): void;
121
+ /**
122
+ * 返回MxCAD McDbObject对象。
123
+ */
124
+ getMcDbObject(): McDbObject | null;
125
+ /**
126
+ * 判断一个对象的类型
127
+ */
128
+ isKindOf(className: string): boolean;
129
+ /**
130
+ * 返回MxCAD McDbEntity 对象。
131
+ */
132
+ getMcDbEntity(): McDbEntity | null;
133
+ /**
134
+ * 返回MxCAD McDbCurve 对象。
135
+ */
136
+ getMcDbCurve(): McDbCurve | null;
137
+ /**
138
+ * 返回MxCAD McDbBlockTableRecord 对象。
139
+ */
140
+ getMcDbBlockTableRecord(): McDbBlockTableRecord | null;
141
+ /**
142
+ * 返回MxCAD McDbLayerTableRecord 对象。
143
+ */
144
+ getMcDbLayerTableRecord(): McDbLayerTableRecord | null;
145
+ /**
146
+ * 返回MxCAD McDbLinetypeTableRecord 对象。
147
+ */
148
+ getMcDbLinetypeTableRecord(): McDbLinetypeTableRecord | null;
149
+ /**
150
+ * 返回MxCAD McDbTextStyleTableRecord 对象。
151
+ */
152
+ getMcDbTextStyleTableRecord(): McDbTextStyleTableRecord | null;
153
+ /**
154
+ * 返回MxCAD McDbDimension 对象。
155
+ */
156
+ getMcDbDimension(): McDbDimension | null;
157
+ clone(): McDbObject | null;
158
+ /**
159
+ * 返回id指向的对象名称.
160
+ */
161
+ getObjectName(): string;
162
+ /**
163
+ * 返回MxDraw对象。
164
+ */
165
+ getMxDbEntity(): MxDbEntity | null;
166
+ getMcDbRasterImageDef(): McDbRasterImageDef | null;
167
+ }
168
+ /**
169
+ * 表示一个数据库对象。
170
+ */
171
+ export declare class McDbObject extends McRxObject {
172
+ /**
173
+ * 构造函数。
174
+ * @param imp 内部实现对象。
175
+ */
176
+ constructor(imp?: any);
177
+ /**
178
+ * 获取对象 ID。
179
+ * @returns 对象 ID。
180
+ */
181
+ getObjectID(): McObjectId;
182
+ /**
183
+ * 删除对象。
184
+ * @returns 是否删除成功。
185
+ */
186
+ erase(): boolean;
187
+ /**
188
+ * 对象是否已经删除
189
+ */
190
+ isErased(): boolean;
191
+ /**
192
+ * 反删除对象。
193
+ */
194
+ unErase(): boolean;
195
+ /**
196
+ * 克隆对象。
197
+ * @returns 克隆出的对象。
198
+ */
199
+ clone(): McDbObject | null;
200
+ /**
201
+ * 得到对象句柄
202
+ */
203
+ getHandle(): string;
204
+ /**
205
+ * 得到对象所在的数据库
206
+ */
207
+ getDatabase(): McDbDatabase;
208
+ /**
209
+ * 得到对象拥用者的id
210
+ */
211
+ getOwnerID(): number;
212
+ }
213
+ export declare class McDbObjectArray {
214
+ aryVal: McDbObject[];
215
+ constructor(imp?: any);
216
+ forEach(call: (val: McDbObject, index: number) => void): void;
217
+ length(): number;
218
+ empty(): boolean;
219
+ }
39
220
  /**
40
221
  * 表示三维点的对象。
41
222
  */
@@ -404,187 +585,6 @@ export declare class MdGeDoubleArray {
404
585
  */
405
586
  forEach(call: (val: number, index: number) => void): void;
406
587
  }
407
- /**
408
- * 表示一个 Rx 对象的基类。
409
- */
410
- export declare class McRxObject {
411
- /**
412
- * 内部实现对象。
413
- */
414
- protected imp: any;
415
- /**
416
- * 构造函数。
417
- * @param imp 内部实现对象。
418
- */
419
- constructor(imp?: any);
420
- /**
421
- * 获取内部实现对象。
422
- * @returns 内部实现对象。
423
- */
424
- getImp(): any;
425
- /**
426
- * 初始化临时对象。
427
- * @param imp 内部实现对象。
428
- */
429
- initTempObject(imp: any): void;
430
- /**
431
- * 获取对象名称。
432
- */
433
- get objectName(): string;
434
- /**
435
- * 获取 DXF 代码 0 的值。
436
- */
437
- get dxf0(): string;
438
- /**
439
- * 获取 JSON 格式的字符串。
440
- * @returns JSON 格式的字符串。
441
- */
442
- getJson(): string;
443
- /**
444
- * 设置 JSON 格式的字符串。
445
- * @param str JSON 格式的字符串。
446
- * @returns 是否设置成功。
447
- */
448
- setJson(str: string): boolean;
449
- isKindOf(sObjectName: string): boolean;
450
- isNull(): any;
451
- }
452
- /**
453
- * 枚举类型 McObjectIdType 表示对象的类型。
454
- *
455
- * @remarks
456
- * - kMxCAD: CAD 对象。
457
- * - kMxDraw: 绘图对象。
458
- * - kInvalid:无效对象。
459
- */
460
- export declare enum McObjectIdType {
461
- kMxCAD = 0,
462
- kMxDraw = 1,
463
- kInvalid = 2
464
- }
465
- /**
466
- * McObjectId类表示一个模型对象的唯一标识符。
467
- */
468
- export declare class McObjectId {
469
- id: number;
470
- type: McObjectIdType;
471
- /**
472
- * 创建一个McObjectId实例。
473
- * @param id 对象的唯一标识符。
474
- * @param type 对象的类型。
475
- */
476
- constructor(id?: number, type?: McObjectIdType);
477
- /**
478
- * id是否有效.
479
- */
480
- isValid(): boolean;
481
- /**
482
- * id是指向的以像,是否是删除状态.
483
- */
484
- isErase(): boolean;
485
- /**
486
- * 删除对象。
487
- */
488
- erase(isErase?: boolean): void;
489
- /**
490
- * 返回MxCAD McDbObject对象。
491
- */
492
- getMcDbObject(): McDbObject | null;
493
- /**
494
- * 判断一个对象的类型
495
- */
496
- isKindOf(className: string): boolean;
497
- /**
498
- * 返回MxCAD McDbEntity 对象。
499
- */
500
- getMcDbEntity(): McDbEntity | null;
501
- /**
502
- * 返回MxCAD McDbCurve 对象。
503
- */
504
- getMcDbCurve(): McDbCurve | null;
505
- /**
506
- * 返回MxCAD McDbBlockTableRecord 对象。
507
- */
508
- getMcDbBlockTableRecord(): McDbBlockTableRecord | null;
509
- /**
510
- * 返回MxCAD McDbLayerTableRecord 对象。
511
- */
512
- getMcDbLayerTableRecord(): McDbLayerTableRecord | null;
513
- /**
514
- * 返回MxCAD McDbLinetypeTableRecord 对象。
515
- */
516
- getMcDbLinetypeTableRecord(): McDbLinetypeTableRecord | null;
517
- /**
518
- * 返回MxCAD McDbTextStyleTableRecord 对象。
519
- */
520
- getMcDbTextStyleTableRecord(): McDbTextStyleTableRecord | null;
521
- /**
522
- * 返回MxCAD McDbDimension 对象。
523
- */
524
- getMcDbDimension(): McDbDimension | null;
525
- clone(): McDbObject | null;
526
- /**
527
- * 返回id指向的对象名称.
528
- */
529
- getObjectName(): string;
530
- /**
531
- * 返回MxDraw对象。
532
- */
533
- getMxDbEntity(): MxDbEntity | null;
534
- getMcDbRasterImageDef(): McDbRasterImageDef | null;
535
- }
536
- /**
537
- * 表示一个数据库对象。
538
- */
539
- export declare class McDbObject extends McRxObject {
540
- /**
541
- * 构造函数。
542
- * @param imp 内部实现对象。
543
- */
544
- constructor(imp?: any);
545
- /**
546
- * 获取对象 ID。
547
- * @returns 对象 ID。
548
- */
549
- getObjectID(): McObjectId;
550
- /**
551
- * 删除对象。
552
- * @returns 是否删除成功。
553
- */
554
- erase(): boolean;
555
- /**
556
- * 对象是否已经删除
557
- */
558
- isErased(): boolean;
559
- /**
560
- * 反删除对象。
561
- */
562
- unErase(): boolean;
563
- /**
564
- * 克隆对象。
565
- * @returns 克隆出的对象。
566
- */
567
- clone(): McDbObject | null;
568
- /**
569
- * 得到对象句柄
570
- */
571
- getHandle(): string;
572
- /**
573
- * 得到对象所在的数据库
574
- */
575
- getDatabase(): McDbDatabase;
576
- /**
577
- * 得到对象拥用者的id
578
- */
579
- getOwnerID(): number;
580
- }
581
- export declare class McDbObjectArray {
582
- aryVal: McDbObject[];
583
- constructor(imp?: any);
584
- forEach(call: (val: McDbObject, index: number) => void): void;
585
- length(): number;
586
- empty(): boolean;
587
- }
588
588
  export declare function getFilterImp(filter?: MxCADResbuf | null): any;
589
589
  export declare enum MxCADResbufDataType {
590
590
  kLong = 1071,
@@ -3858,6 +3858,8 @@ export declare class MxDraw3d extends PubSub<{
3858
3858
  "eventModesSelected": (ids: number[]) => void;
3859
3859
  "eventAddToTree": (node: string) => void;
3860
3860
  "eventRemoveFromTree": (ids: number[]) => void;
3861
+ "eventFileSave": (fileName: string) => void;
3862
+ "eventRebuildTree": (tree_str: string) => void;
3861
3863
  }> implements MxDraw3dConfig {
3862
3864
  [x: string]: any;
3863
3865
  /** 监听wasm 文件加载成功事件 */
@@ -3920,6 +3922,12 @@ export interface MxDraw3d extends WasmConfig {
3920
3922
  getFileSize: (theFileName: string) => number;
3921
3923
  /** 获取文件的BufferPointer */
3922
3924
  getFileArryBufferPointer: (theFileName: string) => number;
3925
+ /** 新建文档 */
3926
+ creatDocument: () => boolean;
3927
+ /** 执行undo */
3928
+ executeUndo: () => boolean;
3929
+ /** 执行redo */
3930
+ executeRedo: () => boolean;
3923
3931
  /** 加载贴图图片 */
3924
3932
  loadTextureImg: (fileUrl: string, fileName: string) => void;
3925
3933
  /** 适应选中的对象 */
@@ -4157,6 +4165,7 @@ export declare class MdGeShape extends MdGeObject {
4157
4165
  Common(other: MdGeShape): MdGeShape;
4158
4166
  Section(other: MdGeShape): MdGeShape;
4159
4167
  ShapeType(): MdGe.MxShapeEnum;
4168
+ Quantities(): MdGeArray1OfReal;
4160
4169
  MirrorByPoint(theP: MdGePoint): void;
4161
4170
  MirroredByPoint(theP: MdGePoint): MdGeShape;
4162
4171
  MirrorByAxis(axis: MdGeAxis): void;
@@ -6784,6 +6793,7 @@ export declare class MdGeBRep {
6784
6793
  RemoveModelTexture(): void;
6785
6794
  ChangeSelectedMaterial(material: MdGeMaterialAspect): void;
6786
6795
  AddClipPlane(pln: MdGePlane): void;
6796
+ GetSelectedShapes(): MdGeListOfShape;
6787
6797
  }
6788
6798
  /**
6789
6799
  * 表示颜色