Skip to content

Move and Copy: pick a From point and a To point - #2250

Closed
bugless78 wants to merge 1 commit into
tangency-labs:mainfrom
bugless78:feature/point-to-point-paste
Closed

bugless78 wants to merge 1 commit into
tangency-labs:mainfrom
bugless78:feature/point-to-point-paste

Conversation

@bugless78

@bugless78 bugless78 commented Oct 17, 2026 •

Copy link
Copy Markdown

This adds From-to placement for Move and Copy: you pick a point to move from and a point to move to, with a live preview, and it can be cancelled or undone in one step. It works for sketch geometry, bodies and component occurrences, and also for pasting from the clipboard.

Change

Adds explicit From → To placement for sketch Move/Copy and clipboard paste, with live preview, cancellation and one-step undo. Bodies and an exact component occurrence also gain anchored move/copy and clipboard placement.

Changes a default: no

  • Sketch Move Type → Point to Point translates the selected geometry; Create Copy retains the source. Sketch clipboard paste preserves internal constraints and independent dimensions.
  • Point to Point Paste is an explicit context-menu/command-palette action. Ordinary Paste, Ctrl+Shift+V / ⌘⇧V Paste New, cut and cross-design copying keep their current upstream behavior and shortcuts.
  • Same-design body and single-occurrence copies use upstream's clipboard tracking. Explicit point-to-point object paste uses source references in the current design; ordinary clipboard actions continue to support copies between designs. Bodies must belong to the active component and one placement. Component copies are linked instances, with exact nested paths and pending transforms.
  • JSON commands have input/output schemas and validate paired finite anchors. The selected body placement supplies its frame, including when a different instance is active. One outer command owns the undo step; scratch previews do not edit the design.
  • No new design-file fields, dependencies or unsafe code. Labels are in a pending locale file, including all complete catalogs and de/ko.

Usage and command parameters: docs/point-to-point.md.

Validation

  • Point-transfer tests: 8 engine + 6 UI passed, including paired-anchor validation, rotated-instance placement, nested paths, independent sketch dimensions, live canvas preview, cancellation and one-step undo.
  • Existing clipboard regressions: 29 engine + 38 UI passed, preserving ordinary Paste/Paste New, cut and cross-design behavior.
  • Existing sketch-modification UI regressions: 40 passed, including current Move/Copy, Mirror, Scale and constraint behavior.
  • All 12 WebAssembly crates checked. Scoped engine/UI Clippy passes with only the existing nonminimal_bool and collapsible_match classes allowed on the command line; no Clippy source suppressions added.
  • Full cargo xtask ci attempted: format, assets/icons, licences, lists, layers and UI containers pass; workspace Clippy stops at three unchanged geometry nonminimal_bool findings on Rust 1.95. Full-suite success is not claimed.

Screenshots of the behavior

Sketch point-to-point move preview

Explicit sketch paste anchors

These native screenshots demonstrate the existing anchor workflow; the rebased form uses the current shared UI kit. The current canvas-pick regressions verify preview, placement, cancellation and undo.

Earlier native verification: sketch (-30,-10) → (30,20) retained the original and independent dimensions; component (0,0,0) → (30,20,6) gave centre (35,25,11), undo restored (5,5,5), and linked paste preserved the original.

Applied sketch paste with independent dimensions

Component point-to-point placement

Integration status

Replayed the feature as one linear commit on main 1cf5f83924249b88c9b6aaaecc182d720fae3c87. Preserved the body/component and cross-design clipboard work from #3390/#3512, feature transfer from #5805, whole-sketch transfer between designs from #8962, the dialog descriptor/UI-kit layout, current sketch transform and constraint behavior, and the grounded-first-component default. Movable test fixtures explicitly opt out of grounding.

Known open overlap: #2609 adds sketch move triads and point-to-point UI; this PR adds anchored clipboard placement and shares the sketch-move form. The merged profile/chain picking from #8812 is preserved in the Move form; #6947 remains open and also touches sketch move UI. The open branches were left intact; this PR does not claim their issues. Maintainers should account for the overlap when selecting merge order. SpaceMouse support remains separate in #2139. Newer upstream main aedbf0b1d also passes a conflict-free merge simulation. Ready for review and the normal CI/merge-queue process; not merged.

