1use kittycad_modeling_cmds_macros::define_modeling_cmd_enum;
2use schemars::JsonSchema;
3use serde::{Deserialize, Serialize};
4
5pub use self::each_cmd::*;
6use crate::{self as kittycad_modeling_cmds};
7
8define_modeling_cmd_enum! {
9 pub mod each_cmd {
10 use std::collections::HashSet;
11
12 use bon::Builder;
13 use crate::{self as kittycad_modeling_cmds};
14 use kittycad_modeling_cmds_macros::{ModelingCmdVariant};
15 use parse_display_derive::{Display, FromStr};
16 use schemars::JsonSchema;
17 use serde::{Deserialize, Serialize};
18 use uuid::Uuid;
19 use crate::shared::CameraViewState;
20 use crate::shared::MirrorAcross;
21
22 use crate::{
23 format::{OutputFormat2d, OutputFormat3d},
24 id::ModelingCmdId,
25 length_unit::LengthUnit,
26 shared::{
27 Angle,
28 RegionVersion,
29 BlendType,
30 BodyType,
31 ComponentTransform,
32 RelativeTo,
33 CutType, CutTypeV2,
34 CutStrategy,
35 CameraMovement,
36 ExtrudedFaceInfo, ExtrudeMethod,
37 AnnotationOptions, AnnotationType, CameraDragInteractionType, Color, DistanceType, EntityType,
38 PathComponentConstraintBound, PathComponentConstraintType, PathSegment, PerspectiveCameraParameters,
39 Point2d, Point3d, ExtrudeReference, SceneSelectionType, SceneToolType, SurfaceEdgeReference, Opposite,
40 },
41 units,
42 };
43
44 fn default_animation_seconds() -> f64 {
46 0.4
47 }
48
49 fn mm() -> crate::units::UnitLength {
50 crate::units::UnitLength::Millimeters
51 }
52
53 #[derive(
55 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
56 )]
57 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
58 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
59 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
60 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
61 pub struct EngineUtilEvaluatePath {
62 pub path_json: String,
64
65 pub t: f64,
67 }
68
69 #[derive(
71 Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant,
72 Builder
73 )]
74 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
75 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
76 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
77 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
78 pub struct StartPath {}
79
80 #[derive(
88 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
89 )]
90 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
91 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
92 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
93 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
94 pub struct MovePathPen {
95 pub path: ModelingCmdId,
97 pub to: Point3d<LengthUnit>,
99 }
100
101 #[derive(
104 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
105 )]
106 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
107 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
108 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
109 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
110 pub struct ExtendPath {
111 pub path: ModelingCmdId,
113 pub segment: PathSegment,
116 #[serde(default, skip_serializing_if = "Option::is_none")]
118 pub label: Option<String>,
119 }
120
121 #[derive(
123 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
124 )]
125 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
126 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
127 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
128 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
129 pub struct Extrude {
130 pub target: ModelingCmdId,
133 pub distance: LengthUnit,
135 #[serde(default)]
138 pub faces: Option<ExtrudedFaceInfo>,
139 #[serde(default)]
142 #[builder(default)]
143 pub opposite: Opposite<LengthUnit>,
144 #[builder(default)]
146 #[serde(default)]
147 pub extrude_method: ExtrudeMethod,
148 #[serde(default, skip_serializing_if = "Option::is_none")]
152 pub merge_coplanar_faces: Option<bool>,
153
154 #[serde(default)]
156 #[builder(default)]
157 pub body_type: BodyType,
158 }
159
160 #[derive(
162 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
163 )]
164 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
165 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
166 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
167 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
168 pub struct ExtrudeToReference {
169 pub target: ModelingCmdId,
172 pub reference: ExtrudeReference,
175 #[serde(default)]
178 pub faces: Option<ExtrudedFaceInfo>,
179 #[serde(default)]
181 #[builder(default)]
182 pub extrude_method: ExtrudeMethod,
183 #[serde(default)]
185 #[builder(default)]
186 pub body_type: BodyType,
187 }
188
189 fn default_twist_extrude_section_interval() -> Angle {
190 Angle::from_degrees(15.0)
191 }
192
193 #[derive(
195 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
196 )]
197 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
198 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
199 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
200 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
201 pub struct TwistExtrude {
202 pub target: ModelingCmdId,
205 pub distance: LengthUnit,
207 #[serde(default)]
210 pub faces: Option<ExtrudedFaceInfo>,
211 #[serde(default)]
214 #[builder(default)]
215 pub center_2d: Point2d<f64>,
216 pub total_rotation_angle: Angle,
218 #[serde(default = "default_twist_extrude_section_interval")]
220 #[builder(default = default_twist_extrude_section_interval())]
221 pub angle_step_size: Angle,
222 pub tolerance: LengthUnit,
224 #[serde(default)]
226 #[builder(default)]
227 pub body_type: BodyType,
228 }
229
230 #[derive(
232 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder
233 )]
234 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
235 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
236 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
237 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
238 pub struct Sweep {
239 pub target: ModelingCmdId,
242 pub trajectory: ModelingCmdId,
244 pub sectional: bool,
246 pub tolerance: LengthUnit,
248 #[serde(default)]
250 #[builder(default)]
251 pub body_type: BodyType,
252 #[serde(default)]
254 #[builder(default)]
255 pub relative_to: RelativeTo,
256 #[serde(default, skip_serializing_if = "Option::is_none")]
259 pub version: Option<u8>,
260 }
261
262 #[derive(
264 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
265 )]
266 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
267 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
268 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
269 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
270 pub struct Revolve {
271 pub target: ModelingCmdId,
274 pub origin: Point3d<LengthUnit>,
276 pub axis: Point3d<f64>,
278 pub axis_is_2d: bool,
280 pub angle: Angle,
282 pub tolerance: LengthUnit,
284 #[serde(default)]
287 #[builder(default)]
288 pub opposite: Opposite<Angle>,
289 #[serde(default)]
291 #[builder(default)]
292 pub body_type: BodyType,
293 }
294
295 #[derive(
297 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
298 )]
299 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
300 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
301 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
302 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
303 pub struct Solid3dShellFace {
304 pub object_id: Uuid,
306 pub face_ids: Vec<Uuid>,
308 pub shell_thickness: LengthUnit,
311 #[serde(default)]
313 #[builder(default)]
314 pub hollow: bool,
315 }
316
317 #[derive(
323 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
324 )]
325 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
326 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
327 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
328 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
329 pub struct Solid3dJoin {
330 pub object_id: Uuid,
332 }
333
334 #[derive(
336 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
337 )]
338 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
339 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
340 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
341 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
342 pub struct Solid3dMultiJoin {
343 pub object_ids: Vec<Uuid>,
345 pub tolerance: LengthUnit,
347 }
348
349
350 #[derive(
352 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
353 )]
354 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
355 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
356 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
357 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
358 pub struct SurfaceBlend {
359 #[schemars(length(min = 2, max = 2))]
361 pub surfaces: Vec<SurfaceEdgeReference>,
362 #[serde(default)]
364 #[builder(default)]
365 pub blend_type: BlendType,
366 }
367
368 #[derive(
370 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
371 )]
372 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
373 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
374 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
375 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
376 pub struct Solid3dGetEdgeUuid {
377 pub object_id: Uuid,
379
380 pub edge_index: u32,
382 }
383
384 #[derive(
386 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
387 )]
388 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
389 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
390 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
391 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
392 pub struct Solid3dGetFaceUuid {
393 pub object_id: Uuid,
395
396 pub face_index: u32,
398 }
399
400 #[derive(
402 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
403 )]
404 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
405 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
406 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
407 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
408 pub struct Solid3dGetBodyType {
409 pub object_id: Uuid,
411 }
412
413 #[derive(
415 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
416 )]
417 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
418 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
419 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
420 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
421 pub struct RevolveAboutEdge {
422 pub target: ModelingCmdId,
425 pub edge_id: Uuid,
427 pub angle: Angle,
429 pub tolerance: LengthUnit,
431 #[serde(default)]
434 #[builder(default)]
435 pub opposite: Opposite<Angle>,
436 #[serde(default)]
438 #[builder(default)]
439 pub body_type: BodyType,
440 }
441
442 #[derive(
444 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
445 )]
446 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
447 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
448 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
449 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
450 pub struct Loft {
451 pub section_ids: Vec<Uuid>,
454 pub v_degree: std::num::NonZeroU32,
457 pub bez_approximate_rational: bool,
461 pub base_curve_index: Option<u32>,
463 pub tolerance: LengthUnit,
465 #[serde(default)]
467 #[builder(default)]
468 pub body_type: BodyType,
469 }
470
471
472 #[derive(
474 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
475 )]
476 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
477 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
478 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
479 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
480 pub struct ClosePath {
481 pub path_id: Uuid,
483 }
484
485 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
487 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
488 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
489 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
490 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
491 pub struct CameraDragStart {
492 pub interaction: CameraDragInteractionType,
494 pub window: Point2d,
496 }
497
498 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
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 CameraDragMove {
505 pub interaction: CameraDragInteractionType,
507 pub window: Point2d,
509 pub sequence: Option<u32>,
514 }
515
516 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
518 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
519 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
520 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
521 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
522 pub struct CameraDragEnd {
523 pub interaction: CameraDragInteractionType,
525 pub window: Point2d,
527 }
528
529 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
531 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
532 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
533 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
534 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
535 pub struct DefaultCameraGetSettings {}
536
537 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
539 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
540 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
541 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
542 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
543 pub struct DefaultCameraGetView {}
544
545 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
547 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
548 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
549 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
550 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
551 pub struct DefaultCameraSetView {
552 pub view: CameraViewState,
554 }
555
556 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
558 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
559 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
560 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
561 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
562 pub struct DefaultCameraLookAt {
563 pub vantage: Point3d,
565 pub center: Point3d,
567 pub up: Point3d,
569 pub sequence: Option<u32>,
574 }
575
576 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
578 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
579 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
580 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
581 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
582 pub struct DefaultCameraPerspectiveSettings {
583 pub vantage: Point3d,
585 pub center: Point3d,
587 pub up: Point3d,
589 pub fov_y: Option<f32>,
591 pub z_near: Option<f32>,
593 pub z_far: Option<f32>,
595 pub sequence: Option<u32>,
600 }
601
602 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
604 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
605 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
606 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
607 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
608 pub struct DefaultCameraZoom {
609 pub magnitude: f32,
613 }
614
615 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
617 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
618 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
619 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
620 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
621 pub struct Export2d {
622 pub entity_ids: Vec<Uuid>,
624 pub format: OutputFormat2d,
626 }
627
628 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
630 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
631 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
632 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
633 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
634 pub struct Export3d {
635 #[builder(default)]
637 pub entity_ids: Vec<Uuid>,
638 pub format: OutputFormat3d,
640 }
641
642 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
644 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
645 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
646 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
647 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
648 pub struct Export {
649 #[builder(default)]
651 pub entity_ids: Vec<Uuid>,
652 pub format: OutputFormat3d,
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 EntityGetParentId {
663 pub entity_id: Uuid,
665 }
666
667 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
669 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
670 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
671 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
672 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
673 pub struct EntityGetNumChildren {
674 pub entity_id: Uuid,
676 }
677
678 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
680 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
681 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
682 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
683 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
684 pub struct EntityGetChildUuid {
685 pub entity_id: Uuid,
687 pub child_index: u32,
689 }
690
691 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
693 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
694 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
695 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
696 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
697 pub struct EntityGetIndex {
698 pub entity_id: Uuid,
700 }
701
702 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
704 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
705 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
706 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
707 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
708 pub struct EntityGetPrimitiveIndex {
709 pub entity_id: Uuid,
711 }
712
713 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
716 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
717 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
718 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
719 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
720 pub struct EntityDeleteChildren {
721 pub entity_id: Uuid,
723 pub child_entity_ids: HashSet<Uuid>,
725 }
726
727 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
729 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
730 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
731 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
732 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
733 pub struct EntityGetAllChildUuids {
734 pub entity_id: Uuid,
736 }
737
738 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
740 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
741 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
742 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
743 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
744 pub struct EntityGetSketchPaths {
745 pub entity_id: Uuid,
747 }
748
749 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
751 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
752 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
753 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
754 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
755 pub struct EntityGetDistance {
756 pub entity_id1: Uuid,
758 pub entity_id2: Uuid,
760 pub distance_type: DistanceType,
762 }
763
764 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
767 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
768 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
769 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
770 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
771 pub struct EntityClone {
772 pub entity_id: Uuid,
774 }
775
776 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
779 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
780 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
781 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
782 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
783 pub struct EntityLinearPatternTransform {
784 pub entity_id: Uuid,
786 #[serde(default)]
790 #[builder(default)]
791 pub transform: Vec<crate::shared::Transform>,
792 #[serde(default)]
796 #[builder(default)]
797 pub transforms: Vec<Vec<crate::shared::Transform>>,
798 }
799
800 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
802 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
803 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
804 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
805 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
806 pub struct EntityLinearPattern {
807 pub entity_id: Uuid,
809 pub axis: Point3d<f64>,
812 pub num_repetitions: u32,
814 pub spacing: LengthUnit,
816 }
817 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
819 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
820 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
821 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
822 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
823 pub struct EntityCircularPattern {
824 pub entity_id: Uuid,
826 pub axis: Point3d<f64>,
829 pub center: Point3d<LengthUnit>,
832 pub num_repetitions: u32,
834 pub arc_degrees: f64,
836 pub rotate_duplicates: bool,
838 }
839
840 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
842 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
843 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
844 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
845 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
846 pub struct EntityMakeHelix {
847 pub cylinder_id: Uuid,
849 pub revolutions: f64,
851 #[serde(default)]
853 #[builder(default)]
854 pub start_angle: Angle,
855 pub is_clockwise: bool,
857 pub length: Option<LengthUnit>,
859 }
860
861 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
863 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
864 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
865 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
866 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
867 pub struct EntityMakeHelixFromParams {
868 pub radius: LengthUnit,
870 pub length: LengthUnit,
872 pub revolutions: f64,
874 #[serde(default)]
876 #[builder(default)]
877 pub start_angle: Angle,
878 pub is_clockwise: bool,
880 pub center: Point3d<LengthUnit>,
882 pub axis: Point3d<f64>,
884 }
885
886 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
888 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
889 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
890 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
891 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
892 pub struct EntityMakeHelixFromEdge {
893 pub radius: LengthUnit,
895 pub length: Option<LengthUnit>,
897 pub revolutions: f64,
899 #[serde(default)]
901 #[builder(default)]
902 pub start_angle: Angle,
903 pub is_clockwise: bool,
905 pub edge_id: Uuid,
907 }
908
909 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
911 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
912 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
913 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
914 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
915 pub struct EntityMirrorAcross {
916 pub ids: Vec<Uuid>,
918 pub across: MirrorAcross,
920 }
921
922
923 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
926 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
927 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
928 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
929 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
930 pub struct EntityMirror {
931 pub ids: Vec<Uuid>,
933 pub axis: Point3d<f64>,
935 pub point: Point3d<LengthUnit>,
937 }
938
939 #[derive(
942 Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder
943 )]
944 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
945 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
946 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
947 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
948 pub struct EntityMirrorAcrossEdge {
949 pub ids: Vec<Uuid>,
951 pub edge_id: Uuid,
953 }
954
955 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
958 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
959 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
960 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
961 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
962 pub struct SelectWithPoint {
963 pub selected_at_window: Point2d,
965 pub selection_type: SceneSelectionType,
967 }
968
969 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
971 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
972 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
973 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
974 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
975 pub struct SelectAdd {
976 pub entities: Vec<Uuid>,
978 }
979
980 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
982 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
983 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
984 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
985 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
986 pub struct SelectRemove {
987 pub entities: Vec<Uuid>,
989 }
990
991 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
993 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
994 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
995 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
996 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
997 pub struct SceneClearAll {}
998
999 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1001 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1002 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1003 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1004 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1005 pub struct SelectReplace {
1006 pub entities: Vec<Uuid>,
1008 }
1009
1010 #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1013 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1014 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1015 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1016 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1017 pub struct HighlightSetEntity {
1018 pub selected_at_window: Point2d,
1020 pub sequence: Option<u32>,
1025 }
1026
1027 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1029 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1030 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1031 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1032 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1033 pub struct HighlightSetEntities {
1034 pub entities: Vec<Uuid>,
1036 }
1037
1038 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1040 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1041 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1042 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1043 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1044 pub struct NewAnnotation {
1045 pub options: AnnotationOptions,
1047 pub clobber: bool,
1049 pub annotation_type: AnnotationType,
1051 }
1052
1053 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1055 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1056 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1057 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1058 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1059 pub struct UpdateAnnotation {
1060 pub annotation_id: Uuid,
1062 pub options: AnnotationOptions,
1065 }
1066
1067 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1069 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1070 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1071 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1072 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1073 pub struct EdgeLinesVisible {
1074 pub hidden: bool,
1076 }
1077
1078 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1080 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1081 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1082 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1083 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1084 pub struct ObjectVisible {
1085 pub object_id: Uuid,
1087 pub hidden: bool,
1089 }
1090
1091 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1093 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1094 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1095 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1096 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1097 pub struct ObjectBringToFront {
1098 pub object_id: Uuid,
1100 }
1101
1102 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1104 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1105 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1106 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1107 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1108 pub struct ObjectSetMaterialParamsPbr {
1109 pub object_id: Uuid,
1111 pub color: Color,
1113 pub metalness: f32,
1115 pub roughness: f32,
1117 pub ambient_occlusion: f32,
1119 #[serde(default, skip_serializing_if = "Option::is_none")]
1121 pub backface_color: Option<Color>,
1122 }
1123 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1125 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1126 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1127 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1128 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1129 pub struct GetEntityType {
1130 pub entity_id: Uuid,
1132 }
1133
1134 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1136 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1137 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1138 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1139 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1140 pub struct Solid3dGetAllEdgeFaces {
1141 pub object_id: Uuid,
1143 pub edge_id: Uuid,
1145 }
1146
1147 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1149 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1150 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1151 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1152 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1153 pub struct Solid3dFlip {
1154 pub object_id: Uuid,
1156 }
1157
1158 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1161 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1162 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1163 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1164 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1165 pub struct Solid3dFlipFace {
1166 pub object_id: Uuid,
1168 pub face_id: Uuid,
1170 }
1171
1172 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1174 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1175 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1176 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1177 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1178 pub struct Solid2dAddHole {
1179 pub object_id: Uuid,
1181 pub hole_id: Uuid,
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 Solid3dGetAllOppositeEdges {
1192 pub object_id: Uuid,
1194 pub edge_id: Uuid,
1196 pub along_vector: Option<Point3d<f64>>,
1198 }
1199
1200 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1202 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1203 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1204 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1205 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1206 pub struct Solid3dGetOppositeEdge {
1207 pub object_id: Uuid,
1209 pub edge_id: Uuid,
1211 pub face_id: Uuid,
1213 }
1214
1215 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1217 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1218 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1219 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1220 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1221 pub struct Solid3dGetNextAdjacentEdge {
1222 pub object_id: Uuid,
1224 pub edge_id: Uuid,
1226 pub face_id: Uuid,
1228 }
1229
1230 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1232 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1233 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1234 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1235 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1236 pub struct Solid3dGetPrevAdjacentEdge {
1237 pub object_id: Uuid,
1239 pub edge_id: Uuid,
1241 pub face_id: Uuid,
1243 }
1244
1245 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1247 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1248 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1249 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1250 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1251 pub struct Solid3dGetCommonEdge {
1252 pub object_id: Uuid,
1254 pub face_ids: [Uuid; 2]
1256 }
1257
1258 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1260 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1261 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1262 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1263 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1264 pub struct Solid3dFilletEdge {
1265 pub object_id: Uuid,
1267 #[serde(default)]
1269 pub edge_id: Option<Uuid>,
1270 #[serde(default)]
1272 #[builder(default)]
1273 pub edge_ids: Vec<Uuid>,
1274 pub radius: LengthUnit,
1276 pub tolerance: LengthUnit,
1278 #[serde(default)]
1280 #[builder(default)]
1281 pub cut_type: CutType,
1282 #[serde(default)]
1284 #[builder(default)]
1285 pub strategy: CutStrategy,
1286 #[serde(default)]
1294 #[builder(default)]
1295 pub extra_face_ids: Vec<Uuid>,
1296 #[serde(default, skip_serializing_if = "super::is_false")]
1298 #[builder(default)]
1299 pub use_legacy: bool,
1300 }
1301
1302 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1304 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1305 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1306 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1307 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1308 pub struct Solid3dCutEdges {
1309 pub object_id: Uuid,
1311 #[serde(default)]
1313 #[builder(default)]
1314 pub edge_ids: Vec<Uuid>,
1315 pub cut_type: CutTypeV2,
1317 pub tolerance: LengthUnit,
1320 #[serde(default)]
1322 #[builder(default)]
1323 pub strategy: CutStrategy,
1324 #[serde(default)]
1332 #[builder(default)]
1333 pub extra_face_ids: Vec<Uuid>,
1334 #[serde(default, skip_serializing_if = "super::is_false")]
1336 #[builder(default)]
1337 pub use_legacy: bool,
1338 }
1339
1340 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1342 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1343 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1344 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1345 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1346 pub struct FaceIsPlanar {
1347 pub object_id: Uuid,
1349 }
1350
1351 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1353 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1354 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1355 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1356 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1357 pub struct FaceGetPosition {
1358 pub object_id: Uuid,
1360
1361 pub uv: Point2d<f64>,
1363 }
1364
1365 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1367 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1368 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1369 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1370 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1371 pub struct FaceGetCenter {
1372 pub object_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 FaceGetGradient {
1383 pub object_id: Uuid,
1385
1386 pub uv: Point2d<f64>,
1388 }
1389
1390 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1392 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1393 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1394 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1395 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1396 pub struct SendObject {
1397 pub object_id: Uuid,
1399 pub front: bool,
1401 }
1402 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1404 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1405 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1406 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1407 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1408 pub struct EntitySetOpacity {
1409 pub entity_id: Uuid,
1411 pub opacity: f32,
1415 }
1416
1417 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1419 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1420 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1421 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1422 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1423 pub struct EntityFade {
1424 pub entity_id: Uuid,
1426 pub fade_in: bool,
1428 #[serde(default = "default_animation_seconds")]
1430 #[builder(default = default_animation_seconds())]
1431 pub duration_seconds: f64,
1432 }
1433
1434 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1436 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1437 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1438 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1439 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1440 pub struct MakePlane {
1441 pub origin: Point3d<LengthUnit>,
1443 pub x_axis: Point3d<f64>,
1445 pub y_axis: Point3d<f64>,
1447 pub size: LengthUnit,
1451 pub clobber: bool,
1453 pub hide: Option<bool>,
1455 }
1456
1457 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1459 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1460 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1461 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1462 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1463 pub struct PlaneSetColor {
1464 pub plane_id: Uuid,
1466 pub color: Color,
1468 }
1469
1470 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1472 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1473 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1474 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1475 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1476 pub struct SetTool {
1477 pub tool: SceneToolType,
1479 }
1480
1481 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1483 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1484 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1485 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1486 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1487 pub struct MouseMove {
1488 pub window: Point2d,
1490 pub sequence: Option<u32>,
1495 }
1496
1497 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1500 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1501 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1502 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1503 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1504 pub struct MouseClick {
1505 pub window: Point2d,
1507 }
1508
1509 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1513 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1514 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1515 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1516 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1517 pub struct SketchModeDisable {}
1518
1519 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1521 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1522 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1523 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1524 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1525 pub struct GetSketchModePlane {}
1526
1527 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1529 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1530 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1531 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1532 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1533 pub struct CurveSetConstraint {
1534 pub object_id: Uuid,
1536 pub constraint_bound: PathComponentConstraintBound,
1538 pub constraint_type: PathComponentConstraintType,
1540 }
1541
1542 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1544 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1545 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1546 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1547 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1548 pub struct EnableSketchMode {
1549 pub entity_id: Uuid,
1551 pub ortho: bool,
1554 pub animated: bool,
1556 pub adjust_camera: bool,
1558 pub planar_normal: Option<Point3d<f64>>,
1561 }
1562
1563 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1567 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1568 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1569 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1570 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1571 pub struct EnableDryRun {}
1572
1573 #[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1577 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1578 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1579 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1580 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1581 pub struct DisableDryRun {}
1582
1583 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1585 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1586 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1587 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1588 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1589 pub struct SetBackgroundColor {
1590 pub color: Color,
1592 }
1593
1594 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1596 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1597 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1598 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1599 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1600 pub struct SetCurrentToolProperties {
1601 pub color: Option<Color>,
1603 }
1604
1605 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1607 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1608 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1609 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1610 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1611 pub struct SetDefaultSystemProperties {
1612 #[serde(default)]
1614 pub color: Option<Color>,
1615 #[serde(default)]
1617 pub backface_color: Option<Color>,
1618 #[serde(default)]
1620 pub highlight_color: Option<Color>,
1621 #[serde(default)]
1623 pub selection_color: Option<Color>,
1624 }
1625
1626 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1628 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1629 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1630 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1631 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1632 pub struct CurveGetType {
1633 pub curve_id: Uuid,
1635 }
1636
1637 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1639 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1640 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1641 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1642 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1643 pub struct CurveGetControlPoints {
1644 pub curve_id: Uuid,
1646 }
1647
1648 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1650 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1651 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1652 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1653 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1654 pub struct ProjectEntityToPlane {
1655 pub entity_id: Uuid,
1657 pub plane_id: Uuid,
1659 pub use_plane_coords: bool,
1662 }
1663
1664 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1666 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1667 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1668 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1669 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1670 pub struct ProjectPointsToPlane {
1671 pub plane_id: Uuid,
1673 pub points: Vec<Point3d<f64>>,
1675 pub use_plane_coords: bool,
1678 }
1679
1680 #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize, JsonSchema, FromStr, Display)]
1682 #[serde(rename_all = "snake_case")]
1683 #[display(style = "snake_case")]
1684 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1685 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1686 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1687 #[cfg_attr(feature = "python", pyo3::pyclass, pyo3_stub_gen::derive::gen_stub_pyclass_enum)]
1688 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1689 pub enum ImageFormat {
1690 Png,
1692 Jpeg,
1694 }
1695
1696 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1698 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1699 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1700 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1701 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1702 pub struct TakeSnapshot {
1703 pub format: ImageFormat,
1705 }
1706
1707 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1709 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1710 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1711 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1712 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1713 pub struct MakeAxesGizmo {
1714 pub gizmo_mode: bool,
1717 pub clobber: bool,
1719 }
1720
1721 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1723 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1724 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1725 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1726 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1727 pub struct PathGetInfo {
1728 pub path_id: Uuid,
1730 }
1731
1732 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1734 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1735 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1736 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1737 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1738 pub struct PathGetCurveUuidsForVertices {
1739 pub path_id: Uuid,
1741
1742 pub vertex_ids: Vec<Uuid>,
1744 }
1745
1746 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1748 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1749 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1750 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1751 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1752 pub struct PathGetCurveUuid {
1753 pub path_id: Uuid,
1755
1756 pub index: u32,
1758 }
1759
1760 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1762 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1763 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1764 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1765 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1766 pub struct PathGetVertexUuids {
1767 pub path_id: Uuid,
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 PathGetSketchTargetUuid {
1778 pub path_id: Uuid,
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 HandleMouseDragStart {
1789 pub window: Point2d,
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 HandleMouseDragMove {
1800 pub window: Point2d,
1802 pub sequence: Option<u32>,
1807 }
1808
1809 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1811 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1812 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1813 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1814 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1815 pub struct HandleMouseDragEnd {
1816 pub window: Point2d,
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 RemoveSceneObjects {
1827 pub object_ids: HashSet<Uuid>,
1829 }
1830
1831 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1834 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1835 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1836 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1837 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1838 pub struct PlaneIntersectAndProject {
1839 pub plane_id: Uuid,
1841 pub window: Point2d,
1843 }
1844
1845 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1847 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1848 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1849 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1850 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1851 pub struct CurveGetEndPoints {
1852 pub curve_id: Uuid,
1854 }
1855
1856 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1858 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1859 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1860 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1861 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1862 pub struct ReconfigureStream {
1863 pub width: u32,
1865 pub height: u32,
1867 pub fps: u32,
1869 #[serde(default)]
1871 pub bitrate: Option<u32>,
1872 }
1873
1874 #[derive(Debug, Eq, PartialEq, Clone, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1876 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1877 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1878 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1879 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1880 pub struct ImportFiles {
1881 pub files: Vec<super::ImportFile>,
1883 pub format: crate::format::InputFormat3d,
1885 }
1886
1887 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1892 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1893 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1894 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1895 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1896 pub struct SetSceneUnits {
1897 pub unit: units::UnitLength,
1899 }
1900
1901 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1903 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1904 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1905 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1906 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1907 pub struct Mass {
1908 #[builder(default)]
1911 pub entity_ids: Vec<Uuid>,
1912 pub material_density: f64,
1914 pub material_density_unit: units::UnitDensity,
1916 pub output_unit: units::UnitMass,
1918 }
1919
1920 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1922 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1923 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1924 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1925 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1926 pub struct Density {
1927 #[builder(default)]
1930 pub entity_ids: Vec<Uuid>,
1931 pub material_mass: f64,
1933 pub material_mass_unit: units::UnitMass,
1935 pub output_unit: units::UnitDensity,
1937 }
1938
1939 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1941 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1942 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1943 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1944 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1945 pub struct Volume {
1946 #[builder(default)]
1949 pub entity_ids: Vec<Uuid>,
1950 pub output_unit: units::UnitVolume,
1952 }
1953
1954 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
1956 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1957 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1958 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1959 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1960 pub struct CenterOfMass {
1961 #[builder(default)]
1964 pub entity_ids: Vec<Uuid>,
1965 pub output_unit: units::UnitLength,
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 SurfaceArea {
1976 #[builder(default)]
1979 pub entity_ids: Vec<Uuid>,
1980 pub output_unit: units::UnitArea,
1982 }
1983
1984 #[derive(
1986 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
1987 Builder
1988 )]
1989 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1990 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
1991 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1992 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
1993 pub struct DefaultCameraFocusOn {
1994 pub uuid: Uuid,
1996 }
1997 #[derive(
1999 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2000 Builder
2001 )]
2002 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2003 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2004 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2005 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2006 pub struct SetSelectionType {
2007 pub selection_type: SceneSelectionType,
2009 }
2010
2011 #[derive(
2013 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2014 Builder
2015 )]
2016 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2017 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2018 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2019 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2020 pub struct SetSelectionFilter {
2021 pub filter: Vec<EntityType>,
2024 }
2025
2026 #[derive(
2028 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2029 Builder
2030 )]
2031 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2032 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2033 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2034 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2035 pub struct SceneGetEntityIds {
2036 pub filter: Vec<EntityType>,
2038 pub skip: u32,
2041 #[schemars(range(min = 1, max = 1000))]
2046 pub take: u32,
2047 }
2048
2049 #[derive(
2051 Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2052 Builder
2053 )]
2054 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2055 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2056 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2057 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2058 pub struct DefaultCameraSetOrthographic {}
2059
2060 #[derive(
2062 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2063 Builder
2064 )]
2065 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2066 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2067 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2068 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2069 pub struct DefaultCameraSetPerspective {
2070 pub parameters: Option<PerspectiveCameraParameters>,
2072 }
2073
2074 #[derive(
2077 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder
2078 )]
2079 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2080 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2081 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2082 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2083 pub struct DefaultCameraCenterToSelection {
2084 #[serde(default)]
2087 #[builder(default)]
2088 pub camera_movement: CameraMovement,
2089 }
2090
2091 #[derive(
2093 Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder
2094 )]
2095 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2096 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2097 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2098 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2099 pub struct DefaultCameraCenterToScene {
2100 #[serde(default)]
2103 #[builder(default)]
2104 pub camera_movement: CameraMovement,
2105 }
2106
2107 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2109 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2110 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2111 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2112 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2113 pub struct ZoomToFit {
2114 #[serde(default)]
2116 #[builder(default)]
2117 pub object_ids: Vec<Uuid>,
2118 #[serde(default)]
2123 #[builder(default)]
2124 pub padding: f32,
2125 #[serde(default)]
2127 #[builder(default)]
2128 pub animated: bool,
2129 }
2130
2131 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2133 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2134 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2135 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2136 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2137 pub struct OrientToFace {
2138 pub face_id: Uuid,
2140 #[serde(default)]
2145 #[builder(default)]
2146 pub padding: f32,
2147 #[serde(default)]
2149 #[builder(default)]
2150 pub animated: bool,
2151 }
2152
2153 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2155 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2156 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2157 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2158 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2159 pub struct ViewIsometric {
2160 #[serde(default)]
2165 #[builder(default)]
2166 pub padding: f32,
2167 }
2168
2169 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2171 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2172 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2173 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2174 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2175 pub struct Solid3dGetExtrusionFaceInfo {
2176 pub object_id: Uuid,
2178 pub edge_id: Uuid,
2180 }
2181
2182 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2184 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2185 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2186 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2187 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2188 pub struct Solid3dGetAdjacencyInfo {
2189 pub object_id: Uuid,
2191 pub edge_id: Uuid,
2193 }
2194
2195
2196 #[derive(Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2198 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2199 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2200 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2201 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2202 pub struct SelectClear {}
2203
2204 #[derive(Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2206 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2207 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2208 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2209 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2210 pub struct SelectGet {}
2211
2212 #[derive(
2214 Clone, Debug, Default, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant,
2215 Builder
2216 )]
2217 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2218 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2219 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2220 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2221 pub struct GetNumObjects {}
2222
2223 #[derive(
2225 Clone, Debug, Deserialize, PartialEq, JsonSchema, Serialize, ModelingCmdVariant,
2226 Builder
2227 )]
2228 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2229 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2230 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2231 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2232 pub struct SetObjectTransform
2233 {
2234 pub object_id: Uuid,
2236 pub transforms: Vec<ComponentTransform>,
2238 }
2239
2240 #[derive(
2243 Clone, Debug, Deserialize, PartialEq, JsonSchema, Serialize, ModelingCmdVariant,
2244 Builder
2245 )]
2246 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2247 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2248 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2249 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2250 pub struct BooleanUnion
2251 {
2252 pub solid_ids: Vec<Uuid>,
2255 #[serde(default)]
2257 #[builder(default)]
2258 pub separate_bodies: bool,
2259 #[serde(default, skip_serializing_if = "super::is_false")]
2261 #[builder(default)]
2262 pub use_legacy: bool,
2263 pub tolerance: LengthUnit,
2265 }
2266
2267 #[derive(
2270 Clone, Debug, Deserialize, PartialEq, JsonSchema, Serialize, ModelingCmdVariant,
2271 Builder
2272 )]
2273 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2274 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2275 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2276 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2277 pub struct BooleanIntersection
2278 {
2279 pub solid_ids: Vec<Uuid>,
2281 #[serde(default)]
2283 #[builder(default)]
2284 pub separate_bodies: bool,
2285 #[serde(default, skip_serializing_if = "super::is_false")]
2287 #[builder(default)]
2288 pub use_legacy: bool,
2289 pub tolerance: LengthUnit,
2291 }
2292
2293 #[derive(
2297 Clone, Debug, Deserialize, PartialEq, JsonSchema, Serialize, ModelingCmdVariant,
2298 Builder
2299 )]
2300 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2301 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2302 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2303 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2304 pub struct BooleanSubtract
2305 {
2306 pub target_ids: Vec<Uuid>,
2308 pub tool_ids: Vec<Uuid>,
2310 #[serde(default)]
2312 #[builder(default)]
2313 pub separate_bodies: bool,
2314 #[serde(default, skip_serializing_if = "super::is_false")]
2316 #[builder(default)]
2317 pub use_legacy: bool,
2318 pub tolerance: LengthUnit,
2320 }
2321
2322 #[derive(
2324 Clone, Debug, Deserialize, PartialEq, JsonSchema, Serialize, ModelingCmdVariant,
2325 Builder
2326 )]
2327 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2328 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2329 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2330 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2331 pub struct BooleanImprint
2332 {
2333 #[serde(alias = "target_ids")]
2335 pub body_ids: Vec<Uuid>,
2336 #[serde(default)]
2339 pub tool_ids: Option<Vec<Uuid>>,
2340 #[serde(default)]
2342 #[builder(default)]
2343 pub separate_bodies: bool,
2344 #[serde(default, skip_serializing_if = "super::is_false")]
2346 #[builder(default)]
2347 pub use_legacy: bool,
2348 #[serde(default)]
2350 #[builder(default)]
2351 pub keep_tools: bool,
2352 pub tolerance: LengthUnit,
2354 }
2355
2356 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2359 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2360 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2361 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2362 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2363 pub struct MakeOffsetPath {
2364 pub object_id: Uuid,
2366 #[serde(default)]
2371 pub face_id: Option<Uuid>,
2372 pub offset: LengthUnit,
2374 }
2375
2376 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2378 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2379 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2380 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2381 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2382 pub struct AddHoleFromOffset {
2383 pub object_id: Uuid,
2385 pub offset: LengthUnit,
2387 }
2388
2389 #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant, Builder)]
2391 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2392 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2393 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2394 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2395 pub struct SetGridReferencePlane {
2396 pub grid_id: Uuid,
2398 pub reference_id: Uuid,
2401 }
2402
2403 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2405 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2406 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2407 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2408 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2409 pub struct SetGridScale {
2410 pub value: f32,
2412 pub units: units::UnitLength,
2414 }
2415
2416 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2419 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2420 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2421 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2422 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2423 pub struct SetGridAutoScale {
2424 }
2425
2426 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2429 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2430 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2431 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2432 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2433 pub struct SetOrderIndependentTransparency {
2434 pub enabled: Option<bool>,
2437 }
2438
2439 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2443 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2444 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2445 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2446 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2447 pub struct CreateRegion {
2448 pub object_id: Uuid,
2450 pub segment: Uuid,
2452 pub intersection_segment: Uuid,
2455 #[serde(default = "super::negative_one")]
2459 #[builder(default = super::negative_one())]
2460 pub intersection_index: i32,
2461 #[serde(default)]
2464 #[builder(default)]
2465 pub curve_clockwise: bool,
2466 #[serde(default)]
2468 #[builder(default)]
2469 pub version: RegionVersion,
2470 }
2471
2472 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2476 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2477 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2478 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2479 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2480 pub struct CreateRegionFromQueryPoint {
2481 pub object_id: Uuid,
2483
2484 pub query_point: Point2d<LengthUnit>,
2487 #[serde(default)]
2489 #[builder(default)]
2490 pub version: RegionVersion,
2491 }
2492
2493 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2495 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2496 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2497 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2498 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2499 pub struct RegionGetQueryPoint {
2500 pub region_id: Uuid,
2502 }
2503
2504 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2507 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2508 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2509 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2510 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2511 pub struct SelectRegionFromPoint {
2512 pub selected_at_window: Point2d,
2514 }
2515
2516 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2518 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2519 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2520 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2521 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2522 pub struct BoundingBox {
2523 #[builder(default)]
2526 pub entity_ids: Vec<Uuid>,
2527 #[builder(default = mm())]
2529 #[serde(default = "mm")]
2530 pub output_unit: units::UnitLength,
2531 }
2532
2533 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2535 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2536 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2537 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2538 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2539 pub struct OffsetSurface {
2540 pub surface_id: Uuid,
2542 pub distance: LengthUnit,
2544 pub flip: bool,
2546 }
2547
2548 #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant, Builder)]
2550 #[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2551 #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2552 #[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2553 #[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2554 pub struct ClosestEdge {
2555 #[serde(default)]
2558 pub object_id: Option<Uuid>,
2559 pub closest_to: Point3d<f64>,
2562 }
2563 }
2564
2565
2566}
2567
2568pub(crate) fn is_false(b: &bool) -> bool {
2569 !b
2570}
2571
2572pub(crate) fn negative_one() -> i32 {
2573 -1
2574}
2575
2576impl ModelingCmd {
2577 pub fn is_safe_to_batch(&self) -> bool {
2579 use ModelingCmd::*;
2580 matches!(
2581 self,
2582 MovePathPen(_)
2583 | ExtendPath(_)
2584 | Extrude(_)
2585 | Revolve(_)
2586 | Solid3dFilletEdge(_)
2587 | ClosePath(_)
2588 | UpdateAnnotation(_)
2589 | ObjectVisible(_)
2590 | ObjectBringToFront(_)
2591 | Solid2dAddHole(_)
2592 | SendObject(_)
2593 | EntitySetOpacity(_)
2594 | PlaneSetColor(_)
2595 | SetTool(_)
2596 )
2597 }
2598}
2599
2600#[derive(Clone, Serialize, Deserialize, JsonSchema, Eq, PartialEq, bon::Builder)]
2604#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
2605#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
2606#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
2607#[cfg_attr(not(feature = "unstable_exhaustive"), non_exhaustive)]
2608pub struct ImportFile {
2609 pub path: String,
2611 #[serde(
2613 serialize_with = "serde_bytes::serialize",
2614 deserialize_with = "serde_bytes::deserialize"
2615 )]
2616 pub data: Vec<u8>,
2617}
2618
2619impl std::fmt::Debug for ImportFile {
2620 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2621 f.debug_struct("ImportFile")
2622 .field("path", &self.path)
2623 .field("data", &"<redacted>")
2624 .finish()
2625 }
2626}