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