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