Skip to content

Commit 9bbdd11

Browse files
authored
feat: add car-mirror-symmetry example (#105)
Witness the Mirror + depsgraph contract on a subject whose failure is unmissable: a generic hatchback lofted as one half (14 stations, 9-point rings) and completed by the Mirror modifier. Closed forms assert the datablock keeps only the authored half (126/231/106, 28 centerline verts) while the evaluated mesh is exactly 2n-c (224/434/212), watertight with Euler 2, every evaluated vertex paired at negated X with zero deviation. Wheels and lamps mirror about object origins parked on the symmetry plane — offset the data, never the object. Hide the mirror and the render is literally half a car. Signed-off-by: fOuttaMyPaint <TMhospitalitystrategies@gmail.com>
1 parent 0d6636c commit 9bbdd11

12 files changed

Lines changed: 1425 additions & 3 deletions

File tree

.cursor-plugin/plugin.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"examples": [
6262
"examples/armature-bend",
6363
"examples/bmesh-gear",
64+
"examples/car-mirror-symmetry",
6465
"examples/color-attribute-wheel",
6566
"examples/collision-hull-proxy",
6667
"examples/compositor-glare",

.github/workflows/blender-smoke.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,3 +529,16 @@ jobs:
529529
# failure.
530530
xvfb-run -a "$BLENDER" --background \
531531
--python examples/soccer-ball-goldberg/soccer_ball_goldberg.py --
532+
533+
- name: Shipped example - car mirror symmetry (Mirror modifier + depsgraph)
534+
run: |
535+
set -euo pipefail
536+
# Check only (no render): a hatchback lofted as one half and
537+
# completed by the Mirror modifier; asserts the datablock keeps the
538+
# half (126/231/106, 28 centerline verts), the evaluated mesh is
539+
# exactly 2n-c (224/434/212), watertight with Euler 2, every
540+
# evaluated vertex has an exact negated-X partner, and wheels/lamps
541+
# mirror about object origins parked on the symmetry plane. Exits
542+
# non-zero on failure.
543+
xvfb-run -a "$BLENDER" --background \
544+
--python examples/car-mirror-symmetry/car_mirror_symmetry.py --

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</p>
1919

2020
<p align="center">
21-
<strong>12 skills</strong> &nbsp;&bull;&nbsp; <strong>6 rules</strong> &nbsp;&bull;&nbsp; <strong>2 templates</strong> &nbsp;&bull;&nbsp; <strong>17 snippets</strong> &nbsp;&bull;&nbsp; <strong>37 examples</strong>
21+
<strong>12 skills</strong> &nbsp;&bull;&nbsp; <strong>6 rules</strong> &nbsp;&bull;&nbsp; <strong>2 templates</strong> &nbsp;&bull;&nbsp; <strong>17 snippets</strong> &nbsp;&bull;&nbsp; <strong>38 examples</strong>
2222
</p>
2323

2424
<p align="center">
@@ -36,7 +36,7 @@
3636

3737
## Overview
3838

39-
This repository ships **12 skills, 6 rules, 2 templates, 17 snippets, and 37 runnable examples** for Blender Python development targeting Blender 5.1 (current stable) with Blender 4.5 LTS fallback support.
39+
This repository ships **12 skills, 6 rules, 2 templates, 17 snippets, and 38 runnable examples** for Blender Python development targeting Blender 5.1 (current stable) with Blender 4.5 LTS fallback support.
4040

4141
The content is consumed by AI coding agents (Cursor, Claude Code, any MCP-capable client) when working on Blender add-ons, geometry nodes scripts, batch pipelines, or animation tooling. There is no build step. Edit the markdown and Python files directly.
4242

@@ -720,6 +720,25 @@ bound by face vertex count, never enumeration order. Sibling to
720720
witnesses polyhedral invariants plus per-face-class material binding. The
721721
smoothed render inverts on sight if the panel binding does.
722722

723+
</td>
724+
</tr>
725+
<tr>
726+
<td width="46%" valign="middle">
727+
<a href="examples/car-mirror-symmetry/"><img src="examples/car-mirror-symmetry/preview.webp" alt="Car mirror symmetry: a red low-poly hatchback on a dark studio floor, light windshield band and white headlamp pair — lofted as one half and completed by the Mirror modifier evaluated through the depsgraph, proving 2n-c counts, exact negated-X partners, a welded watertight centerline, and wheels mirrored about origins on the plane" /></a>
728+
</td>
729+
<td valign="middle">
730+
731+
### [car-mirror-symmetry](examples/car-mirror-symmetry/)
732+
733+
The Mirror + depsgraph contract: the datablock holds only the authored half
734+
(126/231/106, 28 centerline verts) while the evaluated mesh is the welded
735+
whole — exactly `2n − c` verts, watertight with Euler 2, every vertex paired
736+
at negated X (deviation 0.0). Wheels and lamps mirror about object origins
737+
parked **on** the symmetry plane — offset the data, never the object.
738+
Companion to [`depsgraph-export`](examples/depsgraph-export/) (evaluated-vs-
739+
original) and [`shape-key-blend`](examples/shape-key-blend/) (non-destructive
740+
evaluation). Break the mirror and the render is literally half a car.
741+
723742
</td>
724743
</tr>
725744
</table>

ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Not committed; target list for the next content version. (v0.3.0 shipped the smo
121121
- Freestyle SVG / line-set witness: Freestyle line set on a silhouette (full render pass; prefer Line Art first)
122122
- ~~prop-origin-transform witness~~ **SHIPPED** as `examples/prop-origin-transform/` — origin to base center + data-API scale apply + `matrix_parent_inverse` for a bolted accessory; scale `(1,1,1)`, local `min.z==0`, world AABB delta 0, bare jump ~0.43 m, MPI err ~3e-8; stale `matrix_world` until `view_layer.update()`; byte-identical on 4.5.11 and 5.1.2
123123
- ~~Goldberg polyhedron topology witness~~ **SHIPPED** as `examples/soccer-ball-goldberg/` — soccer ball as a truncated icosahedron: bmesh icosphere cut at 1/3 per edge, faces ordered by link-topology walks; closed forms 60/90/32 + Euler 2, census 12×5+20×6, uniform degree 3, edge dev 6.5e-06, planarity 1.9e-06 (independent Newell normal), circumsphere dev 9.0e-06, panels bound by face vertex count (enumeration-order probes exit 13); float32 noise floor ~9e-6 → 3e-5 gates; byte-identical on 4.5.11 and 5.1.2
124-
- Mirror-modifier symmetry witness: half-model completed by Mirror evaluated through the depsgraph — evaluated-vs-original counts (2n − welded centerline), exact ±X partner for every evaluated vertex, merge-threshold weld proof, failure dramatically visible (half a subject / split seam). Strongest subject: a generic vehicle body
124+
- ~~Mirror-modifier symmetry witness: half-model completed by Mirror evaluated through the depsgraph~~ **SHIPPED** as `examples/car-mirror-symmetry/` — generic hatchback loft (14 stations × 9-point half-rings); datablock keeps the half (126/231/106, 28 centerline), evaluated is exactly 2n−c (224/434/212), watertight Euler 2, ±X partner dev 0.0; wheels/lamps mirror about origins parked on the plane; probes: merge off → 252 (exit 5), centerline off-plane → 27≠28 (exit 4), axis off → 126 half-car (exit 5), applied → exit 3; byte-identical on 4.5.11 and 5.1.2
125125
- Chess-piece lathe witness: a turned piece (rook/pawn) via Screw modifier or bmesh spin from an authored profile — evaluated verts == profile × steps (minus pole merges), ring radii match the profile closed form, axis of revolution exact
126126
- Dice-pair per-face witness: material/attribute assignment driven by face normal direction, opposite-faces-sum-to-7 as an independently computed invariant, pip placement from a closed-form lattice
127127
- Bicycle-wheel radial witness: spokes via radial Array with object offset — exact angular spacing, spoke count, hub/rim concentricity, every evaluated spoke endpoint on its computed rim coordinate
12.5 KB
Loading

0 commit comments

Comments
 (0)