mxcad 1.0.210 → 1.0.211
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 +1213 -143
- package/dist/mxcad.es.js +1565 -656
- package/dist/mxcad.umd.js +2 -2
- package/dist/wasm/2d/mxdrawassembly_min.wasm +0 -0
- package/dist/wasm/2d-st/mxdrawassembly_minst.wasm +0 -0
- package/dist/wasm/3d/mxdraw3d_min.js +1841 -542
- package/dist/wasm/3d/mxdraw3d_min.wasm +0 -0
- package/package.json +3 -1
package/dist/mxcad.d.ts
CHANGED
|
@@ -352,16 +352,32 @@ export declare class McDbObjectArray {
|
|
|
352
352
|
* 表示三维点的对象。
|
|
353
353
|
*/
|
|
354
354
|
export declare class McGePoint3d {
|
|
355
|
+
/**
|
|
356
|
+
* 坐标系的原点
|
|
357
|
+
* @example
|
|
358
|
+
* ```ts
|
|
359
|
+
* const origin = McGePoint3d.kOrigin;
|
|
360
|
+
* ```
|
|
361
|
+
* */
|
|
355
362
|
static kOrigin: McGePoint3d;
|
|
363
|
+
/** 内部实现对象 */
|
|
356
364
|
imp: any;
|
|
357
365
|
/**
|
|
358
366
|
* 构造函数。
|
|
359
367
|
* @param dX X 坐标。
|
|
360
368
|
* @param dY Y 坐标。
|
|
361
369
|
* @param dZ Z 坐标。
|
|
370
|
+
* @example
|
|
371
|
+
* ```ts
|
|
372
|
+
* import { McGePoint3d } from 'mxcad'
|
|
373
|
+
*
|
|
374
|
+
* const point = new McGePoint3d(20,10,0);
|
|
375
|
+
* ```
|
|
362
376
|
*/
|
|
363
377
|
constructor(dX?: number | object, dY?: number, dZ?: number);
|
|
364
|
-
/**
|
|
378
|
+
/**
|
|
379
|
+
* 将当前对象的坐标信息转换为 THREE.Vector3 类的实例
|
|
380
|
+
* @return THREE.Vector3实例对象
|
|
365
381
|
* @example
|
|
366
382
|
* ```ts
|
|
367
383
|
* import { McGePoint3d } from "mxcad";
|
|
@@ -382,46 +398,76 @@ export declare class McGePoint3d {
|
|
|
382
398
|
*/
|
|
383
399
|
setFromVector3(val: THREE.Vector3): this;
|
|
384
400
|
/**
|
|
385
|
-
*
|
|
401
|
+
* 复制点对象的值
|
|
402
|
+
* @param val 点对象
|
|
403
|
+
* @return 复制后的点对象
|
|
404
|
+
* @example
|
|
405
|
+
* ```ts
|
|
406
|
+
* import { McGePoint3d } from "mxcad"
|
|
407
|
+
*
|
|
408
|
+
* const point1 = new McGePoint3d(20,10,0);
|
|
409
|
+
* const point2 = new McGePoint3d();
|
|
410
|
+
* point2.copy(point1);
|
|
411
|
+
* ```
|
|
386
412
|
*/
|
|
387
413
|
copy(val: McGePoint3d): this;
|
|
388
414
|
/**
|
|
389
415
|
* 使用矩阵变换该点
|
|
390
416
|
* @param leftSide 变换矩阵
|
|
417
|
+
* @returns 变换后的点对象
|
|
418
|
+
* @example
|
|
419
|
+
* ```ts
|
|
420
|
+
* import { McGePoint3d, McGeVector3d, McGeMatrix3d } from "mxcad"
|
|
421
|
+
*
|
|
422
|
+
* const point = new McGePoint3d(20,10,0);
|
|
423
|
+
let matrix = new McGeMatrix3d();
|
|
424
|
+
matrix.setToTranslation(new McGeVector3d(10,10,0));//平移
|
|
425
|
+
point.transformBy(matrix);
|
|
426
|
+
* ```
|
|
391
427
|
*/
|
|
392
428
|
transformBy(leftSide: McGeMatrix3d): this;
|
|
393
429
|
/**
|
|
394
430
|
* 计算点加上向量后的新位置
|
|
395
431
|
* @param vec 向量
|
|
432
|
+
* @return 计算后的点对象
|
|
396
433
|
* @example
|
|
397
434
|
* ```ts
|
|
398
|
-
* import { McGePoint3d } from "mxcad";
|
|
435
|
+
* import { McGePoint3d, McGeVector3d } from "mxcad";
|
|
399
436
|
*
|
|
400
437
|
* const pt1 = new McGePoint3d(20,10,0);
|
|
401
|
-
* const
|
|
402
|
-
* const vec = pt1.addvec(pt2);
|
|
438
|
+
* const pt = pt1.clone().addvec(new McGeVector3d(10,10,0))
|
|
403
439
|
* ```
|
|
404
440
|
*/
|
|
405
441
|
addvec(vec: McGeVector3d): this;
|
|
442
|
+
/**
|
|
443
|
+
* 计算点加上向量后的新位置
|
|
444
|
+
* @param vec 向量
|
|
445
|
+
* @return 计算后的点对象
|
|
446
|
+
*/
|
|
406
447
|
av(vec: McGeVector3d): this;
|
|
407
448
|
/**
|
|
408
449
|
* 计算点减去向量后的新位置
|
|
409
450
|
* @param vec 向量
|
|
451
|
+
* @return 计算后的点对象
|
|
410
452
|
* @example
|
|
411
453
|
* ```ts
|
|
412
|
-
* import { McGePoint3d } from "mxcad";
|
|
454
|
+
* import { McGePoint3d, McGeVector3d } from "mxcad";
|
|
413
455
|
*
|
|
414
456
|
* const pt1 = new McGePoint3d(20,10,0);
|
|
415
|
-
* const
|
|
416
|
-
* const pt = pt1.clone().subvec(pt2);
|
|
417
|
-
* console.log(pt1)
|
|
457
|
+
* const pt = pt1.clone().subvec(new McGeVector3d(10,10,0));
|
|
418
458
|
* ```
|
|
419
459
|
*/
|
|
420
460
|
subvec(vec: McGeVector3d): this;
|
|
461
|
+
/**
|
|
462
|
+
* 计算点减去向量后的新位置
|
|
463
|
+
* @param vec 向量
|
|
464
|
+
* @return 计算后的点对象
|
|
465
|
+
*/
|
|
421
466
|
sv(vec: McGeVector3d): this;
|
|
422
467
|
/**
|
|
423
468
|
* 返回两点相减后得到的一个新的向量
|
|
424
|
-
* @param pt
|
|
469
|
+
* @param pt 三维点对象
|
|
470
|
+
* @return 三维点向量
|
|
425
471
|
* @example
|
|
426
472
|
* ```ts
|
|
427
473
|
* import { McGePoint3d } from "mxcad";
|
|
@@ -434,7 +480,8 @@ export declare class McGePoint3d {
|
|
|
434
480
|
sub(pt: McGePoint3d): McGeVector3d;
|
|
435
481
|
/**
|
|
436
482
|
* 计算两点距离
|
|
437
|
-
* @param pnt
|
|
483
|
+
* @param pnt 三维点对象
|
|
484
|
+
* @return 两点距离
|
|
438
485
|
* @example
|
|
439
486
|
* ```ts
|
|
440
487
|
* import { McGePoint3d } from "mxcad";
|
|
@@ -447,47 +494,158 @@ export declare class McGePoint3d {
|
|
|
447
494
|
distanceTo(pnt: McGePoint3d): number;
|
|
448
495
|
/**
|
|
449
496
|
* 判断两个点是否相等
|
|
497
|
+
* @param pnt 三维点对象
|
|
498
|
+
* @return 布尔值
|
|
499
|
+
* @example
|
|
500
|
+
* ```ts
|
|
501
|
+
* import { McGePoint3d } from "mxcad"
|
|
502
|
+
*
|
|
503
|
+
* const pt1 = new McGePoint3d(10,20,0);
|
|
504
|
+
* const pt2 = new McGePoint3d(10,10,0);
|
|
505
|
+
* const res = pt1.isEqualTo(pt2);
|
|
506
|
+
* console.log(res)//输出false
|
|
507
|
+
* ```
|
|
450
508
|
*/
|
|
451
509
|
isEqualTo(pnt: McGePoint3d): boolean;
|
|
452
510
|
/**
|
|
453
|
-
*
|
|
511
|
+
* 刻隆一个点对象
|
|
512
|
+
* @return 三维点对象
|
|
513
|
+
* @example
|
|
514
|
+
* ```ts
|
|
515
|
+
* import { McGePoint3d } from "mxcad"
|
|
516
|
+
*
|
|
517
|
+
* const pt1 = new McGePoint3d(10,10,0);
|
|
518
|
+
* const pt2 = pt1.clone();
|
|
519
|
+
* ```
|
|
454
520
|
*/
|
|
455
521
|
clone(): McGePoint3d;
|
|
522
|
+
/**
|
|
523
|
+
* 刻隆一个点对象
|
|
524
|
+
* @return 三维点对象
|
|
525
|
+
*/
|
|
456
526
|
c(): McGePoint3d;
|
|
457
527
|
/**
|
|
458
|
-
* X 坐标。
|
|
528
|
+
* 获取或设置 X 坐标。
|
|
529
|
+
* @param val X轴坐标值
|
|
530
|
+
* @example
|
|
531
|
+
* ```ts
|
|
532
|
+
* import { McGePoint3d } from "mxcad'
|
|
533
|
+
*
|
|
534
|
+
* const point = new McGePoint3d();
|
|
535
|
+
* point.x = 10;
|
|
536
|
+
* console.log(point.x)//输出10
|
|
537
|
+
* ```
|
|
459
538
|
*/
|
|
460
539
|
get x(): number;
|
|
461
540
|
set x(val: number);
|
|
462
541
|
/**
|
|
463
|
-
* Y 坐标。
|
|
542
|
+
* 获取或设置 Y 坐标。
|
|
543
|
+
* @param val Y轴坐标值
|
|
544
|
+
* @example
|
|
545
|
+
* ```ts
|
|
546
|
+
* import { McGePoint3d } from "mxcad'
|
|
547
|
+
*
|
|
548
|
+
* const point = new McGePoint3d();
|
|
549
|
+
* point.y = 10;
|
|
550
|
+
* console.log(point.y)//输出10
|
|
551
|
+
* ```
|
|
464
552
|
*/
|
|
465
553
|
get y(): number;
|
|
466
554
|
set y(val: number);
|
|
467
555
|
/**
|
|
468
|
-
|
|
556
|
+
*获取或设置 Z 坐标。
|
|
557
|
+
* @param val Z轴坐标值
|
|
558
|
+
* @example
|
|
559
|
+
* ```ts
|
|
560
|
+
* import { McGePoint3d } from "mxcad'
|
|
561
|
+
*
|
|
562
|
+
* const point = new McGePoint3d();
|
|
563
|
+
* point.z = 10;
|
|
564
|
+
* console.log(point.z)//输出10
|
|
565
|
+
* ```
|
|
469
566
|
*/
|
|
470
567
|
get z(): number;
|
|
471
568
|
set z(val: number);
|
|
472
569
|
}
|
|
473
570
|
/**
|
|
474
571
|
* 表示三维向量的对象。
|
|
572
|
+
* @example
|
|
573
|
+
* ```ts
|
|
574
|
+
* //求失量与X轴的夹角
|
|
575
|
+
* const angle1 = vetT.angleTo2(McGeVector3d.McGeVector3d.kXAxis ,McGeVector3d.kNegateZAxis)
|
|
576
|
+
* ```
|
|
577
|
+
* ```ts
|
|
578
|
+
* //求出vetFx逆时针到vetT的角度
|
|
579
|
+
* const angle2 = vetFx.angleTo2(vetT, McGeVector3d.kZAxis)
|
|
580
|
+
* ```
|
|
581
|
+
* ```ts
|
|
582
|
+
* //判断向量vetT在向量VetFX的左边,还是在右边的调用
|
|
583
|
+
* const angle3 = vetFx.angleTo2(vetT, McGeVector3d.kZAxis);
|
|
584
|
+
if(angle >= 0.0 && angle <= PI ){
|
|
585
|
+
//向量vetT在vetFX的左边.
|
|
586
|
+
} else {
|
|
587
|
+
//向量vetT在vetFX的右边.
|
|
588
|
+
}
|
|
589
|
+
// 或
|
|
590
|
+
if (vetFX.dotProduct(vetT.perpVector()) < 0){
|
|
591
|
+
// vetFX在vetT的左边。
|
|
592
|
+
}
|
|
593
|
+
* ```
|
|
475
594
|
*/
|
|
476
595
|
export declare class McGeVector3d {
|
|
477
|
-
/**
|
|
596
|
+
/**
|
|
597
|
+
* X轴单位向量, 指向正 X 轴方向
|
|
598
|
+
* @example
|
|
599
|
+
* ```ts
|
|
600
|
+
* import { McGeVector3d } from "mxcad"
|
|
601
|
+
*
|
|
602
|
+
* const x_vec = McGeVector3d.kXAxis;
|
|
603
|
+
* ```
|
|
604
|
+
* */
|
|
478
605
|
static kXAxis: McGeVector3d;
|
|
479
|
-
/**
|
|
606
|
+
/**
|
|
607
|
+
* Y轴单位向量, 指向正 Y 轴方向
|
|
608
|
+
* @example
|
|
609
|
+
* ```ts
|
|
610
|
+
* import { McGeVector3d } from "mxcad"
|
|
611
|
+
*
|
|
612
|
+
* const y_vec = McGeVector3d.kYAxis;
|
|
613
|
+
* ```
|
|
614
|
+
*/
|
|
480
615
|
static kYAxis: McGeVector3d;
|
|
481
|
-
/**
|
|
616
|
+
/**
|
|
617
|
+
* Z轴单位向量, 指向正 Z 轴方向
|
|
618
|
+
* @example
|
|
619
|
+
* ```ts
|
|
620
|
+
* import { McGeVector3d } from "mxcad"
|
|
621
|
+
*
|
|
622
|
+
* const y_vec = McGeVector3d.kZAxis;
|
|
623
|
+
* ```
|
|
624
|
+
*/
|
|
482
625
|
static kZAxis: McGeVector3d;
|
|
483
|
-
/**
|
|
626
|
+
/**
|
|
627
|
+
* Z轴单位向量, 指向负 Z 轴方向
|
|
628
|
+
* @example
|
|
629
|
+
* ```ts
|
|
630
|
+
* import { McGeVector3d } from "mxcad"
|
|
631
|
+
*
|
|
632
|
+
* const zNegate_vec = McGeVector3d.kNegateZAxis;
|
|
633
|
+
* ```
|
|
634
|
+
*/
|
|
484
635
|
static kNegateZAxis: McGeVector3d;
|
|
636
|
+
/** 内部实现对象 */
|
|
485
637
|
imp: any;
|
|
486
638
|
/**
|
|
487
639
|
* 构造函数。
|
|
488
640
|
* @param dX X 坐标。
|
|
489
641
|
* @param dY Y 坐标。
|
|
490
642
|
* @param dZ Z 坐标。
|
|
643
|
+
* @example
|
|
644
|
+
* ```ts
|
|
645
|
+
* import { MdGeVector3d } from "mxcad";
|
|
646
|
+
*
|
|
647
|
+
* const vec = new MdGeVector3d(20,10,0)
|
|
648
|
+
* ```
|
|
491
649
|
*/
|
|
492
650
|
constructor(dX?: number | object, dY?: number, dZ?: number);
|
|
493
651
|
/** 转换为THREE.Vector3
|
|
@@ -502,12 +660,34 @@ export declare class McGeVector3d {
|
|
|
502
660
|
toVector3(): THREE.Vector3;
|
|
503
661
|
/**
|
|
504
662
|
* 复制对象的值
|
|
663
|
+
* @param val 三维向量对象
|
|
664
|
+
* @return 复制后的三维向量对象
|
|
665
|
+
* @example
|
|
666
|
+
* ```ts
|
|
667
|
+
* import { McGeVector3d } from "mxcad"
|
|
668
|
+
*
|
|
669
|
+
* const vec1 = new McGeVector3d(20,10,0);
|
|
670
|
+
* const vec2 = new McGeVector3d();
|
|
671
|
+
* vec2.copy(vec1);
|
|
672
|
+
* ```
|
|
505
673
|
*/
|
|
506
674
|
copy(val: McGeVector3d): this;
|
|
507
675
|
/**
|
|
508
|
-
*
|
|
676
|
+
* 刻隆一个向量对象
|
|
677
|
+
* @return 三维向量对象
|
|
678
|
+
* @example
|
|
679
|
+
* ```ts
|
|
680
|
+
* import { McGeVector3d } from "mxcad"
|
|
681
|
+
*
|
|
682
|
+
* const vec1 = new McGeVector3d(20,10,0);
|
|
683
|
+
* const vec2 = vec1.clone();
|
|
684
|
+
* ```
|
|
509
685
|
*/
|
|
510
686
|
clone(): McGeVector3d;
|
|
687
|
+
/**
|
|
688
|
+
* 刻隆一个向量对象
|
|
689
|
+
* @return 三维向量对象
|
|
690
|
+
*/
|
|
511
691
|
c(): McGeVector3d;
|
|
512
692
|
/** 旋转
|
|
513
693
|
* @param ang 旋转角度。
|
|
@@ -521,11 +701,29 @@ export declare class McGeVector3d {
|
|
|
521
701
|
* ```
|
|
522
702
|
* */
|
|
523
703
|
rotateBy(ang: number, axis?: McGeVector3d): this;
|
|
524
|
-
/**
|
|
704
|
+
/**
|
|
705
|
+
* 向量取反
|
|
706
|
+
* @example
|
|
707
|
+
* ```ts
|
|
708
|
+
* import { McGeVector3d } from "mxcad";
|
|
709
|
+
*
|
|
710
|
+
* const vec = new McGeVector3d(20,10,0);
|
|
711
|
+
* vec_neg = vec.clone().negate()
|
|
712
|
+
* ```
|
|
713
|
+
* */
|
|
525
714
|
negate(): this;
|
|
526
|
-
/**
|
|
715
|
+
/**
|
|
716
|
+
* 垂直向量
|
|
717
|
+
* @example
|
|
718
|
+
* ```ts
|
|
719
|
+
* import { McGeVector3d } from "mxcad";
|
|
720
|
+
*
|
|
721
|
+
* const vec = new McGeVector3d(20,10,0);
|
|
722
|
+
* vec_perp = vec.clone().perpVector()
|
|
723
|
+
* ```
|
|
724
|
+
* */
|
|
527
725
|
perpVector(): this;
|
|
528
|
-
/**
|
|
726
|
+
/** 计算两向量在[0, Pi]范围内所夹的角度
|
|
529
727
|
* @example
|
|
530
728
|
* ```ts
|
|
531
729
|
* import { McGeVector3d } from "mxcad";
|
|
@@ -536,7 +734,7 @@ export declare class McGeVector3d {
|
|
|
536
734
|
* ```
|
|
537
735
|
* */
|
|
538
736
|
angleTo1(vec: McGeVector3d): number;
|
|
539
|
-
/**
|
|
737
|
+
/** 计算两向量在[0, 2*Pi]范围内所夹的角度
|
|
540
738
|
* @example
|
|
541
739
|
* ```ts
|
|
542
740
|
* import { McGeVector3d } from "mxcad";
|
|
@@ -546,7 +744,9 @@ export declare class McGeVector3d {
|
|
|
546
744
|
* ```
|
|
547
745
|
* */
|
|
548
746
|
angleTo2(vec: McGeVector3d, refVec?: McGeVector3d): number;
|
|
549
|
-
/**
|
|
747
|
+
/**
|
|
748
|
+
* 向量归一化操作
|
|
749
|
+
* @return 三维向量对象
|
|
550
750
|
* @example
|
|
551
751
|
* ```ts
|
|
552
752
|
* import { McGeVector3d } from "mxcad";
|
|
@@ -556,32 +756,136 @@ export declare class McGeVector3d {
|
|
|
556
756
|
* ```
|
|
557
757
|
* */
|
|
558
758
|
normalize(): this;
|
|
559
|
-
/**
|
|
759
|
+
/**
|
|
760
|
+
* 获取向量长度
|
|
761
|
+
* @return 向量长度
|
|
762
|
+
* @example
|
|
763
|
+
* ```ts
|
|
764
|
+
* import { McGeVector3d } from "mxcad";
|
|
765
|
+
*
|
|
766
|
+
* const vec1 = new McGeVector3d(20,10,0);
|
|
767
|
+
* const length = vec1.length();
|
|
768
|
+
* ```
|
|
769
|
+
* */
|
|
560
770
|
length(): number;
|
|
561
|
-
/**
|
|
771
|
+
/**
|
|
772
|
+
* 检查当前向量是否为单位长度
|
|
773
|
+
* @return 布尔值
|
|
774
|
+
* @example
|
|
775
|
+
* ```ts
|
|
776
|
+
* import { McGeVector3d } from "mxcad";
|
|
777
|
+
*
|
|
778
|
+
* const vec1 = new McGeVector3d(20,10,0);
|
|
779
|
+
* const res = vec1.isUnitLength();
|
|
780
|
+
* console.log(res)//输出false
|
|
781
|
+
* ```
|
|
782
|
+
* */
|
|
562
783
|
isUnitLength(): boolean;
|
|
563
|
-
/**
|
|
784
|
+
/**
|
|
785
|
+
* 是否为零向量
|
|
786
|
+
* @return 布尔值
|
|
787
|
+
* @example
|
|
788
|
+
* ```ts
|
|
789
|
+
* import { McGeVector3d } from "mxcad";
|
|
790
|
+
*
|
|
791
|
+
* const vec1 = new McGeVector3d(20,10,0);
|
|
792
|
+
* const res = vec1.isZeroLength();
|
|
793
|
+
* console.log(res)//输出false
|
|
794
|
+
* ```
|
|
795
|
+
* */
|
|
564
796
|
isZeroLength(): boolean;
|
|
565
|
-
/**
|
|
797
|
+
/**
|
|
798
|
+
* 两向量的点积
|
|
799
|
+
* @param vec 三维向量对象
|
|
800
|
+
* @return 点积结果
|
|
801
|
+
* @example
|
|
802
|
+
```ts
|
|
803
|
+
//判断两个向量方向相同还是相反
|
|
804
|
+
const db = vec1.dotProduct(vec2);
|
|
805
|
+
if(db < 0 ){
|
|
806
|
+
//向量返向.
|
|
807
|
+
}
|
|
808
|
+
// 两个向量点乘如果等于0,表示向量垂直。
|
|
809
|
+
// 两个向量点乘如果等于1,表示向量方向完全向同。
|
|
810
|
+
// 两个向量点乘如果等于-1,表示向量方向完全反向。
|
|
811
|
+
```
|
|
812
|
+
* */
|
|
566
813
|
dotProduct(vec: McGeVector3d): number;
|
|
567
|
-
/**
|
|
814
|
+
/**
|
|
815
|
+
* 两向量的交叉积
|
|
816
|
+
* @return 三维向量对象
|
|
817
|
+
* @example
|
|
818
|
+
* ```ts
|
|
819
|
+
* import { McGeVector3d } from "mxcad";
|
|
820
|
+
*
|
|
821
|
+
* const vec1 = new McGeVector3d(20,10,0);
|
|
822
|
+
* const vec2 = new McGeVector3d(10,10,0);
|
|
823
|
+
* const vec = vec2.crossProduct(vec1)
|
|
824
|
+
* ```
|
|
825
|
+
* */
|
|
568
826
|
crossProduct(vec: McGeVector3d): McGeVector3d;
|
|
569
|
-
/**
|
|
827
|
+
/**
|
|
828
|
+
* 判断比较两个向量是否相等
|
|
829
|
+
* @param vec 三维向量对象
|
|
830
|
+
* @return 布尔值
|
|
831
|
+
* ```ts
|
|
832
|
+
* import { McGeVector3d } from "mxcad";
|
|
833
|
+
*
|
|
834
|
+
* const vec1 = new McGeVector3d(20,10,0);
|
|
835
|
+
* const vec2 = new McGeVector3d(10,10,0);
|
|
836
|
+
* const res = vec1.isEqualTo(vec2)
|
|
837
|
+
* ```
|
|
838
|
+
* */
|
|
570
839
|
isEqualTo(vec: McGeVector3d): boolean;
|
|
571
|
-
/**
|
|
840
|
+
/**
|
|
841
|
+
* 向量与某个值相乘,修改向量长度
|
|
842
|
+
* @param val 数字
|
|
843
|
+
* @return 三维向量对象
|
|
844
|
+
* @example
|
|
845
|
+
* ```ts
|
|
846
|
+
* import { McGeVector3d } from "mxcad";
|
|
847
|
+
*
|
|
848
|
+
* const vec1 = new McGeVector3d(20,10,0);
|
|
849
|
+
* const vec = vec1.clone().normalize().mult(20)
|
|
850
|
+
* ```
|
|
851
|
+
* */
|
|
572
852
|
mult(val: number): this;
|
|
573
853
|
/**
|
|
574
|
-
* X 坐标。
|
|
854
|
+
* 获取或设置向量 X 坐标。
|
|
855
|
+
* @param val x轴坐标
|
|
856
|
+
* @example
|
|
857
|
+
* ```ts
|
|
858
|
+
* import { McGeVector3d } from "mxcad";
|
|
859
|
+
*
|
|
860
|
+
* const vec1 = new McGeVector3d();
|
|
861
|
+
* vec1.x = 10;
|
|
862
|
+
* ```
|
|
575
863
|
*/
|
|
576
864
|
get x(): number;
|
|
577
865
|
set x(val: number);
|
|
578
866
|
/**
|
|
579
|
-
* Y 坐标。
|
|
867
|
+
* 获取或设置向量 Y 坐标。
|
|
868
|
+
* @param val y轴坐标
|
|
869
|
+
* @example
|
|
870
|
+
* ```ts
|
|
871
|
+
* import { McGeVector3d } from "mxcad";
|
|
872
|
+
*
|
|
873
|
+
* const vec1 = new McGeVector3d();
|
|
874
|
+
* vec1.y = 10;
|
|
875
|
+
* ```
|
|
580
876
|
*/
|
|
581
877
|
get y(): number;
|
|
582
878
|
set y(val: number);
|
|
583
879
|
/**
|
|
584
|
-
* Z 坐标。
|
|
880
|
+
* 获取或设置向量 Z 坐标。
|
|
881
|
+
* @param val z轴坐标
|
|
882
|
+
* @example
|
|
883
|
+
* ```ts
|
|
884
|
+
* import { McGeVector3d } from "mxcad";
|
|
885
|
+
*
|
|
886
|
+
* const vec1 = new McGeVector3d();
|
|
887
|
+
* vec1.z = 0;
|
|
888
|
+
* ```
|
|
585
889
|
*/
|
|
586
890
|
get z(): number;
|
|
587
891
|
set z(val: number);
|
|
@@ -595,58 +899,129 @@ export declare class McGeMatrix3d {
|
|
|
595
899
|
/**
|
|
596
900
|
* 构造函数。
|
|
597
901
|
* @param imp 内部实现对象
|
|
902
|
+
* @example
|
|
903
|
+
* ```ts
|
|
904
|
+
* import { McGeMatrix3d } from "mxcad"
|
|
905
|
+
*
|
|
906
|
+
* const matrix = new McGeMatrix3d()
|
|
907
|
+
* ```
|
|
598
908
|
*/
|
|
599
909
|
constructor(imp?: object);
|
|
600
910
|
/**
|
|
601
911
|
* 复制对象的值
|
|
912
|
+
* @param val 三维矩阵对象
|
|
913
|
+
* @return 复制后的三维矩阵对象
|
|
914
|
+
* ```ts
|
|
915
|
+
* // matrix1 一个三维矩阵对象
|
|
916
|
+
* const matrix = new McGeMatrix3d();
|
|
917
|
+
* matrix.copy(matrix1)
|
|
918
|
+
* ```
|
|
602
919
|
*/
|
|
603
920
|
copy(val: McGeMatrix3d): this;
|
|
604
921
|
/**
|
|
605
|
-
*
|
|
922
|
+
* 刻隆一个三维矩阵对象
|
|
923
|
+
* @return 三维矩阵对象
|
|
924
|
+
* @example
|
|
925
|
+
* ```ts
|
|
926
|
+
* // matrix1 一个三维矩阵对象
|
|
927
|
+
* const matrix = matrix1.clone()
|
|
928
|
+
* ```
|
|
606
929
|
*/
|
|
607
930
|
clone(): McGeMatrix3d;
|
|
608
931
|
/**
|
|
609
932
|
* 将矩阵设置为单位矩阵。
|
|
933
|
+
* @example
|
|
934
|
+
* ```ts
|
|
935
|
+
* // matrix 表示一个三维矩阵对象
|
|
936
|
+
* matrix.setToIdentity()
|
|
937
|
+
* ```
|
|
610
938
|
*/
|
|
611
939
|
setToIdentity(): this;
|
|
612
940
|
/**
|
|
613
941
|
* 左乘指定的矩阵。
|
|
614
942
|
* @param leftSide 左侧矩阵。
|
|
943
|
+
* @return 返回左乘后的矩阵
|
|
944
|
+
* @example
|
|
945
|
+
* ```ts
|
|
946
|
+
* // matrix1 表示一个三维矩阵对象
|
|
947
|
+
* const matrix = new McGeMatrix3d()
|
|
948
|
+
* matrix.preMultBy(matrix1);
|
|
949
|
+
* ```
|
|
615
950
|
*/
|
|
616
951
|
preMultBy(leftSide: McGeMatrix3d): this;
|
|
617
952
|
/**
|
|
618
953
|
* 右乘指定的矩阵。
|
|
619
|
-
* @
|
|
954
|
+
* @return 返回右乘后的矩阵
|
|
955
|
+
* @example
|
|
956
|
+
* ```ts
|
|
957
|
+
* // matrix1 表示一个三维矩阵对象
|
|
958
|
+
* const matrix = new McGeMatrix3d()
|
|
959
|
+
* matrix.postMultBy(matrix1);
|
|
960
|
+
* ```
|
|
620
961
|
*/
|
|
621
962
|
postMultBy(rightSide: McGeMatrix3d): this;
|
|
622
963
|
/**
|
|
623
964
|
* 将矩阵设置为两个矩阵的乘积。
|
|
624
965
|
* @param mat1 第一个矩阵。
|
|
625
966
|
* @param mat2 第二个矩阵。
|
|
967
|
+
* @example
|
|
968
|
+
* ```ts
|
|
969
|
+
* // matrix1 matrix2 表示两个三维矩阵对象
|
|
970
|
+
* const matrix = new McGeMatrix3d()
|
|
971
|
+
* matrix.setToProduct(matrix1, matrix2);
|
|
972
|
+
* ```
|
|
626
973
|
*/
|
|
627
974
|
setToProduct(mat1: McGeMatrix3d, mat2: McGeMatrix3d): this;
|
|
628
975
|
/**
|
|
629
976
|
* 求矩阵的逆矩阵。
|
|
977
|
+
* @example
|
|
978
|
+
* ```ts
|
|
979
|
+
* // matrix表示一个三维矩阵对象
|
|
980
|
+
* const mat_invert = matrix.clone().invert();
|
|
981
|
+
* ```
|
|
630
982
|
*/
|
|
631
983
|
invert(): this;
|
|
632
984
|
/**
|
|
633
985
|
* 判断矩阵是否为奇异矩阵。
|
|
634
986
|
* @returns 如果是奇异矩阵返回 true,否则返回 false。
|
|
987
|
+
* @example
|
|
988
|
+
* ```ts
|
|
989
|
+
* // matrix表示一个三维矩阵对象
|
|
990
|
+
* const res = matrix.isSingular();
|
|
991
|
+
* console.log(res)
|
|
992
|
+
* ```
|
|
635
993
|
*/
|
|
636
994
|
isSingular(): boolean;
|
|
637
995
|
/**
|
|
638
996
|
* 将矩阵转置。
|
|
997
|
+
* @example
|
|
998
|
+
* ```ts
|
|
999
|
+
* // matrix表示一个三维矩阵对象
|
|
1000
|
+
* const mst_trs = matrix.clone().transposeIt();
|
|
1001
|
+
* ```
|
|
639
1002
|
*/
|
|
640
1003
|
transposeIt(): this;
|
|
641
1004
|
/**
|
|
642
1005
|
* 判断矩阵是否与指定的矩阵相等。
|
|
643
1006
|
* @param mat 指定的矩阵。
|
|
644
1007
|
* @returns 如果相等返回 true,否则返回 false。
|
|
1008
|
+
* @example
|
|
1009
|
+
* ```ts
|
|
1010
|
+
* // matrix1 matrix2 表示两个三维矩阵对象
|
|
1011
|
+
* const res = matrix1.isEqualTo(matrix2);
|
|
1012
|
+
* console.log(res)
|
|
1013
|
+
* ```
|
|
645
1014
|
*/
|
|
646
1015
|
isEqualTo(mat: McGeMatrix3d): boolean;
|
|
647
1016
|
/**
|
|
648
1017
|
* 求矩阵的行列式。
|
|
649
1018
|
* @returns 矩阵的行列式。
|
|
1019
|
+
* @example
|
|
1020
|
+
* ```ts
|
|
1021
|
+
* // matrix 表示一个三维矩阵对象
|
|
1022
|
+
* const detNum = matrix.det();
|
|
1023
|
+
* console.log(detNum)
|
|
1024
|
+
* ```
|
|
650
1025
|
*/
|
|
651
1026
|
det(): number;
|
|
652
1027
|
/**
|
|
@@ -655,6 +1030,13 @@ export declare class McGeMatrix3d {
|
|
|
655
1030
|
* @param xAxis X 轴向量。
|
|
656
1031
|
* @param yAxis Y 轴向量。
|
|
657
1032
|
* @param zAxis Z 轴向量。
|
|
1033
|
+
* @example
|
|
1034
|
+
* ```ts
|
|
1035
|
+
* import { McGeMatrix3d , McGePoint3d, McGeVector3d} from "mxcad"
|
|
1036
|
+
*
|
|
1037
|
+
* const m1 = new McGeMatrix3d()
|
|
1038
|
+
* m1.setCoordSystem(new McGePoint3d(), new McGeVector3d(), new McGeVector3d(), new McGeVector3d())
|
|
1039
|
+
* ```
|
|
658
1040
|
*/
|
|
659
1041
|
setCoordSystem(origin: McGePoint3d, xAxis: McGeVector3d, yAxis: McGeVector3d, zAxis: McGeVector3d): this;
|
|
660
1042
|
/**
|
|
@@ -707,8 +1089,8 @@ export declare class McGeMatrix3d {
|
|
|
707
1089
|
* @example
|
|
708
1090
|
* ```ts
|
|
709
1091
|
*import { McGeMatrix3d, McDbEntity } from "mxcad";
|
|
710
|
-
|
|
711
|
-
|
|
1092
|
+
|
|
1093
|
+
const matrix = new McGeMatrix3d();
|
|
712
1094
|
const event = new McDbEntity();
|
|
713
1095
|
matrix.setMirror(new McGeVector3d(0, 0, 0), new McGeVector3d(20, 0, 0));//平移
|
|
714
1096
|
event.transformBy(matrix);
|
|
@@ -718,6 +1100,12 @@ export declare class McGeMatrix3d {
|
|
|
718
1100
|
/**
|
|
719
1101
|
* 获取矩阵的缩放因子。
|
|
720
1102
|
* @returns 矩阵的缩放因子。
|
|
1103
|
+
* @example
|
|
1104
|
+
* ```ts
|
|
1105
|
+
* // matrix 表示一个三维矩阵对象
|
|
1106
|
+
* const scaleNum = matrix.scale()
|
|
1107
|
+
* console.log(scaleNum)
|
|
1108
|
+
* ```
|
|
721
1109
|
*/
|
|
722
1110
|
scale(): number;
|
|
723
1111
|
/**
|
|
@@ -725,6 +1113,12 @@ export declare class McGeMatrix3d {
|
|
|
725
1113
|
* @param row 行索引。
|
|
726
1114
|
* @param col 列索引。
|
|
727
1115
|
* @returns 指定位置的元素值。
|
|
1116
|
+
* @example
|
|
1117
|
+
* ```ts
|
|
1118
|
+
* // matrix 表示一个三维矩阵对象
|
|
1119
|
+
* const data = matrix.getData(2,3)
|
|
1120
|
+
* console.log(data)
|
|
1121
|
+
* ```
|
|
728
1122
|
*/
|
|
729
1123
|
getData(row: number, col: number): number;
|
|
730
1124
|
}
|
|
@@ -732,35 +1126,138 @@ export declare class McGeMatrix3d {
|
|
|
732
1126
|
* 整数数组
|
|
733
1127
|
*/
|
|
734
1128
|
export declare class McGeLongArray {
|
|
1129
|
+
/** 内部实现对象 */
|
|
735
1130
|
imp: any;
|
|
736
1131
|
/**
|
|
737
1132
|
* 构造函数。
|
|
1133
|
+
* @param imp 内部实现对象
|
|
1134
|
+
* @example
|
|
1135
|
+
* ```ts
|
|
1136
|
+
* import { McGeLongArray } from "mxcad"
|
|
1137
|
+
*
|
|
1138
|
+
// 创建一个新的 McGeLongArray 实例
|
|
1139
|
+
const myArray = new McGeLongArray();
|
|
1140
|
+
|
|
1141
|
+
// 通过传入一个对象初始化 McGeLongArray
|
|
1142
|
+
const initialValues = { data: [1, 2, 3, 4] };
|
|
1143
|
+
const myArray2 = new McGeLongArray(initialValues);
|
|
1144
|
+
* ```
|
|
738
1145
|
*/
|
|
739
1146
|
constructor(imp?: object);
|
|
740
1147
|
/**
|
|
741
1148
|
* 复制对象的值
|
|
1149
|
+
* @param val 整数数组
|
|
1150
|
+
* @example
|
|
1151
|
+
* ```ts
|
|
1152
|
+
* import { McGeLongArray } from "mxcad"
|
|
1153
|
+
*
|
|
1154
|
+
const array1 = new McGeLongArray();
|
|
1155
|
+
const array2 = new McGeLongArray();
|
|
1156
|
+
array2.append(10);
|
|
1157
|
+
array2.append(20);
|
|
1158
|
+
|
|
1159
|
+
// 复制 array2 的值到 array1
|
|
1160
|
+
array1.copy(array2);
|
|
1161
|
+
* ```
|
|
742
1162
|
*/
|
|
743
1163
|
copy(val: McGeLongArray): this;
|
|
1164
|
+
/**
|
|
1165
|
+
* 从 McObjectId 数组中复制值
|
|
1166
|
+
* @param aryId McObjectId 数组
|
|
1167
|
+
* @example
|
|
1168
|
+
* ```ts
|
|
1169
|
+
* //objectIdArray 为一个对象id数组
|
|
1170
|
+
const array = new McGeLongArray();
|
|
1171
|
+
array.copyFormAryId(objectIdArray);
|
|
1172
|
+
* ```
|
|
1173
|
+
*/
|
|
744
1174
|
copyFormAryId(aryId: McObjectId[]): this;
|
|
745
1175
|
/**
|
|
746
|
-
*
|
|
1176
|
+
* 向数组中添加一个值
|
|
1177
|
+
* @param val 整数值
|
|
1178
|
+
* @example
|
|
1179
|
+
* ```ts
|
|
1180
|
+
* import { McGeLongArray } from "mxcad";
|
|
1181
|
+
*
|
|
1182
|
+
const array = new McGeLongArray();
|
|
1183
|
+
array.append(5);
|
|
1184
|
+
array.append(10)
|
|
1185
|
+
* ```
|
|
747
1186
|
*/
|
|
748
1187
|
append(val: number): void;
|
|
749
1188
|
/**
|
|
750
1189
|
* 返回数组长度
|
|
1190
|
+
* @return 数组长度
|
|
1191
|
+
* @example
|
|
1192
|
+
* ```ts
|
|
1193
|
+
* import { McGeLongArray } from "mxcad"
|
|
1194
|
+
*
|
|
1195
|
+
const array = new McGeLongArray();
|
|
1196
|
+
console.log(array.length()); // 输出: 0
|
|
1197
|
+
* ```
|
|
751
1198
|
*/
|
|
752
1199
|
length(): number;
|
|
753
1200
|
/**
|
|
754
|
-
*
|
|
1201
|
+
* 根据数组索引得到数据元素的值
|
|
1202
|
+
* @param index 数组索引
|
|
1203
|
+
* @return 返回元素值
|
|
1204
|
+
* @example
|
|
1205
|
+
* ```ts
|
|
1206
|
+
* import { McGeLongArray } from "mxcad"
|
|
1207
|
+
*
|
|
1208
|
+
const array = new McGeLongArray();
|
|
1209
|
+
array.append(5);
|
|
1210
|
+
array.append(10);
|
|
1211
|
+
|
|
1212
|
+
console.log(array.at(0)); // 输出: 5
|
|
1213
|
+
console.log(array.at(1)); // 输出: 10
|
|
1214
|
+
* ```
|
|
755
1215
|
*/
|
|
756
1216
|
at(index: number): number;
|
|
757
1217
|
/**
|
|
758
|
-
*
|
|
1218
|
+
* 通过数组索引设置数据元素的值
|
|
1219
|
+
* @param index 数组索引值
|
|
1220
|
+
* @param val 整数数值
|
|
1221
|
+
* @example
|
|
1222
|
+
* ```ts
|
|
1223
|
+
* import { McGeLongArray } from "mxcad"
|
|
1224
|
+
*
|
|
1225
|
+
const array = new McGeLongArray();
|
|
1226
|
+
array.append(5);
|
|
1227
|
+
array.append(10);
|
|
1228
|
+
|
|
1229
|
+
array.setAt(0, 15);
|
|
1230
|
+
console.log(array.at(0)); // 输出: 15
|
|
1231
|
+
* ```
|
|
759
1232
|
*/
|
|
760
1233
|
setAt(index: number, val: number): void;
|
|
1234
|
+
/**
|
|
1235
|
+
* 清空数组
|
|
1236
|
+
* @example
|
|
1237
|
+
* ```ts
|
|
1238
|
+
* // array为整数数组
|
|
1239
|
+
* array.clear()
|
|
1240
|
+
* ```
|
|
1241
|
+
*/
|
|
761
1242
|
clear(): void;
|
|
762
1243
|
/**
|
|
763
1244
|
* 遍历数组
|
|
1245
|
+
* @param call 回调函数
|
|
1246
|
+
* @example
|
|
1247
|
+
* ```ts
|
|
1248
|
+
* import { McGeLongArray } from "mxcad"
|
|
1249
|
+
*
|
|
1250
|
+
const array = new McGeLongArray();
|
|
1251
|
+
array.append(5);
|
|
1252
|
+
array.append(10);
|
|
1253
|
+
|
|
1254
|
+
array.forEach((val, index) => {
|
|
1255
|
+
console.log(`Index ${index}: Value ${val}`);
|
|
1256
|
+
});
|
|
1257
|
+
// 输出:
|
|
1258
|
+
// Index 0: Value 5
|
|
1259
|
+
// Index 1: Value 10
|
|
1260
|
+
* ```
|
|
764
1261
|
*/
|
|
765
1262
|
forEach(call: (val: number, index: number) => void): void;
|
|
766
1263
|
}
|
|
@@ -768,111 +1265,389 @@ export declare class McGeLongArray {
|
|
|
768
1265
|
* 表示字符串的数组
|
|
769
1266
|
*/
|
|
770
1267
|
export declare class McGeStringArray {
|
|
1268
|
+
/** 内部实现对象 */
|
|
771
1269
|
imp: any;
|
|
772
1270
|
/**
|
|
773
1271
|
* 构造函数。
|
|
1272
|
+
* @param imp 内部构造函数
|
|
1273
|
+
* @example
|
|
1274
|
+
* ```ts
|
|
1275
|
+
* import { McGeStringArray } from "mxcad";
|
|
1276
|
+
*
|
|
1277
|
+
// 创建一个新的 McGeStringArray 实例
|
|
1278
|
+
const myArray = new McGeStringArray();
|
|
1279
|
+
|
|
1280
|
+
// 通过传入一个对象初始化 McGeStringArray
|
|
1281
|
+
const initialValues = { data: ["apple", "banana", "orange"] };
|
|
1282
|
+
const myArray2 = new McGeStringArray(initialValues);
|
|
1283
|
+
* ```
|
|
774
1284
|
*/
|
|
775
1285
|
constructor(imp?: object);
|
|
776
1286
|
/**
|
|
777
1287
|
* 复制对象的值
|
|
1288
|
+
* @example
|
|
1289
|
+
* ```ts
|
|
1290
|
+
* import { McGeStringArray } from "mxcad";
|
|
1291
|
+
*
|
|
1292
|
+
const array1 = new McGeStringArray();
|
|
1293
|
+
const array2 = new McGeStringArray();
|
|
1294
|
+
array2.append("apple");
|
|
1295
|
+
array2.append("banana");
|
|
1296
|
+
|
|
1297
|
+
// 复制 array2 的值到 array1
|
|
1298
|
+
array1.copy(array2);
|
|
1299
|
+
* ```
|
|
778
1300
|
*/
|
|
779
1301
|
copy(val: McGeStringArray): this;
|
|
780
1302
|
/**
|
|
781
1303
|
* 添加一个值
|
|
1304
|
+
* @param val 字符串
|
|
1305
|
+
* @example
|
|
1306
|
+
* ```ts
|
|
1307
|
+
* import { McGeStringArray } from "mxcad";
|
|
1308
|
+
*
|
|
1309
|
+
* const array = new McGeStringArray();
|
|
1310
|
+
array.append("apple");
|
|
1311
|
+
array.append("banana");
|
|
1312
|
+
* ```
|
|
782
1313
|
*/
|
|
783
1314
|
append(val: string): void;
|
|
784
1315
|
/**
|
|
785
1316
|
* 返回数组长度
|
|
1317
|
+
* @return 数组长度
|
|
1318
|
+
* @example
|
|
1319
|
+
* ```ts
|
|
1320
|
+
* import { McGeStringArray } from "mxcad";
|
|
1321
|
+
*
|
|
1322
|
+
* const array = new McGeStringArray();
|
|
1323
|
+
* console.log(array.length()); // 输出: 0
|
|
1324
|
+
* ```
|
|
786
1325
|
*/
|
|
787
1326
|
length(): number;
|
|
788
1327
|
/**
|
|
789
|
-
*
|
|
1328
|
+
* 根据数组索引得到数据元素的值
|
|
1329
|
+
* @param index 数组索引
|
|
1330
|
+
* @return 字符串
|
|
1331
|
+
* @example
|
|
1332
|
+
* ```ts
|
|
1333
|
+
* import { McGeStringArray } from "mxcad";
|
|
1334
|
+
*
|
|
1335
|
+
const array = new McGeStringArray();
|
|
1336
|
+
array.append("apple");
|
|
1337
|
+
array.append("banana");
|
|
1338
|
+
|
|
1339
|
+
console.log(array.at(0)); // 输出: "apple"
|
|
1340
|
+
console.log(array.at(1)); // 输出: "banana"
|
|
1341
|
+
* ```
|
|
790
1342
|
*/
|
|
791
1343
|
at(index: number, decodeFromGb2312?: boolean): string;
|
|
792
1344
|
/**
|
|
793
|
-
*
|
|
1345
|
+
* 通过数组索引设置数据元素的值
|
|
1346
|
+
* @param index 数组索引
|
|
1347
|
+
* @param val 字符串
|
|
1348
|
+
* @example
|
|
1349
|
+
* ```ts
|
|
1350
|
+
* import { McGeStringArray } from "mxcad";
|
|
1351
|
+
*
|
|
1352
|
+
const array = new McGeStringArray();
|
|
1353
|
+
array.append("apple");
|
|
1354
|
+
array.append("banana");
|
|
1355
|
+
|
|
1356
|
+
array.setAt(0, "orange");
|
|
1357
|
+
console.log(array.at(0)); // 输出: "orange"
|
|
1358
|
+
* ```
|
|
794
1359
|
*/
|
|
795
1360
|
setAt(index: number, val: string, decodeFromGb2312?: boolean): void;
|
|
796
1361
|
/**
|
|
797
1362
|
* 遍历数组
|
|
1363
|
+
* @param call 回调函数
|
|
1364
|
+
* @example
|
|
1365
|
+
* ```ts
|
|
1366
|
+
* import { McGeStringArray } from "mxcad";
|
|
1367
|
+
*
|
|
1368
|
+
const array = new McGeStringArray();
|
|
1369
|
+
array.append("apple");
|
|
1370
|
+
array.append("banana");
|
|
1371
|
+
|
|
1372
|
+
array.forEach((val, index) => {
|
|
1373
|
+
console.log(`Index ${index}: Value ${val}`);
|
|
1374
|
+
});
|
|
1375
|
+
// 输出:
|
|
1376
|
+
// Index 0: Value apple
|
|
1377
|
+
// Index 1: Value banana
|
|
1378
|
+
* ```
|
|
798
1379
|
*/
|
|
799
1380
|
forEach(call: (val: string, index: number) => void, decodeFromGb2312?: boolean): void;
|
|
800
|
-
/**
|
|
1381
|
+
/**
|
|
1382
|
+
* 清空数组
|
|
1383
|
+
* @example
|
|
1384
|
+
* ```ts
|
|
1385
|
+
* import { McGeStringArray } from "mxcad";
|
|
1386
|
+
*
|
|
1387
|
+
const array = new McGeStringArray();
|
|
1388
|
+
array.append("apple");
|
|
1389
|
+
array.append("banana");
|
|
1390
|
+
|
|
1391
|
+
array.clear();
|
|
1392
|
+
console.log(array.length()); // 输出: 0
|
|
1393
|
+
* ```
|
|
1394
|
+
* */
|
|
801
1395
|
clear(): void;
|
|
802
1396
|
}
|
|
803
1397
|
/**
|
|
804
1398
|
* 表示三维点的数组
|
|
805
1399
|
*/
|
|
806
1400
|
export declare class McGePoint3dArray {
|
|
1401
|
+
/** 内部实现对象 */
|
|
807
1402
|
imp: any;
|
|
808
1403
|
/**
|
|
809
1404
|
* 构造函数。
|
|
1405
|
+
* @param imp 内部实现对象
|
|
1406
|
+
* @example
|
|
1407
|
+
* ```ts
|
|
1408
|
+
* import { McGePoint3dArray, McGePoint3d } from "mxcad";
|
|
1409
|
+
*
|
|
1410
|
+
// 创建一个新的 McGePoint3dArray 实例
|
|
1411
|
+
const myArray = new McGePoint3dArray();
|
|
1412
|
+
|
|
1413
|
+
// 通过传入一个对象初始化 McGePoint3dArray
|
|
1414
|
+
const initialValues = [
|
|
1415
|
+
new McGePoint3d({ x: 1, y: 2, z: 3 }),
|
|
1416
|
+
new McGePoint3d({ x: 4, y: 5, z: 6 }),
|
|
1417
|
+
];
|
|
1418
|
+
const myArray2 = new McGePoint3dArray(initialValues);
|
|
1419
|
+
* ```
|
|
810
1420
|
*/
|
|
811
1421
|
constructor(imp?: object);
|
|
812
1422
|
/**
|
|
813
1423
|
* 复制对象的值
|
|
1424
|
+
* @param val 三维点的数组
|
|
1425
|
+
* @example
|
|
1426
|
+
* ```ts
|
|
1427
|
+
* import { McGePoint3d, McGePoint3dArray } from "mxcad"
|
|
1428
|
+
*
|
|
1429
|
+
const array1 = new McGePoint3dArray();
|
|
1430
|
+
const array2 = new McGePoint3dArray();
|
|
1431
|
+
array2.append(new McGePoint3d({ x: 1, y: 2, z: 3 }));
|
|
1432
|
+
array2.append(new McGePoint3d({ x: 4, y: 5, z: 6 }));
|
|
1433
|
+
|
|
1434
|
+
// 复制 array2 的值到 array1
|
|
1435
|
+
array1.copy(array2);
|
|
1436
|
+
* ```
|
|
814
1437
|
*/
|
|
815
1438
|
copy(val: McGePoint3dArray | McGePoint3d[]): this;
|
|
816
1439
|
/**
|
|
817
1440
|
* 添加一个值
|
|
1441
|
+
* @param val 三维点对象
|
|
1442
|
+
* @example
|
|
1443
|
+
* ```ts
|
|
1444
|
+
* import { McGePoint3d, McGePoint3dArray } from "mxcad"
|
|
1445
|
+
*
|
|
1446
|
+
* const array = new McGePoint3dArray();
|
|
1447
|
+
array.append(new McGePoint3d({ x: 1, y: 2, z: 3 }));
|
|
1448
|
+
array.append(new McGePoint3d({ x: 4, y: 5, z: 6 }));
|
|
1449
|
+
* ```
|
|
818
1450
|
*/
|
|
819
1451
|
append(val: McGePoint3d): void;
|
|
820
1452
|
/**
|
|
821
1453
|
* 返回数组长度
|
|
1454
|
+
* @return 数组长度
|
|
1455
|
+
* @example
|
|
1456
|
+
* ```ts
|
|
1457
|
+
* import { McGePoint3dArray } from "mxcad"
|
|
1458
|
+
*const array = new McGePoint3dArray();
|
|
1459
|
+
console.log(array.length()); // 输出: 0
|
|
1460
|
+
* ```
|
|
822
1461
|
*/
|
|
823
1462
|
length(): number;
|
|
824
1463
|
/**
|
|
825
1464
|
* 返回数组为空
|
|
1465
|
+
* @return 布尔值
|
|
1466
|
+
* @example
|
|
1467
|
+
* ```ts
|
|
1468
|
+
* import { McGePoint3dArray, McGePoint3d } from "mxcad"
|
|
1469
|
+
const array = new McGePoint3dArray();
|
|
1470
|
+
console.log(array.isEmpty()); // 输出: true
|
|
1471
|
+
|
|
1472
|
+
array.append(new McGePoint3d({ x: 1, y: 2, z: 3 }));
|
|
1473
|
+
console.log(array.isEmpty()); // 输出: false
|
|
1474
|
+
* ```
|
|
826
1475
|
*/
|
|
827
1476
|
isEmpty(): boolean;
|
|
828
1477
|
/**
|
|
829
|
-
*
|
|
1478
|
+
* 根据数组索引值得到数据元素的值
|
|
1479
|
+
* @param index 数组索引
|
|
1480
|
+
* @example
|
|
1481
|
+
* ```ts
|
|
1482
|
+
* import { McGePoint3dArray, McGePoint3d } from "mxcad"
|
|
1483
|
+
*
|
|
1484
|
+
const array = new McGePoint3dArray();
|
|
1485
|
+
array.append(new McGePoint3d({ x: 1, y: 2, z: 3 }));
|
|
1486
|
+
array.append(new McGePoint3d({ x: 4, y: 5, z: 6 }));
|
|
1487
|
+
|
|
1488
|
+
const point = array.at(0);
|
|
1489
|
+
console.log(point); // 输出: McGePoint3d { x: 1, y: 2, z: 3 }
|
|
1490
|
+
* ```
|
|
830
1491
|
*/
|
|
831
1492
|
at(index: number): McGePoint3d;
|
|
832
1493
|
/**
|
|
833
|
-
*
|
|
1494
|
+
* 通过数组索引设置数据元素的值
|
|
1495
|
+
* @param index 数组索引
|
|
1496
|
+
* @param val 三维点对象
|
|
1497
|
+
* @example
|
|
1498
|
+
* ```ts
|
|
1499
|
+
* import { McGePoint3dArray, McGePoint3d } from "mxcad"
|
|
1500
|
+
*
|
|
1501
|
+
const array = new McGePoint3dArray();
|
|
1502
|
+
array.append(new McGePoint3d({ x: 1, y: 2, z: 3 }));
|
|
1503
|
+
array.append(new McGePoint3d({ x: 4, y: 5, z: 6 }));
|
|
1504
|
+
|
|
1505
|
+
array.setAt(0, new McGePoint3d({ x: 7, y: 8, z: 9 }));
|
|
1506
|
+
console.log(array.at(0)); // 输出: McGePoint3d { x: 7, y: 8, z: 9 }
|
|
1507
|
+
* ```
|
|
834
1508
|
*/
|
|
835
1509
|
setAt(index: number, val: McGePoint3d): void;
|
|
836
|
-
/**
|
|
1510
|
+
/**
|
|
1511
|
+
* 清空数组
|
|
1512
|
+
* @example
|
|
1513
|
+
* ```ts
|
|
1514
|
+
* import { McGePoint3dArray, McGePoint3d } from "mxcad"
|
|
1515
|
+
*
|
|
1516
|
+
const array = new McGePoint3dArray();
|
|
1517
|
+
array.append(new McGePoint3d({ x: 1, y: 2, z: 3 }));
|
|
1518
|
+
array.append(new McGePoint3d({ x: 4, y: 5, z: 6 }));
|
|
1519
|
+
|
|
1520
|
+
array.clear();
|
|
1521
|
+
console.log(array.length()); // 输出: 0
|
|
1522
|
+
* ```
|
|
1523
|
+
* */
|
|
837
1524
|
clear(): void;
|
|
838
1525
|
/**
|
|
839
1526
|
* 遍历数组
|
|
1527
|
+
* @param call 回调函数
|
|
1528
|
+
* @example
|
|
1529
|
+
* ```ts
|
|
1530
|
+
* import { McGePoint3dArray, McGePoint3d } from "mxcad"
|
|
1531
|
+
*
|
|
1532
|
+
const array = new McGePoint3dArray();
|
|
1533
|
+
array.append(new McGePoint3d({ x: 1, y: 2, z: 3 }));
|
|
1534
|
+
array.append(new McGePoint3d({ x: 4, y: 5, z: 6 }));
|
|
1535
|
+
|
|
1536
|
+
array.forEach((point, index) => {
|
|
1537
|
+
console.log(`Index ${index}: Point ${point}`);
|
|
1538
|
+
});
|
|
1539
|
+
// 输出:
|
|
1540
|
+
// Index 0: Point McGePoint3d { x: 1, y: 2, z: 3 }
|
|
1541
|
+
// Index 1: Point McGePoint3d { x: 4, y: 5, z: 6 }
|
|
1542
|
+
* ```
|
|
840
1543
|
*/
|
|
841
1544
|
forEach(call: (val: McGePoint3d, index: number) => void): void;
|
|
842
1545
|
}
|
|
843
1546
|
/**
|
|
844
|
-
*
|
|
1547
|
+
* 双精度浮点数数组
|
|
845
1548
|
*/
|
|
846
1549
|
export declare class McGeDoubleArray {
|
|
1550
|
+
/** 内部实现对象 */
|
|
847
1551
|
imp: any;
|
|
848
1552
|
/**
|
|
849
1553
|
* 构造函数。
|
|
1554
|
+
* @param imp 内部实现对象
|
|
1555
|
+
* @example
|
|
1556
|
+
* ```ts
|
|
1557
|
+
* import { McGeDoubleArray } from "mxcad"
|
|
1558
|
+
|
|
1559
|
+
const array = new McGeDoubleArray();
|
|
1560
|
+
* ```
|
|
850
1561
|
*/
|
|
851
1562
|
constructor(imp?: object);
|
|
852
1563
|
/**
|
|
853
1564
|
* 复制对象的值
|
|
1565
|
+
* @param val 双精度浮点数数组
|
|
1566
|
+
* @example
|
|
1567
|
+
* ```ts
|
|
1568
|
+
* import { McGeDoubleArray } from "mxcad"
|
|
1569
|
+
*
|
|
1570
|
+
// array1 表示一个双精度浮点数数组
|
|
1571
|
+
const array2 = new McGeDoubleArray();
|
|
1572
|
+
array2.copy(array1);
|
|
1573
|
+
|
|
1574
|
+
// 现在array2与array1具有相同的值
|
|
1575
|
+
* ```
|
|
854
1576
|
*/
|
|
855
1577
|
copy(val: McGeDoubleArray): this;
|
|
856
1578
|
/**
|
|
857
1579
|
* 添加一个值
|
|
1580
|
+
* @param val 双精度浮点数
|
|
1581
|
+
* @example
|
|
1582
|
+
* ```ts
|
|
1583
|
+
* import { McGeDoubleArray } from "mxcad"
|
|
1584
|
+
*
|
|
1585
|
+
// 创建数组实例
|
|
1586
|
+
const array = new McGeDoubleArray();
|
|
1587
|
+
array.append(3.14159);
|
|
1588
|
+
* ```
|
|
858
1589
|
*/
|
|
859
1590
|
append(val: number): void;
|
|
860
1591
|
/**
|
|
861
1592
|
* 返回数组长度
|
|
1593
|
+
* @return 数组长度
|
|
1594
|
+
* @example
|
|
1595
|
+
* ```ts
|
|
1596
|
+
* import { McGeDoubleArray } from "mxcad"
|
|
1597
|
+
|
|
1598
|
+
const array = new McGeDoubleArray();
|
|
1599
|
+
const length = array.length();//0
|
|
1600
|
+
* ```
|
|
862
1601
|
*/
|
|
863
1602
|
length(): number;
|
|
864
1603
|
/**
|
|
865
|
-
*
|
|
1604
|
+
* 通过数组索引得到数据元素的值
|
|
1605
|
+
* @param index 数组索引
|
|
1606
|
+
* @example
|
|
1607
|
+
* ```ts
|
|
1608
|
+
* import { McGeDoubleArray } from "mxcad"
|
|
1609
|
+
|
|
1610
|
+
const array = new McGeDoubleArray();
|
|
1611
|
+
// 获取特定索引位置的值
|
|
1612
|
+
const value = array.at(2); // 假设索引为2的位置有值
|
|
1613
|
+
* ```
|
|
866
1614
|
*/
|
|
867
1615
|
at(index: number): number;
|
|
868
1616
|
/**
|
|
869
|
-
*
|
|
1617
|
+
* 通过数组索引设置数据元素的值
|
|
1618
|
+
* @param 数组索引
|
|
1619
|
+
* @param val 双精度浮点数
|
|
1620
|
+
* @example
|
|
1621
|
+
* ```ts
|
|
1622
|
+
* import { McGeDoubleArray } from "mxcad"
|
|
1623
|
+
|
|
1624
|
+
const array = new McGeDoubleArray();
|
|
1625
|
+
array.setAt(1, 3.14159); // 将索引为1的位置的值设置为3.14159
|
|
1626
|
+
* ```
|
|
870
1627
|
*/
|
|
871
1628
|
setAt(index: number, val: number): void;
|
|
872
|
-
/**
|
|
1629
|
+
/**
|
|
1630
|
+
* 清空数组
|
|
1631
|
+
* @example
|
|
1632
|
+
* ```ts
|
|
1633
|
+
* // array 表示一个McGeDoubleArray数组
|
|
1634
|
+
array.clear();
|
|
1635
|
+
* ```
|
|
1636
|
+
* */
|
|
873
1637
|
clear(): void;
|
|
874
1638
|
/**
|
|
875
1639
|
* 遍历数组
|
|
1640
|
+
* @param call 回调函数
|
|
1641
|
+
* @example
|
|
1642
|
+
* ```ts
|
|
1643
|
+
* import { McGeDoubleArray } from "mxcad"
|
|
1644
|
+
|
|
1645
|
+
const array = new McGeDoubleArray();
|
|
1646
|
+
array.append(3.14159);
|
|
1647
|
+
array.forEach((val,index)=>{
|
|
1648
|
+
console.log(`Value at index ${index}: ${value}`);
|
|
1649
|
+
})
|
|
1650
|
+
* ```
|
|
876
1651
|
*/
|
|
877
1652
|
forEach(call: (val: number, index: number) => void): void;
|
|
878
1653
|
}
|
|
@@ -880,28 +1655,92 @@ export declare class McGeDoubleArray {
|
|
|
880
1655
|
* 范围对象
|
|
881
1656
|
*/
|
|
882
1657
|
export declare class McGeBound {
|
|
883
|
-
/**
|
|
1658
|
+
/**
|
|
1659
|
+
* 最小点
|
|
1660
|
+
* @example
|
|
1661
|
+
* ```ts
|
|
1662
|
+
* import { McGeBound, McGePoint3d } from "mxcad"
|
|
1663
|
+
*
|
|
1664
|
+
// 创建 McGeBound 实例
|
|
1665
|
+
const bound = new McGeBound();
|
|
1666
|
+
// 访问最小点属性并设置其值
|
|
1667
|
+
bound.minPoint = new McGePoint3d(0, 0, 0);
|
|
1668
|
+
```
|
|
1669
|
+
*/
|
|
884
1670
|
minPoint: McGePoint3d;
|
|
885
|
-
/**
|
|
1671
|
+
/**
|
|
1672
|
+
* 最大点
|
|
1673
|
+
* @example
|
|
1674
|
+
* ```ts
|
|
1675
|
+
* import { McGeBound, McGePoint3d } from "mxcad"
|
|
1676
|
+
*
|
|
1677
|
+
// 创建 McGeBound 实例
|
|
1678
|
+
const bound = new McGeBound();
|
|
1679
|
+
// 访问最大点属性并设置其值
|
|
1680
|
+
bound.maxPoint = new McGePoint3d(20, 10, 0);
|
|
1681
|
+
```
|
|
1682
|
+
* */
|
|
886
1683
|
maxPoint: McGePoint3d;
|
|
887
|
-
/**
|
|
1684
|
+
/**
|
|
1685
|
+
* 是否有效
|
|
1686
|
+
* @example
|
|
1687
|
+
* ```ts
|
|
1688
|
+
* import { McGeBound } from "mxcad"
|
|
1689
|
+
*
|
|
1690
|
+
// 创建 McGeBound 实例
|
|
1691
|
+
const bound = new McGeBound();
|
|
1692
|
+
// 访问是否有效属性并设置其值
|
|
1693
|
+
bound.isValid = true;;
|
|
1694
|
+
```
|
|
1695
|
+
* */
|
|
888
1696
|
isValid: boolean;
|
|
889
1697
|
/**
|
|
890
1698
|
* 构造函数。
|
|
1699
|
+
* @param pts 三维点数组
|
|
1700
|
+
* @example
|
|
1701
|
+
* ```ts
|
|
1702
|
+
* import { McGeBound, McGePoint3d } from "mxcad"
|
|
1703
|
+
*
|
|
1704
|
+
const points = [new McGePoint3d(1, 2, 3), new McGePoint3d(4, 5, 6)];
|
|
1705
|
+
const bound = new McGeBound(points);
|
|
1706
|
+
* ```
|
|
891
1707
|
*/
|
|
892
1708
|
constructor(pts?: McGePoint3dArray | McGePoint3d[]);
|
|
893
1709
|
/**
|
|
894
1710
|
* 添加一个点
|
|
895
1711
|
* @param pt 三维点对象
|
|
1712
|
+
* @example
|
|
1713
|
+
* ```ts
|
|
1714
|
+
* import { McGeBound, McGePoint3d } from "mxcad"
|
|
1715
|
+
* // 创建 McGeBound 实例
|
|
1716
|
+
const bound = new McGeBound();
|
|
1717
|
+
// 添加一个点到边界
|
|
1718
|
+
const point = new McGePoint3d(3, 4, 5);
|
|
1719
|
+
bound.addPoint(point);
|
|
1720
|
+
* ```
|
|
896
1721
|
*/
|
|
897
1722
|
addPoint(pt: McGePoint3d): void;
|
|
898
1723
|
/**
|
|
899
1724
|
* 添加一组点
|
|
900
1725
|
* @param pts 三维点对象数组
|
|
1726
|
+
* @example
|
|
1727
|
+
* ```ts
|
|
1728
|
+
* import { McGeBound } from "mxcad"
|
|
1729
|
+
*
|
|
1730
|
+
// 创建 McGeBound 实例
|
|
1731
|
+
const bound = new McGeBound();
|
|
1732
|
+
|
|
1733
|
+
// 创建一组点
|
|
1734
|
+
const points = [new McGePoint3d(1, 2, 3), new McGePoint3d(4, 5, 6), new McGePoint3d(7, 8, 9)];
|
|
1735
|
+
|
|
1736
|
+
// 添加一组点到边界
|
|
1737
|
+
bound.addPoints(points);
|
|
1738
|
+
* ```
|
|
901
1739
|
*/
|
|
902
1740
|
addPoints(pts: McGePoint3dArray | McGePoint3d[]): void;
|
|
903
1741
|
}
|
|
904
|
-
|
|
1742
|
+
/** 坐标转换类型 */
|
|
1743
|
+
export declare class MxCoordConvertType {
|
|
905
1744
|
/** 文档坐标转cad坐标
|
|
906
1745
|
* @param pt 三维点的对象
|
|
907
1746
|
* @returns 三维点的对象
|
|
@@ -976,6 +1815,7 @@ declare class MxCoordConvertType {
|
|
|
976
1815
|
*/
|
|
977
1816
|
cad2doc2(x: number, y: number, z: number): THREE.Vector3;
|
|
978
1817
|
}
|
|
1818
|
+
/** 提供坐标转换方法 */
|
|
979
1819
|
export declare let MxCoordConvert: MxCoordConvertType;
|
|
980
1820
|
export declare function getFilterImp(filter?: MxCADResbuf | null): any;
|
|
981
1821
|
/**
|
|
@@ -4794,18 +5634,36 @@ export declare enum ColorIndexType {
|
|
|
4794
5634
|
kBylayer = 256
|
|
4795
5635
|
}
|
|
4796
5636
|
export type ConstructorArguments<T> = T extends new (...args: infer U) => any ? U : never;
|
|
5637
|
+
/**
|
|
5638
|
+
* McCmColor的JSON版本
|
|
5639
|
+
*/
|
|
4797
5640
|
export type McCmColorJSON = ExcludePropertiesContainingThisType<McCmColor, Function>;
|
|
5641
|
+
/** THREE.Color 构造函数参数类型组成的元组:字符串、数字、THREE.Color */
|
|
4798
5642
|
export type THREEColorArgs = [
|
|
4799
5643
|
(string | number | THREE.Color)
|
|
4800
5644
|
] | ConstructorArguments<typeof THREE.Color> | [
|
|
4801
5645
|
];
|
|
5646
|
+
/** 用于指定在创建颜色时可以接受的不同类型的参数形式 */
|
|
4802
5647
|
export type CreateColorArgs = THREEColorArgs | [
|
|
4803
5648
|
(Partial<McCmColorJSON> | McCmColor)
|
|
4804
5649
|
];
|
|
5650
|
+
/**
|
|
5651
|
+
* 获取颜色工具
|
|
5652
|
+
* @param ages 颜色参数
|
|
5653
|
+
* @returns THREE.Color
|
|
5654
|
+
* */
|
|
4805
5655
|
export declare const getColorUtils: (...ages: THREEColorArgs) => THREE.Color;
|
|
4806
|
-
/**
|
|
5656
|
+
/**
|
|
5657
|
+
* 创建颜色对象
|
|
5658
|
+
* @param ages 颜色参数类型
|
|
5659
|
+
* @returns 颜色对象
|
|
5660
|
+
*/
|
|
4807
5661
|
export declare const createMcCmColor: (...ages: CreateColorArgs) => McCmColor;
|
|
4808
|
-
/**
|
|
5662
|
+
/**
|
|
5663
|
+
* 设置颜色
|
|
5664
|
+
* @param mcCmColor 颜色对象
|
|
5665
|
+
* @param ages 颜色参数类型
|
|
5666
|
+
*/
|
|
4809
5667
|
export declare const setMcCmColor: (mcCmColor: McCmColor, ...ages: CreateColorArgs) => void;
|
|
4810
5668
|
/**
|
|
4811
5669
|
* 枚举 Fetch 属性类型
|
|
@@ -5081,6 +5939,8 @@ export declare class McObject {
|
|
|
5081
5939
|
* @param sBlkName 插入的图块的块名
|
|
5082
5940
|
* @param isWorkThread 是否使用工作线程打开文件,默认为 true
|
|
5083
5941
|
* @param fetchAttributes 1:EMSCRIPTEN_FETCH_LOAD_TO_MEMORY,把图纸数据加载内存中,0:EMSCRIPTEN_FETCH_LOAD_TO_MEMORY | EMSCRIPTEN_FETCH_PERSIST_FILE | EMSCRIPTEN_FETCH_APPEND,把图纸数据加到IndexedDB。
|
|
5942
|
+
* @param isUpdataInsertBlock 是否更新已经存在的块,默认不会更新
|
|
5943
|
+
* @param isUpdataSameNameBlock 是插入块的过程中,如果发现原数据库已经相同名称的块,是否也一同更新,默认不会更新
|
|
5084
5944
|
* @example
|
|
5085
5945
|
* ```ts
|
|
5086
5946
|
* import { MxCpp, McObject } from "mxcad"
|
|
@@ -5088,7 +5948,7 @@ export declare class McObject {
|
|
|
5088
5948
|
* const blkrecId = await mxcad.insertBlock("./blkrec.mxweb", "sBlkName");
|
|
5089
5949
|
* ```
|
|
5090
5950
|
*/
|
|
5091
|
-
insertBlock(sFileUrl: string, sBlkName: string, isWorkThread?: boolean, fetchAttributes?: number): Promise<McObjectId>;
|
|
5951
|
+
insertBlock(sFileUrl: string, sBlkName: string, isWorkThread?: boolean, fetchAttributes?: number, isUpdataInsertBlock?: boolean, isUpdataSameNameBlock?: boolean): Promise<McObjectId>;
|
|
5092
5952
|
/**
|
|
5093
5953
|
* 获取当前文件名
|
|
5094
5954
|
* @returns 当前文件名
|
|
@@ -6728,6 +7588,8 @@ export interface MxCadConfig {
|
|
|
6728
7588
|
multipleSelect?: boolean;
|
|
6729
7589
|
}
|
|
6730
7590
|
/** 创建MxCad实例
|
|
7591
|
+
* @param config 参数配置
|
|
7592
|
+
* @param mxcadobj 对象
|
|
6731
7593
|
* @example
|
|
6732
7594
|
* //通过创建实例实现图纸展示以下基于vite打包工具
|
|
6733
7595
|
* ```ts
|
|
@@ -6747,14 +7609,37 @@ export declare const createMxCad: (config?: MxCadConfig, mxcadobj?: McObject) =>
|
|
|
6747
7609
|
* @param color 文字颜色
|
|
6748
7610
|
*/
|
|
6749
7611
|
export declare function drawText(): Promise<McObjectId | undefined>;
|
|
7612
|
+
/**
|
|
7613
|
+
* 绘圆
|
|
7614
|
+
*/
|
|
6750
7615
|
export declare function drawCircle(): Promise<McObjectId | undefined>;
|
|
7616
|
+
/**
|
|
7617
|
+
* 绘直线
|
|
7618
|
+
*/
|
|
6751
7619
|
export declare function drawLine(): Promise<void>;
|
|
7620
|
+
/**
|
|
7621
|
+
* 绘多行文本
|
|
7622
|
+
*/
|
|
6752
7623
|
export declare function drawMText(): Promise<McObjectId | undefined>;
|
|
7624
|
+
/** 绘多义线 */
|
|
6753
7625
|
export declare function drawPolyLine(): Promise<void>;
|
|
7626
|
+
/** 绘制正多边形 */
|
|
6754
7627
|
export declare function drawPolygon(): Promise<void>;
|
|
7628
|
+
/**
|
|
7629
|
+
* 绘制圆弧
|
|
7630
|
+
*/
|
|
6755
7631
|
export declare function drawArc(): Promise<void>;
|
|
7632
|
+
/**
|
|
7633
|
+
* 绘制椭圆或椭圆弧
|
|
7634
|
+
*/
|
|
6756
7635
|
export declare function drawEllipticalArc(): Promise<McObjectId | undefined>;
|
|
7636
|
+
/**
|
|
7637
|
+
* 删除对象
|
|
7638
|
+
*/
|
|
6757
7639
|
export declare function Mx_Erase(): Promise<void>;
|
|
7640
|
+
/**
|
|
7641
|
+
* 绘制矩形
|
|
7642
|
+
*/
|
|
6758
7643
|
export declare const drawRectang: () => Promise<void>;
|
|
6759
7644
|
declare const getWasmURL: (wasmURL: string, baseURL?: string | URL) => string;
|
|
6760
7645
|
export type EventType = string | symbol;
|
|
@@ -10646,6 +11531,7 @@ export declare class MxCAD3DObject {
|
|
|
10646
11531
|
setCustomClipPlaneReverse(): void;
|
|
10647
11532
|
setCustomClipPlaneDirection(x: number, y: number, z: number): void;
|
|
10648
11533
|
displaySymbolText(theSymbol: MxNewMx3dSymbolText): void;
|
|
11534
|
+
displayDimension(theDimension: MxNewMx3dDimObject): void;
|
|
10649
11535
|
addModelTexture(theFileName: string): void;
|
|
10650
11536
|
removeModelTexture(): void;
|
|
10651
11537
|
setGradientBgColor(theColor1: MxNewMx3dGeColor, theColor2: MxNewMx3dGeColor, theMethod: MdGe.MxGradientFillMethod): void;
|
|
@@ -10721,6 +11607,12 @@ export declare class MxNewMx3dSymbolObject extends MxNewMx3dBaseObject {
|
|
|
10721
11607
|
export declare class MxNewMx3dAlgoObject extends MxNewMx3dBaseObject {
|
|
10722
11608
|
constructor(p?: object);
|
|
10723
11609
|
}
|
|
11610
|
+
/**
|
|
11611
|
+
* 样式基类
|
|
11612
|
+
*/
|
|
11613
|
+
export declare class MxNewMx3dAspectObject extends MxNewMx3dBaseObject {
|
|
11614
|
+
constructor(p?: object);
|
|
11615
|
+
}
|
|
10724
11616
|
/**
|
|
10725
11617
|
* 数学几何基类
|
|
10726
11618
|
*/
|
|
@@ -10826,76 +11718,57 @@ export declare class MxNewMx3dGeDir extends MxNewMx3dGeObject {
|
|
|
10826
11718
|
Transform(theT: MxNewMx3dGeTrsf): void;
|
|
10827
11719
|
Transformed(theT: MxNewMx3dGeTrsf): MxNewMx3dGeDir;
|
|
10828
11720
|
}
|
|
10829
|
-
export declare class MxNewMx3dGeEllipse extends
|
|
10830
|
-
constructor(
|
|
10831
|
-
|
|
10832
|
-
ParametricTransformation(T: MxNewMx3dGeTrsf): number;
|
|
10833
|
-
Reversed(): MxNewMx3dGeCircle;
|
|
10834
|
-
Period(): number;
|
|
10835
|
-
Value(U: number): MxNewMx3dGePoint;
|
|
11721
|
+
export declare class MxNewMx3dGeEllipse extends MxNewMx3dGeObject {
|
|
11722
|
+
constructor();
|
|
11723
|
+
constructor(theA2: MxNewMx3dGeCSYSR, theMajorRadius: number, theMinorRadius: number);
|
|
10836
11724
|
SetAxis(theA1: MxNewMx3dGeAxis): void;
|
|
10837
11725
|
SetLocation(theP: MxNewMx3dGePoint): void;
|
|
11726
|
+
SetMajorRadius(theMajorRadius: number): void;
|
|
11727
|
+
SetMinorRadius(theMinorRadius: number): void;
|
|
10838
11728
|
SetPosition(theA2: MxNewMx3dGeCSYSR): void;
|
|
11729
|
+
Area(): number;
|
|
10839
11730
|
Axis(): MxNewMx3dGeAxis;
|
|
10840
|
-
Location(): MxNewMx3dGePoint;
|
|
10841
|
-
Position(): MxNewMx3dGeCSYSR;
|
|
10842
|
-
XAxis(): MxNewMx3dGeAxis;
|
|
10843
|
-
YAxis(): MxNewMx3dGeAxis;
|
|
10844
|
-
Reverse(): void;
|
|
10845
|
-
Continuity(): MdGe.MxGAShapeEnum;
|
|
10846
|
-
IsCN(N: number): boolean;
|
|
10847
|
-
SetMajorRadius(MajorRadius: number): void;
|
|
10848
|
-
SetMinorRadius(MinorRadius: number): void;
|
|
10849
|
-
ReversedParameter(U: number): number;
|
|
10850
11731
|
Directrix1(): MxNewMx3dGeAxis;
|
|
10851
11732
|
Directrix2(): MxNewMx3dGeAxis;
|
|
10852
11733
|
Eccentricity(): number;
|
|
10853
11734
|
Focal(): number;
|
|
10854
11735
|
Focus1(): MxNewMx3dGePoint;
|
|
10855
11736
|
Focus2(): MxNewMx3dGePoint;
|
|
11737
|
+
Location(): MxNewMx3dGePoint;
|
|
10856
11738
|
MajorRadius(): number;
|
|
10857
11739
|
MinorRadius(): number;
|
|
10858
11740
|
Parameter(): number;
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
11741
|
+
Position(): MxNewMx3dGeCSYSR;
|
|
11742
|
+
XAxis(): MxNewMx3dGeAxis;
|
|
11743
|
+
YAxis(): MxNewMx3dGeAxis;
|
|
11744
|
+
MirrorByPoint(theP: MxNewMx3dGePoint): void;
|
|
11745
|
+
MirroredByPoint(theP: MxNewMx3dGePoint): MxNewMx3dGeEllipse;
|
|
11746
|
+
MirrorByAxis(theA1: MxNewMx3dGeAxis): void;
|
|
11747
|
+
MirroredByAxis(theA1: MxNewMx3dGeAxis): MxNewMx3dGeEllipse;
|
|
11748
|
+
MirrorByCSYSR(theA2: MxNewMx3dGeCSYSR): void;
|
|
11749
|
+
MirroredByCSYSR(theA2: MxNewMx3dGeCSYSR): MxNewMx3dGeEllipse;
|
|
11750
|
+
Rotate(theA1: MxNewMx3dGeAxis, theAng: number): void;
|
|
11751
|
+
Rotated(theA1: MxNewMx3dGeAxis, theAng: number): MxNewMx3dGeEllipse;
|
|
11752
|
+
Scale(theP: MxNewMx3dGePoint, theS: number): void;
|
|
11753
|
+
Scaled(theP: MxNewMx3dGePoint, theS: number): MxNewMx3dGeEllipse;
|
|
11754
|
+
Transform(theT: MxNewMx3dGeTrsf): void;
|
|
11755
|
+
Transformed(theT: MxNewMx3dGeTrsf): MxNewMx3dGeEllipse;
|
|
11756
|
+
TranslateByVec(theV: MxNewMx3dGeVec): void;
|
|
11757
|
+
TranslatedByVec(theV: MxNewMx3dGeVec): MxNewMx3dGeEllipse;
|
|
11758
|
+
TranslateBy2Points(theP1: MxNewMx3dGePoint, theP2: MxNewMx3dGePoint): void;
|
|
11759
|
+
TranslatedBy2Points(theP1: MxNewMx3dGePoint, theP2: MxNewMx3dGePoint): MxNewMx3dGeEllipse;
|
|
10871
11760
|
}
|
|
10872
|
-
export declare class MxNewMx3dGeHyperbola extends
|
|
10873
|
-
constructor(
|
|
10874
|
-
|
|
10875
|
-
ParametricTransformation(T: MxNewMx3dGeTrsf): number;
|
|
10876
|
-
Reversed(): MxNewMx3dGeCircle;
|
|
10877
|
-
Period(): number;
|
|
10878
|
-
Value(U: number): MxNewMx3dGePoint;
|
|
11761
|
+
export declare class MxNewMx3dGeHyperbola extends MxNewMx3dGeObject {
|
|
11762
|
+
constructor();
|
|
11763
|
+
constructor(theA2: MxNewMx3dGeCSYSR, theMajorRadius: number, theMinorRadius: number);
|
|
10879
11764
|
SetAxis(theA1: MxNewMx3dGeAxis): void;
|
|
10880
11765
|
SetLocation(theP: MxNewMx3dGePoint): void;
|
|
11766
|
+
SetMajorRadius(theMajorRadius: number): void;
|
|
11767
|
+
SetMinorRadius(theMinorRadius: number): void;
|
|
10881
11768
|
SetPosition(theA2: MxNewMx3dGeCSYSR): void;
|
|
10882
|
-
Axis(): MxNewMx3dGeAxis;
|
|
10883
|
-
Location(): MxNewMx3dGePoint;
|
|
10884
|
-
Position(): MxNewMx3dGeCSYSR;
|
|
10885
|
-
XAxis(): MxNewMx3dGeAxis;
|
|
10886
|
-
YAxis(): MxNewMx3dGeAxis;
|
|
10887
|
-
Reverse(): void;
|
|
10888
|
-
Continuity(): MdGe.MxGAShapeEnum;
|
|
10889
|
-
IsCN(N: number): boolean;
|
|
10890
|
-
SetMajorRadius(MajorRadius: number): void;
|
|
10891
|
-
SetMinorRadius(MinorRadius: number): void;
|
|
10892
|
-
ReversedParameter(U: number): number;
|
|
10893
|
-
FirstParameter(): number;
|
|
10894
|
-
LastParameter(): number;
|
|
10895
|
-
IsClosed(): boolean;
|
|
10896
|
-
IsPeriodic(): boolean;
|
|
10897
11769
|
Asymptote1(): MxNewMx3dGeAxis;
|
|
10898
11770
|
Asymptote2(): MxNewMx3dGeAxis;
|
|
11771
|
+
Axis(): MxNewMx3dGeAxis;
|
|
10899
11772
|
ConjugateBranch1(): MxNewMx3dGeHyperbola;
|
|
10900
11773
|
ConjugateBranch2(): MxNewMx3dGeHyperbola;
|
|
10901
11774
|
Directrix1(): MxNewMx3dGeAxis;
|
|
@@ -10904,17 +11777,30 @@ export declare class MxNewMx3dGeHyperbola extends MxNewMx3dGeConic {
|
|
|
10904
11777
|
Focal(): number;
|
|
10905
11778
|
Focus1(): MxNewMx3dGePoint;
|
|
10906
11779
|
Focus2(): MxNewMx3dGePoint;
|
|
11780
|
+
Location(): MxNewMx3dGePoint;
|
|
10907
11781
|
MajorRadius(): number;
|
|
10908
11782
|
MinorRadius(): number;
|
|
10909
11783
|
OtherBranch(): MxNewMx3dGeHyperbola;
|
|
10910
11784
|
Parameter(): number;
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
|
|
11785
|
+
Position(): MxNewMx3dGeCSYSR;
|
|
11786
|
+
XAxis(): MxNewMx3dGeAxis;
|
|
11787
|
+
YAxis(): MxNewMx3dGeAxis;
|
|
11788
|
+
MirrorByPoint(theP: MxNewMx3dGePoint): void;
|
|
11789
|
+
MirroredByPoint(theP: MxNewMx3dGePoint): MxNewMx3dGeHyperbola;
|
|
11790
|
+
MirrorByAxis(theA1: MxNewMx3dGeAxis): void;
|
|
11791
|
+
MirroredByAxis(theA1: MxNewMx3dGeAxis): MxNewMx3dGeHyperbola;
|
|
11792
|
+
MirrorByCSYSR(theA2: MxNewMx3dGeCSYSR): void;
|
|
11793
|
+
MirroredByCSYSR(theA2: MxNewMx3dGeCSYSR): MxNewMx3dGeHyperbola;
|
|
11794
|
+
Rotate(theA1: MxNewMx3dGeAxis, theAng: number): void;
|
|
11795
|
+
Rotated(theA1: MxNewMx3dGeAxis, theAng: number): MxNewMx3dGeHyperbola;
|
|
11796
|
+
Scale(theP: MxNewMx3dGePoint, theS: number): void;
|
|
11797
|
+
Scaled(theP: MxNewMx3dGePoint, theS: number): MxNewMx3dGeHyperbola;
|
|
11798
|
+
Transform(theT: MxNewMx3dGeTrsf): void;
|
|
11799
|
+
Transformed(theT: MxNewMx3dGeTrsf): MxNewMx3dGeHyperbola;
|
|
11800
|
+
TranslateByVec(theV: MxNewMx3dGeVec): void;
|
|
11801
|
+
TranslatedByVec(theV: MxNewMx3dGeVec): MxNewMx3dGeHyperbola;
|
|
11802
|
+
TranslateBy2Points(theP1: MxNewMx3dGePoint, theP2: MxNewMx3dGePoint): void;
|
|
11803
|
+
TranslatedBy2Points(theP1: MxNewMx3dGePoint, theP2: MxNewMx3dGePoint): MxNewMx3dGeHyperbola;
|
|
10918
11804
|
}
|
|
10919
11805
|
export declare class MxNewMx3dGeVec extends MxNewMx3dGeObject {
|
|
10920
11806
|
constructor();
|
|
@@ -11026,40 +11912,40 @@ export declare class MxNewMx3dGeBox extends MxNewMx3dGeObject {
|
|
|
11026
11912
|
constructor(Axes: MxNewMx3dGeCSYSR, dx: number, dy: number, dz: number);
|
|
11027
11913
|
Shape(): MxNewMx3dShapeObject;
|
|
11028
11914
|
}
|
|
11029
|
-
export declare class MxNewMx3dGeCircle extends
|
|
11030
|
-
constructor(
|
|
11031
|
-
|
|
11032
|
-
ParametricTransformation(T: MxNewMx3dGeTrsf): number;
|
|
11033
|
-
Reversed(): MxNewMx3dGeCircle;
|
|
11034
|
-
Period(): number;
|
|
11035
|
-
Value(U: number): MxNewMx3dGePoint;
|
|
11915
|
+
export declare class MxNewMx3dGeCircle extends MxNewMx3dGeObject {
|
|
11916
|
+
constructor();
|
|
11917
|
+
constructor(theA2: MxNewMx3dGeCSYSR, theRadius: number);
|
|
11036
11918
|
SetAxis(theA1: MxNewMx3dGeAxis): void;
|
|
11037
11919
|
SetLocation(theP: MxNewMx3dGePoint): void;
|
|
11038
11920
|
SetPosition(theA2: MxNewMx3dGeCSYSR): void;
|
|
11921
|
+
SetRadius(theRadius: number): void;
|
|
11922
|
+
Area(): number;
|
|
11039
11923
|
Axis(): MxNewMx3dGeAxis;
|
|
11924
|
+
Length(): number;
|
|
11040
11925
|
Location(): MxNewMx3dGePoint;
|
|
11041
11926
|
Position(): MxNewMx3dGeCSYSR;
|
|
11927
|
+
Radius(): number;
|
|
11042
11928
|
XAxis(): MxNewMx3dGeAxis;
|
|
11043
11929
|
YAxis(): MxNewMx3dGeAxis;
|
|
11044
|
-
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11049
|
-
|
|
11050
|
-
|
|
11051
|
-
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11930
|
+
Distance(theP: MxNewMx3dGePoint): number;
|
|
11931
|
+
SquareDistance(theP: MxNewMx3dGePoint): number;
|
|
11932
|
+
Contains(theP: MxNewMx3dGePoint, theLinearTolerance: number): boolean;
|
|
11933
|
+
MirrorByPoint(theP: MxNewMx3dGePoint): void;
|
|
11934
|
+
MirroredByPoint(theP: MxNewMx3dGePoint): MxNewMx3dGeCircle;
|
|
11935
|
+
MirrorByAxis(theA1: MxNewMx3dGeAxis): void;
|
|
11936
|
+
MirroredByAxis(theA1: MxNewMx3dGeAxis): MxNewMx3dGeCircle;
|
|
11937
|
+
MirrorByCSYSR(theA2: MxNewMx3dGeCSYSR): void;
|
|
11938
|
+
MirroredByCSYSR(theA2: MxNewMx3dGeCSYSR): MxNewMx3dGeCircle;
|
|
11939
|
+
Rotate(theA1: MxNewMx3dGeAxis, theAng: number): void;
|
|
11940
|
+
Rotated(theA1: MxNewMx3dGeAxis, theAng: number): MxNewMx3dGeCircle;
|
|
11941
|
+
Scale(theP: MxNewMx3dGePoint, theS: number): void;
|
|
11942
|
+
Scaled(theP: MxNewMx3dGePoint, theS: number): MxNewMx3dGeCircle;
|
|
11943
|
+
Transform(theT: MxNewMx3dGeTrsf): void;
|
|
11944
|
+
Transformed(theT: MxNewMx3dGeTrsf): MxNewMx3dGeCircle;
|
|
11945
|
+
TranslateByVec(theV: MxNewMx3dGeVec): void;
|
|
11946
|
+
TranslatedByVec(theV: MxNewMx3dGeVec): MxNewMx3dGeCircle;
|
|
11947
|
+
TranslateBy2Points(theP1: MxNewMx3dGePoint, theP2: MxNewMx3dGePoint): void;
|
|
11948
|
+
TranslatedBy2Points(theP1: MxNewMx3dGePoint, theP2: MxNewMx3dGePoint): MxNewMx3dGeCircle;
|
|
11063
11949
|
}
|
|
11064
11950
|
export declare class MxNewMx3dShapeObject extends MxNewMx3dBaseObject {
|
|
11065
11951
|
constructor(p?: object);
|
|
@@ -11165,6 +12051,7 @@ export declare class MxNewMx3dView extends MxNewMx3dBaseObject {
|
|
|
11165
12051
|
setCustomClipPlaneReverse(): void;
|
|
11166
12052
|
setCustomClipPlaneDirection(x: number, y: number, z: number): void;
|
|
11167
12053
|
displaySymbolText(theSymbol: MxNewMx3dSymbolText): void;
|
|
12054
|
+
displayDimension(theDimension: MxNewMx3dDimObject): void;
|
|
11168
12055
|
addModelTexture(theFileName: string): void;
|
|
11169
12056
|
removeModelTexture(): void;
|
|
11170
12057
|
setGradientBgColor(theColor1: MxNewMx3dGeColor, theColor2: MxNewMx3dGeColor, theMethod: MdGe.MxGradientFillMethod): void;
|
|
@@ -12424,6 +13311,189 @@ export declare class MxNewMx3dGeMaterial extends MxNewMx3dBaseObject {
|
|
|
12424
13311
|
IsDifferent(theOther: MxNewMx3dGeMaterial): boolean;
|
|
12425
13312
|
IsEqual(theOther: MxNewMx3dGeMaterial): boolean;
|
|
12426
13313
|
}
|
|
13314
|
+
export declare class MxNewMx3dAspectLine extends MxNewMx3dAspectObject {
|
|
13315
|
+
constructor(theColor: MxNewMx3dGeColor, theType: MdGe.MxTypeOfLine, theWidth: number);
|
|
13316
|
+
SetColor(theColor: MxNewMx3dGeColor): void;
|
|
13317
|
+
SetTypeOfLine(theType: MdGe.MxTypeOfLine): void;
|
|
13318
|
+
SetWidth(theWidth: number): void;
|
|
13319
|
+
}
|
|
13320
|
+
export declare class MxNewMx3dAspectText extends MxNewMx3dAspectObject {
|
|
13321
|
+
constructor(p?: object);
|
|
13322
|
+
SetColor(theColor: MxNewMx3dGeColor): void;
|
|
13323
|
+
SetFont(theFont: string): void;
|
|
13324
|
+
SetHeight(theHeight: number): void;
|
|
13325
|
+
SetAngle(theAngle: number): void;
|
|
13326
|
+
Height(): number;
|
|
13327
|
+
Angle(): number;
|
|
13328
|
+
SetHorizontalJustification(theJustification: MdGe.MxHorizontalTextAlignment): void;
|
|
13329
|
+
SetVerticalJustification(theJustification: MdGe.MxVerticalTextAlignment): void;
|
|
13330
|
+
SetOrientation(theOrientation: MdGe.MxTextPath): void;
|
|
13331
|
+
HorizontalJustification(): MdGe.MxHorizontalTextAlignment;
|
|
13332
|
+
VerticalJustification(): MdGe.MxVerticalTextAlignment;
|
|
13333
|
+
Orientation(): MdGe.MxTextPath;
|
|
13334
|
+
}
|
|
13335
|
+
export declare class MxNewMx3dAspectArrow extends MxNewMx3dAspectObject {
|
|
13336
|
+
constructor();
|
|
13337
|
+
constructor(anAngle: number, aLength: number);
|
|
13338
|
+
SetAngle(anAngle: number): void;
|
|
13339
|
+
Angle(): number;
|
|
13340
|
+
SetLength(theLength: number): void;
|
|
13341
|
+
Length(): number;
|
|
13342
|
+
SetZoomable(theIsZoomable: boolean): void;
|
|
13343
|
+
IsZoomable(): boolean;
|
|
13344
|
+
SetColor(theColor: MxNewMx3dGeColor): void;
|
|
13345
|
+
}
|
|
13346
|
+
export declare class MxNewMx3dAspectDim extends MxNewMx3dAspectObject {
|
|
13347
|
+
constructor(p?: object);
|
|
13348
|
+
SetLineAspect(theAspect: MxNewMx3dAspectLine): void;
|
|
13349
|
+
SetTextAspect(theAspect: MxNewMx3dAspectText): void;
|
|
13350
|
+
IsText3d(): boolean;
|
|
13351
|
+
MakeText3d(isText3d: boolean): void;
|
|
13352
|
+
IsTextShaded(): boolean;
|
|
13353
|
+
MakeTextShaded(theIsTextShaded: boolean): void;
|
|
13354
|
+
IsArrows3d(): boolean;
|
|
13355
|
+
MakeArrows3d(theIsArrows3d: boolean): void;
|
|
13356
|
+
IsUnitsDisplayed(): boolean;
|
|
13357
|
+
MakeUnitsDisplayed(theIsDisplayed: boolean): void;
|
|
13358
|
+
SetArrowOrientation(theArrowOrient: MdGe.MxDimensionArrowOrientation): void;
|
|
13359
|
+
ArrowOrientation(): MdGe.MxDimensionArrowOrientation;
|
|
13360
|
+
SetTextVerticalPosition(thePosition: MdGe.MxDimensionTextVerticalPosition): void;
|
|
13361
|
+
TextVerticalPosition(): MdGe.MxDimensionTextVerticalPosition;
|
|
13362
|
+
SetTextHorizontalPosition(thePosition: MdGe.MxDimensionTextHorizontalPosition): void;
|
|
13363
|
+
TextHorizontalPosition(): MdGe.MxDimensionTextHorizontalPosition;
|
|
13364
|
+
SetArrowAspect(theAspect: MxNewMx3dAspectArrow): void;
|
|
13365
|
+
SetCommonColor(theColor: MxNewMx3dGeColor): void;
|
|
13366
|
+
SetExtensionSize(theSize: number): void;
|
|
13367
|
+
ExtensionSize(): number;
|
|
13368
|
+
SetArrowTailSize(theSize: number): void;
|
|
13369
|
+
ArrowTailSize(): number;
|
|
13370
|
+
SetValueStringFormat(theFormat: string): void;
|
|
13371
|
+
ValueStringFormat(): string;
|
|
13372
|
+
}
|
|
13373
|
+
export declare class MxNewMx3dDimDiameter extends MxNewMx3dDimObject {
|
|
13374
|
+
constructor(theCircle: MxNewMx3dGeCircle);
|
|
13375
|
+
constructor(theCircle: MxNewMx3dGeCircle, thePlane: MxNewMx3dGePlane);
|
|
13376
|
+
Circle(): MxNewMx3dGeCircle;
|
|
13377
|
+
AnchorPoint(): MxNewMx3dGePoint;
|
|
13378
|
+
Shape(): MxNewMx3dShapeObject;
|
|
13379
|
+
SetMeasuredGeometry(theCircle: MxNewMx3dGeCircle): void;
|
|
13380
|
+
SetTextPosition(theTextPos: MxNewMx3dGePoint): void;
|
|
13381
|
+
GetTextPosition(): MxNewMx3dGePoint;
|
|
13382
|
+
SetDisplayUnits(theUnits: string): void;
|
|
13383
|
+
SetModelUnits(theUnits: string): void;
|
|
13384
|
+
GetValue(): number;
|
|
13385
|
+
SetComputedValue(): void;
|
|
13386
|
+
SetCustomValue(theValue: number): void;
|
|
13387
|
+
GetPlane(): MxNewMx3dGePlane;
|
|
13388
|
+
GetGeometryType(): number;
|
|
13389
|
+
SetCustomPlane(thePlane: MxNewMx3dGePlane): void;
|
|
13390
|
+
UnsetCustomPlane(): void;
|
|
13391
|
+
IsTextPositionCustom(): boolean;
|
|
13392
|
+
SetDimensionAspect(theDimensionAspect: MxNewMx3dAspectDim): void;
|
|
13393
|
+
KindOfDimension(): MdGe.MxKindOfDimension;
|
|
13394
|
+
UnsetFixedTextPosition(): void;
|
|
13395
|
+
SelToleranceForText2d(): number;
|
|
13396
|
+
SetSelToleranceForText2d(theTol: number): void;
|
|
13397
|
+
GetFlyout(): number;
|
|
13398
|
+
SetFlyout(theFlyout: number): void;
|
|
13399
|
+
IsValid(): boolean;
|
|
13400
|
+
}
|
|
13401
|
+
export declare class MxNewMx3dDimRadius extends MxNewMx3dDimObject {
|
|
13402
|
+
constructor(theCircle: MxNewMx3dGeCircle);
|
|
13403
|
+
constructor(theCircle: MxNewMx3dGeCircle, theAnchorPoint: MxNewMx3dGePoint);
|
|
13404
|
+
Circle(): MxNewMx3dGeCircle;
|
|
13405
|
+
AnchorPoint(): MxNewMx3dGePoint;
|
|
13406
|
+
Shape(): MxNewMx3dShapeObject;
|
|
13407
|
+
SetMeasuredGeometry(theCircle: MxNewMx3dGeCircle): void;
|
|
13408
|
+
SetMeasuredGeometry(theCircle: MxNewMx3dGeCircle, theAnchorPoint: MxNewMx3dGePoint, theHasAnchor: boolean): void;
|
|
13409
|
+
SetTextPosition(theTextPos: MxNewMx3dGePoint): void;
|
|
13410
|
+
GetTextPosition(): MxNewMx3dGePoint;
|
|
13411
|
+
GetValue(): number;
|
|
13412
|
+
SetComputedValue(): void;
|
|
13413
|
+
SetCustomValue(theValue: number): void;
|
|
13414
|
+
GetPlane(): MxNewMx3dGePlane;
|
|
13415
|
+
GetGeometryType(): number;
|
|
13416
|
+
SetCustomPlane(thePlane: MxNewMx3dGePlane): void;
|
|
13417
|
+
UnsetCustomPlane(): void;
|
|
13418
|
+
IsTextPositionCustom(): boolean;
|
|
13419
|
+
SetDimensionAspect(theDimensionAspect: MxNewMx3dAspectDim): void;
|
|
13420
|
+
KindOfDimension(): MdGe.MxKindOfDimension;
|
|
13421
|
+
UnsetFixedTextPosition(): void;
|
|
13422
|
+
SelToleranceForText2d(): number;
|
|
13423
|
+
SetSelToleranceForText2d(theTol: number): void;
|
|
13424
|
+
GetFlyout(): number;
|
|
13425
|
+
SetFlyout(theFlyout: number): void;
|
|
13426
|
+
IsValid(): boolean;
|
|
13427
|
+
}
|
|
13428
|
+
export declare class MxNewMx3dDimAngle extends MxNewMx3dDimObject {
|
|
13429
|
+
constructor(theFirstEdge: MxNewMx3dShapeEdge, theSecondEdge: MxNewMx3dShapeEdge);
|
|
13430
|
+
constructor(theFirstPoint: MxNewMx3dGePoint, theSecondPoint: MxNewMx3dGePoint, theThirdPoint: MxNewMx3dGePoint);
|
|
13431
|
+
FirstPoint(): MxNewMx3dGePoint;
|
|
13432
|
+
SecondPoint(): MxNewMx3dGePoint;
|
|
13433
|
+
CenterPoint(): MxNewMx3dGePoint;
|
|
13434
|
+
FirstShape(): MxNewMx3dShapeObject;
|
|
13435
|
+
SecondShape(): MxNewMx3dShapeObject;
|
|
13436
|
+
ThirdShape(): MxNewMx3dShapeObject;
|
|
13437
|
+
SetMeasuredGeometry(theCone: MxNewMx3dShapeFace): void;
|
|
13438
|
+
SetMeasuredGeometry(theFirstEdge: MxNewMx3dShapeEdge, theSecondEdge: MxNewMx3dShapeEdge): void;
|
|
13439
|
+
SetMeasuredGeometry(theFirstPoint: MxNewMx3dGePoint, theSecondPoint: MxNewMx3dGePoint, theThridPoint: MxNewMx3dGePoint): void;
|
|
13440
|
+
SetTextPosition(theTextPos: MxNewMx3dGePoint): void;
|
|
13441
|
+
GetTextPosition(): MxNewMx3dGePoint;
|
|
13442
|
+
GetDisplayUnits(): string;
|
|
13443
|
+
GetModelUnits(): string;
|
|
13444
|
+
SetDisplayUnits(theUnits: string): void;
|
|
13445
|
+
SetModelUnits(theUnits: string): void;
|
|
13446
|
+
SetType(theType: MdGe.MxTypeOfAngle): void;
|
|
13447
|
+
GetType(): MdGe.MxTypeOfAngle;
|
|
13448
|
+
SetArrowsVisibility(theType: MdGe.MxTypeOfAngleArrowVisibility): void;
|
|
13449
|
+
GetArrowsVisibility(): MdGe.MxTypeOfAngleArrowVisibility;
|
|
13450
|
+
GetValue(): number;
|
|
13451
|
+
SetComputedValue(): void;
|
|
13452
|
+
SetCustomValue(theValue: number): void;
|
|
13453
|
+
GetPlane(): MxNewMx3dGePlane;
|
|
13454
|
+
GetGeometryType(): number;
|
|
13455
|
+
SetCustomPlane(thePlane: MxNewMx3dGePlane): void;
|
|
13456
|
+
UnsetCustomPlane(): void;
|
|
13457
|
+
IsTextPositionCustom(): boolean;
|
|
13458
|
+
SetDimensionAspect(theDimensionAspect: MxNewMx3dAspectDim): void;
|
|
13459
|
+
KindOfDimension(): MdGe.MxKindOfDimension;
|
|
13460
|
+
UnsetFixedTextPosition(): void;
|
|
13461
|
+
SelToleranceForText2d(): number;
|
|
13462
|
+
SetSelToleranceForText2d(theTol: number): void;
|
|
13463
|
+
GetFlyout(): number;
|
|
13464
|
+
SetFlyout(theFlyout: number): void;
|
|
13465
|
+
IsValid(): boolean;
|
|
13466
|
+
}
|
|
13467
|
+
export declare class MxNewMx3dDimLength extends MxNewMx3dDimObject {
|
|
13468
|
+
constructor();
|
|
13469
|
+
constructor(theEdge: MxNewMx3dShapeEdge, thePlane: MxNewMx3dGePlane);
|
|
13470
|
+
constructor(theFirstPoint: MxNewMx3dGePoint, theSecondPoint: MxNewMx3dGePoint, thePlane: MxNewMx3dGePlane);
|
|
13471
|
+
FirstPoint(): MxNewMx3dGePoint;
|
|
13472
|
+
SecondPoint(): MxNewMx3dGePoint;
|
|
13473
|
+
FirstShape(): MxNewMx3dShapeObject;
|
|
13474
|
+
SecondShape(): MxNewMx3dShapeObject;
|
|
13475
|
+
SetMeasuredGeometry(theFirstPoint: MxNewMx3dGePoint, theSecondPoint: MxNewMx3dGePoint, thePlane: MxNewMx3dGePlane): void;
|
|
13476
|
+
SetMeasuredShapes(theFirstShape: MxNewMx3dShapeObject, theSecondShape: MxNewMx3dShapeObject): void;
|
|
13477
|
+
SetTextPosition(theTextPos: MxNewMx3dGePoint): void;
|
|
13478
|
+
GetTextPosition(): MxNewMx3dGePoint;
|
|
13479
|
+
SetDirection(theDirection: MxNewMx3dGeDir, theUseDirection: boolean): void;
|
|
13480
|
+
GetValue(): number;
|
|
13481
|
+
SetComputedValue(): void;
|
|
13482
|
+
SetCustomValue(theValue: number): void;
|
|
13483
|
+
GetPlane(): MxNewMx3dGePlane;
|
|
13484
|
+
GetGeometryType(): number;
|
|
13485
|
+
SetCustomPlane(thePlane: MxNewMx3dGePlane): void;
|
|
13486
|
+
UnsetCustomPlane(): void;
|
|
13487
|
+
IsTextPositionCustom(): boolean;
|
|
13488
|
+
SetDimensionAspect(theDimensionAspect: MxNewMx3dAspectDim): void;
|
|
13489
|
+
KindOfDimension(): MdGe.MxKindOfDimension;
|
|
13490
|
+
UnsetFixedTextPosition(): void;
|
|
13491
|
+
SelToleranceForText2d(): number;
|
|
13492
|
+
SetSelToleranceForText2d(theTol: number): void;
|
|
13493
|
+
GetFlyout(): number;
|
|
13494
|
+
SetFlyout(theFlyout: number): void;
|
|
13495
|
+
IsValid(): boolean;
|
|
13496
|
+
}
|
|
12427
13497
|
export type Map = any;
|
|
12428
13498
|
/**
|
|
12429
13499
|
* cad地图对象
|