diff --git a/docs/kcl/getNextAdjacentEdge.md b/docs/kcl/getNextAdjacentEdge.md index 041ab4f7c..92ae8f551 100644 --- a/docs/kcl/getNextAdjacentEdge.md +++ b/docs/kcl/getNextAdjacentEdge.md @@ -20,11 +20,11 @@ const part001 = startSketchOn('XY') |> line([0, 10], %, "thing") |> line([10, 0], %, "thing1") |> line([0, -10], %, "thing2") - |> close(%) + |> close(%, "thing3") |> extrude(10, %) |> fillet({ radius: 2, - tags: [getNextAdjacentEdge("thing", %)] + tags: [getNextAdjacentEdge("thing3", %)] }, %) ``` diff --git a/docs/kcl/getPreviousAdjacentEdge.md b/docs/kcl/getPreviousAdjacentEdge.md index 2c56a43a8..05f9072a7 100644 --- a/docs/kcl/getPreviousAdjacentEdge.md +++ b/docs/kcl/getPreviousAdjacentEdge.md @@ -20,11 +20,11 @@ const part001 = startSketchOn('XY') |> line([0, 10], %, "thing") |> line([10, 0], %, "thing1") |> line([0, -10], %, "thing2") - |> close(%) + |> close(%, "thing3") |> extrude(10, %) |> fillet({ radius: 2, - tags: [getPreviousAdjacentEdge("thing2", %)] + tags: [getPreviousAdjacentEdge("thing3", %)] }, %) ``` diff --git a/docs/kcl/std.json b/docs/kcl/std.json index e3b774ab3..8f008ff52 100644 --- a/docs/kcl/std.json +++ b/docs/kcl/std.json @@ -28183,7 +28183,7 @@ "unpublished": false, "deprecated": false, "examples": [ - "const part001 = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 10], %, \"thing\")\n |> line([10, 0], %, \"thing1\")\n |> line([0, -10], %, \"thing2\")\n |> close(%)\n |> extrude(10, %)\n |> fillet({\n radius: 2,\n tags: [getNextAdjacentEdge(\"thing\", %)]\n }, %)" + "const part001 = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 10], %, \"thing\")\n |> line([10, 0], %, \"thing1\")\n |> line([0, -10], %, \"thing2\")\n |> close(%, \"thing3\")\n |> extrude(10, %)\n |> fillet({\n radius: 2,\n tags: [getNextAdjacentEdge(\"thing3\", %)]\n }, %)" ] }, { @@ -29755,7 +29755,7 @@ "unpublished": false, "deprecated": false, "examples": [ - "const part001 = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 10], %, \"thing\")\n |> line([10, 0], %, \"thing1\")\n |> line([0, -10], %, \"thing2\")\n |> close(%)\n |> extrude(10, %)\n |> fillet({\n radius: 2,\n tags: [getPreviousAdjacentEdge(\"thing2\", %)]\n }, %)" + "const part001 = startSketchOn('XY')\n |> startProfileAt([0, 0], %)\n |> line([0, 10], %, \"thing\")\n |> line([10, 0], %, \"thing1\")\n |> line([0, -10], %, \"thing2\")\n |> close(%, \"thing3\")\n |> extrude(10, %)\n |> fillet({\n radius: 2,\n tags: [getPreviousAdjacentEdge(\"thing3\", %)]\n }, %)" ] }, { diff --git a/src/wasm-lib/kcl/src/std/fillet.rs b/src/wasm-lib/kcl/src/std/fillet.rs index 4b84cd5b5..45668618f 100644 --- a/src/wasm-lib/kcl/src/std/fillet.rs +++ b/src/wasm-lib/kcl/src/std/fillet.rs @@ -204,9 +204,9 @@ pub async fn get_next_adjacent_edge(args: Args) -> Result /// |> line([0, 10], %, "thing") /// |> line([10, 0], %, "thing1") /// |> line([0, -10], %, "thing2") -/// |> close(%) +/// |> close(%, "thing3") /// |> extrude(10, %) -/// |> fillet({radius: 2, tags: [getNextAdjacentEdge("thing", %)]}, %) +/// |> fillet({radius: 2, tags: [getNextAdjacentEdge("thing3", %)]}, %) /// ``` #[stdlib { name = "getNextAdjacentEdge", @@ -233,7 +233,7 @@ async fn inner_get_next_adjacent_edge( let resp = args .send_modeling_cmd( uuid::Uuid::new_v4(), - ModelingCmd::Solid3DGetNextAdjacentEdge { + ModelingCmd::Solid3DGetPrevAdjacentEdge { edge_id: tagged_path.geo_meta.id, object_id: extrude_group.id, face_id, @@ -241,7 +241,7 @@ async fn inner_get_next_adjacent_edge( ) .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 { @@ -282,9 +282,9 @@ pub async fn get_previous_adjacent_edge(args: Args) -> Result line([0, 10], %, "thing") /// |> line([10, 0], %, "thing1") /// |> line([0, -10], %, "thing2") -/// |> close(%) +/// |> close(%, "thing3") /// |> extrude(10, %) -/// |> fillet({radius: 2, tags: [getPreviousAdjacentEdge("thing2", %)]}, %) +/// |> fillet({radius: 2, tags: [getPreviousAdjacentEdge("thing3", %)]}, %) /// ``` #[stdlib { name = "getPreviousAdjacentEdge", @@ -311,7 +311,7 @@ async fn inner_get_previous_adjacent_edge( let resp = args .send_modeling_cmd( uuid::Uuid::new_v4(), - ModelingCmd::Solid3DGetPrevAdjacentEdge { + ModelingCmd::Solid3DGetNextAdjacentEdge { edge_id: tagged_path.geo_meta.id, object_id: extrude_group.id, face_id, @@ -319,7 +319,7 @@ async fn inner_get_previous_adjacent_edge( ) .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 { diff --git a/src/wasm-lib/tests/executor/main.rs b/src/wasm-lib/tests/executor/main.rs index 3fa5b316e..1d2c7a47a 100644 --- a/src/wasm-lib/tests/executor/main.rs +++ b/src/wasm-lib/tests/executor/main.rs @@ -293,9 +293,9 @@ async fn serial_test_basic_fillet_cube_next_adjacent() { |> line([0, 10], %, "thing") |> line([10, 0], %, "thing1") |> line([0, -10], %, "thing2") - |> close(%) + |> close(%, "thing3") |> extrude(10, %) - |> fillet({radius: 2, tags: [getNextAdjacentEdge("thing", %)]}, %) + |> fillet({radius: 2, tags: [getNextAdjacentEdge("thing3", %)]}, %) "#; let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm) @@ -315,9 +315,9 @@ async fn serial_test_basic_fillet_cube_previous_adjacent() { |> line([0, 10], %, "thing") |> line([10, 0], %, "thing1") |> line([0, -10], %, "thing2") - |> close(%) + |> close(%, "thing3") |> extrude(10, %) - |> fillet({radius: 2, tags: [getPreviousAdjacentEdge("thing2", %)]}, %) + |> fillet({radius: 2, tags: [getPreviousAdjacentEdge("thing3", %)]}, %) "#; let result = execute_and_snapshot(code, kittycad::types::UnitLength::Mm)