1use kittycad_modeling_cmds_macros::define_modeling_cmd_enum;
2use schemars::JsonSchema;
3use serde::{Deserialize, Serialize};
4
5pub use self::each_cmd::*;
6use crate::{self as kittycad_modeling_cmds};
7
8define_modeling_cmd_enum! {
9 pub mod each_cmd {
10 use std::collections::HashSet;
11
12 use bon::Builder;
13 use crate::{self as kittycad_modeling_cmds};
14 use kittycad_modeling_cmds_macros::{ModelingCmdVariant};
15 use parse_display_derive::{Display, FromStr};
16 use schemars::JsonSchema;
17 use serde::{Deserialize, Serialize};
18 use uuid::Uuid;
19 use crate::shared::CameraViewState;
20 use crate::shared::MirrorAcross;
21
22 use crate::{
23 format::{OutputFormat2d, OutputFormat3d},
24 id::ModelingCmdId,
25 length_unit::LengthUnit,
26 shared::{
27 Angle,
28 RegionVersion,
29 BlendType,
30 BodyType,
31 ComponentTransform,
32 RelativeTo,
33 CutType, CutTypeV2,
34 CutStrategy,
35 CameraMovement,
36 EdgeSpecifier,
37 EntityReference,
38 ExtrudedFaceInfo, ExtrudeMethod,
39 AnnotationOptions, AnnotationType, CameraDragInteractionType, Color, DistanceType, EntityType,
40 PathComponentConstraintBound, PathComponentConstraintType, PathSegment, PerspectiveCameraParameters,
41 Point2d, Point3d, ExtrudeReference, SceneSelectionType, SceneToolType, SurfaceEdgeReference, Opposite,
42 },
43 units,
44 };
45
46 fn default_animation_seconds() -> f64 {
48 0.4
49 }
50
51 fn mm() -> crate::units::UnitLength {
52 crate::units::UnitLength::Millimeters
53 }
54
55 #[derive(
57 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
58 )]
59 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
60 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
61 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
62 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
63 pub struct EngineUtilEvaluatePath {
64 pub path_json: String,
66
67 pub t: f64,
69 }
70
71 #[derive(
73 Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant,
74 Builder
75 )]
76 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
77 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
78 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
79 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
80 pub struct StartPath {}
81
82 #[derive(
90 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
91 )]
92 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
93 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
94 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
95 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
96 pub struct MovePathPen {
97 pub path: ModelingCmdId,
99 pub to: Point3d<LengthUnit>,
101 }
102
103 #[derive(
106 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
107 )]
108 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
109 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
110 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
111 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
112 pub struct ExtendPath {
113 pub path: ModelingCmdId,
115 pub segment: PathSegment,
118 #[serde(default, skip_serializing_if = "Option::is_none")]
120 pub label: Option<String>,
121 }
122
123 #[derive(
125 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
126 )]
127 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
128 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
129 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
130 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
131 pub struct Extrude {
132 pub target: ModelingCmdId,
135 pub distance: LengthUnit,
137 #[serde(default, skip_serializing_if = "Option::is_none")]
141 pub draft_angle: Option<Angle>,
142 #[serde(default)]
145 pub faces: Option<ExtrudedFaceInfo>,
146 #[serde(default)]
149 #[builder(default)]
150 pub opposite: Opposite<LengthUnit>,
151 #[builder(default)]
153 #[serde(default)]
154 pub extrude_method: ExtrudeMethod,
155 #[serde(default, skip_serializing_if = "Option::is_none")]
159 pub merge_coplanar_faces: Option<bool>,
160
161 #[serde(default)]
163 #[builder(default)]
164 pub body_type: BodyType,
165 }
166
167 #[derive(
169 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
170 )]
171 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
172 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
173 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
174 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
175 pub struct ExtrudeToReference {
176 pub target: ModelingCmdId,
179 pub reference: ExtrudeReference,
182 #[serde(default)]
185 pub faces: Option<ExtrudedFaceInfo>,
186 #[serde(default)]
188 #[builder(default)]
189 pub extrude_method: ExtrudeMethod,
190 #[serde(default)]
192 #[builder(default)]
193 pub body_type: BodyType,
194 }
195
196 fn default_twist_extrude_section_interval() -> Angle {
197 Angle::from_degrees(15.0)
198 }
199
200 #[derive(
202 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
203 )]
204 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
205 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
206 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
207 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
208 pub struct TwistExtrude {
209 pub target: ModelingCmdId,
212 pub distance: LengthUnit,
214 #[serde(default)]
217 pub faces: Option<ExtrudedFaceInfo>,
218 #[serde(default)]
221 #[builder(default)]
222 pub center_2d: Point2d<f64>,
223 pub total_rotation_angle: Angle,
225 #[serde(default = "default_twist_extrude_section_interval")]
227 #[builder(default = default_twist_extrude_section_interval())]
228 pub angle_step_size: Angle,
229 pub tolerance: LengthUnit,
231 #[serde(default)]
233 #[builder(default)]
234 pub body_type: BodyType,
235 }
236
237 #[derive(
239 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder
240 )]
241 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
242 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
243 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
244 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
245 pub struct Sweep {
246 pub target: ModelingCmdId,
249 pub trajectory: ModelingCmdId,
251 pub sectional: bool,
253 pub tolerance: LengthUnit,
255 #[serde(default)]
257 #[builder(default)]
258 pub body_type: BodyType,
259 #[serde(default)]
261 #[builder(default)]
262 pub relative_to: RelativeTo,
263 #[serde(default, skip_serializing_if = "Option::is_none")]
266 pub version: Option<u8>,
267 }
268
269 #[derive(
271 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
272 )]
273 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
274 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
275 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
276 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
277 pub struct Revolve {
278 pub target: ModelingCmdId,
281 pub origin: Point3d<LengthUnit>,
283 pub axis: Point3d<f64>,
285 pub axis_is_2d: bool,
287 pub angle: Angle,
289 pub tolerance: LengthUnit,
291 #[serde(default)]
294 #[builder(default)]
295 pub opposite: Opposite<Angle>,
296 #[serde(default)]
298 #[builder(default)]
299 pub body_type: BodyType,
300 }
301
302 #[derive(
304 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
305 )]
306 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
307 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
308 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
309 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
310 pub struct Solid3dShellFace {
311 pub object_id: Uuid,
313 pub face_ids: Vec<Uuid>,
315 pub shell_thickness: LengthUnit,
318 #[serde(default)]
320 #[builder(default)]
321 pub hollow: bool,
322 }
323
324 #[derive(
330 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
331 )]
332 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
333 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
334 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
335 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
336 pub struct Solid3dJoin {
337 pub object_id: Uuid,
339 }
340
341 #[derive(
343 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
344 )]
345 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
346 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
347 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
348 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
349 pub struct Solid3dMultiJoin {
350 pub object_ids: Vec<Uuid>,
352 pub tolerance: LengthUnit,
354 }
355
356
357 #[derive(
359 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
360 )]
361 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
362 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
363 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
364 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
365 pub struct SurfaceBlend {
366 #[schemars(length(min = 2, max = 2))]
368 pub surfaces: Vec<SurfaceEdgeReference>,
369 #[serde(default)]
371 #[builder(default)]
372 pub blend_type: BlendType,
373 }
374
375 #[derive(
377 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
378 )]
379 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
380 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
381 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
382 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
383 pub struct Solid3dGetEdgeUuid {
384 pub object_id: Uuid,
386
387 pub edge_index: u32,
389 }
390
391 #[derive(
393 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
394 )]
395 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
396 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
397 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
398 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
399 pub struct Solid3dGetFaceUuid {
400 pub object_id: Uuid,
402
403 pub face_index: u32,
405 }
406
407 #[derive(
409 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
410 )]
411 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
412 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
413 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
414 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
415 pub struct Solid3dGetBodyType {
416 pub object_id: Uuid,
418 }
419
420 #[derive(
422 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
423 )]
424 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
425 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
426 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
427 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
428 pub struct RevolveAboutEdge {
429 pub target: ModelingCmdId,
432 #[serde(default, skip_serializing_if = "Option::is_none")]
434 pub edge_id: Option<Uuid>,
435 #[serde(default, skip_serializing_if = "Option::is_none")]
438 pub edge_reference: Option<EdgeSpecifier>,
439 pub angle: Angle,
441 pub tolerance: LengthUnit,
443 #[serde(default)]
446 #[builder(default)]
447 pub opposite: Opposite<Angle>,
448 #[serde(default)]
450 #[builder(default)]
451 pub body_type: BodyType,
452 }
453
454 #[derive(
456 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
457 )]
458 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
459 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
460 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
461 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
462 pub struct Loft {
463 pub section_ids: Vec<Uuid>,
466 pub v_degree: std::num::NonZeroU32,
469 pub bez_approximate_rational: bool,
473 pub base_curve_index: Option<u32>,
475 pub tolerance: LengthUnit,
477 #[serde(default)]
479 #[builder(default)]
480 pub body_type: BodyType,
481 }
482
483
484 #[derive(
486 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
487 )]
488 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
489 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
490 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
491 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
492 pub struct ClosePath {
493 pub path_id: Uuid,
495 }
496
497 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
499 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
500 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
501 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
502 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
503 pub struct CameraDragStart {
504 pub interaction: CameraDragInteractionType,
506 pub window: Point2d,
508 }
509
510 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
512 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
513 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
514 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
515 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
516 pub struct CameraDragMove {
517 pub interaction: CameraDragInteractionType,
519 pub window: Point2d,
521 pub sequence: Option<u32>,
526 }
527
528 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
530 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
531 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
532 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
533 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
534 pub struct CameraDragEnd {
535 pub interaction: CameraDragInteractionType,
537 pub window: Point2d,
539 }
540
541 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
543 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
544 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
545 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
546 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
547 pub struct DefaultCameraGetSettings {}
548
549 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
551 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
552 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
553 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
554 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
555 pub struct DefaultCameraGetView {}
556
557 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
559 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
560 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
561 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
562 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
563 pub struct DefaultCameraSetView {
564 pub view: CameraViewState,
566 }
567
568 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
570 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
571 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
572 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
573 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
574 pub struct DefaultCameraLookAt {
575 pub vantage: Point3d,
577 pub center: Point3d,
579 pub up: Point3d,
581 pub sequence: Option<u32>,
586 }
587
588 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
590 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
591 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
592 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
593 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
594 pub struct DefaultCameraPerspectiveSettings {
595 pub vantage: Point3d,
597 pub center: Point3d,
599 pub up: Point3d,
601 pub fov_y: Option<f32>,
603 pub z_near: Option<f32>,
605 pub z_far: Option<f32>,
607 pub sequence: Option<u32>,
612 }
613
614 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
616 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
617 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
618 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
619 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
620 pub struct DefaultCameraZoom {
621 pub magnitude: f32,
625 }
626
627 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
629 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
630 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
631 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
632 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
633 pub struct Export2d {
634 pub entity_ids: Vec<Uuid>,
636 pub format: OutputFormat2d,
638 }
639
640 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
642 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
643 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
644 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
645 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
646 pub struct Export3d {
647 #[builder(default)]
649 pub entity_ids: Vec<Uuid>,
650 pub format: OutputFormat3d,
652 }
653
654 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
656 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
657 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
658 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
659 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
660 pub struct Export {
661 #[builder(default)]
663 pub entity_ids: Vec<Uuid>,
664 pub format: OutputFormat3d,
666 }
667
668 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
670 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
671 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
672 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
673 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
674 pub struct EntityGetParentId {
675 pub entity_id: Uuid,
677 }
678
679 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
681 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
682 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
683 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
684 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
685 pub struct EntityGetNumChildren {
686 pub entity_id: Uuid,
688 }
689
690 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
692 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
693 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
694 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
695 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
696 pub struct EntityGetChildUuid {
697 pub entity_id: Uuid,
699 pub child_index: u32,
701 }
702
703 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
705 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
706 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
707 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
708 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
709 pub struct EntityGetIndex {
710 pub entity_id: Uuid,
712 }
713
714 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
716 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
717 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
718 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
719 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
720 pub struct EntityGetPrimitiveIndex {
721 pub entity_id: Uuid,
723 }
724
725 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
728 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
729 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
730 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
731 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
732 pub struct EntityDeleteChildren {
733 pub entity_id: Uuid,
735 pub child_entity_ids: HashSet<Uuid>,
737 }
738
739 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
741 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
742 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
743 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
744 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
745 pub struct EntityGetAllChildUuids {
746 pub entity_id: Uuid,
748 }
749
750 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
752 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
753 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
754 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
755 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
756 pub struct EntityGetSketchPaths {
757 pub entity_id: Uuid,
759 }
760
761 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
763 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
764 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
765 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
766 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
767 pub struct EntityGetDistance {
768 pub entity_id1: Uuid,
770 pub entity_id2: Uuid,
772 pub distance_type: DistanceType,
774 }
775
776 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
779 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
780 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
781 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
782 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
783 pub struct EntityClone {
784 pub entity_id: Uuid,
786 }
787
788 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
791 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
792 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
793 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
794 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
795 pub struct EntityLinearPatternTransform {
796 pub entity_id: Uuid,
798 #[serde(default)]
802 #[builder(default)]
803 pub transform: Vec<crate::shared::Transform>,
804 #[serde(default)]
808 #[builder(default)]
809 pub transforms: Vec<Vec<crate::shared::Transform>>,
810 }
811
812 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
814 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
815 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
816 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
817 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
818 pub struct EntityLinearPattern {
819 pub entity_id: Uuid,
821 pub axis: Point3d<f64>,
824 pub num_repetitions: u32,
826 pub spacing: LengthUnit,
828 }
829 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
831 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
832 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
833 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
834 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
835 pub struct EntityCircularPattern {
836 pub entity_id: Uuid,
838 pub axis: Point3d<f64>,
841 pub center: Point3d<LengthUnit>,
844 pub num_repetitions: u32,
846 pub arc_degrees: f64,
848 pub rotate_duplicates: bool,
850 }
851
852 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
854 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
855 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
856 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
857 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
858 pub struct EntityMakeHelix {
859 pub cylinder_id: Uuid,
861 pub revolutions: f64,
863 #[serde(default)]
865 #[builder(default)]
866 pub start_angle: Angle,
867 pub is_clockwise: bool,
869 pub length: Option<LengthUnit>,
871 }
872
873 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
875 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
876 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
877 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
878 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
879 pub struct EntityMakeHelixFromParams {
880 pub radius: LengthUnit,
882 pub length: LengthUnit,
884 pub revolutions: f64,
886 #[serde(default)]
888 #[builder(default)]
889 pub start_angle: Angle,
890 pub is_clockwise: bool,
892 pub center: Point3d<LengthUnit>,
894 pub axis: Point3d<f64>,
896 }
897
898 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
900 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
901 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
902 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
903 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
904 pub struct EntityMakeHelixFromEdge {
905 pub radius: LengthUnit,
907 pub length: Option<LengthUnit>,
909 pub revolutions: f64,
911 #[serde(default)]
913 #[builder(default)]
914 pub start_angle: Angle,
915 pub is_clockwise: bool,
917 #[serde(default, skip_serializing_if = "Option::is_none")]
920 pub edge_id: Option<Uuid>,
921 #[serde(default, skip_serializing_if = "Option::is_none")]
924 pub edge_reference: Option<EdgeSpecifier>,
925 }
926
927 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
929 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
930 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
931 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
932 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
933 pub struct EntityMirrorAcross {
934 pub ids: Vec<Uuid>,
936 pub across: MirrorAcross,
938 }
939
940
941 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
944 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
945 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
946 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
947 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
948 pub struct EntityMirror {
949 pub ids: Vec<Uuid>,
951 pub axis: Point3d<f64>,
953 pub point: Point3d<LengthUnit>,
955 }
956
957 #[derive(
960 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
961 )]
962 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
963 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
964 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
965 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
966 pub struct EntityMirrorAcrossEdge {
967 pub ids: Vec<Uuid>,
969 #[serde(default, skip_serializing_if = "Option::is_none")]
972 pub edge_id: Option<Uuid>,
973 #[serde(default, skip_serializing_if = "Option::is_none")]
976 pub edge_reference: Option<EdgeSpecifier>,
977 }
978
979 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
982 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
983 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
984 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
985 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
986 pub struct SelectWithPoint {
987 pub selected_at_window: Point2d,
989 pub selection_type: SceneSelectionType,
991 }
992
993 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
997 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
998 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
999 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1000 pub struct QueryEntityTypeWithPoint {
1001 pub selected_at_window: Point2d,
1003 pub selection_type: SceneSelectionType,
1005 }
1006
1007 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
1011 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1012 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1013 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1014 pub struct QueryEntityType {
1015 pub entity_id: Uuid,
1017 }
1018
1019 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1021 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1022 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1023 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1024 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1025 pub struct SelectAdd {
1026 pub entities: Vec<Uuid>,
1028 }
1029
1030 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1032 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1033 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1034 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1035 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1036 pub struct SelectRemove {
1037 pub entities: Vec<Uuid>,
1039 }
1040
1041 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1043 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1044 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1045 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1046 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1047 pub struct SceneClearAll {}
1048
1049 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1051 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1052 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1053 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1054 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1055 pub struct SelectReplace {
1056 pub entities: Vec<Uuid>,
1058 }
1059
1060 #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1063 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1064 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1065 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1066 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1067 pub struct HighlightSetEntity {
1068 pub selected_at_window: Point2d,
1070 pub sequence: Option<u32>,
1075 }
1076
1077 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1079 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1080 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1081 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1082 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1083 pub struct HighlightSetEntities {
1084 pub entities: Vec<Uuid>,
1086 }
1087
1088 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1090 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1091 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1092 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1093 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1094 pub struct NewAnnotation {
1095 pub options: AnnotationOptions,
1097 pub clobber: bool,
1099 pub annotation_type: AnnotationType,
1101 }
1102
1103 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1105 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1106 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1107 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1108 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1109 pub struct UpdateAnnotation {
1110 pub annotation_id: Uuid,
1112 pub options: AnnotationOptions,
1115 }
1116
1117 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1119 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1120 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1121 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1122 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1123 pub struct EdgeLinesVisible {
1124 pub hidden: bool,
1126 }
1127
1128 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1130 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1131 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1132 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1133 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1134 pub struct ObjectVisible {
1135 pub object_id: Uuid,
1137 pub hidden: bool,
1139 }
1140
1141 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1143 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1144 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1145 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1146 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1147 pub struct ObjectBringToFront {
1148 pub object_id: Uuid,
1150 }
1151
1152 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1154 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1155 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1156 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1157 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1158 pub struct ObjectSetMaterialParamsPbr {
1159 pub object_id: Uuid,
1161 pub color: Color,
1163 pub metalness: f32,
1165 pub roughness: f32,
1167 pub ambient_occlusion: f32,
1169 #[serde(default, skip_serializing_if = "Option::is_none")]
1171 pub backface_color: Option<Color>,
1172 }
1173
1174 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1176 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1177 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1178 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1179 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1180 pub struct ObjectSetName {
1181 pub object_id: Uuid,
1183 #[serde(default, skip_serializing_if = "String::is_empty")]
1185 pub name: String,
1186 }
1187
1188 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1190 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1191 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1192 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1193 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1194 pub struct GetEntityType {
1195 pub entity_id: Uuid,
1197 }
1198
1199 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1201 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1202 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1203 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1204 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1205 pub struct Solid3dGetAllEdgeFaces {
1206 pub object_id: Uuid,
1208 pub edge_id: Uuid,
1210 }
1211
1212 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1214 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1215 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1216 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1217 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1218 pub struct Solid3dFlip {
1219 pub object_id: Uuid,
1221 }
1222
1223 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1226 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1227 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1228 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1229 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1230 pub struct Solid3dFlipFace {
1231 pub object_id: Uuid,
1233 pub face_id: Uuid,
1235 }
1236
1237 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1239 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1240 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1241 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1242 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1243 pub struct Solid2dAddHole {
1244 pub object_id: Uuid,
1246 pub hole_id: Uuid,
1248 }
1249
1250 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1252 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1253 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1254 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1255 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1256 pub struct Solid3dGetAllOppositeEdges {
1257 pub object_id: Uuid,
1259 pub edge_id: Uuid,
1261 pub along_vector: Option<Point3d<f64>>,
1263 }
1264
1265 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1267 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1268 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1269 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1270 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1271 pub struct Solid3dGetOppositeEdge {
1272 pub object_id: Uuid,
1274 pub edge_id: Uuid,
1276 pub face_id: Uuid,
1278 }
1279
1280 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1282 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1283 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1284 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1285 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1286 pub struct Solid3dGetNextAdjacentEdge {
1287 pub object_id: Uuid,
1289 pub edge_id: Uuid,
1291 pub face_id: Uuid,
1293 }
1294
1295 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1297 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1298 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1299 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1300 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1301 pub struct Solid3dGetPrevAdjacentEdge {
1302 pub object_id: Uuid,
1304 pub edge_id: Uuid,
1306 pub face_id: Uuid,
1308 }
1309
1310 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1312 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1313 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1314 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1315 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1316 pub struct Solid3dGetCommonEdge {
1317 pub object_id: Uuid,
1319 pub face_ids: [Uuid; 2]
1321 }
1322
1323 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1325 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1326 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1327 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1328 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1329 pub struct Solid3dFilletEdge {
1330 pub object_id: Uuid,
1332 #[serde(default)]
1334 pub edge_id: Option<Uuid>,
1335 #[serde(default)]
1337 #[builder(default)]
1338 pub edge_ids: Vec<Uuid>,
1339 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1341 #[builder(default)]
1342 pub edges_references: Vec<EdgeSpecifier>,
1343 pub radius: LengthUnit,
1345 pub tolerance: LengthUnit,
1347 #[serde(default)]
1349 #[builder(default)]
1350 pub cut_type: CutType,
1351 #[serde(default)]
1353 #[builder(default)]
1354 pub strategy: CutStrategy,
1355 #[serde(default)]
1363 #[builder(default)]
1364 pub extra_face_ids: Vec<Uuid>,
1365 #[serde(default, skip_serializing_if = "super::is_false")]
1367 #[builder(default)]
1368 pub use_legacy: bool,
1369 }
1370
1371 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1373 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1374 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1375 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1376 pub struct Solid3dCutEdgeReferences {
1377 pub object_id: Uuid,
1379 #[serde(default)]
1381 #[builder(default)]
1382 pub edges_references: Vec<EdgeSpecifier>,
1383 pub cut_type: CutTypeV2,
1385 pub tolerance: LengthUnit,
1388 #[serde(default)]
1390 #[builder(default)]
1391 pub strategy: CutStrategy,
1392 #[serde(default)]
1400 #[builder(default)]
1401 pub extra_face_ids: Vec<Uuid>,
1402 #[serde(default, skip_serializing_if = "super::is_false")]
1404 #[builder(default)]
1405 pub use_legacy: bool,
1406 }
1407
1408 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1410 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1411 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1412 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1413 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1414 pub struct Solid3dCutEdges {
1415 pub object_id: Uuid,
1417 #[serde(default)]
1419 #[builder(default)]
1420 pub edge_ids: Vec<Uuid>,
1421 pub cut_type: CutTypeV2,
1423 pub tolerance: LengthUnit,
1426 #[serde(default)]
1428 #[builder(default)]
1429 pub strategy: CutStrategy,
1430 #[serde(default)]
1438 #[builder(default)]
1439 pub extra_face_ids: Vec<Uuid>,
1440 #[serde(default, skip_serializing_if = "super::is_false")]
1442 #[builder(default)]
1443 pub use_legacy: bool,
1444 }
1445
1446 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1448 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1449 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1450 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1451 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1452 pub struct FaceIsPlanar {
1453 pub object_id: Uuid,
1455 }
1456
1457 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1459 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1460 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1461 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1462 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1463 pub struct FaceGetPosition {
1464 pub object_id: Uuid,
1466
1467 pub uv: Point2d<f64>,
1469 }
1470
1471 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1473 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1474 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1475 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1476 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1477 pub struct FaceGetCenter {
1478 pub object_id: Uuid,
1480 }
1481
1482 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1484 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1485 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1486 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1487 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1488 pub struct FaceGetGradient {
1489 pub object_id: Uuid,
1491
1492 pub uv: Point2d<f64>,
1494 }
1495
1496 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1498 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1499 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1500 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1501 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1502 pub struct SendObject {
1503 pub object_id: Uuid,
1505 pub front: bool,
1507 }
1508 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1510 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1511 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1512 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1513 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1514 pub struct EntitySetOpacity {
1515 pub entity_id: Uuid,
1517 pub opacity: f32,
1521 }
1522
1523 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1525 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1526 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1527 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1528 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1529 pub struct EntityFade {
1530 pub entity_id: Uuid,
1532 pub fade_in: bool,
1534 #[serde(default = "default_animation_seconds")]
1536 #[builder(default = default_animation_seconds())]
1537 pub duration_seconds: f64,
1538 }
1539
1540 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1542 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1543 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1544 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1545 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1546 pub struct MakePlane {
1547 pub origin: Point3d<LengthUnit>,
1549 pub x_axis: Point3d<f64>,
1551 pub y_axis: Point3d<f64>,
1553 pub size: LengthUnit,
1557 pub clobber: bool,
1559 pub hide: Option<bool>,
1561 }
1562
1563 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1565 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1566 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1567 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1568 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1569 pub struct PlaneSetColor {
1570 pub plane_id: Uuid,
1572 pub color: Color,
1574 }
1575
1576 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1578 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1579 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1580 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1581 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1582 pub struct SetTool {
1583 pub tool: SceneToolType,
1585 }
1586
1587 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1589 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1590 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1591 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1592 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1593 pub struct MouseMove {
1594 pub window: Point2d,
1596 pub sequence: Option<u32>,
1601 }
1602
1603 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1606 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1607 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1608 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1609 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1610 pub struct MouseClick {
1611 pub window: Point2d,
1613 }
1614
1615 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1619 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1620 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1621 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1622 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1623 pub struct SketchModeDisable {}
1624
1625 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1627 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1628 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1629 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1630 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1631 pub struct GetSketchModePlane {}
1632
1633 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1635 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1636 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1637 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1638 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1639 pub struct CurveSetConstraint {
1640 pub object_id: Uuid,
1642 pub constraint_bound: PathComponentConstraintBound,
1644 pub constraint_type: PathComponentConstraintType,
1646 }
1647
1648 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1650 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1651 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1652 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1653 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1654 pub struct EnableSketchMode {
1655 pub entity_id: Uuid,
1657 pub ortho: bool,
1660 pub animated: bool,
1662 pub adjust_camera: bool,
1664 pub planar_normal: Option<Point3d<f64>>,
1667 }
1668
1669 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1673 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1674 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1675 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1676 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1677 pub struct EnableDryRun {}
1678
1679 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1683 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1684 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1685 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1686 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1687 pub struct DisableDryRun {}
1688
1689 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1691 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1692 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1693 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1694 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1695 pub struct SetBackgroundColor {
1696 pub color: Color,
1698 }
1699
1700 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1702 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1703 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1704 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1705 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1706 pub struct SetCurrentToolProperties {
1707 pub color: Option<Color>,
1709 }
1710
1711 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1713 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1714 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1715 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1716 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1717 pub struct SetDefaultSystemProperties {
1718 #[serde(default)]
1720 pub color: Option<Color>,
1721 #[serde(default)]
1723 pub backface_color: Option<Color>,
1724 #[serde(default)]
1726 pub highlight_color: Option<Color>,
1727 #[serde(default)]
1729 pub selection_color: Option<Color>,
1730 }
1731
1732 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1734 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1735 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1736 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1737 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1738 pub struct CurveGetType {
1739 pub curve_id: Uuid,
1741 }
1742
1743 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1745 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1746 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1747 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1748 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1749 pub struct CurveGetControlPoints {
1750 pub curve_id: Uuid,
1752 }
1753
1754 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1756 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1757 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1758 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1759 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1760 pub struct ProjectEntityToPlane {
1761 #[serde(default, skip_serializing_if = "Option::is_none")]
1763 pub entity_id: Option<Uuid>,
1764 #[serde(default, skip_serializing_if = "Option::is_none")]
1766 pub entity_reference: Option<EntityReference>,
1767 pub plane_id: Uuid,
1769 pub use_plane_coords: bool,
1772 }
1773
1774 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1776 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1777 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1778 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1779 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1780 pub struct ProjectPointsToPlane {
1781 pub plane_id: Uuid,
1783 pub points: Vec<Point3d<f64>>,
1785 pub use_plane_coords: bool,
1788 }
1789
1790 #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize, JsonSchema, FromStr, Display)]
1792 #[serde(rename_all = "snake_case")]
1793 #[display(style = "snake_case")]
1794 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1795 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1796 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1797 #[cfg_attr(feature = "python", pyo3::pyclass(from_py_object), pyo3_stub_gen::derive::gen_stub_pyclass_enum)]
1798 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1799 pub enum ImageFormat {
1800 Png,
1802 Jpeg,
1804 }
1805
1806 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1808 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1809 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1810 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1811 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1812 pub struct TakeSnapshot {
1813 pub format: ImageFormat,
1815 }
1816
1817 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1819 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1820 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1821 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1822 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1823 pub struct MakeAxesGizmo {
1824 pub gizmo_mode: bool,
1827 pub clobber: bool,
1829 }
1830
1831 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1833 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1834 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1835 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1836 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1837 pub struct PathGetInfo {
1838 pub path_id: Uuid,
1840 }
1841
1842 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1844 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1845 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1846 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1847 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1848 pub struct PathGetCurveUuidsForVertices {
1849 pub path_id: Uuid,
1851
1852 pub vertex_ids: Vec<Uuid>,
1854 }
1855
1856 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1858 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1859 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1860 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1861 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1862 pub struct PathGetCurveUuid {
1863 pub path_id: Uuid,
1865
1866 pub index: u32,
1868 }
1869
1870 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1872 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1873 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1874 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1875 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1876 pub struct PathGetVertexUuids {
1877 pub path_id: Uuid,
1879 }
1880
1881 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1883 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1884 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1885 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1886 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1887 pub struct PathGetSketchTargetUuid {
1888 pub path_id: Uuid,
1890 }
1891
1892 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1894 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1895 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1896 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1897 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1898 pub struct HandleMouseDragStart {
1899 pub window: Point2d,
1901 }
1902
1903 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1905 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1906 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1907 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1908 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1909 pub struct HandleMouseDragMove {
1910 pub window: Point2d,
1912 pub sequence: Option<u32>,
1917 }
1918
1919 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1921 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1922 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1923 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1924 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1925 pub struct HandleMouseDragEnd {
1926 pub window: Point2d,
1928 }
1929
1930 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1932 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1933 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1934 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1935 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1936 pub struct RemoveSceneObjects {
1937 pub object_ids: HashSet<Uuid>,
1939 }
1940
1941 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1944 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1945 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1946 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1947 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1948 pub struct PlaneIntersectAndProject {
1949 pub plane_id: Uuid,
1951 pub window: Point2d,
1953 }
1954
1955 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1957 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1958 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1959 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1960 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1961 pub struct CurveGetEndPoints {
1962 pub curve_id: Uuid,
1964 }
1965
1966 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1968 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1969 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1970 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1971 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1972 pub struct ReconfigureStream {
1973 pub width: u32,
1975 pub height: u32,
1977 pub fps: u32,
1979 #[serde(default)]
1981 pub bitrate: Option<u32>,
1982 }
1983
1984 #[derive(Debug, Eq, PartialEq, Clone, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1986 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1987 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1988 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1989 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1990 pub struct ImportFiles {
1991 pub files: Vec<super::ImportFile>,
1993 pub format: crate::format::InputFormat3d,
1995 }
1996
1997 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2002 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2003 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2004 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2005 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2006 pub struct SetSceneUnits {
2007 pub unit: units::UnitLength,
2009 }
2010
2011 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2013 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2014 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2015 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2016 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2017 pub struct Mass {
2018 #[builder(default)]
2021 pub entity_ids: Vec<Uuid>,
2022 pub material_density: f64,
2024 pub material_density_unit: units::UnitDensity,
2026 pub output_unit: units::UnitMass,
2028 }
2029
2030 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2032 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2033 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2034 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2035 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2036 pub struct Density {
2037 #[builder(default)]
2040 pub entity_ids: Vec<Uuid>,
2041 pub material_mass: f64,
2043 pub material_mass_unit: units::UnitMass,
2045 pub output_unit: units::UnitDensity,
2047 }
2048
2049 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2051 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2052 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2053 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2054 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2055 pub struct Volume {
2056 #[builder(default)]
2059 pub entity_ids: Vec<Uuid>,
2060 pub output_unit: units::UnitVolume,
2062 }
2063
2064 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2066 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2067 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2068 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2069 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2070 pub struct CenterOfMass {
2071 #[builder(default)]
2074 pub entity_ids: Vec<Uuid>,
2075 pub output_unit: units::UnitLength,
2077 }
2078
2079 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2081 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2082 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2083 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2084 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2085 pub struct SurfaceArea {
2086 #[builder(default)]
2089 pub entity_ids: Vec<Uuid>,
2090 pub output_unit: units::UnitArea,
2092 }
2093
2094 #[derive(
2096 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2097 Builder
2098 )]
2099 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2100 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2101 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2102 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2103 pub struct DefaultCameraFocusOn {
2104 pub uuid: Uuid,
2106 }
2107 #[derive(
2109 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2110 Builder
2111 )]
2112 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2113 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2114 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2115 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2116 pub struct SetSelectionType {
2117 pub selection_type: SceneSelectionType,
2119 }
2120
2121 #[derive(
2123 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2124 Builder
2125 )]
2126 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2127 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2128 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2129 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2130 pub struct SetSelectionFilter {
2131 pub filter: Vec<EntityType>,
2134 }
2135
2136 #[derive(
2138 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2139 Builder
2140 )]
2141 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2142 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2143 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2144 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2145 pub struct SceneGetEntityIds {
2146 pub filter: Vec<EntityType>,
2148 pub skip: u32,
2151 #[schemars(range(min = 1, max = 1000))]
2156 pub take: u32,
2157 }
2158
2159 #[derive(
2161 Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2162 Builder
2163 )]
2164 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2165 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2166 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2167 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2168 pub struct DefaultCameraSetOrthographic {}
2169
2170 #[derive(
2172 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2173 Builder
2174 )]
2175 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2176 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2177 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2178 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2179 pub struct DefaultCameraSetPerspective {
2180 pub parameters: Option<PerspectiveCameraParameters>,
2182 }
2183
2184 #[derive(
2187 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder
2188 )]
2189 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2190 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2191 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2192 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2193 pub struct DefaultCameraCenterToSelection {
2194 #[serde(default)]
2197 #[builder(default)]
2198 pub camera_movement: CameraMovement,
2199 }
2200
2201 #[derive(
2203 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder
2204 )]
2205 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2206 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2207 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2208 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2209 pub struct DefaultCameraCenterToScene {
2210 #[serde(default)]
2213 #[builder(default)]
2214 pub camera_movement: CameraMovement,
2215 }
2216
2217 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2219 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2220 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2221 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2222 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2223 pub struct ZoomToFit {
2224 #[serde(default)]
2226 #[builder(default)]
2227 pub object_ids: Vec<Uuid>,
2228 #[serde(default)]
2233 #[builder(default)]
2234 pub padding: f32,
2235 #[serde(default)]
2237 #[builder(default)]
2238 pub animated: bool,
2239 }
2240
2241 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2243 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2244 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2245 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2246 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2247 pub struct OrientToFace {
2248 pub face_id: Uuid,
2250 #[serde(default)]
2255 #[builder(default)]
2256 pub padding: f32,
2257 #[serde(default)]
2259 #[builder(default)]
2260 pub animated: bool,
2261 }
2262
2263 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2265 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2266 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2267 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2268 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2269 pub struct ViewIsometric {
2270 #[serde(default)]
2275 #[builder(default)]
2276 pub padding: f32,
2277 }
2278
2279 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2281 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2282 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2283 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2284 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2285 pub struct Solid3dGetExtrusionFaceInfo {
2286 pub object_id: Uuid,
2288 pub edge_id: Uuid,
2290 }
2291
2292 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2294 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2295 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2296 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2297 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2298 pub struct Solid3dGetAdjacencyInfo {
2299 pub object_id: Uuid,
2301 pub edge_id: Uuid,
2303 }
2304
2305
2306 #[derive(Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2308 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2309 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2310 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2311 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2312 pub struct SelectClear {}
2313
2314 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2317 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2318 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2319 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2320 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2321 pub struct SelectEntity {
2322 pub entities: Vec<EntityReference>,
2324 }
2325
2326 #[derive(Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2328 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2329 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2330 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2331 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2332 pub struct SelectGet {}
2333
2334 #[derive(
2336 Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2337 Builder
2338 )]
2339 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2340 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2341 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2342 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2343 pub struct GetNumObjects {}
2344
2345 #[derive(
2347 Clone, Debug, Deserialize, PartialEq, JsonSchema, Serialize, ModelingCmdVariant,
2348 Builder
2349 )]
2350 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2351 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2352 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2353 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2354 pub struct SetObjectTransform
2355 {
2356 pub object_id: Uuid,
2358 pub transforms: Vec<ComponentTransform>,
2360 }
2361
2362 #[derive(
2365 Clone, Debug, Deserialize, PartialEq, JsonSchema, Serialize, ModelingCmdVariant,
2366 Builder
2367 )]
2368 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2369 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2370 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2371 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2372 pub struct BooleanUnion
2373 {
2374 pub solid_ids: Vec<Uuid>,
2377 #[serde(default)]
2379 #[builder(default)]
2380 pub separate_bodies: bool,
2381 #[serde(default, skip_serializing_if = "super::is_false")]
2383 #[builder(default)]
2384 pub use_legacy: bool,
2385 pub tolerance: LengthUnit,
2387 }
2388
2389 #[derive(
2392 Clone, Debug, Deserialize, PartialEq, JsonSchema, Serialize, ModelingCmdVariant,
2393 Builder
2394 )]
2395 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2396 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2397 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2398 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2399 pub struct BooleanIntersection
2400 {
2401 pub solid_ids: Vec<Uuid>,
2403 #[serde(default)]
2405 #[builder(default)]
2406 pub separate_bodies: bool,
2407 #[serde(default, skip_serializing_if = "super::is_false")]
2409 #[builder(default)]
2410 pub use_legacy: bool,
2411 pub tolerance: LengthUnit,
2413 }
2414
2415 #[derive(
2419 Clone, Debug, Deserialize, PartialEq, JsonSchema, Serialize, ModelingCmdVariant,
2420 Builder
2421 )]
2422 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2423 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2424 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2425 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2426 pub struct BooleanSubtract
2427 {
2428 pub target_ids: Vec<Uuid>,
2430 pub tool_ids: Vec<Uuid>,
2432 #[serde(default)]
2434 #[builder(default)]
2435 pub separate_bodies: bool,
2436 #[serde(default, skip_serializing_if = "super::is_false")]
2438 #[builder(default)]
2439 pub use_legacy: bool,
2440 pub tolerance: LengthUnit,
2442 }
2443
2444 #[derive(
2446 Clone, Debug, Deserialize, PartialEq, JsonSchema, Serialize, ModelingCmdVariant,
2447 Builder
2448 )]
2449 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2450 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2451 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2452 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2453 pub struct BooleanImprint
2454 {
2455 #[serde(alias = "target_ids")]
2457 pub body_ids: Vec<Uuid>,
2458 #[serde(default)]
2461 pub tool_ids: Option<Vec<Uuid>>,
2462 #[serde(default)]
2464 #[builder(default)]
2465 pub separate_bodies: bool,
2466 #[serde(default, skip_serializing_if = "super::is_false")]
2468 #[builder(default)]
2469 pub use_legacy: bool,
2470 #[serde(default)]
2472 #[builder(default)]
2473 pub keep_tools: bool,
2474 pub tolerance: LengthUnit,
2476 }
2477
2478 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2481 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2482 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2483 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2484 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2485 pub struct MakeOffsetPath {
2486 pub object_id: Uuid,
2488 #[serde(default)]
2493 pub face_id: Option<Uuid>,
2494 pub offset: LengthUnit,
2496 }
2497
2498 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2500 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2501 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2502 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2503 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2504 pub struct AddHoleFromOffset {
2505 pub object_id: Uuid,
2507 pub offset: LengthUnit,
2509 }
2510
2511 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2513 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2514 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2515 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2516 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2517 pub struct SetGridReferencePlane {
2518 pub grid_id: Uuid,
2520 pub reference_id: Uuid,
2523 }
2524
2525 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2527 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2528 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2529 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2530 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2531 pub struct SetGridScale {
2532 pub value: f32,
2534 pub units: units::UnitLength,
2536 }
2537
2538 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2541 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2542 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2543 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2544 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2545 pub struct SetGridAutoScale {
2546 }
2547
2548 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2551 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2552 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2553 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2554 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2555 pub struct SetOrderIndependentTransparency {
2556 pub enabled: Option<bool>,
2559 }
2560
2561 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2565 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2566 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2567 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2568 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2569 pub struct CreateRegion {
2570 pub object_id: Uuid,
2572 pub segment: Uuid,
2574 pub intersection_segment: Uuid,
2577 #[serde(default = "super::negative_one")]
2581 #[builder(default = super::negative_one())]
2582 pub intersection_index: i32,
2583 #[serde(default)]
2586 #[builder(default)]
2587 pub curve_clockwise: bool,
2588 #[serde(default, skip_serializing_if = "RegionVersion::is_zero")]
2590 #[builder(default)]
2591 pub version: RegionVersion,
2592 }
2593
2594 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2598 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2599 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2600 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2601 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2602 pub struct CreateRegionFromQueryPoint {
2603 pub object_id: Uuid,
2605
2606 pub query_point: Point2d<LengthUnit>,
2609 #[serde(default, skip_serializing_if = "RegionVersion::is_zero")]
2611 #[builder(default)]
2612 pub version: RegionVersion,
2613 }
2614
2615 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2617 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2618 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2619 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2620 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2621 pub struct RegionGetQueryPoint {
2622 pub region_id: Uuid,
2624 }
2625
2626 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2629 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2630 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2631 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2632 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2633 pub struct SelectRegionFromPoint {
2634 pub selected_at_window: Point2d,
2636 }
2637
2638 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2640 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2641 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2642 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2643 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2644 pub struct BoundingBox {
2645 #[builder(default)]
2648 pub entity_ids: Vec<Uuid>,
2649 #[builder(default = mm())]
2651 #[serde(default = "mm")]
2652 pub output_unit: units::UnitLength,
2653 }
2654
2655 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2657 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2658 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2659 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2660 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2661 pub struct OffsetSurface {
2662 pub surface_id: Uuid,
2664 pub distance: LengthUnit,
2666 pub flip: bool,
2668 }
2669
2670 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2672 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2673 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2674 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2675 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2676 pub struct ClosestEdge {
2677 #[serde(default)]
2680 pub object_id: Option<Uuid>,
2681 pub closest_to: Point3d<f64>,
2684 }
2685 }
2686
2687
2688}
2689
2690pub(crate) fn is_false(b: &bool) -> bool {
2691 !b
2692}
2693
2694pub(crate) fn negative_one() -> i32 {
2695 -1
2696}
2697
2698impl ModelingCmd {
2699 pub fn is_safe_to_batch(&self) -> bool {
2701 use ModelingCmd::*;
2702 matches!(
2703 self,
2704 MovePathPen(_)
2705 | ExtendPath(_)
2706 | Extrude(_)
2707 | Revolve(_)
2708 | Solid3dFilletEdge(_)
2709 | ClosePath(_)
2710 | UpdateAnnotation(_)
2711 | ObjectVisible(_)
2712 | ObjectBringToFront(_)
2713 | Solid2dAddHole(_)
2714 | SendObject(_)
2715 | EntitySetOpacity(_)
2716 | PlaneSetColor(_)
2717 | SetTool(_)
2718 )
2719 }
2720}
2721
2722#[derive(Clone, Serialize, Deserialize, JsonSchema, Eq, PartialEq, bon::Builder)]
2726#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2727#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2728#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2729#[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2730pub struct ImportFile {
2731 pub path: String,
2733 #[serde(
2735 serialize_with = "serde_bytes::serialize",
2736 deserialize_with = "serde_bytes::deserialize"
2737 )]
2738 pub data: Vec<u8>,
2739}
2740
2741impl std::fmt::Debug for ImportFile {
2742 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2743 f.debug_struct("ImportFile")
2744 .field("path", &self.path)
2745 .field("data", &"<redacted>")
2746 .finish()
2747 }
2748}