Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grid reference plane #775

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions modeling-cmds/src/def_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1528,6 +1528,19 @@
/// The distance to offset the path (positive for outset, negative for inset)
pub offset: LengthUnit,
}

/// Align the grid with a plane or a planar face.
#[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema, Serialize, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct SetGridReferencePlane {
/// The grid to be moved.
pub grid_id: Uuid,

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

View check run for this annotation

Codecov / codecov/patch

modeling-cmds/src/def_enum.rs#L1537-L1538

Added lines #L1537 - L1538 were not covered by tests
/// The plane or face that the grid will be aligned to.
/// If a face, it must be planar to succeed.
pub reference_id: Uuid,
}

}
}

Expand Down
4 changes: 4 additions & 0 deletions modeling-cmds/src/ok_response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -810,5 +810,9 @@ define_ok_modeling_cmd_response_enum! {
pub cap: ExtrusionFaceCapType,
}

/// The response from the 'SetGridReferencePlane'.
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
pub struct SetGridReferencePlane {}

}
}