Repository navigation
Step a short near-straight wall join instead of rejecting its wall graph (WOR-865) - #417
Merged
Merged
Conversation
… rejecting the graph (WOR-865) Just inside the step cut a near-straight miter trims about as far as the miter bound, longer than a 500 mm wall: Light into Heavy 7.3 to 8.8 degrees off straight and Standard into Heavy 4.8 to 5.9 were rejected, along with every other wall in the graph. Where a band fails, resolveWallBands now resolves each junction at its ends once more with a step in place of the miters beside it that alone take half a band (both wedges of a degree-2 join), and rejects only what still fails. A graph whose bands all succeed takes the same path as before; a sweep checks every input the old resolution accepted comes out bit for bit the same.
…st main's wallPiecesAndOutline (WOR-865)
…etry test's printout (WOR-865)
…and bound rescued overlap
kcjonson
marked this pull request as ready for review
November 15, 2026 06:40
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.
WOR-865. A short wall joining a wall of another thickness a few degrees off straight was rejected by the wall offsetter, and its whole connected wall graph with it: the graph drew as bare centrelines, and in navigation every wall in the colony lost its corner junctions.
Why
A near-straight join of two thicknesses is drawn as a step; further from straight it is a miter. Just past the switch, the miter trims both walls by about the apex distance, which is longer than a short wall, so
resolveWallBandsfailed withTrimOverrunsSegment. Measured on main with 500 mm walls (the minimum length): Light to Heavy rejected from 7.3 to 8.8 degrees off straight, Standard to Heavy from 4.8 to 5.9. The property tests all used 2000 mm arms, so none of it was covered.What changes
resolveWallBandsresolves exactly as before. Only when a band fails does it go on: it flags every failed band, then resolves the junctions at those bands' ends once more, drawing a wide wedge as a step when its miter would take at least half of either of its walls (both wedges of a two-wall join). Anything that still fails is rejected as before.resolveJunctionon its own is unchanged.The invariant
Every input main accepts produces identical output: bands, junction polygons, trims, pieces, and outline.
WallProperties.NearStraightRetryKeepsEveryAcceptedJoinruns 159,520 inputs (2000 and 500 mm arms, every preset pairing: two-wall joins every 0.1 degrees, bent T junctions, random stars of 3 to 6 arms, short-plus-long runs, chains with short middles, Z chains) through the new code and through a copy of main's resolution and drawing functions kept in the test file. All 155,909 inputs main accepts are identical, compared as integers. 3,216 are rescued; 395 are still rejected.Junction.ShortMiddleSegmentBetweenSharpCornersRejectsOverrun, a real overrun, still rejects.Rescued shapes
Rescued inputs pass the existing tiling, piece, outline, and order checks, with one exception the test states and bounds: 18 of the 3,216 (a half-thickness 100 wall into a 150 wall about 3 degrees off straight, with a 75 stem) fail the seam check by a fraction of a millimetre (3.6 mm against a tolerance of 3). They are identical to what main itself draws when it steps that wedge for longer walls; the flaw is main's own and is tracked as WOR-877. The test accepts a failing rescued input only on that exact match, caps such inputs at 1 in 100 of the rescued, and bounds overlap on every rescued input at 5 mm (worst found: 4.0 mm).
How checked
WallProperties.ShortNearStraightJoinsResolve(1,638 inputs; fails on main with 99 rejections) andNearStraightRetryKeepsEveryAcceptedJoin(about 3.8 s). The pieces comparison was seen to fail with the new drawing function broken; the two bounds were seen to fail when tightened.Perf: what could move is a construction edit, which re-resolves wall graphs in the render cache and in navigation. An accepted graph does the work it did before, plus keeping each junction's resolution until the graph is assembled and one byte per segment. A graph with a failed band costs at most about one more resolve. Nothing was timed: builds were running on the machine throughout.
Known, filed as WOR-877
resolveJunction, which still returns the long miter trims for a rescued join, so once both are on main a door is refused on such a wall although the drawn wall has room. It errs toward refusing.