Skip to content

New wireframe modeling command #912

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

Open
wants to merge 1 commit 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
16 changes: 16 additions & 0 deletions modeling-cmds/src/def_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1726,13 +1726,29 @@ define_modeling_cmd_enum! {
/// Which units the `value` field uses.
pub units: units::UnitLength,
}

/// Set the grid lines to auto scale. The grid will get larger the further you zoom out,
/// and smaller the more you zoom in.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct SetGridAutoScale {
}

/// Set the grid lines to auto scale. The grid will get larger the further you zoom out,
/// and smaller the more you zoom in.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
pub struct Wireframe {
/// Which object to render in wireframe.
pub object_id: Uuid,
/// Enable wireframe or not
pub wireframe: bool,
/// Show the mesh wires too
pub mesh_wires: bool,
}

}
}

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 @@ -952,5 +952,9 @@ define_ok_modeling_cmd_response_enum! {
/// The response from the 'SetGridScale'.
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
pub struct SetGridAutoScale {}

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