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 kcl_project::KclProject,
27 shared::{
28 Angle,
29 RegionVersion,
30 BlendType,
31 BodyType,
32 EdgeCutVersion,
33 ComponentTransform,
34 RelativeTo,
35 CutType, CutTypeV2,
36 CutStrategy,
37 CameraMovement,
38 DirectionType,
39 EdgeSpecifier,
40 EntityReference,
41 ExtrudedFaceInfo, ExtrudeMethod,
42 AnnotationOptions, AnnotationType, CameraDragInteractionType, Color, DistanceType, EntityType,
43 PathComponentConstraintBound, PathComponentConstraintType, PathSegment, PerspectiveCameraParameters,
44 Point2d, Point3d, ExtrudeReference, SceneSelectionType, SceneToolType, SurfaceEdgeReference, Opposite,
45 Tolerance,
46 },
47 units,
48 };
49
50 fn default_animation_seconds() -> f64 {
52 0.4
53 }
54
55 fn mm() -> crate::units::UnitLength {
56 crate::units::UnitLength::Millimeters
57 }
58
59 #[derive(
61 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
62 )]
63 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
64 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
65 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
66 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
67 pub struct EngineUtilEvaluatePath {
68 pub path_json: String,
70
71 pub t: f64,
73 }
74
75 #[derive(
77 Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant,
78 Builder
79 )]
80 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
81 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
82 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
83 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
84 pub struct StartPath {}
85
86 #[derive(
94 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
95 )]
96 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
97 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
98 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
99 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
100 pub struct MovePathPen {
101 pub path: ModelingCmdId,
103 pub to: Point3d<LengthUnit>,
105 }
106
107 #[derive(
110 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
111 )]
112 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
113 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
114 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
115 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
116 pub struct ExtendPath {
117 pub path: ModelingCmdId,
119 pub segment: PathSegment,
122 #[serde(default, skip_serializing_if = "Option::is_none")]
124 pub label: Option<String>,
125 }
126
127 #[derive(
129 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
130 )]
131 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
132 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
133 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
134 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
135 pub struct Extrude {
136 #[serde(default, skip_serializing_if = "Option::is_none")]
139 pub target: Option<ModelingCmdId>,
140 #[serde(default, skip_serializing_if = "Option::is_none")]
142 pub target_reference: Option<EdgeSpecifier>,
143 pub distance: LengthUnit,
147 #[serde(default, skip_serializing_if = "Option::is_none")]
150 pub direction: Option<DirectionType>,
151 #[serde(default, skip_serializing_if = "Option::is_none")]
153 pub direction_reference: Option<EdgeSpecifier>,
154 #[serde(default, skip_serializing_if = "Option::is_none")]
158 pub draft_angle: Option<Angle>,
159 #[serde(default)]
162 pub faces: Option<ExtrudedFaceInfo>,
163 #[serde(default)]
166 #[builder(default)]
167 pub opposite: Opposite<LengthUnit>,
168 #[builder(default)]
170 #[serde(default)]
171 pub extrude_method: ExtrudeMethod,
172 #[serde(default, skip_serializing_if = "Option::is_none")]
176 pub merge_coplanar_faces: Option<bool>,
177
178 #[serde(default)]
180 #[builder(default)]
181 pub body_type: BodyType,
182 }
183
184 #[derive(
186 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
187 )]
188 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
189 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
190 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
191 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
192 pub struct ExtrudeToReference {
193 #[serde(default, skip_serializing_if = "Option::is_none")]
198 pub target: Option<ModelingCmdId>,
199 #[serde(default, skip_serializing_if = "Option::is_none")]
202 pub target_reference: Option<EdgeSpecifier>,
203 pub reference: ExtrudeReference,
206 #[serde(default)]
209 pub faces: Option<ExtrudedFaceInfo>,
210 #[serde(default)]
212 #[builder(default)]
213 pub extrude_method: ExtrudeMethod,
214 #[serde(default)]
216 #[builder(default)]
217 pub body_type: BodyType,
218 }
219
220 fn default_twist_extrude_section_interval() -> Angle {
221 Angle::from_degrees(15.0)
222 }
223
224 #[derive(
226 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
227 )]
228 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
229 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
230 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
231 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
232 pub struct TwistExtrude {
233 pub target: ModelingCmdId,
236 pub distance: LengthUnit,
238 #[serde(default)]
241 pub faces: Option<ExtrudedFaceInfo>,
242 #[serde(default)]
245 #[builder(default)]
246 pub center_2d: Point2d<f64>,
247 pub total_rotation_angle: Angle,
249 #[serde(default = "default_twist_extrude_section_interval")]
251 #[builder(default = default_twist_extrude_section_interval())]
252 pub angle_step_size: Angle,
253 pub tolerance: LengthUnit,
255 #[serde(default)]
257 #[builder(default)]
258 pub body_type: BodyType,
259 }
260
261 #[derive(
263 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder
264 )]
265 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
266 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
267 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
268 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
269 pub struct Sweep {
270 pub target: ModelingCmdId,
273 pub trajectory: ModelingCmdId,
275 pub sectional: bool,
277 pub tolerance: LengthUnit,
279 #[serde(default)]
281 #[builder(default)]
282 pub body_type: BodyType,
283 #[serde(default)]
286 pub relative_to: Option<RelativeTo>,
287 #[serde(default, skip_serializing_if = "Option::is_none")]
290 pub version: Option<u8>,
291 #[serde(default, skip_serializing_if = "Option::is_none")]
296 pub translate_profile_to_path: Option<bool>,
297 #[serde(default, skip_serializing_if = "Option::is_none")]
302 pub orient_profile_perpendicular: Option<bool>,
303 #[serde(default, skip_serializing_if = "Option::is_none")]
308 pub projected_axis: Option<DirectionType>,
309 }
310
311 #[derive(
313 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
314 )]
315 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
316 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
317 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
318 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
319 pub struct Revolve {
320 pub target: ModelingCmdId,
323 pub origin: Point3d<LengthUnit>,
325 pub axis: Point3d<f64>,
327 pub axis_is_2d: bool,
329 pub angle: Angle,
331 pub tolerance: LengthUnit,
333 #[serde(default)]
336 #[builder(default)]
337 pub opposite: Opposite<Angle>,
338 #[serde(default)]
340 #[builder(default)]
341 pub body_type: BodyType,
342 }
343
344 #[derive(
346 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
347 )]
348 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
349 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
350 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
351 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
352 pub struct Solid3dShellFace {
353 pub object_id: Uuid,
355 pub face_ids: Vec<Uuid>,
357 pub shell_thickness: LengthUnit,
360 #[serde(default)]
362 #[builder(default)]
363 pub hollow: bool,
364 }
365
366 #[derive(
372 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
373 )]
374 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
375 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
376 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
377 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
378 pub struct Solid3dJoin {
379 pub object_id: Uuid,
381 }
382
383 #[derive(
385 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
386 )]
387 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
388 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
389 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
390 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
391 pub struct Solid3dMultiJoin {
392 pub object_ids: Vec<Uuid>,
394 pub tolerance: LengthUnit,
396 }
397
398
399 #[derive(
401 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
402 )]
403 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
404 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
405 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
406 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
407 pub struct SurfaceBlend {
408 #[schemars(length(min = 2, max = 2))]
410 pub surfaces: Vec<SurfaceEdgeReference>,
411 #[serde(default)]
413 #[builder(default)]
414 pub blend_type: BlendType,
415 }
416
417 #[derive(
419 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
420 )]
421 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
422 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
423 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
424 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
425 pub struct Solid3dGetEdgeUuid {
426 pub object_id: Uuid,
428
429 pub edge_index: u32,
431 }
432
433 #[derive(
435 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
436 )]
437 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
438 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
439 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
440 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
441 pub struct Solid3dGetFaceUuid {
442 pub object_id: Uuid,
444
445 pub face_index: u32,
447 }
448
449 #[derive(
451 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
452 )]
453 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
454 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
455 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
456 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
457 pub struct Solid3dGetBodyType {
458 pub object_id: Uuid,
460 }
461
462 #[derive(
464 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
465 )]
466 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
467 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
468 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
469 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
470 pub struct RevolveAboutEdge {
471 pub target: ModelingCmdId,
474 #[serde(default, skip_serializing_if = "Option::is_none")]
476 pub edge_id: Option<Uuid>,
477 #[serde(default, skip_serializing_if = "Option::is_none")]
480 pub edge_reference: Option<EdgeSpecifier>,
481 pub angle: Angle,
483 pub tolerance: LengthUnit,
485 #[serde(default)]
488 #[builder(default)]
489 pub opposite: Opposite<Angle>,
490 #[serde(default)]
492 #[builder(default)]
493 pub body_type: BodyType,
494 }
495
496 #[derive(
498 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
499 )]
500 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
501 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
502 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
503 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
504 pub struct Loft {
505 pub section_ids: Vec<Uuid>,
508 pub v_degree: std::num::NonZeroU32,
511 pub bez_approximate_rational: bool,
515 pub base_curve_index: Option<u32>,
517 pub tolerance: LengthUnit,
519 #[serde(default)]
521 #[builder(default)]
522 pub body_type: BodyType,
523 }
524
525
526 #[derive(
528 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
529 )]
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 ClosePath {
535 pub path_id: Uuid,
537 }
538
539 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
541 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
542 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
543 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
544 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
545 pub struct CameraDragStart {
546 pub interaction: CameraDragInteractionType,
548 pub window: Point2d,
550 }
551
552 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
554 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
555 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
556 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
557 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
558 pub struct CameraDragMove {
559 pub interaction: CameraDragInteractionType,
561 pub window: Point2d,
563 pub sequence: Option<u32>,
568 }
569
570 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
572 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
573 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
574 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
575 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
576 pub struct CameraDragEnd {
577 pub interaction: CameraDragInteractionType,
579 pub window: Point2d,
581 }
582
583 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
585 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
586 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
587 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
588 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
589 pub struct DefaultCameraGetSettings {}
590
591 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
593 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
594 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
595 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
596 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
597 pub struct DefaultCameraGetView {}
598
599 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
601 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
602 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
603 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
604 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
605 pub struct DefaultCameraSetView {
606 pub view: CameraViewState,
608 }
609
610 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
612 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
613 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
614 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
615 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
616 pub struct DefaultCameraLookAt {
617 pub vantage: Point3d,
619 pub center: Point3d,
621 pub up: Point3d,
623 pub sequence: Option<u32>,
628 }
629
630 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
632 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
633 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
634 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
635 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
636 pub struct DefaultCameraPerspectiveSettings {
637 pub vantage: Point3d,
639 pub center: Point3d,
641 pub up: Point3d,
643 pub fov_y: Option<f32>,
645 pub z_near: Option<f32>,
647 pub z_far: Option<f32>,
649 pub sequence: Option<u32>,
654 }
655
656 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
658 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
659 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
660 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
661 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
662 pub struct DefaultCameraZoom {
663 pub magnitude: f32,
667 }
668
669 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
671 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
672 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
673 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
674 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
675 pub struct Export2d {
676 pub entity_ids: Vec<Uuid>,
678 pub format: OutputFormat2d,
680 }
681
682 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
686 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
687 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
688 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
689 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
690 pub struct Export3d {
691 #[builder(default)]
693 pub entity_ids: Vec<Uuid>,
694 pub format: OutputFormat3d,
696 #[serde(default, skip_serializing_if = "Option::is_none")]
698 pub kcl_source: Option<KclProject>,
699 #[serde(default, skip_serializing_if = "Option::is_none")]
701 pub compression: Option<crate::shared::CompressionType>,
702 }
703
704 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
708 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
709 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
710 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
711 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
712 pub struct Export {
713 #[builder(default)]
715 pub entity_ids: Vec<Uuid>,
716 pub format: OutputFormat3d,
718 #[serde(default, skip_serializing_if = "Option::is_none")]
720 pub kcl_source: Option<KclProject>,
721 }
722
723 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
725 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
726 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
727 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
728 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
729 pub struct EntityGetParentId {
730 pub entity_id: Uuid,
732 }
733
734 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
736 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
737 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
738 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
739 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
740 pub struct EntityGetNumChildren {
741 pub entity_id: Uuid,
743 }
744
745 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
747 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
748 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
749 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
750 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
751 pub struct EntityGetChildUuid {
752 pub entity_id: Uuid,
754 pub child_index: u32,
756 }
757
758 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
760 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
761 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
762 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
763 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
764 pub struct EntityGetIndex {
765 pub entity_id: Uuid,
767 }
768
769 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
771 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
772 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
773 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
774 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
775 pub struct EntityGetPrimitiveIndex {
776 pub entity_id: Uuid,
778 }
779
780 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
783 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
784 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
785 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
786 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
787 pub struct EntityDeleteChildren {
788 pub entity_id: Uuid,
790 pub child_entity_ids: HashSet<Uuid>,
792 }
793
794 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
796 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
797 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
798 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
799 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
800 pub struct EntityGetAllChildUuids {
801 pub entity_id: Uuid,
803 }
804
805 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
807 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
808 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
809 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
810 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
811 pub struct EntityGetSketchPaths {
812 pub entity_id: Uuid,
814 }
815
816 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
818 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
819 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
820 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
821 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
822 pub struct EntityGetDistance {
823 pub entity_id1: Uuid,
825 pub entity_id2: Uuid,
827 pub distance_type: DistanceType,
829 }
830
831 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
833 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
834 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
835 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
836 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
837 pub struct EdgeGetLength {
838 pub edge_id: Uuid,
840 }
841
842 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
845 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
846 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
847 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
848 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
849 pub struct EntityClone {
850 pub entity_id: Uuid,
852 }
853
854 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
857 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
858 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
859 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
860 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
861 pub struct EntityLinearPatternTransform {
862 pub entity_id: Uuid,
864 #[serde(default)]
868 #[builder(default)]
869 pub transform: Vec<crate::shared::Transform>,
870 #[serde(default)]
874 #[builder(default)]
875 pub transforms: Vec<Vec<crate::shared::Transform>>,
876 }
877
878 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
880 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
881 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
882 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
883 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
884 pub struct EntityLinearPattern {
885 pub entity_id: Uuid,
887 pub axis: Point3d<f64>,
890 pub num_repetitions: u32,
892 pub spacing: LengthUnit,
894 }
895 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
897 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
898 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
899 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
900 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
901 pub struct EntityCircularPattern {
902 pub entity_id: Uuid,
904 pub axis: Point3d<f64>,
907 pub center: Point3d<LengthUnit>,
910 pub num_repetitions: u32,
912 pub arc_degrees: f64,
914 pub rotate_duplicates: bool,
916 }
917
918 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
920 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
921 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
922 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
923 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
924 pub struct EntityMakeHelix {
925 pub cylinder_id: Uuid,
927 pub revolutions: f64,
929 #[serde(default)]
931 #[builder(default)]
932 pub start_angle: Angle,
933 pub is_clockwise: bool,
935 pub length: Option<LengthUnit>,
937 }
938
939 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
941 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
942 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
943 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
944 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
945 pub struct EntityMakeHelixFromParams {
946 pub radius: LengthUnit,
948 pub length: LengthUnit,
950 pub revolutions: f64,
952 #[serde(default)]
954 #[builder(default)]
955 pub start_angle: Angle,
956 pub is_clockwise: bool,
958 pub center: Point3d<LengthUnit>,
960 pub axis: Point3d<f64>,
962 }
963
964 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
966 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
967 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
968 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
969 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
970 pub struct EntityMakeHelixFromEdge {
971 pub radius: LengthUnit,
973 pub length: Option<LengthUnit>,
975 pub revolutions: f64,
977 #[serde(default)]
979 #[builder(default)]
980 pub start_angle: Angle,
981 pub is_clockwise: bool,
983 #[serde(default, skip_serializing_if = "Option::is_none")]
986 pub edge_id: Option<Uuid>,
987 #[serde(default, skip_serializing_if = "Option::is_none")]
990 pub edge_reference: Option<EdgeSpecifier>,
991 }
992
993 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
995 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
996 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
997 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
998 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
999 pub struct EntityMirrorAcross {
1000 pub ids: Vec<Uuid>,
1002 pub across: MirrorAcross,
1004 }
1005
1006
1007 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1010 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1011 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1012 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1013 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1014 pub struct EntityMirror {
1015 pub ids: Vec<Uuid>,
1017 pub axis: Point3d<f64>,
1019 pub point: Point3d<LengthUnit>,
1021 }
1022
1023 #[derive(
1026 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
1027 )]
1028 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1029 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1030 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1031 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1032 pub struct EntityMirrorAcrossEdge {
1033 pub ids: Vec<Uuid>,
1035 #[serde(default, skip_serializing_if = "Option::is_none")]
1038 pub edge_id: Option<Uuid>,
1039 #[serde(default, skip_serializing_if = "Option::is_none")]
1042 pub edge_reference: Option<EdgeSpecifier>,
1043 }
1044
1045 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1048 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1049 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1050 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1051 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1052 pub struct SelectWithPoint {
1053 pub selected_at_window: Point2d,
1055 pub selection_type: SceneSelectionType,
1057 }
1058
1059 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
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 QueryEntityTypeWithPoint {
1068 pub selected_at_window: Point2d,
1070 pub selection_type: SceneSelectionType,
1072 }
1073
1074 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
1078 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1079 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1080 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1081 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1082 pub struct QueryEntityType {
1083 pub entity_id: Uuid,
1085 }
1086
1087 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1089 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1090 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1091 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1092 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1093 pub struct SelectAdd {
1094 pub entities: Vec<Uuid>,
1096 }
1097
1098 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1100 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1101 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1102 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1103 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1104 pub struct SelectRemove {
1105 pub entities: Vec<Uuid>,
1107 }
1108
1109 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1111 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1112 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1113 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1114 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1115 pub struct SceneClearAll {}
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 SelectReplace {
1124 pub entities: Vec<Uuid>,
1126 }
1127
1128 #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1131 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1132 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1133 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1134 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1135 pub struct HighlightSetEntity {
1136 pub selected_at_window: Point2d,
1138 pub sequence: Option<u32>,
1143 }
1144
1145 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1147 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1148 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1149 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1150 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1151 pub struct HighlightSetEntities {
1152 pub entities: Vec<Uuid>,
1154 }
1155
1156 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1158 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1159 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1160 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1161 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1162 pub struct NewAnnotation {
1163 pub options: AnnotationOptions,
1165 pub clobber: bool,
1167 pub annotation_type: AnnotationType,
1169 }
1170
1171 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1173 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1174 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1175 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1176 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1177 pub struct UpdateAnnotation {
1178 pub annotation_id: Uuid,
1180 pub options: AnnotationOptions,
1183 }
1184
1185 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1187 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1188 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1189 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1190 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1191 pub struct EdgeLinesVisible {
1192 pub hidden: bool,
1194 }
1195
1196 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1198 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1199 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1200 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1201 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1202 pub struct ObjectVisible {
1203 pub object_id: Uuid,
1205 pub hidden: bool,
1207 }
1208
1209 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1212 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1213 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1214 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1215 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1216 pub struct ObjectIsHidden {
1217 pub object_ids: Vec<Uuid>,
1220 }
1221
1222 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1224 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1225 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1226 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1227 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1228 pub struct ObjectBringToFront {
1229 pub object_id: Uuid,
1231 }
1232
1233 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1235 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1236 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1237 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1238 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1239 pub struct ObjectSetMaterialParamsPbr {
1240 pub object_id: Uuid,
1242 pub color: Color,
1244 pub metalness: f32,
1246 pub roughness: f32,
1248 pub ambient_occlusion: f32,
1250 #[serde(default, skip_serializing_if = "Option::is_none")]
1252 pub backface_color: Option<Color>,
1253 }
1254
1255 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1257 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1258 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1259 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1260 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1261 pub struct ObjectSetName {
1262 pub object_id: Uuid,
1264 #[serde(default, skip_serializing_if = "String::is_empty")]
1266 pub name: String,
1267 }
1268
1269 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1271 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1272 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1273 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1274 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1275 pub struct GetEntityType {
1276 pub entity_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 Solid3dGetAllEdgeFaces {
1287 pub object_id: Uuid,
1289 pub edge_id: Uuid,
1291 }
1292
1293 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1295 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1296 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1297 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1298 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1299 pub struct Solid3dFlip {
1300 pub object_id: Uuid,
1302 }
1303
1304 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1307 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1308 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1309 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1310 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1311 pub struct Solid3dFlipFace {
1312 pub object_id: Uuid,
1314 pub face_id: Uuid,
1316 }
1317
1318 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1320 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1321 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1322 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1323 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1324 pub struct Solid2dAddHole {
1325 pub object_id: Uuid,
1327 pub hole_id: Uuid,
1329 }
1330
1331 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1333 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1334 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1335 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1336 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1337 pub struct Solid3dGetAllOppositeEdges {
1338 pub object_id: Uuid,
1340 pub edge_id: Uuid,
1342 pub along_vector: Option<Point3d<f64>>,
1344 }
1345
1346 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1348 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1349 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1350 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1351 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1352 pub struct Solid3dGetOppositeEdge {
1353 pub object_id: Uuid,
1355 pub edge_id: Uuid,
1357 pub face_id: Uuid,
1359 }
1360
1361 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1363 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1364 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1365 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1366 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1367 pub struct Solid3dGetNextAdjacentEdge {
1368 pub object_id: Uuid,
1370 pub edge_id: Uuid,
1372 pub face_id: Uuid,
1374 }
1375
1376 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1378 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1379 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1380 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1381 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1382 pub struct Solid3dGetPrevAdjacentEdge {
1383 pub object_id: Uuid,
1385 pub edge_id: Uuid,
1387 pub face_id: Uuid,
1389 }
1390
1391 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1393 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1394 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1395 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1396 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1397 pub struct Solid3dGetCommonEdge {
1398 pub object_id: Uuid,
1400 pub face_ids: [Uuid; 2]
1402 }
1403
1404 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1406 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1407 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1408 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1409 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1410 pub struct Solid3dFilletEdge {
1411 pub object_id: Uuid,
1413 #[serde(default)]
1415 pub edge_id: Option<Uuid>,
1416 #[serde(default)]
1418 #[builder(default)]
1419 pub edge_ids: Vec<Uuid>,
1420 #[serde(default, skip_serializing_if = "Vec::is_empty")]
1422 #[builder(default)]
1423 pub edges_references: Vec<EdgeSpecifier>,
1424 pub radius: LengthUnit,
1426 pub tolerance: LengthUnit,
1428 #[serde(default)]
1430 #[builder(default)]
1431 pub cut_type: CutType,
1432 #[serde(default)]
1434 #[builder(default)]
1435 pub strategy: CutStrategy,
1436 #[serde(default)]
1444 #[builder(default)]
1445 pub extra_face_ids: Vec<Uuid>,
1446 #[serde(default, skip_serializing_if = "super::is_false")]
1448 #[builder(default)]
1449 pub use_legacy: bool,
1450 #[serde(default, skip_serializing_if = "EdgeCutVersion::is_default")]
1452 #[builder(default)]
1453 pub version: EdgeCutVersion,
1454 }
1455
1456 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1458 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1459 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1460 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1461 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1462 pub struct Solid3dCutEdgeReferences {
1463 pub object_id: Uuid,
1465 #[serde(default)]
1467 #[builder(default)]
1468 pub edges_references: Vec<EdgeSpecifier>,
1469 pub cut_type: CutTypeV2,
1471 pub tolerance: LengthUnit,
1474 #[serde(default)]
1476 #[builder(default)]
1477 pub strategy: CutStrategy,
1478 #[serde(default)]
1486 #[builder(default)]
1487 pub extra_face_ids: Vec<Uuid>,
1488 #[serde(default, skip_serializing_if = "super::is_false")]
1490 #[builder(default)]
1491 pub use_legacy: bool,
1492 #[serde(default, skip_serializing_if = "EdgeCutVersion::is_default")]
1494 #[builder(default)]
1495 pub version: EdgeCutVersion,
1496 #[serde(default, skip_serializing_if = "super::is_false")]
1498 #[builder(default)]
1499 pub tangent_chain: bool,
1500 }
1501
1502 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1504 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1505 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1506 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1507 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1508 pub struct Solid3dCutEdges {
1509 pub object_id: Uuid,
1511 #[serde(default)]
1513 #[builder(default)]
1514 pub edge_ids: Vec<Uuid>,
1515 pub cut_type: CutTypeV2,
1517 pub tolerance: LengthUnit,
1520 #[serde(default)]
1522 #[builder(default)]
1523 pub strategy: CutStrategy,
1524 #[serde(default)]
1532 #[builder(default)]
1533 pub extra_face_ids: Vec<Uuid>,
1534 #[serde(default, skip_serializing_if = "super::is_false")]
1536 #[builder(default)]
1537 pub use_legacy: bool,
1538 #[serde(default, skip_serializing_if = "EdgeCutVersion::is_default")]
1540 #[builder(default)]
1541 pub version: EdgeCutVersion,
1542 #[serde(default, skip_serializing_if = "super::is_false")]
1544 #[builder(default)]
1545 pub tangent_chain: bool,
1546 }
1547
1548 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1550 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1551 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1552 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1553 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1554 pub struct FaceIsPlanar {
1555 pub object_id: Uuid,
1557 }
1558
1559 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1561 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1562 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1563 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1564 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1565 pub struct FaceGetPosition {
1566 pub object_id: Uuid,
1568
1569 pub uv: Point2d<f64>,
1571 }
1572
1573 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1575 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1576 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1577 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1578 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1579 pub struct FaceGetCenter {
1580 pub object_id: Uuid,
1582 }
1583
1584 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1586 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1587 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1588 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1589 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1590 pub struct FaceGetGradient {
1591 pub object_id: Uuid,
1593
1594 pub uv: Point2d<f64>,
1596 }
1597
1598 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1600 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1601 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1602 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1603 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1604 pub struct SendObject {
1605 pub object_id: Uuid,
1607 pub front: bool,
1609 }
1610 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1612 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1613 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1614 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1615 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1616 pub struct EntitySetOpacity {
1617 pub entity_id: Uuid,
1619 pub opacity: f32,
1623 }
1624
1625 #[derive(Debug, Clone, 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 EntityFade {
1632 pub entity_id: Uuid,
1634 pub fade_in: bool,
1636 #[serde(default = "default_animation_seconds")]
1638 #[builder(default = default_animation_seconds())]
1639 pub duration_seconds: f64,
1640 }
1641
1642 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1644 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1645 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1646 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1647 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1648 pub struct MakePlane {
1649 pub origin: Point3d<LengthUnit>,
1651 pub x_axis: Point3d<f64>,
1653 pub y_axis: Point3d<f64>,
1655 pub size: LengthUnit,
1659 pub clobber: bool,
1661 pub hide: Option<bool>,
1663 }
1664
1665 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1667 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1668 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1669 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1670 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1671 pub struct PlaneSetColor {
1672 pub plane_id: Uuid,
1674 pub color: Color,
1676 }
1677
1678 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1680 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1681 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1682 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1683 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1684 pub struct SetTool {
1685 pub tool: SceneToolType,
1687 }
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 MouseMove {
1696 pub window: Point2d,
1698 pub sequence: Option<u32>,
1703 }
1704
1705 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1708 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1709 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1710 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1711 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1712 pub struct MouseClick {
1713 pub window: Point2d,
1715 }
1716
1717 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1721 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1722 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1723 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1724 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1725 pub struct SketchModeDisable {}
1726
1727 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1729 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1730 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1731 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1732 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1733 pub struct GetSketchModePlane {}
1734
1735 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1737 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1738 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1739 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1740 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1741 pub struct CurveSetConstraint {
1742 pub object_id: Uuid,
1744 pub constraint_bound: PathComponentConstraintBound,
1746 pub constraint_type: PathComponentConstraintType,
1748 }
1749
1750 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1752 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1753 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1754 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1755 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1756 pub struct EnableSketchMode {
1757 pub entity_id: Uuid,
1759 pub ortho: bool,
1762 pub animated: bool,
1764 pub adjust_camera: bool,
1766 pub planar_normal: Option<Point3d<f64>>,
1769 }
1770
1771 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1773 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1774 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1775 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1776 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1777 pub struct SetBackgroundColor {
1778 pub color: Color,
1780 }
1781
1782 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1784 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1785 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1786 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1787 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1788 pub struct SetCurrentToolProperties {
1789 pub color: Option<Color>,
1791 }
1792
1793 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1795 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1796 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1797 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1798 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1799 pub struct SetDefaultSystemProperties {
1800 #[serde(default)]
1802 pub tolerance: Option<Tolerance>,
1803 #[serde(default)]
1805 pub color: Option<Color>,
1806 #[serde(default)]
1808 pub backface_color: Option<Color>,
1809 #[serde(default)]
1811 pub highlight_color: Option<Color>,
1812 #[serde(default)]
1814 pub selection_color: Option<Color>,
1815 #[serde(default)]
1817 pub edge_3d_color: Option<Color>,
1818 }
1819
1820 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1822 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1823 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1824 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1825 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1826 pub struct CurveGetType {
1827 pub curve_id: Uuid,
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 CurveGetControlPoints {
1838 pub curve_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 ProjectEntityToPlane {
1849 #[serde(default, skip_serializing_if = "Option::is_none")]
1851 pub entity_id: Option<Uuid>,
1852 #[serde(default, skip_serializing_if = "Option::is_none")]
1854 pub entity_reference: Option<EntityReference>,
1855 pub plane_id: Uuid,
1857 pub use_plane_coords: bool,
1860 }
1861
1862 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1864 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1865 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1866 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1867 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1868 pub struct ProjectPointsToPlane {
1869 pub plane_id: Uuid,
1871 pub points: Vec<Point3d<f64>>,
1873 pub use_plane_coords: bool,
1876 }
1877
1878 #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize, JsonSchema, FromStr, Display)]
1880 #[serde(rename_all = "snake_case")]
1881 #[display(style = "snake_case")]
1882 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1883 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1884 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1885 #[cfg_attr(feature = "python", pyo3::pyclass(from_py_object), pyo3_stub_gen::derive::gen_stub_pyclass_enum)]
1886 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1887 pub enum ImageFormat {
1888 Png,
1890 Jpeg,
1892 }
1893
1894 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1896 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1897 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1898 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1899 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1900 pub struct TakeSnapshot {
1901 pub format: ImageFormat,
1903 }
1904
1905 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1907 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1908 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1909 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1910 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1911 pub struct MakeAxesGizmo {
1912 pub gizmo_mode: bool,
1915 pub clobber: bool,
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 PathGetInfo {
1926 pub path_id: Uuid,
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 PathGetCurveUuidsForVertices {
1937 pub path_id: Uuid,
1939
1940 pub vertex_ids: Vec<Uuid>,
1942 }
1943
1944 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1946 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1947 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1948 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1949 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1950 pub struct PathGetCurveUuid {
1951 pub path_id: Uuid,
1953
1954 pub index: u32,
1956 }
1957
1958 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1960 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1961 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1962 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1963 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1964 pub struct PathGetVertexUuids {
1965 pub path_id: Uuid,
1967 }
1968
1969 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1971 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1972 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1973 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1974 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1975 pub struct PathGetSketchTargetUuid {
1976 pub path_id: Uuid,
1978 }
1979
1980 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1982 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1983 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1984 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1985 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1986 pub struct HandleMouseDragStart {
1987 pub window: Point2d,
1989 }
1990
1991 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1993 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1994 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1995 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1996 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1997 pub struct HandleMouseDragMove {
1998 pub window: Point2d,
2000 pub sequence: Option<u32>,
2005 }
2006
2007 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2009 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2010 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2011 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2012 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2013 pub struct HandleMouseDragEnd {
2014 pub window: Point2d,
2016 }
2017
2018 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2020 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2021 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2022 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2023 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2024 pub struct RemoveSceneObjects {
2025 pub object_ids: HashSet<Uuid>,
2027 }
2028
2029 #[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 PlaneIntersectAndProject {
2037 pub plane_id: Uuid,
2039 pub window: Point2d,
2041 }
2042
2043 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2045 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2046 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2047 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2048 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2049 pub struct CurveGetEndPoints {
2050 pub curve_id: Uuid,
2052 }
2053
2054 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2056 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2057 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2058 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2059 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2060 pub struct ReconfigureStream {
2061 pub width: u32,
2063 pub height: u32,
2065 pub fps: u32,
2067 #[serde(default)]
2069 pub bitrate: Option<u32>,
2070 }
2071
2072 #[derive(Debug, Eq, PartialEq, Clone, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2080 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2081 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2082 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2083 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2084 pub struct ImportFiles {
2085 pub files: Vec<super::ImportFile>,
2087 pub format: crate::format::InputFormat3d,
2089 }
2090
2091 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2097 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2098 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2099 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2100 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2101 pub struct SetSceneUnits {
2102 pub unit: units::UnitLength,
2104 }
2105
2106 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2108 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2109 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2110 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2111 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2112 pub struct Mass {
2113 #[builder(default)]
2116 pub entity_ids: Vec<Uuid>,
2117 pub material_density: f64,
2119 pub material_density_unit: units::UnitDensity,
2121 pub output_unit: units::UnitMass,
2123 }
2124
2125 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2127 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2128 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2129 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2130 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2131 pub struct Density {
2132 #[builder(default)]
2135 pub entity_ids: Vec<Uuid>,
2136 pub material_mass: f64,
2138 pub material_mass_unit: units::UnitMass,
2140 pub output_unit: units::UnitDensity,
2142 }
2143
2144 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2146 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2147 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2148 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2149 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2150 pub struct Volume {
2151 #[builder(default)]
2154 pub entity_ids: Vec<Uuid>,
2155 pub output_unit: units::UnitVolume,
2157 }
2158
2159 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2161 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2162 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2163 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2164 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2165 pub struct CenterOfMass {
2166 #[builder(default)]
2169 pub entity_ids: Vec<Uuid>,
2170 pub output_unit: units::UnitLength,
2172 }
2173
2174 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2176 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2177 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2178 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2179 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2180 pub struct SurfaceArea {
2181 #[builder(default)]
2184 pub entity_ids: Vec<Uuid>,
2185 pub output_unit: units::UnitArea,
2187 }
2188
2189 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2193 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2194 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2195 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2196 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2197 pub struct PhysicalProperties {
2198 #[builder(default)]
2201 pub entity_ids: Vec<Uuid>,
2202 pub material_density: f64,
2204 pub material_density_unit: units::UnitDensity,
2206 pub material_mass: f64,
2208 pub material_mass_unit: units::UnitMass,
2210 pub mass_output_unit: units::UnitMass,
2212 pub density_output_unit: units::UnitDensity,
2214 pub volume_output_unit: units::UnitVolume,
2216 pub center_of_mass_output_unit: units::UnitLength,
2218 pub surface_area_output_unit: units::UnitArea,
2220 pub bounding_box_output_unit: units::UnitLength,
2222 }
2223
2224 #[derive(
2226 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2227 Builder
2228 )]
2229 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2230 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2231 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2232 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2233 pub struct DefaultCameraFocusOn {
2234 pub uuid: Uuid,
2236 }
2237 #[derive(
2239 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2240 Builder
2241 )]
2242 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2243 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2244 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2245 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2246 pub struct SetSelectionType {
2247 pub selection_type: SceneSelectionType,
2249 }
2250
2251 #[derive(
2253 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2254 Builder
2255 )]
2256 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2257 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2258 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2259 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2260 pub struct SetSelectionFilter {
2261 pub filter: Vec<EntityType>,
2264 }
2265
2266 #[derive(
2268 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2269 Builder
2270 )]
2271 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2272 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2273 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2274 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2275 pub struct SceneGetEntityIds {
2276 pub filter: Vec<EntityType>,
2278 pub skip: u32,
2281 #[schemars(range(min = 1, max = 1000))]
2286 pub take: u32,
2287 }
2288
2289 #[derive(
2291 Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2292 Builder
2293 )]
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 DefaultCameraSetOrthographic {}
2299
2300 #[derive(
2302 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2303 Builder
2304 )]
2305 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2306 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2307 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2308 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2309 pub struct DefaultCameraSetPerspective {
2310 pub parameters: Option<PerspectiveCameraParameters>,
2312 }
2313
2314 #[derive(
2317 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder
2318 )]
2319 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2320 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2321 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2322 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2323 pub struct DefaultCameraCenterToSelection {
2324 #[serde(default)]
2327 #[builder(default)]
2328 pub camera_movement: CameraMovement,
2329 }
2330
2331 #[derive(
2333 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder
2334 )]
2335 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2336 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2337 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2338 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2339 pub struct DefaultCameraCenterToScene {
2340 #[serde(default)]
2343 #[builder(default)]
2344 pub camera_movement: CameraMovement,
2345 }
2346
2347 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2349 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2350 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2351 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2352 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2353 pub struct ZoomToFit {
2354 #[serde(default)]
2356 #[builder(default)]
2357 pub object_ids: Vec<Uuid>,
2358 #[serde(default)]
2363 #[builder(default)]
2364 pub padding: f32,
2365 #[serde(default)]
2367 #[builder(default)]
2368 pub animated: bool,
2369 }
2370
2371 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2373 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2374 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2375 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2376 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2377 pub struct OrientToFace {
2378 pub face_id: Uuid,
2380 #[serde(default)]
2385 #[builder(default)]
2386 pub padding: f32,
2387 #[serde(default)]
2389 #[builder(default)]
2390 pub animated: bool,
2391 }
2392
2393 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
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 ViewIsometric {
2400 #[serde(default)]
2405 #[builder(default)]
2406 pub padding: f32,
2407 }
2408
2409 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2411 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2412 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2413 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2414 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2415 pub struct Solid3dGetExtrusionFaceInfo {
2416 pub object_id: Uuid,
2418 #[serde(default, skip_serializing_if = "Option::is_none")]
2420 pub edge_id: Option<Uuid>,
2421 }
2422
2423 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2425 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2426 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2427 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2428 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2429 pub struct Solid3dGetAdjacencyInfo {
2430 pub object_id: Uuid,
2432 #[serde(default, skip_serializing_if = "Option::is_none")]
2434 pub edge_id: Option<Uuid>,
2435 }
2436
2437
2438 #[derive(Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2440 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2441 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2442 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2443 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2444 pub struct SelectClear {}
2445
2446 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
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 SelectEntity {
2454 pub entities: Vec<EntityReference>,
2456 }
2457
2458 #[derive(Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2460 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2461 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2462 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2463 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2464 pub struct SelectGet {}
2465
2466 #[derive(
2468 Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2469 Builder
2470 )]
2471 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2472 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2473 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2474 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2475 pub struct GetNumObjects {}
2476
2477 #[derive(
2479 Clone, Debug, Deserialize, PartialEq, JsonSchema, Serialize, ModelingCmdVariant,
2480 Builder
2481 )]
2482 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2483 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2484 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2485 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2486 pub struct SetObjectTransform
2487 {
2488 pub object_id: Uuid,
2490 pub transforms: Vec<ComponentTransform>,
2492 }
2493
2494 #[derive(
2511 Clone, Debug, Deserialize, PartialEq, JsonSchema, Serialize, ModelingCmdVariant,
2512 Builder
2513 )]
2514 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2515 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2516 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2517 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2518 pub struct BooleanUnion
2519 {
2520 pub solid_ids: Vec<Uuid>,
2523 #[serde(default)]
2525 #[builder(default)]
2526 pub separate_bodies: bool,
2527 #[serde(default, skip_serializing_if = "super::is_false")]
2529 #[builder(default)]
2530 pub use_legacy: bool,
2531 pub tolerance: LengthUnit,
2533 }
2534
2535 #[derive(
2538 Clone, Debug, Deserialize, PartialEq, JsonSchema, Serialize, ModelingCmdVariant,
2539 Builder
2540 )]
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 BooleanIntersection
2546 {
2547 pub solid_ids: Vec<Uuid>,
2549 #[serde(default)]
2551 #[builder(default)]
2552 pub separate_bodies: bool,
2553 #[serde(default, skip_serializing_if = "super::is_false")]
2555 #[builder(default)]
2556 pub use_legacy: bool,
2557 pub tolerance: LengthUnit,
2559 }
2560
2561 #[derive(
2582 Clone, Debug, Deserialize, PartialEq, JsonSchema, Serialize, ModelingCmdVariant,
2583 Builder
2584 )]
2585 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2586 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2587 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2588 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2589 pub struct BooleanSubtract
2590 {
2591 pub target_ids: Vec<Uuid>,
2593 pub tool_ids: Vec<Uuid>,
2595 #[serde(default)]
2597 #[builder(default)]
2598 pub separate_bodies: bool,
2599 #[serde(default, skip_serializing_if = "super::is_false")]
2601 #[builder(default)]
2602 pub use_legacy: bool,
2603 pub tolerance: LengthUnit,
2605 }
2606
2607 #[derive(
2609 Clone, Debug, Deserialize, PartialEq, JsonSchema, Serialize, ModelingCmdVariant,
2610 Builder
2611 )]
2612 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2613 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2614 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2615 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2616 pub struct BooleanImprint
2617 {
2618 #[serde(alias = "target_ids")]
2620 pub body_ids: Vec<Uuid>,
2621 #[serde(default)]
2624 pub tool_ids: Option<Vec<Uuid>>,
2625 #[serde(default)]
2627 #[builder(default)]
2628 pub separate_bodies: bool,
2629 #[serde(default, skip_serializing_if = "super::is_false")]
2631 #[builder(default)]
2632 pub use_legacy: bool,
2633 #[serde(default)]
2635 #[builder(default)]
2636 pub keep_tools: bool,
2637 pub tolerance: LengthUnit,
2639 }
2640
2641 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2644 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2645 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2646 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2647 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2648 pub struct MakeOffsetPath {
2649 pub object_id: Uuid,
2651 #[serde(default)]
2656 pub face_id: Option<Uuid>,
2657 pub offset: LengthUnit,
2659 }
2660
2661 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2663 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2664 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2665 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2666 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2667 pub struct AddHoleFromOffset {
2668 pub object_id: Uuid,
2670 pub offset: LengthUnit,
2672 }
2673
2674 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2676 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2677 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2678 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2679 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2680 pub struct SetGridReferencePlane {
2681 pub grid_id: Uuid,
2683 pub reference_id: Uuid,
2686 }
2687
2688 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2690 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2691 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2692 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2693 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2694 pub struct SetGridScale {
2695 pub value: f32,
2697 pub units: units::UnitLength,
2699 }
2700
2701 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2704 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2705 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2706 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2707 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2708 pub struct SetGridAutoScale {
2709 }
2710
2711 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2714 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2715 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2716 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2717 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2718 pub struct SetOrderIndependentTransparency {
2719 pub enabled: Option<bool>,
2722 }
2723
2724 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2728 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2729 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2730 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2731 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2732 pub struct CreateRegion {
2733 pub object_id: Uuid,
2735 pub segment: Uuid,
2737 pub intersection_segment: Uuid,
2740 #[serde(default = "super::negative_one")]
2744 #[builder(default = super::negative_one())]
2745 pub intersection_index: i32,
2746 #[serde(default)]
2749 #[builder(default)]
2750 pub curve_clockwise: bool,
2751 #[serde(default, skip_serializing_if = "RegionVersion::is_zero")]
2753 #[builder(default)]
2754 pub version: RegionVersion,
2755 }
2756
2757 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2760 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2761 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2762 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2763 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2764 pub struct ToggleGraphics {
2765 pub graphics_enabled: bool,
2767 }
2768
2769 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2772 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2773 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2774 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2775 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2776 pub struct CreatePlanarSurface {
2777 pub curve_ids: Vec<Uuid>,
2781 pub tolerance: LengthUnit,
2783 }
2784
2785 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2787 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2788 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2789 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2790 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2791 pub struct RegionGetResolvableIntersectionInfo {
2792 pub region_id: Uuid,
2794 }
2795
2796 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2800 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2801 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2802 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2803 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2804 pub struct CreateRegionFromQueryPoint {
2805 pub object_id: Uuid,
2807
2808 pub query_point: Point2d<LengthUnit>,
2811 #[serde(default, skip_serializing_if = "RegionVersion::is_zero")]
2813 #[builder(default)]
2814 pub version: RegionVersion,
2815 }
2816
2817 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2819 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2820 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2821 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2822 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2823 pub struct RegionGetQueryPoint {
2824 pub region_id: Uuid,
2826 }
2827
2828 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2831 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2832 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2833 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2834 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2835 pub struct SelectRegionFromPoint {
2836 pub selected_at_window: Point2d,
2838 }
2839
2840 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2842 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2843 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2844 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2845 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2846 pub struct BoundingBox {
2847 #[builder(default)]
2850 pub entity_ids: Vec<Uuid>,
2851 #[builder(default = mm())]
2853 #[serde(default = "mm")]
2854 pub output_unit: units::UnitLength,
2855 }
2856
2857 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2859 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2860 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2861 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2862 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2863 pub struct OffsetSurface {
2864 pub surface_id: Uuid,
2866 pub distance: LengthUnit,
2868 pub flip: bool,
2870 }
2871
2872 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2879 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2880 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2881 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2882 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2883 pub struct BeginExecution {
2884 pub enable_render: bool,
2888 }
2889
2890 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder, Default)]
2893 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2894 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2895 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2896 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2897 pub struct EndExecution {
2898 }
2899
2900 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2902 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2903 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2904 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2905 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2906 pub struct ClosestEdge {
2907 #[serde(default)]
2910 pub object_id: Option<Uuid>,
2911 pub closest_to: Point3d<f64>,
2914 }
2915
2916 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2918 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2919 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2920 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2921 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2922 pub struct SketchGetInfo {
2923 pub path_id: ModelingCmdId,
2925 }
2926
2927 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2929 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2930 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2931 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2932 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2933 pub struct SetKclVersion {
2934 pub kcl_version: crate::KclVersion,
2936 }
2937 }
2938}
2939
2940pub(crate) fn is_false(b: &bool) -> bool {
2941 !b
2942}
2943
2944pub(crate) fn negative_one() -> i32 {
2945 -1
2946}
2947
2948impl ModelingCmd {
2949 pub fn is_safe_to_batch(&self) -> bool {
2951 use ModelingCmd::*;
2952 matches!(
2953 self,
2954 MovePathPen(_)
2955 | ExtendPath(_)
2956 | Extrude(_)
2957 | Revolve(_)
2958 | Solid3dFilletEdge(_)
2959 | ClosePath(_)
2960 | UpdateAnnotation(_)
2961 | ObjectVisible(_)
2962 | ObjectBringToFront(_)
2963 | Solid2dAddHole(_)
2964 | SendObject(_)
2965 | EntitySetOpacity(_)
2966 | PlaneSetColor(_)
2967 | SetTool(_)
2968 )
2969 }
2970}
2971
2972#[derive(Clone, Serialize, Deserialize, JsonSchema, Eq, PartialEq, bon::Builder)]
2974#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2975#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2976#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2977#[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2978pub struct ImportFile {
2979 pub path: String,
2981 #[serde(
2983 serialize_with = "serde_bytes::serialize",
2984 deserialize_with = "serde_bytes::deserialize"
2985 )]
2986 pub data: Vec<u8>,
2987}
2988
2989impl std::fmt::Debug for ImportFile {
2990 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2991 f.debug_struct("ImportFile")
2992 .field("path", &self.path)
2993 .field("data", &"<redacted>")
2994 .finish()
2995 }
2996}
2997
2998impl ToggleGraphics {
2999 pub fn enabled(graphics_enabled: bool) -> Self {
3001 Self::builder().graphics_enabled(graphics_enabled).build()
3002 }
3003}