Expand grammar and add CSG parity fixtures
This commit is contained in:
parent
3cb2bd56bc
commit
3c8b37b53f
15 changed files with 494 additions and 26 deletions
|
|
@ -25,11 +25,21 @@ The first rules are small on purpose:
|
|||
- `RoomSpec`
|
||||
- `CorridorSpec`
|
||||
- `DoorSpec`
|
||||
- `GalleryChainSpec`
|
||||
|
||||
They prove the shape of the pipeline: grammar emits semantic claims, claims
|
||||
compile into `vg_csg` brushes, and the CSG assembler produces the mesh verdict.
|
||||
|
||||
The first expansion adds local `Frame`s, deterministic seeded variation, and
|
||||
`RuleSet`/`GalleryChainSpec` composition. This is the rule: every richer grammar
|
||||
feature must sharpen spatial intent before it increases mesh complexity.
|
||||
|
||||
The rule is simple: future procedural generators should feed CSG with authored
|
||||
space claims instead of bypassing the tree with final triangles. Cities,
|
||||
habitats, corridors, and districts can grow from fields and grammars, but hard
|
||||
architectural legality belongs in the CSG tree.
|
||||
|
||||
Where a grammar feature compiles to a CSG behavior that overlaps public
|
||||
RealtimeCSG semantics, tests should preserve exact parity at that seam: claim
|
||||
counts, brush counts, category vocabulary, split counts, and mesh invariants.
|
||||
Novel grammar can sing. Shared API behavior must stay in tune.
|
||||
|
|
|
|||
|
|
@ -265,6 +265,12 @@ Algorithm migration steps:
|
|||
|
||||
## Acceptance Tests To Add
|
||||
|
||||
- Where `vg_csg` exposes the same behavior as public RealtimeCSG/demo APIs,
|
||||
maintain exact observable parity fixtures. These should compare public
|
||||
behavior such as category vocabulary, brush plane/polygon counts, split
|
||||
counts, visible/reversed semantics, bounds early-outs, and mesh output
|
||||
invariants. Do not use vague "looks right" tests where a public seam has a
|
||||
countable contract.
|
||||
- Two overlapping additive boxes produce no duplicate coplanar surface.
|
||||
- Subtraction is implemented as `!(!A || B)` and matches direct cases.
|
||||
- Intersection is implemented as `!(!A || !B)` and matches direct cases.
|
||||
|
|
|
|||
Loading…
Reference in a new issue