@kudashi/kds-api 2.13.26 → 2.13.27

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 +152 -0
  2. package/api.d.ts +34 -4
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -2,6 +2,158 @@
2
2
 
3
3
  # api changelog
4
4
 
5
+ # version 2.13.27(2028-01-07)
6
+ - KDesign.startOperation和KDesign.commitOperation之间的操作更加兼容undo/redo
7
+ - KGroupInstance.setCustomProperty和KGroupDefinition.setCustomProperty兼容undo/redo
8
+ - 增加KView.getModelSnapshot
9
+
10
+ # version 2.13.26(2024-11-26)
11
+ - 增加KTopoEdge.getKey()
12
+
13
+ # version 2.13.25(2024-11-25)
14
+ - 增加KSurface.getPoint()
15
+
16
+ # version 2.13.25(2024-11-25)
17
+ - 增加KSurface.getPoint()
18
+
19
+ # version 2.13.24
20
+ - deactivateGroupInstance改为异步
21
+
22
+ # version 2.13.23
23
+ - 个人库材质上传限制
24
+ - 增加KDesign.inflateFaces
25
+
26
+ # version 2.13.22
27
+ - 增加KDesign.saveInstanceAsLibraryProject
28
+
29
+ # version 2.13.21
30
+ - 增加KApplicationUI.getSelectControlAxises
31
+ - 增加KGroupInstance.getLocalBoundingBox
32
+
33
+ # version 2.13.20
34
+ - 增加KDesign.enterExpressMode
35
+
36
+ # version 2.13.19
37
+ - 支持插件multiViews
38
+
39
+ # version 2.13.14(2023-0919)
40
+ - 增加KPluginView接口对应multiViews中每个View
41
+ - 增加一些apaas api
42
+ - KApplication.getPluginViewById
43
+ - KApplication.registerMessageHandler
44
+ - KApplication.unRegisterMessageHandler
45
+ - KApplicationUI.toggleSketchToolBar
46
+ - KApplicationUI.togglePropertyPanelVisibility
47
+ - KApplicationUI.switchToCurrentPluginAssetPanel
48
+ - KApplicationUI.injectMenuItems
49
+ - KApplicationUI.injectToolItems
50
+ - KApplicationUI.toggleMaterialReplacePanel
51
+ - KDesign.createInstanceFromAnotherProject
52
+ - KPluginView
53
+ # version 2.13.12(2023-0718)
54
+ - 增加了一些apaas api:
55
+ - KDesign.thickenFaces
56
+ - KDesign.uploadMaterial
57
+ - KTestHelper增加了turnOffShellValidation和undefineShellValidation命令
58
+
59
+ # version 2.13.11(2023-07-0-7)
60
+ - 在KDesign中增加了:
61
+ - exitExpressMode
62
+
63
+ # version 2.13.10(2023-06-20)
64
+ - 在KDesign中增加了:
65
+ - breakGroupReference
66
+ - reparentGroupInstance
67
+
68
+ # version 2.13.9(2023-05-30)
69
+ - 在KDesign中增加了:
70
+ - assignMaterialForEntities()
71
+ - assignDecorationMaterialForEntities()
72
+ - brushDecorationMaterialToEntities()
73
+ - editMaterialParamsOfFace()
74
+ - adjustMaterialMapping()
75
+ - clearMaterial()
76
+ - getFacePavingGroupByFace()
77
+ - 在KCamera中增加了:
78
+ - setPosition()
79
+ - setTarget()
80
+ - 在KPickHelper中增加了:
81
+ - pickByPoint3d()
82
+ - 在KView中增加了:
83
+ - getScreenSnopShot()
84
+ - 添加材质连续对象KFacePavingGroup
85
+
86
+ # version 2.13.7(2023-05-18)
87
+ - 在KFace中增加了:
88
+ - getCustomProperty()
89
+ - setCustomProperty()
90
+ - deleteCustomProperty()
91
+ - 在KGroupDefinition和KGroupInstance中增加了:
92
+ - getCustomProperty()
93
+ - setCustomProperty()
94
+ - getAllCustomPropertiesKey()
95
+ - 在KGroupInstance中增加了:
96
+ - isInvisible()
97
+ - 在KDesign中增加了:
98
+ - shareModel()
99
+ - addFaceHoles()
100
+ - getMaterialOfFace()
101
+ - getMaterialParamsOfFace()
102
+ - findGroupInstancesByAppKey()
103
+ - findGroupInstancesByResource()
104
+ - toggleGroupInstancesVisible()
105
+ - alignShells()
106
+ - flipFace(face: KFace)
107
+ - 在KApplicationObserver中增加了:
108
+ - onModelChanged()
109
+ - 在KApplicationUI中增加了:
110
+ - toggleShowInvisibleModel()
111
+ - getActivePluginEntrancePosition()
112
+ - showPopover()
113
+ - isShownInvisibleModel()
114
+ - 增加了枚举类型:
115
+ - KGroupDefinitionType.Variable来表示变量化成组
116
+ - 在KTestHelper中增加了:
117
+ - purgeMaterialsInDesign()
118
+ - clearAllDecorationMaterials()
119
+ - 更新了math的apaas api版本,引入了很多新类型:
120
+ - "@qunhe/math-apaas-api": "3.0.0",
121
+ - "@qunhe/math-apaas-impl": "3.0.0",
122
+ - 修复了如下问题:
123
+ - boolean()没有导出KBooleanType类型的问题
124
+ - fillet()返回类型不能使用map类型的问题
125
+ - KSelection.getAllEntities()增加了默认参数,来控制是否包含vertex;默认为false保持和原来行为一致
126
+ - 吸附结果中添加了吸附点的normal值
127
+
128
+ # version 2.13.6(2022-11-29)
129
+ - Adjust the parameters of the following APIs:
130
+ - drawArrow3d
131
+ - drawCylinder
132
+
133
+ # version 2.13.5(2022-11-28)
134
+ - Add API:
135
+ - drawArrow3d
136
+ - getShortestPath
137
+
138
+ # version 2.13.4(2022-11-01)
139
+ - Add API:
140
+ - drawCylinder
141
+ - clearTemporaryShapesByIds
142
+ - getYunDesignInfo
143
+ - executeRequest
144
+ - Rebuilding API, change the return value of the following API from boolean to "{ id: string }":
145
+ - drawPoints
146
+ - drawLines
147
+ - drawPolylines
148
+ - drawText
149
+ - drawPromptLine
150
+
151
+ # version 2.13.3
152
+
153
+ # version 2.13.2(2022-07-15)
154
+ - Add KApplication Chinese comment
155
+ - Add KPluginUIAndStorage Chinese comment
156
+
5
157
  # version 2.13.2(2022-07-15)
6
158
  - Remove the qunhe brep api
7
159
  - Add KApplication Chinese comment
package/api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // version: 2.13.26
1
+ // version: 2.13.27
2
2
 
3
3
  declare global {
4
4
  /**
@@ -1991,9 +1991,8 @@ declare global {
1991
1991
  * 显示或者隐藏模型实例。仅用于特定场合,限制条件如下:
1992
1992
  *
1993
1993
  * Turn on/off the visibility of group instances. Constraints as below:
1994
- * 1. should be KGroupDefinitionType.Xref kind of groups;
1995
- * 2. the group instances can be/not be in the current editing group definition (CheckUtils.CheckOperatingGroupInstanceInDefinition is false);
1996
- * 3. this operation is not a undo/redo transaction. it will not cause the design to be dirty as well.
1994
+ * 1. the group instances can be/not be in the current editing group definition (CheckUtils.CheckOperatingGroupInstanceInDefinition is false);
1995
+ * 2. this operation is not a undo/redo transaction. it will not cause the design to be dirty as well.
1997
1996
  *
1998
1997
  * @param groupInstances
1999
1998
  * @param isVisible : True is turning to be visible, and vice versa
@@ -4403,6 +4402,37 @@ declare global {
4403
4402
  */
4404
4403
  getScreenSnopShot(): string;
4405
4404
 
4405
+ /**
4406
+ * 用于获取指定模型的截图(不包括画布背景)
4407
+ * @param groupInstances 要截图的指定模型
4408
+ * @param cameraPosture 自定义相机位姿参数设置
4409
+ * @param cameraPreset 进行截图的相机预设视角(可选参数),支持以下几种正视图:
4410
+ * - "top":从上方查看
4411
+ * - "bottom":从下方查看
4412
+ * - "left":从左侧查看
4413
+ * - "right":从右侧查看
4414
+ * - "front":从前方查看
4415
+ * - "back":从后方查看
4416
+ * 如果同时指定了相机位姿参数和相机预设视角,则采用相机位姿参数
4417
+ * 如果未指定相机位姿和相机预设视角,则使用画布相机的当前位姿
4418
+ * 请注意,正视图和自定义相机参数设置将始终以模型中心点为截图相机的目视方向
4419
+ *
4420
+ * The method is used to get a snapshot of the specified model (excluding the canvas background)
4421
+ * @param cameraPosture Custom camera parameter settings.
4422
+ * @param cameraPreset The camera preset view for taking the snapshot (optional parameter), supporting the following view orientations:
4423
+ * - "top": snapshot from above
4424
+ * - "bottom": snapshot from below
4425
+ * - "left": snapshot from the left side
4426
+ * - "right": snapshot from the right side
4427
+ * - "front": snapshot from the front
4428
+ * - "back": snapshot from the back
4429
+ * If both cameraPosture and cameraPreset are provided, the cameraPosture will be used.
4430
+ * If no camera posture or camera preset is specified, the current posture of the canvas camera will be used.
4431
+ * Note that both preset view orientations and custom camera parameter settings will always have the model's center point as the focus direction for the screenshot camera.
4432
+ * @returns Return buffer of snapshot data.
4433
+ */
4434
+ getModelSnapshot(groupInstances: KGroupInstance[], cameraPosture?: { cameraPosition: KPoint3d, cameraUpDirection: KVector3d }, cameraPreset?: string): HostPromise<string | undefined>;
4435
+
4406
4436
  /**
4407
4437
  *
4408
4438
  * 在视口中临时绘制点。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kudashi/kds-api",
3
- "version": "2.13.26",
3
+ "version": "2.13.27",
4
4
  "description": "kds api",
5
5
  "main": "api.d.ts",
6
6
  "scripts": {