Repository navigation
Bound the wall step cut's walk so the offsetter always returns (WOR-878) - #419
Merged
Merged
Conversation
The step walks the thinner band's corner until it clears the thicker band's cap, whose line runs between two rounded points. Where the retry steps a nearly square corner, that line can lean off square by more than the bands lean off 90 degrees apart, so the corner runs along it and never clears. The walk now stops at the thin segment's length, where the band is gone and the graph is rejected, as it was before the retry.
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-878.
geometry::resolveWallBandson main does not return for some chains of short walls. The render cache calls it on every construction edit and navigation on every construction version change, so in the game it is a freeze.Introduced by PR 417 (WOR-865). Found by a reviewer running this file in a harness with walls shorter than any earlier sweep used.
The input
Millimetres,
hthe half-thickness:(0,0)-(110,207) h75,(110,207)-(474,182) h100,(474,182)-(487,371) h75,(487,371)-(400,406) h150. Before PR 417 it is rejected withTrimOverrunsSegment. On main it hangs; reproduced in the real build.Cause
PR 417's retry re-resolves the junctions beside a failed band, drawing a two-wall join as a step whenever the two walls point more than 90 degrees apart, which includes nearly square corners. The step code walks the thinner wall's trim a millimetre at a time until its corner clears the thicker wall's cap line:
while (!clearOfCap(trim)) ++trim;. For the near-straight joins the step code was written for, the corner moves away from the line and the walk ends. For a near-square corner the cap line, which runs between two rounded points, can lean off square by more than the walls lean off 90 degrees; the corner then runs along the line or toward it and never clears.Fix
The walk, and the line-crossing jump before it, stop at the thinner wall's length.
trimstrictly increases toward that bound, so the loop ends. A trim at the wall's length failstrimmedBand, so the graph is rejected, as it was before the retry existed. Only results that were rejections or hangs change. The retry is still a single pass.How checked
WallProperties.ShortMixedChainReturns: the input above returnsTrimOverrunsSegment. On main the same test runs until killed.WallProperties.ShortMixedChainsRejectOrTile: 4,000 seeded chains of 3 to 5 walls with 20 to 420 mm legs and mixed thicknesses all return (13 of them hang on main), and each is either rejected or passes the tiling checks.WallProperties.NearStraightRetryKeepsEveryAcceptedJoin(about 160,000 inputs against a copy of the pre-retry logic) passes untouched: accepted layouts are unchanged.Can the game produce such walls
The wall tool refuses a segment under 500 mm, but that checks only the drawn segment. A T-junction splits its host wall at the joining point with no length check, and the vertex snap radius is 0.4 m, so a join 0.4 to 0.5 m from a wall's end leaves a piece under 500 mm. The dev
wallsverb skips validation and takes any length.Not fixed here
The retry steps two-wall joins that are nowhere near straight. With this fix they no longer hang, but in a 40,000-input run 5 of 11,982 non-folding chains that the pre-retry code rejected now resolve with geometry that fails the tiling checks (a junction vertex past the miter bound, or a 3.6 mm cap gap), at corners about 100 to 105 degrees apart. Narrowing the retry to near-straight joins is a separate change and follows.
Perf: none on layouts that resolve. On the retry path the walk is bounded by the thinner wall's length in millimetres.