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
10        use kittycad_modeling_cmds_macros::ModelingCmdOutput;
11        use schemars::JsonSchema;
12        use serde::{Deserialize, Serialize};
13        use uuid::Uuid;
14        use crate::shared::CameraSettings;
15
16        use crate::{self as kittycad_modeling_cmds};
17        use crate::{
18            base64::Base64Data,
19            id::ModelingCmdId,
20            length_unit::LengthUnit,
21            shared::{CurveType, EntityType, ExportFile, ExtrusionFaceCapType, PathCommand, Point2d, Point3d},
22            units,
23        };
24
25        /// The response of the `EngineUtilEvaluatePath` endpoint
26        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
27        pub struct EngineUtilEvaluatePath {
28            /// The evaluated path curve position
29            pub pos: Point3d<LengthUnit>,
30        }
31
32        /// The response from the `StartPath` endpoint.
33        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
34        pub struct StartPath {
35        }
36
37        /// The response from the `MovePathPen` endpoint.
38        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
39        pub struct MovePathPen {
40        }
41
42        /// The response from the `ExtendPath` endpoint.
43        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
44        pub struct ExtendPath {
45        }
46
47        /// The response from the `Extrude` endpoint.
48        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
49        pub struct Extrude {
50        }
51
52        /// The response from the `Sweep` endpoint.
53        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
54        pub struct Sweep {
55        }
56
57        /// The response from the `Revolve` endpoint.
58        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
59        pub struct Revolve {
60        }
61
62        /// The response from the `Solid3dShellFace` endpoint.
63        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
64        pub struct Solid3dShellFace {
65        }
66
67        /// The response from the `RevolveAboutEdge` endpoint.
68        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
69        pub struct RevolveAboutEdge {
70        }
71
72        /// The response from the `CameraDragStart` endpoint.
73        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
74        pub struct CameraDragStart {
75        }
76
77        /// The response from the `DefaultCameraLookAt` endpoint.
78        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
79        pub struct DefaultCameraLookAt {
80        }
81
82        /// The response from the `DefaultCameraPerspectiveSettings` endpoint.
83        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
84        pub struct DefaultCameraPerspectiveSettings {
85        }
86
87        /// The response from the `SelectAdd` endpoint.
88        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
89        pub struct SelectAdd {
90        }
91        /// The response from the `SelectRemove` endpoint.
92        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
93        pub struct SelectRemove {
94        }
95
96        /// The response from the `SceneClearAll` endpoint.
97        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
98        pub struct SceneClearAll {
99        }
100
101        /// The response from the `SelectReplace` endpoint.
102        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
103        pub struct SelectReplace {
104        }
105
106        /// The response from the `HighlightSetEntities` endpoint.
107        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
108        pub struct HighlightSetEntities {
109        }
110
111        /// The response from the `NewAnnotation` endpoint.
112        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
113        pub struct NewAnnotation {
114        }
115
116        /// The response from the `UpdateAnnotation` endpoint.
117        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
118        pub struct UpdateAnnotation {
119        }
120
121        /// The response from the `EdgeLinesVisible` endpoint.
122        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
123        pub struct EdgeLinesVisible {
124        }
125
126        /// The response from the `ObjectVisible` endpoint.
127        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
128        pub struct ObjectVisible {
129        }
130
131        /// The response from the `ObjectBringToFront` endpoint.
132        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
133        pub struct ObjectBringToFront {
134        }
135
136        /// The response from the `ObjectSetMaterialParamsPbr` endpoint.
137        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
138        pub struct ObjectSetMaterialParamsPbr {
139        }
140
141        /// The response from the `Solid2dAddHole` endpoint.
142        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
143        pub struct Solid2dAddHole {
144        }
145
146        /// The response from the `Solid3dFilletEdge` endpoint.
147        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
148        pub struct Solid3dFilletEdge {
149        }
150
151        /// The response from the `SendObject` endpoint.
152        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
153        pub struct SendObject {
154        }
155
156        /// The response from the `EntitySetOpacity` endpoint.
157        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
158        pub struct EntitySetOpacity {
159        }
160
161        /// The response from the `EntityFade` endpoint.
162        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
163        pub struct EntityFade {
164        }
165
166        /// The response from the `MakePlane` endpoint.
167        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
168        pub struct MakePlane {
169        }
170
171        /// The response from the `PlaneSetColor` endpoint.
172        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
173        pub struct PlaneSetColor {
174        }
175
176        /// The response from the `SetTool` endpoint.
177        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
178        pub struct SetTool {
179        }
180
181        /// The response from the `MouseMove` endpoint.
182        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
183        pub struct MouseMove {
184        }
185
186        /// The response from the `SketchModeDisable` endpoint.
187        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
188        pub struct SketchModeDisable {
189        }
190
191        /// The response from the `EnableDryRun` endpoint.
192        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
193        pub struct EnableDryRun {
194        }
195
196        /// The response from the `DisableDryRun` endpoint.
197        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
198        pub struct DisableDryRun {
199        }
200
201        /// The response from the `CurveSetConstraint` endpoint.
202        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
203        pub struct CurveSetConstraint {
204        }
205
206        /// The response from the `EnableSketchMode` endpoint.
207        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
208        pub struct EnableSketchMode {
209        }
210
211        /// The response from the `SetBackgroundColor` endpoint.
212        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
213        pub struct SetBackgroundColor {
214        }
215
216        /// The response from the `SetCurrentToolProperties` endpoint.
217        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
218        pub struct SetCurrentToolProperties {
219        }
220
221        /// The response from the `SetDefaultSystemProperties` endpoint.
222        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
223        pub struct SetDefaultSystemProperties {
224        }
225
226        /// The response from the `MakeAxesGizmo` endpoint.
227        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
228        pub struct MakeAxesGizmo {
229        }
230
231        /// The response from the `HandleMouseDragStart` endpoint.
232        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
233        pub struct HandleMouseDragStart {
234        }
235
236        /// The response from the `HandleMouseDragMove` endpoint.
237        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
238        pub struct HandleMouseDragMove {
239        }
240
241        /// The response from the `HandleMouseDragEnd` endpoint.
242        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
243        pub struct HandleMouseDragEnd {
244        }
245
246        /// The response from the `RemoveSceneObjects` endpoint.
247        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
248        pub struct RemoveSceneObjects {
249        }
250
251        /// The response from the `ReconfigureStream` endpoint.
252        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
253        pub struct ReconfigureStream {
254        }
255
256        /// The response from the `SetSceneUnits` endpoint.
257        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
258        pub struct SetSceneUnits {
259        }
260
261        /// The response from the `SetSelectionType` endpoint.
262        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
263        pub struct SetSelectionType {
264        }
265
266        /// The response from the `SetSelectionFilter` endpoint.
267        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
268        pub struct SetSelectionFilter {
269        }
270
271        /// The response from the `DefaultCameraSetOrthographic` endpoint.
272        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
273        pub struct DefaultCameraSetOrthographic {
274        }
275
276        /// The response from the `DefaultCameraSetPerspective` endpoint.
277        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
278        pub struct DefaultCameraSetPerspective {
279        }
280
281        /// The response from the `DefaultCameraCenterToSelection` endpoint.
282        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
283        pub struct DefaultCameraCenterToSelection {
284        }
285
286        /// The response from the `DefaultCameraCenterToScene` endpoint.
287        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
288        pub struct DefaultCameraCenterToScene {
289        }
290
291        /// The response from the `SelectClear` endpoint.
292        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
293        pub struct SelectClear {
294        }
295
296        /// The response from the `Export2d` endpoint.
297        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
298        pub struct Export2d {
299            /// The files that were exported.
300            pub files: Vec<ExportFile>,
301        }
302
303        /// The response from the `Export3d` endpoint.
304        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
305        pub struct Export3d {
306            /// The files that were exported.
307            pub files: Vec<ExportFile>,
308        }
309
310        /// The response from the `Export` endpoint.
311        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
312        pub struct Export {
313            /// The files that were exported.
314            pub files: Vec<ExportFile>,
315        }
316
317        /// The response from the `SelectWithPoint` command.
318        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
319        pub struct SelectWithPoint {
320            /// The UUID of the entity that was selected.
321            pub entity_id: Option<Uuid>,
322        }
323        /// The response from the `HighlightSetEntity` command.
324        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
325        pub struct HighlightSetEntity {
326            /// The UUID of the entity that was highlighted.
327            pub entity_id: Option<Uuid>,
328            /// If the client sent a sequence ID with its request, the backend sends it back.
329            pub sequence: Option<u32>,
330        }
331        /// The response from the `EntityGetChildUuid` command.
332        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
333        pub struct EntityGetChildUuid {
334            /// The UUID of the child entity.
335            pub entity_id: Uuid,
336        }
337        /// The response from the `EntityGetNumChildren` command.
338        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
339        pub struct EntityGetNumChildren {
340            /// The number of children the entity has.
341            pub num: u32,
342        }
343        /// The response from the `EntityGetParentId` command.
344        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
345        pub struct EntityGetParentId {
346            /// The UUID of the parent entity.
347            pub entity_id: Uuid,
348        }
349        /// The response from the `EntityGetAllChildUuids` command.
350        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
351        pub struct EntityGetAllChildUuids {
352            /// The UUIDs of the child entities.
353            pub entity_ids: Vec<Uuid>,
354        }
355
356        /// The response from the `EntityGetSketchPaths` command.
357        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
358        pub struct EntityGetSketchPaths {
359            /// The UUIDs of the sketch paths.
360            pub entity_ids: Vec<Uuid>,
361        }
362
363        /// The response from the `Loft` command.
364        #[derive(Debug, Serialize, Deserialize, JsonSchema, ModelingCmdOutput, Clone)]
365        pub struct Loft {
366            ///The UUID of the newly created solid loft.
367            pub solid_id: Uuid,
368        }
369
370        /// The response from the `ClosePath` command.
371        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
372        pub struct ClosePath {
373            /// The UUID of the lone face of the resulting solid2D.
374            pub face_id: Uuid,
375        }
376
377        /// The response from the `CameraDragMove` command.
378        /// Note this is an "unreliable" channel message, so this data may need more data like a "sequence"
379        //  to work properly
380        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
381        pub struct CameraDragMove {
382            /// Camera settings
383            pub settings: CameraSettings
384        }
385
386        /// The response from the `CameraDragEnd` command.
387        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
388        pub struct CameraDragEnd {
389            /// Camera settings
390            pub settings: CameraSettings
391        }
392
393        /// The response from the `DefaultCameraGetSettings` command.
394        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
395        pub struct DefaultCameraGetSettings {
396            /// Camera settings
397            pub settings: CameraSettings
398        }
399
400        /// The response from the `DefaultCameraZoom` command.
401        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
402        pub struct DefaultCameraZoom {
403            /// Camera settings
404            pub settings: CameraSettings
405        }
406
407        /// The response from the `ZoomToFit` command.
408        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
409        pub struct ZoomToFit {
410            /// Camera settings
411            pub settings: CameraSettings
412        }
413
414        /// The response from the `OrientToFace` command.
415        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
416        pub struct OrientToFace {
417            /// Camera settings
418            pub settings: CameraSettings
419        }
420
421        /// The response from the `ViewIsometric` command.
422        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
423        pub struct ViewIsometric {
424            /// Camera settings
425            pub settings: CameraSettings
426        }
427
428        /// The response from the `GetNumObjects` command.
429        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
430        pub struct GetNumObjects {
431            /// The number of objects in the scene.
432            pub num_objects: u32,
433        }
434
435        /// The response from the `MakeOffsetPath` command.
436        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
437        pub struct MakeOffsetPath {
438            /// If the offset path splits into multiple paths, this will contain the UUIDs of the
439            /// new paths.
440            /// If the offset path remains as a single path, this will be empty, and the resulting ID
441            /// of the (single) new path will be the ID of the `MakeOffsetPath` command.
442            pub entity_ids: Vec<Uuid>,
443        }
444
445        /// The response from the `SetObjectTransform` command.
446        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
447        pub struct SetObjectTransform {}
448
449        /// The response from the `AddHoleFromOffset` command.
450        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
451        pub struct AddHoleFromOffset {
452            /// If the offset path splits into multiple paths, this will contain the UUIDs of the
453            /// new paths.
454            /// If the offset path remains as a single path, this will be empty, and the resulting ID
455            /// of the (single) new path will be the ID of the `AddHoleFromOffset` command.
456            pub entity_ids: Vec<Uuid>,
457        }
458
459        /// The response from the `DefaultCameraFocusOn` command.
460        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
461        pub struct DefaultCameraFocusOn { }
462
463        /// The response from the `SelectGet` command.
464        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
465        pub struct SelectGet {
466            /// The UUIDs of the selected entities.
467            pub entity_ids: Vec<Uuid>,
468        }
469
470        /// The response from the `Solid3dGetAllEdgeFaces` command.
471        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
472        pub struct Solid3dGetAllEdgeFaces {
473            /// The UUIDs of the faces.
474            pub faces: Vec<Uuid>,
475        }
476
477        /// The response from the `Solid3dGetAllOppositeEdges` command.
478        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
479        pub struct Solid3dGetAllOppositeEdges {
480            /// The UUIDs of the edges.
481            pub edges: Vec<Uuid>,
482        }
483
484        /// The response from the `Solid3dGetOppositeEdge` command.
485        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
486        pub struct Solid3dGetOppositeEdge {
487            /// The UUID of the edge.
488            pub edge: Uuid,
489        }
490
491        /// The response from the `Solid3dGetNextAdjacentEdge` command.
492        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
493        pub struct Solid3dGetNextAdjacentEdge {
494            /// The UUID of the edge.
495            pub edge: Option<Uuid>,
496        }
497
498        /// The response from the `Solid3dGetPrevAdjacentEdge` command.
499        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
500        pub struct Solid3dGetPrevAdjacentEdge {
501            /// The UUID of the edge.
502            pub edge: Option<Uuid>,
503        }
504
505        /// The response from the `Solid3DGetCommonEdge` command.
506        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
507        pub struct Solid3dGetCommonEdge {
508            /// The UUID of the common edge, if any.
509            pub edge: Option<Uuid>,
510        }
511
512        /// The response from the `GetEntityType` command.
513        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
514        pub struct GetEntityType {
515            /// The type of the entity.
516            pub entity_type: EntityType,
517        }
518        /// The response from the `CurveGetControlPoints` command.
519        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
520        pub struct CurveGetControlPoints {
521            /// Control points in the curve.
522            pub control_points: Vec<Point3d<f64>>,
523        }
524
525        /// The response from the `ProjectEntityToPlane` command.
526        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
527        pub struct ProjectEntityToPlane {
528            /// Projected points.
529            pub projected_points: Vec<Point3d<f64>>,
530        }
531
532        /// The response from the `ProjectPointsToPlane` command.
533        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
534        pub struct ProjectPointsToPlane {
535            /// Projected points.
536            pub projected_points: Vec<Point3d<f64>>,
537        }
538
539        /// The response from the `CurveGetType` command.
540        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, Eq, PartialEq, ModelingCmdOutput)]
541        pub struct CurveGetType {
542            /// Curve type
543            pub curve_type: CurveType,
544        }
545
546        /// The response from the `MouseClick` command.
547        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
548        pub struct MouseClick {
549            /// Entities that are modified.
550            pub entities_modified: Vec<Uuid>,
551            /// Entities that are selected.
552            pub entities_selected: Vec<Uuid>,
553        }
554
555        /// The response from the `TakeSnapshot` command.
556        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
557        pub struct TakeSnapshot {
558            /// Contents of the image.
559            pub contents: Base64Data,
560        }
561
562        /// The response from the `PathGetInfo` command.
563        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
564        pub struct PathGetInfo {
565            /// All segments in the path, in the order they were added.
566            pub segments: Vec<PathSegmentInfo>,
567        }
568
569        /// Info about a path segment
570        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
571        pub struct PathSegmentInfo {
572            /// Which command created this path?
573            /// This field is absent if the path command is not actually creating a path segment,
574            /// e.g. moving the pen doesn't create a path segment.
575            pub command_id: Option<ModelingCmdId>,
576            /// What is the path segment?
577            pub command: PathCommand,
578            ///Whether or not this segment is a relative offset
579            pub relative: bool,
580        }
581
582        /// The response from the `PathGetCurveUuidsForVertices` command.
583        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
584        pub struct PathGetCurveUuidsForVertices {
585            /// The UUIDs of the curve entities.
586            pub curve_ids: Vec<Uuid>,
587        }
588
589        /// The response from the `PathGetCurveUuid` command.
590        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
591        pub struct PathGetCurveUuid {
592            /// The UUID of the curve entity.
593            pub curve_id: Uuid,
594        }
595
596        /// The response from the `PathGetVertexUuids` command.
597        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
598        pub struct PathGetVertexUuids {
599            /// The UUIDs of the vertex entities.
600            pub vertex_ids: Vec<Uuid>,
601        }
602
603        /// The response from the `PathGetSketchTargetUuid` command.
604        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
605        pub struct PathGetSketchTargetUuid {
606            /// The UUID of the sketch target.
607            pub target_id: Option<Uuid>,
608        }
609
610        /// Endpoints of a curve
611        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
612        pub struct CurveGetEndPoints {
613            /// Start
614            pub start: Point3d<LengthUnit>,
615            /// End
616            pub end: Point3d<LengthUnit>,
617        }
618
619        /// Surface-local planar axes (if available)
620        #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, ModelingCmdOutput)]
621        pub struct FaceIsPlanar {
622            /// plane's origin
623            pub origin: Option<Point3d<LengthUnit>>,
624
625            /// plane's local x-axis
626            pub x_axis: Option<Point3d<f64>>,
627
628            /// plane's local y-axis
629            pub y_axis: Option<Point3d<f64>>,
630
631            /// plane's local z-axis (normal)
632            pub z_axis: Option<Point3d<f64>>,
633        }
634
635        /// The 3D position on the surface that was evaluated
636        #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, ModelingCmdOutput)]
637        pub struct FaceGetPosition {
638            /// The 3D position on the surface that was evaluated
639            pub pos: Point3d<LengthUnit>,
640        }
641
642        /// The 3D center of mass on the surface
643        #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, ModelingCmdOutput)]
644        pub struct FaceGetCenter {
645            /// The 3D position on the surface center of mass
646            pub pos: Point3d<LengthUnit>,
647        }
648
649        /// The gradient (dFdu, dFdv) + normal vector on a brep face
650        #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, ModelingCmdOutput)]
651        pub struct FaceGetGradient {
652            /// dFdu
653            pub df_du: Point3d<f64>,
654
655            /// dFdv
656            pub df_dv: Point3d<f64>,
657
658            /// Normal (||dFdu x dFdv||)
659            pub normal: Point3d<f64>,
660        }
661
662        /// Corresponding coordinates of given window coordinates, intersected on given plane.
663        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
664        pub struct PlaneIntersectAndProject {
665            /// Corresponding coordinates of given window coordinates, intersected on given plane.
666            pub plane_coordinates: Option<Point2d<LengthUnit>>,
667        }
668
669        /// Data from importing the files
670        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
671        pub struct ImportFiles {
672            /// ID of the imported 3D models within the scene.
673            pub object_id: Uuid,
674        }
675
676        /// Data from importing the files
677        #[derive(Debug, Eq, PartialEq, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
678        pub struct ImportedGeometry {
679            /// ID of the imported 3D models within the scene.
680            pub id: Uuid,
681            /// The original file paths that held the geometry.
682            pub value: Vec<String>,
683        }
684
685        /// The mass response.
686        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
687        #[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
688        pub struct Mass {
689            /// The mass.
690            pub mass: f64,
691            /// The output unit for the mass.
692            pub output_unit: units::UnitMass,
693        }
694
695        /// The volume response.
696        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
697        #[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
698        pub struct Volume {
699            /// The volume.
700            pub volume: f64,
701            /// The output unit for the volume.
702            pub output_unit: units::UnitVolume,
703        }
704
705        /// The density response.
706        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
707        #[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
708        pub struct Density {
709            /// The density.
710            pub density: f64,
711            /// The output unit for the density.
712            pub output_unit: units::UnitDensity,
713        }
714
715        /// The surface area response.
716        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
717        #[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
718        pub struct SurfaceArea {
719            /// The surface area.
720            pub surface_area: f64,
721            /// The output unit for the surface area.
722            pub output_unit: units::UnitArea,
723        }
724
725        /// The center of mass response.
726        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
727        #[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
728        pub struct CenterOfMass {
729            /// The center of mass.
730            pub center_of_mass: Point3d<f64>,
731            /// The output unit for the center of mass.
732            pub output_unit: units::UnitLength,
733        }
734
735        /// The plane for sketch mode.
736        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
737        pub struct GetSketchModePlane {
738            /// The origin.
739            pub origin: Point3d<LengthUnit>,
740            /// The x axis.
741            pub x_axis: Point3d<f64>,
742            /// The y axis.
743            pub y_axis: Point3d<f64>,
744            /// The z axis (normal).
745            pub z_axis: Point3d<f64>,
746        }
747
748        /// The response from the `EntitiesGetDistance` command.
749        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
750        pub struct EntityGetDistance {
751            /// The minimum distance between the input entities.
752            pub min_distance: LengthUnit,
753            /// The maximum distance between the input entities.
754            pub max_distance: LengthUnit,
755        }
756
757        /// The response from the `EntityClone` command.
758        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
759        pub struct EntityClone {
760        }
761
762        /// The response from the `EntityLinearPatternTransform` command.
763        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
764        pub struct EntityLinearPatternTransform {
765            /// The UUIDs of the entities that were created.
766            pub entity_ids: Vec<Uuid>,
767        }
768
769        /// The response from the `EntityLinearPattern` command.
770        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
771        pub struct EntityLinearPattern {
772            /// The UUIDs of the entities that were created.
773            pub entity_ids: Vec<Uuid>,
774        }
775
776        /// The response from the `EntityCircularPattern` command.
777        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
778        pub struct EntityCircularPattern {
779            /// The UUIDs of the entities that were created.
780            pub entity_ids: Vec<Uuid>,
781        }
782
783        /// The response from the `EntityMirror` endpoint.
784        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
785        pub struct EntityMirror {
786            /// The UUIDs of the entities that were created.
787            pub entity_ids: Vec<Uuid>
788        }
789
790        /// The response from the `EntityMirrorAcrossEdge` endpoint.
791        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
792        pub struct EntityMirrorAcrossEdge {
793            /// The UUIDs of the entities that were created.
794            pub entity_ids: Vec<Uuid>
795        }
796
797        /// The response from the `EntityMakeHelix` endpoint.
798        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
799        pub struct EntityMakeHelix {
800        }
801
802        /// The response from the `EntityMakeHelixFromParams` endpoint.
803        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
804        pub struct EntityMakeHelixFromParams {
805        }
806
807        /// The response from the `EntityMakeHelixFromEdge` endpoint.
808        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
809        pub struct EntityMakeHelixFromEdge {
810        }
811
812        /// Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)
813        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
814        pub struct Solid3dGetExtrusionFaceInfo {
815            /// Details of each face.
816            pub faces: Vec<ExtrusionFaceInfo>,
817        }
818
819        /// Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)
820        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
821        pub struct ExtrusionFaceInfo {
822            /// Path component (curve) UUID.
823            pub curve_id: Option<Uuid>,
824
825            /// Face uuid.
826            pub face_id: Option<Uuid>,
827
828            /// Whether or not this extrusion face is a top/bottom cap face or not.
829            /// Note that top/bottom cap faces will not have associated curve IDs.
830            pub cap: ExtrusionFaceCapType,
831        }
832
833    }
834}