Skip to content

feat(app): arrange lifts a design that sits under the bed onto it - #2340

Merged
subydoo-ci[bot] merged 1 commit into
mainfrom
feat/arrange-lifts-dipping
Nov 15, 2026
Merged

subydoo-ci[bot] merged 1 commit into
mainfrom
feat/arrange-lifts-dipping

Conversation

@subydoo-ci

@subydoo-ci subydoo-ci Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

For users (against main)

On main, Arrange keeps each object's height. A design whose body sits under the bed stays under it after an arrange, and the object list keeps marking it off the bed until its next edit lifts it. That covers anything from a body whose arcs dip a tenth of a millimeter under its lowest line to a part built centered on z 0.

Now Arrange lifts such a design onto the bed as it places it, the same way a design's landing does. The part is only ever raised, so one built standing above the bed keeps its height. A locked part stays where it is, and so does anything the arrange does not place, such as the rest of the plate when only a selection is arranged. Objects with no design history keep the height arrange gives them, as before. Opening a project still moves nothing.

The lift is part of the arrange's undo step, so one undo takes the layout and the lift back together. A project saved after the arrange opens with the part on the bed.

What

arrangePlate (packages/app/src/plate/edit.ts) passes every layout through liftArranged before it lands: the shown plate's transforms and those of objects moved to new plates, on each arrange route (the engine's arrange, the nest and the box packer). For each design the layout places, unlocked, it raises the transform with cad-history's liftedOnto, the rule a landing already uses, so the 0.01 mm allowance and the raise-only rule come from one place. The lift goes into the design's landing moves (History.placed, its third number) through placedAfter and withPlaced, as the landing stores it. The frame the design tools and the next edit read is the plate transform less those moves, so it keeps its height, and the saved file holds the lift.

liftedOnto now takes only the bed's lowest, which is all it reads, and the app's lowestOf (plate/arrange.ts) is shared by the design host's landing and the arrange.

No MCP tool's reply or version changes. Arrange in a client's own project (slicerx_arrange) works on that project's models, which have no design history.

How it was tested

packages/app/test/arrange-lift.test.ts, on the box packer:

  • A plate holding a part built centered on z 0 (already moved onto the bed by (60, 60) mm), a body with a 0.118 mm arc dip, a part built standing 5 mm above the bed and a locked part 10 mm under it, arranged all at once. The centered part ends at z 0 with landing moves [60, 60, 10], the dipping one lifted 0.118 mm with [0, 0, 0.118], the one above the bed keeps its 5 mm and has no landing moves, and the locked one stays where it stood, still marked off the bed. The design frame's height is unchanged for every one, and one undo puts back every transform and the old landing moves.
  • A part 0.005 mm under the bed keeps its height.
  • Arranging only the dipping part lifts it and leaves the unselected centered part where it was.
  • A project saved after the arrange reads back with landing moves [60, 60, 10] and the arranged transform, and opened onto an empty plate it stands on the bed in the same frame.

Three of the four fail on main (the 0.005 mm case passes on both).

At this commit, with the geometry engine built from it: the mcp and app suites pass both live and in replay mode, with no recorded reply or fixture changed, as do the native provider tests against the real engine and the viewport tests. Typecheck, the tools doc check, the change file fold check, the dash and brand checks and the web build pass. The shell stays at 185.9 KB gzip against its 188 KB budget.

Arrange now lifts a design whose body sits more than 0.01 mm under the
bed onto it, the same way a design's landing does. That covers a body
whose arcs dip a tenth of a millimeter under its lowest line as well as
a part built centered on z 0. The part is only ever raised, so one built
standing above the bed keeps its height, and a locked part stays where
it is. Objects the arrange does not place keep their height, such as
the rest of the plate when only a selection is arranged, and so do
objects with no design history. Opening a project still moves nothing.

The design's history keeps the lift as the third number of its landing
moves, as a landing keeps it. The frame the design tools and the next
edit read keeps its height, and a project saved after the arrange opens
with the part on the bed. The lift is in the arrange's undo step, and
it applies on every arrange route (the engine, the nest, the box
packer) and to objects the arrange moves to new plates.

No tool reply or version changes.

Signed-off-by: subydoo-ci[bot] <343861189+subydoo-ci[bot]@users.noreply.github.com>
@subydoo-ci subydoo-ci Bot added user-facing People using SlicerX will notice this; it goes in the release notes roadmap:cad Roadmap feature: cad labels Nov 15, 2026
@subydoo-ci
subydoo-ci Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit ff7e2ac Nov 15, 2026
98 checks passed
@subydoo-ci
subydoo-ci Bot deleted the feat/arrange-lifts-dipping branch November 15, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

roadmap:cad Roadmap feature: cad user-facing People using SlicerX will notice this; it goes in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants