kittycad_modeling_cmds/
ok_response.rs

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