diff --git a/src/wasm-lib/kcl/src/std/fillet.rs b/src/wasm-lib/kcl/src/std/fillet.rs index e99513b57..d17f9ef47 100644 --- a/src/wasm-lib/kcl/src/std/fillet.rs +++ b/src/wasm-lib/kcl/src/std/fillet.rs @@ -304,7 +304,7 @@ async fn inner_get_next_adjacent_edge(tag: TagIdentifier, args: Args) -> Result< let resp = args .send_modeling_cmd( uuid::Uuid::new_v4(), - ModelingCmd::Solid3DGetPrevAdjacentEdge { + ModelingCmd::Solid3DGetNextAdjacentEdge { edge_id: tagged_path.id, object_id: tagged_path.sketch_group, face_id, @@ -312,7 +312,7 @@ async fn inner_get_next_adjacent_edge(tag: TagIdentifier, args: Args) -> Result< ) .await?; let kittycad::types::OkWebSocketResponseData::Modeling { - modeling_response: kittycad::types::OkModelingCmdResponse::Solid3DGetPrevAdjacentEdge { data: ajacent_edge }, + modeling_response: kittycad::types::OkModelingCmdResponse::Solid3DGetNextAdjacentEdge { data: ajacent_edge }, } = &resp else { return Err(KclError::Engine(KclErrorDetails { @@ -386,7 +386,7 @@ async fn inner_get_previous_adjacent_edge(tag: TagIdentifier, args: Args) -> Res let resp = args .send_modeling_cmd( uuid::Uuid::new_v4(), - ModelingCmd::Solid3DGetNextAdjacentEdge { + ModelingCmd::Solid3DGetPrevAdjacentEdge { edge_id: tagged_path.id, object_id: tagged_path.sketch_group, face_id, @@ -394,7 +394,7 @@ async fn inner_get_previous_adjacent_edge(tag: TagIdentifier, args: Args) -> Res ) .await?; let kittycad::types::OkWebSocketResponseData::Modeling { - modeling_response: kittycad::types::OkModelingCmdResponse::Solid3DGetNextAdjacentEdge { data: ajacent_edge }, + modeling_response: kittycad::types::OkModelingCmdResponse::Solid3DGetPrevAdjacentEdge { data: ajacent_edge }, } = &resp else { return Err(KclError::Engine(KclErrorDetails { diff --git a/src/wasm-lib/tests/executor/inputs/extrude-inside-fn-with-tags.kcl b/src/wasm-lib/tests/executor/inputs/extrude-inside-fn-with-tags.kcl index 3a84036a8..91e3a8633 100644 --- a/src/wasm-lib/tests/executor/inputs/extrude-inside-fn-with-tags.kcl +++ b/src/wasm-lib/tests/executor/inputs/extrude-inside-fn-with-tags.kcl @@ -56,10 +56,10 @@ const bracketBody = bs |> fillet({ radius: radius, tags: [ - getNextAdjacentEdge(bs.sketchGroup.tags.edge7), - getNextAdjacentEdge(bs.sketchGroup.tags.edge2), - getNextAdjacentEdge(bs.sketchGroup.tags.edge3), - getNextAdjacentEdge(bs.sketchGroup.tags.edge6) + getPreviousAdjacentEdge(bs.sketchGroup.tags.edge7), + getPreviousAdjacentEdge(bs.sketchGroup.tags.edge2), + getPreviousAdjacentEdge(bs.sketchGroup.tags.edge3), + getPreviousAdjacentEdge(bs.sketchGroup.tags.edge6) ] }, %) diff --git a/src/wasm-lib/tests/executor/inputs/global-tags.kcl b/src/wasm-lib/tests/executor/inputs/global-tags.kcl index 8f7902a68..978183170 100644 --- a/src/wasm-lib/tests/executor/inputs/global-tags.kcl +++ b/src/wasm-lib/tests/executor/inputs/global-tags.kcl @@ -56,10 +56,10 @@ const bracketBody = bs |> fillet({ radius: radius, tags: [ - getNextAdjacentEdge(bs.tags.edge7), - getNextAdjacentEdge(bs.tags.edge2), - getNextAdjacentEdge(bs.tags.edge3), - getNextAdjacentEdge(bs.tags.edge6) + getPreviousAdjacentEdge(bs.tags.edge7), + getPreviousAdjacentEdge(bs.tags.edge2), + getPreviousAdjacentEdge(bs.tags.edge3), + getPreviousAdjacentEdge(bs.tags.edge6) ] }, %) @@ -89,7 +89,7 @@ const tabsR = startSketchOn(tabPlane) radius: holeDiam / 2, tags: [ getNextAdjacentEdge(edge12), - getNextAdjacentEdge(edge13) + getNextAdjacentEdge(edge11) ] }, %) |> patternLinear3d({ diff --git a/src/wasm-lib/tests/executor/main.rs b/src/wasm-lib/tests/executor/main.rs index 43e7edb40..66f3c18e4 100644 --- a/src/wasm-lib/tests/executor/main.rs +++ b/src/wasm-lib/tests/executor/main.rs @@ -1287,7 +1287,7 @@ capScrew([0, 0.5, 0], 50, 37.5, 50, 25) } #[tokio::test(flavor = "multi_thread")] -async fn kcl_test_bracket_with_fillets_ensure_fail_on_flush_source_ranges() { +async fn kcl_test_bracket_with_fillets() { let code = r#"// Shelf Bracket // This is a shelf bracket made out of 6061-T6 aluminum sheet metal. The required thickness is calculated based on a point load of 300 lbs applied to the end of the shelf. There are two brackets holding up the shelf, so the moment experienced is divided by 2. The shelf is 1 foot long from the wall. @@ -1328,11 +1328,7 @@ const bracket = startSketchOn('XY') "#; let result = execute_and_snapshot(code, UnitLength::Mm).await; - assert!(result.is_err()); - assert_eq!( - result.err().unwrap().to_string(), - r#"engine: KclErrorDetails { source_ranges: [SourceRange([1329, 1430])], message: "Modeling command failed: [ApiError { error_code: BadRequest, message: \"Fillet failed\" }]" }"# - ); + assert!(result.is_ok()); } #[tokio::test(flavor = "multi_thread")] @@ -1536,13 +1532,13 @@ const bracket = startSketchOn('XY') |> fillet({ radius: filletR, tags: [ - getPreviousAdjacentEdge(innerEdge) + getNextAdjacentEdge(innerEdge) ] }, %) |> fillet({ radius: filletR + thickness, tags: [ - getPreviousAdjacentEdge(outerEdge) + getNextAdjacentEdge(outerEdge) ] }, %)