mxcad 1.0.66 → 1.0.68
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 +148 -33
- package/dist/mxcad.es.js +656 -569
- package/dist/mxcad.umd.js +36 -38
- package/dist/wasm/2d/mxdrawassembly_min.js +555 -547
- package/dist/wasm/2d/mxdrawassembly_min.wasm +0 -0
- package/dist/wasm/2d-st/mxdrawassembly_min.js +542 -534
- package/dist/wasm/2d-st/mxdrawassembly_minst.wasm +0 -0
- package/package.json +1 -1
package/dist/mxcad.d.ts
CHANGED
|
@@ -235,6 +235,100 @@ export declare class McGeMatrix3d {
|
|
|
235
235
|
*/
|
|
236
236
|
getData(row: number, col: number): number;
|
|
237
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* 整数数组
|
|
240
|
+
*/
|
|
241
|
+
export declare class McGeLongArray {
|
|
242
|
+
imp: any;
|
|
243
|
+
/**
|
|
244
|
+
* 构造函数。
|
|
245
|
+
*/
|
|
246
|
+
constructor(imp?: object);
|
|
247
|
+
/**
|
|
248
|
+
* 复制对象的值
|
|
249
|
+
*/
|
|
250
|
+
copy(val: McGeLongArray): this;
|
|
251
|
+
/**
|
|
252
|
+
* 添加一个值
|
|
253
|
+
*/
|
|
254
|
+
append(val: number): void;
|
|
255
|
+
/**
|
|
256
|
+
* 返回数组长度
|
|
257
|
+
*/
|
|
258
|
+
length(): number;
|
|
259
|
+
/**
|
|
260
|
+
* 得到数据元素的值
|
|
261
|
+
*/
|
|
262
|
+
at(index: number): number;
|
|
263
|
+
/**
|
|
264
|
+
* 设置数据元素的值
|
|
265
|
+
*/
|
|
266
|
+
setAt(index: number, val: number): void;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* 表示字符串的数组
|
|
270
|
+
*/
|
|
271
|
+
export declare class McGeStringArray {
|
|
272
|
+
imp: any;
|
|
273
|
+
/**
|
|
274
|
+
* 构造函数。
|
|
275
|
+
*/
|
|
276
|
+
constructor(imp?: object);
|
|
277
|
+
/**
|
|
278
|
+
* 复制对象的值
|
|
279
|
+
*/
|
|
280
|
+
copy(val: McGeStringArray): this;
|
|
281
|
+
/**
|
|
282
|
+
* 添加一个值
|
|
283
|
+
*/
|
|
284
|
+
append(val: number): void;
|
|
285
|
+
/**
|
|
286
|
+
* 返回数组长度
|
|
287
|
+
*/
|
|
288
|
+
length(): number;
|
|
289
|
+
/**
|
|
290
|
+
* 得到数据元素的值
|
|
291
|
+
*/
|
|
292
|
+
at(index: number, decodeFromGb2312?: boolean): string;
|
|
293
|
+
/**
|
|
294
|
+
* 设置数据元素的值
|
|
295
|
+
*/
|
|
296
|
+
setAt(index: number, val: string, decodeFromGb2312?: boolean): void;
|
|
297
|
+
/**
|
|
298
|
+
* 遍历数组
|
|
299
|
+
*/
|
|
300
|
+
forEach(call: (val: string, index: number) => void, decodeFromGb2312?: boolean): void;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* 表示三维点的数组
|
|
304
|
+
*/
|
|
305
|
+
export declare class McGePoint3dArray {
|
|
306
|
+
imp: any;
|
|
307
|
+
/**
|
|
308
|
+
* 构造函数。
|
|
309
|
+
*/
|
|
310
|
+
constructor(imp?: object);
|
|
311
|
+
/**
|
|
312
|
+
* 复制对象的值
|
|
313
|
+
*/
|
|
314
|
+
copy(val: McGePoint3dArray): this;
|
|
315
|
+
/**
|
|
316
|
+
* 添加一个值
|
|
317
|
+
*/
|
|
318
|
+
append(val: McGePoint3d): void;
|
|
319
|
+
/**
|
|
320
|
+
* 返回数组长度
|
|
321
|
+
*/
|
|
322
|
+
length(): number;
|
|
323
|
+
/**
|
|
324
|
+
* 得到数据元素的值
|
|
325
|
+
*/
|
|
326
|
+
at(index: number): McGePoint3d;
|
|
327
|
+
/**
|
|
328
|
+
* 设置数据元素的值
|
|
329
|
+
*/
|
|
330
|
+
setAt(index: number, val: McGePoint3d): void;
|
|
331
|
+
}
|
|
238
332
|
/**
|
|
239
333
|
* 表示一个 Rx 对象的基类。
|
|
240
334
|
*/
|
|
@@ -425,7 +519,7 @@ export declare class McDrawResbuf extends McRxObject {
|
|
|
425
519
|
* @param lItem 数据项索引。
|
|
426
520
|
* @returns 包含字符串和返回值的对象。
|
|
427
521
|
*/
|
|
428
|
-
AtString(lItem: number): {
|
|
522
|
+
AtString(lItem: number, decodeFromGb2312?: boolean): {
|
|
429
523
|
val: string;
|
|
430
524
|
ret: number;
|
|
431
525
|
};
|
|
@@ -470,7 +564,7 @@ export declare class McDrawResbuf extends McRxObject {
|
|
|
470
564
|
* @param lDataType 数据类型。
|
|
471
565
|
* @returns 添加的数据项索引。
|
|
472
566
|
*/
|
|
473
|
-
AddString(str: string, lDataType?: number): number;
|
|
567
|
+
AddString(str: string, lDataType?: number, decodeFromGb2312?: boolean): number;
|
|
474
568
|
/**
|
|
475
569
|
* 添加点坐标到 resbuf 中。
|
|
476
570
|
* @param pt 点坐标。
|
|
@@ -560,20 +654,20 @@ export declare class McDbEntity extends McDbObject {
|
|
|
560
654
|
*/
|
|
561
655
|
get colorIndex(): number;
|
|
562
656
|
/**
|
|
563
|
-
|
|
564
|
-
|
|
657
|
+
* 设置对象颜色索引
|
|
658
|
+
*/
|
|
565
659
|
set colorIndex(val: number);
|
|
566
660
|
/**
|
|
567
|
-
|
|
568
|
-
|
|
661
|
+
* 得到对象图层名
|
|
662
|
+
*/
|
|
569
663
|
get layer(): string;
|
|
570
664
|
/**
|
|
571
|
-
|
|
572
|
-
|
|
665
|
+
* 设置对象图层名
|
|
666
|
+
*/
|
|
573
667
|
set layer(val: string);
|
|
574
668
|
/**
|
|
575
|
-
|
|
576
|
-
|
|
669
|
+
* 得到对象线型比例
|
|
670
|
+
*/
|
|
577
671
|
get linetypeScale(): number;
|
|
578
672
|
/**
|
|
579
673
|
* 设置对象线型比例
|
|
@@ -596,8 +690,8 @@ export declare class McDbEntity extends McDbObject {
|
|
|
596
690
|
*/
|
|
597
691
|
set lineweight(val: number);
|
|
598
692
|
/**
|
|
599
|
-
|
|
600
|
-
|
|
693
|
+
* 得到对象文字样式
|
|
694
|
+
*/
|
|
601
695
|
get textStyle(): string;
|
|
602
696
|
/**
|
|
603
697
|
* 设置对象文字样式
|
|
@@ -620,16 +714,16 @@ export declare class McDbEntity extends McDbObject {
|
|
|
620
714
|
*/
|
|
621
715
|
Mirror(point1: McGePoint3d, point2: McGePoint3d): boolean;
|
|
622
716
|
/**
|
|
623
|
-
|
|
624
|
-
|
|
717
|
+
*缩放对象
|
|
718
|
+
*/
|
|
625
719
|
ScaleEntity(basePoint: McGePoint3d, dScaleFactor: number): boolean;
|
|
626
720
|
/**
|
|
627
721
|
*变换对象
|
|
628
722
|
*/
|
|
629
723
|
TransformBy(transformationMatrix: McGeMatrix3d): boolean;
|
|
630
724
|
/**
|
|
631
|
-
|
|
632
|
-
|
|
725
|
+
*得到对象的最小外包
|
|
726
|
+
*/
|
|
633
727
|
GetBoundingBox(): {
|
|
634
728
|
minPt: McGePoint3d;
|
|
635
729
|
maxPt: McGePoint3d;
|
|
@@ -698,22 +792,22 @@ export declare class McDbCurve extends McDbEntity {
|
|
|
698
792
|
ret: number;
|
|
699
793
|
};
|
|
700
794
|
/**
|
|
701
|
-
|
|
702
|
-
|
|
795
|
+
* 得到曲线的开始点
|
|
796
|
+
*/
|
|
703
797
|
getStartPoint(): {
|
|
704
798
|
val: McGePoint3d;
|
|
705
799
|
ret: number;
|
|
706
800
|
};
|
|
707
801
|
/**
|
|
708
|
-
|
|
709
|
-
|
|
802
|
+
* 得到曲线的结束点
|
|
803
|
+
*/
|
|
710
804
|
getEndPoint(): {
|
|
711
805
|
val: McGePoint3d;
|
|
712
806
|
ret: number;
|
|
713
807
|
};
|
|
714
808
|
/**
|
|
715
|
-
|
|
716
|
-
|
|
809
|
+
* 得到曲线参数所在的点坐标
|
|
810
|
+
*/
|
|
717
811
|
getPointAtParam(param: number): {
|
|
718
812
|
val: McGePoint3d;
|
|
719
813
|
ret: number;
|
|
@@ -726,8 +820,8 @@ export declare class McDbCurve extends McDbEntity {
|
|
|
726
820
|
ret: number;
|
|
727
821
|
};
|
|
728
822
|
/**
|
|
729
|
-
|
|
730
|
-
|
|
823
|
+
* 通过曲线参数得到曲线的一阶导数
|
|
824
|
+
*/
|
|
731
825
|
getFirstDeriv(param: number): {
|
|
732
826
|
val: McGeVector3d;
|
|
733
827
|
ret: number;
|
|
@@ -781,7 +875,7 @@ export declare class McDbLine extends McDbCurve {
|
|
|
781
875
|
* 构造函数。
|
|
782
876
|
* @param imp C++ 实现对象。
|
|
783
877
|
*/
|
|
784
|
-
constructor(
|
|
878
|
+
constructor(x1?: object | number, y1?: object | number, z1?: number, x2?: number, y2?: number, z2?: number);
|
|
785
879
|
/**
|
|
786
880
|
* 获取起点。
|
|
787
881
|
*/
|
|
@@ -1360,8 +1454,8 @@ export declare class McDbArc extends McDbCurve {
|
|
|
1360
1454
|
*/
|
|
1361
1455
|
set radius(r: number);
|
|
1362
1456
|
/**
|
|
1363
|
-
|
|
1364
|
-
|
|
1457
|
+
* 获取圆半径。
|
|
1458
|
+
*/
|
|
1365
1459
|
get startAngle(): number;
|
|
1366
1460
|
/**
|
|
1367
1461
|
* 设置圆半径。
|
|
@@ -1369,14 +1463,18 @@ export declare class McDbArc extends McDbCurve {
|
|
|
1369
1463
|
*/
|
|
1370
1464
|
set startAngle(r: number);
|
|
1371
1465
|
/**
|
|
1372
|
-
|
|
1373
|
-
|
|
1466
|
+
* 获取圆半径。
|
|
1467
|
+
*/
|
|
1374
1468
|
get endAngle(): number;
|
|
1375
1469
|
/**
|
|
1376
1470
|
* 设置圆半径。
|
|
1377
1471
|
* @param r 圆半径。
|
|
1378
1472
|
*/
|
|
1379
1473
|
set endAngle(r: number);
|
|
1474
|
+
/**
|
|
1475
|
+
* 3点计算圆弧
|
|
1476
|
+
*/
|
|
1477
|
+
computeArc(dStartPointX: number, dStartPointY: number, dMidPointX: number, dMidPointY: number, dEndPointX: number, dEndPointY: number): boolean;
|
|
1380
1478
|
}
|
|
1381
1479
|
/**
|
|
1382
1480
|
* McDb 命名空间包含 AutoCAD 中的一些常用枚举。
|
|
@@ -1681,13 +1779,17 @@ export declare class McDbDatabase extends McRxObject {
|
|
|
1681
1779
|
*/
|
|
1682
1780
|
SetCurrentlyLayerName(sName: string): void;
|
|
1683
1781
|
/**
|
|
1684
|
-
*
|
|
1685
|
-
* @returns
|
|
1782
|
+
* 获取当前CAD颜色。
|
|
1783
|
+
* @returns 当前CAD颜色。
|
|
1686
1784
|
*/
|
|
1687
1785
|
GetCurrentlyTrueColor(): McCmColor;
|
|
1688
1786
|
/**
|
|
1689
|
-
|
|
1690
|
-
|
|
1787
|
+
* 获取当前绘图使用的颜色
|
|
1788
|
+
*/
|
|
1789
|
+
GetCurrentlyDrawColor(): THREE.Color;
|
|
1790
|
+
/**
|
|
1791
|
+
* 设置当前CAD颜色。
|
|
1792
|
+
* @param color CAD颜色。
|
|
1691
1793
|
*/
|
|
1692
1794
|
SetCurrentlyTrueColor(color: McCmColor): any;
|
|
1693
1795
|
/**
|
|
@@ -2236,6 +2338,11 @@ export declare class McObject {
|
|
|
2236
2338
|
* @param pObjectImp - 待销毁的 McRxObjectImp 对象
|
|
2237
2339
|
*/
|
|
2238
2340
|
DestroyObject(pObjectImp: McRxObjectImp): void;
|
|
2341
|
+
/**
|
|
2342
|
+
* 得到所有布局名
|
|
2343
|
+
*/
|
|
2344
|
+
GetAllLayoutName(): McGeStringArray;
|
|
2345
|
+
SetCurrentLayout(layoutName: string): void;
|
|
2239
2346
|
}
|
|
2240
2347
|
/**
|
|
2241
2348
|
* McAppType 类,提供了 MxCAD 的一些基本操作。
|
|
@@ -2331,6 +2438,14 @@ export declare class MxCppType {
|
|
|
2331
2438
|
* @returns {McGePoint3d} McGePoint3d 实例
|
|
2332
2439
|
*/
|
|
2333
2440
|
NewMcGePoint3d(pt?: any, isDoc?: boolean): McGePoint3d;
|
|
2441
|
+
/**
|
|
2442
|
+
* 返回当前活动的CAD对象
|
|
2443
|
+
*/
|
|
2444
|
+
GetCurrentMxCAD(): McObject;
|
|
2445
|
+
/**
|
|
2446
|
+
* 返回当前活动的CAD对象的数据库对象.
|
|
2447
|
+
*/
|
|
2448
|
+
GetCurrentDatabase(): McDbDatabase;
|
|
2334
2449
|
}
|
|
2335
2450
|
export declare let MxCpp: MxCppType;
|
|
2336
2451
|
export declare function loadMxCADassembly(call?: (MxCpp: MxCppType) => void, locateFile?: (fileName: string, base?: string | URL) => string, wasmBinary?: ArrayBuffer, fontspath?: string, networkFonts?: string[]): Promise<MxCppType>;
|