feat(viewer): add source-backed feature editing - #341
Open
amywork777 wants to merge 6 commits into
Open
Conversation
amywork777
marked this pull request as ready for review
August 26, 2026 19:27
Author
Follow-up: source-backed sketch dragging and constraintsThe same on-model sketch mode now supports direct source-backed geometry edits:
Drag-ready sketchLive width dragAdditional acceptance
This remains deliberately smaller than a SolidWorks sketch solver: every editable action maps to a known source span, and unsupported relationships stay read-only. |
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
Edit Sketchas a temporary state of the existing 3D viewport—not a second viewer or panelLocations, and add/subtract profilesReturn to 3Dpreserves drafts while Cancel/Escape discards themPOST /__cad/artifactcadgen rebuild path and reload only its accepted artifactVisual proof
1. Existing Design + Geometry view remains
The source-backed Design tree still lives above the honest read-only Geometry tree. Sketch editing does not remove or replace the original viewer.
2. Edit Sketch snaps onto the actual model
The same 3D viewport temporarily looks normal to the authored sketch plane. The accepted solid is ghosted and the rectangle, subtractive circle, dimensions, and anchors are projected in model coordinates.
3. Drafts update on-model without changing the artifact
Changing the width from 50 mm to 54 mm immediately updates the profile and callout. The existing accepted solid remains visible underneath until Apply.
4. Cancel/Return restores the original 3D view
Leaving sketch mode restores the exact previous camera, projection, and 100% zoom. The normal Geometry tree and native viewer controls remain available.
Boundary with #340
This PR does not add a regeneration endpoint, worker, cache, artifact chooser, or alternate build path. The source route reads and commits source only. Rebuilding remains owned by the existing cadgen artifact API, whose viewer-facing contract stays stable while #340 improves caching behind it.
This PR also excludes Hardcore conversation/project UI, Emdash/Codeg agent infrastructure, Electron code, and generated demo artifacts.
Verification
git diff --checkReview note
Dynamic/face-derived sketch planes remain editable through source-backed dimensions, but viewport sketch mode is disabled when their frame cannot be recovered safely. The viewer never invents a plausible-looking plane. This is source-backed profile editing, not a claim that STEP contains native construction history or a full sketch constraint solver.