@kudashi/kds-api 2.13.27 → 2.13.29

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/README.md +9 -0
  2. package/api.d.ts +299 -13
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  # api changelog
4
4
 
5
+ # version 2.13.29(2025-02-20)
6
+ - 新增KGroupInstance.getInstanceParentGroupDefinition
7
+ - 新增KDesign.getEditPathsToGroupInstance KDesign.activateEditPath KDesign.toggleEntitiesVisible
8
+ - 新增isVisible判断模型是否可见
9
+
10
+ # version 2.13.28(2025-02-11)
11
+ - 支持三方插件存储模型库
12
+ - 插件标题支持多语言机制,详情参考:https://manual.kujiale.com/kds-plugin-document/1.0.0/docs/tutorial/%E9%85%B7%E5%A4%A7%E5%B8%88%E6%8F%92%E4%BB%B6%E6%A0%BC%E5%BC%8F%E8%A6%81%E6%B1%82
13
+
5
14
  # version 2.13.27(2028-01-07)
6
15
  - KDesign.startOperation和KDesign.commitOperation之间的操作更加兼容undo/redo
7
16
  - KGroupInstance.setCustomProperty和KGroupDefinition.setCustomProperty兼容undo/redo
package/api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // version: 2.13.27
1
+ // version: 2.13.29
2
2
 
3
3
  declare global {
4
4
  /**
@@ -61,6 +61,7 @@ declare global {
61
61
  */
62
62
  isSoft(): boolean;
63
63
  }
64
+
64
65
  /**
65
66
  * The KTopoType class represents topology entity types.
66
67
  */
@@ -100,6 +101,7 @@ declare global {
100
101
  */
101
102
  getType(): KTopoType;
102
103
  }
104
+
103
105
  /**
104
106
  * The KTopoFace class represents a BRep face.
105
107
  * You may think a face is a patch of a surface with boundary edges.
@@ -157,6 +159,7 @@ declare global {
157
159
  */
158
160
  isReversed(): boolean;
159
161
  }
162
+
160
163
  /**
161
164
  * The KTopoHalfEdge class represents a BRep half edge.
162
165
  */
@@ -207,6 +210,7 @@ declare global {
207
210
  */
208
211
  isReversed(): boolean;
209
212
  }
213
+
210
214
  /**
211
215
  * The KTopoLoop class represents a BRep loop.
212
216
  */
@@ -222,6 +226,7 @@ declare global {
222
226
  */
223
227
  getHalfEdges(): KTopoHalfEdge[];
224
228
  }
229
+
225
230
  /**
226
231
  * The KTopoShell class represents a BRep shell.
227
232
  */
@@ -237,6 +242,7 @@ declare global {
237
242
  */
238
243
  getEdges(): KTopoEdge[];
239
244
  }
245
+
240
246
  /**
241
247
  * The KTopoVertex class represents a BRep vertex.
242
248
  */
@@ -261,6 +267,7 @@ declare global {
261
267
  isSoft(): boolean;
262
268
  }
263
269
 
270
+
264
271
  /*
265
272
  * KApplication.ts
266
273
  * Copyright 2022 Qunhe Tech, all rights reserved.
@@ -439,6 +446,15 @@ declare global {
439
446
  */
440
447
  getPluginViewById(id: string): KPluginView | undefined;
441
448
 
449
+ /**
450
+ *
451
+ * 获取插件模型库帮助器,包含模型公库和私库
452
+ *
453
+ * Get the KPluginModelLibraryHelper object.
454
+ * @returns The KPluginModelLibraryHelper object.
455
+ */
456
+ getPluginModelLibraryHelper(): KPluginModelLibraryHelper;
457
+
442
458
  /**
443
459
  *
444
460
  * 将沙盒代码中的自定义消息处理函数注册到酷大师
@@ -803,6 +819,14 @@ declare global {
803
819
  * @returns The auxiliary vertex at the end of the auxiliary bounded curve.
804
820
  */
805
821
  getEndVertex(): KAuxiliaryVertex;
