Skip to content

Add missing sweep edges for open surface extrudes - #12437

Merged
pierremtb merged 57 commits into
mainfrom
pierremtb/adhoc/previous-adjacent-sweep-edge
Jul 21, 2026
Merged

Add missing sweep edges for open surface extrudes#12437
pierremtb merged 57 commits into
mainfrom
pierremtb/adhoc/previous-adjacent-sweep-edge

Conversation

@pierremtb

@pierremtb pierremtb commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Codex did pretty good plumbing work here to get the previous adjacent edge at the start of each open profile component. It maps these artifacts to getPreviousAdjacentEdge(...), allowing point-and-click extrusion to use it and avoid falling back to edgeId. There's a single open single-segment surface extrusion case.

Likely not needed after #11727 but could be a good interim fix?

Rescoped after reporting the missing edge from GetAdjacencyInfo https://github.com/KittyCAD/engine/issues/4785, now that it's live we can simply do the plumbing bits, no need for a frontend patch anymore!

Allows extruding all four edges from a segment-extrude like this without falling back to faceId, as found in #12018 (review)

@settings(kclVersion = 2.0)

sketch001 = sketch(on = XZ) {
  line1 = line(start = [var -2.2mm, var 0.4mm], end = [var 3.48mm, var 1.03mm])
}
extrude001 = extrude(sketch001.line1, length = 5, bodyType = SURFACE)

@codspeed-hq

codspeed-hq Bot commented Jul 15, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 126 untouched benchmarks
⏩ 151 skipped benchmarks1


Comparing pierremtb/adhoc/previous-adjacent-sweep-edge (e2ce7e8) with main (50d506e)2

Open in CodSpeed

Footnotes

  1. 151 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 (ab76678) during the generation of this report, so 50d506e was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@pierremtb
pierremtb marked this pull request as ready for review July 15, 2026 13:49
@pierremtb
pierremtb requested review from a team as code owners July 15, 2026 13:49
Comment thread rust/kcl-lib/src/execution/artifact.rs Outdated
let mut new_sweep = sweep.clone();
new_sweep.edge_ids = vec![previous_edge_id];
let mut new_wall = wall.clone();
new_wall.edge_cut_edge_ids = vec![previous_edge_id];

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.

I don't really understand why we update all these, but it's what we do for Solid3dGetAdjacencyInfo, so it's probably fine.

@pierremtb

Copy link
Copy Markdown
Contributor Author

Keeping as draft for now, depending on root causing of https://github.com/KittyCAD/engine/issues/4785

@pierremtb
pierremtb marked this pull request as draft July 15, 2026 16:57
@pierremtb

Copy link
Copy Markdown
Contributor Author

Will be able to rewrite this based on KittyCAD/modeling-api#1280

@pierremtb
pierremtb marked this pull request as ready for review July 21, 2026 21:02
@pierremtb
pierremtb requested a review from jtran July 21, 2026 21:02
@pierremtb
pierremtb enabled auto-merge (squash) July 21, 2026 21:03
@pierremtb
pierremtb merged commit 40613b7 into main Jul 21, 2026
72 of 73 checks passed
@pierremtb
pierremtb deleted the pierremtb/adhoc/previous-adjacent-sweep-edge branch July 21, 2026 21:08
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.

4 participants