Skip to content

Commit 1c0fea9

Browse files
committed
New wireframe modeling command
Part of KittyCAD/modeling-app#7907
1 parent 6cf870a commit 1c0fea9

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

modeling-cmds/src/def_enum.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,13 +1726,29 @@ define_modeling_cmd_enum! {
17261726
/// Which units the `value` field uses.
17271727
pub units: units::UnitLength,
17281728
}
1729+
17291730
/// Set the grid lines to auto scale. The grid will get larger the further you zoom out,
17301731
/// and smaller the more you zoom in.
17311732
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
17321733
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
17331734
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
17341735
pub struct SetGridAutoScale {
17351736
}
1737+
1738+
/// Set the grid lines to auto scale. The grid will get larger the further you zoom out,
1739+
/// and smaller the more you zoom in.
1740+
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema, ModelingCmdVariant)]
1741+
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1742+
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
1743+
pub struct Wireframe {
1744+
/// Which object to render in wireframe.
1745+
pub object_id: Uuid,
1746+
/// Enable wireframe or not
1747+
pub wireframe: bool,
1748+
/// Show the mesh wires too
1749+
pub mesh_wires: bool,
1750+
}
1751+
17361752
}
17371753
}
17381754

modeling-cmds/src/ok_response.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,5 +952,9 @@ define_ok_modeling_cmd_response_enum! {
952952
/// The response from the 'SetGridScale'.
953953
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
954954
pub struct SetGridAutoScale {}
955+
956+
/// The response from the 'Wireframe'.
957+
#[derive(Debug, Serialize, Deserialize, Clone, JsonSchema, ModelingCmdOutput)]
958+
pub struct Wireframe {}
955959
}
956960
}

0 commit comments

Comments
 (0)