Skip to content

Commit 8190024

Browse files
committed
Revert "Custom chamfer profiles (#938)"
This reverts commit aa231cc.
1 parent 2cebcb5 commit 8190024

File tree

1 file changed

+4
-46
lines changed

1 file changed

+4
-46
lines changed

modeling-cmds/src/shared.rs

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -11,59 +11,17 @@ use crate::{length_unit::LengthUnit, output::ExtrusionFaceInfo, units::UnitAngle
1111

1212
mod point;
1313

14-
/// Params required to perform a fillet cut of an edge.
14+
/// What kind of cut to do
1515
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize, JsonSchema, Default)]
1616
#[serde(rename_all = "snake_case")]
1717
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1818
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
19-
pub struct FilletParams {
20-
/// The second length affects the edge length of the second face of the cut. This will
21-
/// cause the fillet to take on the shape of a conic section, instead of an arc.
22-
pub second_length: Option<LengthUnit>,
23-
}
24-
25-
/// Params required to perform a chamfer cut of an edge.
26-
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize, JsonSchema, Default)]
27-
#[serde(rename_all = "snake_case")]
28-
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
29-
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
30-
pub struct ChamferParams {
31-
/// The second length affects the edge length of the second face of the cut.
32-
pub second_length: Option<LengthUnit>,
33-
/// The angle of the chamfer, default is 45deg.
34-
pub angle: Option<Angle>,
35-
/// If true, the second length or angle is applied to the other face of the cut.
36-
pub swap: bool,
37-
}
38-
39-
/// Params required to perform a custom profile cut of an edge.
40-
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize, JsonSchema)]
41-
#[serde(rename_all = "snake_case")]
42-
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
43-
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
44-
pub struct CustomParams {
45-
/// The path that will be used for the custom profile.
46-
pub path: Uuid,
47-
}
48-
49-
/// What kind of cut to perform when cutting an edge.
50-
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize, JsonSchema)]
51-
#[serde(rename_all = "snake_case")]
52-
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
53-
#[cfg_attr(feature = "ts-rs", ts(export_to = "ModelingCmd.ts"))]
5419
pub enum CutType {
5520
/// Round off an edge.
56-
Fillet(FilletParams),
21+
#[default]
22+
Fillet,
5723
/// Cut away an edge.
58-
Chamfer(ChamferParams),
59-
/// A custom cut profile.
60-
Custom(CustomParams),
61-
}
62-
63-
impl Default for CutType {
64-
fn default() -> Self {
65-
crate::shared::CutType::Fillet(FilletParams::default())
66-
}
24+
Chamfer,
6725
}
6826

6927
/// A rotation defined by an axis, origin of rotation, and an angle.

0 commit comments

Comments
 (0)