Repository navigation
NOISSUE - Group boxes reserve note width and label room - #115
Closed
nyagamunene wants to merge 2 commits into
Closed
nyagamunene wants to merge 2 commits into
nyagamunene wants to merge 2 commits into
Conversation
nyagamunene
force-pushed
the
schem-group-box-extents
branch
from
October 11, 2026 23:17
8086a9c to
9a0e8b8
Compare
Schematic group boxes were sized from part bodies only, so long note lines ran out of their box into the next region and value text / pin labels sat on the box edge. The box and the region packer now reserve the widest note line and 6 mm of label room left and right (regions with no box, packed beside grouped ones, get the same room). Moves two layout snapshots and the ref_led_driver SVG fingerprint (the fingerprint must come from CI). Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
nyagamunene
force-pushed
the
schem-group-box-extents
branch
from
October 11, 2026 23:36
9a0e8b8 to
8e9498e
Compare
Three tests on examples/env_logger.synth through the public layout output: group boxes do not overlap, every group note line sits inside its box, and part bodies keep 6 mm of label room to the box's side edges. Only the label-room test fails without the box change; the other two guard the design against future packing regressions. Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
rodneyosodo
requested changes
Oct 21, 2026
rodneyosodo
left a comment
Contributor
There was a problem hiding this comment.
Test shard 1/3 fails on golden_svg (ref_battery_charger 6115 paths vs 6134) and the PR is CONFLICTING. The new side pad changes every group box's drawn geometry, so the manifest and the remaining layout snapshots have to be re-recorded together.
| /// net labels sit outside the body, so a body-sized box leaves them on | ||
| /// its edge. Ungrouped regions packed beside grouped ones reserve the | ||
| /// same room, so their own labels get it too. | ||
| const GROUP_BOX_SIDE_PAD: f64 = GROUP_BOX_PAD + 6.0; |
Contributor
There was a problem hiding this comment.
GROUP_BOX_SIDE_PAD widens every drawn group box by 12 mm, but fixtures/kicad-reference/svg/golden.json (and snapshots beyond docs_blocks/env_logger) are not re-recorded, so golden_svg cannot pass. Regenerate from CI (SYNTH_REGEN_SVG_GOLDEN=1) and rebase the conflicting layout/snapshots.
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.
What
Schematic group boxes were sized from part bodies only. On the buck board that caused three problems. A long note line ran out of its box into the next region. Value text (
1.5M,47uF) and pin-stub labels (EN) sat on or outside the box edge. And nothing flagged any of it, becauseE-SYNTH-SCHEM-013only compares box against box.Change (
crates/synth-layout/src/lib.rs)group_note_width, using the sharedtext_run_widthestimate), and the region packer reserves the same width so neighbours do not overlap.GROUP_BOX_SIDE_PAD(5 mm plus 6 mm label room) instead of 5 mm. On boards with named groups, any leftover ungrouped parts form a region with no box, and that region now reserves this room too (12 mm wider, 6 mm further right). Boards with no groups are unchanged.long_group_note_stays_inside_its_box_and_clear_of_neighbours(failed before the change, and also fails if the packer widening is removed) andgroup_box_leaves_label_room_beside_its_parts.Pictures (buck board from #110)
Before:
After:
Test status
cargo test --workspaceis green except two local-only failures that also fail on clean main.multisheet_kicad_loadsfails because KiCad libraries are missing here.golden_svgfails because the local KiCad version differs from the committed fingerprints.docs_blocksschematic andenv_logger_layout). Their x positions shift.fixtures/kicad-reference/svg/golden.jsonis not updated. Onlyref_led_drivermoves because of this change, and its new fingerprint has to come from CI, since local hashes differ for every design.Not fixed here
UVLOandBUCKtitles).text_run_widthestimate (0.72 em per character), so a line of very wide glyphs could still overrun.examples/env_logger.synth: boxes do not overlap, group notes sit inside their box, and parts keep 6 mm label room. Only the label-room test fails without the box change. The other two are guards.