From 43f16b3aac731779644f85138f80e09ceb0a8cdc Mon Sep 17 00:00:00 2001 From: Pierre Jacquier Date: Fri, 3 Jan 2025 11:47:52 -0500 Subject: [PATCH] Working cap selection and deletion --- src/lang/std/artifactGraph.ts | 3 ++- src/wasm-lib/kcl/src/std/loft.rs | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lang/std/artifactGraph.ts b/src/lang/std/artifactGraph.ts index a168e1780..f963a0c14 100644 --- a/src/lang/std/artifactGraph.ts +++ b/src/lang/std/artifactGraph.ts @@ -405,7 +405,8 @@ export function getArtifactsToUpdate({ type: 'sweep', subType: 'loft', id, - pathId: response.data.modeling_response.data.solid_id, + // TODO: make sure this is the right one to give here + pathId: cmd.section_ids[0], surfaceIds: [], edgeIds: [], codeRef: { range, pathToNode }, diff --git a/src/wasm-lib/kcl/src/std/loft.rs b/src/wasm-lib/kcl/src/std/loft.rs index 87f1ddb2b..35aa82abf 100644 --- a/src/wasm-lib/kcl/src/std/loft.rs +++ b/src/wasm-lib/kcl/src/std/loft.rs @@ -168,6 +168,9 @@ async fn inner_loft( })); }; + #[cfg(target_arch = "wasm32")] + web_sys::console::log_1(&format!("Rust Loft result solid_id={:?}", data.solid_id).into()); + // Take the sketch with the most paths, and override its id with the loft's solid_id (to get its faces) let mut desc_sorted_sketches = sketches.to_vec(); desc_sorted_sketches.sort_by(|s0, s1| s1.paths.len().cmp(&s0.paths.len()));