sourceextensions/blender/demos/hex-keys-leds-build.xtl

1⍝│ HEX1000-keys-leds from source to a configured Tang Nano 1K. 2⍝│ The full physical calculator: actual cell placement, routed wire 3⍝│ footprints, both clock results, and schematic configuration. 4⍝│ Title: HEX1000-keys-leds: build process 5⍝│ Command: just ext blender hex-keys-leds-build 6⍝│ Run: just ext blender hex-keys-leds-build 7 8"bl:" u̲se< "Blender" 9"bp:" u̲se< "Bpy" 10"vd:" u̲se< "Video" 11"kb:" u̲se< "KeysBuild" 12 13ʰc̲heck ← { result → 14 n̲ot "exit 0\nerrors 0\n" m̲atch 16 t̲ake result ? ⎕P̲ANIC "hex-keys-leds-build: Blender failed: " c̲at result 15 result 16} 17 18rawcells ← n̲umbers ᵇˡr̲ead "work/keysbuild/cells.txt" 19rawroutes ← n̲umbers ᵇˡr̲ead "work/keysbuild/routes.txt" 20cells ← (((t̲ally rawcells) d̲iv 4) c̲at 4) r̲eshape rawcells 21routes ← (((t̲ally rawroutes) d̲iv 2) c̲at 2) r̲eshape rawroutes 22stats ← f̲loor n̲umbers ᵇˡr̲ead "work/keysbuild/stats.txt" 23"the build (LUTs, flip-flops, cells, tiles, nets, bytes, ALUs, RAMs, I/O, clock evidence):" 24stats 25_ ← "work/keysbuild/run.py" ᵇˡw̲rite! ᵇᵖlauncher 26_ ← "work/keysbuild/hex-keys-leds-build.cues.toml" ᵇˡw̲rite! (ᵏᵇc̲ues stats, ᵏᵇcueTable) ᵛᵈc̲ues 0 27_ ← "work/keysbuild/hex-keys-leds-build.srt" ᵇˡw̲rite! (ᵏᵇc̲ues stats, ᵏᵇcueTable) ᵛᵈs̲rt 0 28_ ← "work/keysbuild/video.py" ᵇˡw̲rite! ((ᵛᵈlandscape, cells, routes, stats) ᵏᵇs̲cene 0) c̲at (ᵛᵈr̲ender "hex-keys-leds-build.mp4") c̲at ᵛᵈreport 29_ ← "work/keysbuild/short.py" ᵇˡw̲rite! ((ᵛᵈshorts, cells, routes, stats) ᵏᵇs̲cene 0) c̲at (ᵛᵈr̲ender "hex-keys-leds-build-short.mp4") c̲at ᵛᵈreport 30"rendering the landscape video ..." 31r ← "work/keysbuild/run.py" ᵇˡr̲un! "work/keysbuild/video.py work/keysbuild/out" 32ʰc̲heck r 33"rendering the Short ..." 34shortRun ← "work/keysbuild/run.py" ᵇˡr̲un! "work/keysbuild/short.py work/keysbuild/out-short" 35ʰc̲heck shortRun 36ᵇˡr̲ead "work/keysbuild/out/report.txt"