822
+
823
+ /**
824
+ *
825
+ * 获取该参考线段是否可见
826
+ *
827
+ * Get the auxiliaryBoundedCurve property of it is visible or not.
828
+ */
829
+ isVisible(): boolean;
806
830
  }
807
831
 
808
832
  /*
@@ -825,6 +849,14 @@ declare global {
825
849
  * @returns The unique key.
826
850
  */
827
851
  getKey(): string;
852
+
853
+ /**
854
+ *
855
+ * 获取该参考线是否可见
856
+ *
857
+ * Get the auxiliaryCurve property of it is visible or not.
858
+ */
859
+ isVisible(): boolean;
828
860
  }
829
861
 
830
862
  /*
@@ -846,6 +878,14 @@ declare global {
846
878
  * @returns The geometric 3D line.
847
879
  */
848
880
  getLine(): KLine3d;
881
+
882
+ /**
883
+ *
884
+ * 获取该参考线是否可见
885
+ *
886
+ * Get the auxiliaryCurve property of it is visible or not.
887
+ */
888
+ isVisible(): boolean;
849
889
  }
850
890
 
851
891
  /*
@@ -1574,7 +1614,7 @@ declare global {
1574
1614
  *
1575
1615
  * The method is used to copy the group instances.
1576
1616
  * @param groupInstances The group instances to copy.
1577
- * @param matrix The transformation matrix. The default value is an identity matrix.
1617
+ * @param matrix The transformation matrix in current activated groupDefinition. The default value is an identity matrix.
1578
1618
  * @returns Return an object that contains added group instances if successful, otherwise return null.
1579
1619
  */
1580
1620
  copyGroupInstances(groupInstances: KGroupInstance[], matrix?: KMatrix4): { addedInstances: KGroupInstance[] } | null;
@@ -1586,7 +1626,7 @@ declare global {
1586
1626
  *
1587
1627
  * The method is used to copy each group multile times with different matrices.
1588
1628
  * @param groupInstances The group instances to copy.
1589
- * @param matricesForEachInstance The transformation matrices for each group instance.
1629
+ * @param matricesForEachInstance The transformation matrices for each group instance, and matrices are based in current activated groupDefinition.
1590
1630
  * @returns Return an object that contains added group instances if successful, otherwise return null.
1591
1631
  */
1592
1632
  bulkCopyGroupInstances(groupInstances: KGroupInstance[], matricesForEachInstance: KMatrix4[][]): { addedInstances: KGroupInstance[] } | null;
@@ -1729,6 +1769,22 @@ declare global {
1729
1769
  */
1730
1770
  activateGroupInstance(groupInstance: KGroupInstance): HostPromise<{ isSuccess: boolean }>;
1731
1771
 
1772
+ /**
1773
+ *
1774
+ * 设置编辑路径。
1775
+ * 编辑路径:
1776
+ * 1. 从顶层组实例开始,依次为直接包含关系;
1777
+ * 2. 路径为空表示跳转到顶层编辑状态(完全退出组编辑状态)。
1778
+ *
1779
+ * Activate the edit path.
1780
+ * Edit path:
1781
+ * Start from the top-level groupInstance, sequentially representing direct containment relationships;
1782
+ * An empty path indicates a transition to the top-level edit state (completely exiting the group edit state).
1783
+ * @param editPath The edit path.
1784
+ * @returns Return an object that contains success flag.
1785
+ */
1786
+ activateEditPath(editPath: KGroupInstance[]): HostPromise<{ isSuccess: boolean }>;
1787
+
1732
1788
  /**
1733
1789
  *
1734
1790
  * 反激活一个成组实例
@@ -1762,6 +1818,16 @@ declare global {
1762
1818
  */
1763
1819
  getEditPath(): KGroupInstance[];
1764
1820
 
1821
+ /**
1822
+ *
1823
+ * 获取组实例的编辑路径(从顶层起始,不包含给定组实例)
1824
+ *
1825
+ * Get the edit paths of the groupInstance (starting from the top level, excluding the given groupInstance)
1826
+ * @param groupInstance the groupInstance
1827
+ * @returns the edit paths
1828
+ */
1829
+ getEditPathsToGroupInstance(groupInstance: KGroupInstance): KGroupInstance[][];
1830
+
1765
1831
  /**
1766
1832
  *
1767
1833
  * @deprecated 此 API 仅供酷大师内部开发团队使用
@@ -1993,12 +2059,28 @@ declare global {
1993
2059
  * Turn on/off the visibility of group instances. Constraints as below:
1994
2060
  * 1. the group instances can be/not be in the current editing group definition (CheckUtils.CheckOperatingGroupInstanceInDefinition is false);
1995
2061
  * 2. this operation is not a undo/redo transaction. it will not cause the design to be dirty as well.
2062
+ * 3. will clear selection
1996
2063
  *
1997
2064
  * @param groupInstances
1998
2065
  * @param isVisible : True is turning to be visible, and vice versa
1999
2066
  */
2000
2067
  toggleGroupInstancesVisible(groupInstances: KGroupInstance[], isVisible: boolean): { isSuccess: boolean };
2001
2068
 
2069
+ /**
2070
+ * 显示或者隐藏组实例、壳、面、边和参考线。仅用于特定场合,限制条件如下:
2071
+ *
2072
+ * Turn on/off the visibility of group instances, shells, faces, edges and auxiliaryCurves. Constraints as below:
2073
+ * 1. the entities can be/not be in the current editing group definition (CheckUtils.CheckOperatingGroupInstanceInDefinition is false);
2074
+ * 2. this operation is not a undo/redo transaction. it will not cause the design to be dirty as well.
2075
+ * 3. will clear selection
2076
+ *
2077
+ * @param groupInstances the group instances
2078
+ * @param faces the faces
2079
+ * @param auxiliaryCurves the auxiliaryCurves
2080
+ * @param isVisible : True is turning to be visible, and vice versa
2081
+ */
2082
+ toggleEntitiesVisible(groupInstances: KGroupInstance[], shells: KShell[], faces: KFace[], edges: KEdge[], auxiliaryCurves: KAuxiliaryCurve[], isVisible: boolean): { isSuccess: boolean };
2083
+
2002
2084
  /**
2003
2085
  * Align the shells with a discrete target curve.
2004
2086
  *
@@ -2132,6 +2214,7 @@ declare global {
2132
2214
  ): HostPromise<{ face: KFace, resultFaces: KFace[] }[] | undefined>;
2133
2215
  }
2134
2216
 
2217
+
2135
2218
  /*
2136
2219
  * KEdge.ts
2137
2220
  * Copyright 2022 Qunhe Tech, all rights reserved.
@@ -2229,6 +2312,14 @@ declare global {
2229
2312
  * @return The continuous edge group if successful, otherwise null.
2230
2313
  */
2231
2314
  getContinuousEdgeGroup(): KContinuousEdgeGroup | null;
2315
+
2316
+ /**
2317
+ *
2318
+ * 获取该边是否可见
2319
+ *
2320
+ * Get the edge property of it is visible or not.
2321
+ */
2322
+ isVisible(): boolean;
2232
2323
  }
2233
2324
 
2234
2325
  /*
@@ -2286,6 +2377,34 @@ declare global {
2286
2377
  getType(): KEntityType;
2287
2378
  }
2288
2379
 
2380
+ enum KErrorCode {
2381
+ Unknown = 'Unknown',
2382
+ PluginNotExist = 'PluginNotExist',
2383
+ ProjectNotExit = 'ProjectNotExit',
2384
+ NetworkError = 'NetworkError',
2385
+ ApiError = 'ApiError'
2386
+ }
2387
+
2388
+ interface KErrorInfo {
2389
+ /**
2390
+ *
2391
+ * 获取错误码
2392
+ *
2393
+ * Get the KErrorInfo's code.
2394
+ * @returns The KErrorInfo's code.
2395
+ */
2396
+ getErrorCode(): KErrorCode;
2397
+
2398
+ /**
2399
+ *
2400
+ * 获取错误码
2401
+ *
2402
+ * Get the KErrorInfo's code.
2403
+ * @returns The KErrorInfo's code.
2404
+ */
2405
+ getErrorMessage(): string | undefined;
2406
+ }
2407
+
2289
2408
  /*
2290
2409
  * KFace.ts
2291
2410
  * Copyright 2022 Qunhe Tech, all rights reserved.
@@ -2406,8 +2525,17 @@ declare global {
2406
2525
  * @param key : unique key for this kind of custom.
2407
2526
  */
