@manycore/custom-sdk 1.11.0 → 1.12.1

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.
Files changed (3) hide show
  1. package/index.d.ts +86 -1
  2. package/index.js +13 -13
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1003,6 +1003,24 @@ export declare class FittingDesignService extends BaseService {
1003
1003
  type: EElementType;
1004
1004
  }
1005
1005
 
1006
+ /**
1007
+ * 事件管理器
1008
+ */
1009
+ export declare interface IEvent<T = any> {
1010
+ /**
1011
+ * 添加事件监听
1012
+ */
1013
+ on: (fn: (evt: T) => void) => void;
1014
+ /**
1015
+ * 添加一次性事件监听
1016
+ */
1017
+ once: (fn: (evt: T) => void) => void;
1018
+ /**
1019
+ * 移除事件监听
1020
+ */
1021
+ off: (fn: (evt: T) => void) => void;
1022
+ }
1023
+
1006
1024
  /**
1007
1025
  * 自定义模式,hover触发模型高亮回调
1008
1026
  */
@@ -1138,6 +1156,17 @@ export declare class FittingDesignService extends BaseService {
1138
1156
  setHidden(isHidden: boolean): void;
1139
1157
  }
1140
1158
 
1159
+ /**
1160
+ * 获取交接面配置信息
1161
+ */
1162
+ export declare interface IGetModelIntersectedOption extends IBaseOptions {
1163
+ /**
1164
+ * 含义为交接面/体进行运算过程中的阈值容差;即两个平行面之间,生成交接信息时,最大距离
1165
+ * 默认值为 0.001m
1166
+ */
1167
+ tolerance?: number;
1168
+ }
1169
+
1141
1170
  /**
1142
1171
  * 获取模型数据
1143
1172
  */
@@ -1497,6 +1526,25 @@ export declare class FittingDesignService extends BaseService {
1497
1526
  */
1498
1527
  export declare type IModelHintOption = Record<string, IHintPlank>;
1499
1528
 
1529
+ export declare interface IModelValidateResult {
1530
+ /**
1531
+ * 元件总数量
1532
+ */
1533
+ total: number;
1534
+ /**
1535
+ * 验证不通过的总数量
1536
+ */
1537
+ invalidateTotal: number;
1538
+ /**
1539
+ * 是否验证通过
1540
+ */
1541
+ validate: boolean;
1542
+ /**
1543
+ * 验证不通过的元件ID列表
1544
+ */
1545
+ invalidateList: string[];
1546
+ }
1547
+
1500
1548
  /**
1501
1549
  * 获取交接信息
1502
1550
  *
@@ -1868,6 +1916,22 @@ export declare class FittingDesignService extends BaseService {
1868
1916
  getRealPaths(): IPlankArea;
1869
1917
  }
1870
1918
 
1919
+ /**
1920
+ * 板面信息
1921
+ */
1922
+ export declare interface IPlankFace {
1923
+ /**
1924
+ * 板面ID
1925
+ *
1926
+ * @value 0-5为正确板面值,-1表示不处于任意板面上
1927
+ */
1928
+ id: number;
1929
+ /**
1930
+ * 板面所属模型
1931
+ */
1932
+ modelId: string;
1933
+ }
1934
+
1871
1935
  /**
1872
1936
  * 板件轮廓上的某条闭合路径,例如外轮廓、内部挖洞
1873
1937
  */
@@ -2684,7 +2748,7 @@ export declare class FittingDesignService extends BaseService {
2684
2748
  *
2685
2749
  * @param options
2686
2750
  */
2687
- getParamIntersected(options?: IBaseOptions): Promise<IIntersectedResult>;
2751
+ getParamIntersected(options?: IGetModelIntersectedOption): Promise<IIntersectedResult>;
2688
2752
  /**
2689
2753
  * 获取方案顶层模型列表
2690
2754
  * @param options
@@ -2694,6 +2758,19 @@ export declare class FittingDesignService extends BaseService {
2694
2758
  getParamModelPhotoById(modelId: string | string[]): Promise<IParamModelPhotoResponse[]>;
2695
2759
  }
2696
2760
 
2761
+ /**
2762
+ * 模型检测服务
2763
+ */
2764
+ export declare class ModelValidateService extends BaseService {
2765
+ /**
2766
+ * 检测当前展示模型的元件ID是否稳定
2767
+ * @param option
2768
+ */
2769
+ stable(option: {
2770
+ modelId: string;
2771
+ }): Promise<IModelValidateResult | undefined>;
2772
+ }
2773
+
2697
2774
  /**
2698
2775
  * 主要是用来与场景交互的,监听当前选中的对象, 获取选中的内容
2699
2776
  *
@@ -2802,6 +2879,14 @@ export declare class FittingDesignService extends BaseService {
2802
2879
  * @ignore
2803
2880
  */
2804
2881
  private hasWatchSelectionChange;
2882
+ /**
2883
+ * 板面点击事件管理器
2884
+ */
2885
+ plankFaceClickEvent: IEvent<IPlankFace>;
2886
+ /**
2887
+ * 板面hover事件管理器
2888
+ */
2889
+ plankFaceHoverEvent: IEvent<IPlankFace>;
2805
2890
  /**
2806
2891
  * 获取当前选中的数据
2807
2892
  */