feat: add curved RectRing eaves with corner uplift - #112
Conversation
…iagnostic Refs i365dev/MinePilot#73. - Add backwards-compatible RectRing options cornerRise/riseSpan: a stepped, deterministic rise toward each corner approximating curved eave edges and corner uplift/haunch; flat rings expand exactly as before. - Add review-level MINIMAL_ATTACHMENT support diagnostic: components that declare inputs and use strict connect policies are flagged when they bear on the build through fewer than minAttachmentContacts shared faces, so roof frames cannot silently hang on one corner block. - Register pagoda-eave-flare-study example: multi-level temple/pagoda roof built from flared eave rings under default strict support policies, with no decorative suppression. - Update spec, LLM authoring contract, design guide, and coverage matrix. Verification: pnpm lint, pnpm -r typecheck, pnpm build, pnpm -r test (189 tests across core, importer, exporter-schem, and CLI).
Refs i365dev/MinePilot#73. - expandInputs now resolves consumers of a cornerRise RectRing through all emitted ring_<side>_seg<n> parts instead of the single ring_front_seg0 canonical part, so downstream bearing covers the whole flared eave. - Resolution derives from rectRingPlacements directly (single source of truth); flat rings keep the legacy ring_front attachment and every other component keeps its single canonical output part. - Add focused tests: whole-segment consumer edges, flat backward compat, and a sweep invariant that every expanded input ref resolves to an emitted node across valid RectRing configurations. - Add compact geometry stress benchmark comparing circular CircleRing authoring against flat and cornerRise RectRing footprints (node/block scaling, byte determinism, timings informational). - Document multi-segment input resolution in COMPONENT_PLAN_SPEC and LLM_AUTHORING_CONTRACT. Verification: pnpm lint, pnpm build, pnpm typecheck, pnpm test (193 tests).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b0e7f7414
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| contactCounts.set(owner, (contactCounts.get(owner) ?? 0) + 1); | ||
| contactCounts.set(neighborOwner, (contactCounts.get(neighborOwner) ?? 0) + 1); |
There was a problem hiding this comment.
Count only bearing contacts for minimal-attachment checks
When a strict component has one face against its declared input but also touches a consumer or decorative neighbor, this loop counts both boundaries and can reach the default threshold of 2, suppressing MINIMAL_ATTACHMENT despite the component still bearing on its support through one face. This is especially likely for the intended roof/eave case when another roof part sits above the weakly supported eave; retain the declared input owners and count contacts against those supports rather than every neighboring owner.
Useful? React with 👍 / 👎.
| cornerRise: number, | ||
| riseSpan: number | ||
| ): Array<{ start: number; length: number; rise: number }> { | ||
| const stepSize = Math.max(1, Math.ceil(riseSpan / cornerRise)); |
There was a problem hiding this comment.
Constrain the rise to the requested riseSpan
When riseSpan is not divisible by cornerRise, rounding each step width up makes the uplift extend beyond the requested horizontal reach. For example, cornerRise: 3, riseSpan: 4 produces three two-column zones, so nonzero rise spans 6 columns from each corner rather than 4; similarly, any span smaller than the rise is silently expanded to the full rise. Compute the elevation from the distance-to-corner and the requested span so the rise reaches zero exactly outside riseSpan.
Useful? React with 👍 / 👎.
Summary
Validation
This follows the MinePilot issue #73 landmark-building engine exploration.