2408
2527
  deleteCustomProperty(key: string): { isSuccess: boolean };
2528
+
2529
+ /**
2530
+ *
2531
+ * 获取该面是否可见
2532
+ *
2533
+ * Get the face property of it is visible or not.
2534
+ */
2535
+ isVisible(): boolean;
2409
2536
  }
2410
2537
 
2538
+
2411
2539
 
2412
2540
  /**
2413
2541
  *
@@ -2639,6 +2767,7 @@ declare global {
2639
2767
  getVarObject(): KVarObject | undefined;
2640
2768
  }
2641
2769
 
2770
+
2642
2771
  /*
2643
2772
  * KGroupInstance.ts
2644
2773
  * Copyright 2022 Qunhe Tech, all rights reserved.
@@ -2702,6 +2831,7 @@ declare global {
2702
2831
  getLocalBoundingBox(): KBoundingBox3d;
2703
2832
 
2704
2833
  /**
2834
+ *
2705
2835
  * 获取业务数据
2706
2836
  *
2707
2837
  * Get custom property data.
@@ -2710,6 +2840,7 @@ declare global {
2710
2840
  getCustomProperty(key: string): string;
2711
2841
 
2712
2842
  /**
2843
+ *
2713
2844
  * 添加业务数据
2714
2845
  *
2715
2846
  * Set custom property data.
@@ -2721,6 +2852,7 @@ declare global {
2721
2852
  setCustomProperty(key: string, data: string): { isSuccess: boolean };
2722
2853
 
2723
2854
  /**
2855
+ *
2724
2856
  * 获取该成组上所有的业务数据的key
2725
2857
  *
2726
2858
  * Get all keys of custom property data which set by current plugin.
@@ -2729,13 +2861,33 @@ declare global {
2729
2861
  getAllCustomPropertiesKey(): string[];
2730
2862
 
2731
2863
  /**
2864
+ *
2865
+ * @deprecated:建议使用KGroupInstance.isVisible()
2866
+ *
2732
2867
  * 获取该成组是否可见
2733
2868
  *
2734
2869
  * Get the group property of it is invisible or not.
2735
2870
  */
2736
2871
  isInvisible(): boolean;
2872
+
2873
+ /**
2874
+ *
2875
+ * 获取该成组是否可见
2876
+ *
2877
+ * Get the group property of it is visible or not.
2878
+ */
2879
+ isVisible(): boolean;
2880
+
2881
+ /**
2882
+ *
2883
+ * 获取组实例的父组
2884
+ *
2885
+ * Get the parent KGroupDefinition of this.
2886
+ */
2887
+ getParentGroupDefinition(): KGroupDefinition | undefined;
2737
2888
  }
2738
2889
 
