Skip to content

Commit

Permalink
bump kittycad.rs (#3875)
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Sep 12, 2024
1 parent 472eb2b commit 957a9ca
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 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 @@ -70,7 +70,7 @@ members = [

[workspace.dependencies]
http = "0.2.12"
kittycad = { version = "0.3.18", default-features = false, features = ["js", "requests"] }
kittycad = { version = "0.3.20", default-features = false, features = ["js", "requests"] }
kittycad-modeling-session = "0.1.4"

[[test]]
Expand Down
1 change: 1 addition & 0 deletions src/wasm-lib/kcl/src/std/chamfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ async fn inner_chamfer(
radius: data.length,
tolerance: DEFAULT_TOLERANCE, // We can let the user set this in the future.
cut_type: Some(kittycad::types::CutType::Chamfer),
face_id: None,
},
)
.await?;
Expand Down
1 change: 0 additions & 1 deletion src/wasm-lib/kcl/src/std/extrude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ async fn inner_extrude(length: f64, sketch_group_set: SketchGroupSet, args: Args
kittycad::types::ModelingCmd::Extrude {
target: sketch_group.id,
distance: length,
cap: true,
},
)
.await?;
Expand Down
1 change: 1 addition & 0 deletions src/wasm-lib/kcl/src/std/fillet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ async fn inner_fillet(
radius: data.radius,
tolerance: data.tolerance.unwrap_or(default_tolerance(&args.ctx.settings.units)),
cut_type: Some(kittycad::types::CutType::Fillet),
face_id: None,
},
)
.await?;
Expand Down
8 changes: 5 additions & 3 deletions src/wasm-lib/kcl/src/std/patterns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async fn inner_pattern_transform<'a>(
async fn send_pattern_transform(
// This should be passed via reference, see
// https://github.com/KittyCAD/modeling-app/issues/2821
transform: Vec<kittycad::types::LinearTransform>,
transform: Vec<kittycad::types::Transform>,
extrude_group: &ExtrudeGroup,
args: &Args,
) -> Result<Vec<Box<ExtrudeGroup>>, KclError> {
Expand Down Expand Up @@ -201,7 +201,7 @@ async fn make_transform<'a>(
i: u32,
transform_function: &FunctionParam<'a>,
source_range: SourceRange,
) -> Result<kittycad::types::LinearTransform, KclError> {
) -> Result<kittycad::types::Transform, KclError> {
// Call the transform fn for this repetition.
let repetition_num = KclValue::UserVal(UserVal {
value: serde_json::Value::Number(i.into()),
Expand Down Expand Up @@ -245,10 +245,12 @@ async fn make_transform<'a>(
Some(x) => array_to_point3d(x, source_ranges.clone())?,
None => Point3d { x: 0.0, y: 0.0, z: 0.0 },
};
let t = kittycad::types::LinearTransform {
let t = kittycad::types::Transform {
replicate,
scale: Some(scale.into()),
translate: Some(translate.into()),
// TODO: chalmers to pipe thru to kcl.
rotation: None,
};
Ok(t)
}
Expand Down

0 comments on commit 957a9ca

Please sign in to comment.