Skip to content

Commit

Permalink
prepare change in fillet api (#5168)
Browse files Browse the repository at this point in the history
* updates

Signed-off-by: Jess Frazelle <[email protected]>

* bump version

Signed-off-by: Jess Frazelle <[email protected]>

* updates

Signed-off-by: Jess Frazelle <[email protected]>

* more snaps

Signed-off-by: Jess Frazelle <[email protected]>

---------

Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz authored Jan 28, 2025
1 parent 8ca8c49 commit 69fec37
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 63 deletions.
6 changes: 3 additions & 3 deletions src/wasm-lib/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/wasm-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ members = [
[workspace.dependencies]
http = "1"
kittycad = { version = "0.3.28", default-features = false, features = ["js", "requests"] }
kittycad-modeling-cmds = { version = "0.2.92", features = [
kittycad-modeling-cmds = { version = "0.2.93", features = [
"ts-rs",
"websocket",
] }
Expand Down
2 changes: 1 addition & 1 deletion src/wasm-lib/kcl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "kcl-lib"
description = "KittyCAD Language implementation and tools"
version = "0.2.30"
version = "0.2.31"
edition = "2021"
license = "MIT"
repository = "https://github.com/KittyCAD/modeling-app"
Expand Down
6 changes: 2 additions & 4 deletions src/wasm-lib/kcl/src/std/chamfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,8 @@ async fn inner_chamfer(
radius: LengthUnit(data.length),
tolerance: LengthUnit(DEFAULT_TOLERANCE), // We can let the user set this in the future.
cut_type: CutType::Chamfer,
// We pass in the command id as the face id.
// So the resulting face of the fillet will be the same.
// This is because that's how most other endpoints work.
face_id: Some(id),
// We make this a none so that we can remove it in the future.
face_id: None,
}),
)
.await?;
Expand Down
6 changes: 2 additions & 4 deletions src/wasm-lib/kcl/src/std/fillet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,8 @@ async fn inner_fillet(
radius: LengthUnit(data.radius),
tolerance: LengthUnit(data.tolerance.unwrap_or(default_tolerance(&args.ctx.settings.units))),
cut_type: CutType::Fillet,
// We pass in the command id as the face id.
// So the resulting face of the fillet will be the same.
// This is because that's how most other endpoints work.
face_id: Some(id),
// We make this a none so that we can remove it in the future.
face_id: None,
}),
)
.await?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 5.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 2.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
},
{
Expand All @@ -671,8 +670,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 2.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 2.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
},
{
Expand All @@ -671,8 +670,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 2.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 2.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 2.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 2.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
},
{
Expand All @@ -657,8 +656,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 2.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
}
]
12 changes: 4 additions & 8 deletions src/wasm-lib/kcl/tests/fillet-and-shell/artifact_commands.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2487,8 +2487,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 1.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
},
{
Expand All @@ -2504,8 +2503,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 1.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
},
{
Expand All @@ -2521,8 +2519,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 1.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
},
{
Expand All @@ -2538,8 +2535,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 1.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 5.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
},
{
Expand All @@ -799,8 +798,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 5.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
},
{
Expand Down Expand Up @@ -1009,8 +1007,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 5.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
},
{
Expand All @@ -1026,8 +1023,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 5.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 20.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
},
{
Expand All @@ -692,8 +691,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 50.0,
"tolerance": 0.0000001,
"cut_type": "chamfer",
"face_id": "[uuid]"
"cut_type": "chamfer"
}
},
{
Expand All @@ -709,8 +707,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 50.0,
"tolerance": 0.0000001,
"cut_type": "chamfer",
"face_id": "[uuid]"
"cut_type": "chamfer"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 20.0,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
},
{
Expand All @@ -692,8 +691,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 50.0,
"tolerance": 0.0000001,
"cut_type": "chamfer",
"face_id": "[uuid]"
"cut_type": "chamfer"
}
},
{
Expand All @@ -709,8 +707,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 50.0,
"tolerance": 0.0000001,
"cut_type": "chamfer",
"face_id": "[uuid]"
"cut_type": "chamfer"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -766,8 +766,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 0.25,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
},
{
Expand All @@ -783,8 +782,7 @@ snapshot_kind: text
"edge_id": "[uuid]",
"radius": 0.5707134902949093,
"tolerance": 0.0000001,
"cut_type": "fillet",
"face_id": "[uuid]"
"cut_type": "fillet"
}
},
{
Expand Down

0 comments on commit 69fec37

Please sign in to comment.