2890
+
2739
2891
  /*
2740
2892
  * KGroupInstanceRef.ts
2741
2893
  * Copyright 2023 Qunhe Tech, all rights reserved.
@@ -3190,6 +3342,96 @@ declare global {
3190
3342
  pickByPoint3d(x: number, y: number, z: number, pickSetting?: KPickSetting): KPointPickResult;
3191
3343
  }
3192
3344
 
3345
+ interface KPluginModelCategory {
3346
+ obsCatId: string;
3347
+ name: string;
3348
+ children: KPluginModelCategory[]
3349
+ }
3350
+
3351
+ interface KPluginModelInfo {
3352
+ projectId: string;
3353
+ name: string;
3354
+ pngPreviewImgUrl: string;
3355
+ }
3356
+
3357
+ interface KPluginModelLibraryHelper{
3358
+ /**
3359
+ * 获取插件模型库公库
3360
+ *
3361
+ * Get categories of plugin public model library.
3362
+ */
3363
+ getPluginPublicModelLibrary(): KPluginPublicModelLibrary;
3364
+
3365
+ /**
3366
+ * 获取插件模型库个人库
3367
+ *
3368
+ * Get categories of plugin public model library.
3369
+ */
3370
+ getPluginPrivateModelLibrary(): KPluginPrivateModelLibrary;
3371
+ }
3372
+
3373
+
3374
+ interface KPluginPrivateModelLibrary{
3375
+ /**
3376
+ * 添加groupInstance为模型
3377
+ *
3378
+ * add groupInstance as the model.
3379
+ * After creating the model, make sure to refresh the list promptly to see the latest data.
3380
+ * The limit for adding models is 200
3381
+ * previewImg only supports CDN image links
3382
+ */
3383
+ addModelByGroupInstance(modelName: string, kGroupInstance: KGroupInstance, previewImg?: string): HostPromise<{ isSuccess: boolean, errorInfo?: KErrorInfo }>;
3384
+
3385
+ /**
3386
+ * 添加当前方案为模型
3387
+ *
3388
+ * add project as the model.
3389
+ * After creating the model, make sure to refresh the list promptly to see the latest data.
3390
+ * The limit for adding models is 200
3391
+ */
3392
+ addModelByProject(): HostPromise<{ isSuccess: boolean, errorInfo?: KErrorInfo }>;
3393
+
3394
+ /**
3395
+ * 获取模型列表
3396
+ *
3397
+ * Get list of model library.
3398
+ */
3399
+ getModelList(start: number, num: number): HostPromise<{ totalCount: number, modelList: KPluginModelInfo[], errorInfo?: KErrorInfo }>;
3400
+
3401
+ /**
3402
+ * 模型重命名
3403
+ *
3404
+ * rename model.
3405
+ */
3406
+ renameModel(projectId: string, name: string): HostPromise<{ isSuccess: boolean, errorInfo?: KErrorInfo }>;
3407
+
3408
+ /**
3409
+ * 模型删除
3410
+ *
3411
+ * remove model.
3412
+ */
3413
+ removeModel(projectId: string): HostPromise<{ isSuccess: boolean, errorInfo?: KErrorInfo }>;
3414
+ }
3415
+
3416
+
3417
+ interface KPluginPublicModelLibrary{
3418
+ /**
3419
+ * 获取模型库类目
3420
+ *
3421
+ * Get categories of model library.
3422
+ */
3423
+ getCategories(): HostPromise<{ categories: KPluginModelCategory[], errorInfo?: KErrorInfo }>;
3424
+
3425
+ /**
3426
+ *
3427
+ * 获取模型列表
3428
+ *
3429
+ * Get list of model library
3430
+ * When querying the model list, "num" must be less than or equal to 48. If "start" exceeds 5000, the query may take a longer time due to the large amount of data.
3431
+ */
3432
+ getModelList(obsCatId: string, start: number, num: number): HostPromise<{ totalCount: number, modelList: KPluginModelInfo[], errorInfo?: KErrorInfo }>;
3433
+ }
3434
+
3193
3435
  /*
3194
3436
  * KPluginView.ts
3195
3437
  * Copyright 2022 Qunhe Tech, all rights reserved.
@@ -3217,6 +3459,7 @@ declare global {
3217
3459
  postMessage(data: any, origin?: string): void
3218
3460
  }
3219
3461
 
3462
+
3220
3463
  /*
3221
3464
  * KSelection.ts
3222
3465
  * Copyright 2022 Qunhe Tech, all rights reserved.
@@ -3357,7 +3600,7 @@ declare global {
3357
3600
  * Get the entity's type.
3358
3601
  * @returns The entity's type.
3359
3602
  */
3360
- getType(): KTopoType;
3603
+ getType(): KTopoType;
3361
3604
 
3362
3605
  /**
3363
3606
  *
@@ -3366,16 +3609,24 @@ declare global {
3366
3609
  * Retrieve all the involved Faces of this Shell.
3367
3610
  * @return The array of Faces.
3368
3611
  */
3369
- getFaces(): KFace[];
3612
+ getFaces(): KFace[];
3370
3613
 
