Skip to content

Commit 1e3b44c

Browse files
authored
Update CSG operations
* Add tolerance field to union/intersection/subtract * Add extra_solid_ids field to response
1 parent 3c27573 commit 1e3b44c

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

modeling-cmds/src/def_enum.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,6 +1570,8 @@ define_modeling_cmd_enum! {
15701570
/// Which solids to union together.
15711571
/// Cannot be empty.
15721572
pub solid_ids: Vec<Uuid>,
1573+
/// The maximum acceptable surface gap computed between the joined solids. Must be positive (i.e. greater than zero).
1574+
pub tolerance: LengthUnit,
15731575
}
15741576

15751577
/// Create a new solid from intersecting several other solids.
@@ -1583,6 +1585,8 @@ define_modeling_cmd_enum! {
15831585
{
15841586
/// Which solids to intersect together
15851587
pub solid_ids: Vec<Uuid>,
1588+
/// The maximum acceptable surface gap computed between the joined solids. Must be positive (i.e. greater than zero).
1589+
pub tolerance: LengthUnit,
15861590
}
15871591

15881592
/// Create a new solid from subtracting several other solids.
@@ -1599,6 +1603,8 @@ define_modeling_cmd_enum! {
15991603
pub target_ids: Vec<Uuid>,
16001604
/// Will be cut out from the 'target'.
16011605
pub tool_ids: Vec<Uuid>,
1606+
/// The maximum acceptable surface gap computed between the target and the solids cut out from it. Must be positive (i.e. greater than zero).
1607+
pub tolerance: LengthUnit,
16021608
}
16031609

16041610
/// Make a new path by offsetting an object by a given distance.

modeling-cmds/src/ok_response.rs

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -848,15 +848,33 @@ define_ok_modeling_cmd_response_enum! {
848848

849849
/// The response from the 'BooleanUnion'.
850850
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
851-
pub struct BooleanUnion {}
851+
pub struct BooleanUnion {
852+
/// If the operation produced just one solid, then its ID will be the
853+
/// ID of the modeling command request.
854+
/// But if any extra solids are produced, then their IDs will be included
855+
/// here.
856+
pub extra_solid_ids: Vec<Uuid>,
857+
}
852858

853859
/// The response from the 'BooleanIntersection'.
854860
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
855-
pub struct BooleanIntersection {}
861+
pub struct BooleanIntersection {
862+
/// If the operation produced just one solid, then its ID will be the
863+
/// ID of the modeling command request.
864+
/// But if any extra solids are produced, then their IDs will be included
865+
/// here.
866+
pub extra_solid_ids: Vec<Uuid>,
867+
}
856868

857869
/// The response from the 'BooleanSubtract'.
858870
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
859-
pub struct BooleanSubtract {}
871+
pub struct BooleanSubtract {
872+
/// If the operation produced just one solid, then its ID will be the
873+
/// ID of the modeling command request.
874+
/// But if any extra solids are produced, then their IDs will be included
875+
/// here.
876+
pub extra_solid_ids: Vec<Uuid>,
877+
}
860878

861879
}
862880
}

0 commit comments

Comments
 (0)