Skip to content

Create region from point#10213

Merged
jtran merged 15 commits intomainfrom
jtran/region-from-point
Mar 6, 2026
Merged

Create region from point#10213
jtran merged 15 commits intomainfrom
jtran/region-from-point

Conversation

@jtran
Copy link
Contributor

@jtran jtran commented Feb 27, 2026

Resolves #10152.
Depends on KittyCAD/modeling-api#1106.

// Use a point from point()
r1 = region(point = s1.point1)
// Use a Point2d - sketch is needed
r2 = region(point = [1mm, 2mm], sketch = s1)

To enable the Point2d case, the return value of a sketch block now has the KclValue::Sketch stored in sketch1.meta.sketch. If there are no segments, it won't be present.

@jtran jtran added the sketch-solve PRs changing sketch-solve functionality only. label Feb 27, 2026
@vercel
Copy link

vercel bot commented Feb 27, 2026

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

Project Deployment Actions Updated (UTC)
modeling-app Ready Ready Preview, Comment Mar 6, 2026 5:48pm

Request Review

@jtran jtran force-pushed the jtran/region-from-point branch from 0c2d43b to 83abf64 Compare March 5, 2026 00:35
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 5, 2026

Merging this PR will not alter performance

✅ 167 untouched benchmarks
⏩ 93 skipped benchmarks1


Comparing jtran/region-from-point (c4ca41c) with main (8b9131b)

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.

@jtran jtran marked this pull request as ready for review March 5, 2026 20:43
@jtran jtran requested a review from a team as a code owner March 5, 2026 20:43
/// point to the intersection with the second segment, and turn at each
/// intersection using the `direction` until returning back to the first
/// segment.
@(impl = std_rust, experimental = true, feature_tree = true)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we change that to feature_tree = false? I don't think we need regions bubbled up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed it. But just FYI, it does create an object in the engine, so functions like that typically display in the Feature Tree.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok thanks, and yeah we might want to revisit later then

@pierremtb
Copy link
Contributor

Got a conflict that popped up @jtran ICYMI

@jtran jtran merged commit 1105ceb into main Mar 6, 2026
97 of 103 checks passed
@jtran jtran deleted the jtran/region-from-point branch March 6, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sketch-solve PRs changing sketch-solve functionality only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KCL region() should accept a point

3 participants