3371
- /**
3372
- *
3373
- * 获取所包含的边
3374
- *
3375
- * Retrieve all the involved Edges of this Shell.
3376
- * @return The array of Edges.
3377
- */
3378
- getEdges(): KEdge[];
3614
+ /**
3615
+ *
3616
+ * 获取所包含的边
3617
+ *
3618
+ * Retrieve all the involved Edges of this Shell.
3619
+ * @return The array of Edges.
3620
+ */
3621
+ getEdges(): KEdge[];
3622
+
3623
+ /**
3624
+ *
3625
+ * 获取所包含的面和边是否全部可见
3626
+ *
3627
+ * Get whether all the faces and edges contained within shell are visible.
3628
+ */
3629
+ isVisible(): boolean;
3379
3630
  }
3380
3631
 
3381
3632
  /*
@@ -4582,6 +4833,7 @@ declare global {
4582
4833
  }
4583
4834
 
4584
4835
  // QunHe Math API:
4836
+
4585
4837
  /**
4586
4838
  * KArc2d 类代表着二维空间中的一个圆弧。
4587
4839
  *
@@ -4747,6 +4999,7 @@ declare global {
4747
4999
  */
4748
5000
  getApproximatePointsByAngle(angleSpan?: number): KPoint2d[];
4749
5001
  }
5002
+
4750
5003
  /**
4751
5004
  * KArc3d类代表三维空间中的一个圆弧。
4752
5005
  *
@@ -4891,6 +5144,7 @@ declare global {
4891
5144
  */
4892
5145
  getApproximatePointsByAngle(angleSpan?: number): KPoint3d[];
4893
5146
  }
5147
+
4894
5148
  /**
4895
5149
  * 所有二维轮廓曲线的基类,例如KLineSegment2d(线段)和KArc2d(圆弧)。
4896
5150
  *
@@ -5016,6 +5270,7 @@ declare global {
5016
5270
  */
5017
5271
  getBounding(): KBoundingBox2d;
5018
5272
  }
5273
+
5019
5274
  /**
5020
5275
  * 所有三维轮廓曲线的基类,例如KLineSegment3d(线段)和KArc3d(圆弧)。
5021
5276
  *
@@ -5131,6 +5386,7 @@ declare global {
5131
5386
  */
5132
5387
  splitByPoint(point: KPoint3d, distTol?: number): KBoundedCurve3d[];
5133
5388
  }
5389
+
5134
5390
  /**
5135
5391
  * KBoundingBox2d类代表着二维空间中的一个包围盒。
5136
5392
  *
@@ -5288,6 +5544,7 @@ declare global {
5288
5544
  */
5289
5545
  isOverlapping(other: KBoundingBox2d, tolerance?: number): boolean;
5290
5546
  }
5547
+
5291
5548
  /**
5292
5549
  * KBoundingBox3d类代表着三维空间中的一个包围盒。
5293
5550
  *
@@ -5451,6 +5708,7 @@ declare global {
5451
5708
  */
5452
5709
  isOverlapping(other: KBoundingBox3d, tolerance?: number): boolean;
5453
5710
  }
5711
+
5454
5712
  /**
5455
5713
  * KCircle2d类代表着二维空间中的一个圆。
5456
5714
  *
@@ -5502,6 +5760,7 @@ declare global {
5502
5760
  */
5503
5761
  transform(matrix: KMatrix3): boolean;
5504
5762
  }
5763
+
5505
5764
  /**
5506
5765
  * KCircle3d类代表着三维空间中的一个圆。
5507
5766
  *
@@ -5570,6 +5829,7 @@ declare global {
5570
5829
  */
5571
5830
  getPlane(): KPlane;
5572
5831
  }
5832
+
5573
5833
  /**
5574
5834
  * KCurve2dType枚举类代表曲线类型。
5575
5835
  *
@@ -5774,6 +6034,7 @@ declare global {
5774
6034
  */
5775
6035
  getCurvatureVector(point: KPoint2d): KVector2d;
5776
6036
  }
6037
+
5777
6038
  /**
5778
6039
  * KCurve3dType枚举类代表曲线类型。
5779
6040
  *
@@ -5972,6 +6233,7 @@ declare global {
5972
6233
  */
