bump kittycad.rs (#3875)

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2024-09-12 14:23:54 -07:00
committed by GitHub
parent 472eb2bafe
commit 957a9ca4fe
6 changed files with 10 additions and 7 deletions

View File

@ -1430,9 +1430,9 @@ dependencies = [
[[package]]
name = "kittycad"
version = "0.3.18"
version = "0.3.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94feea5b1cf851b33dd108aa35aa01bde99772aa74d2ba1590295aac0b7ca33e"
checksum = "b6d94d74f88582f566f81fa443c638439f5d7b7eeb80d4c321f64703310a45da"
dependencies = [
"anyhow",
"async-trait",

View File

@ -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]]

View File

@ -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?;

View File

@ -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?;

View File

@ -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?;

View File

@ -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> {
@ -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()),
@ -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)
}