@manycore/custom-sdk 1.13.1 → 1.13.4-beta.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 +189 -119
  2. package/index.js +35 -21
  3. package/package.json +5 -5
package/index.d.ts CHANGED
@@ -1,9 +1,7 @@
1
- import { ELineType as ELineType_2 } from '@manycore/custom-miniapp-sdk';
2
1
  import { IExportModelData } from '@manycore/custom-miniapp-sdk';
3
2
  import { IParamModelPhotoResponse } from '@manycore/custom-miniapp-sdk';
4
3
  import { IServClientService } from 'servkit';
5
- import { Number2 } from '@manycore/custom-miniapp-sdk';
6
- import { Number3 } from '@manycore/custom-miniapp-sdk';
4
+ import { Number2 as Number2_2 } from '@manycore/custom-miniapp-sdk';
7
5
  import { ServService } from 'servkit';
8
6
 
9
7
  declare interface AMap<K, V> {
@@ -28,6 +26,7 @@ export declare class Application {
28
26
  private serviceMap;
29
27
  private sappSDK;
30
28
  constructor();
29
+ private startOnApiCalledEvent;
31
30
  /**
32
31
  * 判断当前是否在定制小程序下运行
33
32
  */
@@ -352,7 +351,7 @@ export declare enum EFittingType {
352
351
  /**
353
352
  * 交接面信息
354
353
  */
355
- INTERSECTED = 'intersected',
354
+ INTERSECTED = "intersected"
356
355
  }
357
356
 
358
357
  /**
@@ -362,11 +361,11 @@ export declare enum EIntersectedCreatedType {
362
361
  /**
363
362
  * 板与板之间产生的交界
364
363
  */
365
- BOTH_PLANK,
364
+ BOTH_PLANK = 0,
366
365
  /**
367
366
  * 板与五金之间产生的交界信息
368
367
  */
369
- PLANK_FURNITURE,
368
+ PLANK_FURNITURE = 1
370
369
  }
371
370
 
372
371
  /**
@@ -376,11 +375,29 @@ export declare enum EIntersectedType {
376
375
  /**
377
376
  * 交接体
378
377
  */
379
- SHELL = '1',
378
+ SHELL = "1",
380
379
  /**
381
380
  * 交界面
382
381
  */
383
- FACE = '2',
382
+ FACE = "2"
383
+ }
384
+
385
+ /**
386
+ * 交接对象类型
387
+ */
388
+ export declare enum EIntersectModelType {
389
+ /**
390
+ * 板件
391
+ */
392
+ PLANK = 0,
393
+ /**
394
+ * 五金
395
+ */
396
+ HARDWARE = 1,
397
+ /**
398
+ * 商品
399
+ */
400
+ PRODUCT = 2
384
401
  }
385
402
 
386
403
  /**
@@ -435,25 +452,6 @@ declare enum ElementType {
435
452
  * 线的类型
436
453
  */
437
454
  export declare enum ELineType {
438
- /**
439
- * 直线
440
- */
441
- SEGMENT = 0,
442
- /**
443
- * 圆弧
444
- */
445
- CIRCLE_ARC = 1,
446
- /**
447
- * 椭圆
448
- * 当前代码中,暂不支持
449
- */
450
- ELLIPSE_ARC = 3,
451
- }
452
-
453
- /**
454
- * 线的类型
455
- */
456
- declare enum ELineType_3 {
457
455
  /**
458
456
  * 直线
459
457
  */
@@ -621,33 +619,16 @@ export declare enum EPointType {
621
619
  /**
622
620
  * 椭圆
623
621
  */
624
- ELLIPSE = 4,
622
+ ELLIPSE = 4
625
623
  }
626
624
 
627
625
  /**
628
- * 点的类型
626
+ * 商品建模方向
629
627
  */
630
- declare enum EPointType_2 {
631
- /**
632
- * 普通点
633
- */
634
- NONE = 0,
635
- /**
636
- * 倒圆
637
- */
638
- CIRCLE = 1,
639
- /**
640
- * 倒角
641
- */
642
- LINE = 2,
643
- /**
644
- * 切圆,就是内挖一个倒圆的形状
645
- */
646
- CUT_CIRCLE = 3,
647
- /**
648
- * 椭圆
649
- */
650
- ELLIPSE = 4
628
+ export declare enum EProductDirection {
629
+ XY = 0,
630
+ YZ = 1,
631
+ XZ = 2
651
632
  }
652
633
 
653
634
  /**
@@ -854,6 +835,9 @@ export declare class FittingDesignService extends BaseService {
854
835
  * 保存孔/槽数据至方案
855
836
  * 如果design不传,即表示将分步保存数据存储至后端
856
837
  *
838
+ * 之前的孔槽会被design直接替换
839
+ *
840
+ * 如果只想展示孔槽可使用 {@link FittingDesignService.appendFittingDesign}
857
841
  * @example
858
842
  * ```typescript
859
843
  * await fittingDesignService.saveDesign({
@@ -915,7 +899,7 @@ export declare class FittingDesignService extends BaseService {
915
899
  export declare class FittingModelService extends BaseService {
916
900
  /**
917
901
  * 获取所有五金孔槽模型
918
- * @param modelId 模型id,查找相关联孔槽五金或模型下所有的板件关联孔槽五金
902
+ * @param modelId 模型id,查找相关联的孔槽五金或模型下所有的板件关联的孔槽五金
919
903
  * @returns Promise<IFittingModelLite[]>
920
904
  */
921
905
  getAllFittingModels(modelId?: string): Promise<IFittingModelLite[]>;
@@ -981,17 +965,14 @@ export declare class FittingDesignService extends BaseService {
981
965
  * 孔/槽的深度
982
966
  */
983
967
  depth: number;
984
-
985
968
  /**
986
969
  * 所处的板面
987
970
  */
988
971
  plankFaceId: number;
989
-
990
972
  /**
991
973
  * 起点
992
974
  */
993
975
  start: Number3;
994
-
995
976
  /**
996
977
  * 终点
997
978
  */
@@ -1000,6 +981,7 @@ export declare class FittingDesignService extends BaseService {
1000
981
 
1001
982
  /**
1002
983
  * 交接信息
984
+ * @vm-type UnknownType
1003
985
  */
1004
986
  export declare interface IBaseIntersected {
1005
987
  /**
@@ -1012,7 +994,6 @@ export declare class FittingDesignService extends BaseService {
1012
994
  * * 如果为交接体,length为8
1013
995
  */
1014
996
  points: Number3[];
1015
-
1016
997
  /**
1017
998
  * 当前交接信息产生的元件ID
1018
999
  */
@@ -1162,19 +1143,19 @@ export declare class FittingDesignService extends BaseService {
1162
1143
  /**
1163
1144
  * 所有的孔的数据
1164
1145
  */
1165
- holes: IFittingHoleCollect;
1146
+ holes: IFittingHoleCollect_2;
1166
1147
  /**
1167
1148
  * 槽的数据
1168
1149
  */
1169
- grooves: IFittingGrooveCollect;
1150
+ grooves: IFittingGrooveCollect_2;
1170
1151
  /**
1171
1152
  * 五金数据
1172
1153
  */
1173
- hardwares: IFittingHardwareCollect;
1154
+ hardwares: IFittingHardwareCollect_2;
1174
1155
  /**
1175
1156
  * 五金槽数据
1176
1157
  */
1177
- hardwareGrooves: IFittingHardwareGrooves;
1158
+ hardwareGrooves: IFittingHardwareGrooves_2;
1178
1159
  }
1179
1160
 
1180
1161
  export declare interface IFittingDesignValidateResult {
@@ -1189,16 +1170,31 @@ export declare class FittingDesignService extends BaseService {
1189
1170
  */
1190
1171
  export declare type IFittingGrooveCollect = Record<string, IGrooveData[]>;
1191
1172
 
1173
+ /**
1174
+ * 方案中的所有槽的数据
1175
+ */
1176
+ declare type IFittingGrooveCollect_2 = Record<string, IGrooveData[]>;
1177
+
1192
1178
  /**
1193
1179
  * 五金数据
1194
1180
  */
1195
1181
  export declare type IFittingHardwareCollect = Record<string, IHardwareData[]>;
1196
1182
 
1183
+ /**
1184
+ * 五金数据
1185
+ */
1186
+ declare type IFittingHardwareCollect_2 = Record<string, IHardwareData[]>;
1187
+
1197
1188
  /**
1198
1189
  * 五金槽数据
1199
1190
  */
1200
1191
  export declare type IFittingHardwareGrooves = Record<string, IHardwareGrooveData[]>;
1201
1192
 
1193
+ /**
1194
+ * 五金槽数据
1195
+ */
1196
+ declare type IFittingHardwareGrooves_2 = Record<string, IHardwareGrooveData[]>;
1197
+
1202
1198
  /**
1203
1199
  * 五金孔槽模型ID - 标识信息
1204
1200
  *
@@ -1222,6 +1218,11 @@ export declare class FittingDesignService extends BaseService {
1222
1218
  */
1223
1219
  export declare type IFittingHoleCollect = Record<string, IHoleData[]>;
1224
1220
 
1221
+ /**
1222
+ * 方案中,所有孔的数据
1223
+ */
1224
+ declare type IFittingHoleCollect_2 = Record<string, IHoleData[]>;
1225
+
1225
1226
  /**
1226
1227
  * 五金孔槽通用模型
1227
1228
  */
@@ -1270,17 +1271,71 @@ export declare class FittingDesignService extends BaseService {
1270
1271
  }
1271
1272
 
1272
1273
  /**
1273
- * 获取交接面配置信息
1274
+ * 获取模型的交接信息
1274
1275
  */
1275
- export declare interface IGetModelIntersectedOption extends IBaseOptions {
1276
+ declare interface IGetIntersectedOption {
1276
1277
  /**
1278
+ * 模型ID
1279
+ */
1280
+ modelId: string;
1281
+ /**
1282
+ * @deprecated 可使用bodyDistTol/faceDistTol分别指定交接体/面阈值
1277
1283
  * 含义为交接面/体进行运算过程中的阈值容差;即两个平行面之间,生成交接信息时,最大距离
1278
1284
  * 默认值为 0.1mm
1279
1285
  * 单位:毫米
1280
1286
  */
1281
1287
  tolerance?: number;
1288
+ /**
1289
+ * 超时时间
1290
+ * 单位:秒
1291
+ */
1292
+ timeout?: number;
1293
+ /**
1294
+ * 交接体阈值
1295
+ * 单位:毫米
1296
+ * @default 0.1
1297
+ */
1298
+ bodyDistTol?: number;
1299
+ /**
1300
+ * 交接面阈值
1301
+ * 单位:毫米
1302
+ * @default 0.1
1303
+ */
1304
+ faceDistTol?: number;
1305
+ /**
1306
+ * 是否过滤板厚
1307
+ * @default true
1308
+ */
1309
+ thicknessFilter?: boolean;
1310
+ /**
1311
+ * 参与计算的对象
1312
+ * 传入商品需要明确指定prodCatIds
1313
+ * @default [EIntersectModelType.PLANK,EIntersectModelType.HARDWARE]
1314
+ */
1315
+ computeModelTypes?: Array<EIntersectModelType>;
1316
+ /**
1317
+ * 参与计算的商品
1318
+ */
1319
+ products?: Array<{
1320
+ /**
1321
+ * 真分类
1322
+ */
1323
+ category: number;
1324
+ }>;
1325
+ /**
1326
+ * 商品统一建模方向
1327
+ * @default EProductDirection.XY
1328
+ */
1329
+ direction?: EProductDirection;
1282
1330
  }
1283
1331
 
1332
+ /**
1333
+ * 获取交接面配置信息
1334
+ */
1335
+ export declare interface IGetModelIntersectedOption
1336
+ extends Omit<IGetIntersectedOption, 'modelId'>,
1337
+ IBaseOptions {}
1338
+
1284
1339
  /**
1285
1340
  * 获取模型数据
1286
1341
  */
@@ -1297,7 +1352,6 @@ export declare class FittingDesignService extends BaseService {
1297
1352
  }
1298
1353
 
1299
1354
  export declare interface IGrooveData extends IBaseHoleGrooveData {
1300
- // 槽宽
1301
1355
  width: number;
1302
1356
  }
1303
1357
 
@@ -1309,22 +1363,18 @@ export declare class FittingDesignService extends BaseService {
1309
1363
  * 建模原点在板件坐标系下的坐标
1310
1364
  */
1311
1365
  position: Number3;
1312
-
1313
1366
  /**
1314
1367
  * 相对建模坐标系中夹角,不传默认没有任何基于板件坐标的旋转,会将五金以建模原点放在 position 上,五金建模方向和板件建模方向一致进行摆放。
1315
1368
  */
1316
1369
  rotate: Number3;
1317
-
1318
1370
  /**
1319
1371
  * 相对建模坐标系中缩放,不传默认五金和上传大小完全一致
1320
1372
  */
1321
1373
  scale: Number3;
1322
-
1323
1374
  /**
1324
1375
  * 商品ID
1325
1376
  */
1326
1377
  brandGoodId: string;
1327
-
1328
1378
  /**
1329
1379
  * 关联孔槽ID
1330
1380
  */
@@ -1339,7 +1389,6 @@ export declare class FittingDesignService extends BaseService {
1339
1389
  * 槽的深度
1340
1390
  */
1341
1391
  depth: number;
1342
-
1343
1392
  /**
1344
1393
  * 所处的板面
1345
1394
  */
@@ -1429,6 +1478,16 @@ export declare class FittingDesignService extends BaseService {
1429
1478
  diameter: number;
1430
1479
  }
1431
1480
 
1481
+ /**
1482
+ * 交接信息
1483
+ */
1484
+ export declare interface IIntersectedData {
1485
+ /**
1486
+ * 交接信息集合
1487
+ */
1488
+ intersectedGroups: IIntersectedGroup[];
1489
+ }
1490
+
1432
1491
  /**
1433
1492
  * 一组交接信息
1434
1493
  */
@@ -1450,12 +1509,7 @@ export declare class FittingDesignService extends BaseService {
1450
1509
  /**
1451
1510
  * 交接信息
1452
1511
  */
1453
- export declare interface IIntersectedResult {
1454
- /**
1455
- * 交接信息集合
1456
- */
1457
- intersectedGroups: IIntersectedGroup[];
1458
- }
1512
+ export declare type IIntersectedResult = IIntersectedData;
1459
1513
 
1460
1514
  /**
1461
1515
  * 轮廓路径线段表示
@@ -1465,7 +1519,7 @@ export declare class FittingDesignService extends BaseService {
1465
1519
  * 获取实际渲染端点
1466
1520
  * >线段两端
1467
1521
  */
1468
- getRenderPoints(): [Number2, Number2];
1522
+ getRenderPoints(): [Number2_2, Number2_2];
1469
1523
  /**
1470
1524
  * 设置线段的高亮,高亮深度为板件厚度
1471
1525
  * @param hint 高亮配置
@@ -1520,26 +1574,21 @@ export declare class FittingDesignService extends BaseService {
1520
1574
  /**
1521
1575
  * 直线
1522
1576
  */
1523
- export declare interface ILineDataBase
1524
- extends Omit<
1525
- ILineBase,
1526
- 'ellipseCenter' | 'clockwise' | 'minorArc' | 'radius' | 'majorRadius' | 'minorRadius'
1527
- > {
1577
+ export declare interface ILineDataBase extends Omit<ILineBase, 'ellipseCenter' | 'clockwise' | 'minorArc' | 'radius' | 'majorRadius' | 'minorRadius'> {
1528
1578
  /**
1529
1579
  * 线条类型
1530
1580
  */
1531
- type: ELineType_2.SEGMENT;
1581
+ type: ELineType.SEGMENT;
1532
1582
  }
1533
1583
 
1534
1584
  /**
1535
1585
  * 弧线
1536
1586
  */
1537
- export declare interface ILineDataCircle
1538
- extends Omit<ILineBase, 'ellipseCenter' | 'majorRadius' | 'minorRadius'> {
1587
+ export declare interface ILineDataCircle extends Omit<ILineBase, 'ellipseCenter' | 'majorRadius' | 'minorRadius'> {
1539
1588
  /**
1540
1589
  * 线条类型
1541
1590
  */
1542
- type: ELineType_2.CIRCLE_ARC;
1591
+ type: ELineType.CIRCLE_ARC;
1543
1592
  /**
1544
1593
  * 是否顺时针
1545
1594
  */
@@ -1729,7 +1778,7 @@ export declare class FittingDesignService extends BaseService {
1729
1778
  * @public
1730
1779
  * @typedef Number3
1731
1780
  */
1732
- position: Number3_2;
1781
+ position: Number3;
1733
1782
  /**
1734
1783
  * 当前模型的旋转信息
1735
1784
  * @readonly
@@ -1737,21 +1786,21 @@ export declare class FittingDesignService extends BaseService {
1737
1786
  * @typedef Number3
1738
1787
  * @deprecated 将废弃,推荐使用 rotation
1739
1788
  */
1740
- rotate: Number3_2;
1789
+ rotate: Number3;
1741
1790
  /**
1742
1791
  * 当前模型的旋转信息
1743
1792
  * @readonly
1744
1793
  * @public
1745
1794
  * @typedef Number3
1746
1795
  */
1747
- rotation: Number3_2;
1796
+ rotation: Number3;
1748
1797
  /**
1749
1798
  * 当前尺寸信息
1750
1799
  * @readonly
1751
1800
  * @public
1752
1801
  * @typedef Number3
1753
1802
  */
1754
- size: Number3_2;
1803
+ size: Number3;
1755
1804
  /**
1756
1805
  * 模型当中自定议的参数信息
1757
1806
  * @readonly
@@ -1830,34 +1879,34 @@ export declare class FittingDesignService extends BaseService {
1830
1879
  * 更新当前模型的位置信息
1831
1880
  * @param position {Number3} 坐标
1832
1881
  */
1833
- setPosition(position: Number3_2): void;
1882
+ setPosition(position: Number3): void;
1834
1883
  /**
1835
1884
  * 获取当前模型的坐标信息
1836
1885
  * @return Number3 相对父模型坐标,如果为顶层模型,则为世界坐标
1837
1886
  */
1838
- getPosition(): Number3_2;
1887
+ getPosition(): Number3;
1839
1888
  /**
1840
1889
  * 更新当前模型的旋转信息
1841
1890
  * @description 特别说明,定制模型,使用的是右手坐标系,rotate字段中
1842
1891
  * @param rotate {Number3} 旋转的弧度
1843
1892
  * @deprecated 将废弃,推荐使用 rotation
1844
1893
  */
1845
- setRotate(rotate: Number3_2): void;
1894
+ setRotate(rotate: Number3): void;
1846
1895
  /**
1847
1896
  * 获取当前模型相对父级的旋转信息
1848
1897
  * @deprecated 将废弃,推荐使用 rotation
1849
1898
  */
1850
- getRotate(): Number3_2;
1899
+ getRotate(): Number3;
1851
1900
  /**
1852
1901
  * 更新当前模型的旋转信息
1853
1902
  * @description 特别说明,定制模型,使用的是右手坐标系,rotation字段中
1854
1903
  * @param rotation {Number3} 旋转的弧度
1855
1904
  */
1856
- setRotation(rotation: Number3_2): void;
1905
+ setRotation(rotation: Number3): void;
1857
1906
  /**
1858
1907
  * 获取当前模型相对父级的旋转信息
1859
1908
  */
1860
- getRotation(): Number3_2;
1909
+ getRotation(): Number3;
1861
1910
  /**
1862
1911
  * 获取当前模型所处的工具线
1863
1912
  */
@@ -2038,13 +2087,21 @@ export declare class FittingDesignService extends BaseService {
2038
2087
  export declare interface IPlankArea {
2039
2088
  /**
2040
2089
  * 由板件原始轮廓数据解析出的所有路径
2090
+ * >包含一个外轮廓路径和任意个内部轮廓路径
2041
2091
  */
2042
2092
  paths: IPlankPath[];
2043
2093
 
2044
2094
  /**
2045
- * 对板件原始轮廓数据进行非直角端点处理、重合、偏移计算后的实际展示路径
2095
+ * 对板件原始轮廓数据进行非直角端点处理、重合、偏移计算后的实际展示路径,高亮时会将轮廓中心点放置到 (0, 0)
2096
+ * @param option.resetCenter 是否重置轮廓中心点为 (0, 0),默认为true
2097
+ * @param option.force 忽略计算缓存,同一个PlankArea对象,getRealPaths计算结果会被缓存,默认为false
2046
2098
  */
2047
- getRealPaths(): IPlankArea;
2099
+ getRealPaths(option?: { resetCenter?: boolean; force?: boolean }): IPlankArea;
2100
+
2101
+ /**
2102
+ * 获取外轮廓路径中心点坐标
2103
+ */
2104
+ getCenterPoint(): Number2_2;
2048
2105
  }
2049
2106
 
2050
2107
  /**
@@ -2082,7 +2139,7 @@ export declare class FittingDesignService extends BaseService {
2082
2139
  /**
2083
2140
  * 获取路径上实际渲染的端点
2084
2141
  */
2085
- getRenderPoints(): Number2[];
2142
+ getRenderPoints(): Number2_2[];
2086
2143
  }
2087
2144
 
2088
2145
  declare interface IPlankPathData {
@@ -2098,7 +2155,7 @@ export declare class FittingDesignService extends BaseService {
2098
2155
  /**
2099
2156
  * 线条类型
2100
2157
  */
2101
- type: ELineType_3;
2158
+ type: ELineType;
2102
2159
  /**
2103
2160
  * 是否顺时针
2104
2161
  */
@@ -2139,7 +2196,7 @@ export declare class FittingDesignService extends BaseService {
2139
2196
  /**
2140
2197
  * 点的类型
2141
2198
  */
2142
- type: EPointType_2;
2199
+ type: EPointType;
2143
2200
  /**
2144
2201
  * 切角两边上切点距离当前点的距离(切角专用)
2145
2202
  */
@@ -2182,7 +2239,7 @@ export declare class FittingDesignService extends BaseService {
2182
2239
  * 获取实际渲染端点
2183
2240
  * >非直角端点为渲染线段的两端,直角端点两个端点相同
2184
2241
  */
2185
- getRenderPoints(): [Number2, Number2];
2242
+ getRenderPoints(): [Number2_2, Number2_2];
2186
2243
  /**
2187
2244
  * 设置非直角端点渲染线段的高亮,高亮深度为板件厚度
2188
2245
  * @param hint 高亮配置
@@ -2205,6 +2262,9 @@ export declare class FittingDesignService extends BaseService {
2205
2262
  type: EPointType;
2206
2263
  /**
2207
2264
  * 点的位置
2265
+ *
2266
+ * @example
2267
+ * "123,-345"
2208
2268
  */
2209
2269
  position: Number3 | Number2;
2210
2270
  /**
@@ -2241,11 +2301,7 @@ export declare class FittingDesignService extends BaseService {
2241
2301
  /**
2242
2302
  * 倒圆
2243
2303
  */
2244
- export declare interface IPointWithCircle
2245
- extends Omit<
2246
- IPointBase,
2247
- 'clockwise' | 'majorRadius' | 'minorRadius' | 'cornerCutDistance' | 'offset'
2248
- > {
2304
+ export declare interface IPointWithCircle extends Omit<IPointBase, 'clockwise' | 'majorRadius' | 'minorRadius' | 'cornerCutDistance' | 'offset'> {
2249
2305
  /**
2250
2306
  * 切角类型
2251
2307
  */
@@ -2276,8 +2332,7 @@ export declare class FittingDesignService extends BaseService {
2276
2332
  /**
2277
2333
  * 切角
2278
2334
  */
2279
- export declare interface IPointWithLine
2280
- extends Omit<IPointBase, 'clockwise' | 'majorRadius' | 'minorRadius' | 'radius' | 'offset'> {
2335
+ export declare interface IPointWithLine extends Omit<IPointBase, 'clockwise' | 'majorRadius' | 'minorRadius' | 'radius' | 'offset'> {
2281
2336
  /**
2282
2337
  * 切角类型
2283
2338
  */
@@ -2291,11 +2346,7 @@ export declare class FittingDesignService extends BaseService {
2291
2346
  /**
2292
2347
  * 普通点类型
2293
2348
  */
2294
- export declare interface IPointWithNone
2295
- extends Omit<
2296
- IPointBase,
2297
- 'cornerCutDistance' | 'majorRadius' | 'minorRadius' | 'radius' | 'offset'
2298
- > {
2349
+ export declare interface IPointWithNone extends Omit<IPointBase, 'cornerCutDistance' | 'majorRadius' | 'minorRadius' | 'radius' | 'offset'> {
2299
2350
  /**
2300
2351
  * 普通点
2301
2352
  */
@@ -2892,12 +2943,22 @@ export declare class FittingDesignService extends BaseService {
2892
2943
  * const json = await service.getModelJsonDataByModelId('请输入模型ID');
2893
2944
  * ```
2894
2945
  *
2895
- * > 以上 API 暂不建议在非对接 2.0 环境下使用,主要是与孔/槽方案数据存在关联关系。
2896
- > > 替代的 service 为`CustomDesignExportService`,将会在 9 月底最新的`@manycore/custom-miniapp-sdk`中提供。
2946
+ * > 以上 API 暂不建议在非对接 2.0 环境下使用,主要是与孔/槽方案数据存在关联关系
2947
+ > > 耗时API 建议后台异步请求并配合做好缓存
2948
+ > > >替代的 service 为`CustomDesignExportService`,将会在 9 月底最新的`@manycore/custom-miniapp-sdk`中提供。
2897
2949
  *
2898
- * @example
2950
+ * @example 最佳实践
2899
2951
  * ```typescript
2900
- * await modelService.getParamData();
2952
+ * // 后台异步任务 串行执行不建议并发
2953
+ * const cache = new Map<string, any>();
2954
+ * for (const model of models) {
2955
+ * const { id } = model;
2956
+ * const data = await getParamData({ modelId: id });
2957
+ * cache.set(id, data)
2958
+ * }
2959
+ *
2960
+ * // 主线程获取
2961
+ * cache.get(id);
2901
2962
  * ```
2902
2963
  *
2903
2964
  * @param options
@@ -2905,10 +2966,19 @@ export declare class FittingDesignService extends BaseService {
2905
2966
  getParamData(options?: IGetParamModelJsonOption): Promise<any>;
2906
2967
  /**
2907
2968
  * 获取模型的交接数据
2908
- *
2969
+ * > 耗时API 建议后台异步请求并配合做好缓存
2909
2970
  * @example
2910
2971
  * ```typescript
2911
- * await modelService.getParamIntersected();
2972
+ * // 后台异步任务 串行执行不建议并发
2973
+ * const cache = new Map<string, any>();
2974
+ * for (const model of models) {
2975
+ * const { id } = model;
2976
+ * const data = await getParamIntersected({ modelId: id });
2977
+ * cache.set(id, data)
2978
+ * }
2979
+ *
2980
+ * // 主线程获取
2981
+ * cache.get(id);
2912
2982
  * ```
2913
2983
  *
2914
2984
  * @param options
@@ -3172,7 +3242,7 @@ export declare class FittingDesignService extends BaseService {
3172
3242
  /**
3173
3243
  * 二维空间下:坐标/向量/旋转/尺寸的基础表示
3174
3244
  */
3175
- declare interface Number2_2 {
3245
+ declare interface Number2 {
3176
3246
  /**
3177
3247
  * x轴上的数据
3178
3248
  */
@@ -3186,7 +3256,7 @@ export declare class FittingDesignService extends BaseService {
3186
3256
  /**
3187
3257
  * 三维空间下,坐标/向量/旋转/尺寸的基础表示
3188
3258
  */
3189
- declare interface Number3_2 extends Number2_2 {
3259
+ declare interface Number3 extends Number2 {
3190
3260
  /**
3191
3261
  * z轴方向数据
3192
3262
  */