Skip to main content

kittycad_modeling_cmds/
ok_response.rs

1use kittycad_modeling_cmds_macros::define_ok_modeling_cmd_response_enum;
2use serde::{Deserialize, Serialize};
3
4impl crate::ModelingCmdOutput for () {}
5
6pub(crate) fn is_true(b: &bool) -> bool {
7    *b
8}
9
10fn bool_true() -> bool {
11    true
12}
13
14define_ok_modeling_cmd_response_enum! {
15    /// Output from Modeling API commands.
16    pub mod output {
17        use kittycad_modeling_cmds_macros::ModelingCmdOutput;
18        use schemars::JsonSchema;
19        use serde::{Deserialize, Serialize};
20        use bon::Builder;
21        use uuid::Uuid;
22        use crate::shared::{
23            CameraSettings,
24            CameraViewState,
25            BodyType,
26            EntityReference,
27        };
28        use std::collections::HashMap;
29
30        use crate::{self as kittycad_modeling_cmds};
31        use crate::{
32            base64::Base64Data,
33            id::ModelingCmdId,
34            length_unit::LengthUnit,
35            shared::{CurveType, EntityType, ExportFile, ExtrusionFaceCapType, PathCommand, Point2d, Point3d, BodiesCreated, BodiesUpdated},
36            units,
37        };
38        use super::bool_true;
39
40        /// The response of the `EngineUtilEvaluatePath` endpoint
41        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
42        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
43        pub struct EngineUtilEvaluatePath {
44            /// The evaluated path curve position
45            pub pos: Point3d<LengthUnit>,
46        }
47
48        /// The response from the `StartPath` endpoint.
49        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
50        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
51        pub struct StartPath {
52        }
53
54        /// The response from the `MovePathPen` endpoint.
55        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
56        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
57        pub struct MovePathPen {
58        }
59
60        /// The response from the `ExtendPath` endpoint.
61        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
62        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
63        pub struct ExtendPath {
64        }
65
66        /// The response from the `Extrude` endpoint.
67        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
68        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
69        pub struct Extrude {
70            /// Any new bodies created by the request.
71            #[serde(default, skip_serializing_if = "BodiesCreated::is_empty")]
72            pub bodies_created: BodiesCreated,
73            /// Any existing bodies updated by the request.
74            #[serde(default, skip_serializing_if = "BodiesUpdated::is_empty")]
75            pub bodies_updated: BodiesUpdated,
76        }
77
78        /// The response from the `ExtrudeToReference` endpoint.
79        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
80        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
81        pub struct ExtrudeToReference {
82            /// Any new bodies created by the request.
83            #[serde(default, skip_serializing_if = "BodiesCreated::is_empty")]
84            pub bodies_created: BodiesCreated,
85            /// Any existing bodies updated by the request.
86            #[serde(default, skip_serializing_if = "BodiesUpdated::is_empty")]
87            pub bodies_updated: BodiesUpdated,
88        }
89
90        /// The response from the `TwistExtrude` endpoint.
91        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
92        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
93        pub struct TwistExtrude {
94            /// Any new bodies created by the request.
95            #[serde(default, skip_serializing_if = "BodiesCreated::is_empty")]
96            pub bodies_created: BodiesCreated,
97            /// Any existing bodies updated by the request.
98            #[serde(default, skip_serializing_if = "BodiesUpdated::is_empty")]
99            pub bodies_updated: BodiesUpdated,
100        }
101
102        /// The response from the `Sweep` endpoint.
103        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
104        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
105        pub struct Sweep {
106            /// Any new bodies created by the request.
107            #[serde(default, skip_serializing_if = "BodiesCreated::is_empty")]
108            pub bodies_created: BodiesCreated,
109            /// Any existing bodies updated by the request.
110            #[serde(default, skip_serializing_if = "BodiesUpdated::is_empty")]
111            pub bodies_updated: BodiesUpdated,
112        }
113
114        /// The response from the `Revolve` endpoint.
115        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
116        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
117        pub struct Revolve {
118            /// Any new bodies created by the request.
119            #[serde(default, skip_serializing_if = "BodiesCreated::is_empty")]
120            pub bodies_created: BodiesCreated,
121            /// Any existing bodies updated by the request.
122            #[serde(default, skip_serializing_if = "BodiesUpdated::is_empty")]
123            pub bodies_updated: BodiesUpdated,
124        }
125
126        /// The response from the `Solid3dShellFace` endpoint.
127        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
128        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
129        pub struct Solid3dShellFace {
130        }
131
132        /// The response from the `Solid3dJoin` endpoint.
133        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
134        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
135        pub struct Solid3dJoin {
136        }
137
138        /// The response from the `Solid3dMultiJoin` endpoint.
139        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
140        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
141        pub struct Solid3dMultiJoin {
142        }
143
144        /// The response from the `SurfaceBlend` endpoint.
145        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
146        pub struct SurfaceBlend {
147        }
148
149        /// The response from the `Solid3dGetEdgeUuid` endpoint.
150        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
151        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
152        pub struct Solid3dGetEdgeUuid {
153            /// The UUID of the edge.
154            pub edge_id: Uuid,
155        }
156
157        /// The response from the `Solid3dGetFaceUuid` endpoint.
158        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
159        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
160        pub struct Solid3dGetFaceUuid {
161            /// The UUID of the face.
162            pub face_id: Uuid,
163        }
164
165        /// The response from the `Solid3dGetBodyType` endpoint.
166        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
167        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
168        pub struct Solid3dGetBodyType {
169            /// The body type
170            pub body_type: BodyType,
171        }
172
173        /// The response from the `RevolveAboutEdge` endpoint.
174        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
175        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
176        pub struct RevolveAboutEdge {
177            /// Any new bodies created by the request.
178            #[serde(default, skip_serializing_if = "BodiesCreated::is_empty")]
179            pub bodies_created: BodiesCreated,
180            /// Any existing bodies updated by the request.
181            #[serde(default, skip_serializing_if = "BodiesUpdated::is_empty")]
182            pub bodies_updated: BodiesUpdated,
183        }
184
185        /// The response from the `CameraDragStart` endpoint.
186        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
187        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
188        pub struct CameraDragStart {
189        }
190
191        /// The response from the `DefaultCameraLookAt` endpoint.
192        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
193        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
194        pub struct DefaultCameraLookAt {
195        }
196
197        /// The response from the `DefaultCameraPerspectiveSettings` endpoint.
198        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
199        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
200        pub struct DefaultCameraPerspectiveSettings {
201        }
202
203        /// The response from the `SelectAdd` endpoint.
204        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
205        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
206        pub struct SelectAdd {
207        }
208        /// The response from the `SelectRemove` endpoint.
209        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
210        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
211        pub struct SelectRemove {
212        }
213
214        /// The response from the `SceneClearAll` endpoint.
215        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
216        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
217        pub struct SceneClearAll {
218        }
219
220        /// The response from the `SelectReplace` endpoint.
221        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
222        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
223        pub struct SelectReplace {
224        }
225
226        /// The response from the `HighlightSetEntities` endpoint.
227        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
228        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
229        pub struct HighlightSetEntities {
230        }
231
232        /// The response from the `NewAnnotation` endpoint.
233        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
234        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
235        pub struct NewAnnotation {
236        }
237
238        /// The response from the `UpdateAnnotation` endpoint.
239        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
240        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
241        pub struct UpdateAnnotation {
242        }
243
244        /// The response from the `EdgeLinesVisible` endpoint.
245        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
246        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
247        pub struct EdgeLinesVisible {
248        }
249
250        /// The response from the `ObjectVisible` endpoint.
251        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
252        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
253        pub struct ObjectVisible {
254        }
255
256        /// The response from the `ObjectBringToFront` endpoint.
257        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
258        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
259        pub struct ObjectBringToFront {
260        }
261
262        /// The response from the `ObjectSetMaterialParamsPbr` endpoint.
263        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
264        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
265        pub struct ObjectSetMaterialParamsPbr {
266        }
267
268        /// The response from the `ObjectSetName` endpoint.
269        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
270        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
271        pub struct ObjectSetName {
272        }
273
274        /// The response from the `Solid2dAddHole` endpoint.
275        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
276        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
277        pub struct Solid2dAddHole {
278        }
279
280        /// The response from the `Solid3dFilletEdge` endpoint.
281        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
282        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
283        pub struct Solid3dFilletEdge {
284        }
285
286        /// The response from the `Solid3dCutEdgeReferences` endpoint.
287        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
288        pub struct Solid3dCutEdgeReferences {
289        }
290
291
292        /// The response from the `Solid3dCutEdges` endpoint.
293        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
294        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
295        pub struct Solid3dCutEdges {
296        }
297
298
299        /// The response from the `SendObject` endpoint.
300        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
301        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
302        pub struct SendObject {
303        }
304
305        /// The response from the `EntitySetOpacity` endpoint.
306        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
307        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
308        pub struct EntitySetOpacity {
309        }
310
311        /// The response from the `EntityFade` endpoint.
312        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
313        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
314        pub struct EntityFade {
315        }
316
317        /// The response from the `MakePlane` endpoint.
318        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
319        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
320        pub struct MakePlane {
321        }
322
323        /// The response from the `PlaneSetColor` endpoint.
324        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
325        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
326        pub struct PlaneSetColor {
327        }
328
329        /// The response from the `SetTool` endpoint.
330        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
331        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
332        pub struct SetTool {
333        }
334
335        /// The response from the `MouseMove` endpoint.
336        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
337        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
338        pub struct MouseMove {
339        }
340
341        /// The response from the `SketchModeDisable` endpoint.
342        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
343        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
344        pub struct SketchModeDisable {
345        }
346
347        /// The response from the `EnableDryRun` endpoint.
348        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
349        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
350        pub struct EnableDryRun {
351        }
352
353        /// The response from the `DisableDryRun` endpoint.
354        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
355        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
356        pub struct DisableDryRun {
357        }
358
359        /// The response from the `CurveSetConstraint` endpoint.
360        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
361        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
362        pub struct CurveSetConstraint {
363        }
364
365        /// The response from the `EnableSketchMode` endpoint.
366        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
367        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
368        pub struct EnableSketchMode {
369        }
370
371        /// The response from the `SetBackgroundColor` endpoint.
372        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
373        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
374        pub struct SetBackgroundColor {
375        }
376
377        /// The response from the `SetCurrentToolProperties` endpoint.
378        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
379        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
380        pub struct SetCurrentToolProperties {
381        }
382
383        /// The response from the `SetDefaultSystemProperties` endpoint.
384        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
385        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
386        pub struct SetDefaultSystemProperties {
387        }
388
389        /// The response from the `MakeAxesGizmo` endpoint.
390        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
391        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
392        pub struct MakeAxesGizmo {
393        }
394
395        /// The response from the `HandleMouseDragStart` endpoint.
396        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
397        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
398        pub struct HandleMouseDragStart {
399        }
400
401        /// The response from the `HandleMouseDragMove` endpoint.
402        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
403        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
404        pub struct HandleMouseDragMove {
405        }
406
407        /// The response from the `HandleMouseDragEnd` endpoint.
408        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
409        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
410        pub struct HandleMouseDragEnd {
411        }
412
413        /// The response from the `RemoveSceneObjects` endpoint.
414        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
415        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
416        pub struct RemoveSceneObjects {
417        }
418
419        /// The response from the `ReconfigureStream` endpoint.
420        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
421        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
422        pub struct ReconfigureStream {
423        }
424
425        /// The response from the `SetSceneUnits` endpoint.
426        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
427        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
428        pub struct SetSceneUnits {
429        }
430
431        /// The response from the `SetSelectionType` endpoint.
432        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
433        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
434        pub struct SetSelectionType {
435        }
436
437        /// The response from the `SetSelectionFilter` endpoint.
438        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
439        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
440        pub struct SetSelectionFilter {
441        }
442
443        /// The response from the `DefaultCameraSetOrthographic` endpoint.
444        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
445        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
446        pub struct DefaultCameraSetOrthographic {
447        }
448
449        /// The response from the `DefaultCameraSetPerspective` endpoint.
450        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
451        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
452        pub struct DefaultCameraSetPerspective {
453        }
454
455        /// The response from the `DefaultCameraCenterToSelection` endpoint.
456        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
457        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
458        pub struct DefaultCameraCenterToSelection {
459        }
460
461        /// The response from the `DefaultCameraCenterToScene` endpoint.
462        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
463        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
464        pub struct DefaultCameraCenterToScene {
465        }
466
467        /// The response from the `SelectClear` endpoint.
468        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
469        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
470        pub struct SelectClear {
471        }
472
473        /// The response from the `SelectEntity` endpoint.
474        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
475        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
476        pub struct SelectEntity {
477        }
478
479        /// The response from the `Export2d` endpoint.
480        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
481        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
482        pub struct Export2d {
483            /// The files that were exported.
484            pub files: Vec<ExportFile>,
485        }
486
487        /// The response from the `Export3d` endpoint.
488        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
489        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
490        pub struct Export3d {
491            /// The files that were exported.
492            pub files: Vec<ExportFile>,
493        }
494
495        /// The response from the `Export` endpoint.
496        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
497        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
498        pub struct Export {
499            /// The files that were exported.
500            pub files: Vec<ExportFile>,
501        }
502
503        /// The response from the `SelectWithPoint` command.
504        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
505        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
506        pub struct SelectWithPoint {
507            /// The UUID of the entity that was selected.
508            pub entity_id: Option<Uuid>,
509        }
510
511        /// The response from the `QueryEntityTypeWithPoint` command.
512        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
513        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
514        pub struct QueryEntityTypeWithPoint {
515            /// How to reference the selected entity using face ids.
516            /// None if no entity was found at the given point (e.g. clicked in empty space).
517            #[serde(default, skip_serializing_if = "Option::is_none")]
518            pub reference: Option<EntityReference>,
519        }
520
521        /// The response from the `QueryEntityType` command.
522        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
523        pub struct QueryEntityType {
524            /// How to reference the provided entity using face ids.
525            pub reference: EntityReference,
526        }
527
528        /// The response from the `HighlightSetEntity` command.
529        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
530        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
531        pub struct HighlightSetEntity {
532            /// The UUID of the entity that was highlighted.
533            pub entity_id: Option<Uuid>,
534            /// If the client sent a sequence ID with its request, the backend sends it back.
535            pub sequence: Option<u32>,
536        }
537
538        /// The response from the `EntityGetChildUuid` command.
539        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
540        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
541        pub struct EntityGetChildUuid {
542            /// The UUID of the child entity.
543            pub entity_id: Uuid,
544        }
545        /// The response from the `EntityGetIndex` command.
546        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
547        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
548        pub struct EntityGetIndex {
549            /// The child index of the entity.
550            pub entity_index: u32,
551        }
552        /// The response from the `EntityGetPrimitiveIndex` command.
553        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
554        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
555        pub struct EntityGetPrimitiveIndex {
556            /// The primitive index of the entity.
557            pub primitive_index: u32,
558
559            /// The type of this entity.  Helps infer whether this is an edge or a face index.
560            pub entity_type: EntityType,
561        }
562        /// The response from the `EntityDeleteChildren` command.
563        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
564        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
565        pub struct EntityDeleteChildren {
566        }
567        /// The response from the `EntityGetNumChildren` command.
568        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
569        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
570        pub struct EntityGetNumChildren {
571            /// The number of children the entity has.
572            pub num: u32,
573        }
574        /// The response from the `EntityGetParentId` command.
575        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
576        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
577        pub struct EntityGetParentId {
578            /// The UUID of the parent entity.
579            pub entity_id: Uuid,
580        }
581        /// The response from the `EntityGetAllChildUuids` command.
582        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
583        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
584        pub struct EntityGetAllChildUuids {
585            /// The UUIDs of the child entities.
586            pub entity_ids: Vec<Uuid>,
587        }
588
589        /// The response from the `EntityGetSketchPaths` command.
590        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
591        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
592        pub struct EntityGetSketchPaths {
593            /// The UUIDs of the sketch paths.
594            pub entity_ids: Vec<Uuid>,
595        }
596
597        /// The response from the `Loft` command.
598        #[derive(Debug, Serialize, Deserialize, JsonSchema, PartialEq, ModelingCmdOutput, Clone)]
599        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
600        pub struct Loft {
601            ///The UUID of the newly created solid loft.
602            pub solid_id: Uuid,
603        }
604
605        /// The response from the `ClosePath` command.
606        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
607        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
608        pub struct ClosePath {
609            /// The UUID of the lone face of the resulting solid2D.
610            pub face_id: Uuid,
611        }
612
613        /// The response from the `CameraDragMove` command.
614        /// Note this is an "unreliable" channel message, so this data may need more data like a "sequence"
615        //  to work properly
616        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
617        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
618        pub struct CameraDragMove {
619            /// Camera settings
620            pub settings: CameraSettings
621        }
622
623        /// The response from the `CameraDragEnd` command.
624        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
625        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
626        pub struct CameraDragEnd {
627            /// Camera settings
628            pub settings: CameraSettings
629        }
630
631        /// The response from the `DefaultCameraGetSettings` command.
632        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
633        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
634        pub struct DefaultCameraGetSettings {
635            /// Camera settings
636            pub settings: CameraSettings
637        }
638
639        /// The response from the `DefaultCameraGetView` command.
640        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
641        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
642        pub struct DefaultCameraGetView {
643            /// Camera view state
644            pub view: CameraViewState
645        }
646
647        /// The response from the `DefaultCameraSetView` command.
648        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
649        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
650        pub struct DefaultCameraSetView {}
651
652        /// The response from the `DefaultCameraZoom` command.
653        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
654        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
655        pub struct DefaultCameraZoom {
656            /// Camera settings
657            pub settings: CameraSettings
658        }
659
660        /// The response from the `ZoomToFit` command.
661        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
662        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
663        pub struct ZoomToFit {
664            /// Camera settings
665            pub settings: CameraSettings
666        }
667
668        /// The response from the `OrientToFace` command.
669        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
670        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
671        pub struct OrientToFace {
672            /// Camera settings
673            pub settings: CameraSettings
674        }
675
676        /// The response from the `ViewIsometric` command.
677        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
678        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
679        pub struct ViewIsometric {
680            /// Camera settings
681            pub settings: CameraSettings
682        }
683
684        /// The response from the `GetNumObjects` command.
685        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
686        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
687        pub struct GetNumObjects {
688            /// The number of objects in the scene.
689            pub num_objects: u32,
690        }
691
692        /// The response from the `MakeOffsetPath` command.
693        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
694        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
695        pub struct MakeOffsetPath {
696            /// If the offset path splits into multiple paths, this will contain the UUIDs of the
697            /// new paths.
698            /// If the offset path remains as a single path, this will be empty, and the resulting ID
699            /// of the (single) new path will be the ID of the `MakeOffsetPath` command.
700            pub entity_ids: Vec<Uuid>,
701        }
702
703        /// The response from the `SetObjectTransform` command.
704        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
705        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
706        pub struct SetObjectTransform {}
707
708        /// The response from the `AddHoleFromOffset` command.
709        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
710        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
711        pub struct AddHoleFromOffset {
712            /// If the offset path splits into multiple paths, this will contain the UUIDs of the
713            /// new paths.
714            /// If the offset path remains as a single path, this will be empty, and the resulting ID
715            /// of the (single) new path will be the ID of the `AddHoleFromOffset` command.
716            pub entity_ids: Vec<Uuid>,
717        }
718
719        /// The response from the `DefaultCameraFocusOn` command.
720        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
721        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
722        pub struct DefaultCameraFocusOn { }
723
724        /// The response from the `SelectGet` command.
725        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
726        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
727        pub struct SelectGet {
728            /// The UUIDs of the selected entities.
729            pub entity_ids: Vec<Uuid>,
730        }
731
732        /// Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)
733        /// This includes the opposite and adjacent faces and edges.
734        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
735        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
736        pub struct Solid3dGetAdjacencyInfo {
737            /// Details of each edge.
738            pub edges: Vec<AdjacencyInfo>,
739        }
740
741        /// The response from the `Solid3dGetAllEdgeFaces` command.
742        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
743        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
744        pub struct Solid3dGetAllEdgeFaces {
745            /// The UUIDs of the faces.
746            pub faces: Vec<Uuid>,
747        }
748
749        /// The response from the `Solid3dFlip` command.
750        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
751        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
752        pub struct Solid3dFlip {
753        }
754
755        /// The response from the `Solid3dFlipFace` command.
756        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
757        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
758        pub struct Solid3dFlipFace {
759        }
760
761        /// The response from the `Solid3dGetAllOppositeEdges` command.
762        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
763        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
764        pub struct Solid3dGetAllOppositeEdges {
765            /// The UUIDs of the edges.
766            pub edges: Vec<Uuid>,
767        }
768
769        /// The response from the `Solid3dGetOppositeEdge` command.
770        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
771        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
772        pub struct Solid3dGetOppositeEdge {
773            /// The UUID of the edge.
774            pub edge: Uuid,
775        }
776
777        /// The response from the `Solid3dGetNextAdjacentEdge` command.
778        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
779        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
780        pub struct Solid3dGetNextAdjacentEdge {
781            /// The UUID of the edge.
782            pub edge: Option<Uuid>,
783        }
784
785        /// The response from the `Solid3dGetPrevAdjacentEdge` command.
786        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
787        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
788        pub struct Solid3dGetPrevAdjacentEdge {
789            /// The UUID of the edge.
790            pub edge: Option<Uuid>,
791        }
792
793        /// The response from the `Solid3DGetCommonEdge` command.
794        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
795        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
796        pub struct Solid3dGetCommonEdge {
797            /// The UUID of the common edge, if any.
798            pub edge: Option<Uuid>,
799        }
800
801        /// The response from the `GetEntityType` command.
802        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
803        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
804        pub struct GetEntityType {
805            /// The type of the entity.
806            pub entity_type: EntityType,
807        }
808
809        /// The response from the `SceneGetEntityIds` command.
810        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
811        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
812        pub struct SceneGetEntityIds {
813            /// The ids of the requested entities.
814            pub entity_ids: Vec<Vec<Uuid>>,
815        }
816
817        /// The response from the `CurveGetControlPoints` command.
818        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
819        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
820        pub struct CurveGetControlPoints {
821            /// Control points in the curve.
822            pub control_points: Vec<Point3d<f64>>,
823        }
824
825        /// The response from the `ProjectEntityToPlane` command.
826        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
827        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
828        pub struct ProjectEntityToPlane {
829            /// Projected points.
830            pub projected_points: Vec<Point3d<f64>>,
831        }
832
833        /// The response from the `ProjectPointsToPlane` command.
834        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
835        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
836        pub struct ProjectPointsToPlane {
837            /// Projected points.
838            pub projected_points: Vec<Point3d<f64>>,
839        }
840
841        /// The response from the `CurveGetType` command.
842        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, Eq, PartialEq, ModelingCmdOutput)]
843        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
844        pub struct CurveGetType {
845            /// Curve type
846            pub curve_type: CurveType,
847        }
848
849        /// The response from the `MouseClick` command.
850        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
851        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
852        pub struct MouseClick {
853            /// Entities that are modified.
854            pub entities_modified: Vec<Uuid>,
855            /// Entities that are selected.
856            pub entities_selected: Vec<Uuid>,
857        }
858
859        /// The response from the `TakeSnapshot` command.
860        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
861        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
862        pub struct TakeSnapshot {
863            /// Contents of the image.
864            pub contents: Base64Data,
865        }
866
867        /// The response from the `PathGetInfo` command.
868        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
869        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
870        pub struct PathGetInfo {
871            /// All segments in the path, in the order they were added.
872            pub segments: Vec<PathSegmentInfo>,
873        }
874
875        /// Info about a path segment
876        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
877        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
878        pub struct PathSegmentInfo {
879            /// Which command created this path?
880            /// This field is absent if the path command is not actually creating a path segment,
881            /// e.g. moving the pen doesn't create a path segment.
882            pub command_id: Option<ModelingCmdId>,
883            /// What is the path segment?
884            pub command: PathCommand,
885            ///Whether or not this segment is a relative offset
886            pub relative: bool,
887        }
888
889        /// The response from the `PathGetCurveUuidsForVertices` command.
890        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
891        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
892        pub struct PathGetCurveUuidsForVertices {
893            /// The UUIDs of the curve entities.
894            pub curve_ids: Vec<Uuid>,
895        }
896
897        /// The response from the `PathGetCurveUuid` command.
898        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
899        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
900        pub struct PathGetCurveUuid {
901            /// The UUID of the curve entity.
902            pub curve_id: Uuid,
903        }
904
905        /// The response from the `PathGetVertexUuids` command.
906        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
907        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
908        pub struct PathGetVertexUuids {
909            /// The UUIDs of the vertex entities.
910            pub vertex_ids: Vec<Uuid>,
911        }
912
913        /// The response from the `PathGetSketchTargetUuid` command.
914        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
915        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
916        pub struct PathGetSketchTargetUuid {
917            /// The UUID of the sketch target.
918            pub target_id: Option<Uuid>,
919        }
920
921        /// Endpoints of a curve
922        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
923        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
924        pub struct CurveGetEndPoints {
925            /// Start
926            pub start: Point3d<LengthUnit>,
927            /// End
928            pub end: Point3d<LengthUnit>,
929        }
930
931        /// Surface-local planar axes (if available)
932        #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, JsonSchema, ModelingCmdOutput)]
933        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
934        pub struct FaceIsPlanar {
935            /// plane's origin
936            pub origin: Option<Point3d<LengthUnit>>,
937
938            /// plane's local x-axis
939            pub x_axis: Option<Point3d<f64>>,
940
941            /// plane's local y-axis
942            pub y_axis: Option<Point3d<f64>>,
943
944            /// plane's local z-axis (normal)
945            pub z_axis: Option<Point3d<f64>>,
946        }
947
948        /// The 3D position on the surface that was evaluated
949        #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, JsonSchema, ModelingCmdOutput)]
950        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
951        pub struct FaceGetPosition {
952            /// The 3D position on the surface that was evaluated
953            pub pos: Point3d<LengthUnit>,
954        }
955
956        /// The 3D center of mass on the surface
957        #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, JsonSchema, ModelingCmdOutput)]
958        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
959        pub struct FaceGetCenter {
960            /// The 3D position on the surface center of mass
961            pub pos: Point3d<LengthUnit>,
962        }
963
964        /// The gradient (dFdu, dFdv) + normal vector on a brep face
965        #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, JsonSchema, ModelingCmdOutput)]
966        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
967        pub struct FaceGetGradient {
968            /// dFdu
969            pub df_du: Point3d<f64>,
970
971            /// dFdv
972            pub df_dv: Point3d<f64>,
973
974            /// Normal (||dFdu x dFdv||)
975            pub normal: Point3d<f64>,
976        }
977
978        /// Corresponding coordinates of given window coordinates, intersected on given plane.
979        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
980        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
981        pub struct PlaneIntersectAndProject {
982            /// Corresponding coordinates of given window coordinates, intersected on given plane.
983            pub plane_coordinates: Option<Point2d<LengthUnit>>,
984        }
985
986        /// Data from importing the files
987        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput, Builder)]
988        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
989        pub struct ImportFiles {
990            /// ID of the imported 3D models within the scene.
991            pub object_id: Uuid,
992        }
993
994        /// Data from importing the files
995        #[derive(Debug, Eq, PartialEq, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
996        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
997        pub struct ImportedGeometry {
998            /// ID of the imported 3D models within the scene.
999            pub id: Uuid,
1000            /// The original file paths that held the geometry.
1001            pub value: Vec<String>,
1002        }
1003
1004        /// The mass response.
1005        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1006        #[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
1007        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1008        pub struct Mass {
1009            /// The mass.
1010            pub mass: f64,
1011            /// The output unit for the mass.
1012            pub output_unit: units::UnitMass,
1013        }
1014
1015        /// The volume response.
1016        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1017        #[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
1018        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1019        pub struct Volume {
1020            /// The volume.
1021            pub volume: f64,
1022            /// The output unit for the volume.
1023            pub output_unit: units::UnitVolume,
1024        }
1025
1026        /// The density response.
1027        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1028        #[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
1029        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1030        pub struct Density {
1031            /// The density.
1032            pub density: f64,
1033            /// The output unit for the density.
1034            pub output_unit: units::UnitDensity,
1035        }
1036
1037        /// The surface area response.
1038        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1039        #[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
1040        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1041        pub struct SurfaceArea {
1042            /// The surface area.
1043            pub surface_area: f64,
1044            /// The output unit for the surface area.
1045            pub output_unit: units::UnitArea,
1046        }
1047
1048        /// The center of mass response.
1049        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1050        #[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
1051        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1052        pub struct CenterOfMass {
1053            /// The center of mass.
1054            pub center_of_mass: Point3d<f64>,
1055            /// The output unit for the center of mass.
1056            pub output_unit: units::UnitLength,
1057        }
1058
1059        /// The plane for sketch mode.
1060        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1061        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1062        pub struct GetSketchModePlane {
1063            /// The origin.
1064            pub origin: Point3d<LengthUnit>,
1065            /// The x axis.
1066            pub x_axis: Point3d<f64>,
1067            /// The y axis.
1068            pub y_axis: Point3d<f64>,
1069            /// The z axis (normal).
1070            pub z_axis: Point3d<f64>,
1071        }
1072
1073        /// The response from the `EntitiesGetDistance` command.
1074        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1075        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1076        pub struct EntityGetDistance {
1077            /// The minimum distance between the input entities.
1078            pub min_distance: LengthUnit,
1079            /// The maximum distance between the input entities.
1080            pub max_distance: LengthUnit,
1081        }
1082
1083        /// The response from the `EdgeGetLength` command.
1084        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1085        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1086        pub struct EdgeGetLength {
1087            /// The length of the edge.
1088            pub length: LengthUnit,
1089        }
1090
1091        /// Faces and edges id info (most used in identifying geometry in patterned and mirrored objects).
1092        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1093        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1094        pub struct FaceEdgeInfo {
1095            /// The UUID of the object.
1096            pub object_id: Uuid,
1097            /// The faces of each object.
1098            pub faces: Vec<Uuid>,
1099            /// The edges of each object.
1100            pub edges: Vec<Uuid>,
1101        }
1102
1103        /// A list of faces for a specific edge.
1104        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1105        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1106        pub struct EdgeInfo {
1107            /// The UUID of the id.
1108            pub edge_id: Uuid,
1109            /// The faces of each edge.
1110            pub faces: Vec<Uuid>,
1111        }
1112
1113        /// The response from the `EntityClone` command.
1114        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1115        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1116        pub struct EntityClone {
1117            /// The Face and Edge Ids of the cloned entity.
1118            #[serde(default, skip_serializing_if = "Vec::is_empty")]
1119            pub face_edge_ids: Vec<FaceEdgeInfo>,
1120        }
1121
1122        /// The response from the `EntityLinearPatternTransform` command.
1123        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1124        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1125        pub struct EntityLinearPatternTransform {
1126            /// The Face, edge, and entity ids of the patterned entities.
1127            #[serde(default, skip_serializing_if = "Vec::is_empty")]
1128            pub entity_face_edge_ids: Vec<FaceEdgeInfo>,
1129        }
1130
1131        /// The response from the `EntityLinearPattern` command.
1132        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1133        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1134        pub struct EntityLinearPattern {
1135            /// The Face, edge, and entity ids of the patterned entities.
1136            #[serde(default, skip_serializing_if = "Vec::is_empty")]
1137            pub entity_face_edge_ids: Vec<FaceEdgeInfo>,
1138        }
1139
1140        /// The response from the `EntityCircularPattern` command.
1141        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput, Default)]
1142        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1143        pub struct EntityCircularPattern {
1144            /// The Face, edge, and entity ids of the patterned entities.
1145            #[serde(default, skip_serializing_if = "Vec::is_empty")]
1146            pub entity_face_edge_ids: Vec<FaceEdgeInfo>,
1147        }
1148
1149        /// The response from the `EntityMirror` endpoint.
1150        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1151        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1152        pub struct EntityMirror {
1153            /// The Face, edge, and entity ids of the patterned entities.
1154            #[serde(default, skip_serializing_if = "Vec::is_empty")]
1155            pub entity_face_edge_ids: Vec<FaceEdgeInfo>,
1156        }
1157
1158        /// The response from the `EntityMirrorAcross` endpoint.
1159        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1160        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1161        pub struct EntityMirrorAcross {
1162            /// The Face, edge, and entity ids of the patterned entities.
1163            #[serde(default, skip_serializing_if = "Vec::is_empty")]
1164            pub entity_face_edge_ids: Vec<FaceEdgeInfo>,
1165        }
1166
1167        /// The response from the `EntityMirrorAcrossEdge` endpoint.
1168        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1169        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1170        pub struct EntityMirrorAcrossEdge {
1171            /// The Face, edge, and entity ids of the patterned entities.
1172            #[serde(default, skip_serializing_if = "Vec::is_empty")]
1173            pub entity_face_edge_ids: Vec<FaceEdgeInfo>,
1174        }
1175
1176        /// The response from the `EntityMakeHelix` endpoint.
1177        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1178        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1179        pub struct EntityMakeHelix {
1180        }
1181
1182        /// The response from the `EntityMakeHelixFromParams` endpoint.
1183        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1184        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1185        pub struct EntityMakeHelixFromParams {
1186        }
1187
1188        /// The response from the `EntityMakeHelixFromEdge` endpoint.
1189        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1190        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1191        pub struct EntityMakeHelixFromEdge {
1192        }
1193
1194        /// Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)
1195        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1196        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1197        pub struct Solid3dGetExtrusionFaceInfo {
1198            /// Details of each face.
1199            pub faces: Vec<ExtrusionFaceInfo>,
1200        }
1201
1202        /// Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)
1203        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1204        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1205        pub struct ExtrusionFaceInfo {
1206            /// Path component (curve) UUID.
1207            pub curve_id: Option<Uuid>,
1208
1209            /// Face uuid.
1210            pub face_id: Option<Uuid>,
1211
1212            /// Whether or not this extrusion face is a top/bottom cap face or not.
1213            /// Note that top/bottom cap faces will not have associated curve IDs.
1214            pub cap: ExtrusionFaceCapType,
1215        }
1216
1217        /// Struct to contain the edge information of a wall of an extrude/rotate/loft/sweep.
1218        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1219        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1220        pub struct ComplementaryEdges {
1221            /// The opposite edge has no common vertices with the original edge. A wall may not
1222            /// have an opposite edge (i.e. a revolve that touches the axis of rotation).
1223            pub opposite_id: Option<Uuid>,
1224            /// Every edge that shared one common vertex with the original edge.
1225            pub adjacent_ids: Vec<Uuid>,
1226        }
1227
1228
1229        /// Edge info struct (useful for maintaining mappings between edges and faces and
1230        /// adjacent/opposite edges).
1231        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1232        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1233        pub struct AdjacencyInfo {
1234            /// Original edge id and face info.
1235            #[serde(default, skip_serializing_if = "Option::is_none")]
1236            pub original_info: Option<EdgeInfo>,
1237            /// Opposite edge and face info.
1238            #[serde(default, skip_serializing_if = "Option::is_none")]
1239            pub opposite_info: Option<EdgeInfo>,
1240            /// Adjacent edge and face info.
1241            #[serde(default, skip_serializing_if = "Option::is_none")]
1242            pub adjacent_info: Option<EdgeInfo>,
1243        }
1244
1245        /// The response from the 'SetGridReferencePlane'.
1246        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1247        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1248        pub struct SetGridReferencePlane {}
1249
1250        /// The response from the 'BooleanUnion'.
1251        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1252        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1253        pub struct BooleanUnion {
1254            /// If the operation produced just one solid, then its ID will be the
1255            /// ID of the modeling command request.
1256            /// But if any extra solids are produced, then their IDs will be included
1257            /// here.
1258            #[serde(default, skip_serializing_if = "Vec::is_empty")]
1259            pub extra_solid_ids: Vec<Uuid>,
1260            /// If the operation involved any intersecting solids.
1261            #[serde(default = "bool_true", skip_serializing_if = "super::is_true")]
1262            pub any_intersections: bool,
1263        }
1264
1265        /// The response from the 'BooleanIntersection'.
1266        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1267        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1268        pub struct BooleanIntersection {
1269            /// If the operation produced just one solid, then its ID will be the
1270            /// ID of the modeling command request.
1271            /// But if any extra solids are produced, then their IDs will be included
1272            /// here.
1273            #[serde(default, skip_serializing_if = "Vec::is_empty")]
1274            pub extra_solid_ids: Vec<Uuid>,
1275            /// If the operation involved any intersecting solids.
1276            #[serde(default = "bool_true", skip_serializing_if = "super::is_true")]
1277            pub any_intersections: bool,
1278        }
1279
1280        /// The response from the 'BooleanSubtract'.
1281        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1282        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1283        pub struct BooleanSubtract {
1284            /// If the operation produced just one solid, then its ID will be the
1285            /// ID of the modeling command request.
1286            /// But if any extra solids are produced, then their IDs will be included
1287            /// here.
1288            #[serde(default, skip_serializing_if = "Vec::is_empty")]
1289            pub extra_solid_ids: Vec<Uuid>,
1290            /// If the operation involved any intersecting solids.
1291            #[serde(default = "bool_true", skip_serializing_if = "super::is_true")]
1292            pub any_intersections: bool,
1293        }
1294
1295        /// The response from the 'BooleanImprint'.
1296        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1297        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1298        pub struct BooleanImprint {
1299            /// If the operation produced just one body, then its ID will be the
1300            /// ID of the modeling command request.
1301            /// But if any extra bodies are produced, then their IDs will be included
1302            /// here.
1303            #[serde(default, skip_serializing_if = "Vec::is_empty")]
1304            pub extra_solid_ids: Vec<Uuid>,
1305            /// If the operation involved any intersecting solids.
1306            #[serde(default = "bool_true", skip_serializing_if = "super::is_true")]
1307            pub any_intersections: bool,
1308        }
1309
1310        /// The response from the 'SetGridScale'.
1311        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1312        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1313        pub struct SetGridScale {}
1314
1315        /// The response from the 'SetGridScale'.
1316        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1317        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1318        pub struct SetGridAutoScale {}
1319
1320        /// The response from the 'SetOrderIndependentTransparency'.
1321        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1322        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1323        pub struct SetOrderIndependentTransparency {
1324            /// Is it now enabled, or disabled?
1325            pub enabled: bool,
1326        }
1327
1328        /// The response from the 'CreateRegion'.
1329        /// The region should have an ID taken from the ID of the
1330        /// 'CreateRegion' modeling command.
1331        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1332        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1333        pub struct CreateRegion {
1334            /// a mapping from the curves within this region to the source component segment curves they were split from
1335            pub region_mapping: HashMap<Uuid, Uuid>,
1336        }
1337
1338        /// The response from the 'CreateRegionFromQueryPoint'.
1339        /// The region should have an ID taken from the ID of the
1340        /// 'CreateRegionFromQueryPoint' modeling command.
1341        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1342        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1343        pub struct CreateRegionFromQueryPoint {
1344            /// a mapping from the curves within this region to the source component segment curves they were split from
1345            pub region_mapping: HashMap<Uuid, Uuid>,
1346        }
1347
1348        /// The response from 'RegionGetQueryPoint' modeling command.
1349        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1350        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1351        pub struct RegionGetQueryPoint {
1352            ///A point that is inside of the queried region, in the same coordinate frame as the sketch itself
1353            pub query_point: Point2d<LengthUnit>,
1354        }
1355
1356        /// The response from the 'SelectRegionFromPoint'.
1357        /// If there are multiple ways to construct this region, this chooses arbitrarily.
1358        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1359        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1360        pub struct SelectRegionFromPoint {
1361            /// The region the user clicked on.
1362            /// If they clicked an open space which isn't a region,
1363            /// this returns None.
1364            pub region: Option<crate::shared::SelectedRegion>,
1365        }
1366
1367        /// The response from the 'BoundingBox'.
1368        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1369        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1370        pub struct BoundingBox {
1371            /// Center of the box.
1372            pub center: Point3d<f64>,
1373            /// Dimensions of the box along each axis.
1374            pub dimensions: Point3d<f64>,
1375        }
1376
1377        /// The response from the 'OffsetSurface'.
1378        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1379        pub struct OffsetSurface {
1380        }
1381
1382        /// The response from the 'ClosestEdge'.
1383        #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, JsonSchema, ModelingCmdOutput)]
1384        #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1385        pub struct ClosestEdge {
1386            /// The ID of the edge closest to the point given in the request.
1387            /// If there are no edges in the scene, returns None.
1388            pub edge_id: Option<Uuid>,
1389        }
1390    }
1391}