Skip to content

Commit

Permalink
AddHoleFromOffset
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamaan476 committed Dec 16, 2024
1 parent 9e162de commit d96cd6e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modeling-cmds/src/def_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,15 @@ define_modeling_cmd_enum! {
/// The distance to offset the path (positive for outset, negative for inset)
pub offset: LengthUnit,
}

/// Add a hole to a closed path by offsetting it a uniform distance inward.
#[derive(Clone, Debug, Deserialize, JsonSchema, Serialize, ModelingCmdVariant)]

Check warning on line 1195 in modeling-cmds/src/def_enum.rs

View check run for this annotation

Codecov / codecov/patch

modeling-cmds/src/def_enum.rs#L1195

Added line #L1195 was not covered by tests
pub struct AddHoleFromOffset {
/// The closed path to add a hole to.
pub object_id: Uuid,
/// The distance to offset the path (positive for outset, negative for inset)
pub offset: LengthUnit,
}
}
}

Expand Down
10 changes: 10 additions & 0 deletions modeling-cmds/src/ok_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,16 @@ define_ok_modeling_cmd_response_enum! {
pub entity_ids: Vec<Uuid>,
}

/// The response from the `AddHoleFromOffset` command.
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
pub struct AddHoleFromOffset {
/// If the offset path splits into multiple paths, this will contain the UUIDs of the
/// new paths.
/// If the offset path remains as a single path, this will be empty, and the resulting ID
/// of the (single) new path will be the ID of the `AddHoleFromOffset` command.
pub entity_ids: Vec<Uuid>,
}

/// The response from the `DefaultCameraFocusOn` command.
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
pub struct DefaultCameraFocusOn { }
Expand Down

0 comments on commit d96cd6e

Please sign in to comment.