@bugless78
bugless78 force-pushed the feature/point-to-point-paste branch from 9025ffc to fb8295e Compare October 17, 2026 23:38
@bugatron78

Copy link
Copy Markdown

Native macOS verification with public-safe examples: sketch move and paste use (−30, −10) → (30, 20). The pasted 20 × 15 mm rectangle retains independent dimensions. Component placement uses (0, 0, 0) → (30, 20, 6), giving center of mass (35, 25, 11); one undo restores (5, 5, 5). Linked component paste also keeps the original.

point-to-point-component-move point-to-point-paste-applied point-to-point-sketch-move point-to-point-sketch-paste

@jyviko

jyviko commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

To the coding agent working on this PR (a reminder from @jyviko, maintainer):

  1. Re-pull and re-read the rules: pull main and re-read CLAUDE.md and AGENTS.md before your next push. They changed this week: PRs land through the merge queue, a PR is rebased onto main and never merged with it, and you check the open work before starting.
  2. This PR conflicts with main. Before you rebase, look at the open and recently merged PRs that touch the same files or the same issue (gh pr list -R tangency-labs/solidcraft --state all --search "<issue or file>"). A conflict often means someone else already landed, or is landing, the same fix. If so, coordinate with them on the PR or on Discord instead of pushing over it.
  3. Then rebase onto main (not a merge of main) and push once: every push restarts the whole CI.
  4. Claim every issue your fix addresses: list each one as Fixes #N in the description, and check that none of them already has another open PR.

Please tell your person about this note. Thank you!

@bherbruck

Copy link
Copy Markdown
Collaborator

Thanks for working on this. GitHub now shows a conflict with main. Could you rebase onto the latest main and push with --force-with-lease? Please rebase rather than merging main in, so the history stays clean. Once it merges cleanly I'll take another look.

@bugless78
bugless78 force-pushed the feature/point-to-point-paste branch from 8643640 to 27eb3c3 Compare October 30, 2026 19:09
@bugless78

Copy link
Copy Markdown
Author

Addressed the requested rebase in 27eb3c3: one linear feature commit on main 1cf5f8392, pushed with an exact --force-with-lease. The later upstream aedbf0b1d also passes a conflict-free merge simulation. I re-read the current rules and checked overlapping work before resolving the conflicts.

This preserves standard body/component clipboard behavior, cross-design and whole-sketch transfers (#3390/#3512/#5805/#8962), Paste New's shortcut, current dialog/UI-kit layout, and merged profile/chain selection (#8812). Explicit point-to-point paste has a separate menu/palette action; the three new JSON commands have input/output schemas.

Coordination: open #2609 overlaps sketch point-to-point Move, and #6947 touches the Move UI. This PR additionally covers anchored clipboard placement and body/component placement. Those branches are untouched and their issues are not claimed here; please consider that overlap when choosing merge order. SpaceMouse remains separate in #2139.

Validation: 14 point-transfer, 67 existing clipboard and 40 sketch-modification UI tests pass (121 total), as do all 12 wasm checks and scoped engine/UI Clippy with baseline lint classes allowed only on the command line. Full cargo xtask ci passes the earlier checks and stops at three unchanged geometry nonminimal_bool findings under Rust 1.95. Updated description retains the actual native screenshots and documents the current behavior. Ready for maintainer review; no merge or CI approval label applied.

@bherbruck bherbruck changed the title Add point-to-point sketch move and clipboard placement Move and Copy: pick a From point and a To point for sketches, bodies and components, and paste a sketch at a chosen point Nov 2, 2026
@bherbruck bherbruck changed the title Move and Copy: pick a From point and a To point for sketches, bodies and components, and paste a sketch at a chosen point Move and Copy: pick a From point and a To point Nov 2, 2026
@bherbruck

Copy link
Copy Markdown
Collaborator

Thanks for this! I'm closing older PRs that have gone quiet or drifted from main, since a lot has changed in the last couple of weeks. If you'd still like this in, please open a fresh PR against current main; happy to review it.

@bherbruck bherbruck closed this Nov 13, 2026
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