-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdef_enum.rs
More file actions
1865 lines (1717 loc) · 88 KB
/
Copy pathdef_enum.rs
File metadata and controls
1865 lines (1717 loc) · 88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
use kittycad_modeling_cmds_macros::define_modeling_cmd_enum;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
pub use self::each_cmd::*;
use crate::{self as kittycad_modeling_cmds};
define_modeling_cmd_enum! {
pub mod each_cmd {
use std::collections::HashSet;
use crate::{self as kittycad_modeling_cmds};
use kittycad_modeling_cmds_macros::{ModelingCmdVariant};
use parse_display_derive::{Display, FromStr};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use uuid::Uuid;
use crate::shared::CameraViewState;
use crate::{
format::{OutputFormat2d, OutputFormat3d},
id::ModelingCmdId,
length_unit::LengthUnit,
shared::{
Angle,
ComponentTransform,
RelativeTo,
CutType, CutTypeV2,
CutStrategy,
CameraMovement,
ExtrudedFaceInfo, ExtrudeMethod,
AnnotationOptions, AnnotationType, CameraDragInteractionType, Color, DistanceType, EntityType,
PathComponentConstraintBound, PathComponentConstraintType, PathSegment, PerspectiveCameraParameters,
Point2d, Point3d, ExtrudeReference, SceneSelectionType, SceneToolType, Opposite,
},
units,
};
/// Mike says this usually looks nice.
fn default_animation_seconds() -> f64 {
0.4
}
/// Default empty uuid vector.
fn default_uuid_vector() -> Vec<Uuid> {
Vec::new()
}
/// Evaluates the position of a path in one shot (engine utility for kcl executor)
#[derive(
Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant,
)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EngineUtilEvaluatePath {
/// The path in json form (the serialized result of the kcl Sketch/Path object
pub path_json: String,
/// The evaluation parameter (path curve parameter in the normalized domain [0, 1])
pub t: f64,
}
/// Start a new path.
#[derive(
Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant,
)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct StartPath {}
/// Move the path's "pen".
/// If you're in sketch mode, these coordinates are in the local coordinate system,
/// not the world's coordinate system.
/// For example, say you're sketching on the plane {x: (1,0,0), y: (0,1,0), origin: (0, 0, 50)}.
/// In other words, the plane 50 units above the default XY plane. Then, moving the pen
/// to (1, 1, 0) with this command uses local coordinates. So, it would move the pen to
/// (1, 1, 50) in global coordinates.
#[derive(
Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant,
)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct MovePathPen {
/// The ID of the command which created the path.
pub path: ModelingCmdId,
/// Where the path's pen should be.
pub to: Point3d<LengthUnit>,
}
/// Extend a path by adding a new segment which starts at the path's "pen".
/// If no "pen" location has been set before (via `MovePen`), then the pen is at the origin.
#[derive(
Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant,
)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct ExtendPath {
/// The ID of the command which created the path.
pub path: ModelingCmdId,
/// Segment to append to the path.
/// This segment will implicitly begin at the current "pen" location.
pub segment: PathSegment,
/// Optional label to associate with the new path segment.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
}
/// Command for extruding a solid 2d.
#[derive(
Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant,
)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Extrude {
/// Which sketch to extrude.
/// Must be a closed 2D solid.
pub target: ModelingCmdId,
/// How far off the plane to extrude
pub distance: LengthUnit,
/// Which IDs should the new faces have?
/// If this isn't given, the engine will generate IDs.
#[serde(default)]
pub faces: Option<ExtrudedFaceInfo>,
/// Should the extrusion also extrude in the opposite direction?
/// If so, this specifies its distance.
#[serde(default)]
pub opposite: Opposite<LengthUnit>,
/// Should the extrusion create a new object or be part of the existing object.
#[serde(default)]
pub extrude_method: ExtrudeMethod,
}
/// Command for extruding a solid 2d to a reference geometry.
#[derive(
Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant,
)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct ExtrudeToReference {
/// Which sketch to extrude.
/// Must be a closed 2D solid.
pub target: ModelingCmdId,
/// Reference to extrude to.
/// Extrusion occurs along the target's normal until it is as close to the reference as possible.
pub reference: ExtrudeReference,
/// Which IDs should the new faces have?
/// If this isn't given, the engine will generate IDs.
#[serde(default)]
pub faces: Option<ExtrudedFaceInfo>,
/// Should the extrusion create a new object or be part of the existing object.
#[serde(default)]
pub extrude_method: ExtrudeMethod,
}
fn default_twist_extrude_section_interval() -> Angle {
Angle::from_degrees(15.0)
}
/// Command for twist extruding a solid 2d.
#[derive(
Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant,
)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct TwistExtrude {
/// Which sketch to extrude.
/// Must be a closed 2D solid.
pub target: ModelingCmdId,
/// How far off the plane to extrude
pub distance: LengthUnit,
/// Which IDs should the new faces have?
/// If this isn't given, the engine will generate IDs.
#[serde(default)]
pub faces: Option<ExtrudedFaceInfo>,
/// Center to twist about (relative to 2D sketch)
#[serde(default)]
pub center_2d: Point2d<f64>,
/// Total rotation of the section
pub total_rotation_angle: Angle,
///Angle step interval (converted to whole number degrees and bounded between 4° and 90°)
#[serde(default = "default_twist_extrude_section_interval")]
pub angle_step_size: Angle,
///The twisted surface loft tolerance
pub tolerance: LengthUnit,
}
/// Extrude the object along a path.
#[derive(
Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Sweep {
/// Which sketch to sweep.
/// Must be a closed 2D solid.
pub target: ModelingCmdId,
/// Path along which to sweep.
pub trajectory: ModelingCmdId,
/// If true, the sweep will be broken up into sub-sweeps (extrusions, revolves, sweeps) based on the trajectory path components.
pub sectional: bool,
/// The maximum acceptable surface gap computed between the revolution surface joints. Must be positive (i.e. greater than zero).
pub tolerance: LengthUnit,
/// What is this sweep relative to?
#[serde(default)]
pub relative_to: RelativeTo,
}
/// Command for revolving a solid 2d.
#[derive(
Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant,
)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Revolve {
/// Which sketch to revolve.
/// Must be a closed 2D solid.
pub target: ModelingCmdId,
/// The origin of the extrusion axis
pub origin: Point3d<LengthUnit>,
/// The axis of the extrusion (taken from the origin)
pub axis: Point3d<f64>,
/// If true, the axis is interpreted within the 2D space of the solid 2D's plane
pub axis_is_2d: bool,
/// The signed angle of revolution (in degrees, must be <= 360 in either direction)
pub angle: Angle,
/// The maximum acceptable surface gap computed between the revolution surface joints. Must be positive (i.e. greater than zero).
pub tolerance: LengthUnit,
/// Should the revolution also revolve in the opposite direction along the given axis?
/// If so, this specifies its angle.
#[serde(default)]
pub opposite: Opposite<Angle>,
}
/// Command for shelling a solid3d face
#[derive(
Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant,
)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Solid3dShellFace {
/// Which Solid3D is being shelled.
pub object_id: Uuid,
/// Which faces to remove, leaving only the shell.
pub face_ids: Vec<Uuid>,
/// How thick the shell should be.
/// Smaller values mean a thinner shell.
pub shell_thickness: LengthUnit,
/// If true, the Solid3D is made hollow instead of removing the selected faces
#[serde(default)]
pub hollow: bool,
}
/// Command for revolving a solid 2d about a brep edge
#[derive(
Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant,
)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct RevolveAboutEdge {
/// Which sketch to revolve.
/// Must be a closed 2D solid.
pub target: ModelingCmdId,
/// The edge to use as the axis of revolution, must be linear and lie in the plane of the solid
pub edge_id: Uuid,
/// The signed angle of revolution (in degrees, must be <= 360 in either direction)
pub angle: Angle,
/// The maximum acceptable surface gap computed between the revolution surface joints. Must be positive (i.e. greater than zero).
pub tolerance: LengthUnit,
/// Should the revolution also revolve in the opposite direction along the given axis?
/// If so, this specifies its angle.
#[serde(default)]
pub opposite: Opposite<Angle>,
}
/// Command for lofting sections to create a solid
#[derive(
Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant
)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Loft {
/// The closed section curves to create a lofted solid from.
/// Currently, these must be Solid2Ds
pub section_ids: Vec<Uuid>,
/// Degree of the interpolation. Must be greater than zero.
/// For example, use 2 for quadratic, or 3 for cubic interpolation in the V direction.
pub v_degree: std::num::NonZeroU32,
/// Attempt to approximate rational curves (such as arcs) using a bezier.
/// This will remove banding around interpolations between arcs and non-arcs. It may produce errors in other scenarios
/// Over time, this field won't be necessary.
pub bez_approximate_rational: bool,
/// This can be set to override the automatically determined topological base curve, which is usually the first section encountered.
pub base_curve_index: Option<u32>,
/// Tolerance
pub tolerance: LengthUnit,
}
/// Closes a path, converting it to a 2D solid.
#[derive(
Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant,
)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct ClosePath {
/// Which path to close.
pub path_id: Uuid,
}
/// Camera drag started.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct CameraDragStart {
/// The type of camera drag interaction.
pub interaction: CameraDragInteractionType,
/// The initial mouse position.
pub window: Point2d,
}
/// Camera drag continued.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct CameraDragMove {
/// The type of camera drag interaction.
pub interaction: CameraDragInteractionType,
/// The current mouse position.
pub window: Point2d,
/// Logical timestamp. The client should increment this
/// with every event in the current mouse drag. That way, if the
/// events are being sent over an unordered channel, the API
/// can ignore the older events.
pub sequence: Option<u32>,
}
/// Camera drag ended
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct CameraDragEnd {
/// The type of camera drag interaction.
pub interaction: CameraDragInteractionType,
/// The final mouse position.
pub window: Point2d,
}
/// Gets the default camera's camera settings
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct DefaultCameraGetSettings {}
/// Gets the default camera's view state
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct DefaultCameraGetView {}
/// Sets the default camera's view state
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct DefaultCameraSetView {
/// Camera view state
pub view: CameraViewState,
}
/// Change what the default camera is looking at.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct DefaultCameraLookAt {
/// Where the camera is positioned
pub vantage: Point3d,
/// What the camera is looking at. Center of the camera's field of vision
pub center: Point3d,
/// Which way is "up", from the camera's point of view.
pub up: Point3d,
/// Logical timestamp. The client should increment this
/// with every event in the current mouse drag. That way, if the
/// events are being sent over an unordered channel, the API
/// can ignore the older events.
pub sequence: Option<u32>,
}
/// Change what the default camera is looking at.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct DefaultCameraPerspectiveSettings {
/// Where the camera is positioned
pub vantage: Point3d,
/// What the camera is looking at. Center of the camera's field of vision
pub center: Point3d,
/// Which way is "up", from the camera's point of view.
pub up: Point3d,
/// The field of view angle in the y direction, in degrees.
pub fov_y: Option<f32>,
/// The distance to the near clipping plane.
pub z_near: Option<f32>,
/// The distance to the far clipping plane.
pub z_far: Option<f32>,
/// Logical timestamp. The client should increment this
/// with every event in the current mouse drag. That way, if the
/// events are being sent over an unordered channel, the API
/// can ignore the older events.
pub sequence: Option<u32>,
}
/// Moves the camera towards its pivot
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct DefaultCameraZoom {
/// How much should the camera move
pub magnitude: f32,
/// Optional screen space position to zoom towards. If given, the camera's pivot will
/// be set to the projection of this point onto the XY plane of the current pivot.
pub screen_point: Option<Point2d>,
}
/// Export a sketch to a file.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Export2d {
/// IDs of the entities to be exported.
pub entity_ids: Vec<Uuid>,
/// The file format to export to.
pub format: OutputFormat2d,
}
/// Export the scene to a file.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Export3d {
/// IDs of the entities to be exported. If this is empty, then all entities are exported.
pub entity_ids: Vec<Uuid>,
/// The file format to export to.
pub format: OutputFormat3d,
}
/// Export the scene to a file.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Export {
/// IDs of the entities to be exported. If this is empty, then all entities are exported.
pub entity_ids: Vec<Uuid>,
/// The file format to export to.
pub format: OutputFormat3d,
}
/// What is this entity's parent?
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EntityGetParentId {
/// ID of the entity being queried.
pub entity_id: Uuid,
}
/// How many children does the entity have?
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EntityGetNumChildren {
/// ID of the entity being queried.
pub entity_id: Uuid,
}
/// What is the UUID of this entity's n-th child?
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EntityGetChildUuid {
/// ID of the entity being queried.
pub entity_id: Uuid,
/// Index into the entity's list of children.
pub child_index: u32,
}
/// What are all UUIDs of this entity's children?
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EntityGetAllChildUuids {
/// ID of the entity being queried.
pub entity_id: Uuid,
}
/// What are all UUIDs of all the paths sketched on top of this entity?
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EntityGetSketchPaths {
/// ID of the entity being queried.
pub entity_id: Uuid,
}
/// What is the distance between these two entities?
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EntityGetDistance {
/// ID of the first entity being queried.
pub entity_id1: Uuid,
/// ID of the second entity being queried.
pub entity_id2: Uuid,
/// Type of distance to be measured.
pub distance_type: DistanceType,
}
/// Create a pattern using this entity by specifying the transform for each desired repetition.
/// Transformations are performed in the following order (first applied to last applied): scale, rotate, translate.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EntityClone {
/// ID of the entity being cloned.
pub entity_id: Uuid,
}
/// Create a pattern using this entity by specifying the transform for each desired repetition.
/// Transformations are performed in the following order (first applied to last applied): scale, rotate, translate.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EntityLinearPatternTransform {
/// ID of the entity being copied.
pub entity_id: Uuid,
/// How to transform each repeated solid.
/// The 0th transform will create the first copy of the entity.
/// The total number of (optional) repetitions equals the size of this list.
#[serde(default)]
pub transform: Vec<crate::shared::Transform>,
/// Alternatively, you could set this key instead.
/// If you want to use multiple transforms per item.
/// If this is non-empty then the `transform` key must be empty, and vice-versa.
#[serde(default)]
pub transforms: Vec<Vec<crate::shared::Transform>>,
}
/// Create a linear pattern using this entity.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EntityLinearPattern {
/// ID of the entity being copied.
pub entity_id: Uuid,
/// Axis along which to make the copies.
/// For Solid2d patterns, the z component is ignored.
pub axis: Point3d<f64>,
/// Number of repetitions to make.
pub num_repetitions: u32,
/// Spacing between repetitions.
pub spacing: LengthUnit,
}
/// Create a circular pattern using this entity.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EntityCircularPattern {
/// ID of the entity being copied.
pub entity_id: Uuid,
/// Axis around which to make the copies.
/// For Solid2d patterns, this is ignored.
pub axis: Point3d<f64>,
/// Point around which to make the copies.
/// For Solid2d patterns, the z component is ignored.
pub center: Point3d<LengthUnit>,
/// Number of repetitions to make.
pub num_repetitions: u32,
/// Arc angle (in degrees) to place repetitions along.
pub arc_degrees: f64,
/// Whether or not to rotate the objects as they are copied.
pub rotate_duplicates: bool,
}
/// Create a helix using the input cylinder and other specified parameters.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EntityMakeHelix {
/// ID of the cylinder.
pub cylinder_id: Uuid,
/// Number of revolutions.
pub revolutions: f64,
/// Start angle.
#[serde(default)]
pub start_angle: Angle,
/// Is the helix rotation clockwise?
pub is_clockwise: bool,
/// Length of the helix. If None, the length of the cylinder will be used instead.
pub length: Option<LengthUnit>,
}
/// Create a helix using the specified parameters.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EntityMakeHelixFromParams {
/// Radius of the helix.
pub radius: LengthUnit,
/// Length of the helix.
pub length: LengthUnit,
/// Number of revolutions.
pub revolutions: f64,
/// Start angle.
#[serde(default)]
pub start_angle: Angle,
/// Is the helix rotation clockwise?
pub is_clockwise: bool,
/// Center of the helix at the base of the helix.
pub center: Point3d<LengthUnit>,
/// Axis of the helix. The helix will be created around and in the direction of this axis.
pub axis: Point3d<f64>,
}
/// Create a helix using the specified parameters.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EntityMakeHelixFromEdge {
/// Radius of the helix.
pub radius: LengthUnit,
/// Length of the helix. If None, the length of the edge will be used instead.
pub length: Option<LengthUnit>,
/// Number of revolutions.
pub revolutions: f64,
/// Start angle.
#[serde(default)]
pub start_angle: Angle,
/// Is the helix rotation clockwise?
pub is_clockwise: bool,
/// Edge about which to make the helix.
pub edge_id: Uuid,
}
/// Mirror the input entities over the specified axis. (Currently only supports sketches)
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EntityMirror {
/// ID of the mirror entities.
pub ids: Vec<Uuid>,
/// Axis to use as mirror.
pub axis: Point3d<f64>,
/// Point through which the mirror axis passes.
pub point: Point3d<LengthUnit>,
}
/// Mirror the input entities over the specified edge. (Currently only supports sketches)
#[derive(
Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant,
)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EntityMirrorAcrossEdge {
/// ID of the mirror entities.
pub ids: Vec<Uuid>,
/// The edge to use as the mirror axis, must be linear and lie in the plane of the solid
pub edge_id: Uuid,
}
/// Modifies the selection by simulating a "mouse click" at the given x,y window coordinate
/// Returns ID of whatever was selected.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct SelectWithPoint {
/// Where in the window was selected
pub selected_at_window: Point2d,
/// What entity was selected?
pub selection_type: SceneSelectionType,
}
/// Adds one or more entities (by UUID) to the selection.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct SelectAdd {
/// Which entities to select
pub entities: Vec<Uuid>,
}
/// Removes one or more entities (by UUID) from the selection.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct SelectRemove {
/// Which entities to unselect
pub entities: Vec<Uuid>,
}
/// Removes all of the Objects in the scene
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct SceneClearAll {}
/// Replaces current selection with these entities (by UUID).
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct SelectReplace {
/// Which entities to select
pub entities: Vec<Uuid>,
}
/// Changes the current highlighted entity to whichever one is at the given window coordinate.
/// If there's no entity at this location, clears the highlight.
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct HighlightSetEntity {
/// Coordinates of the window being clicked
pub selected_at_window: Point2d,
/// Logical timestamp. The client should increment this
/// with every event in the current mouse drag. That way, if the
/// events are being sent over an unordered channel, the API
/// can ignore the older events.
pub sequence: Option<u32>,
}
/// Changes the current highlighted entity to these entities.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct HighlightSetEntities {
/// Highlight these entities.
pub entities: Vec<Uuid>,
}
/// Create a new annotation
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct NewAnnotation {
/// What should the annotation contain?
pub options: AnnotationOptions,
/// If true, any existing drawables within the obj will be replaced (the object will be reset)
pub clobber: bool,
/// What type of annotation to create.
pub annotation_type: AnnotationType,
}
/// Update an annotation
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct UpdateAnnotation {
/// Which annotation to update
pub annotation_id: Uuid,
/// If any of these fields are set, they will overwrite the previous options for the
/// annotation.
pub options: AnnotationOptions,
}
/// Changes visibility of scene-wide edge lines on brep solids
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct EdgeLinesVisible {
/// Whether or not the edge lines should be hidden.
pub hidden: bool,
}
/// Hide or show an object
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct ObjectVisible {
/// Which object to change
pub object_id: Uuid,
/// Whether or not the object should be hidden.
pub hidden: bool,
}
/// Bring an object to the front of the scene
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct ObjectBringToFront {
/// Which object to change
pub object_id: Uuid,
}
/// Set the material properties of an object
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct ObjectSetMaterialParamsPbr {
/// Which object to change
pub object_id: Uuid,
/// Color of the new material
pub color: Color,
/// Metalness of the new material
pub metalness: f32,
/// Roughness of the new material
pub roughness: f32,
/// Ambient Occlusion of the new material
pub ambient_occlusion: f32,
}
/// What type of entity is this?
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct GetEntityType {
/// ID of the entity being queried.
pub entity_id: Uuid,
}
/// Gets all faces which use the given edge.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Solid3dGetAllEdgeFaces {
/// Which object is being queried.
pub object_id: Uuid,
/// Which edge you want the faces of.
pub edge_id: Uuid,
}
/// Add a hole to a Solid2d object before extruding it.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Solid2dAddHole {
/// Which object to add the hole to.
pub object_id: Uuid,
/// The id of the path to use as the inner profile (hole).
pub hole_id: Uuid,
}
/// Gets all edges which are opposite the given edge, across all possible faces.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Solid3dGetAllOppositeEdges {
/// Which object is being queried.
pub object_id: Uuid,
/// Which edge you want the opposites of.
pub edge_id: Uuid,
/// If given, only faces parallel to this vector will be considered.
pub along_vector: Option<Point3d<f64>>,
}
/// Gets the edge opposite the given edge, along the given face.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Solid3dGetOppositeEdge {
/// Which object is being queried.
pub object_id: Uuid,
/// Which edge you want the opposite of.
pub edge_id: Uuid,
/// Which face is used to figure out the opposite edge?
pub face_id: Uuid,
}
/// Gets the next adjacent edge for the given edge, along the given face.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Solid3dGetNextAdjacentEdge {
/// Which object is being queried.
pub object_id: Uuid,
/// Which edge you want the opposite of.
pub edge_id: Uuid,
/// Which face is used to figure out the opposite edge?
pub face_id: Uuid,
}
/// Gets the previous adjacent edge for the given edge, along the given face.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Solid3dGetPrevAdjacentEdge {
/// Which object is being queried.
pub object_id: Uuid,
/// Which edge you want the opposite of.
pub edge_id: Uuid,
/// Which face is used to figure out the opposite edge?
pub face_id: Uuid,
}
/// Gets the shared edge between these two faces if it exists
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Solid3dGetCommonEdge {
/// Which object is being queried.
pub object_id: Uuid,
/// The faces being queried
pub face_ids: [Uuid; 2]
}
/// Fillets the given edge with the specified radius.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Solid3dFilletEdge {
/// Which object is being filletted.
pub object_id: Uuid,
/// Which edge you want to fillet.
#[serde(default)]
pub edge_id: Option<Uuid>,
/// Which edges you want to fillet.
#[serde(default)]
pub edge_ids: Vec<Uuid>,
/// The radius of the fillet. Measured in length (using the same units that the current sketch uses). Must be positive (i.e. greater than zero).
pub radius: LengthUnit,
/// The maximum acceptable surface gap computed between the filleted surfaces. Must be positive (i.e. greater than zero).
pub tolerance: LengthUnit,
/// How to apply the cut.
#[serde(default)]
pub cut_type: CutType,
/// Which cutting algorithm to use.
#[serde(default)]
pub strategy: CutStrategy,
/// What IDs should the resulting faces have?
/// If you've only passed one edge ID, its ID will
/// be the command ID used to send this command, and this
/// field should be empty.
/// If you've passed `n` IDs (to fillet `n` edges), then
/// this should be length `n-1`, and the first edge will use
/// the command ID used to send this command.
#[serde(default)]
pub extra_face_ids: Vec<Uuid>,
}
/// Cut the list of given edges with the given cut parameters.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Solid3dCutEdges {
/// Which object is being cut.
pub object_id: Uuid,
/// Which edges you want to cut.
#[serde(default)]
pub edge_ids: Vec<Uuid>,
/// The cut type and information required to perform the cut.
pub cut_type: CutTypeV2,
/// The maximum acceptable surface gap computed between the cut surfaces. Must be
/// positive (i.e. greater than zero).
pub tolerance: LengthUnit,
/// Which cutting algorithm to use.
#[serde(default)]
pub strategy: CutStrategy,
/// What IDs should the resulting faces have?
/// If you've only passed one edge ID, its ID will
/// be the command ID used to send this command, and this
/// field should be empty.
/// If you've passed `n` IDs (to cut `n` edges), then
/// this should be length `n-1`, and the first edge will use
/// the command ID used to send this command.
#[serde(default)]
pub extra_face_ids: Vec<Uuid>,
}
/// Determines whether a brep face is planar and returns its surface-local planar axes if so
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct FaceIsPlanar {
/// Which face is being queried.
pub object_id: Uuid,
}
/// Determines a position on a brep face evaluated by parameters u,v
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct FaceGetPosition {
/// Which face is being queried.
pub object_id: Uuid,
/// The 2D parameter-space u,v position to evaluate the surface at
pub uv: Point2d<f64>,
}
///Obtains the surface "center of mass"
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct FaceGetCenter {
/// Which face is being queried.
pub object_id: Uuid,
}
/// Determines the gradient (dFdu, dFdv) + normal vector on a brep face evaluated by parameters u,v
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct FaceGetGradient {
/// Which face is being queried.
pub object_id: Uuid,