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        /// Alias for backward compatibility.
297        #[deprecated(since = "0.2.96", note = "use `Export3d` instead")]
298        pub type Export = Export3d;
299
300        /// The response from the `Export2d` endpoint.
301        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
302        pub struct Export2d {
303            /// The files that were exported.
304            pub files: Vec<ExportFile>,
305        }
306
307        /// The response from the `Export3d` endpoint.
308        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
309        pub struct Export3d {
310            /// The files that were exported.
311            pub files: Vec<ExportFile>,
312        }
313
314        /// The response from the `SelectWithPoint` command.
315        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
316        pub struct SelectWithPoint {
317            /// The UUID of the entity that was selected.
318            pub entity_id: Option<Uuid>,
319        }
320        /// The response from the `HighlightSetEntity` command.
321        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
322        pub struct HighlightSetEntity {
323            /// The UUID of the entity that was highlighted.
324            pub entity_id: Option<Uuid>,
325            /// If the client sent a sequence ID with its request, the backend sends it back.
326            pub sequence: Option<u32>,
327        }
328        /// The response from the `EntityGetChildUuid` command.
329        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
330        pub struct EntityGetChildUuid {
331            /// The UUID of the child entity.
332            pub entity_id: Uuid,
333        }
334        /// The response from the `EntityGetNumChildren` command.
335        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
336        pub struct EntityGetNumChildren {
337            /// The number of children the entity has.
338            pub num: u32,
339        }
340        /// The response from the `EntityGetParentId` command.
341        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
342        pub struct EntityGetParentId {
343            /// The UUID of the parent entity.
344            pub entity_id: Uuid,
345        }
346        /// The response from the `EntityGetAllChildUuids` command.
347        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
348        pub struct EntityGetAllChildUuids {
349            /// The UUIDs of the child entities.
350            pub entity_ids: Vec<Uuid>,
351        }
352
353        /// The response from the `EntityGetSketchPaths` command.
354        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
355        pub struct EntityGetSketchPaths {
356            /// The UUIDs of the sketch paths.
357            pub entity_ids: Vec<Uuid>,
358        }
359
360        /// The response from the `Loft` command.
361        #[derive(Debug, Serialize, Deserialize, JsonSchema, ModelingCmdOutput, Clone)]
362        pub struct Loft {
363            ///The UUID of the newly created solid loft.
364            pub solid_id: Uuid,
365        }
366
367        /// The response from the `ClosePath` command.
368        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
369        pub struct ClosePath {
370            /// The UUID of the lone face of the resulting solid2D.
371            pub face_id: Uuid,
372        }
373
374        /// The response from the `CameraDragMove` command.
375        /// Note this is an "unreliable" channel message, so this data may need more data like a "sequence"
376        //  to work properly
377        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
378        pub struct CameraDragMove {
379            /// Camera settings
380            pub settings: CameraSettings
381        }
382
383        /// The response from the `CameraDragEnd` command.
384        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
385        pub struct CameraDragEnd {
386            /// Camera settings
387            pub settings: CameraSettings
388        }
389
390        /// The response from the `DefaultCameraGetSettings` command.
391        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
392        pub struct DefaultCameraGetSettings {
393            /// Camera settings
394            pub settings: CameraSettings
395        }
396
397        /// The response from the `DefaultCameraZoom` command.
398        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
399        pub struct DefaultCameraZoom {
400            /// Camera settings
401            pub settings: CameraSettings
402        }
403
404        /// The response from the `ZoomToFit` command.
405        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
406        pub struct ZoomToFit {
407            /// Camera settings
408            pub settings: CameraSettings
409        }
410
411        /// The response from the `OrientToFace` command.
412        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
413        pub struct OrientToFace {
414            /// Camera settings
415            pub settings: CameraSettings
416        }
417
418        /// The response from the `ViewIsometric` command.
419        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
420        pub struct ViewIsometric {
421            /// Camera settings
422            pub settings: CameraSettings
423        }
424
425        /// The response from the `GetNumObjects` command.
426        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
427        pub struct GetNumObjects {
428            /// The number of objects in the scene.
429            pub num_objects: u32,
430        }
431
432        /// The response from the `MakeOffsetPath` command.
433        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
434        pub struct MakeOffsetPath {
435            /// If the offset path splits into multiple paths, this will contain the UUIDs of the
436            /// new paths.
437            /// If the offset path remains as a single path, this will be empty, and the resulting ID
438            /// of the (single) new path will be the ID of the `MakeOffsetPath` command.
439            pub entity_ids: Vec<Uuid>,
440        }
441
442        /// The response from the `SetObjectTransform` command.
443        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
444        pub struct SetObjectTransform {}
445
446        /// The response from the `AddHoleFromOffset` command.
447        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
448        pub struct AddHoleFromOffset {
449            /// If the offset path splits into multiple paths, this will contain the UUIDs of the
450            /// new paths.
451            /// If the offset path remains as a single path, this will be empty, and the resulting ID
452            /// of the (single) new path will be the ID of the `AddHoleFromOffset` command.
453            pub entity_ids: Vec<Uuid>,
454        }
455
456        /// The response from the `DefaultCameraFocusOn` command.
457        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
458        pub struct DefaultCameraFocusOn { }
459
460        /// The response from the `SelectGet` command.
461        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
462        pub struct SelectGet {
463            /// The UUIDs of the selected entities.
464            pub entity_ids: Vec<Uuid>,
465        }
466
467        /// The response from the `Solid3dGetAllEdgeFaces` command.
468        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
469        pub struct Solid3dGetAllEdgeFaces {
470            /// The UUIDs of the faces.
471            pub faces: Vec<Uuid>,
472        }
473
474        /// The response from the `Solid3dGetAllOppositeEdges` command.
475        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
476        pub struct Solid3dGetAllOppositeEdges {
477            /// The UUIDs of the edges.
478            pub edges: Vec<Uuid>,
479        }
480
481        /// The response from the `Solid3dGetOppositeEdge` command.
482        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
483        pub struct Solid3dGetOppositeEdge {
484            /// The UUID of the edge.
485            pub edge: Uuid,
486        }
487
488        /// The response from the `Solid3dGetNextAdjacentEdge` command.
489        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
490        pub struct Solid3dGetNextAdjacentEdge {
491            /// The UUID of the edge.
492            pub edge: Option<Uuid>,
493        }
494
495        /// The response from the `Solid3dGetPrevAdjacentEdge` command.
496        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
497        pub struct Solid3dGetPrevAdjacentEdge {
498            /// The UUID of the edge.
499            pub edge: Option<Uuid>,
500        }
501
502        /// The response from the `Solid3DGetCommonEdge` command.
503        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
504        pub struct Solid3dGetCommonEdge {
505            /// The UUID of the common edge, if any.
506            pub edge: Option<Uuid>,
507        }
508
509        /// The response from the `GetEntityType` command.
510        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
511        pub struct GetEntityType {
512            /// The type of the entity.
513            pub entity_type: EntityType,
514        }
515        /// The response from the `CurveGetControlPoints` command.
516        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
517        pub struct CurveGetControlPoints {
518            /// Control points in the curve.
519            pub control_points: Vec<Point3d<f64>>,
520        }
521
522        /// The response from the `ProjectEntityToPlane` command.
523        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
524        pub struct ProjectEntityToPlane {
525            /// Projected points.
526            pub projected_points: Vec<Point3d<f64>>,
527        }
528
529        /// The response from the `ProjectPointsToPlane` command.
530        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
531        pub struct ProjectPointsToPlane {
532            /// Projected points.
533            pub projected_points: Vec<Point3d<f64>>,
534        }
535
536        /// The response from the `CurveGetType` command.
537        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, Eq, PartialEq, ModelingCmdOutput)]
538        pub struct CurveGetType {
539            /// Curve type
540            pub curve_type: CurveType,
541        }
542
543        /// The response from the `MouseClick` command.
544        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
545        pub struct MouseClick {
546            /// Entities that are modified.
547            pub entities_modified: Vec<Uuid>,
548            /// Entities that are selected.
549            pub entities_selected: Vec<Uuid>,
550        }
551
552        /// The response from the `TakeSnapshot` command.
553        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
554        pub struct TakeSnapshot {
555            /// Contents of the image.
556            pub contents: Base64Data,
557        }
558
559        /// The response from the `PathGetInfo` command.
560        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
561        pub struct PathGetInfo {
562            /// All segments in the path, in the order they were added.
563            pub segments: Vec<PathSegmentInfo>,
564        }
565
566        /// Info about a path segment
567        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
568        pub struct PathSegmentInfo {
569            /// Which command created this path?
570            /// This field is absent if the path command is not actually creating a path segment,
571            /// e.g. moving the pen doesn't create a path segment.
572            pub command_id: Option<ModelingCmdId>,
573            /// What is the path segment?
574            pub command: PathCommand,
575            ///Whether or not this segment is a relative offset
576            pub relative: bool,
577        }
578
579        /// The response from the `PathGetCurveUuidsForVertices` command.
580        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
581        pub struct PathGetCurveUuidsForVertices {
582            /// The UUIDs of the curve entities.
583            pub curve_ids: Vec<Uuid>,
584        }
585
586        /// The response from the `PathGetCurveUuid` command.
587        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
588        pub struct PathGetCurveUuid {
589            /// The UUID of the curve entity.
590            pub curve_id: Uuid,
591        }
592
593        /// The response from the `PathGetVertexUuids` command.
594        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
595        pub struct PathGetVertexUuids {
596            /// The UUIDs of the vertex entities.
597            pub vertex_ids: Vec<Uuid>,
598        }
599
600        /// The response from the `PathGetSketchTargetUuid` command.
601        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
602        pub struct PathGetSketchTargetUuid {
603            /// The UUID of the sketch target.
604            pub target_id: Option<Uuid>,
605        }
606
607        /// Endpoints of a curve
608        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
609        pub struct CurveGetEndPoints {
610            /// Start
611            pub start: Point3d<LengthUnit>,
612            /// End
613            pub end: Point3d<LengthUnit>,
614        }
615
616        /// Surface-local planar axes (if available)
617        #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, ModelingCmdOutput)]
618        pub struct FaceIsPlanar {
619            /// plane's origin
620            pub origin: Option<Point3d<LengthUnit>>,
621
622            /// plane's local x-axis
623            pub x_axis: Option<Point3d<f64>>,
624
625            /// plane's local y-axis
626            pub y_axis: Option<Point3d<f64>>,
627
628            /// plane's local z-axis (normal)
629            pub z_axis: Option<Point3d<f64>>,
630        }
631
632        /// The 3D position on the surface that was evaluated
633        #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, ModelingCmdOutput)]
634        pub struct FaceGetPosition {
635            /// The 3D position on the surface that was evaluated
636            pub pos: Point3d<LengthUnit>,
637        }
638
639        /// The 3D center of mass on the surface
640        #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, ModelingCmdOutput)]
641        pub struct FaceGetCenter {
642            /// The 3D position on the surface center of mass
643            pub pos: Point3d<LengthUnit>,
644        }
645
646        /// The gradient (dFdu, dFdv) + normal vector on a brep face
647        #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, ModelingCmdOutput)]
648        pub struct FaceGetGradient {
649            /// dFdu
650            pub df_du: Point3d<f64>,
651
652            /// dFdv
653            pub df_dv: Point3d<f64>,
654
655            /// Normal (||dFdu x dFdv||)
656            pub normal: Point3d<f64>,
657        }
658
659        /// Corresponding coordinates of given window coordinates, intersected on given plane.
660        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
661        pub struct PlaneIntersectAndProject {
662            /// Corresponding coordinates of given window coordinates, intersected on given plane.
663            pub plane_coordinates: Option<Point2d<LengthUnit>>,
664        }
665
666        /// Data from importing the files
667        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
668        pub struct ImportFiles {
669            /// ID of the imported 3D models within the scene.
670            pub object_id: Uuid,
671        }
672
673        /// Data from importing the files
674        #[derive(Debug, Eq, PartialEq, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
675        pub struct ImportedGeometry {
676            /// ID of the imported 3D models within the scene.
677            pub id: Uuid,
678            /// The original file paths that held the geometry.
679            pub value: Vec<String>,
680        }
681
682        /// The mass response.
683        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
684        #[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
685        pub struct Mass {
686            /// The mass.
687            pub mass: f64,
688            /// The output unit for the mass.
689            pub output_unit: units::UnitMass,
690        }
691
692        /// The volume response.
693        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
694        #[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
695        pub struct Volume {
696            /// The volume.
697            pub volume: f64,
698            /// The output unit for the volume.
699            pub output_unit: units::UnitVolume,
700        }
701
702        /// The density response.
703        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
704        #[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
705        pub struct Density {
706            /// The density.
707            pub density: f64,
708            /// The output unit for the density.
709            pub output_unit: units::UnitDensity,
710        }
711
712        /// The surface area response.
713        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
714        #[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
715        pub struct SurfaceArea {
716            /// The surface area.
717            pub surface_area: f64,
718            /// The output unit for the surface area.
719            pub output_unit: units::UnitArea,
720        }
721
722        /// The center of mass response.
723        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
724        #[cfg_attr(feature = "tabled", derive(tabled::Tabled))]
725        pub struct CenterOfMass {
726            /// The center of mass.
727            pub center_of_mass: Point3d<f64>,
728            /// The output unit for the center of mass.
729            pub output_unit: units::UnitLength,
730        }
731
732        /// The plane for sketch mode.
733        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
734        pub struct GetSketchModePlane {
735            /// The origin.
736            pub origin: Point3d<LengthUnit>,
737            /// The x axis.
738            pub x_axis: Point3d<f64>,
739            /// The y axis.
740            pub y_axis: Point3d<f64>,
741            /// The z axis (normal).
742            pub z_axis: Point3d<f64>,
743        }
744
745        /// The response from the `EntitiesGetDistance` command.
746        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
747        pub struct EntityGetDistance {
748            /// The minimum distance between the input entities.
749            pub min_distance: LengthUnit,
750            /// The maximum distance between the input entities.
751            pub max_distance: LengthUnit,
752        }
753
754        /// The response from the `EntityClone` command.
755        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
756        pub struct EntityClone {
757        }
758
759        /// The response from the `EntityLinearPatternTransform` command.
760        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
761        pub struct EntityLinearPatternTransform {
762            /// The UUIDs of the entities that were created.
763            pub entity_ids: Vec<Uuid>,
764        }
765
766        /// The response from the `EntityLinearPattern` command.
767        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
768        pub struct EntityLinearPattern {
769            /// The UUIDs of the entities that were created.
770            pub entity_ids: Vec<Uuid>,
771        }
772
773        /// The response from the `EntityCircularPattern` command.
774        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
775        pub struct EntityCircularPattern {
776            /// The UUIDs of the entities that were created.
777            pub entity_ids: Vec<Uuid>,
778        }
779
780        /// The response from the `EntityMirror` endpoint.
781        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
782        pub struct EntityMirror {
783            /// The UUIDs of the entities that were created.
784            pub entity_ids: Vec<Uuid>
785        }
786
787        /// The response from the `EntityMirrorAcrossEdge` endpoint.
788        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
789        pub struct EntityMirrorAcrossEdge {
790            /// The UUIDs of the entities that were created.
791            pub entity_ids: Vec<Uuid>
792        }
793
794        /// The response from the `EntityMakeHelix` endpoint.
795        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
796        pub struct EntityMakeHelix {
797        }
798
799        /// The response from the `EntityMakeHelixFromParams` endpoint.
800        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
801        pub struct EntityMakeHelixFromParams {
802        }
803
804        /// The response from the `EntityMakeHelixFromEdge` endpoint.
805        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
806        pub struct EntityMakeHelixFromEdge {
807        }
808
809        /// Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)
810        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
811        pub struct Solid3dGetExtrusionFaceInfo {
812            /// Details of each face.
813            pub faces: Vec<ExtrusionFaceInfo>,
814        }
815
816        /// Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)
817        #[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
818        pub struct ExtrusionFaceInfo {
819            /// Path component (curve) UUID.
820            pub curve_id: Option<Uuid>,
821
822            /// Face uuid.
823            pub face_id: Option<Uuid>,
824
825            /// Whether or not this extrusion face is a top/bottom cap face or not.
826            /// Note that top/bottom cap faces will not have associated curve IDs.
827            pub cap: ExtrusionFaceCapType,
828        }
829
830    }
831}