5973
6234
  getCurvatureVector(point: KPoint3d): KVector3d;
5974
6235
  }
6236
+
5975
6237
  /**
5976
6238
  * KEllipticalArc2d 类代表着二维空间中的一个椭圆弧。
5977
6239
  *
@@ -6031,6 +6293,7 @@ declare global {
6031
6293
  */
6032
6294
  getTangent(point: KPoint2d): KVector2d;
6033
6295
  }
6296
+
6034
6297
  /**
6035
6298
  * KEllipticalArc3d 类代表着三维空间中的一个椭圆弧。
6036
6299
  *
@@ -6141,6 +6404,7 @@ declare global {
6141
6404
  getDerivatives(t: number, orderNum: number): KVector3d[];
6142
6405
  getApproximatePointsByRatio(ratio?: number): KPoint3d[];
6143
6406
  }
6407
+
6144
6408
  /**
6145
6409
  * 欧拉角的旋转顺序枚举
6146
6410
  *
@@ -6334,6 +6598,7 @@ declare global {
6334
6598
  */
6335
6599
  toVector(): KVector3d;
6336
6600
  }
6601
+
6337
6602
  /**
6338
6603
  * 二维面的接口类
6339
6604
  *
@@ -6416,6 +6681,7 @@ declare global {
6416
6681
  */
6417
6682
  containsPoint(point: KPoint2d, bIncludeOn?: boolean): boolean;
6418
6683
  }
6684
+
6419
6685
  /**
6420
6686
  * 点与环的位置关系类型。
6421
6687
  *
@@ -8165,6 +8431,7 @@ declare global {
8165
8431
  */
8166
8432
  curve2dsFromJson(jsonString: string): KCurve2d[];
8167
8433
  }
8434
+
8168
8435
  /**
8169
8436
  * 二维环的接口类。
8170
8437
  *
@@ -8254,6 +8521,7 @@ declare global {
8254
8521
  */
8255
8522
  containsPoint(point: KPoint2d, bIncludeOn?: boolean): boolean;
8256
8523
  }
8524
+
8257
8525
  /**
8258
8526
  * KInterval类代表着一维空间中的一个区间。
8259
8527
  *
@@ -8490,6 +8758,7 @@ declare global {
8490
8758
  */
8491
8759
  union(interval: KInterval): KInterval;
8492
8760
  }
8761
+
8493
8762
  /**
8494
8763
  * KLine2d类代表二维空间的一条直线。
8495
8764
  * 我们用一个点加一个向量来确定一条直。
@@ -8577,6 +8846,7 @@ declare global {
8577
8846
  */
8578
8847
  onRightSide(point: KPoint2d, tol?: number): boolean
8579
8848
  }
8849
+
8580
8850
  /**
8581
8851
  * KLine3d类代表三维空间的一条直线。
8582
8852
  * 我们用一个点加一个向量来确定一条直。
@@ -8597,6 +8867,7 @@ declare global {
8597
8867
  */
8598
8868
  readonly direction: KVector3d;
8599
8869
  }
8870
+
8600
8871
  /**
8601
8872
  * KLineSegment2d类代表二维空间的一个线段。
8602
8873
  *
@@ -8616,6 +8887,7 @@ declare global {
8616
8887
  */
8617
8888
  readonly direction: KVector2d;
8618
8889
  }
8890
+
8619
8891
  /**
8620
8892
  * KLineSegment3d类代表三维空间的一个线段。
8621
8893
  *
@@ -8635,6 +8907,7 @@ declare global {
8635
8907
  */
8636
8908
  readonly direction: KVector3d;
8637
8909
  }
8910
+
8638
8911
  /**
8639
8912
  * KMatrix3表示一个三行三列矩阵。
8640
8913
  *
@@ -8718,6 +8991,7 @@ declare global {
8718
8991
  */
8719
8992
  isEqual(other: KMatrix3): boolean;
8720
8993
  }
8994
+
8721
8995
  /**
8722
8996
  * KMatrix4表示一个四行四列矩阵。
8723
8997
  *
@@ -8823,6 +9097,7 @@ declare global {
8823
9097
  */
8824
9098
  decompose(throwOnDegenerate?: boolean): KMatrix4[];
8825
9099
  }
9100
+
8826
9101
  /**
8827
9102
  * KNurbsCurve2d 类代表着二维空间中的一条非均匀有理样条曲线
8828
9103
  *
@@ -8870,6 +9145,7 @@ declare global {
8870
9145
  */
8871
9146
  getTangent(point: KPoint2d): KVector2d;
8872
9147
  }
9148
+
8873
9149
  /**
8874
9150
  * KPlane类代表三维空间中的一个平面。
8875
9151
  *
@@ -8883,6 +9159,7 @@ declare global {
8883
9159
  */
8884
9160
  readonly normal: KVector3d;
8885
9161
  }
9162
+
8886
9163
  /**
8887
9164
  * KPoint2d类代表一个二维点。
8888
9165
  * 二维点有二个坐标。
@@ -9004,6 +9281,7 @@ declare global {
9004
9281
  */
9005
9282
  appliedMatrix3(matrix: KMatrix3): KPoint2d;
9006
9283
  }
9284
+
9007
9285
  /**
9008
9286
  * KPoint3d类代表一个三维点。
9009
9287
  * 三维点有三个坐标。
@@ -9131,6 +9409,7 @@ declare global {
9131
9409
  */
9132
9410
  appliedMatrix4(matrix: KMatrix4): KPoint3d;
9133
9411
  }
9412
+
9134
9413
  /**
9135
9414
  * KPolylineCurve2d 类代表着二维空间中的一个折线段。
9136
9415
  *
@@ -9166,6 +9445,7 @@ declare global {
9166
9445
  */
9167
9446
  getTangent(point: KPoint2d): KVector2d;
9168
9447
  }
9448
+
9169
9449
  /**
9170
9450
  * KPolylineCurve3d 类代表着二维空间中的一个折线段。
9171
9451
  *
@@ -9201,6 +9481,7 @@ declare global {
9201
9481
  */
9202
9482
  getTangent(point: KPoint3d): KVector3d;
9203
9483
  }
9484
+
9204
9485
  /**
9205
9486
  * 四元数(quaternion)是用来表示旋转变换的一种形式,它可以避免欧拉角的万向节死锁问题。
9206
9487
  *
@@ -9508,6 +9789,7 @@ declare global {
9508
9789
  */
9509
9790
  toArray(): number[];
9510
9791
  }
9792
+
9511
9793
  /**
9512
9794
  * KSurfaceType代表面的类型。
9513
9795
  *
@@ -9832,6 +10114,7 @@ declare global {
9832
10114
  */
9833
10115
  getPoint(uv: KPoint2d): KPoint3d;
9834
10116
  }
10117
+
9835
10118
  /**
9836
10119
  * KVector2d表示一个二维向量。
9837
10120
  * 二维向量包含二个数。
@@ -10186,6 +10469,7 @@ declare global {
10186
10469
  */
10187
10470
  appliedMatrix3(matrix: KMatrix3): KVector2d;
10188
10471
  }
10472
+
10189
10473
  /**
10190
10474
  * KVector3d表示一个三维向量。
10191
10475
  * 三维向量包含三个数。
@@ -10579,6 +10863,7 @@ declare global {
10579
10863
  appliedQuaternion(quaternion: KQuaternion): KVector3d;
10580
10864
  }
10581
10865
 
10866
+
10582
10867
  /*
10583
10868
  * PluginUIAndStorage.ts
10584
10869
  * Copyright 2022 Qunhe Tech, all rights reserved.
@@ -10701,6 +10986,7 @@ declare global {
10701
10986
  setAsync(key: string, value: any): HostPromise<void>
10702
10987
  }
10703
10988
 
10989
+
10704
10990
  }
10705
10991
 
10706
10992
  export {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kudashi/kds-api",
3
- "version": "2.13.27",
3
+ "version": "2.13.29",
4
4
  "description": "kds api",
5
5
  "main": "api.d.ts",
6
6
  "scripts": {