main
John Lauer Save native two-sided contact artwork and recorded GLB material correction; qualification remains open 57e2489
#!/usr/bin/env python3
import json,subprocess,shutil,time
from pathlib import Path
R=Path(__file__).resolve().parents[1];O=R/'mechanical/board23-review';shutil.copy2(O/'board23-opaque-review.glb',R/'checkpoints/board-review-v85/board23-opaque-review.glb');session='adom-custom-load-current-milestone'
def call(v,a,label):
 r=json.loads(subprocess.check_output(['adom-bridge','--target','AdomLapper','--ai-thread','adom-custom-load',v,json.dumps(a)],text=True));(O/f'material-{label}.json').write_text(json.dumps(r,indent=2)+'\n');assert r.get('success',r.get('ok')),r;return r
call('pup_evaluate',dict(sessionId=session,expression='(()=>{const c=boardReview.viewer.getCamera();c.alpha=-Math.PI/2;c.beta=Math.PI-.01;c.radius=.105;return {ready:boardReview.ready}})()'),'camera-before')
r=call('desktop_record_start',dict(hwnd=10291968,cursor=False,audio=False,fps=30,maxDurationMs=60000,reason='Record actual opaque silkscreen/substrate visual correction; mesh geometry unchanged'),'record-start')
try:
 time.sleep(1.5)
 call('pup_evaluate',dict(sessionId=session,expression='(async()=>{await boardReview.viewer.loadModel("board23-opaque-review.glb");const c=boardReview.viewer.getCamera();c.alpha=-Math.PI/2;c.beta=Math.PI-.01;c.radius=.105;boardReview.camera=c;document.querySelector("#status").textContent="Opaque ink/substrate experiment — geometry unchanged";return {ready:true}})()'),'load-opaque')
 time.sleep(2)
 call('pup_evaluate',dict(sessionId=session,expression='(()=>{boardReview.camera.beta=2.8;return {beta:boardReview.camera.beta}})()'),'tilt')
 time.sleep(1.5)
finally:
 stop=call('desktop_record_stop',dict(recordingId=r['recordingId']),'record-stop');call('pull_file',dict(filePaths=[stop.get('path',r['path'])],saveTo=str(R/'videos/raw')),'record-pull')
print('Material comparison take complete; visual review still required')