Skip to content

Fix sweep() tagEnd #7870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions rust/kcl-lib/src/simulation_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3838,3 +3838,24 @@ mod tag_inner_face {
super::execute(TEST_NAME, true).await
}
}
mod sweep_tag_end {
const TEST_NAME: &str = "sweep_tag_end";

/// Test parsing KCL.
#[test]
fn parse() {
super::parse(TEST_NAME)
}

/// Test that parsing and unparsing KCL produces the original KCL input.
#[tokio::test(flavor = "multi_thread")]
async fn unparse() {
super::unparse(TEST_NAME).await
}

/// Test that KCL is executed correctly.
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_execute() {
super::execute(TEST_NAME, true).await
}
}
3 changes: 2 additions & 1 deletion rust/kcl-lib/src/std/extrude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ pub(crate) async fn do_post_extrude<'a>(
let mut sketch = sketch.clone();

// If we were sketching on a face, we need the original face id.
let faces_sketch_id = sketch.id;
if let SketchSurface::Face(ref face) = sketch.on {
// If we are creating a new body we need to preserve its new id.
if extrude_method != ExtrudeMethod::New {
Expand All @@ -223,7 +224,7 @@ pub(crate) async fn do_post_extrude<'a>(
args.into(),
ModelingCmd::from(mcmd::Solid3dGetExtrusionFaceInfo {
edge_id: any_edge_id,
object_id: sketch.id,
object_id: faces_sketch_id,
}),
)
.await?;
Expand Down
Loading
Loading