Screw conveyors join across the corner to diagonals (t62)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -97,6 +97,34 @@ with sync_playwright() as p:
|
||||
}''')
|
||||
check('sidewall stays behind the grain colour in pixels and smooth',
|
||||
wall and wall['colors'][0] == wall['colors'][1] and wall['grainClass'] == 2, wall)
|
||||
# All 64 straight/diagonal mouths must have copper casing on both sides of the join.
|
||||
pg.set_viewport_size({"width": 2100, "height": 1300})
|
||||
ev("part.fill(0); blockP.fill(0); occ.fill(0); mach.fill(0); ents=[]; ghostBlocks.clear();")
|
||||
ev("() => {" + (root / "tools/scenes/t62-joins.js").read_text() + "}")
|
||||
mouths = ev('''() => {
|
||||
SET.zoom=6; SET.lighting="off"; SET.glow="off"; resizeRender();
|
||||
bot.x=CAM[0]-bot.w/2;bot.y=CAM[1]-bot.h/2;snapCamera();
|
||||
const out={};
|
||||
for(const look of ["pixel","smooth"]) {
|
||||
SET.look=look;SM.scale=1;drawWorld();
|
||||
const bad=[];
|
||||
for(const j of T62_JOINTS) {
|
||||
const slope=j.v===4 || j.v===6?-1:1;
|
||||
const end=j.end*SCREW_DIRS[j.v][0];
|
||||
const dx=j.vertical?0:end,dy=j.vertical?end*slope:0;
|
||||
const ox=j.corner && j.vertical?end*4:0,oy=j.corner && !j.vertical?end*slope*4:0;
|
||||
for(const side of [-1,1])for(const along of [-0.3,0.3]) {
|
||||
const x=j.bx*4+2+ox+dx*(2+along)-dy*side*1.6;
|
||||
const y=j.by*4+2+oy+dy*(2+along)+dx*side*1.6;
|
||||
const p=worldToScreenPx(x,y),c=R.ctx.getImageData(Math.floor(p.x),Math.floor(p.y),1,1).data;
|
||||
if(!(c[0]>c[1]*1.15 && c[1]>c[2]*1.1))bad.push([j,x,y,Array.from(c)]);
|
||||
}
|
||||
}
|
||||
out[look]=bad;
|
||||
}return out;
|
||||
}''')
|
||||
for look, bad in mouths.items():
|
||||
check(f"{look}: all 64 screw joints have closed casing across both mouth edges", not bad, bad[:2])
|
||||
# a browser without hardware drawing gets the pixel look and a note
|
||||
pg2 = b.new_page(viewport={'width': 800, 'height': 500})
|
||||
pg2.add_init_script('localStorage.clear();')
|
||||
|
||||
Reference in New Issue
Block a user