Repository navigation
fix(geometry): cut what stands in layers, so lips, aprons and stairs are reported - #363
Open
ManuelStaggl wants to merge 4 commits into
Open
ManuelStaggl wants to merge 4 commits into
ManuelStaggl wants to merge 4 commits into
Conversation
…are reported The print check decided on the mesh which rims of an overhang hang from material that stands: a flood over vertices from the bed. A lip or an apron held by a cheek at one end stood all along, and a stair of small steps stood step on step, so ten overhangs of the review cases passed as printable. Closed bodies are now cut every 0.2 mm (layers.ts, clipper2-ts): of each cut only that is carried which lies over carried material below or reaches out no further than the overhang angle allows. A rim is asked along its length and split where the answer changes. Bridged triangles carry what is built on them; small and reported overhangs carry no more than the angle gives. Bridges, spans and the lying-hole rule stay on the faces as they were. Surfaces that are not closed have no outline to cut and keep the flood. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…not in seconds Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… only where needed Review of pull request 363. - The carried outline grew rounded, and every corner left an arc that was never taken out: a funnel of four flat sides took 33 s at 20 mm. It now grows mitred, as a slope of flat sides does, so a ledge over such a funnel hangs from its corners too. - A cut is worked out only where a face hangs over, a leaning face begins or an overhang below carries; elsewhere it is carried as a whole if the cut below is. A column 300 mm high costs what one of 30 mm does. - Material that begins in the air on faces that only lean (a rib with a pointed edge under a bridge, a keel, a blade) is reported: its leaning faces, as far as the layers below them are not carried. What hangs together with an overhang that is reported already is not counted twice. - A small overhang carries what stands on it once the material has risen as far as the angle needs to reach its tip: a wall on a small ledge stands, a stair of ledges still does not. - A triangle that comes twice no longer makes the body open. A mesh with a hole still falls back to the flood along the faces; the new field `layered` of the overhang map says which way was taken. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… cut along face rims Second review of pull request 363. - What begins in the air no longer depends on the angle of its faces: the heights where the angle alone does not carry a layer now include every lowest point of a face that looks down and every ridge that runs out faster than the angle. A blade with flanks at 1.4° holds no ceiling, and a rib whose edge rises from a wall is found wherever it lies against the layers. - Faces that look down are reported for the share under which nothing is carried even with every overhang of the part propped up. This replaces the rule that left out whatever hung together with a reported overhang: a tiny reported patch could swallow a large find. The lips under a shelf are now counted beside the shelf; seven expected values rise by the area of those faces. - Two readings of the cuts: on a small overhang material stands at once, but is sound only once it has risen as far as the angle needs. An overhang hanging from material that is not sound has that much less reach. A slope from the tip of a small ledge is free, a stair of ledges is still reported. - The cut is made of the rims of flat faces, not of every triangle: a stair of 740 steps took 4.5 s and takes 0.09 s. - The corner of carried material runs ahead of its sides by 2.05 layers' reach at most (was 4), enough for a slope of three flat sides. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.
Approach
Decision of 2026-11-12 after three reviews of #353: only what stands comes from layers; bridges, spans and the lying-hole rule stay on the faces as they were.
packages/geometry/src/layers.ts(new): a closed body is cut every 0.2 mm from the bed up (clipper2-ts2.0.1-18, the version the desktop app already uses). Of each cut only that is carried which lies over carried material of the cut below, or reaches out no further than the overhang angle (limit + 1° tolerance) allows. So being carried grows upwards at that angle and no faster.overhang.ts: a rim of an overhang patch is an anchor where the material just below it is carried in the layers. This is asked along the rim (every half reach) and the rim is split where the answer changes, so a lip held by a cheek is an anchor at the cheek only.standingVertices).area,supportByFace,vertices) are unchanged.Cases (
overhangCases.test.ts, 178 shapes, each in nine turns and mirrored)Now right: the drip edge with a cheek (30 and 100 long), the apron with a cheek at the back, the apron between two cheeks, and the six stairs. None of the 151 changed. No expected value was changed.
Still in
OPEN(all reported though printable, untouched by this change): L, T, cross and ring channels, the channel round a post (3.5–8 wide), tunnels 9 and 10 with R 4, tunnels cut at 30°, lying nut pockets M4–M6 with a corner up.New in
layers.test.ts: a head on a post on a bridge (free on a bridge of 8, reported on a ceiling of 12), and a closed bolt of 260 ribs.Run time
Known limits
overhangSpeed.test.ts) use the old flood, with its known errors.Checked
pnpm run typecheck, eslint and vitest forpackages/geometry, vitest (unit) forapps/desktop. No E2E, no contract tests.Second round (head
42c4de1), after the review of this pull requestlayers.test.ts)shortcut:inlayers.ts), and the new fieldlayeredof the overhang map says which way was taken; test "takes a triangle that comes twice …". Nothing readslayeredyet.All new cases run in nine turns and mirrored in
overhangCases.test.ts: 189 cases, 172 right, 17 inOPEN(unchanged, none added). No expected value of an existing case was changed.Run times on the build server (one pass, ms): before this round / now /
mainSuite of the package: 10.4 s before this round, 11.5 s now (15 more tests).
New limits:
Not changed, as the review named them small: a T beam with a cap 10 mm thick and a lip on top gives 360 (405 on
main), since carried material grows sideways above a reported overhang; a wall at exactly 46° gives 0 to 432 mm² depending on the turn, as onmain.The desktop flow "a sketch without a body is drawn in the view" has no body, so the print check cuts nothing there; its timeout does not come from this change. The check does run on the renderer's thread (
usePrintCheck.ts), so the run time of finding 1 would have frozen the window on angular parts.Third round, after the second review
Cases: 208 (178 of the reviews, 30 from the reviews of this pull request), 191 right, 17 in
OPEN(unchanged).Expected values changed, all because the lip under a shelf begins in the air and needs its own support, whatever props the shelf (its faces at 45° are now counted beside the shelf's 240 mm²):
bridges.test.ts: the four lips (area and faces named), and two bodies of the turn testRun times on the build server (second pass, ms): previous head / now /
mainLimits added in this round:
🤖 Generated with Claude Code