@kudashi/kds-api 2.13.31 → 2.13.33
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/README.md +282 -274
- package/api.d.ts +238 -13
- package/package.json +18 -18
package/README.md
CHANGED
|
@@ -1,274 +1,282 @@
|
|
|
1
|
-
# 酷大师api
|
|
2
|
-
|
|
3
|
-
# api changelog
|
|
4
|
-
|
|
5
|
-
# version 2.13.
|
|
6
|
-
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- 新增
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- KDesign.
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
# version 2.13.
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- 在
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
-
|
|
106
|
-
|
|
107
|
-
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
- 在
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
|
|
120
|
-
-
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
|
|
132
|
-
-
|
|
133
|
-
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
-
|
|
146
|
-
|
|
147
|
-
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
- Add
|
|
184
|
-
- Add
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
-
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
- Add the
|
|
191
|
-
- Add the
|
|
192
|
-
- Add the
|
|
193
|
-
- Add the
|
|
194
|
-
-
|
|
195
|
-
-
|
|
196
|
-
- Add the
|
|
197
|
-
- Add the
|
|
198
|
-
-
|
|
199
|
-
-
|
|
200
|
-
-
|
|
201
|
-
-
|
|
202
|
-
-
|
|
203
|
-
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
- Add the
|
|
215
|
-
- Add
|
|
216
|
-
-
|
|
217
|
-
- Add
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
- Add the
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
- Add
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
- Add the
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
-
|
|
240
|
-
- Add the
|
|
241
|
-
- Add the
|
|
242
|
-
- Add the
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
- Add
|
|
247
|
-
-
|
|
248
|
-
-
|
|
249
|
-
-
|
|
250
|
-
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
- Add the
|
|
255
|
-
- Add the
|
|
256
|
-
-
|
|
257
|
-
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
-
|
|
264
|
-
- Add the
|
|
265
|
-
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
-
|
|
273
|
-
-
|
|
274
|
-
|
|
1
|
+
# 酷大师api
|
|
2
|
+
|
|
3
|
+
# api changelog
|
|
4
|
+
|
|
5
|
+
# version 2.13.33(2025-06-24)
|
|
6
|
+
- 支持KApplication.getProductManager获取酷家乐商品库管理器
|
|
7
|
+
- 支持PublicProductLibrary公共商品库
|
|
8
|
+
- sweepFollowEdges && sweepFollowCurves新增可选参数
|
|
9
|
+
|
|
10
|
+
# version 2.13.32(2025-04-28)
|
|
11
|
+
- support setPluginCursor and KAuxiliaryPiecewiseBezierCurve
|
|
12
|
+
|
|
13
|
+
# version 2.13.31(2025-03-18)
|
|
14
|
+
- 新增createPluginModelLibrary
|
|
15
|
+
|
|
16
|
+
# version 2.13.30(2025-02-27)
|
|
17
|
+
- 新增KArchFace, KArchWall, KArchRoom, KArchPillar, KArchOpening相关api
|
|
18
|
+
- 新增KDesign.isShellSolid, KApplicationObserver.onGroupInstanceActivated, KApplicationObserver.onGroupInstanceDeactivated
|
|
19
|
+
|
|
20
|
+
# version 2.13.29(2025-02-20)
|
|
21
|
+
- 新增KGroupInstance.getInstanceParentGroupDefinition
|
|
22
|
+
- 新增KDesign.getEditPathsToGroupInstance KDesign.activateEditPath KDesign.toggleEntitiesVisible
|
|
23
|
+
- 新增isVisible判断模型是否可见
|
|
24
|
+
|
|
25
|
+
# version 2.13.28(2025-02-11)
|
|
26
|
+
- 支持三方插件存储模型库
|
|
27
|
+
- 插件标题支持多语言机制,详情参考: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
|
|
28
|
+
|
|
29
|
+
# version 2.13.27(2028-01-07)
|
|
30
|
+
- KDesign.startOperation和KDesign.commitOperation之间的操作更加兼容undo/redo
|
|
31
|
+
- KGroupInstance.setCustomProperty和KGroupDefinition.setCustomProperty兼容undo/redo
|
|
32
|
+
- 增加KView.getModelSnapshot
|
|
33
|
+
|
|
34
|
+
# version 2.13.26(2024-11-26)
|
|
35
|
+
- 增加KTopoEdge.getKey()
|
|
36
|
+
|
|
37
|
+
# version 2.13.25(2024-11-25)
|
|
38
|
+
- 增加KSurface.getPoint()
|
|
39
|
+
|
|
40
|
+
# version 2.13.25(2024-11-25)
|
|
41
|
+
- 增加KSurface.getPoint()
|
|
42
|
+
|
|
43
|
+
# version 2.13.24
|
|
44
|
+
- deactivateGroupInstance改为异步
|
|
45
|
+
|
|
46
|
+
# version 2.13.23
|
|
47
|
+
- 个人库材质上传限制
|
|
48
|
+
- 增加KDesign.inflateFaces
|
|
49
|
+
|
|
50
|
+
# version 2.13.22
|
|
51
|
+
- 增加KDesign.saveInstanceAsLibraryProject
|
|
52
|
+
|
|
53
|
+
# version 2.13.21
|
|
54
|
+
- 增加KApplicationUI.getSelectControlAxises
|
|
55
|
+
- 增加KGroupInstance.getLocalBoundingBox
|
|
56
|
+
|
|
57
|
+
# version 2.13.20
|
|
58
|
+
- 增加KDesign.enterExpressMode
|
|
59
|
+
|
|
60
|
+
# version 2.13.19
|
|
61
|
+
- 支持插件multiViews
|
|
62
|
+
|
|
63
|
+
# version 2.13.14(2023-0919)
|
|
64
|
+
- 增加KPluginView接口对应multiViews中每个View
|
|
65
|
+
- 增加一些apaas api
|
|
66
|
+
- KApplication.getPluginViewById
|
|
67
|
+
- KApplication.registerMessageHandler
|
|
68
|
+
- KApplication.unRegisterMessageHandler
|
|
69
|
+
- KApplicationUI.toggleSketchToolBar
|
|
70
|
+
- KApplicationUI.togglePropertyPanelVisibility
|
|
71
|
+
- KApplicationUI.switchToCurrentPluginAssetPanel
|
|
72
|
+
- KApplicationUI.injectMenuItems
|
|
73
|
+
- KApplicationUI.injectToolItems
|
|
74
|
+
- KApplicationUI.toggleMaterialReplacePanel
|
|
75
|
+
- KDesign.createInstanceFromAnotherProject
|
|
76
|
+
- KPluginView
|
|
77
|
+
# version 2.13.12(2023-0718)
|
|
78
|
+
- 增加了一些apaas api:
|
|
79
|
+
- KDesign.thickenFaces
|
|
80
|
+
- KDesign.uploadMaterial
|
|
81
|
+
- KTestHelper增加了turnOffShellValidation和undefineShellValidation命令
|
|
82
|
+
|
|
83
|
+
# version 2.13.11(2023-07-0-7)
|
|
84
|
+
- 在KDesign中增加了:
|
|
85
|
+
- exitExpressMode
|
|
86
|
+
|
|
87
|
+
# version 2.13.10(2023-06-20)
|
|
88
|
+
- 在KDesign中增加了:
|
|
89
|
+
- breakGroupReference
|
|
90
|
+
- reparentGroupInstance
|
|
91
|
+
|
|
92
|
+
# version 2.13.9(2023-05-30)
|
|
93
|
+
- 在KDesign中增加了:
|
|
94
|
+
- assignMaterialForEntities()
|
|
95
|
+
- assignDecorationMaterialForEntities()
|
|
96
|
+
- brushDecorationMaterialToEntities()
|
|
97
|
+
- editMaterialParamsOfFace()
|
|
98
|
+
- adjustMaterialMapping()
|
|
99
|
+
- clearMaterial()
|
|
100
|
+
- getFacePavingGroupByFace()
|
|
101
|
+
- 在KCamera中增加了:
|
|
102
|
+
- setPosition()
|
|
103
|
+
- setTarget()
|
|
104
|
+
- 在KPickHelper中增加了:
|
|
105
|
+
- pickByPoint3d()
|
|
106
|
+
- 在KView中增加了:
|
|
107
|
+
- getScreenSnopShot()
|
|
108
|
+
- 添加材质连续对象KFacePavingGroup
|
|
109
|
+
|
|
110
|
+
# version 2.13.7(2023-05-18)
|
|
111
|
+
- 在KFace中增加了:
|
|
112
|
+
- getCustomProperty()
|
|
113
|
+
- setCustomProperty()
|
|
114
|
+
- deleteCustomProperty()
|
|
115
|
+
- 在KGroupDefinition和KGroupInstance中增加了:
|
|
116
|
+
- getCustomProperty()
|
|
117
|
+
- setCustomProperty()
|
|
118
|
+
- getAllCustomPropertiesKey()
|
|
119
|
+
- 在KGroupInstance中增加了:
|
|
120
|
+
- isInvisible()
|
|
121
|
+
- 在KDesign中增加了:
|
|
122
|
+
- shareModel()
|
|
123
|
+
- addFaceHoles()
|
|
124
|
+
- getMaterialOfFace()
|
|
125
|
+
- getMaterialParamsOfFace()
|
|
126
|
+
- findGroupInstancesByAppKey()
|
|
127
|
+
- findGroupInstancesByResource()
|
|
128
|
+
- toggleGroupInstancesVisible()
|
|
129
|
+
- alignShells()
|
|
130
|
+
- flipFace(face: KFace)
|
|
131
|
+
- 在KApplicationObserver中增加了:
|
|
132
|
+
- onModelChanged()
|
|
133
|
+
- 在KApplicationUI中增加了:
|
|
134
|
+
- toggleShowInvisibleModel()
|
|
135
|
+
- getActivePluginEntrancePosition()
|
|
136
|
+
- showPopover()
|
|
137
|
+
- isShownInvisibleModel()
|
|
138
|
+
- 增加了枚举类型:
|
|
139
|
+
- KGroupDefinitionType.Variable来表示变量化成组
|
|
140
|
+
- 在KTestHelper中增加了:
|
|
141
|
+
- purgeMaterialsInDesign()
|
|
142
|
+
- clearAllDecorationMaterials()
|
|
143
|
+
- 更新了math的apaas api版本,引入了很多新类型:
|
|
144
|
+
- "@qunhe/math-apaas-api": "3.0.0",
|
|
145
|
+
- "@qunhe/math-apaas-impl": "3.0.0",
|
|
146
|
+
- 修复了如下问题:
|
|
147
|
+
- boolean()没有导出KBooleanType类型的问题
|
|
148
|
+
- fillet()返回类型不能使用map类型的问题
|
|
149
|
+
- KSelection.getAllEntities()增加了默认参数,来控制是否包含vertex;默认为false保持和原来行为一致
|
|
150
|
+
- 吸附结果中添加了吸附点的normal值
|
|
151
|
+
|
|
152
|
+
# version 2.13.6(2022-11-29)
|
|
153
|
+
- Adjust the parameters of the following APIs:
|
|
154
|
+
- drawArrow3d
|
|
155
|
+
- drawCylinder
|
|
156
|
+
|
|
157
|
+
# version 2.13.5(2022-11-28)
|
|
158
|
+
- Add API:
|
|
159
|
+
- drawArrow3d
|
|
160
|
+
- getShortestPath
|
|
161
|
+
|
|
162
|
+
# version 2.13.4(2022-11-01)
|
|
163
|
+
- Add API:
|
|
164
|
+
- drawCylinder
|
|
165
|
+
- clearTemporaryShapesByIds
|
|
166
|
+
- getYunDesignInfo
|
|
167
|
+
- executeRequest
|
|
168
|
+
- Rebuilding API, change the return value of the following API from boolean to "{ id: string }":
|
|
169
|
+
- drawPoints
|
|
170
|
+
- drawLines
|
|
171
|
+
- drawPolylines
|
|
172
|
+
- drawText
|
|
173
|
+
- drawPromptLine
|
|
174
|
+
|
|
175
|
+
# version 2.13.3
|
|
176
|
+
|
|
177
|
+
# version 2.13.2(2022-07-15)
|
|
178
|
+
- Add KApplication Chinese comment
|
|
179
|
+
- Add KPluginUIAndStorage Chinese comment
|
|
180
|
+
|
|
181
|
+
# version 2.13.2(2022-07-15)
|
|
182
|
+
- Remove the qunhe brep api
|
|
183
|
+
- Add KApplication Chinese comment
|
|
184
|
+
- Add KPluginUIAndStorage Chinese comment
|
|
185
|
+
|
|
186
|
+
# version 2.13.1(2022-02-23)
|
|
187
|
+
- Added KEuler and KQuaternion.
|
|
188
|
+
- Modified the return type of KGeomLib.faces2dBoolean.
|
|
189
|
+
- Added some Chinese comments.
|
|
190
|
+
- Add the KTestHelper class.
|
|
191
|
+
- Add the getTestHelper method in the KApplication class.
|
|
192
|
+
- Add the fillet method in the KDesign class.
|
|
193
|
+
- Add the transformVertices in the KDesign class.
|
|
194
|
+
- Added an API createAlignCCSMatrix4.
|
|
195
|
+
- Add the getHoveredItem method in the KToolHelper class.
|
|
196
|
+
- Add the loadMaterial method in the KDesign class.
|
|
197
|
+
- Add the getBoundingBox method in the KGroupDefinition class.
|
|
198
|
+
- Add the assignMaterialForFaces method in the KDesign class.
|
|
199
|
+
- Add the assignMaterialForGroupInstance method in the KDesign class.
|
|
200
|
+
- Add the isInExpressMode method in the KGroupDefinition class.
|
|
201
|
+
- Add the setExcludedInferenceEntities method in the KToolHelper class.
|
|
202
|
+
- Add the clearExcludedInferenceEntities method in the KToolHelper class.
|
|
203
|
+
- The KApplication.onPluginClosed will be called after 200ms of closing plugin.
|
|
204
|
+
- Add the closable param in the KToastOption.
|
|
205
|
+
- Add the success method in the KToast.
|
|
206
|
+
- Added parameter propagateContinuousEdge in the moveVertices method.
|
|
207
|
+
- Remove the withMerge parameter in the moveVertices method.
|
|
208
|
+
- Remove the withMerge parameter in the moveEdge method.
|
|
209
|
+
- Remove the withMerge parameter in the transformShells method.
|
|
210
|
+
- Make version consistent with KuDaShi.
|
|
211
|
+
- Change KGeomLib.faces2dBoolean API.
|
|
212
|
+
|
|
213
|
+
# version 1.0.26
|
|
214
|
+
- Add the mergeFaces method in the KDesign class.
|
|
215
|
+
- Add the bulkCopyGroupInstances method in the KDesign class.
|
|
216
|
+
- Modify the createInstanceFromExternalResources method in the KDesign class.
|
|
217
|
+
- Add the matchEntities method in the KGroupDefinition class.
|
|
218
|
+
|
|
219
|
+
# version 1.0.25
|
|
220
|
+
- Add the KApplicationObserver class, which provides additional utilities for KApplication.
|
|
221
|
+
- Add the save method in the KDesign class.
|
|
222
|
+
- Add the KToolHelper class, which provides additional utilities for KTool.
|
|
223
|
+
- Add removeEdges and getEditPath two methods in the KDesign class.
|
|
224
|
+
- Add isReversed method in the KFace and KHalfEdge classes.
|
|
225
|
+
- Add drawPolylines method in KView class.
|
|
226
|
+
- Add signedDistanceTo method in KSurface class.
|
|
227
|
+
- Add isOnSameSide method in KVector3d class.
|
|
228
|
+
|
|
229
|
+
## version 1.0.24
|
|
230
|
+
- Add the KPickHelper class, which is used to pick entities.
|
|
231
|
+
|
|
232
|
+
## version 1.0.23
|
|
233
|
+
- Add the setSoftEdgesVisible method in the KDesign class.
|
|
234
|
+
|
|
235
|
+
## version 1.0.22
|
|
236
|
+
- modify parameters of the boolean method in the KDesign class.
|
|
237
|
+
|
|
238
|
+
## version 1.0.21
|
|
239
|
+
- Add the faceSplitByFace method in the KDesign class.
|
|
240
|
+
- Add the faceSplitByGroup method in the KDesign class.
|
|
241
|
+
- Add the createInstanceFromExternalResources method in the KDesign class.
|
|
242
|
+
- Add the createShellFromMesh method in the KDesign class.
|
|
243
|
+
|
|
244
|
+
## version 1.0.20
|
|
245
|
+
- Rename the withMerge argument to beCopyToInstance in the copyFaces method in the KDesign class.
|
|
246
|
+
- Add KApplicationUI interface to enable/disable tool bar, menu bar, resource panel, etc.
|
|
247
|
+
- The copyFaces method in the KDesign class will return group instance if we set withMerge false.
|
|
248
|
+
- Add the createEmptyGroupInstance method in the KDesign class.
|
|
249
|
+
- Add the activateGroupInstance method in the KDesign class.
|
|
250
|
+
- Add the deactivateGroupInstance method in the KDesign class.
|
|
251
|
+
- Add the getDesignId method in the KDesign class.
|
|
252
|
+
|
|
253
|
+
## version 1.0.19
|
|
254
|
+
- Add the onKeyUp method in the KTool class.
|
|
255
|
+
- Add the getUp method in the KCamera class.
|
|
256
|
+
- Rename the 'getCameraMode' method in KCamera to 'getMode'.
|
|
257
|
+
- Rename the 'getCameraPosition' method in KCamera to 'getPosition'.
|
|
258
|
+
- Rename the 'getCameraTarget' method in KCamera to 'getTarget'.
|
|
259
|
+
|
|
260
|
+
## version 1.0.18
|
|
261
|
+
- Add the addFaces method in the KDesign class.
|
|
262
|
+
- Add the setEdgesSoft method in the KDesign class.
|
|
263
|
+
- Add the setVerticesSoft method in the KDesign class.
|
|
264
|
+
- Add the boolean method in the KDesign class.
|
|
265
|
+
- Add the offset method in the KDesign class.
|
|
266
|
+
|
|
267
|
+
## version 1.0.17
|
|
268
|
+
- Modify the KTool to support to get the inference entity and the inference instance path.
|
|
269
|
+
|
|
270
|
+
## version 1.0.16
|
|
271
|
+
- Rename KGeometry to KGeomLib.
|
|
272
|
+
- Add the moveVertices method in the KDesign class.
|
|
273
|
+
- Rename the 'onUseInference' method in KTool to 'allowUsingInference'.
|
|
274
|
+
- Delete the 'startAngle' and 'endAngle' properties from the KArc3d and KArc2d classes.
|
|
275
|
+
- The interfaces to get continuous edges and continuous faces infos are provided in the KEdge and KFace class.
|
|
276
|
+
- The selection event is provided. You can create a selection observer to observe the selection change.
|
|
277
|
+
- Drawing temporary interfaces in the KView class are provided, which can be use to draw temporary shaped in KTool.
|
|
278
|
+
|
|
279
|
+
## version 1.0.15
|
|
280
|
+
- The sweepFollowEdges and sweepFollowCurves methods will remove the face that the contour belongs to.
|
|
281
|
+
- The sweepFollowEdges and sweepFollowCurves methods returns a new parameter 'addedShells'.
|
|
282
|
+
|
package/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// version: 2.13.
|
|
1
|
+
// version: 2.13.33
|
|
2
2
|
|
|
3
3
|
declare global {
|
|
4
4
|
/**
|
|
@@ -450,11 +450,20 @@ declare global {
|
|
|
450
450
|
*
|
|
451
451
|
* 获取插件模型库帮助器,包含模型公库和私库
|
|
452
452
|
*
|
|
453
|
-
* Get the
|
|
453
|
+
* Get the plugin model library helper, covering both public and private model library.
|
|
454
454
|
* @returns The KPluginModelLibraryHelper object.
|
|
455
455
|
*/
|
|
456
456
|
getPluginModelLibraryHelper(): KPluginModelLibraryHelper;
|
|
457
457
|
|
|
458
|
+
/**
|
|
459
|
+
*
|
|
460
|
+
* 获取酷家乐商品库管理器
|
|
461
|
+
*
|
|
462
|
+
* get the product library manager
|
|
463
|
+
*
|
|
464
|
+
*/
|
|
465
|
+
getProductManager(): ProductManager;
|
|
466
|
+
|
|
458
467
|
/**
|
|
459
468
|
*
|
|
460
469
|
* 将沙盒代码中的自定义消息处理函数注册到酷大师
|
|
@@ -735,6 +744,17 @@ declare global {
|
|
|
735
744
|
* @returns current axises of SelectControl: [axisX, axisY, axisZ]
|
|
736
745
|
*/
|
|
737
746
|
getSelectControlAxises(): KVector3d[] | undefined;
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
*
|
|
750
|
+
* 设置鼠标icon样式,仅在CustomTool激活时生效
|
|
751
|
+
*
|
|
752
|
+
* Set the mouse icon style to take effect only when CustomTool is active
|
|
753
|
+
*
|
|
754
|
+
* @param icon icon svg string such as <svg>content</svg>
|
|
755
|
+
*
|
|
756
|
+
*/
|
|
757
|
+
setCursorIcon(icon: string): boolean;
|
|
738
758
|
}
|
|
739
759
|
|
|
740
760
|
/*
|
|
@@ -1161,6 +1181,59 @@ declare global {
|
|
|
1161
1181
|
isVisible(): boolean;
|
|
1162
1182
|
}
|
|
1163
1183
|
|
|
1184
|
+
/*
|
|
1185
|
+
* KAuxiliaryPiecewiseBezierCurve.ts
|
|
1186
|
+
* Copyright 2025 Qunhe Tech, all rights reserved.
|
|
1187
|
+
* Qunhe PROPRIETARY/CONFIDENTIAL, any form of usage is subject to approval.
|
|
1188
|
+
*/
|
|
1189
|
+
/**
|
|
1190
|
+
*
|
|
1191
|
+
* 贝塞尔贝塞尔参考线对象。即用户在酷大师界面中,用“贝塞尔曲线段”命令画出的贝塞尔参考线,由多条顺次连接的贝塞尔曲线生成
|
|
1192
|
+
*
|
|
1193
|
+
* The KAuxiliaryPiecewiseBezierCurve class represents the piecewise auxiliary curve which is composed of multiple sequentially connected Bézier curves.
|
|
1194
|
+
*/
|
|
1195
|
+
interface KAuxiliaryPiecewiseBezierCurve extends KAuxiliaryCurve {
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
*
|
|
1199
|
+
* 获取贝塞尔参考线的离散点集
|
|
1200
|
+
*
|
|
1201
|
+
* Get discrete points of KAuxiliaryPiecewiseBezierCurve
|
|
1202
|
+
*
|
|
1203
|
+
*/
|
|
1204
|
+
getPoints(): KPoint3d[];
|
|
1205
|
+
|
|
1206
|
+
/**
|
|
1207
|
+
*
|
|
1208
|
+
* 获取贝塞尔参考线的起始顶点
|
|
1209
|
+
*
|
|
1210
|
+
* Get the auxiliary vertex at the start of the KAuxiliaryPiecewiseBezierCurve.
|
|
1211
|
+
* NOTE: Even if the KAuxiliaryPiecewiseBezierCurve is not connected to other KAuxiliaryPiecewiseBezierCurves at the start,
|
|
1212
|
+
* we can still get the auxiliary vertex.
|
|
1213
|
+
* @returns The auxiliary vertex at the start of the KAuxiliaryPiecewiseBezierCurve.
|
|
1214
|
+
*/
|
|
1215
|
+
getStartVertex(): KAuxiliaryVertex;
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
*
|
|
1219
|
+
* 获取贝塞尔参考线的终止顶点
|
|
1220
|
+
*
|
|
1221
|
+
* Get the auxiliary vertex at the end of the KAuxiliaryPiecewiseBezierCurve.
|
|
1222
|
+
* NOTE: Even if the KAuxiliaryPiecewiseBezierCurve is not connected to other KAuxiliaryPiecewiseBezierCurves at the end,
|
|
1223
|
+
* we can still get the auxiliary vertex.
|
|
1224
|
+
* @returns The auxiliary vertex at the end of the KAuxiliaryPiecewiseBezierCurve.
|
|
1225
|
+
*/
|
|
1226
|
+
getEndVertex(): KAuxiliaryVertex;
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
*
|
|
1230
|
+
* 获取该贝塞尔参考线是否可见
|
|
1231
|
+
*
|
|
1232
|
+
* Get the KAuxiliaryPiecewiseBezierCurve property of it is visible or not.
|
|
1233
|
+
*/
|
|
1234
|
+
isVisible(): boolean;
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1164
1237
|
/*
|
|
1165
1238
|
* KAuxiliaryVertex.ts
|
|
1166
1239
|
* Copyright 2022 Qunhe Tech, all rights reserved.
|
|
@@ -1176,7 +1249,7 @@ declare global {
|
|
|
1176
1249
|
* Through the auxiliary vertex you can get all auxiliary bounded curves connected through this vertex.
|
|
1177
1250
|
* If you move the auxiliary point, all auxiliary bounded curves connected through this vertex will also be moved.
|
|
1178
1251
|
*/
|
|
1179
|
-
interface KAuxiliaryVertex extends KEntity{
|
|
1252
|
+
interface KAuxiliaryVertex extends KEntity {
|
|
1180
1253
|
/**
|
|
1181
1254
|
*
|
|
1182
1255
|
* 获取唯一标识符
|
|
@@ -1197,12 +1270,12 @@ declare global {
|
|
|
1197
1270
|
|
|
1198
1271
|
/**
|
|
1199
1272
|
*
|
|
1200
|
-
*
|
|
1273
|
+
* 获取相邻的参考线
|
|
1201
1274
|
*
|
|
1202
|
-
* Get all auxiliary
|
|
1203
|
-
* @returns An array of
|
|
1275
|
+
* Get all auxiliary curves connected through this vertex.
|
|
1276
|
+
* @returns An array of curves connected through this vertex.
|
|
1204
1277
|
*/
|
|
1205
|
-
|
|
1278
|
+
getNeighborCurves(): KAuxiliaryCurve[];
|
|
1206
1279
|
}
|
|
1207
1280
|
|
|
1208
1281
|
/*
|
|
@@ -1689,9 +1762,9 @@ declare global {
|
|
|
1689
1762
|
* The method is used to move the auxiliary vertex to the target position.
|
|
1690
1763
|
* @param auxiliaryVertex The auxiliary vertex to move.
|
|
1691
1764
|
* @param targetPosition The target position.
|
|
1692
|
-
* @returns Return an object that contains moved auxiliary
|
|
1765
|
+
* @returns Return an object that contains moved auxiliary curves if successful, otherwise return null.
|
|
1693
1766
|
*/
|
|
1694
|
-
moveAuxiliaryVertex(auxiliaryVertex: KAuxiliaryVertex, targetPosition: KPoint3d): { movedCurves:
|
|
1767
|
+
moveAuxiliaryVertex(auxiliaryVertex: KAuxiliaryVertex, targetPosition: KPoint3d): { movedCurves: KAuxiliaryCurve[] } | null;
|
|
1695
1768
|
|
|
1696
1769
|
/**
|
|
1697
1770
|
*
|
|
@@ -1766,9 +1839,21 @@ declare global {
|
|
|
1766
1839
|
* NOTE: The method will remove the face that the contour belongs to.
|
|
1767
1840
|
* @param contour The face's contour.
|
|
1768
1841
|
* @param path An array of edges to follow.
|
|
1842
|
+
* @param sweepWithPathAlignmentParams Optional parameters for path alignment, including
|
|
1843
|
+
* - contourCCS: Coordinate system defining the local space of the profile contour.
|
|
1844
|
+
* Specifies the origin, x-axis, and y-axis of the profile's local coordinate system before path alignment.
|
|
1845
|
+
* - pathStartSeg: Line segment on the path where the sweep operation begins.
|
|
1846
|
+
* This segment determines the initial position and orientation for aligning the profile to the path.
|
|
1847
|
+
* It's the Z-axis of the path's local coordinate system.
|
|
1848
|
+
* - pathXAxis: Vector defining the desired X-axis direction in the path coordinate system.
|
|
1849
|
+
* This vector, combined with the path direction, determines how the profile is oriented along the path.
|
|
1769
1850
|
* @returns Return an object that contains success flag and added shells.
|
|
1770
1851
|
*/
|
|
1771
|
-
sweepFollowEdges(contour: KLoop, path: KEdge[]
|
|
1852
|
+
sweepFollowEdges(contour: KLoop, path: KEdge[], sweepWithPathAlignmentParams?: {
|
|
1853
|
+
contourCCS: KCCS3d;
|
|
1854
|
+
pathStartSeg: KLineSegment3d;
|
|
1855
|
+
pathXAxis: KVector3d;
|
|
1856
|
+
}): { isSuccess: boolean, addedShells: KShell[] };
|
|
1772
1857
|
|
|
1773
1858
|
/**
|
|
1774
1859
|
*
|
|
@@ -1778,10 +1863,22 @@ declare global {
|
|
|
1778
1863
|
* The method is used to create a shape by making the face follow along an array of auxiliary bounded curves.
|
|
1779
1864
|
* NOTE: The method will remove the face that the contour belongs to.
|
|
1780
1865
|
* @param contour The face's contour.
|
|
1781
|
-
* @param path An array of auxiliary bounded curves to follow.
|
|
1866
|
+
* @param path An array of auxiliary bounded curves or auxiliary piecewise bezier curves to follow.
|
|
1867
|
+
* @param sweepWithPathAlignmentParams Optional parameters for path alignment, including
|
|
1868
|
+
* - contourCCS: Coordinate system defining the local space of the profile contour.
|
|
1869
|
+
* Specifies the origin, x-axis, and y-axis of the profile's local coordinate system before path alignment.
|
|
1870
|
+
* - pathStartSeg: Line segment on the path where the sweep operation begins.
|
|
1871
|
+
* This segment determines the initial position and orientation for aligning the profile to the path.
|
|
1872
|
+
* It's the Z-axis of the path's local coordinate system.
|
|
1873
|
+
* - pathXAxis: Vector defining the desired X-axis direction in the path coordinate system.
|
|
1874
|
+
* This vector, combined with the path direction, determines how the profile is oriented along the path.
|
|
1782
1875
|
* @returns Return an object that contains success flag and added shells.
|
|
1783
1876
|
*/
|
|
1784
|
-
sweepFollowCurves(contour: KLoop, path:
|
|
1877
|
+
sweepFollowCurves(contour: KLoop, path: KAuxiliaryCurve[], sweepWithPathAlignmentParams?: {
|
|
1878
|
+
contourCCS: KCCS3d;
|
|
1879
|
+
pathStartSeg: KLineSegment3d;
|
|
1880
|
+
pathXAxis: KVector3d;
|
|
1881
|
+
}): { isSuccess: boolean, addedShells: KShell[] };
|
|
1785
1882
|
|
|
1786
1883
|
/**
|
|
1787
1884
|
*
|
|
@@ -2491,6 +2588,15 @@ declare global {
|
|
|
2491
2588
|
* @param shell
|
|
2492
2589
|
*/
|
|
2493
2590
|
isShellSolid(shell: KShell): boolean;
|
|
2591
|
+
|
|
2592
|
+
/**
|
|
2593
|
+
* 通过商品模型创建资源成组
|
|
2594
|
+
*
|
|
2595
|
+
* create one groupInstance from brandgood, the type of groupDefinition for groupInstance created in this way is 'KGroupDefinitionType.Asset'.
|
|
2596
|
+
* @param brandgoodId brandgood id
|
|
2597
|
+
* @returns the newInstance or undefined.
|
|
2598
|
+
*/
|
|
2599
|
+
createInstanceFromBrandgood(brandgoodId: string): HostPromise<{ newInstance: KGroupInstance } | undefined>;
|
|
2494
2600
|
}
|
|
2495
2601
|
|
|
2496
2602
|
|
|
@@ -2630,13 +2736,17 @@ declare global {
|
|
|
2630
2736
|
* KAuxiliaryVertex Type.
|
|
2631
2737
|
*/
|
|
2632
2738
|
AuxiliaryVertex = 'auxiliaryVertex',
|
|
2739
|
+
/**
|
|
2740
|
+
* KAuxiliaryPiecewiseBezierCurve Type.
|
|
2741
|
+
*/
|
|
2742
|
+
AuxiliaryPiecewiseBezierCurve = 'auxiliaryPiecewiseBezierCurve',
|
|
2633
2743
|
}
|
|
2634
2744
|
/**
|
|
2635
2745
|
* 酷大师图形实体类型
|
|
2636
2746
|
*/
|
|
2637
2747
|
type KEntityType = KTopoType | KAppEntityType;
|
|
2638
2748
|
// https://github.com/microsoft/TypeScript/issues/17592
|
|
2639
|
-
const KEntityType = {...KTopoType, ...KAppEntityType};
|
|
2749
|
+
const KEntityType = { ...KTopoType, ...KAppEntityType };
|
|
2640
2750
|
|
|
2641
2751
|
/**
|
|
2642
2752
|
* 酷大师图形实体的基类
|
|
@@ -2883,6 +2993,13 @@ declare global {
|
|
|
2883
2993
|
* It means the definition is based on a variable model, such as Cube/Sphere/Text3d/Bend, etc.
|
|
2884
2994
|
*/
|
|
2885
2995
|
Variable = 'variable',
|
|
2996
|
+
/**
|
|
2997
|
+
* 资源成组
|
|
2998
|
+
*
|
|
2999
|
+
* Asset Type
|
|
3000
|
+
* It means the definition is based on a asset model, such as brandgood model, etc.
|
|
3001
|
+
*/
|
|
3002
|
+
Asset = 'asset',
|
|
2886
3003
|
}
|
|
2887
3004
|
|
|
2888
3005
|
/**
|
|
@@ -5993,6 +6110,39 @@ declare global {
|
|
|
5993
6110
|
isOverlapping(other: KBoundingBox3d, tolerance?: number): boolean;
|
|
5994
6111
|
}
|
|
5995
6112
|
|
|
6113
|
+
/**
|
|
6114
|
+
* Represents a 3D coordinate system.
|
|
6115
|
+
* Provides access to the origin and axis vectors, as well as transformation methods.
|
|
6116
|
+
*/
|
|
6117
|
+
interface KCCS3d {
|
|
6118
|
+
/** The origin point of the coordinate system. */
|
|
6119
|
+
origin: KPoint3d;
|
|
6120
|
+
/** The X-axis direction vector of the coordinate system. */
|
|
6121
|
+
dx: KVector3d;
|
|
6122
|
+
/** The Y-axis direction vector of the coordinate system. */
|
|
6123
|
+
dy: KVector3d;
|
|
6124
|
+
/** The Z-axis direction vector of the coordinate system. */
|
|
6125
|
+
dz: KVector3d;
|
|
6126
|
+
/**
|
|
6127
|
+
* Gets the transformation matrix from world to local coordinates.
|
|
6128
|
+
*/
|
|
6129
|
+
getWorldToLocalMatrix(): KMatrix4;
|
|
6130
|
+
/**
|
|
6131
|
+
* Gets the transformation matrix from local to world coordinates.
|
|
6132
|
+
*/
|
|
6133
|
+
getLocalToWorldMatrix(): KMatrix4;
|
|
6134
|
+
/**
|
|
6135
|
+
* Applies a transformation to this coordinate system in place.
|
|
6136
|
+
* @param matrix The transformation matrix to apply.
|
|
6137
|
+
*/
|
|
6138
|
+
transform(matrix: KMatrix4): boolean;
|
|
6139
|
+
/**
|
|
6140
|
+
* Returns a new KCCS3d instance transformed by the given matrix.
|
|
6141
|
+
* @param matrix The transformation matrix to apply.
|
|
6142
|
+
*/
|
|
6143
|
+
transformed(matrix: KMatrix4): KCCS3d;
|
|
6144
|
+
}
|
|
6145
|
+
|
|
5996
6146
|
/**
|
|
5997
6147
|
* KCircle2d类代表着二维空间中的一个圆。
|
|
5998
6148
|
*
|
|
@@ -7485,6 +7635,28 @@ declare global {
|
|
|
7485
7635
|
* The transformation matrix.
|
|
7486
7636
|
*/
|
|
7487
7637
|
createAlignCCSMatrix4(x: KVector3d, y: KVector3d, z: KVector3d, origin: KPoint3d): KMatrix4;
|
|
7638
|
+
/**
|
|
7639
|
+
* 创建一个三维坐标系对象。
|
|
7640
|
+
*
|
|
7641
|
+
* Creates an instance of KCCS3d.
|
|
7642
|
+
*
|
|
7643
|
+
* @param origin
|
|
7644
|
+
* 三维坐标系的原点。
|
|
7645
|
+
* The origin point of the 3D coordinate system.
|
|
7646
|
+
*
|
|
7647
|
+
* @param dx
|
|
7648
|
+
* 三维坐标系的X轴方向向量。
|
|
7649
|
+
* The X-axis direction vector of the 3D coordinate system.
|
|
7650
|
+
*
|
|
7651
|
+
* @param dy
|
|
7652
|
+
* 三维坐标系的Y轴方向向量。
|
|
7653
|
+
* The Y-axis direction vector of the 3D coordinate system.
|
|
7654
|
+
*
|
|
7655
|
+
* @returns
|
|
7656
|
+
* 三维坐标系对象。
|
|
7657
|
+
* The 3D coordinate system object.
|
|
7658
|
+
*/
|
|
7659
|
+
createCCS3d(origin: KPoint3d, dx: KVector3d, dy: KVector3d): KCCS3d;
|
|
7488
7660
|
/**
|
|
7489
7661
|
* 创建一个KLine2d对象。
|
|
7490
7662
|
*
|
|
@@ -11271,6 +11443,59 @@ declare global {
|
|
|
11271
11443
|
}
|
|
11272
11444
|
|
|
11273
11445
|
|
|
11446
|
+
// QunHe Product API:
|
|
11447
|
+
/**
|
|
11448
|
+
*
|
|
11449
|
+
* 酷家乐商品库管理器
|
|
11450
|
+
*
|
|
11451
|
+
* The product manager.
|
|
11452
|
+
*/
|
|
11453
|
+
interface ProductManager {
|
|
11454
|
+
/**
|
|
11455
|
+
*
|
|
11456
|
+
* 获取公共商品库
|
|
11457
|
+
*
|
|
11458
|
+
* Get public product library.
|
|
11459
|
+
* @returns The public product library.
|
|
11460
|
+
*/
|
|
11461
|
+
getPublicProductLibrary: () => PublicProductLibrary;
|
|
11462
|
+
}
|
|
11463
|
+
|
|
11464
|
+
/**
|
|
11465
|
+
*
|
|
11466
|
+
* 酷家乐公共商品库
|
|
11467
|
+
*
|
|
11468
|
+
* The public product library.
|
|
11469
|
+
*/
|
|
11470
|
+
interface PublicProductLibrary {
|
|
11471
|
+
/**
|
|
11472
|
+
*
|
|
11473
|
+
* 获取公共商品库类目
|
|
11474
|
+
*
|
|
11475
|
+
* Get category list of public product.
|
|
11476
|
+
* @returns The category id and name.
|
|
11477
|
+
*/
|
|
11478
|
+
getCategory: () => Promise<{ categoryId: number; name: string }[] | undefined>;
|
|
11479
|
+
/**
|
|
11480
|
+
*
|
|
11481
|
+
* 获取某一类目下的商品列表
|
|
11482
|
+
*
|
|
11483
|
+
* Get product list of a category.
|
|
11484
|
+
* @param categoryId category id
|
|
11485
|
+
* @param start start
|
|
11486
|
+
* @param count count
|
|
11487
|
+
* @param lang the language
|
|
11488
|
+
* @returns The brandgoodId, name and previewImgUrl.
|
|
11489
|
+
*/
|
|
11490
|
+
getProductList: (
|
|
11491
|
+
categoryId: number,
|
|
11492
|
+
start: number,
|
|
11493
|
+
count: number,
|
|
11494
|
+
lang?: string
|
|
11495
|
+
) => Promise<{ brandgoodId: string; name: string; previewImgUrl: string }[] | undefined>;
|
|
11496
|
+
}
|
|
11497
|
+
|
|
11498
|
+
|
|
11274
11499
|
}
|
|
11275
11500
|
|
|
11276
11501
|
export {}
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@kudashi/kds-api",
|
|
3
|
-
"version": "2.13.
|
|
4
|
-
"description": "kds api",
|
|
5
|
-
"main": "api.d.ts",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"typings": "api.d.ts",
|
|
10
|
-
"files": [
|
|
11
|
-
"api.d.ts"
|
|
12
|
-
],
|
|
13
|
-
"keywords": [
|
|
14
|
-
"kds"
|
|
15
|
-
],
|
|
16
|
-
"author": "kds",
|
|
17
|
-
"license": "ISC"
|
|
18
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@kudashi/kds-api",
|
|
3
|
+
"version": "2.13.33",
|
|
4
|
+
"description": "kds api",
|
|
5
|
+
"main": "api.d.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"typings": "api.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"api.d.ts"
|
|
12
|
+
],
|
|
13
|
+
"keywords": [
|
|
14
|
+
"kds"
|
|
15
|
+
],
|
|
16
|
+
"author": "kds",
|
|
17
|
+
"license": "ISC"
|
|
18
|
+
}
|