Skip to content

KCL: Enable sweeping regions, and sweeping along sketch lines#10832

Merged
adamchalmers merged 15 commits intomainfrom
achalmers/sweep-solve
Apr 7, 2026
Merged

KCL: Enable sweeping regions, and sweeping along sketch lines#10832
adamchalmers merged 15 commits intomainfrom
achalmers/sweep-solve

Conversation

@adamchalmers
Copy link
Copy Markdown
Contributor

@adamchalmers adamchalmers commented Apr 4, 2026

Part of #10728

Adds support for:

  • Solid sweeps of a sketch2 region
  • Surface sweeps of 1 or more sketch2 segments (may be open profile, closed profile, or totally disconnected)
  • Sweeping along a path made from 1 or more consecutive sketch2 segments

@adamchalmers adamchalmers requested a review from a team as a code owner April 4, 2026 18:25
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
modeling-app Ready Ready Preview, Comment Apr 7, 2026 5:12pm

Request Review

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 4, 2026

Merging this PR will not alter performance

✅ 167 untouched benchmarks
⏩ 93 skipped benchmarks1


Comparing achalmers/sweep-solve (3e8f6ef) with main (87f9549)2

Open in CodSpeed

Footnotes

  1. 93 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (93becfe) during the generation of this report, so 87f9549 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

}
SegmentTraversal::Reverse => {
if end_radians >= start_radians {
end_radians -= std::f64::consts::TAU;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: You tested the reverse?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have an actual sim test or other automated test for this case. Not sure if one was made already.

Copy link
Copy Markdown
Contributor Author

@adamchalmers adamchalmers Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, here's an example of a successful sweep:

Screenshot 2026-04-07 at 11 41 20 AM

The path is a straight line and a tangential arc. The path is joined via coincident([line1.end, arc1.end]).

// Sketch a path
sketch002 = sketch(on = offsetPlane(YZ, offset = -2)) {
  line1 = line(start = [..], end = [..])
  arc1 = arc(start = [..], end = [..], center = [..])
  coincident([line1.end, arc1.end])
  tangent([line1, arc1])
}

// Sweep the square along the path.
path = [sketch002.line1, sketch002.arc1]
sweep(mySquare, path)

@adamchalmers adamchalmers force-pushed the achalmers/sweep-solve branch from 402f68f to f550e3f Compare April 7, 2026 16:45
@adamchalmers adamchalmers merged commit 2bb1f21 into main Apr 7, 2026
78 checks passed
@adamchalmers adamchalmers deleted the achalmers/sweep-solve branch April 7, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants