Resample a sectioned part while the measure tool is active. - #125
Merged
Merged
Conversation
sallen2
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<MeasureTool>is mounted, a part cut by a section is measured as it is seen. The toolre-samples the part whenever a clipping plane moves: the half the cut removed is not offered
for snapping, the part's edges stop at the plane, the outline where the plane passes through
solid material is an edge with corners of its own, and the capped face is a surface a point
can land on.
cut and for a controlled
sectionprop alike. The sample is keyed on the plane and cached permesh, so a handle drag or a depth change re-samples on the next pointer move and a still cut
costs nothing.
sectionContour,clipSegments,pointInContour,capHitandsampleSectionare the purefunctions behind it, exported from the root.
measuring.
Public package release
pnpm changesetand committed the generated Changeset.no-release-neededlabel and explained why below.Validation
I ran the relevant checks and tests.
pnpm --filter @toolpath/viewer test— 305 passedpnpm --filter @toolpath/example-react-viewer test— 15 passed (Playwright), including a newtest that measures from the cap and again after the cut is deepened
pnpm check-types,pnpm exec eslint,pnpm knip— clean