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