Translate field value segment composition helpers

This commit is contained in:
Meta Vens 2026-05-04 14:34:39 +01:00
commit b860bd8bb8
8 changed files with 408 additions and 14 deletions

View file

@ -124,12 +124,15 @@ Completed pie chart entry:
Completed field value helper entry:
- `docs/research/translations/shriinivas-fieldvalue-digit-at.md`
- Source groups: `Create Decimal`, `Create Segment`, `Digit At`
- Source groups: `Create Decimal`, `Create Segment`, `Seven Segments`,
`Delete Segments`, `Digit At`
- Verification: decimal glyph geometry matches source with sorted max vertex
delta `0.0`; segment geometry matches horizontal and vertical source cases
with sorted max vertex delta `0.0`; digit scalar helper matches source
behavior across four number/position cases by driving `Mesh Line.Count` with
the result.
with sorted max vertex delta `0.0`; seven-segment chassis geometry matches
source with 74 vertices and sorted max vertex delta `0.0`; digit scalar
helper matches source behavior across four number/position cases by driving
`Mesh Line.Count` with the result; delete-mask scalar helper matches source
across 195 digit/segment-position cases with zero mismatches.
## Extraction Workflow

View file

@ -137,6 +137,39 @@ part instead of another anonymous mesh primitive.
Tiny named parts are not overengineering when they carry stable intent.
## Chassis Groups Compose Parts
Once a part has a stable contract, the next group up should read like assembly,
not reinvention. `Seven Segments` does not know how to pinch bar tips; it calls
`Create Segment` seven times with different orientation, length, thickness, and
offset controls, then joins the results with a decimal dot.
The useful pattern is:
```text
tested part -> repeated placements -> joined chassis -> later visibility logic
```
Metaphor: the lower group machines the bolt. The chassis group decides where
the bolts go. Keep those jobs separate so later graph layers can remove,
materialize, or transform parts without reopening the primitive geometry logic.
## Boolean Thickets Are Often Tables
Large boolean node regions can look more algorithmic than they are. `Delete
Segments` is mostly a truth table: compare the digit, compare the segment
position, combine masks, and decide whether that part should disappear.
When a graph is a table, translate it as a table with named clauses:
```text
input values -> grouped masks -> digit-specific clauses -> final OR
```
The source node count is not sacred. The behavior is. A compact translation is
acceptable when full-grid verification proves every input pair still lands on
the same boolean result.
## Field Masks Are Chisels
You can sculpt simple meshes by combining a regular seed mesh with field masks.

View file

@ -7,6 +7,8 @@
- Source groups:
- `Create Decimal`
- `Create Segment`
- `Seven Segments`
- `Delete Segments`
- `Digit At`
- Geometry Script recreation:
`examples/geometry_script/shriinivas_fieldvalue.py`
@ -14,11 +16,12 @@
## Why This Graph
`fieldvalue.blend` contains a large seven-segment field display system. The full
`Field Value` graph has 176 nodes, so the first honest targets are small
helpers: `Create Decimal` and `Digit At`.
`Field Value` graph has 176 nodes, so the first honest targets are helpers that
build the digit chassis before the full display logic is attempted.
Together they show the first display-system layers: tiny glyph geometry,
field-sculpted segment geometry, and value-only digit extraction.
field-sculpted segment geometry, segment composition, segment visibility masks,
and value-only digit extraction.
## Create Decimal Map
@ -88,6 +91,57 @@ Metaphor: the segment starts as a plain rectangular tile. The position field is
a stencil laid over its vertices. The end-corner vertices get pinched into tips,
while the middle vertices stay put. It is a chisel, not a sculpting spree.
## Seven Segments Map
Source group: `Seven Segments`
Geometry Script group: `VG Seven Segments`
Mechanism:
- Divide horizontal and vertical segment sizes by two to get left/right and
upper/lower placement extents.
- Subtract `X Separation` from horizontal length and `Y Seperation` from
vertical length so the bars leave small gaps.
- Create four vertical bars with `X Major = False`:
lower left, upper left, lower right, and upper right.
- Create three horizontal bars with `X Major = True`:
bottom, middle, and top.
- Create the decimal dot with radius `Horizontal Segment Thickness / 2`.
- Join dot plus seven bars into one `bars` output.
Metaphor: `Create Segment` is a single machined stroke; `Seven Segments` is the
digit chassis. It bolts seven strokes and one punctuation bead onto a shared
frame so later graph layers can decide which pieces stay visible.
## Delete Segments Map
Source group: `Delete Segments`
Geometry Script group: `VG Delete Segments`
Inputs:
- `Digit`
- `Segment Position`
Output:
- `result`
Mechanism:
- Shift `Digit` down by one.
- Group `Segment Position` into repeated pair masks:
`0/1`, `2/3`, `4/5`, `6/7`, `8/9`, `10/11`, `12/13`, plus singleton `14`.
- Compare the shifted digit against the source's digit cases.
- For each digit case, return true when that segment-position mask should be
deleted.
- OR all digit-specific delete clauses into the final `result`.
Metaphor: `Delete Segments` is not a sculptor. It is a stencil card. Given a
digit and a slot on the chassis, it punches out the slots that should go dark.
## Verification
Run:
@ -107,10 +161,12 @@ Results from Blender 5.1.1:
| Create Decimal vertices | 32 | 32 | 0.0 | accepted |
| Create Segment horizontal vertices | 6 | 6 | 0.0 | accepted |
| Create Segment vertical vertices | 6 | 6 | 0.0 | accepted |
| Seven Segments vertices | 74 | 74 | 0.0 | accepted |
| Digit At `1234.0`, position `0` | 4 | 4 | 0 | accepted |
| Digit At `1234.0`, position `1` | 3 | 3 | 0 | accepted |
| Digit At `98765.0`, position `2` | 7 | 7 | 0 | accepted |
| Digit At `120305.0`, position `3` | 0 | 0 | 0 | accepted |
| Delete Segments grid | 195 cases | 195 cases | 0 mismatches | accepted |
## Lessons
@ -127,3 +183,10 @@ Results from Blender 5.1.1:
- Field masks can act as chisels. In `Create Segment`, comparisons over
position decide which vertices are allowed to move, creating pointed tips
without hand-authoring mesh coordinates.
- Composition groups should preserve part boundaries in the script even when
the output is one joined geometry stream. The source `Seven Segments` graph is
easier to reason about as four vertical bars, three horizontal bars, and one
dot than as a pile of joined anonymous geometry.
- Dense boolean graphs often hide lookup tables. Translate them into named
clauses and verify over the full input grid instead of preserving every source
`OR` node as ceremony.