GN Zone Iterate

examples/gn-zone-iterate/

Repeat Zone and For Each Element only iterate after pair_with_output. Evaluated cube counts follow 8 times (1+N) and 8 times P, not tree structure.

Rendered headless by the example itself. Select it to enlarge.

witnesses Repeat 32/24 verts/faces with X-centers at k*1.2; For Each 48/36 with Z-centers at i*0.6+0.21. Unpaired evaluates empty; For Each main Geometry passthrough is 6 verts.

tags geometry-nodes

runs on 4.5 LTS · 5.1 · 5.2 LTS

blender --background --python examples/gn-zone-iterate/gn_zone_iterate.py --

falsify it Breaks the contract on purpose and must exit 3

blender --background --python examples/gn-zone-iterate/gn_zone_iterate.py -- --unpair-repeat

A Repeat Zone row and a For Each Element tower that witness geometry-nodes-python zone pairing — not tree structure.

pair_with_output is load-bearing. Unpaired Repeat Input has no Geometry sockets; unpaired For Each evaluates empty (Cannot evaluate node group on 4.5). For Each's main Geometry output is the input mesh passthrough; generated cubes live on Generation_0.

Closed forms (cube = 8 verts / 6 faces):

Count alone is not enough. Joining N+1 cubes at the origin hits 32 verts with a single X-center (--no-offset). The center axis is the second witness.

Same on 4.5 LTS and 5.x (zones are 4.3+). No skip.

What failure each check would catch:

Run#

blender --background --python gn_zone_iterate.py --
blender --background --python gn_zone_iterate.py -- --output zones.png

The --output render path measures framing via examples/gallery_framing.py (exit 10 on violation).

Staging. Everything presentational runs after check() has passed on the raw evaluated zones. Each zone's blocks are graded along the axis the zone iterates on, using Object-space coordinates (amber to red along X for the four Repeat blocks, deep teal to mint along Z for the six For Each blocks), so the colour steps count the iterations. A render-only Bevel modifier after the GN modifier chamfers the cubes into machined blocks. The Repeat row sits on a walnut plinth; the For Each tower is threaded on a steel spindle over a round walnut base, so its 0.18 m gaps read as spacing on a rod rather than floating cubes.

Exit codes#

Per-script sequential checks. 9 is a valid check code; there is no rule against it. 10 is the shared framing helper.

CodeMeaning
0Success
1Uncaught exception (FATAL wrapper)
2argparse / usage
3Repeat evaluated vert/face count off closed form
4Repeat X-centers off closed form
5For Each evaluated vert/face count off closed form
6For Each Z-centers off closed form
7Carrier mesh was rewritten (checked first)
10Gallery framing violation
12--output produced no file

The blender-smoke workflow runs the check on Blender 5.2 LTS and 4.5 LTS (5.1 on the weekly cron, the needs-5.1 PR label, or manual dispatch). Smoke does not pass --output. Its catalog falsifiers are --unpair-repeat (expects exit 3), --no-offset (expects exit 4), --unpair-foreach and --foreach-main (each expects exit 5).

Source

examples/gn-zone-iterate/gn_zone_iterate.py View the script on GitHub →
Four chamfered blocks graded amber to red, evenly spaced on a walnut plinth by a Repeat zone, beside six teal-to-mint blocks threaded on a steel spindle by a For Each zone.