mxcad 1.0.73 → 1.0.75

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
@@ -1,6 +1,6 @@
1
1
  // Generated by dts-bundle-generator v6.13.0
2
2
 
3
- import { MxDbEntity, MxDrawObject } from 'mxdraw';
3
+ import { DetailedResult, DynamicInputType, McEdGetPointWorldDrawObject, MrxDbgUiPrBaseReturn, MxCursorType, MxDbEntity, MxDrawObject } from 'mxdraw';
4
4
 
5
5
  export declare function b64Encode(str: string): string;
6
6
  export declare function b64Decode(str: string): string;
@@ -38,6 +38,7 @@ export declare class McGePoint3d {
38
38
  * @param dZ Z 坐标。
39
39
  */
40
40
  constructor(dX?: number | object, dY?: number, dZ?: number);
41
+ toVector3(): THREE.Vector3;
41
42
  /**
42
43
  * 复制对象的值
43
44
  */
@@ -93,6 +94,7 @@ export declare class McGeVector3d {
93
94
  static kXAxis: McGeVector3d;
94
95
  static kYAxis: McGeVector3d;
95
96
  static kZAxis: McGeVector3d;
97
+ static kNegateZAxis: McGeVector3d;
96
98
  imp: any;
97
99
  /**
98
100
  * 构造函数。
@@ -351,7 +353,7 @@ export declare class McRxObject {
351
353
  * 初始化临时对象。
352
354
  * @param imp 内部实现对象。
353
355
  */
354
- protected initTempObject(imp: any): void;
356
+ initTempObject(imp: any): void;
355
357
  /**
356
358
  * 获取对象名称。
357
359
  */
@@ -371,6 +373,7 @@ export declare class McRxObject {
371
373
  * @returns 是否设置成功。
372
374
  */
373
375
  setJson(str: string): boolean;
376
+ isKindOf(sObjectName: string): boolean;
374
377
  }
375
378
  /**
376
379
  * 枚举类型 McObjectIdType 表示对象的类型。
@@ -406,10 +409,15 @@ export declare class McObjectId {
406
409
  */
407
410
  erase(): void;
408
411
  /**
409
- * 返回MxCAD对象。
412
+ * 返回MxCAD McDbObject对象。
410
413
  */
411
414
  getMcDbObject(): McDbObject | null;
412
415
  /**
416
+ * 返回MxCAD McDbEntity 对象。
417
+ */
418
+ getMcDbEntity(): McDbEntity | null;
419
+ clone(): McDbObject | null;
420
+ /**
413
421
  * 返回id指向的对象名称.
414
422
  */
415
423
  getObjectName(): string;
@@ -441,7 +449,7 @@ export declare class McDbObject extends McRxObject {
441
449
  * 克隆对象。
442
450
  * @returns 克隆出的对象。
443
451
  */
444
- Clone(): McDbObject;
452
+ Clone(): McDbObject | null;
445
453
  /**
446
454
  * 得到对象句柄
447
455
  */
@@ -632,8 +640,131 @@ export declare class MxCADSelectionSet extends McRxObject {
632
640
  count(): number;
633
641
  item(lItem: number): McObjectId;
634
642
  forEach(call: (val: McObjectId) => void): void;
643
+ getIds(): McObjectId[];
635
644
  userSelect(strPrompt?: string, filter?: McDrawResbuf | null): Promise<boolean>;
636
645
  }
646
+ export declare class MxCADUiPrPoint {
647
+ private imp;
648
+ constructor();
649
+ go(): Promise<McGePoint3d | null>;
650
+ /**
651
+ * 返回关键字列表
652
+ * @returns 关键词列表
653
+ */
654
+ keyWords(): string;
655
+ /**
656
+ * 设置关键字列表
657
+ * @param keyWordList 关键词列表
658
+ * @returns void
659
+ */
660
+ setKeyWords(keyWordList: string): void;
661
+ /**
662
+ * 提示字符串
663
+ * @returns 提示消息
664
+ */
665
+ message(): string;
666
+ /**
667
+ * 设置提示字符串
668
+ * @param message 提示消息
669
+ * @returns 提示消息
670
+ */
671
+ setMessage(message: string): void;
672
+ /**
673
+ * 返回用户选择的关键字
674
+ * @returns 选择的关键字
675
+ */
676
+ keyWordPicked(): string;
677
+ /**
678
+ * 测试某一个关键字是否被用户选择
679
+ * @param matchKeyWord 要检测的关键字
680
+ * @returns true为真
681
+ */
682
+ isKeyWordPicked(matchKeyWord: string): boolean;
683
+ /**
684
+ * 设置交互过程的动态绘制调用对象
685
+ * @param pDraw {@link McEdGetPointWorldDrawObject | 动态绘制调用对象}
686
+ * @returns void
687
+ */
688
+ setUserDraw(pDraw: ((currentPoint: McGePoint3d, pWorldDraw: McEdGetPointWorldDrawObject) => void)): void;
689
+ /**
690
+ * 得以获取的点对象,Three.js坐标
691
+ * @returns 点对象 THREE.THREE.Vector3
692
+ */
693
+ value(): McGePoint3d;
694
+ /**
695
+ * 得到 MxCAD下CAD图纸坐标.
696
+ * @returns 点对象 MdGePoint3d
697
+ */
698
+ getCADValue(): McGePoint3d;
699
+ /**
700
+ * 得到动态拖动的基点
701
+ * @returns 基点 THREE.THREE.Vector3
702
+ */
703
+ basePt(): McGePoint3d;
704
+ /**
705
+ * 设置动态拖动的基点
706
+ * @param basePt 基点 THREE.THREE.Vector3
707
+ * @returns 点对象 DWG图纸坐标
708
+ */
709
+ setBasePt(basePt: McGePoint3d): void;
710
+ /**
711
+ * 设置使用动态拖动的基点
712
+ * @param useIt 是否设置 默认为false
713
+ * @returns void
714
+ */
715
+ setUseBasePt(useIt: boolean): void;
716
+ /**
717
+ * 返回交互操作退出的详细原因
718
+ */
719
+ getDetailedResult(): DetailedResult;
720
+ getStatus(): MrxDbgUiPrBaseReturn;
721
+ /**
722
+ * 把动态绘制的对象,保留到图上。
723
+ * @param callAddEntity 回调参数ent 类型:THREE.THREE.Object3D
724
+ * @returns 点对象 DWG图纸坐标
725
+ */
726
+ drawReserve(callAddEntity?: (ent: THREE.Object3D) => void): void;
727
+ /**
728
+ * 设置需要的Touche输入类型,默认值是 {@link MxType.InputToucheType.kGetBegan}
729
+ */
730
+ setInputToucheType(toucheType: number): void;
731
+ /**
732
+ * 返回需要的Touche输入类型
733
+ */
734
+ getInputToucheType(): number;
735
+ /**
736
+ * 设置光标类型
737
+ */
738
+ setCursorType(type: MxCursorType): void;
739
+ /**
740
+ * 返回光标类型
741
+ */
742
+ getCursorType(): MxCursorType;
743
+ /**
744
+ * 设置动态输入类型
745
+ */
746
+ setDynamicInputType(type: DynamicInputType): void;
747
+ /**
748
+ * 返回动态输入类型
749
+ */
750
+ getDynamicInputType(): DynamicInputType;
751
+ /**
752
+ * 是否禁用动态输入框
753
+ */
754
+ isDisableDynInput(): boolean;
755
+ /**
756
+ * 设置是否禁用动态输入框
757
+ */
758
+ setDisableDynInput(isDisable: boolean): void;
759
+ /**
760
+ * 设置是否禁用捕捉
761
+ */
762
+ setDisableOsnap(isDisable: boolean): void;
763
+ /**
764
+ * 是否禁用捕捉
765
+ */
766
+ isDisableOsnap(): boolean;
767
+ }
637
768
  /**
638
769
  * 表示数据库实体。
639
770
  */
@@ -1935,7 +2066,6 @@ declare class McRxObjectImp {
1935
2066
  export declare class McObject {
1936
2067
  /** 内部对象实现 */
1937
2068
  private imp;
1938
- private mxObject;
1939
2069
  /** 当前文件名 */
1940
2070
  static currentFileName: string;
1941
2071
  /**
@@ -1957,11 +2087,6 @@ export declare class McObject {
1957
2087
  * @returns 对象实现
1958
2088
  */
1959
2089
  getImp(): any;
1960
- /**
1961
- * 获取 MxCpp 对象实现
1962
- * @returns MxCpp 对象实现
1963
- */
1964
- getMxCppImp(): any;
1965
2090
  /**
1966
2091
  * 更新对象显示
1967
2092
  * @param modelViewMatrix 模型视图矩阵
@@ -2407,18 +2532,6 @@ export declare class McObject {
2407
2532
  * @returns 与 ID 对应的 McDbObject 对象,如果对象不存在则返回 null
2408
2533
  */
2409
2534
  ObjectIdToObject(lIdIndex: number): McDbObject | null;
2410
- /**
2411
- * 克隆指定 ID 的 McDbObject 对象
2412
- * @param id - 对象 ID
2413
- * @returns 克隆后的 McDbObject 对象
2414
- */
2415
- CloneMcDbObject(id: number): McDbObject;
2416
- /**
2417
- * 将 lIdIndex 转换成 MdObjectImp 对象
2418
- * @param lIdIndex - 对象 ID
2419
- * @returns 与 ID 对应的 MdObjectImp 对象
2420
- */
2421
- ObjectIdToMdObjectImp(lIdIndex: number): any;
2422
2535
  /**
2423
2536
  * 销毁指定的 McRxObjectImp 对象
2424
2537
  * @param pObjectImp - 待销毁的 McRxObjectImp 对象
@@ -2428,7 +2541,18 @@ export declare class McObject {
2428
2541
  * 得到所有布局名
2429
2542
  */
2430
2543
  GetAllLayoutName(): McGeStringArray;
2544
+ /**
2545
+ * 设置所有布局名
2546
+ */
2431
2547
  SetCurrentLayout(layoutName: string): void;
2548
+ /**
2549
+ * 返加MxCpp对象,它会在MxDraw模块中调用。
2550
+ */
2551
+ GetMxCpp(): any;
2552
+ /**
2553
+ * 当前绘图坐标到CAD坐标.
2554
+ */
2555
+ docCoord2Cad(pt: McGePoint3d): McGePoint3d;
2432
2556
  }
2433
2557
  /**
2434
2558
  * McAppType 类,提供了 MxCAD 的一些基本操作。
@@ -2480,6 +2604,10 @@ export declare class McAppType {
2480
2604
  */
2481
2605
  mcedRGB2Index(red: number, green: number, blue: number, bAutoNearest?: boolean): number;
2482
2606
  /**
2607
+ * 判断一个对象id是否指类类型名对象
2608
+ */
2609
+ ObjectIdIsKindOf(lIdIndex: number, className: string): boolean;
2610
+ /**
2483
2611
  * 将对象 id 转换为 McDbObject 对象。
2484
2612
  * @param lIdIndex 对象的 id。
2485
2613
  * @returns 返回转换后的 McDbObject 对象,如果转换失败,则返回 null。
@@ -2490,7 +2618,7 @@ export declare class McAppType {
2490
2618
  * @param clonobjImp 被克隆的对象。
2491
2619
  * @returns 返回创建的 McDbObject 对象。
2492
2620
  */
2493
- CreateCloneObject(clonobjImp: any): McDbObject;
2621
+ CreateCloneObject(clonobjImp: any): McDbObject | null;
2494
2622
  /**
2495
2623
  * 调置字体加载位置,默值是fonts
2496
2624
  */