diff --git a/README.md b/README.md index c64e64e8efc68b028a5c303d597bf971d9565228..a40de29ba7f56e0ff56c3ebb69d625916956d004 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ samples.parquet one row per build: model, split, task, verdi | `glm` | GLM 5.3 Flash | | `bricknet` | BrickNet-14B | | `brickgpt` | BrickGPT | +| `brickwright` | BrickWright (GPT-6 Astra) | ## Citation ```bibtex diff --git a/brickwright/alt/alt-001/build.py b/brickwright/alt/alt-001/build.py new file mode 100644 index 0000000000000000000000000000000000000000..45d9892608a2e678dd643f0096ff9b7f280ccf7c --- /dev/null +++ b/brickwright/alt/alt-001/build.py @@ -0,0 +1,99 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def add(pid, color, x,y,z, rot=bl.Rotation.DEG_0, name=None): + return b.add(bl.Element(pid,getattr(bl.Color,color)),(x,y,z),rotation=rot,name=name) + add('91405','BRIGHT_GREEN',0,0,0,name='grass') + # The long low foot and upturned tail of the snail. + add('3001','LIME',8,7,1/3) + add('3001','LIME',12,7,1/3) + add('3001','LIME',8,9,1/3) + add('3001','LIME',12,9,1/3) + add('3003','LIME',6,7,1/3) + add('3003','LIME',6,9,1/3) + add('3001','LIME',6,7,4/3,bl.Rotation.DEG_90,name='snail_head') + add('3001','LIME',6,7,7/3,bl.Rotation.DEG_90) + # A broad upright shell, with an uninterrupted dark-red square spiral. + rows = ['..OOOO..','.DDDDDD.','OOOOOODO','ODDDDODO','ODOODODO','.DDDDDD.','..OOOO..'] + stock = {'O':Counter({4:2,2:4,1:12}), 'D':Counter({6:2,2:4,1:4})} + ids = {4:'3001',2:'3003',1:'3004',6:'2456'} + for row, line in enumerate(rows): + i=0 + while i<8: + c=line[i] + if c=='.': i+=1; continue + end=i+1 + while end<8 and line[end]==c: end+=1 + while i0] + if widths: + w=max(widths); stock[c][w]-=1 + add(ids[w], 'ORANGE' if c=='O' else 'DARK_RED',8+i,8,4/3+row+(1/3 if row>=5 else 0),bl.Rotation.DEG_90 if w==1 else bl.Rotation.DEG_0,name=f'shell_{row}_{i}') + else: + w=1 + for y in (8,9): add('3005','DARK_RED',8+i,y,4/3+row+(1/3 if row>=5 else 0),name=f'shell_{row}_{i}_{y}') + i+=w + # Two shell plates lock the narrow outer spiral to the overlying crown. + for x in (8,12): add('3020','TAN',x,8,19/3,name=f'shell_bridge_{x}') + # The two long raised eye stalks face the opponent, not the viewer. + for y in (7,10): + for h in range(4): add('3005','LIME',6,y,10/3+h,name=f'stalk_{y}_{h}') + eye=add('47905','BLACK',6,y,22/3,bl.Rotation.DEG_270,name=f'eye_mount_{y}') + tile=bl.Element('98138p07',bl.Color.WHITE) + b.connect(tile,'antistud',to=eye.find_connector('stud',facing=bl.Direction.RIGHT),name=f'eye_{y}') + # Knight is built in a local frame, facing forward, then turned toward snail. + k=bl.LegoBuild() + def ka(pid,color,x,y,z,name=None): + return k.add(bl.Element(pid,getattr(bl.Color,color)),(x,y,z),name=name) + k.add(bl.Element('3004',bl.Color.LIGHT_BLUISH_GRAY),(0,0,0),rotation=bl.Rotation.DEG_90,name='right_boot') + k.add(bl.Element('3004',bl.Color.LIGHT_BLUISH_GRAY),(2,0,0),rotation=bl.Rotation.DEG_90,name='left_boot') + ka('3002','BLUE',0,0,1,'cuirass') + arm=ka('30414','BLUE',-1,0,2,'shoulders') + ka('3005','LIGHT_BLUISH_GRAY',0,0,3,'helmet_side') + head=ka('47905','BLACK',1,0,3,'helmet_mount') + visor=bl.Element('3069b',bl.Color.WHITE) + k.connect(visor,visor.find_connector('antistud',toward=bl.Direction.LEFT),to=head.find_connector('stud',facing=bl.Direction.FRONT),name='visor') + # Lance in the outer hand, held horizontally toward the snail. + hand=k.add(bl.Element('61252',bl.Color.LIGHT_BLUISH_GRAY),(-1,0,3),rotation=bl.Rotation.DEG_270,name='lance_hand') + lance=bl.Element('3957b',bl.Color.LIGHT_BLUISH_GRAY) + k.connect(lance,'bar',to=hand.find_connector('clip'),target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90),mounting=bl.Mounting(offset=1.5),name='lance') + # Vertical shield on the other arm, studded back with a raised round boss. + shield=bl.Element('11212',bl.Color.DARK_BLUISH_GRAY) + shieldp=k.connect(shield,shield.find_connector('antistud',toward=bl.Position(1,1,0)),to=arm.find_connector('stud',facing=bl.Direction.FRONT,toward=bl.Direction.LEFT),name='shield') + boss=bl.Element('14769',bl.Color.DARK_BLUISH_GRAY) + k.connect(boss,boss.find_connector('antistud',toward=bl.Direction.RIGHT),to=shieldp.find_connector('stud',toward=shieldp.center),name='shield_boss') + ka('3023b','DARK_AZURE',0,0,4,'helmet_crown') + b.add(k,(1,5,1/3),rotation=bl.Rotation.DEG_90,name='knight') + # Sparse tufts and little yellow flowers keep the central confrontation clear. + for i,(x,y) in enumerate([(2,2),(12,3),(3,12)]): + add('4727','BRIGHT_GREEN',x,y,1/3,name=f'leaves_{i}') + for x,y in [(1,12),(14,2)]: + add('98262','YELLOW',x,y,1/3) + for x,y in [(8,2),(11,12),(5,12),(0,9)]: + add('3039','GREEN',x,y,1/3) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + available=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + over=[(pid,c,n,available.get(pid,{}).get(c,0)) for (pid,c),n in used.items() if n>available.get(pid,{}).get(c,0)] + tests.check('Inventory quantities and colors',not over,str(over)) + tests.check('Two raised eyes',all(f'eye_{y}' in b.names for y in (7,10))) + tests.check('Large spiral shell',sum(n for (pid,c),n in used.items() if c=='DARK_RED')>=10) + knight=b.named('knight') + snail_top=max(p.bounding_box[1].z for name,p in b.names.items() if name.startswith(('shell_','eye_'))) + ratio=(snail_top-1/3)/knight.height + tests.check('Snail approximately twice knight height',1.8<=ratio<=2.2,f'Height ratio {ratio:.2f}') + tests.check('Shield and forward-pointing lance',all(n in knight.content.names for n in ('shield','shield_boss','lance'))) + return tests.report() diff --git a/brickwright/alt/alt-001/hero-1024.avif b/brickwright/alt/alt-001/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..0b7b0534fd0cb2b10919ca29679265d8bdbab7d8 Binary files /dev/null and b/brickwright/alt/alt-001/hero-1024.avif differ diff --git a/brickwright/alt/alt-001/model.mpd b/brickwright/alt/alt-001/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..9e3687f9374d9758fe8f1660d7f2111de0e1bcd8 --- /dev/null +++ b/brickwright/alt/alt-001/model.mpd @@ -0,0 +1,74 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 27 200 -32 160 1 0 0 0 1 0 0 0 1 3001.dat +1 27 280 -32 160 1 0 0 0 1 0 0 0 1 3001.dat +1 27 200 -32 200 1 0 0 0 1 0 0 0 1 3001.dat +1 27 280 -32 200 1 0 0 0 1 0 0 0 1 3001.dat +1 27 140 -32 160 1 0 0 0 1 0 0 0 1 3003.dat +1 27 140 -32 200 1 0 0 0 1 0 0 0 1 3003.dat +1 27 140 -56 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 27 140 -80 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 25 240 -56 180 1 0 0 0 1 0 0 0 1 3001.dat +1 320 240 -80 180 1 0 0 0 1 0 0 0 1 2456.dat +1 25 200 -104 180 1 0 0 0 1 0 0 0 1 3001.dat +1 25 260 -104 180 1 0 0 0 1 0 0 0 1 3003.dat +1 320 290 -104 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 310 -104 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 170 -128 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 320 200 -128 180 1 0 0 0 1 0 0 0 1 3003.dat +1 320 240 -128 180 1 0 0 0 1 0 0 0 1 3003.dat +1 25 270 -128 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 320 290 -128 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 310 -128 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 170 -152 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 320 190 -152 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 220 -152 180 1 0 0 0 1 0 0 0 1 3003.dat +1 320 250 -152 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 270 -152 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 320 290 -152 170 1 0 0 0 1 0 0 0 1 3005.dat +1 320 290 -152 190 1 0 0 0 1 0 0 0 1 3005.dat +1 25 310 -152 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 320 240 -184 180 1 0 0 0 1 0 0 0 1 2456.dat +1 25 220 -208 180 1 0 0 0 1 0 0 0 1 3003.dat +1 25 260 -208 180 1 0 0 0 1 0 0 0 1 3003.dat +1 19 200 -160 180 1 0 0 0 1 0 0 0 1 3020.dat +1 19 280 -160 180 1 0 0 0 1 0 0 0 1 3020.dat +1 27 130 -104 150 1 0 0 0 1 0 0 0 1 3005.dat +1 27 130 -128 150 1 0 0 0 1 0 0 0 1 3005.dat +1 27 130 -152 150 1 0 0 0 1 0 0 0 1 3005.dat +1 27 130 -176 150 1 0 0 0 1 0 0 0 1 3005.dat +1 0 130 -200 150 0 0 1 0 1 0 -1 0 0 47905.dat +1 15 112 -190 150 0 1 0 0 0 -1 -1 0 0 98138p07.dat +1 27 130 -104 210 1 0 0 0 1 0 0 0 1 3005.dat +1 27 130 -128 210 1 0 0 0 1 0 0 0 1 3005.dat +1 27 130 -152 210 1 0 0 0 1 0 0 0 1 3005.dat +1 27 130 -176 210 1 0 0 0 1 0 0 0 1 3005.dat +1 0 130 -200 210 0 0 1 0 1 0 -1 0 0 47905.dat +1 15 112 -190 210 0 1 0 0 0 -1 -1 0 0 98138p07.dat +1 16 60 -8 120 0 0 -1 0 1 0 1 0 0 knight.ldr +1 10 50 -32 50 1 0 0 0 1 0 0 0 1 4727.dat +1 10 250 -32 70 1 0 0 0 1 0 0 0 1 4727.dat +1 10 70 -32 250 1 0 0 0 1 0 0 0 1 4727.dat +1 14 30 -32 250 1 0 0 0 1 0 0 0 1 98262.dat +1 14 290 -32 50 1 0 0 0 1 0 0 0 1 98262.dat +1 2 180 -32 70 1 0 0 0 1 0 0 0 1 3039.dat +1 2 240 -32 270 1 0 0 0 1 0 0 0 1 3039.dat +1 2 120 -32 270 1 0 0 0 1 0 0 0 1 3039.dat +1 2 20 -32 210 1 0 0 0 1 0 0 0 1 3039.dat +0 FILE knight.ldr +0 knight +0 Name: knight +1 71 10 -24 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 50 -24 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 1 30 -48 20 1 0 0 0 1 0 0 0 1 3002.dat +1 1 20 -72 10 1 0 0 0 1 0 0 0 1 30414.dat +1 71 10 -96 10 1 0 0 0 1 0 0 0 1 3005.dat +1 0 30 -96 10 1 0 0 0 1 0 0 0 1 47905.dat +1 15 20 -86 -8 1 0 0 0 0 -1 0 1 0 3069b.dat +1 71 -10 -80 10 0 0 1 0 1 0 -1 0 0 61252.dat +1 71 -30 -78 25.5 1 0 0 0 0 -1 0 1 0 3957b.dat +1 72 30 -42 -8 1 0 0 0 0 -1 0 1 0 11212.dat +1 72 40 -52 -16 1 0 0 0 0 -1 0 1 0 14769.dat +1 321 20 -104 10 1 0 0 0 1 0 0 0 1 3023b.dat diff --git a/brickwright/alt/alt-001/thumb-512.avif b/brickwright/alt/alt-001/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..d87ba18da95a6761fcd7bb7dd4613cbfcbc0b80a Binary files /dev/null and b/brickwright/alt/alt-001/thumb-512.avif differ diff --git a/brickwright/alt/alt-001/trace.jsonl.gz b/brickwright/alt/alt-001/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..eb9d9ad3c9a52895eceb895f9b05b735627cea20 --- /dev/null +++ b/brickwright/alt/alt-001/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99a7b42c21fcafa2f4872b756d81bd3902390590bbae0a139fa8664464c2fed2 +size 8225 diff --git a/brickwright/alt/alt-001/view-0.avif b/brickwright/alt/alt-001/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..692e95204e990722fc0e41b3d89cc81c59a4c4ff Binary files /dev/null and b/brickwright/alt/alt-001/view-0.avif differ diff --git a/brickwright/alt/alt-001/view-1.avif b/brickwright/alt/alt-001/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..a15b71a89644b93d6f5b91af4f39f0386c7d2aa6 Binary files /dev/null and b/brickwright/alt/alt-001/view-1.avif differ diff --git a/brickwright/alt/alt-001/view-2.avif b/brickwright/alt/alt-001/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..347385294cc4fc3c4fab764b82b9abe97dfcac39 Binary files /dev/null and b/brickwright/alt/alt-001/view-2.avif differ diff --git a/brickwright/alt/alt-001/view-3.avif b/brickwright/alt/alt-001/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..6a3eaa3e1547f9d48db4e2f60ec704907fb258df Binary files /dev/null and b/brickwright/alt/alt-001/view-3.avif differ diff --git a/brickwright/alt/alt-001/view-4.avif b/brickwright/alt/alt-001/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..049a76739613b88f3a217203ceb637b1bdf0c241 Binary files /dev/null and b/brickwright/alt/alt-001/view-4.avif differ diff --git a/brickwright/alt/alt-001/view-5.avif b/brickwright/alt/alt-001/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..23d964ae1e6a5d069e438a543d9d7fc0ca7307fb Binary files /dev/null and b/brickwright/alt/alt-001/view-5.avif differ diff --git a/brickwright/alt/alt-001/view-6.avif b/brickwright/alt/alt-001/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..d945317530c5123dc87792e28c1c158ac120e4da Binary files /dev/null and b/brickwright/alt/alt-001/view-6.avif differ diff --git a/brickwright/alt/alt-001/view-7.avif b/brickwright/alt/alt-001/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..0843e1033360f59cc887f2354df45af5ee1c7fe2 Binary files /dev/null and b/brickwright/alt/alt-001/view-7.avif differ diff --git a/brickwright/alt/alt-002/build.py b/brickwright/alt/alt-002/build.py new file mode 100644 index 0000000000000000000000000000000000000000..a50f46f75dc4008be862f979aed8a81db0a1dae5 --- /dev/null +++ b/brickwright/alt/alt-002/build.py @@ -0,0 +1,97 @@ +import json +import bricklayer as bl +from brickwright import TestContext + +COLORS = ['RED','YELLOW','LIME','MEDIUM_AZURE','BLUE','DARK_AZURE','DARK_PURPLE','BRIGHT_PINK'] + +def create_build(): + b = bl.LegoBuild() + def add(pid,c,x,y,z,name=None,rot=bl.Rotation.DEG_0): + return b.add(bl.Element(pid,getattr(bl.Color,c)),(x,y,z),rotation=rot,name=name) + add('91405','BRIGHT_GREEN',0,0,0,'floor') + # Four substantial feet and a dark carved wooden bedstead. + for x in (3,11): + for y in (7,11): + add('3003','DARK_RED',x,y,1/3) + # Bed frame is ten studs long, six deep. + for y in (7,9,11): + add('3002','REDDISH_BROWN',3,y,4/3,rot=bl.Rotation.DEG_0) + add('3001','DARK_TAN',6,y,4/3) + add('3002','BLACK',10,y,4/3) + # A recessed open channel exposes the small green pea below the first mattress. + add('2456','DARK_RED',4,9,7/3) + add('2456','DARK_RED',6,11,7/3) + add('3003','MEDIUM_NOUGAT',4,11,7/3) + add('3004','DARK_RED',10,9,7/3) + add('33291','BRIGHT_GREEN',10,7,7/3,'pea') + add('3710','TAN',5,7,7/3,'frame_tie') + add('33291','BRIGHT_GREEN',10,7,8/3) + add('33291','BRIGHT_GREEN',10,7,3) + # Eight continuous, full-width mattresses; alternating bond locks the stack. + for level,c in enumerate(COLORS): + z=10/3+level + if level%2==0: + for x in (4,8): + for y in (7,9): add('3001',c,x,y,z,f'mattress_{level}_{x}_{y}') + else: + for x in (4,6,8,10): + add('3001',c,x,7,z,f'mattress_{level}_{x}',bl.Rotation.DEG_90) + # White spindle head and foot boards with yellow finials. + for x in (3,12): + add('15332','WHITE',x,8,7/3,rot=bl.Rotation.DEG_90) + for y in (7,12): + add('3005','WHITE',x,y,7/3) + add('3062b','DARK_ORANGE',x,y,10/3) + add('6141','REDDISH_BROWN',x,y,13/3) if y==7 else add('6141','DARK_PURPLE',x,y,13/3) + # Reclining princess: white pillow, golden hair, tan face, closed eyes, + # a pink gown and two small hands. Her crown is at the head of the bed. + add('3004','WHITE',9,8,34/3,'pillow') + add('3004','WHITE',9,9,34/3) + add('3004','WHITE',11,8,34/3,rot=bl.Rotation.DEG_90) + add('3003','YELLOW',9,8,37/3,'hair') + add('3022','TAN',9,8,40/3,'face') + add('98138p0c','WHITE',9,8,41/3,'closed_eye_1') + add('98138p0c','WHITE',9,9,41/3,'closed_eye_2') + add('3004','BRIGHT_LIGHT_YELLOW',11,8,37/3,'crown_band',bl.Rotation.DEG_90) + for y in (8,9): add('6141','TRANS_ORANGE',11,y,40/3) + add('3003','BRIGHT_PINK',7,8,34/3,'bodice') + add('3039','MAGENTA',4,7,34/3,'gown_front') + add('3040b','MAGENTA',6,7,34/3) + add('3039','MAGENTA',4,9,34/3,'gown_back',bl.Rotation.DEG_180) + add('3040b','MAGENTA',6,9,34/3,rot=bl.Rotation.DEG_180) + add('3004','TAN',7,7,34/3,'hand_front') + add('3004','TAN',7,10,34/3,'hand_back') + # Ladder: two continuous rails joined by six rungs, on a locked hinge. + ladder=bl.LegoBuild() + hinge=ladder.add(bl.Element('60471',bl.Color.BLACK),(1,0,0),name='hinge') + for y in (0,3,6,9,12): + color=bl.Color.BLUE if y<12 else bl.Color.TAN + ladder.add(bl.Element('3710',color),(0,y,1/3)) + for x in (0,3): + ladder.add(bl.Element('3460',bl.Color.MEDIUM_AZURE),(x,0,2/3),rotation=bl.Rotation.DEG_90) + ladder.add(bl.Element('3666',bl.Color.MEDIUM_AZURE),(x,8,2/3),rotation=bl.Rotation.DEG_90) + ladder.add(bl.Element('3023b',bl.Color.DARK_AZURE),(x,7,1),rotation=bl.Rotation.DEG_90) + socket=add('92582','BLACK',5,1,1/3,'ladder_foot',bl.Rotation.DEG_90) + b.connect(ladder,hinge.find_connector('hinge_2_on'),to=socket.find_connector('hinge_2_in'),target_rotation=bl.rotation_about(bl.Vec3(1,0,0),72),name='leaning_ladder') + return b + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + stock=json.load(open('/inputs/parts.json')) + over=[] + for e,n in b.list_elements().items(): + if n>stock.get(e.ldraw_id,{}).get(e.color.name,0): over.append((e.ldraw_id,e.color.name,n)) + t.check('inventory limits',not over,str(over)) + t.check('eight different mattress colors',len(COLORS)==8 and len(set(COLORS))==8,str(COLORS)) + for i in range(8): + ps=[p for name,p in b.names.items() if name.startswith(f'mattress_{i}_')] + t.check(f'complete mattress {i+1}',len(ps)==4 and all(p.content.color==getattr(bl.Color,COLORS[i]) for p in ps),'Four 2 x 4 bricks form an 8 x 4 mattress') + t.check('visible green pea',b.named('pea').content.color==bl.Color.BRIGHT_GREEN and b.named('pea').center.x>9 and b.named('pea').center.z < b.named('mattress_0_8_7').center.z,'Pea exposed in a one-brick-high front recess, clear of the ladder') + ladder=b.named('leaning_ladder') + t.check('tall leaning ladder',ladder.height>10 and ladder.depth>3,'Hinged ladder with two rails and five rungs reaches the upper mattress') + t.check('sleeping princess atop mattresses',b.named('face').center.z>b.named('mattress_7_4').center.z,'Face with closed eyes above the eighth layer') + return t.report() diff --git a/brickwright/alt/alt-002/hero-1024.avif b/brickwright/alt/alt-002/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..4882e47f70f99f2c7c0c4cfc713b995f757035fd Binary files /dev/null and b/brickwright/alt/alt-002/hero-1024.avif differ diff --git a/brickwright/alt/alt-002/model.mpd b/brickwright/alt/alt-002/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..03d00d21cca12b41d106c7fc5b693cc6c67cea78 --- /dev/null +++ b/brickwright/alt/alt-002/model.mpd @@ -0,0 +1,105 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 320 80 -32 160 1 0 0 0 1 0 0 0 1 3003.dat +1 320 80 -32 240 1 0 0 0 1 0 0 0 1 3003.dat +1 320 240 -32 160 1 0 0 0 1 0 0 0 1 3003.dat +1 320 240 -32 240 1 0 0 0 1 0 0 0 1 3003.dat +1 70 90 -56 160 1 0 0 0 1 0 0 0 1 3002.dat +1 28 160 -56 160 1 0 0 0 1 0 0 0 1 3001.dat +1 0 230 -56 160 1 0 0 0 1 0 0 0 1 3002.dat +1 70 90 -56 200 1 0 0 0 1 0 0 0 1 3002.dat +1 28 160 -56 200 1 0 0 0 1 0 0 0 1 3001.dat +1 0 230 -56 200 1 0 0 0 1 0 0 0 1 3002.dat +1 70 90 -56 240 1 0 0 0 1 0 0 0 1 3002.dat +1 28 160 -56 240 1 0 0 0 1 0 0 0 1 3001.dat +1 0 230 -56 240 1 0 0 0 1 0 0 0 1 3002.dat +1 320 140 -80 200 1 0 0 0 1 0 0 0 1 2456.dat +1 320 180 -80 240 1 0 0 0 1 0 0 0 1 2456.dat +1 84 100 -80 240 1 0 0 0 1 0 0 0 1 3003.dat +1 320 220 -80 190 1 0 0 0 1 0 0 0 1 3004.dat +1 10 210 -64 150 1 0 0 0 1 0 0 0 1 33291.dat +1 19 140 -64 150 1 0 0 0 1 0 0 0 1 3710.dat +1 10 210 -72 150 1 0 0 0 1 0 0 0 1 33291.dat +1 10 210 -80 150 1 0 0 0 1 0 0 0 1 33291.dat +1 4 120 -104 160 1 0 0 0 1 0 0 0 1 3001.dat +1 4 120 -104 200 1 0 0 0 1 0 0 0 1 3001.dat +1 4 200 -104 160 1 0 0 0 1 0 0 0 1 3001.dat +1 4 200 -104 200 1 0 0 0 1 0 0 0 1 3001.dat +1 14 100 -128 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 14 140 -128 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 14 180 -128 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 14 220 -128 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 27 120 -152 160 1 0 0 0 1 0 0 0 1 3001.dat +1 27 120 -152 200 1 0 0 0 1 0 0 0 1 3001.dat +1 27 200 -152 160 1 0 0 0 1 0 0 0 1 3001.dat +1 27 200 -152 200 1 0 0 0 1 0 0 0 1 3001.dat +1 322 100 -176 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 322 140 -176 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 322 180 -176 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 322 220 -176 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 120 -200 160 1 0 0 0 1 0 0 0 1 3001.dat +1 1 120 -200 200 1 0 0 0 1 0 0 0 1 3001.dat +1 1 200 -200 160 1 0 0 0 1 0 0 0 1 3001.dat +1 1 200 -200 200 1 0 0 0 1 0 0 0 1 3001.dat +1 321 100 -224 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 321 140 -224 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 321 180 -224 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 321 220 -224 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 85 120 -248 160 1 0 0 0 1 0 0 0 1 3001.dat +1 85 120 -248 200 1 0 0 0 1 0 0 0 1 3001.dat +1 85 200 -248 160 1 0 0 0 1 0 0 0 1 3001.dat +1 85 200 -248 200 1 0 0 0 1 0 0 0 1 3001.dat +1 29 100 -272 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 29 140 -272 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 29 180 -272 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 29 220 -272 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 15 70 -104 200 0 0 -1 0 1 0 1 0 0 15332.dat +1 15 70 -80 150 1 0 0 0 1 0 0 0 1 3005.dat +1 484 70 -104 150 1 0 0 0 1 0 0 0 1 3062b.dat +1 70 70 -112 150 1 0 0 0 1 0 0 0 1 6141.dat +1 15 70 -80 250 1 0 0 0 1 0 0 0 1 3005.dat +1 484 70 -104 250 1 0 0 0 1 0 0 0 1 3062b.dat +1 85 70 -112 250 1 0 0 0 1 0 0 0 1 6141.dat +1 15 250 -104 200 0 0 -1 0 1 0 1 0 0 15332.dat +1 15 250 -80 150 1 0 0 0 1 0 0 0 1 3005.dat +1 484 250 -104 150 1 0 0 0 1 0 0 0 1 3062b.dat +1 70 250 -112 150 1 0 0 0 1 0 0 0 1 6141.dat +1 15 250 -80 250 1 0 0 0 1 0 0 0 1 3005.dat +1 484 250 -104 250 1 0 0 0 1 0 0 0 1 3062b.dat +1 85 250 -112 250 1 0 0 0 1 0 0 0 1 6141.dat +1 15 200 -296 170 1 0 0 0 1 0 0 0 1 3004.dat +1 15 200 -296 190 1 0 0 0 1 0 0 0 1 3004.dat +1 15 230 -296 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 14 200 -320 180 1 0 0 0 1 0 0 0 1 3003.dat +1 19 200 -328 180 1 0 0 0 1 0 0 0 1 3022.dat +1 15 190 -336 170 1 0 0 0 1 0 0 0 1 98138p0c.dat +1 15 190 -336 190 1 0 0 0 1 0 0 0 1 98138p0c.dat +1 226 230 -320 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 57 230 -328 170 1 0 0 0 1 0 0 0 1 6141.dat +1 57 230 -328 190 1 0 0 0 1 0 0 0 1 6141.dat +1 29 160 -296 180 1 0 0 0 1 0 0 0 1 3003.dat +1 26 100 -296 170 1 0 0 0 1 0 0 0 1 3039.dat +1 26 130 -296 170 1 0 0 0 1 0 0 0 1 3040b.dat +1 26 100 -296 190 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 130 -296 190 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 19 160 -296 150 1 0 0 0 1 0 0 0 1 3004.dat +1 19 160 -296 210 1 0 0 0 1 0 0 0 1 3004.dat +1 0 120 -16 40 0 0 -1 0 1 0 1 0 0 92582.dat +1 16 80 -29.656463 58.796509 1 0 0 0 0.309017 -0.951057 0 0.951057 0.309017 leaning_ladder.ldr +0 FILE leaning_ladder.ldr +0 leaning_ladder +0 Name: leaning_ladder +1 0 40 -8 10 1 0 0 0 1 0 0 0 1 60471.dat +1 1 40 -16 10 1 0 0 0 1 0 0 0 1 3710.dat +1 1 40 -16 70 1 0 0 0 1 0 0 0 1 3710.dat +1 1 40 -16 130 1 0 0 0 1 0 0 0 1 3710.dat +1 1 40 -16 190 1 0 0 0 1 0 0 0 1 3710.dat +1 19 40 -16 250 1 0 0 0 1 0 0 0 1 3710.dat +1 322 10 -24 80 0 0 -1 0 1 0 1 0 0 3460.dat +1 322 10 -24 220 0 0 -1 0 1 0 1 0 0 3666.dat +1 321 10 -32 160 0 0 -1 0 1 0 1 0 0 3023b.dat +1 322 70 -24 80 0 0 -1 0 1 0 1 0 0 3460.dat +1 322 70 -24 220 0 0 -1 0 1 0 1 0 0 3666.dat +1 321 70 -32 160 0 0 -1 0 1 0 1 0 0 3023b.dat diff --git a/brickwright/alt/alt-002/thumb-512.avif b/brickwright/alt/alt-002/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..f84f1c7c3f15d640ea0bb5a899325072e2849dd7 Binary files /dev/null and b/brickwright/alt/alt-002/thumb-512.avif differ diff --git a/brickwright/alt/alt-002/trace.jsonl.gz b/brickwright/alt/alt-002/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..ea3ab8b621d511c9f96d6e022a67cba04141646c --- /dev/null +++ b/brickwright/alt/alt-002/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40c45f343a71b0015be77c8266ca083b8d9cd34063aa55b0a5b0f614a5e7d217 +size 7843 diff --git a/brickwright/alt/alt-002/view-0.avif b/brickwright/alt/alt-002/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..35a106b3577b7dbf7f041baada4effd286cc568e Binary files /dev/null and b/brickwright/alt/alt-002/view-0.avif differ diff --git a/brickwright/alt/alt-002/view-1.avif b/brickwright/alt/alt-002/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..413e1503c640a323ffb81f697ec4027d9248039c Binary files /dev/null and b/brickwright/alt/alt-002/view-1.avif differ diff --git a/brickwright/alt/alt-002/view-2.avif b/brickwright/alt/alt-002/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..9d61fa207fc92314965d535e2295d80910613b93 Binary files /dev/null and b/brickwright/alt/alt-002/view-2.avif differ diff --git a/brickwright/alt/alt-002/view-3.avif b/brickwright/alt/alt-002/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..1f0521d7ee9785caca5f8e9e81c83fee859e2f77 Binary files /dev/null and b/brickwright/alt/alt-002/view-3.avif differ diff --git a/brickwright/alt/alt-002/view-4.avif b/brickwright/alt/alt-002/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..4520037a80ae8811ca0d497af36bd3c274f8ed69 Binary files /dev/null and b/brickwright/alt/alt-002/view-4.avif differ diff --git a/brickwright/alt/alt-002/view-5.avif b/brickwright/alt/alt-002/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..b3ba23dfa2a0a34a9b79f426f183c9ec554964a5 Binary files /dev/null and b/brickwright/alt/alt-002/view-5.avif differ diff --git a/brickwright/alt/alt-002/view-6.avif b/brickwright/alt/alt-002/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..8c54120785bc2ab9947ab64794d2d201714832e8 Binary files /dev/null and b/brickwright/alt/alt-002/view-6.avif differ diff --git a/brickwright/alt/alt-002/view-7.avif b/brickwright/alt/alt-002/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..9456856a37fb3265bbeecc680c0e2dbab355b4e0 Binary files /dev/null and b/brickwright/alt/alt-002/view-7.avif differ diff --git a/brickwright/alt/alt-003/build.py b/brickwright/alt/alt-003/build.py new file mode 100644 index 0000000000000000000000000000000000000000..be832a7a0860e88d72bc0e54d4d663bf24016eb9 --- /dev/null +++ b/brickwright/alt/alt-003/build.py @@ -0,0 +1,108 @@ +import bricklayer as bl +from brickwright import TestContext +import json + + +def create_build(): + b = bl.LegoBuild() + C=bl.Color + def add(pid,c,x,y,z,r=0,name=None): + return b.add(bl.Element(pid,getattr(C,c)),(x,y,z),bl.Rotation(r),name=name) + def attach(pid,c,to,source=None,name=None): + e=bl.Element(pid,getattr(C,c)) + return b.connect(e,source or e.find_connector('antistud',toward=bl.Direction.FRONT),to=to,name=name) + add('91405','BRIGHT_GREEN',0,0,0,name='meadow') + # Low stone approach and staggered, substantial gate piers. + add('3029','DARK_BLUISH_GRAY',2,7,1/3,name='gate_foundation') + for x in (3,10): + add('3001','LIGHT_BLUISH_GRAY',x,8,2/3) + add('3001','DARK_BLUISH_GRAY',x,8,5/3) + for yy in (8,9): + add('3245c','LIGHT_BLUISH_GRAY',x,yy,8/3) + add('3245c','LIGHT_BLUISH_GRAY',x+2,yy,8/3) + add('3001','LIGHT_BLUISH_GRAY',x,8,14/3) + for xx in (x,x+2): + add('3004','LIGHT_BLUISH_GRAY',xx,8,17/3) + add('3004','DARK_BLUISH_GRAY',xx,9,17/3) + # The arch spans the four-stud passage; tall enough for the hero's cap. + add('15254','LIGHT_BLUISH_GRAY',6,8,20/3,name='castle_arch') + for x in (3,12): + add('3010','LIGHT_BLUISH_GRAY',x,8,20/3,r=1) + # Tower caps and battlements. + for x in (3,12): + add('3005','LIGHT_BLUISH_GRAY',x,8,23/3) + add('3005','LIGHT_BLUISH_GRAY',x,10,23/3) + add('3034','LIGHT_BLUISH_GRAY',5,8,26/3,name='battlement_walk') + for x in (5,8,11): + add('3004','LIGHT_BLUISH_GRAY',x,8,9) + # Running hero: staggered boots, long split stride, and flared green tunic. + add('30136','DARK_ORANGE',7,3,1/3,r=1,name='leading_boot') + add('30136','DARK_ORANGE',9,5,1/3,r=1,name='trailing_boot') + add('3622','TAN',7,3,4/3,r=1,name='leading_leg') + add('3622','TAN',9,5,4/3,r=1,name='trailing_leg') + add('3001','GREEN',6,4,7/3,name='tunic_skirt') + add('3021','GREEN',5,4,10/3) + add('3021','GREEN',8,4,10/3) + add('3003','GREEN',6,4,11/3,name='tunic') + add('4070','GREEN',8,4,11/3) + add('3005','MEDIUM_NOUGAT',9,4,11/3) + add('4070','GREEN',9,5,11/3,r=2) + for x in (5,10): + arm=add('4070','GREEN',x,4,11/3,name='arm_'+str(x)) + add('3040b','GREEN',x,5,11/3) + hand=attach('3005','YELLOW',arm.find_connector('stud',facing=bl.Direction.FRONT),name='hand_'+str(x)) + if x==5: + hilt=attach('61252','LIGHT_BLUISH_GRAY',hand.find_connector('stud',facing=bl.Direction.FRONT),name='sword_guard') + blade=bl.Element('3957b',C.LIGHT_BLUISH_GRAY) + b.connect(blade,'bar',to=hilt.find_connector('clip'),target_rotation=bl.Mat3.IDENTITY,name='sword_blade') + # Blond hair surrounds a small, expressive face. + add('3004','TAN',7,4,14/3,name='face_lower') + add('3004','BRIGHT_LIGHT_YELLOW',7,5,14/3) + for x in (7,8): + eye=add('47905','BLACK',x,4,17/3) + attach('98138p07','WHITE',eye.find_connector('stud',facing=bl.Direction.FRONT),name='hero_eye_'+str(x)) + add('3003','YELLOW',7,4,20/3,name='blond_hair') + add('3039','GREEN',7,4,23/3,name='cap_front') + add('3040b','GREEN',7,5,26/3,r=2,name='cap_tail_l') + add('3040b','GREEN',8,5,26/3,r=2,name='cap_tail_r') + # A stud-on-side backpack carries a blue kite-shaped shield. + mount=add('47905','BLACK',8,5,11/3,r=2,name='shield_mount') + # Bridged back into the tunic with a green finishing strip. + # The shield is coupled directly to the back stud of its carrier. + shield=bl.LegoBuild() + shield.add(bl.Element('3710',C.BLUE),(0,0,0),bl.Rotation.DEG_90) + shield.add(bl.Element('3710',C.BLUE),(1,0,0),bl.Rotation.DEG_90) + shield.add(bl.Element('3039',C.BLUE),(0,0,1/3)) + shield.add(bl.Element('3003',C.BLUE),(0,2,1/3)) + sc=shield.find_connector('antistud',toward=bl.Position(0.5,2.5,0)) + b.connect(shield,sc,to=mount.find_connector('stud',facing=bl.Direction.BACK),target_rotation=bl.Mat3(((-1,0,0),(0,0,1),(0,1,0))),name='blue_shield') + # Three distinct pursuers, white rounded bodies, orange feet and red combs. + for i,(x,y) in enumerate(((1,5),(8,12),(13,5))): + add('3004','ORANGE',x,y+1,1/3,name=f'chicken_{i}_feet') + add('6215','WHITE',x,y,4/3,r=1,name=f'chicken_{i}_body') + add('3023b','ORANGE' if i<2 else 'TAN',x,y,7/3,name=f'chicken_{i}_beak') + head=add('47905','RED' if i<2 else 'BLACK',x,y,8/3,r=1,name=f'chicken_{i}_head') + attach('98138p07' if i<2 else '98138p0c','WHITE',head.find_connector('stud',facing=bl.Direction.RIGHT),name=f'chicken_{i}_eye') + if i<2: + attach('98138p0c','WHITE',head.find_connector('stud',facing=bl.Direction.LEFT)) + add('54200','RED',x,y,11/3,name=f'chicken_{i}_comb') + add('3069b','WHITE',x,y+1,7/3,r=1,name=f'chicken_{i}_wing') + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + stock=json.load(open('/inputs/parts.json')) + excess=[] + for e,n in b.list_elements().items(): + allowed=stock.get(e.ldraw_id,{}).get(e.color.name,0) + if n>allowed: excess.append((e.ldraw_id,e.color.name,n,allowed)) + tests.check('inventory limits',not excess,str(excess)) + tests.check('three white chickens with red combs',all(b.named(f'chicken_{i}_body').content.color==bl.Color.WHITE and b.named(f'chicken_{i}_comb').content.color==bl.Color.RED for i in range(3))) + tests.check('hero has tunic, cap, blond hair, sword and blue shield',all(n in b.names for n in ['tunic','cap_front','blond_hair','sword_blade','blue_shield'])) + tests.check('castle archway',b.named('castle_arch').content.ldraw_id=='15254') + return tests.report() diff --git a/brickwright/alt/alt-003/hero-1024.avif b/brickwright/alt/alt-003/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..83646404592dbde1d3d114eeec3589cd84f244cf Binary files /dev/null and b/brickwright/alt/alt-003/hero-1024.avif differ diff --git a/brickwright/alt/alt-003/model.mpd b/brickwright/alt/alt-003/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..0fe8ffc00d8d9a10df295ebd89ec692a6c4e57d5 --- /dev/null +++ b/brickwright/alt/alt-003/model.mpd @@ -0,0 +1,99 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 72 160 -16 180 1 0 0 0 1 0 0 0 1 3029.dat +1 71 100 -40 180 1 0 0 0 1 0 0 0 1 3001.dat +1 72 100 -64 180 1 0 0 0 1 0 0 0 1 3001.dat +1 71 80 -112 170 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 120 -112 170 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 80 -112 190 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 120 -112 190 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 100 -136 180 1 0 0 0 1 0 0 0 1 3001.dat +1 71 80 -160 170 1 0 0 0 1 0 0 0 1 3004.dat +1 72 80 -160 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 120 -160 170 1 0 0 0 1 0 0 0 1 3004.dat +1 72 120 -160 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 240 -40 180 1 0 0 0 1 0 0 0 1 3001.dat +1 72 240 -64 180 1 0 0 0 1 0 0 0 1 3001.dat +1 71 220 -112 170 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 260 -112 170 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 220 -112 190 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 260 -112 190 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 240 -136 180 1 0 0 0 1 0 0 0 1 3001.dat +1 71 220 -160 170 1 0 0 0 1 0 0 0 1 3004.dat +1 72 220 -160 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 260 -160 170 1 0 0 0 1 0 0 0 1 3004.dat +1 72 260 -160 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 180 -208 170 1 0 0 0 1 0 0 0 1 15254.dat +1 71 70 -184 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 250 -184 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 70 -208 170 1 0 0 0 1 0 0 0 1 3005.dat +1 71 70 -208 210 1 0 0 0 1 0 0 0 1 3005.dat +1 71 250 -208 170 1 0 0 0 1 0 0 0 1 3005.dat +1 71 250 -208 210 1 0 0 0 1 0 0 0 1 3005.dat +1 71 180 -216 180 1 0 0 0 1 0 0 0 1 3034.dat +1 71 120 -240 170 1 0 0 0 1 0 0 0 1 3004.dat +1 71 180 -240 170 1 0 0 0 1 0 0 0 1 3004.dat +1 71 240 -240 170 1 0 0 0 1 0 0 0 1 3004.dat +1 484 150 -32 80 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 190 -32 120 0 0 -1 0 1 0 1 0 0 30136.dat +1 19 150 -56 90 0 0 -1 0 1 0 1 0 0 3622.dat +1 19 190 -56 130 0 0 -1 0 1 0 1 0 0 3622.dat +1 2 160 -80 100 1 0 0 0 1 0 0 0 1 3001.dat +1 2 130 -88 100 1 0 0 0 1 0 0 0 1 3021.dat +1 2 190 -88 100 1 0 0 0 1 0 0 0 1 3021.dat +1 2 140 -112 100 1 0 0 0 1 0 0 0 1 3003.dat +1 2 170 -112 90 1 0 0 0 1 0 0 0 1 4070.dat +1 84 190 -112 90 1 0 0 0 1 0 0 0 1 3005.dat +1 2 190 -112 110 -1 0 0 0 1 0 0 0 -1 4070.dat +1 2 110 -112 90 1 0 0 0 1 0 0 0 1 4070.dat +1 2 110 -112 130 1 0 0 0 1 0 0 0 1 3040b.dat +1 14 110 -102 60 1 0 0 0 0 -1 0 1 0 3005.dat +1 71 110 -102 52 1 0 0 0 0 -1 0 1 0 61252.dat +1 71 155.5 -82 54 0 1 0 0 0 1 1 0 0 3957b.dat +1 2 210 -112 90 1 0 0 0 1 0 0 0 1 4070.dat +1 2 210 -112 130 1 0 0 0 1 0 0 0 1 3040b.dat +1 14 210 -102 60 1 0 0 0 0 -1 0 1 0 3005.dat +1 19 160 -136 90 1 0 0 0 1 0 0 0 1 3004.dat +1 226 160 -136 110 1 0 0 0 1 0 0 0 1 3004.dat +1 0 150 -160 90 1 0 0 0 1 0 0 0 1 47905.dat +1 15 150 -150 72 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 0 170 -160 90 1 0 0 0 1 0 0 0 1 47905.dat +1 15 170 -150 72 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 14 160 -184 100 1 0 0 0 1 0 0 0 1 3003.dat +1 2 160 -208 110 1 0 0 0 1 0 0 0 1 3039.dat +1 2 150 -232 110 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 2 170 -232 110 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 0 170 -112 110 -1 0 0 0 1 0 0 0 -1 47905.dat +1 16 180 -52 120 -1 0 0 0 0 -1 0 -1 0 blue_shield.ldr +1 25 40 -32 130 1 0 0 0 1 0 0 0 1 3004.dat +1 15 40 -56 120 0 0 -1 0 1 0 1 0 0 6215.dat +1 25 40 -64 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 4 30 -88 110 0 0 -1 0 1 0 1 0 0 47905.dat +1 15 12 -78 110 0 1 0 0 0 1 1 0 0 98138p07.dat +1 15 48 -78 110 0 -1 0 0 0 -1 1 0 0 98138p0c.dat +1 4 30 -88 110 1 0 0 0 1 0 0 0 1 54200.dat +1 15 30 -64 140 0 0 -1 0 1 0 1 0 0 3069b.dat +1 25 180 -32 270 1 0 0 0 1 0 0 0 1 3004.dat +1 15 180 -56 260 0 0 -1 0 1 0 1 0 0 6215.dat +1 25 180 -64 250 1 0 0 0 1 0 0 0 1 3023b.dat +1 4 170 -88 250 0 0 -1 0 1 0 1 0 0 47905.dat +1 15 152 -78 250 0 1 0 0 0 1 1 0 0 98138p07.dat +1 15 188 -78 250 0 -1 0 0 0 -1 1 0 0 98138p0c.dat +1 4 170 -88 250 1 0 0 0 1 0 0 0 1 54200.dat +1 15 170 -64 280 0 0 -1 0 1 0 1 0 0 3069b.dat +1 25 280 -32 130 1 0 0 0 1 0 0 0 1 3004.dat +1 15 280 -56 120 0 0 -1 0 1 0 1 0 0 6215.dat +1 19 280 -64 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 0 270 -88 110 0 0 -1 0 1 0 1 0 0 47905.dat +1 15 252 -78 110 0 1 0 0 0 1 1 0 0 98138p0c.dat +1 4 270 -88 110 1 0 0 0 1 0 0 0 1 54200.dat +1 15 270 -64 140 0 0 -1 0 1 0 1 0 0 3069b.dat +0 FILE blue_shield.ldr +0 blue_shield +0 Name: blue_shield +1 1 10 -8 40 0 0 -1 0 1 0 1 0 0 3710.dat +1 1 30 -8 40 0 0 -1 0 1 0 1 0 0 3710.dat +1 1 20 -32 30 1 0 0 0 1 0 0 0 1 3039.dat +1 1 20 -32 60 1 0 0 0 1 0 0 0 1 3003.dat diff --git a/brickwright/alt/alt-003/thumb-512.avif b/brickwright/alt/alt-003/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..a1aa77847715c83a7a0c67589d90f2a2d51a695f Binary files /dev/null and b/brickwright/alt/alt-003/thumb-512.avif differ diff --git a/brickwright/alt/alt-003/trace.jsonl.gz b/brickwright/alt/alt-003/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..a9eae678d579b973d7aba26bb2d47d13c062f4f6 --- /dev/null +++ b/brickwright/alt/alt-003/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b708895dd83f0edcc40367bda7b34958cde1b4a393f2fc468cebe9963708b825 +size 8354 diff --git a/brickwright/alt/alt-003/view-0.avif b/brickwright/alt/alt-003/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..3906bc793f58a4ee5cdb321ca9ee688dd5c5379b Binary files /dev/null and b/brickwright/alt/alt-003/view-0.avif differ diff --git a/brickwright/alt/alt-003/view-1.avif b/brickwright/alt/alt-003/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..233a4e81f0d91fa5359cdf53a4d11bf8d2597721 Binary files /dev/null and b/brickwright/alt/alt-003/view-1.avif differ diff --git a/brickwright/alt/alt-003/view-2.avif b/brickwright/alt/alt-003/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..34b3a3292b7ff1f55f8629b6ddc56c976175d68e Binary files /dev/null and b/brickwright/alt/alt-003/view-2.avif differ diff --git a/brickwright/alt/alt-003/view-3.avif b/brickwright/alt/alt-003/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..734abdd565154eab67aed4ecce388c42aff5f30c Binary files /dev/null and b/brickwright/alt/alt-003/view-3.avif differ diff --git a/brickwright/alt/alt-003/view-4.avif b/brickwright/alt/alt-003/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..5a727e32b53bf709ecf8d43b7e864bfbefbb74b4 Binary files /dev/null and b/brickwright/alt/alt-003/view-4.avif differ diff --git a/brickwright/alt/alt-003/view-5.avif b/brickwright/alt/alt-003/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..72f3cd7d7cc553f7da944c51ca3f0b9d634a6232 Binary files /dev/null and b/brickwright/alt/alt-003/view-5.avif differ diff --git a/brickwright/alt/alt-003/view-6.avif b/brickwright/alt/alt-003/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..d87bde338ab73c309fbfdf12b6902e2b941c24fd Binary files /dev/null and b/brickwright/alt/alt-003/view-6.avif differ diff --git a/brickwright/alt/alt-003/view-7.avif b/brickwright/alt/alt-003/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..7acf7a316375ae93e6a6c5cedac39d24c05b0822 Binary files /dev/null and b/brickwright/alt/alt-003/view-7.avif differ diff --git a/brickwright/alt/alt-004/build.py b/brickwright/alt/alt-004/build.py new file mode 100644 index 0000000000000000000000000000000000000000..4e04c13e60a5825332a6de6b6f01214a8b276829 --- /dev/null +++ b/brickwright/alt/alt-004/build.py @@ -0,0 +1,84 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + def add(pid,c,x,y,z,r=0,name=None): + return b.add(bl.Element(pid,getattr(bl.Color,c)),(x,y,z),bl.Rotation(r),name=name) + add('3028','BRIGHT_GREEN',0,0,0,name='ground') + for x in (2,8): + add('3039','GREEN',x,0,1/3) + add('3003','GREEN',x,2,1/3) + for x in (3,7): + add('3001','GREEN',x,2,4/3,1) + add('3660b','WHITE',x,2,7/3) + add('3660b','WHITE',x,4,7/3,2) + for y in (2,5): add('3004','WHITE',5,y,7/3) + add('3032','YELLOW',3,2,10/3,name='belt') + for y in (4,): + add('6215','WHITE',3,y,11/3,2) + add('6215','WHITE',6,y,11/3) + for x in (4,6): add('3004','WHITE',x,2,11/3) + for y in (2,5): + add('60481a','WHITE',3,y,14/3,3) + add('60481a','WHITE',7,y,14/3,1) + for z in (14/3,17/3): add('2877','WHITE',5,y,z) + for z in (14/3,17/3): add('3001','LIME',4,3,z) + # Staggered, broad green cloak suspended from the shoulder bridge. + for i in range(4): + z=8/3+i + x=3 if i%2==0 else 5 + add('3001','DARK_GREEN',x,6,z) + ox=7 if i%2==0 else 3 + for dx in (0,1): add('3004','DARK_GREEN',ox+dx,6,z,1) + add('3001','LIME',4,3,20/3) + add('3001','LIME',4,5,20/3,name='cape_bridge') + # Wide frog jaw, projecting muzzle and two separated, forward-facing eyes. + for x in (2,6): add('3001','GREEN',x,2,23/3) + add('2456','BRIGHT_GREEN',3,4,23/3) + for x in (3,6): add('3021','GREEN',x,1,26/3) + add('2431','GREEN',4,1,9) + add('2456','BRIGHT_GREEN',3,4,26/3) + for x in (3,8): + eye=add('4070','GREEN',x,2,9,name='eye_mount_'+str(x)) + e=bl.Element('98138p07',bl.Color.WHITE) + b.connect(e,e.find_connector('antistud'),to=eye.find_connector('stud',facing=bl.Direction.FRONT),name='eye_'+str(x)) + for x in (2,9): add('3040b','GREEN',x,2,26/3,0) + # Blue gauntlets converge on the shared sword grip. + for x in (2,8): add('3003','BLUE',x,1,11/3) + for x in (2,7): add('3002','BLUE',x,0,14/3) + hands=add('30414','BLUE',4,0,17/3,name='hands') + # Flat, broad blade; the long axis is turned upright by the hand's side stud. + s=bl.LegoBuild() + blade=s.add(bl.Element('3034',bl.Color.LIGHT_BLUISH_GRAY),(0,0,0),name='blade') + s.add(bl.Element('87079',bl.Color.LIGHT_BLUISH_GRAY),(0,0,1/3)) + for y in (0,1): + s.add(bl.Element('3004',bl.Color.LIGHT_BLUISH_GRAY),(4,y,1/3)) + s.add(bl.Element('3010',bl.Color.LIGHT_BLUISH_GRAY),(6,-1,1/3),bl.Rotation.DEG_90) + s.add(bl.Element('3004',bl.Color.DARK_BLUISH_GRAY),(7,0,1/3),bl.Rotation.DEG_90) + source=blade.find_connector('antistud',toward=(7.5,0.5,0)) + target=hands.find_connector('stud',facing=bl.Direction.FRONT,toward=(6.5,0,6)) + # Local blade starts at the tip: increasing x rises toward the hilt. + rot=bl.Mat3(((0,-1,0),(0,0,-1),(1,0,0))) + b.connect(s,source,to=target,target_rotation=rot,name='sword') + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + bad={str(k):v for k,v in used.items() if v>inventory.get(k[0],{}).get(k[1],0)} + tests.check('Inventory limits',not bad,str(bad)) + tests.check('Two frog eyes',sum(p.content.ldraw_id=='98138p07' for p in b.flattened_placements)==2) + tests.check('Yellow belt',b.named('belt').content.color==bl.Color.YELLOW) + tests.check('Broad gray sword',b.named('sword').height>5 and b.named('sword').width>=3) + tests.check('Green cape',sum(p.content.color==bl.Color.DARK_GREEN for p in b.flattened_placements)>=12) + return tests.report() diff --git a/brickwright/alt/alt-004/hero-1024.avif b/brickwright/alt/alt-004/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..3d4bd368e31ef410f103a8fdad77f10f7a58eb6d Binary files /dev/null and b/brickwright/alt/alt-004/hero-1024.avif differ diff --git a/brickwright/alt/alt-004/model.mpd b/brickwright/alt/alt-004/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..014dbf406d399dfdaf65fd87b5331c2e12e50bca --- /dev/null +++ b/brickwright/alt/alt-004/model.mpd @@ -0,0 +1,73 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 120 -8 60 1 0 0 0 1 0 0 0 1 3028.dat +1 2 60 -32 30 1 0 0 0 1 0 0 0 1 3039.dat +1 2 60 -32 60 1 0 0 0 1 0 0 0 1 3003.dat +1 2 180 -32 30 1 0 0 0 1 0 0 0 1 3039.dat +1 2 180 -32 60 1 0 0 0 1 0 0 0 1 3003.dat +1 2 80 -56 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 15 80 -80 70 1 0 0 0 1 0 0 0 1 3660b.dat +1 15 80 -80 90 -1 0 0 0 1 0 0 0 -1 3660b.dat +1 2 160 -56 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 15 160 -80 70 1 0 0 0 1 0 0 0 1 3660b.dat +1 15 160 -80 90 -1 0 0 0 1 0 0 0 -1 3660b.dat +1 15 120 -80 50 1 0 0 0 1 0 0 0 1 3004.dat +1 15 120 -80 110 1 0 0 0 1 0 0 0 1 3004.dat +1 14 120 -88 80 1 0 0 0 1 0 0 0 1 3032.dat +1 15 100 -112 100 -1 0 0 0 1 0 0 0 -1 6215.dat +1 15 140 -112 100 1 0 0 0 1 0 0 0 1 6215.dat +1 15 100 -112 50 1 0 0 0 1 0 0 0 1 3004.dat +1 15 140 -112 50 1 0 0 0 1 0 0 0 1 3004.dat +1 15 90 -160 50 0 0 1 0 1 0 -1 0 0 60481a.dat +1 15 150 -160 50 0 0 -1 0 1 0 1 0 0 60481a.dat +1 15 120 -136 50 1 0 0 0 1 0 0 0 1 2877.dat +1 15 120 -160 50 1 0 0 0 1 0 0 0 1 2877.dat +1 15 90 -160 110 0 0 1 0 1 0 -1 0 0 60481a.dat +1 15 150 -160 110 0 0 -1 0 1 0 1 0 0 60481a.dat +1 15 120 -136 110 1 0 0 0 1 0 0 0 1 2877.dat +1 15 120 -160 110 1 0 0 0 1 0 0 0 1 2877.dat +1 27 120 -136 80 1 0 0 0 1 0 0 0 1 3001.dat +1 27 120 -160 80 1 0 0 0 1 0 0 0 1 3001.dat +1 288 100 -88 140 1 0 0 0 1 0 0 0 1 3001.dat +1 288 150 -88 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 170 -88 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 140 -112 140 1 0 0 0 1 0 0 0 1 3001.dat +1 288 70 -112 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 90 -112 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 100 -136 140 1 0 0 0 1 0 0 0 1 3001.dat +1 288 150 -136 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 170 -136 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 140 -160 140 1 0 0 0 1 0 0 0 1 3001.dat +1 288 70 -160 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 90 -160 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 27 120 -184 80 1 0 0 0 1 0 0 0 1 3001.dat +1 27 120 -184 120 1 0 0 0 1 0 0 0 1 3001.dat +1 2 80 -208 60 1 0 0 0 1 0 0 0 1 3001.dat +1 2 160 -208 60 1 0 0 0 1 0 0 0 1 3001.dat +1 10 120 -208 100 1 0 0 0 1 0 0 0 1 2456.dat +1 2 90 -216 40 1 0 0 0 1 0 0 0 1 3021.dat +1 2 150 -216 40 1 0 0 0 1 0 0 0 1 3021.dat +1 2 120 -224 30 1 0 0 0 1 0 0 0 1 2431.dat +1 10 120 -232 100 1 0 0 0 1 0 0 0 1 2456.dat +1 2 70 -240 50 1 0 0 0 1 0 0 0 1 4070.dat +1 15 70 -230 36 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 2 170 -240 50 1 0 0 0 1 0 0 0 1 4070.dat +1 15 170 -230 36 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 2 50 -232 70 1 0 0 0 1 0 0 0 1 3040b.dat +1 2 190 -232 70 1 0 0 0 1 0 0 0 1 3040b.dat +1 1 60 -112 40 1 0 0 0 1 0 0 0 1 3003.dat +1 1 180 -112 40 1 0 0 0 1 0 0 0 1 3003.dat +1 1 70 -136 20 1 0 0 0 1 0 0 0 1 3002.dat +1 1 170 -136 20 1 0 0 0 1 0 0 0 1 3002.dat +1 1 120 -160 10 1 0 0 0 1 0 0 0 1 30414.dat +1 16 140 0 0 0 0 -1 -1 0 0 0 1 0 sword.ldr +0 FILE sword.ldr +0 sword +0 Name: sword +1 71 80 -8 20 1 0 0 0 1 0 0 0 1 3034.dat +1 71 40 -16 20 1 0 0 0 1 0 0 0 1 87079.dat +1 71 100 -32 10 1 0 0 0 1 0 0 0 1 3004.dat +1 71 100 -32 30 1 0 0 0 1 0 0 0 1 3004.dat +1 71 130 -32 20 0 0 -1 0 1 0 1 0 0 3010.dat +1 72 150 -32 20 0 0 -1 0 1 0 1 0 0 3004.dat diff --git a/brickwright/alt/alt-004/thumb-512.avif b/brickwright/alt/alt-004/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..c1aaf0fa146c82965f2add45c55061642afbf214 Binary files /dev/null and b/brickwright/alt/alt-004/thumb-512.avif differ diff --git a/brickwright/alt/alt-004/trace.jsonl.gz b/brickwright/alt/alt-004/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..4ff92f02cdd997be8e8cbe273e0acd7051b395ea --- /dev/null +++ b/brickwright/alt/alt-004/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34129d598689cc16aaa7421816332c87af68c46a53123952aad39426b304c895 +size 7223 diff --git a/brickwright/alt/alt-004/view-0.avif b/brickwright/alt/alt-004/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..d0580867fb042fe52619b39ca171b3a2e44edfdb Binary files /dev/null and b/brickwright/alt/alt-004/view-0.avif differ diff --git a/brickwright/alt/alt-004/view-1.avif b/brickwright/alt/alt-004/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..18ee434bc032c808e8585a8c11ed9fff4472fb92 Binary files /dev/null and b/brickwright/alt/alt-004/view-1.avif differ diff --git a/brickwright/alt/alt-004/view-2.avif b/brickwright/alt/alt-004/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..13a060e167a9164184358e78e7cc1ee79071cd75 Binary files /dev/null and b/brickwright/alt/alt-004/view-2.avif differ diff --git a/brickwright/alt/alt-004/view-3.avif b/brickwright/alt/alt-004/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..b4d7896e91ff454c8b075e9ad150e62aeaef1be8 Binary files /dev/null and b/brickwright/alt/alt-004/view-3.avif differ diff --git a/brickwright/alt/alt-004/view-4.avif b/brickwright/alt/alt-004/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..87e130b4248cd5f3f5d09d2b8454860c3203352a Binary files /dev/null and b/brickwright/alt/alt-004/view-4.avif differ diff --git a/brickwright/alt/alt-004/view-5.avif b/brickwright/alt/alt-004/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..37c3d3a9be7fd87a16a377c9a9ccef46bd244227 Binary files /dev/null and b/brickwright/alt/alt-004/view-5.avif differ diff --git a/brickwright/alt/alt-004/view-6.avif b/brickwright/alt/alt-004/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..32a898b707d1f252143119342622d0f3d53ff9d1 Binary files /dev/null and b/brickwright/alt/alt-004/view-6.avif differ diff --git a/brickwright/alt/alt-004/view-7.avif b/brickwright/alt/alt-004/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..ed7edf8fbaf4ee9bd1016c8ad5a534c4798f16c3 Binary files /dev/null and b/brickwright/alt/alt-004/view-7.avif differ diff --git a/brickwright/alt/alt-005/build.py b/brickwright/alt/alt-005/build.py new file mode 100644 index 0000000000000000000000000000000000000000..d594ada18bf9667545120b44df02e6df22777ee2 --- /dev/null +++ b/brickwright/alt/alt-005/build.py @@ -0,0 +1,104 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + def add(pid,c,x,y,z,r=0,name=None): + return b.add(bl.Element(pid,getattr(bl.Color,c)),(x,y,z),bl.Rotation(r),name=name) + def face(pid,c,target,name=None): + e=bl.Element(pid,getattr(bl.Color,c)) + return b.connect(e,e.find_connector(['antistud','tube'],toward=bl.Position(0,0,0)),to=target,name=name) + # A wide, interlocked sole is the only ground contact. + for x in (1,3): + for y in (-2,1): add('3002','BLUE',x,y,0,1,name=f'sole_{x}_{y}') + add('3031','BLUE',1,-1,1,name='sole_bridge') + add('3003','DARK_PURPLE',2,-2,4/3,name='curl_base') + add('3039','MEDIUM_LAVENDER',2,-2,7/3,2,name='support_shoe_curl') + for z in (4/3,7/3): add('3941','DARK_PURPLE',1,1,z,name=f'standing_ankle_{z}') + for z in (10/3,13/3): add('3003','DARK_PURPLE',1,1,z) + # Raised, bent blue leg and a second upturned toe. + add('3001','BLUE',1,1,16/3,name='hips') + add('3003','BLUE',4,1,13/3,name='raised_knee') + add('3003','BLUE',5,1,10/3,name='raised_foot') + add('3039','BLUE',6,1,13/3,1,name='raised_curl') + # Yellow hem, harlequin split tunic and a pale ruff. + add('3032','YELLOW',0,0,19/3,name='hem') + for z in (20/3,23/3,26/3): + if z==20/3: + add('3001','MEDIUM_AZURE',1,0,z,1) + else: add('3001','DARK_PURPLE',1,0,z,1) + add('3001','BLUE',3,0,z,1) + add('3031','BLUE',1,0,29/3,name='shoulder_bridge') + add('3003','YELLOW',2,1,10,name='neck') + # Outstretched sleeves with broad, asymmetric gestures. + add('3001','DARK_PURPLE',-2,1,10,name='purple_arm') + add('3941','DARK_PURPLE',-3,1,11,name='purple_cuff') + add('3003','YELLOW',-3,1,12,name='left_hand') + add('3001','BLUE',4,1,10,name='blue_arm') + add('3003','BLUE',7,1,9,name='blue_cuff') + add('3003','YELLOW',8,1,8,name='right_hand') + # White pointed collar around the neck. + for x in (1,3): + add('3660b','WHITE',x,-1,10) + add('3660b','WHITE',x,3,10,2) + # Three courses of the tan face, with side studs for expression. + for z in (11,13): + p=add('30414','TAN',1,0,z,name='mouth_mount' if z==11 else 'eye_mount') + add('3001','TAN',1,1,z) + studs=p.find_connectors('stud',facing=bl.Direction.FRONT) + studs=sorted(studs,key=lambda c:c.position.x) + if z==13: + face('98138p07','WHITE',studs[0],'eye_right') + face('98138p07','WHITE',studs[3],'eye_left') + else: + for i in (0,2): + e=bl.Element('3069b',bl.Color.WHITE) + b.connect(e,e.find_connector('antistud',toward=bl.Direction.RIGHT),to=studs[i],target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90),name=f'grin_{i}') + add('3005','MEDIUM_NOUGAT',1,0,12) + add('3004','TAN',3,0,12) + add('3004','MEDIUM_NOUGAT',1,2,12) + add('3004','MEDIUM_NOUGAT',3,2,12) + for x in (1,3,4): add('3005','MEDIUM_NOUGAT',x,1,12) + # Rounded red jester nose on a narrow centre mount. + nose=add('47905','RED',2,0,12,name='nose_mount') + face('6141','RED',nose.find_connector('stud',facing=bl.Direction.FRONT),'nose') + # Hat brim, two divergent points, and yellow bell ornaments. + add('3031','BLUE',1,0,14,name='hat_brim') + add('3001','DARK_PURPLE',0,1,43/3,name='purple_hat_lobe') + add('3003','BLUE',4,1,43/3,name='blue_hat_lobe') + add('3003','DARK_PURPLE',-1,1,46/3,name='purple_hat_tip_base') + add('3039','BLUE',5,1,46/3,3,name='blue_hat_point') + for y in (1,2): add('60481a','DARK_PURPLE',-2,y,49/3,1) + add('98262','YELLOW',-2,1,55/3,name='bell_left') + add('98262','YELLOW',6,1,49/3,name='bell_right') + return b + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):v for k,v in used.items() if v>inventory.get(k[0],{}).get(k[1],0)} + t.check('Inventory limits',not excess,str(excess)) + t.check('Two yellow hat bells',all(b.named(n).content.color==bl.Color.YELLOW for n in ('bell_left','bell_right'))) + t.check('Raised second shoe',b.named('raised_foot').bounding_box[0].z>3) + ground=[p for p in b.placements if p.bounding_box[0].z<0.01] + t.check('Only the supporting shoe touches ground',len(ground)==4 and all((b.name_of(p) or '').startswith('sole_') for p in ground)) + # Conservative geometric balance estimate: equal plastic density and box volumes. + weights=[] + for p in b.flattened_placements: + lo,hi=p.bounding_box + w=(hi.x-lo.x)*(hi.y-lo.y)*(hi.z-lo.z) + weights.append((w,(hi.x+lo.x)/2,(hi.y+lo.y)/2)) + cx=sum(w*x for w,x,y in weights)/sum(w for w,x,y in weights) + cy=sum(w*y for w,x,y in weights)/sum(w for w,x,y in weights) + t.check('Balance estimate inside broad sole',1.5limit:excess.append((e.ldraw_id,e.color.name,n,limit)) + t.check('Inventory limits',not excess,str(excess)) + t.check('Four wheels',sum(n for e,n in b.list_elements().items() if e.ldraw_id=='6014b')==4,'Four yellow rims with four black tyres') + t.check('Arched roof',sum(n for e,n in b.list_elements().items() if e.ldraw_id=='93273')==6,'Six double-curved ribs spanning the cabin') + t.check('Horse and paired harness shafts',all(n in b.names for n in ('horse_head','harness_crossbar','shaft_0','shaft_3')),'Brick-built horse connected to both shafts') + t.check('Seated crowned passenger',all(n in b.names for n in ('seat','passenger_lap','passenger_head','crown_band','crown_points')),'Seat, bent legs, head and flared crown') + return t.report() diff --git a/brickwright/alt/alt-006/hero-1024.avif b/brickwright/alt/alt-006/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..bf8961b919dfc79dd77574956bc351a8786e014e Binary files /dev/null and b/brickwright/alt/alt-006/hero-1024.avif differ diff --git a/brickwright/alt/alt-006/model.mpd b/brickwright/alt/alt-006/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..982c81ba24f48f718148b3334dcab8027629c691 --- /dev/null +++ b/brickwright/alt/alt-006/model.mpd @@ -0,0 +1,77 @@ +1 0 40 -32 30 1 0 0 0 1 0 0 0 1 2926.dat +1 14 90 -27 30 0 0 -1 0 1 0 1 0 0 6014b.dat +1 0 96 -27 30 0 0 -1 0 1 0 1 0 0 87697.dat +1 14 -10 -27 30 0 0 1 0 1 0 -1 0 0 6014b.dat +1 0 -16 -27 30 0 0 1 0 1 0 -1 0 0 87697.dat +1 0 40 -32 130 1 0 0 0 1 0 0 0 1 2926.dat +1 14 90 -27 130 0 0 -1 0 1 0 1 0 0 6014b.dat +1 0 96 -27 130 0 0 -1 0 1 0 1 0 0 87697.dat +1 14 -10 -27 130 0 0 1 0 1 0 -1 0 0 6014b.dat +1 0 -16 -27 130 0 0 1 0 1 0 -1 0 0 87697.dat +1 71 20 -40 80 0 0 -1 0 1 0 1 0 0 3034.dat +1 71 60 -40 80 0 0 -1 0 1 0 1 0 0 3034.dat +1 226 40 -64 10 1 0 0 0 1 0 0 0 1 3010.dat +1 226 40 -64 150 1 0 0 0 1 0 0 0 1 3010.dat +1 320 40 -64 120 1 0 0 0 1 0 0 0 1 3003.dat +1 320 40 -88 130 1 0 0 0 1 0 0 0 1 3004.dat +1 71 10 -112 40 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 10 -160 40 0 0 -1 0 1 0 1 0 0 3245c.dat +1 226 10 -184 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 10 -112 140 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 10 -160 140 0 0 -1 0 1 0 1 0 0 3245c.dat +1 226 10 -184 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 70 -112 40 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 70 -160 40 0 0 -1 0 1 0 1 0 0 3245c.dat +1 226 70 -184 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 70 -112 140 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 70 -160 140 0 0 -1 0 1 0 1 0 0 3245c.dat +1 226 70 -184 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 10 -208 80 0 0 -1 0 1 0 1 0 0 3009.dat +1 4 70 -208 80 0 0 -1 0 1 0 1 0 0 3009.dat +1 4 40 -208 10 1 0 0 0 1 0 0 0 1 3659.dat +1 4 40 -208 150 1 0 0 0 1 0 0 0 1 3659.dat +1 1 40 -216 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 40 -216 120 1 0 0 0 1 0 0 0 1 3031.dat +1 14 40 -216 30 0 0 -1 0 1 0 1 0 0 93273.dat +1 322 40 -216 50 0 0 -1 0 1 0 1 0 0 93273.dat +1 322 40 -216 70 0 0 -1 0 1 0 1 0 0 93273.dat +1 322 40 -216 90 0 0 -1 0 1 0 1 0 0 93273.dat +1 322 40 -216 110 0 0 -1 0 1 0 1 0 0 93273.dat +1 14 40 -216 130 0 0 -1 0 1 0 1 0 0 93273.dat +1 272 40 -64 70 1 0 0 0 1 0 0 0 1 3004.dat +1 85 40 -88 100 1 0 0 0 1 0 0 0 1 3003.dat +1 272 40 -112 110 1 0 0 0 1 0 0 0 1 3004.dat +1 14 40 -136 100 1 0 0 0 1 0 0 0 1 3003.dat +1 19 40 -144 100 1 0 0 0 1 0 0 0 1 3022.dat +1 14 30 -168 90 1 0 0 0 1 0 0 0 1 98262.dat +1 84 30 -112 90 1 0 0 0 1 0 0 0 1 3005.dat +1 84 50 -112 90 1 0 0 0 1 0 0 0 1 3005.dat +1 322 10 -72 -60 0 0 -1 0 1 0 1 0 0 3460.dat +1 322 70 -72 -60 0 0 -1 0 1 0 1 0 0 3460.dat +1 19 40 -80 -90 1 0 0 0 1 0 0 0 1 3710.dat +1 19 40 -80 -120 1 0 0 0 1 0 0 0 1 3022.dat +1 0 30 -24 -170 1 0 0 0 1 0 0 0 1 47905.dat +1 84 30 -48 -170 1 0 0 0 1 0 0 0 1 3005.dat +1 0 30 -24 -70 1 0 0 0 1 0 0 0 1 47905.dat +1 84 30 -48 -70 1 0 0 0 1 0 0 0 1 3005.dat +1 0 50 -24 -170 1 0 0 0 1 0 0 0 1 47905.dat +1 84 50 -48 -170 1 0 0 0 1 0 0 0 1 3005.dat +1 0 50 -24 -70 1 0 0 0 1 0 0 0 1 47905.dat +1 84 50 -48 -70 1 0 0 0 1 0 0 0 1 3005.dat +1 70 40 -72 -150 0 0 -1 0 1 0 1 0 0 3002.dat +1 70 40 -72 -90 0 0 -1 0 1 0 1 0 0 3002.dat +1 84 40 -96 -160 1 0 0 0 1 0 0 0 1 3003.dat +1 84 40 -120 -170 1 0 0 0 1 0 0 0 1 3004.dat +1 0 40 -120 -150 1 0 0 0 1 0 0 0 1 3004.dat +1 70 40 -144 -190 0 0 -1 0 1 0 1 0 0 3002.dat +1 2 30 -168 -170 0 0 1 0 1 0 -1 0 0 4070.dat +1 15 16 -158 -170 0 1 0 0 0 -1 -1 0 0 98138p07.dat +1 84 30 -192 -170 1 0 0 0 1 0 0 0 1 3005.dat +1 2 50 -168 -170 0 0 -1 0 1 0 1 0 0 4070.dat +1 15 64 -158 -170 0 -1 0 0 0 -1 1 0 0 98138p07.dat +1 84 50 -192 -170 1 0 0 0 1 0 0 0 1 3005.dat +1 70 30 -168 -190 1 0 0 0 1 0 0 0 1 3040b.dat +1 70 50 -168 -190 1 0 0 0 1 0 0 0 1 3040b.dat +1 0 40 -144 -150 1 0 0 0 1 0 0 0 1 3004.dat +1 0 30 -96 -70 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 0 50 -96 -70 -1 0 0 0 1 0 0 0 -1 3040b.dat diff --git a/brickwright/alt/alt-006/thumb-512.avif b/brickwright/alt/alt-006/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..a44163a3f538b2f1fe76b3c8f9eddd16bee15a9e Binary files /dev/null and b/brickwright/alt/alt-006/thumb-512.avif differ diff --git a/brickwright/alt/alt-006/trace.jsonl.gz b/brickwright/alt/alt-006/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..34d29f0ad006d30e8a762839900176db080a20b4 --- /dev/null +++ b/brickwright/alt/alt-006/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50a151679f8edf3b54b1d5919152fb2e65f662280fed03ed8fe41d72992b5efe +size 9299 diff --git a/brickwright/alt/alt-006/view-0.avif b/brickwright/alt/alt-006/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..1fec5e7157e466363d6aa4978cebe8bd30e3a47c Binary files /dev/null and b/brickwright/alt/alt-006/view-0.avif differ diff --git a/brickwright/alt/alt-006/view-1.avif b/brickwright/alt/alt-006/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..d40a03c201ab45a39a96ba36e39873c5a6e19295 Binary files /dev/null and b/brickwright/alt/alt-006/view-1.avif differ diff --git a/brickwright/alt/alt-006/view-2.avif b/brickwright/alt/alt-006/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..4b000bbb4dccace80cf0aabd5442bd8c6c23f6a2 Binary files /dev/null and b/brickwright/alt/alt-006/view-2.avif differ diff --git a/brickwright/alt/alt-006/view-3.avif b/brickwright/alt/alt-006/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..1cb27538f9abb77ca3972345a8b63b4b509f2553 Binary files /dev/null and b/brickwright/alt/alt-006/view-3.avif differ diff --git a/brickwright/alt/alt-006/view-4.avif b/brickwright/alt/alt-006/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..46524f8e38ea47e8ac355bf25b72356e055a7705 Binary files /dev/null and b/brickwright/alt/alt-006/view-4.avif differ diff --git a/brickwright/alt/alt-006/view-5.avif b/brickwright/alt/alt-006/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..bf8edb6e6742b845cea945e13678a344b6d96c72 Binary files /dev/null and b/brickwright/alt/alt-006/view-5.avif differ diff --git a/brickwright/alt/alt-006/view-6.avif b/brickwright/alt/alt-006/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..d904b3628a8cd99ce7cd1d78c6aba4adc3445ea0 Binary files /dev/null and b/brickwright/alt/alt-006/view-6.avif differ diff --git a/brickwright/alt/alt-006/view-7.avif b/brickwright/alt/alt-006/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..54f40b14e17fd579efca8baf53ba2b7d4d222a6b Binary files /dev/null and b/brickwright/alt/alt-006/view-7.avif differ diff --git a/brickwright/alt/alt-007/build.py b/brickwright/alt/alt-007/build.py new file mode 100644 index 0000000000000000000000000000000000000000..670bced01614a402b39704102411a5d5f6421ce8 --- /dev/null +++ b/brickwright/alt/alt-007/build.py @@ -0,0 +1,95 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + C=bl.Color + def put(pid,color,x,y,z,rot=0,name=None): + return b.add(bl.Element(pid,color),(x,y,z),rotation=bl.Rotation(rot),name=name) + put('91405',C.BRIGHT_GREEN,0,0,0,name='meadow') + # Low, rounded boulder: staggered masonry and curved shoulders. + for x in (6,8,10): + put('3001',C.DARK_BLUISH_GRAY,x,7,1/3,1) + for x,y,r in [(6,7,0),(10,7,1),(10,9,2),(6,9,3)]: + put('85080',C.LIGHT_BLUISH_GRAY,x,y,4/3,r) + for y in (7,): + put('3001',C.LIGHT_BLUISH_GRAY,8,y,4/3,1) + # Sword emerges directly from the stone. + put('3245c',C.LIGHT_BLUISH_GRAY,8,8,7/3,name='blade') + put('3010',C.LIGHT_BLUISH_GRAY,7,8,13/3,name='crossguard') + put('47905',C.BLACK,8,8,16/3,name='hilt') + put('3005',C.YELLOW,8,8,19/3,name='gripping_hand') + put('6141',C.DARK_BLUISH_GRAY,8,8,23/3,name='pommel') + # Knight: boots, separated greaves, blue surcoat, visor and plume. + for x in (1,4): + put('3004',C.BLACK,x,7,1/3,1) + put('3245c',C.LIGHT_BLUISH_GRAY,x,7,4/3,1) + put('3001',C.LIGHT_BLUISH_GRAY,1,7,10/3,name='belt') + for z in (13/3,16/3): + put('3004',C.LIGHT_BLUISH_GRAY,1,7,z,1) + put('3004',C.DARK_BLUE,2,7,z) + put('3004',C.DARK_BLUE,2,8,z) + put('3004',C.LIGHT_BLUISH_GRAY,4,7,z,1) + put('3004',C.LIGHT_BLUISH_GRAY,0,7,19/3,name='left_shoulder') + put('3005',C.LIGHT_BLUISH_GRAY,0,7,16/3) + put('3005',C.LIGHT_BLUISH_GRAY,0,7,13/3) + put('3005',C.YELLOW,0,7,10/3,name='free_hand') + put('3010',C.LIGHT_BLUISH_GRAY,4,8,19/3,name='reaching_arm') + put('3710',C.TAN,5,8,22/3,name='gauntlet_bridge') + put('3022',C.TAN,2,7,19/3) + put('3003',C.YELLOW,2,7,20/3,name='face') + put('2877',C.WHITE,2,7,23/3,name='visor') + put('3004',C.LIGHT_BLUISH_GRAY,2,8,23/3) + helmet=put('30367c',C.WHITE,2,7,26/3,name='helmet') + plume=bl.Element('3062b',C.DARK_ORANGE) + stem=b.connect(plume,plume.find_connector('antistud'),to=helmet.find_connector('stud',facing=bl.Direction.UP),name='plume_stem') + petal=bl.Element('33291',C.BRIGHT_LIGHT_ORANGE) + b.connect(petal,petal.find_connector('antistud'),to=stem.find_connector('stud',facing=bl.Direction.UP)) + # The shield is locked at a leaning angle, with its foot beside the stone. + foot=put('92582',C.BLACK,5,5,1/3,1,name='shield_foot') + shield=bl.LegoBuild() + hinge=shield.add(bl.Element('60471',C.BLACK),(1,0,0),name='hinge') + shield.add(bl.Element('3031',C.BLUE),(0,0,1/3)) + for x,y,r in [(1,0,1),(0,2,0),(2,2,0)]: + shield.add(bl.Element('3069b',C.WHITE),(x,y,2/3),rotation=bl.Rotation(r)) + b.connect(shield,hinge.find_connector('hinge_2_on'),to=foot.find_connector('hinge_2_in'),target_rotation=bl.rotation_about(bl.Vec3(1,0,0),86),name='shield') + # Tree opposite the knight; broad roots, forked trunk and stepped foliage. + put('3002',C.REDDISH_BROWN,12,8,1/3) + put('3002',C.REDDISH_BROWN,13,7,4/3,1) + for z in (7/3,10/3,13/3,16/3): + put('30136',C.DARK_ORANGE,13,8,z,1) + put('3002',C.REDDISH_BROWN,12,8,19/3) + put('3795',C.REDDISH_BROWN,10,8,22/3) + put('3001',C.DARK_GREEN,10,8,23/3) + put('3004',C.DARK_GREEN,14,8,23/3,1) + put('3001',C.GREEN,11,7,26/3) + put('3001',C.DARK_GREEN,11,9,26/3) + put('3031',C.BRIGHT_GREEN,10,7,29/3,name='canopy') + for x,y in [(10,7),(12,7),(10,9),(12,9)]: + put('3039',C.GREEN,x,y,10) + put('3001',C.GREEN,10,8,11) + put('3039',C.LIME,10,8,12) + put('3039',C.LIME,12,8,12) + for x,y in [(11,4),(5,12),(13,13)]: + put('4727',C.BRIGHT_GREEN,x,y,1/3) + return b + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + allowed=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):n for k,n in used.items() if n>allowed.get(k[0],{}).get(k[1],0)} + t.check('Inventory limits',not excess,str(excess)) + t.check('Tree opposite knight',b.named('belt').center.x < b.named('blade').center.x < b.named('canopy').center.x) + t.check('Leaning shield beside stone', 'shield' in b.names and abs(b.named('shield').pose.rotation.entries[2][1]) > 0.9) + t.check('Upright sword',b.named('blade').height > b.named('blade').width) + t.check('Hand on hilt',abs(b.named('gripping_hand').center.x-b.named('hilt').center.x)<0.01) + return t.report() diff --git a/brickwright/alt/alt-007/hero-1024.avif b/brickwright/alt/alt-007/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..55238dade06e1bd5b4c45708ff3c0d6595c32301 Binary files /dev/null and b/brickwright/alt/alt-007/hero-1024.avif differ diff --git a/brickwright/alt/alt-007/model.mpd b/brickwright/alt/alt-007/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..ddba78848f0118990897564f9515068d983e0866 --- /dev/null +++ b/brickwright/alt/alt-007/model.mpd @@ -0,0 +1,76 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 72 140 -32 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 72 180 -32 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 72 220 -32 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 130 -56 170 1 0 0 0 1 0 0 0 1 85080.dat +1 71 210 -56 150 0 0 -1 0 1 0 1 0 0 85080.dat +1 71 230 -56 190 -1 0 0 0 1 0 0 0 -1 85080.dat +1 71 150 -56 210 0 0 1 0 1 0 -1 0 0 85080.dat +1 71 180 -56 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 180 -104 170 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 180 -128 170 1 0 0 0 1 0 0 0 1 3010.dat +1 0 170 -152 170 1 0 0 0 1 0 0 0 1 47905.dat +1 14 170 -176 170 1 0 0 0 1 0 0 0 1 3005.dat +1 72 170 -192 170 1 0 0 0 1 0 0 0 1 6141.dat +1 0 30 -32 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 30 -80 160 0 0 -1 0 1 0 1 0 0 3245c.dat +1 0 90 -32 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 90 -80 160 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 60 -104 160 1 0 0 0 1 0 0 0 1 3001.dat +1 71 30 -128 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 60 -128 150 1 0 0 0 1 0 0 0 1 3004.dat +1 272 60 -128 170 1 0 0 0 1 0 0 0 1 3004.dat +1 71 90 -128 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 30 -152 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 60 -152 150 1 0 0 0 1 0 0 0 1 3004.dat +1 272 60 -152 170 1 0 0 0 1 0 0 0 1 3004.dat +1 71 90 -152 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 20 -176 150 1 0 0 0 1 0 0 0 1 3004.dat +1 71 10 -152 150 1 0 0 0 1 0 0 0 1 3005.dat +1 71 10 -128 150 1 0 0 0 1 0 0 0 1 3005.dat +1 14 10 -104 150 1 0 0 0 1 0 0 0 1 3005.dat +1 71 120 -176 170 1 0 0 0 1 0 0 0 1 3010.dat +1 19 140 -184 170 1 0 0 0 1 0 0 0 1 3710.dat +1 19 60 -160 160 1 0 0 0 1 0 0 0 1 3022.dat +1 14 60 -184 160 1 0 0 0 1 0 0 0 1 3003.dat +1 15 60 -208 150 1 0 0 0 1 0 0 0 1 2877.dat +1 71 60 -208 170 1 0 0 0 1 0 0 0 1 3004.dat +1 15 60 -232 160 1 0 0 0 1 0 0 0 1 30367c.dat +1 484 60 -256 160 1 0 0 0 1 0 0 0 1 3062b.dat +1 191 60 -264 160 1 0 0 0 1 0 0 0 1 33291.dat +1 0 120 -16 120 0 0 -1 0 1 0 1 0 0 92582.dat +1 16 80 -31.557102 136.682949 1 0 0 0 0.069756 -0.997564 0 0.997564 0.069756 shield.ldr +1 70 270 -32 180 1 0 0 0 1 0 0 0 1 3002.dat +1 70 280 -56 170 0 0 -1 0 1 0 1 0 0 3002.dat +1 484 270 -80 180 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 270 -104 180 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 270 -128 180 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 270 -152 180 0 0 -1 0 1 0 1 0 0 30136.dat +1 70 270 -176 180 1 0 0 0 1 0 0 0 1 3002.dat +1 70 260 -184 180 1 0 0 0 1 0 0 0 1 3795.dat +1 288 240 -208 180 1 0 0 0 1 0 0 0 1 3001.dat +1 288 290 -208 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 2 260 -232 160 1 0 0 0 1 0 0 0 1 3001.dat +1 288 260 -232 200 1 0 0 0 1 0 0 0 1 3001.dat +1 10 240 -240 180 1 0 0 0 1 0 0 0 1 3031.dat +1 2 220 -264 170 1 0 0 0 1 0 0 0 1 3039.dat +1 2 260 -264 170 1 0 0 0 1 0 0 0 1 3039.dat +1 2 220 -264 210 1 0 0 0 1 0 0 0 1 3039.dat +1 2 260 -264 210 1 0 0 0 1 0 0 0 1 3039.dat +1 2 240 -288 180 1 0 0 0 1 0 0 0 1 3001.dat +1 27 220 -312 190 1 0 0 0 1 0 0 0 1 3039.dat +1 27 260 -312 190 1 0 0 0 1 0 0 0 1 3039.dat +1 10 230 -32 90 1 0 0 0 1 0 0 0 1 4727.dat +1 10 110 -32 250 1 0 0 0 1 0 0 0 1 4727.dat +1 10 270 -32 270 1 0 0 0 1 0 0 0 1 4727.dat +0 FILE shield.ldr +0 shield +0 Name: shield +1 0 40 -8 10 1 0 0 0 1 0 0 0 1 60471.dat +1 1 40 -16 40 1 0 0 0 1 0 0 0 1 3031.dat +1 15 30 -24 20 0 0 -1 0 1 0 1 0 0 3069b.dat +1 15 20 -24 50 1 0 0 0 1 0 0 0 1 3069b.dat +1 15 60 -24 50 1 0 0 0 1 0 0 0 1 3069b.dat diff --git a/brickwright/alt/alt-007/thumb-512.avif b/brickwright/alt/alt-007/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..2dd21bd6b066d60791638c26bc6fe90ed9ccf6f0 Binary files /dev/null and b/brickwright/alt/alt-007/thumb-512.avif differ diff --git a/brickwright/alt/alt-007/trace.jsonl.gz b/brickwright/alt/alt-007/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..071f6a8581f9baacee517f3e0e8b057e3460fe65 --- /dev/null +++ b/brickwright/alt/alt-007/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e154c0308bffc9c64c8946348e019296eb5bd70413826b45938b552dac59daf0 +size 7933 diff --git a/brickwright/alt/alt-007/view-0.avif b/brickwright/alt/alt-007/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..bbcf0ae7ef8e135451e24291c2caeb68e2bab089 Binary files /dev/null and b/brickwright/alt/alt-007/view-0.avif differ diff --git a/brickwright/alt/alt-007/view-1.avif b/brickwright/alt/alt-007/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..46d4b021ff703d6fb3d5efdc8502b1e9070af21e Binary files /dev/null and b/brickwright/alt/alt-007/view-1.avif differ diff --git a/brickwright/alt/alt-007/view-2.avif b/brickwright/alt/alt-007/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..5421bf6ec446400f373502b6a0d84a65639c277b Binary files /dev/null and b/brickwright/alt/alt-007/view-2.avif differ diff --git a/brickwright/alt/alt-007/view-3.avif b/brickwright/alt/alt-007/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..34013c2f470859d85b35832cac822bb3a91320b4 Binary files /dev/null and b/brickwright/alt/alt-007/view-3.avif differ diff --git a/brickwright/alt/alt-007/view-4.avif b/brickwright/alt/alt-007/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..fe9173c487e5ed75188a0aa9961cf868d1fe01ed Binary files /dev/null and b/brickwright/alt/alt-007/view-4.avif differ diff --git a/brickwright/alt/alt-007/view-5.avif b/brickwright/alt/alt-007/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..655c46d9f4f62a1568243f5a6ca76d1dde0f3a39 Binary files /dev/null and b/brickwright/alt/alt-007/view-5.avif differ diff --git a/brickwright/alt/alt-007/view-6.avif b/brickwright/alt/alt-007/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..3be6f9ce144c0e4ce22a67b8e5c201fa1f479fb3 Binary files /dev/null and b/brickwright/alt/alt-007/view-6.avif differ diff --git a/brickwright/alt/alt-007/view-7.avif b/brickwright/alt/alt-007/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..732c3524269b90c60620fcbb522a61744b78efd3 Binary files /dev/null and b/brickwright/alt/alt-007/view-7.avif differ diff --git a/brickwright/alt/alt-008/build.py b/brickwright/alt/alt-008/build.py new file mode 100644 index 0000000000000000000000000000000000000000..77f81193e745d8f5f3ec70ff8f4b0c430e83883b --- /dev/null +++ b/brickwright/alt/alt-008/build.py @@ -0,0 +1,78 @@ +import json +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + def put(pid,col,x,y,z,rot=0,name=None): + return b.add(bl.Element(pid,getattr(bl.Color,col)),(x,y,z),bl.Rotation(rot),name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='land') + for x in (1,5,9): put('3031','BLUE',x,4,1/3,name='moat_'+str(x)) + put('3028','BRIGHT_GREEN',1,8,1/3) + put('3031','BRIGHT_GREEN',5,0,1/3) + put('3029','DARK_BLUISH_GRAY',1,8,2/3) + for x in (5,7): put('3795','REDDISH_BROWN',x,2,2/3,1,name='drawbridge_'+str(x)) + for x in (5,8): put('15207','REDDISH_BROWN',x,3,1,1) + for x in (1,9): + for y in (8,10): put('3001','DARK_TAN',x,y,1) + for y in (8,11): put('3010','LIGHT_BLUISH_GRAY',x,y,2) + for xx in (x,x+3): put('3004','TAN',xx,9,2,1) + for xx in (x,x+3): + for y in (8,10): put('3245c','LIGHT_BLUISH_GRAY',xx,y,3,1) + put('90195','LIGHT_BLUISH_GRAY',x+1,8,3,name='arrow_window_'+str(x)) + # Back wall behind the arrow windows, in warm sandstone. + for z in (3,4): put('3004','MEDIUM_NOUGAT',x+1,11,z) + for z in (5,6): + put('3001','LIGHT_BLUISH_GRAY',x,10,z) + for xx in (x,x+2): put('3004','LIGHT_BLUISH_GRAY',xx,9,z) + for z in (5,6): + put('3004','DARK_BLUISH_GRAY',1,8,z) + put('3005','LIGHT_BLUISH_GRAY',3,8,z) + put('3005','LIGHT_BLUISH_GRAY',10,8,z) + put('3004','DARK_BLUISH_GRAY',11,8,z) + put('15254','LIGHT_BLUISH_GRAY',4,8,5,name='entrance_arch') + for y in (8,10): put('3034','LIGHT_BLUISH_GRAY',3,y,7) + for x in (1,11): put('3020','TAN',x,8,7,1) + # Low tower's four separate merlons surround an open roof. + for x in (9,12): + for y in (8,11): put('3005','WHITE',x,y,22/3) + for y in (9,10): put('2431','LIGHT_BLUISH_GRAY',9,y,22/3) + for x in (5,7): put('87079','LIGHT_BLUISH_GRAY',x,8,22/3,1) + # Taller tower: sandstone windowed lantern over the stone base. + for z in (22/3,25/3): + for x in (1,4): + put('3622','TAN',x,8,z,1) + put('3005','MEDIUM_NOUGAT',x,11,z) + for x in (1,4): + for y in (8,10): put('3004','MEDIUM_NOUGAT',x,y,28/3,1) + put('60593','TAN',2,8,22/3,name='high_window') + for z in (22/3,25/3,28/3): put('3004','DARK_RED',2,11,z) + for x in (0,3): put('11212','DARK_BLUISH_GRAY',x,8,31/3) + for x in (0,4): + for y in (8,10): put('2458','DARK_BLUISH_GRAY',x,y,32/3) + pole=put('3957b','LIGHT_BLUISH_GRAY',2,9,32/3,name='flagpole') + clip=bl.Element('61252',bl.Color.LIGHT_BLUISH_GRAY) + cp=b.connect(clip,'clip',to=pole.find_connector('bar'),target_rotation=bl.rotation_about(bl.Vec3(0,1,0),90),mounting=bl.Mounting(offset=-0.9),name='flag_clip') + flag=bl.LegoBuild() + flag.add(bl.Element('3004',bl.Color.RED),(0,0,0)) + flag.add(bl.Element('3004',bl.Color.RED),(0,0,1)) + b.connect(flag,flag.find_connector('antistud',toward=bl.Direction.RIGHT),to=cp.find_connector('stud',facing=bl.Direction.LEFT),name='red_flag') + return b + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + over=[] + for e,n in b.list_elements().items(): + if n>inventory.get(e.ldraw_id,{}).get(e.color.name,0): over.append((e.ldraw_id,e.color.name,n)) + t.check('inventory limits',not over,str(over)) + t.check('tall tower above short tower', b.named('flagpole').bounding_box[0].z>10) + t.check('six-stud arched entrance',b.named('entrance_arch').content.ldraw_id=='15254') + t.check('drawbridge crosses four-stud moat',all(b.named('drawbridge_'+str(x)).depth>=6 for x in (5,7))) + return t.report() diff --git a/brickwright/alt/alt-008/hero-1024.avif b/brickwright/alt/alt-008/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..66d0d51e34924feb883adeb71ab72aeca08adf10 Binary files /dev/null and b/brickwright/alt/alt-008/hero-1024.avif differ diff --git a/brickwright/alt/alt-008/model.mpd b/brickwright/alt/alt-008/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..2c6837d2513f1bc9e3c702265784d21f259dc95a --- /dev/null +++ b/brickwright/alt/alt-008/model.mpd @@ -0,0 +1,103 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 1 60 -16 120 1 0 0 0 1 0 0 0 1 3031.dat +1 1 140 -16 120 1 0 0 0 1 0 0 0 1 3031.dat +1 1 220 -16 120 1 0 0 0 1 0 0 0 1 3031.dat +1 10 140 -16 220 1 0 0 0 1 0 0 0 1 3028.dat +1 10 140 -16 40 1 0 0 0 1 0 0 0 1 3031.dat +1 72 140 -24 200 1 0 0 0 1 0 0 0 1 3029.dat +1 70 120 -24 100 0 0 -1 0 1 0 1 0 0 3795.dat +1 70 160 -24 100 0 0 -1 0 1 0 1 0 0 3795.dat +1 70 110 -48 100 0 0 -1 0 1 0 1 0 0 15207.dat +1 70 170 -48 100 0 0 -1 0 1 0 1 0 0 15207.dat +1 28 60 -48 180 1 0 0 0 1 0 0 0 1 3001.dat +1 28 60 -48 220 1 0 0 0 1 0 0 0 1 3001.dat +1 71 60 -72 170 1 0 0 0 1 0 0 0 1 3010.dat +1 71 60 -72 230 1 0 0 0 1 0 0 0 1 3010.dat +1 19 30 -72 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 90 -72 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 30 -120 180 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 30 -120 220 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 90 -120 180 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 90 -120 220 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 60 -120 170 1 0 0 0 1 0 0 0 1 90195.dat +1 84 60 -96 230 1 0 0 0 1 0 0 0 1 3004.dat +1 84 60 -120 230 1 0 0 0 1 0 0 0 1 3004.dat +1 71 60 -144 220 1 0 0 0 1 0 0 0 1 3001.dat +1 71 40 -144 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 80 -144 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 60 -168 220 1 0 0 0 1 0 0 0 1 3001.dat +1 71 40 -168 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 80 -168 190 1 0 0 0 1 0 0 0 1 3004.dat +1 28 220 -48 180 1 0 0 0 1 0 0 0 1 3001.dat +1 28 220 -48 220 1 0 0 0 1 0 0 0 1 3001.dat +1 71 220 -72 170 1 0 0 0 1 0 0 0 1 3010.dat +1 71 220 -72 230 1 0 0 0 1 0 0 0 1 3010.dat +1 19 190 -72 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 250 -72 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 190 -120 180 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 190 -120 220 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 250 -120 180 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 250 -120 220 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 220 -120 170 1 0 0 0 1 0 0 0 1 90195.dat +1 84 220 -96 230 1 0 0 0 1 0 0 0 1 3004.dat +1 84 220 -120 230 1 0 0 0 1 0 0 0 1 3004.dat +1 71 220 -144 220 1 0 0 0 1 0 0 0 1 3001.dat +1 71 200 -144 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 240 -144 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 220 -168 220 1 0 0 0 1 0 0 0 1 3001.dat +1 71 200 -168 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 240 -168 190 1 0 0 0 1 0 0 0 1 3004.dat +1 72 40 -144 170 1 0 0 0 1 0 0 0 1 3004.dat +1 71 70 -144 170 1 0 0 0 1 0 0 0 1 3005.dat +1 71 210 -144 170 1 0 0 0 1 0 0 0 1 3005.dat +1 72 240 -144 170 1 0 0 0 1 0 0 0 1 3004.dat +1 72 40 -168 170 1 0 0 0 1 0 0 0 1 3004.dat +1 71 70 -168 170 1 0 0 0 1 0 0 0 1 3005.dat +1 71 210 -168 170 1 0 0 0 1 0 0 0 1 3005.dat +1 72 240 -168 170 1 0 0 0 1 0 0 0 1 3004.dat +1 71 140 -168 170 1 0 0 0 1 0 0 0 1 15254.dat +1 71 140 -176 180 1 0 0 0 1 0 0 0 1 3034.dat +1 71 140 -176 220 1 0 0 0 1 0 0 0 1 3034.dat +1 19 40 -176 200 0 0 -1 0 1 0 1 0 0 3020.dat +1 19 240 -176 200 0 0 -1 0 1 0 1 0 0 3020.dat +1 15 190 -200 170 1 0 0 0 1 0 0 0 1 3005.dat +1 15 190 -200 230 1 0 0 0 1 0 0 0 1 3005.dat +1 15 250 -200 170 1 0 0 0 1 0 0 0 1 3005.dat +1 15 250 -200 230 1 0 0 0 1 0 0 0 1 3005.dat +1 71 220 -184 190 1 0 0 0 1 0 0 0 1 2431.dat +1 71 220 -184 210 1 0 0 0 1 0 0 0 1 2431.dat +1 71 120 -184 200 0 0 -1 0 1 0 1 0 0 87079.dat +1 71 160 -184 200 0 0 -1 0 1 0 1 0 0 87079.dat +1 19 30 -200 190 0 0 -1 0 1 0 1 0 0 3622.dat +1 84 30 -200 230 1 0 0 0 1 0 0 0 1 3005.dat +1 19 90 -200 190 0 0 -1 0 1 0 1 0 0 3622.dat +1 84 90 -200 230 1 0 0 0 1 0 0 0 1 3005.dat +1 19 30 -224 190 0 0 -1 0 1 0 1 0 0 3622.dat +1 84 30 -224 230 1 0 0 0 1 0 0 0 1 3005.dat +1 19 90 -224 190 0 0 -1 0 1 0 1 0 0 3622.dat +1 84 90 -224 230 1 0 0 0 1 0 0 0 1 3005.dat +1 84 30 -248 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 30 -248 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 90 -248 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 90 -248 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 60 -248 170 1 0 0 0 1 0 0 0 1 60593.dat +1 320 60 -200 230 1 0 0 0 1 0 0 0 1 3004.dat +1 320 60 -224 230 1 0 0 0 1 0 0 0 1 3004.dat +1 320 60 -248 230 1 0 0 0 1 0 0 0 1 3004.dat +1 72 30 -256 190 1 0 0 0 1 0 0 0 1 11212.dat +1 72 90 -256 190 1 0 0 0 1 0 0 0 1 11212.dat +1 72 20 -280 170 1 0 0 0 1 0 0 0 1 2458.dat +1 72 20 -280 210 1 0 0 0 1 0 0 0 1 2458.dat +1 72 100 -280 170 1 0 0 0 1 0 0 0 1 2458.dat +1 72 100 -280 210 1 0 0 0 1 0 0 0 1 2458.dat +1 71 50 -264 190 1 0 0 0 1 0 0 0 1 3957b.dat +1 71 52 -327.5 210 0 -1 0 1 0 0 0 0 1 61252.dat +1 16 52 -337.5 200 0 -1 0 1 0 0 0 0 1 red_flag.ldr +0 FILE red_flag.ldr +0 red_flag +0 Name: red_flag +1 4 20 -24 10 1 0 0 0 1 0 0 0 1 3004.dat +1 4 20 -48 10 1 0 0 0 1 0 0 0 1 3004.dat diff --git a/brickwright/alt/alt-008/thumb-512.avif b/brickwright/alt/alt-008/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..64bbc0c8debbff07003524faf7ef6933b8879be7 Binary files /dev/null and b/brickwright/alt/alt-008/thumb-512.avif differ diff --git a/brickwright/alt/alt-008/trace.jsonl.gz b/brickwright/alt/alt-008/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..ddc3d7f89c7fad45c84d21d4a46404f264d386d7 --- /dev/null +++ b/brickwright/alt/alt-008/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d83a9e09801e416e0ab642cb2a35bcb0336ba72f88423afdfe5b45b261b5a601 +size 5941 diff --git a/brickwright/alt/alt-008/view-0.avif b/brickwright/alt/alt-008/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..8a6fbe3a92c9049db2906b9c046f010171c3d03f Binary files /dev/null and b/brickwright/alt/alt-008/view-0.avif differ diff --git a/brickwright/alt/alt-008/view-1.avif b/brickwright/alt/alt-008/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..3bc09b36f1f2f80f1554c4093d1ddfbca67b0520 Binary files /dev/null and b/brickwright/alt/alt-008/view-1.avif differ diff --git a/brickwright/alt/alt-008/view-2.avif b/brickwright/alt/alt-008/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..f8ccce8c9aa6c2c59a1caaab07c4ccafc392650b Binary files /dev/null and b/brickwright/alt/alt-008/view-2.avif differ diff --git a/brickwright/alt/alt-008/view-3.avif b/brickwright/alt/alt-008/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..438f914e9103ad9afa6f42cff35c4304d8e7f7cb Binary files /dev/null and b/brickwright/alt/alt-008/view-3.avif differ diff --git a/brickwright/alt/alt-008/view-4.avif b/brickwright/alt/alt-008/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..5811997f9a952d35a341c3c85244440a56190f01 Binary files /dev/null and b/brickwright/alt/alt-008/view-4.avif differ diff --git a/brickwright/alt/alt-008/view-5.avif b/brickwright/alt/alt-008/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..a187c748d9aa99040a83a13219b6da8f2f9b7a51 Binary files /dev/null and b/brickwright/alt/alt-008/view-5.avif differ diff --git a/brickwright/alt/alt-008/view-6.avif b/brickwright/alt/alt-008/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..1641cb380593b68fd399a2d4a045e029a467a556 Binary files /dev/null and b/brickwright/alt/alt-008/view-6.avif differ diff --git a/brickwright/alt/alt-008/view-7.avif b/brickwright/alt/alt-008/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..f88935d0338797f8964f6770bc8858175532ecdc Binary files /dev/null and b/brickwright/alt/alt-008/view-7.avif differ diff --git a/brickwright/alt/alt-009/build.py b/brickwright/alt/alt-009/build.py new file mode 100644 index 0000000000000000000000000000000000000000..2418afbc8bb111fda6faaf99a37de1f24197c61a --- /dev/null +++ b/brickwright/alt/alt-009/build.py @@ -0,0 +1,95 @@ +import json +import bricklayer as bl +from brickwright import TestContext + + +def horse_knight(blue=False): + b=bl.LegoBuild() + C=bl.Color + def a(pid,col,x,y,z,rot=bl.Rotation.DEG_0,name=None): + return b.add(bl.Element(pid,col),(x,y,z),rotation=rot,name=name) + # Four legs, a continuous belly plate, and two broad haunches. + if not blue: + for x in (0,1): + for y in (0,5): + for z in (0,1): a('3005',C.MEDIUM_NOUGAT,x,y,z) + coat=C.REDDISH_BROWN + else: + for x in (0,1): + for y in (0,4): a('30136',C.BLACK,x,y,0,bl.Rotation.DEG_90) + for y in (0,4): a('3004',C.BLACK,0,y,1) + coat=C.BLACK + a('3795',C.REDDISH_BROWN,0,0,2,bl.Rotation.DEG_90) + for y in (0,3): a('3002',coat,0,y,7/3,bl.Rotation.DEG_90) + # Rising neck and projecting muzzle. + a('3004',C.MEDIUM_NOUGAT if not blue else C.DARK_BLUISH_GRAY,0,0,10/3) + a('3002',C.BLACK,0,-1,13/3,bl.Rotation.DEG_90) + # A crosswise stud brick carries both expressive eyes. + eye=a('47905',C.BLACK,0,0,16/3,bl.Rotation.DEG_90) + + tile=bl.Element('98138p07',C.WHITE) + for facing in (bl.Direction.LEFT,bl.Direction.RIGHT): + b.connect(tile,'tube',to=eye.find_connector('stud',facing=facing)) + a('3040b',C.BLACK,0,-1,19/3) + # Tail slopes and colored saddle cloth. + a('3040b',C.REDDISH_BROWN if not blue else C.BLACK,0,4,10/3,bl.Rotation.DEG_180) + col=C.BLUE if blue else C.RED + a('3003',col,0,2,10/3,name='saddle') + # Stirrup legs hang down either side; shoulder beam ties everything together. + for x in (-1,2): a('3004',C.LIGHT_BLUISH_GRAY,x,2,10/3,bl.Rotation.DEG_90) + a('2456',C.BLACK,-2,2,13/3) + a('3003',col,0,2,16/3,name='breastplate') + hand=a('47905',C.RED,3,2,16/3,name='lance_hand') + shieldhand=a('47905',C.BLACK,-2,2,16/3,bl.Rotation.DEG_90) + shield=bl.Element('3003',col) + b.connect(shield,shield.find_connector('antistud',toward=bl.Direction.FRONT),to=shieldhand.find_connector('stud',facing=bl.Direction.RIGHT),name='shield') + # Horizontal tapered antenna lance, held by its base socket. + lance=bl.Element('3957b',C.BLUE) + b.connect(lance,'tube',to=hand.find_connector('stud',facing=bl.Direction.FRONT),name='lance') + # Steel helmet with dark visor and round crown. + a('2877',C.WHITE,0,2,19/3) + a('3004',C.DARK_BLUISH_GRAY,0,2,22/3) + a('3245c',C.LIGHT_BLUISH_GRAY,0,3,19/3) + a('14769',C.DARK_BLUISH_GRAY,0,2,25/3,name='helmet') + return b + + +def create_build(): + b=bl.LegoBuild() + C=bl.Color + b.add(bl.Element('91405',C.BRIGHT_GREEN),name='field') + # Opposing riders in parallel lanes, either side of the jousting rail. + b.add(horse_knight(False),(1,2,1/3),rotation=bl.Rotation.DEG_90,name='red_rider') + b.add(horse_knight(True),(8,9,1/3),rotation=bl.Rotation.DEG_270,name='blue_rider') + # Low timber tilt: posts and two continuous courses of wooden rails. + for x in (2,7,12): + b.add(bl.Element('3062b',C.DARK_ORANGE),(x,7,1/3)) + for x in (2,6,10): + b.add(bl.Element('3010',C.REDDISH_BROWN),(x,7,4/3)) + for x in (2,4,6,8): + b.add(bl.Element('30136',C.DARK_ORANGE),(x,7,7/3)) + b.add(bl.Element('3010',C.REDDISH_BROWN),(10,7,7/3)) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=b.list_elements() + over=[f'{e.ldraw_id}/{e.color.name}: {n}' for e,n in used.items() if n>inventory.get(e.ldraw_id,{}).get(e.color.name,0)] + tests.check('Inventory limits',not over,str(over)) + tests.check('Two mounted knights',all(k in b.names for k in ('red_rider','blue_rider'))) + tests.check('Opposing colored shields',b.named(['red_rider','shield']).content.color==bl.Color.RED and b.named(['blue_rider','shield']).content.color==bl.Color.BLUE) + tests.check('Two lances',sum(n for e,n in used.items() if e.ldraw_id=='3957b')==2) + red=b.named(['red_rider','lance']) + blue=b.named(['blue_rider','lance']) + rd=red.pose.rotation @ bl.Vec3(0,0,1) + bd=blue.pose.rotation @ bl.Vec3(0,0,1) + tests.check('Lances point toward opposing riders',rd.x>0.9 and bd.x< -0.9) + tests.check('Riders on opposite sides of low rail',b.named(['red_rider','saddle']).center.y<7 and b.named(['blue_rider','saddle']).center.y>8) + tests.check('Low wooden barrier',sum(n for e,n in used.items() if e.ldraw_id=='3010' and e.color==bl.Color.REDDISH_BROWN)==4) + return tests.report() diff --git a/brickwright/alt/alt-009/hero-1024.avif b/brickwright/alt/alt-009/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..db8ac50a25f264f6e689ffbf6211370451dfe41c Binary files /dev/null and b/brickwright/alt/alt-009/hero-1024.avif differ diff --git a/brickwright/alt/alt-009/model.mpd b/brickwright/alt/alt-009/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..92c6fb9610c541c798bee586712aee7a61d133ce --- /dev/null +++ b/brickwright/alt/alt-009/model.mpd @@ -0,0 +1,83 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 16 140 -8 80 0 0 -1 0 1 0 1 0 0 red_rider.ldr +1 16 180 -8 260 0 0 1 0 1 0 -1 0 0 blue_rider.ldr +1 484 50 -32 150 1 0 0 0 1 0 0 0 1 3062b.dat +1 484 150 -32 150 1 0 0 0 1 0 0 0 1 3062b.dat +1 484 250 -32 150 1 0 0 0 1 0 0 0 1 3062b.dat +1 70 80 -56 150 1 0 0 0 1 0 0 0 1 3010.dat +1 70 160 -56 150 1 0 0 0 1 0 0 0 1 3010.dat +1 70 240 -56 150 1 0 0 0 1 0 0 0 1 3010.dat +1 484 60 -80 150 1 0 0 0 1 0 0 0 1 30136.dat +1 484 100 -80 150 1 0 0 0 1 0 0 0 1 30136.dat +1 484 140 -80 150 1 0 0 0 1 0 0 0 1 30136.dat +1 484 180 -80 150 1 0 0 0 1 0 0 0 1 30136.dat +1 70 240 -80 150 1 0 0 0 1 0 0 0 1 3010.dat +0 FILE red_rider.ldr +0 red_rider +0 Name: red_rider +1 84 10 -24 10 1 0 0 0 1 0 0 0 1 3005.dat +1 84 10 -48 10 1 0 0 0 1 0 0 0 1 3005.dat +1 84 10 -24 110 1 0 0 0 1 0 0 0 1 3005.dat +1 84 10 -48 110 1 0 0 0 1 0 0 0 1 3005.dat +1 84 30 -24 10 1 0 0 0 1 0 0 0 1 3005.dat +1 84 30 -48 10 1 0 0 0 1 0 0 0 1 3005.dat +1 84 30 -24 110 1 0 0 0 1 0 0 0 1 3005.dat +1 84 30 -48 110 1 0 0 0 1 0 0 0 1 3005.dat +1 70 20 -56 60 0 0 -1 0 1 0 1 0 0 3795.dat +1 70 20 -80 30 0 0 -1 0 1 0 1 0 0 3002.dat +1 70 20 -80 90 0 0 -1 0 1 0 1 0 0 3002.dat +1 84 20 -104 10 1 0 0 0 1 0 0 0 1 3004.dat +1 0 20 -128 10 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 10 -152 10 0 0 -1 0 1 0 1 0 0 47905.dat +1 15 28 -142 10 0 -1 0 0 0 -1 1 0 0 98138p07.dat +1 15 -8 -142 10 0 1 0 0 0 1 1 0 0 98138p07.dat +1 0 10 -176 10 1 0 0 0 1 0 0 0 1 3040b.dat +1 70 10 -104 90 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 4 20 -104 60 1 0 0 0 1 0 0 0 1 3003.dat +1 71 -10 -104 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 50 -104 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 20 -128 60 1 0 0 0 1 0 0 0 1 2456.dat +1 4 20 -152 60 1 0 0 0 1 0 0 0 1 3003.dat +1 4 70 -152 50 1 0 0 0 1 0 0 0 1 47905.dat +1 0 -30 -152 50 0 0 -1 0 1 0 1 0 0 47905.dat +1 4 -64 -132 60 0 1 0 0 0 1 1 0 0 3003.dat +1 1 70 -142 32 1 0 0 0 0 -1 0 1 0 3957b.dat +1 15 20 -176 50 1 0 0 0 1 0 0 0 1 2877.dat +1 72 20 -200 50 1 0 0 0 1 0 0 0 1 3004.dat +1 71 20 -200 70 1 0 0 0 1 0 0 0 1 3245c.dat +1 72 20 -208 60 1 0 0 0 1 0 0 0 1 14769.dat +0 FILE blue_rider.ldr +0 blue_rider +0 Name: blue_rider +1 0 10 -24 20 0 0 -1 0 1 0 1 0 0 30136.dat +1 0 10 -24 100 0 0 -1 0 1 0 1 0 0 30136.dat +1 0 30 -24 20 0 0 -1 0 1 0 1 0 0 30136.dat +1 0 30 -24 100 0 0 -1 0 1 0 1 0 0 30136.dat +1 0 20 -48 10 1 0 0 0 1 0 0 0 1 3004.dat +1 0 20 -48 90 1 0 0 0 1 0 0 0 1 3004.dat +1 70 20 -56 60 0 0 -1 0 1 0 1 0 0 3795.dat +1 0 20 -80 30 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 20 -80 90 0 0 -1 0 1 0 1 0 0 3002.dat +1 72 20 -104 10 1 0 0 0 1 0 0 0 1 3004.dat +1 0 20 -128 10 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 10 -152 10 0 0 -1 0 1 0 1 0 0 47905.dat +1 15 28 -142 10 0 -1 0 0 0 -1 1 0 0 98138p07.dat +1 15 -8 -142 10 0 1 0 0 0 1 1 0 0 98138p07.dat +1 0 10 -176 10 1 0 0 0 1 0 0 0 1 3040b.dat +1 0 10 -104 90 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 1 20 -104 60 1 0 0 0 1 0 0 0 1 3003.dat +1 71 -10 -104 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 50 -104 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 20 -128 60 1 0 0 0 1 0 0 0 1 2456.dat +1 1 20 -152 60 1 0 0 0 1 0 0 0 1 3003.dat +1 4 70 -152 50 1 0 0 0 1 0 0 0 1 47905.dat +1 0 -30 -152 50 0 0 -1 0 1 0 1 0 0 47905.dat +1 1 -64 -132 60 0 1 0 0 0 1 1 0 0 3003.dat +1 1 70 -142 32 1 0 0 0 0 -1 0 1 0 3957b.dat +1 15 20 -176 50 1 0 0 0 1 0 0 0 1 2877.dat +1 72 20 -200 50 1 0 0 0 1 0 0 0 1 3004.dat +1 71 20 -200 70 1 0 0 0 1 0 0 0 1 3245c.dat +1 72 20 -208 60 1 0 0 0 1 0 0 0 1 14769.dat diff --git a/brickwright/alt/alt-009/thumb-512.avif b/brickwright/alt/alt-009/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..696ae68df834d596fef7331a9732a296d675580d Binary files /dev/null and b/brickwright/alt/alt-009/thumb-512.avif differ diff --git a/brickwright/alt/alt-009/trace.jsonl.gz b/brickwright/alt/alt-009/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..9f3d8eaad5cfffe7ffc17ae55a398ae930316abb --- /dev/null +++ b/brickwright/alt/alt-009/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be62db882f39ccb8b8f08e3ebf93359f4fb4cbfa13400049ae2278515ee1a468 +size 6906 diff --git a/brickwright/alt/alt-009/view-0.avif b/brickwright/alt/alt-009/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..a30b2d73f4a15be9795942592cdd0b12f4e2a983 Binary files /dev/null and b/brickwright/alt/alt-009/view-0.avif differ diff --git a/brickwright/alt/alt-009/view-1.avif b/brickwright/alt/alt-009/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..389d5cdac04da47c8e33a21be2c32c6a553e5721 Binary files /dev/null and b/brickwright/alt/alt-009/view-1.avif differ diff --git a/brickwright/alt/alt-009/view-2.avif b/brickwright/alt/alt-009/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..2f3e193b4e7c0815b342bee2e3402e546404f928 Binary files /dev/null and b/brickwright/alt/alt-009/view-2.avif differ diff --git a/brickwright/alt/alt-009/view-3.avif b/brickwright/alt/alt-009/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..2aec39e6f9de83214b9a97b929c0c36b0d9a5f78 Binary files /dev/null and b/brickwright/alt/alt-009/view-3.avif differ diff --git a/brickwright/alt/alt-009/view-4.avif b/brickwright/alt/alt-009/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..b95d559a8eea50a2bd6f558efe94b58bb944068f Binary files /dev/null and b/brickwright/alt/alt-009/view-4.avif differ diff --git a/brickwright/alt/alt-009/view-5.avif b/brickwright/alt/alt-009/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..f34316698a35b9e0c3219a223d58fab8bc3346da Binary files /dev/null and b/brickwright/alt/alt-009/view-5.avif differ diff --git a/brickwright/alt/alt-009/view-6.avif b/brickwright/alt/alt-009/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..414c697b94b7527c5daf8cf9581d07bee1b5a003 Binary files /dev/null and b/brickwright/alt/alt-009/view-6.avif differ diff --git a/brickwright/alt/alt-009/view-7.avif b/brickwright/alt/alt-009/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..0693f414e8e9a45b936a18195a04bb0dd31661f0 Binary files /dev/null and b/brickwright/alt/alt-009/view-7.avif differ diff --git a/brickwright/alt/alt-010/build.py b/brickwright/alt/alt-010/build.py new file mode 100644 index 0000000000000000000000000000000000000000..1dc64ed489759625830a710e573a52932f2668eb --- /dev/null +++ b/brickwright/alt/alt-010/build.py @@ -0,0 +1,89 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(p,c,x,y,z,r=0,name=None): + return b.add(bl.Element(p,getattr(bl.Color,c)),(x,y,z),bl.Rotation(r),name=name) + # Wide, flat-soled boots; the upper foot projects in front of the trousers. + for x in [-1,4]: + for y in [0,2]: put('3002','REDDISH_BROWN',x,y,0) + for x in [0,4]: + put('3010','REDDISH_BROWN',x,0,1,1) + put('3040b','REDDISH_BROWN',x+1,0,1) + put('3062b','REDDISH_BROWN',x+1,2,1) + for x in [0,4]: + put('3022','TAN',x,2,2) + for y in [2,3]: + put('3023b','DARK_AZURE',x,y,7/3) + put('3023b','TAN',x,y,8/3) + put('3004','DARK_BLUE',x,y,3) + # Flared coat, with a continuous central plate joining both legs. + put('3031','BLUE',1,1,4,name='coat_bridge') + for x in [-1,5]: put('3020','MEDIUM_AZURE',x,1,4,1) + for y in [1,3]: + put('3001','BLUE',1,y,13/3) + put('3039','BLUE',-1,y,13/3,3) + put('3039','BLUE',5,y,13/3,1) + for x in [0,3]: put('3002','BLUE',x,y,16/3) + put('3001','BLUE',1,2,19/3) + # Broad sleeves and brown mitten hands, joined across the shoulder seams. + for x in [-2,6]: + put('3003','MEDIUM_NOUGAT',x,0,16/3) + put('3003','BLUE',x,1,19/3) + for x in [-2,4]: put('3020','MEDIUM_AZURE',x,1,22/3) + put('3010','REDDISH_BROWN',-2,0,19/3) + put('3710','BLUE',1,3,22/3) + # Raised collar flanking the featureless shadow face. + for z in [23/3,26/3]: + for x in [-1,6]: put('3004','DARK_BLUE',x,1,z,1) + for x in [0,2,4]: put('3004','DARK_BLUE',x,3,23/3) + for z in [23/3,29/3]: + for x in [0,3]: put('3002','BLACK',x,1,z) + for x in [0,5]: put('3004','BLACK',x,1,26/3,1) + for x in [1,4]: put('3005','YELLOW',x,1,26/3,name='eye_'+str(x)) + put('3004','BLACK',2,1,26/3) + put('3002','BLACK',1,2,26/3) + put('3004','BLACK',4,2,26/3,1) + # Enormous soft brim and a crown that bends to the mage's left. + original_put=put + def put(p,c,x,y,z,r=0,name=None): + return original_put(p,c,x,y,z+1/3,r,name) + put('3032','YELLOW',0,0,31/3,name='hat_brim') + put('60479','YELLOW',-3,-1,31/3) + for x in [-1,3]: + put('3037','YELLOW',x,-1,32/3) + put('3037','YELLOW',x,3,32/3,2) + put('3001','YELLOW',x,1,32/3) + for y in [0,2]: put('3001','YELLOW',1,y,35/3) + for y in [1,3]: put('3003','YELLOW',2,y,38/3) + put('3003','YELLOW',3,2,41/3) + put('6081','YELLOW',3,1,44/3,3,name='hat_bent_tip') + put=original_put + # A knobbly wooden staff, with staggered log bricks for its crooked head. + for z in range(5): put('3062b','DARK_ORANGE',9,0,z+1/3) if z < 4 else put('3005','MEDIUM_NOUGAT',9,0,z+1/3) + put('30136','DARK_ORANGE',8,0,16/3) + for x,z in [(8,22/3),(8,25/3),(9,28/3),(9,31/3),(10,34/3),(9,37/3)]: + put('30136','DARK_ORANGE',x,0,z) + # A brown finger plate crosses over the shaft and sleeve. + put('3010','REDDISH_BROWN',6,0,19/3,name='gripping_glove') + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):n for k,n in used.items() if n>inventory.get(k[0],{}).get(k[1],0)} + tests.check('Only supplied parts and quantities',not excess,str(excess)) + tests.check('Exactly two yellow eyes',sum(n.startswith('eye_') for n in b.names)==2) + tests.check('Oversized yellow brim',b.named('hat_brim').width>=6) + tests.check('Bent hat and gripping hand',all(n in b.names for n in ['hat_bent_tip','gripping_glove'])) + return tests.report() diff --git a/brickwright/alt/alt-010/hero-1024.avif b/brickwright/alt/alt-010/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..519c6c0352fdfb834e70e06f07712f6f8cef7cb1 Binary files /dev/null and b/brickwright/alt/alt-010/hero-1024.avif differ diff --git a/brickwright/alt/alt-010/model.mpd b/brickwright/alt/alt-010/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..29b58c2d26b2015e7c467f7d2463bb7d1d956717 --- /dev/null +++ b/brickwright/alt/alt-010/model.mpd @@ -0,0 +1,91 @@ +1 70 10 -24 20 1 0 0 0 1 0 0 0 1 3002.dat +1 70 10 -24 60 1 0 0 0 1 0 0 0 1 3002.dat +1 70 110 -24 20 1 0 0 0 1 0 0 0 1 3002.dat +1 70 110 -24 60 1 0 0 0 1 0 0 0 1 3002.dat +1 70 10 -48 40 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 30 -48 30 1 0 0 0 1 0 0 0 1 3040b.dat +1 70 30 -48 50 1 0 0 0 1 0 0 0 1 3062b.dat +1 70 90 -48 40 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 110 -48 30 1 0 0 0 1 0 0 0 1 3040b.dat +1 70 110 -48 50 1 0 0 0 1 0 0 0 1 3062b.dat +1 19 20 -56 60 1 0 0 0 1 0 0 0 1 3022.dat +1 321 20 -64 50 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 20 -72 50 1 0 0 0 1 0 0 0 1 3023b.dat +1 272 20 -96 50 1 0 0 0 1 0 0 0 1 3004.dat +1 321 20 -64 70 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 20 -72 70 1 0 0 0 1 0 0 0 1 3023b.dat +1 272 20 -96 70 1 0 0 0 1 0 0 0 1 3004.dat +1 19 100 -56 60 1 0 0 0 1 0 0 0 1 3022.dat +1 321 100 -64 50 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 100 -72 50 1 0 0 0 1 0 0 0 1 3023b.dat +1 272 100 -96 50 1 0 0 0 1 0 0 0 1 3004.dat +1 321 100 -64 70 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 100 -72 70 1 0 0 0 1 0 0 0 1 3023b.dat +1 272 100 -96 70 1 0 0 0 1 0 0 0 1 3004.dat +1 1 60 -104 60 1 0 0 0 1 0 0 0 1 3031.dat +1 322 0 -104 60 0 0 -1 0 1 0 1 0 0 3020.dat +1 322 120 -104 60 0 0 -1 0 1 0 1 0 0 3020.dat +1 1 60 -128 40 1 0 0 0 1 0 0 0 1 3001.dat +1 1 10 -128 40 0 0 1 0 1 0 -1 0 0 3039.dat +1 1 110 -128 40 0 0 -1 0 1 0 1 0 0 3039.dat +1 1 30 -152 40 1 0 0 0 1 0 0 0 1 3002.dat +1 1 90 -152 40 1 0 0 0 1 0 0 0 1 3002.dat +1 1 60 -128 80 1 0 0 0 1 0 0 0 1 3001.dat +1 1 10 -128 80 0 0 1 0 1 0 -1 0 0 3039.dat +1 1 110 -128 80 0 0 -1 0 1 0 1 0 0 3039.dat +1 1 30 -152 80 1 0 0 0 1 0 0 0 1 3002.dat +1 1 90 -152 80 1 0 0 0 1 0 0 0 1 3002.dat +1 1 60 -176 60 1 0 0 0 1 0 0 0 1 3001.dat +1 84 -20 -152 20 1 0 0 0 1 0 0 0 1 3003.dat +1 1 -20 -176 40 1 0 0 0 1 0 0 0 1 3003.dat +1 84 140 -152 20 1 0 0 0 1 0 0 0 1 3003.dat +1 1 140 -176 40 1 0 0 0 1 0 0 0 1 3003.dat +1 322 0 -184 40 1 0 0 0 1 0 0 0 1 3020.dat +1 322 120 -184 40 1 0 0 0 1 0 0 0 1 3020.dat +1 70 0 -176 10 1 0 0 0 1 0 0 0 1 3010.dat +1 1 60 -184 70 1 0 0 0 1 0 0 0 1 3710.dat +1 272 -10 -208 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 130 -208 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 -10 -232 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 130 -232 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 20 -208 70 1 0 0 0 1 0 0 0 1 3004.dat +1 272 60 -208 70 1 0 0 0 1 0 0 0 1 3004.dat +1 272 100 -208 70 1 0 0 0 1 0 0 0 1 3004.dat +1 0 30 -208 40 1 0 0 0 1 0 0 0 1 3002.dat +1 0 90 -208 40 1 0 0 0 1 0 0 0 1 3002.dat +1 0 30 -256 40 1 0 0 0 1 0 0 0 1 3002.dat +1 0 90 -256 40 1 0 0 0 1 0 0 0 1 3002.dat +1 0 10 -232 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 110 -232 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 14 30 -232 30 1 0 0 0 1 0 0 0 1 3005.dat +1 14 90 -232 30 1 0 0 0 1 0 0 0 1 3005.dat +1 0 60 -232 30 1 0 0 0 1 0 0 0 1 3004.dat +1 0 50 -232 60 1 0 0 0 1 0 0 0 1 3002.dat +1 0 90 -232 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 14 60 -264 40 1 0 0 0 1 0 0 0 1 3032.dat +1 14 60 -264 -10 1 0 0 0 1 0 0 0 1 60479.dat +1 14 20 -288 10 1 0 0 0 1 0 0 0 1 3037.dat +1 14 20 -288 70 -1 0 0 0 1 0 0 0 -1 3037.dat +1 14 20 -288 40 1 0 0 0 1 0 0 0 1 3001.dat +1 14 100 -288 10 1 0 0 0 1 0 0 0 1 3037.dat +1 14 100 -288 70 -1 0 0 0 1 0 0 0 -1 3037.dat +1 14 100 -288 40 1 0 0 0 1 0 0 0 1 3001.dat +1 14 60 -312 20 1 0 0 0 1 0 0 0 1 3001.dat +1 14 60 -312 60 1 0 0 0 1 0 0 0 1 3001.dat +1 14 60 -336 40 1 0 0 0 1 0 0 0 1 3003.dat +1 14 60 -336 80 1 0 0 0 1 0 0 0 1 3003.dat +1 14 80 -360 60 1 0 0 0 1 0 0 0 1 3003.dat +1 14 90 -392 60 0 0 1 0 1 0 -1 0 0 6081.dat +1 484 190 -32 10 1 0 0 0 1 0 0 0 1 3062b.dat +1 484 190 -56 10 1 0 0 0 1 0 0 0 1 3062b.dat +1 484 190 -80 10 1 0 0 0 1 0 0 0 1 3062b.dat +1 484 190 -104 10 1 0 0 0 1 0 0 0 1 3062b.dat +1 84 190 -128 10 1 0 0 0 1 0 0 0 1 3005.dat +1 484 180 -152 10 1 0 0 0 1 0 0 0 1 30136.dat +1 484 180 -200 10 1 0 0 0 1 0 0 0 1 30136.dat +1 484 180 -224 10 1 0 0 0 1 0 0 0 1 30136.dat +1 484 200 -248 10 1 0 0 0 1 0 0 0 1 30136.dat +1 484 200 -272 10 1 0 0 0 1 0 0 0 1 30136.dat +1 484 220 -296 10 1 0 0 0 1 0 0 0 1 30136.dat +1 484 200 -320 10 1 0 0 0 1 0 0 0 1 30136.dat +1 70 160 -176 10 1 0 0 0 1 0 0 0 1 3010.dat diff --git a/brickwright/alt/alt-010/thumb-512.avif b/brickwright/alt/alt-010/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..ec40b904898fcd9fb621e2e20f8e463fd0e821e2 Binary files /dev/null and b/brickwright/alt/alt-010/thumb-512.avif differ diff --git a/brickwright/alt/alt-010/trace.jsonl.gz b/brickwright/alt/alt-010/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..0e45df2922659098bcb2522acb24256c636ef48a --- /dev/null +++ b/brickwright/alt/alt-010/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e13b262ad2a3601a6b70700235dbeed7f4698a0a81ea781adabf7de7d93e54ff +size 7866 diff --git a/brickwright/alt/alt-010/view-0.avif b/brickwright/alt/alt-010/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..b973a5c4b5af76a70db9a5c3fb3875cc2a8cc2ef Binary files /dev/null and b/brickwright/alt/alt-010/view-0.avif differ diff --git a/brickwright/alt/alt-010/view-1.avif b/brickwright/alt/alt-010/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..58e4fc553356510f055aaf62361268ec04359ab7 Binary files /dev/null and b/brickwright/alt/alt-010/view-1.avif differ diff --git a/brickwright/alt/alt-010/view-2.avif b/brickwright/alt/alt-010/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..2465855ef587e158692f4df9ce9b0f4a524cef74 Binary files /dev/null and b/brickwright/alt/alt-010/view-2.avif differ diff --git a/brickwright/alt/alt-010/view-3.avif b/brickwright/alt/alt-010/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..ee1acad160f62b4d73e0a7ae102749785b8585d0 Binary files /dev/null and b/brickwright/alt/alt-010/view-3.avif differ diff --git a/brickwright/alt/alt-010/view-4.avif b/brickwright/alt/alt-010/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..7591026744db40fc6363e20d50e23dd761274614 Binary files /dev/null and b/brickwright/alt/alt-010/view-4.avif differ diff --git a/brickwright/alt/alt-010/view-5.avif b/brickwright/alt/alt-010/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..6266f23f81a3734f7a7203f240e81c135bb221da Binary files /dev/null and b/brickwright/alt/alt-010/view-5.avif differ diff --git a/brickwright/alt/alt-010/view-6.avif b/brickwright/alt/alt-010/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..301fe5fc0ea61f4adff0126905b0851d12160cda Binary files /dev/null and b/brickwright/alt/alt-010/view-6.avif differ diff --git a/brickwright/alt/alt-010/view-7.avif b/brickwright/alt/alt-010/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..ea3c5ff83af1fda2e9a643688cdab30018f4c10c Binary files /dev/null and b/brickwright/alt/alt-010/view-7.avif differ diff --git a/brickwright/alt/alt-011/build.py b/brickwright/alt/alt-011/build.py new file mode 100644 index 0000000000000000000000000000000000000000..0fbd00fc14a4c6360490dc429540b1a905d13174 --- /dev/null +++ b/brickwright/alt/alt-011/build.py @@ -0,0 +1,127 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + C = bl.Color + van_offset = 0 + def add(pid, color, x,y,z, rot=bl.Rotation.DEG_0, name=None): + return b.add(bl.Element(pid,color),(x,y,z+van_offset),rotation=rot,name=name) + add('91405',C.BRIGHT_GREEN,0,0,0,name='display_base') + # Hidden chassis blocks give a rigid connection to the display base. + for y in (5,9): + add('3002',C.BLACK,5,y,1/3) + add('3022',C.TAN,6,y,4/3) + add('3020',C.TAN,5,y,5/3) + van_offset = 1/3 + add('3029',C.DARK_BLUISH_GRAY,5,2,5/3,bl.Rotation.DEG_90,'chassis') + for y in (3,11): + axle=add('2926',C.BLACK,5,y,4/3,name='axle_'+str(y)) + for direction in (bl.Direction.LEFT,bl.Direction.RIGHT): + w=b.connect(bl.Element('6014b',C.YELLOW),'hinge_3_on',to=axle.find_connector('hinge_3_in',facing=direction)) + tire=bl.Element('87697',C.BLACK) + b.connect(tire,tire.find_connector('fixed_13_on',facing=bl.Direction.BACK),to=w.find_connector('fixed_13_in',toward=direction)) + # Azure lower body, with a contrasting strawberry waist stripe. + for y in (2,4,6,8,10,12): + add('3001',C.LIME,5,y,2) + for y in (4,6,8,10): + add('3001',C.BRIGHT_PINK,5,y,3) + for y in (3,12,13): + add('3010',C.BRIGHT_PINK,5,y,3) + # Cab windscreen faces the short front of the van. + for x in (5,7): + add('3039',C.TRANS_CLEAR,x,2,4) + for x in (5,8): + add('60592',C.WHITE,x,4,4,bl.Rotation.DEG_90,name='cab_window_'+str(x)) + # Back panel and opposite wall. The serving side is left wide open. + for z in (4,5): + add('3010',C.BRIGHT_LIGHT_YELLOW,5,13,z) + add('3010',C.BRIGHT_LIGHT_YELLOW,5,6,z,bl.Rotation.DEG_90) + add('3622',C.TAN,5,10,z,bl.Rotation.DEG_90) + add('3004',C.BRIGHT_PINK,8,6,z,bl.Rotation.DEG_90) + add('3005',C.BRIGHT_PINK,8,12,z) + # Raised front roof header and transparent central cab section. + add('3010',C.BRIGHT_LIGHT_YELLOW,5,2,5) + for x in (5,8): + add('3005',C.BRIGHT_PINK,x,3,5) + # A tiled, projecting counter at the open serving aperture. + add('3020',C.MEDIUM_AZURE,8,8,4,bl.Rotation.DEG_90,'serving_counter') + add('87079',C.LIGHT_BLUISH_GRAY,8,8,13/3,bl.Rotation.DEG_90) + # Continuous roof plates tie all walls together. + for y in (2,6,10): + add('3031',C.BLUE,5,y,6) + # Alternating awning stripes on the serving side. + for y in range(8,12): + add('3040b',C.WHITE if y%2==0 else C.MEDIUM_AZURE,8,y,19/3,bl.Rotation.DEG_90) + for x in (5,6): + add('50950',C.MEDIUM_AZURE,x,2,19/3) + # Front bumper, grille and headlamps built on side-facing studs. + fascia=add('30414',C.BLUE,5,2,3) + for i,stud in enumerate(fascia.find_connectors('stud',facing=bl.Direction.FRONT)): + pid='6141' if i in (0,3) else '3069b' + if i in (0,3): + e=bl.Element(pid,C.TRANS_ORANGE) + b.connect(e,'antistud',to=stud) + grille=bl.Element('3069b',C.WHITE) + b.connect(grille,grille.find_connector('antistud',toward=bl.Direction.RIGHT),to=fascia.find_connectors('stud',facing=bl.Direction.FRONT)[1],target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90)) + # Giant roof cone: narrow waffle tip, flared tan cone, strawberry scoop. + tip=add('3003',C.MEDIUM_NOUGAT,6,8,19/3,name='giant_cone_tip') + add('3660b',C.TAN,6,7,22/3) + add('3660b',C.TAN,6,9,22/3,bl.Rotation.DEG_180) + for x in (5,7): + for y in (7,9): + add('3003',C.BRIGHT_PINK,x,y,25/3) + for x in (5,7): + add('3039',C.MAGENTA,x,7,28/3) + add('3039',C.MAGENTA,x,9,28/3,bl.Rotation.DEG_180) + add('30367c',C.WHITE,6,8,31/3,name='roof_vanilla_swirl') + # Brick-built customer, standing beside the hatch and facing the viewer. + van_offset = 0 + for x in (12,14): + add('3004',C.DARK_BLUE,x,8,1/3,bl.Rotation.DEG_90) + add('3005',C.MEDIUM_NOUGAT,x,9,4/3) + add('3010',C.ORANGE,12,9,7/3,name='customer_torso') + add('3004',C.ORANGE,13,9,10/3) + add('3003',C.MEDIUM_NOUGAT,13,8,13/3) + face=add('99206',C.LIGHT_BLUISH_GRAY,13,8,16/3,name='customer_face') + for stud in face.find_connectors('stud',facing=bl.Direction.FRONT): + eye=bl.Element('98138p07',C.WHITE) + b.connect(eye,'antistud',to=stud) + for x in (13,14): + add('3040b',C.REDDISH_BROWN,x,8,6) + # Outstretched arm and the little vanilla cone in the customer's hand. + add('3004',C.MEDIUM_NOUGAT,11,9,10/3,name='customer_arm') + add('3062b',C.DARK_ORANGE,11,9,13/3,name='small_cone') + scoop=bl.Element('30367c',C.WHITE) + handcone=b.named('small_cone') + b.connect(scoop,'tube',to=handcone.find_connector('stud',facing=bl.Direction.UP),name='small_scoop') + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + available=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):v for k,v in used.items() if v>available.get(k[0],{}).get(k[1],0)} + tests.check('inventory limits',not excess,str(excess)) + tests.check('four wheels',sum(v for (pid,c),v in used.items() if pid=='87697')==4) + tests.check('roof cone and handheld cone',all(n in b.names for n in ('giant_cone_tip','small_cone','small_scoop'))) + # No solid wall crosses the service opening above its tiled sill. + opening=(8.05,8.95,8.1,11.9,5.1,6.25) + blockers=[] + for p in b.flattened_placements: + lo,hi=p.bounding_box + if (lo.xopening[0] and lo.yopening[2] and lo.zopening[4]): + blockers.append(p.content.ldraw_id) + tests.check('open serving hatch',not blockers,str(blockers)) + tests.check('giant cone above roof',b.named('giant_cone_tip').bounding_box[0].z>6 and b.named('roof_vanilla_swirl').bounding_box[1].z>11) + tests.check('small cone in hand',abs(b.named('small_cone').bounding_box[0].z-b.named('customer_arm').alignment_box[1].z)<0.01) + tests.check('customer beside van',b.named('customer_torso').bounding_box[0].x>b.named('chassis').bounding_box[1].x) + return tests.report() diff --git a/brickwright/alt/alt-011/hero-1024.avif b/brickwright/alt/alt-011/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..dbfcca2d4fa2b8ef10ea85a06343925fad3b420a Binary files /dev/null and b/brickwright/alt/alt-011/hero-1024.avif differ diff --git a/brickwright/alt/alt-011/model.mpd b/brickwright/alt/alt-011/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..445d5bf64f6de55c3e39c99c23758e1c3ee3774b --- /dev/null +++ b/brickwright/alt/alt-011/model.mpd @@ -0,0 +1,90 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 0 130 -32 120 1 0 0 0 1 0 0 0 1 3002.dat +1 19 140 -40 120 1 0 0 0 1 0 0 0 1 3022.dat +1 19 140 -48 120 1 0 0 0 1 0 0 0 1 3020.dat +1 0 130 -32 200 1 0 0 0 1 0 0 0 1 3002.dat +1 19 140 -40 200 1 0 0 0 1 0 0 0 1 3022.dat +1 19 140 -48 200 1 0 0 0 1 0 0 0 1 3020.dat +1 72 140 -56 160 0 0 -1 0 1 0 1 0 0 3029.dat +1 0 140 -48 70 1 0 0 0 1 0 0 0 1 2926.dat +1 14 190 -43 70 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 196 -43 70 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 90 -43 70 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 84 -43 70 0 0 -1 1 0 0 0 -1 0 87697.dat +1 0 140 -48 230 1 0 0 0 1 0 0 0 1 2926.dat +1 14 190 -43 230 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 196 -43 230 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 90 -43 230 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 84 -43 230 0 0 -1 1 0 0 0 -1 0 87697.dat +1 27 140 -80 60 1 0 0 0 1 0 0 0 1 3001.dat +1 27 140 -80 100 1 0 0 0 1 0 0 0 1 3001.dat +1 27 140 -80 140 1 0 0 0 1 0 0 0 1 3001.dat +1 27 140 -80 180 1 0 0 0 1 0 0 0 1 3001.dat +1 27 140 -80 220 1 0 0 0 1 0 0 0 1 3001.dat +1 27 140 -80 260 1 0 0 0 1 0 0 0 1 3001.dat +1 29 140 -104 100 1 0 0 0 1 0 0 0 1 3001.dat +1 29 140 -104 140 1 0 0 0 1 0 0 0 1 3001.dat +1 29 140 -104 180 1 0 0 0 1 0 0 0 1 3001.dat +1 29 140 -104 220 1 0 0 0 1 0 0 0 1 3001.dat +1 29 140 -104 70 1 0 0 0 1 0 0 0 1 3010.dat +1 29 140 -104 250 1 0 0 0 1 0 0 0 1 3010.dat +1 29 140 -104 270 1 0 0 0 1 0 0 0 1 3010.dat +1 47 120 -128 70 1 0 0 0 1 0 0 0 1 3039.dat +1 47 160 -128 70 1 0 0 0 1 0 0 0 1 3039.dat +1 15 110 -152 100 0 0 -1 0 1 0 1 0 0 60592.dat +1 15 170 -152 100 0 0 -1 0 1 0 1 0 0 60592.dat +1 226 140 -128 270 1 0 0 0 1 0 0 0 1 3010.dat +1 226 110 -128 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 19 110 -128 230 0 0 -1 0 1 0 1 0 0 3622.dat +1 29 170 -128 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 29 170 -128 250 1 0 0 0 1 0 0 0 1 3005.dat +1 226 140 -152 270 1 0 0 0 1 0 0 0 1 3010.dat +1 226 110 -152 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 19 110 -152 230 0 0 -1 0 1 0 1 0 0 3622.dat +1 29 170 -152 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 29 170 -152 250 1 0 0 0 1 0 0 0 1 3005.dat +1 226 140 -152 50 1 0 0 0 1 0 0 0 1 3010.dat +1 29 110 -152 70 1 0 0 0 1 0 0 0 1 3005.dat +1 29 170 -152 70 1 0 0 0 1 0 0 0 1 3005.dat +1 322 180 -112 200 0 0 -1 0 1 0 1 0 0 3020.dat +1 71 180 -120 200 0 0 -1 0 1 0 1 0 0 87079.dat +1 1 140 -160 80 1 0 0 0 1 0 0 0 1 3031.dat +1 1 140 -160 160 1 0 0 0 1 0 0 0 1 3031.dat +1 1 140 -160 240 1 0 0 0 1 0 0 0 1 3031.dat +1 15 170 -184 170 0 0 -1 0 1 0 1 0 0 3040b.dat +1 322 170 -184 190 0 0 -1 0 1 0 1 0 0 3040b.dat +1 15 170 -184 210 0 0 -1 0 1 0 1 0 0 3040b.dat +1 322 170 -184 230 0 0 -1 0 1 0 1 0 0 3040b.dat +1 322 110 -184 70 1 0 0 0 1 0 0 0 1 50950.dat +1 322 130 -184 70 1 0 0 0 1 0 0 0 1 50950.dat +1 1 140 -104 50 1 0 0 0 1 0 0 0 1 30414.dat +1 57 110 -94 32 1 0 0 0 0 -1 0 1 0 6141.dat +1 57 170 -94 32 1 0 0 0 0 -1 0 1 0 6141.dat +1 15 140 -94 32 1 0 0 0 0 -1 0 1 0 3069b.dat +1 84 140 -184 180 1 0 0 0 1 0 0 0 1 3003.dat +1 19 140 -208 170 1 0 0 0 1 0 0 0 1 3660b.dat +1 19 140 -208 190 -1 0 0 0 1 0 0 0 -1 3660b.dat +1 29 120 -232 160 1 0 0 0 1 0 0 0 1 3003.dat +1 29 120 -232 200 1 0 0 0 1 0 0 0 1 3003.dat +1 29 160 -232 160 1 0 0 0 1 0 0 0 1 3003.dat +1 29 160 -232 200 1 0 0 0 1 0 0 0 1 3003.dat +1 26 120 -256 170 1 0 0 0 1 0 0 0 1 3039.dat +1 26 120 -256 190 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 160 -256 170 1 0 0 0 1 0 0 0 1 3039.dat +1 26 160 -256 190 -1 0 0 0 1 0 0 0 -1 3039.dat +1 15 140 -280 180 1 0 0 0 1 0 0 0 1 30367c.dat +1 272 250 -32 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 250 -56 190 1 0 0 0 1 0 0 0 1 3005.dat +1 272 290 -32 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 290 -56 190 1 0 0 0 1 0 0 0 1 3005.dat +1 25 280 -80 190 1 0 0 0 1 0 0 0 1 3010.dat +1 25 280 -104 190 1 0 0 0 1 0 0 0 1 3004.dat +1 84 280 -128 180 1 0 0 0 1 0 0 0 1 3003.dat +1 71 280 -144 170 1 0 0 0 1 0 0 0 1 99206.dat +1 15 270 -138 152 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 290 -138 152 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 70 270 -168 190 1 0 0 0 1 0 0 0 1 3040b.dat +1 70 290 -168 190 1 0 0 0 1 0 0 0 1 3040b.dat +1 84 240 -104 190 1 0 0 0 1 0 0 0 1 3004.dat +1 484 230 -128 190 1 0 0 0 1 0 0 0 1 3062b.dat +1 15 230 -152 190 1 0 0 0 1 0 0 0 1 30367c.dat diff --git a/brickwright/alt/alt-011/thumb-512.avif b/brickwright/alt/alt-011/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..69c6b6f1f16cf1b0cf843714935970206c0f90ea Binary files /dev/null and b/brickwright/alt/alt-011/thumb-512.avif differ diff --git a/brickwright/alt/alt-011/trace.jsonl.gz b/brickwright/alt/alt-011/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..dfc3839af013ac96a61c4ca4d088324b222211bd --- /dev/null +++ b/brickwright/alt/alt-011/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e2a0b7bde9891ee9afe973d0a57f6da8bf5eb64f7b589cf72f1f2b9ad637806 +size 8183 diff --git a/brickwright/alt/alt-011/view-0.avif b/brickwright/alt/alt-011/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..1292fc8265d32f7262c60acf2113a536ad5325d8 Binary files /dev/null and b/brickwright/alt/alt-011/view-0.avif differ diff --git a/brickwright/alt/alt-011/view-1.avif b/brickwright/alt/alt-011/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..137c8bfbaa6f41c53a8a419d9d4234cd36d3118c Binary files /dev/null and b/brickwright/alt/alt-011/view-1.avif differ diff --git a/brickwright/alt/alt-011/view-2.avif b/brickwright/alt/alt-011/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..4cd20639d2765386afcf43d2d15f751529547fc8 Binary files /dev/null and b/brickwright/alt/alt-011/view-2.avif differ diff --git a/brickwright/alt/alt-011/view-3.avif b/brickwright/alt/alt-011/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..2015f7e55f8097168dcdbe119dac2ab8a51443d5 Binary files /dev/null and b/brickwright/alt/alt-011/view-3.avif differ diff --git a/brickwright/alt/alt-011/view-4.avif b/brickwright/alt/alt-011/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..c1914337a8e86ee0b2638bb4a527f5690c342832 Binary files /dev/null and b/brickwright/alt/alt-011/view-4.avif differ diff --git a/brickwright/alt/alt-011/view-5.avif b/brickwright/alt/alt-011/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..dccdd2614a89504d95e8dce7c6acb0abe726cdd0 Binary files /dev/null and b/brickwright/alt/alt-011/view-5.avif differ diff --git a/brickwright/alt/alt-011/view-6.avif b/brickwright/alt/alt-011/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..35cccdced3df823919a2472721eeef133980e951 Binary files /dev/null and b/brickwright/alt/alt-011/view-6.avif differ diff --git a/brickwright/alt/alt-011/view-7.avif b/brickwright/alt/alt-011/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..388bb8fbc400ef5423b587be8d6ca6554a21d073 Binary files /dev/null and b/brickwright/alt/alt-011/view-7.avif differ diff --git a/brickwright/alt/alt-012/build.py b/brickwright/alt/alt-012/build.py new file mode 100644 index 0000000000000000000000000000000000000000..a5fb6cd12fecfc1080fde40177b6554bece16adc --- /dev/null +++ b/brickwright/alt/alt-012/build.py @@ -0,0 +1,105 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid, color, x, y, z, rot=0, name=None): + return b.add(bl.Element(pid, getattr(bl.Color,color)), (x,y,z), bl.Rotation(rot), name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='grass') + # Chassis anchored unobtrusively to the campsite, with four real wheels. + for y in (4,11): + put('3004','BLACK',3,y,1/3) + put('3023b','ORANGE',3,y,4/3) + axle=put('2926','BLACK',2,y,5/3) + for c in axle.find_connectors('hinge_3_in'): + wheel=b.connect(bl.Element('6014b',bl.Color.YELLOW),'hinge_3_on',to=c) + tyre=bl.Element('87697',bl.Color.BLACK) + b.connect(tyre,tyre.find_connector('fixed_13_on',facing=bl.Direction.BACK),to=wheel.find_connector('fixed_13_in',toward=bl.Direction.FRONT)) + original_put = put + def put(pid,color,x,y,z,rot=0,name=None): + return original_put(pid,color,x,y,z+1/3,rot,name) + put('3029','DARK_BLUISH_GRAY',2,2,5/3,1,'chassis') + # Azure lower body, hollow cabin and contrasting window pillars. + for y in (2,12): + put('3001','MEDIUM_AZURE',2,y,2) + for x in (2,5): + for y in (4,8): + put('3010','MEDIUM_AZURE',x,y,2,1) + for x in (2,4): + put('3065','TRANS_CLEAR',x,2,3) + put('3039','TRANS_CLEAR',x,2,4) + for x in (2,5): + for y in (6,10): + put('3245c','LIGHT_BLUISH_GRAY',x,y,3,1) + for y in (4,8): + put('60592','WHITE' if x==5 else 'BLACK',x,y,3,1) + for z in (3,4): + put('3001','MEDIUM_AZURE',2,12,z) + # Front bumper, rear bumper and a small door step. + put('3020','TAN',2,1,4/3) + put('2431','LIGHT_BLUISH_GRAY',2,1,5/3) + put('3020','TAN',2,13,4/3) + put('2431','LIGHT_BLUISH_GRAY',2,14,5/3) + original_put('3022','TAN',6,6,1/3) + original_put('3068b','DARK_TAN',6,6,2/3) + for x in (2,4): + put('3034','LIGHT_BLUISH_GRAY',x,4,5,1) + put('3020','MEDIUM_AZURE',2,2,5) + put('3020','MEDIUM_AZURE',2,12,5) + # Roof racks and a long, green-decked, tan-ended surfboard. + for y in (5,10): + put('3023b','TAN',3,y,16/3) + put('3795','REDDISH_BROWN',3,5,17/3,1,'surfboard') + for x in (3,4): + put('3040b','TAN',x,4,6) + put('2431','GREEN',x,6,6,1) + put('3040b','TAN',x,10,6,2) + put = original_put + # A long timber bench between the van and fire. + for x in (8,9): + put('3010','REDDISH_BROWN',x,6,1/3,1,name='log_'+str(x)) + put('3003','BLUE',8,7,4/3) + for y in (7,8): + put('3004','DARK_BLUE',10,y,4/3) + put('3003','ORANGE',9,7,7/3,name='person_torso') + for y in (7,8): + put('3005','YELLOW',9,y,10/3,name='person_head' if y==7 else None) + face=put('4070','GREEN',10,y,10/3,1) + eye=bl.Element('98138p07',bl.Color.WHITE) + b.connect(eye,'tube',to=face.find_connector('stud',facing=bl.Direction.LEFT)) + # Arms and hands resting beside the knees. + for y in (6,9): + put('3004','ORANGE',9,y,4/3) + put('3005','YELLOW',10,y,7/3) + put('3022','TAN',9,7,13/3) + # Firepit and several interlocking logs with translucent flame tips. + put('11212','DARK_BLUISH_GRAY',12,7,1/3,name='firepit') + for y in (7,9): + put('30136','DARK_ORANGE',12,y,2/3) + put('30136','DARK_ORANGE',13,7,5/3,1) + for x,y,z in ((12,7,5/3),(12,9,5/3),(13,8,8/3)): + put('6141','TRANS_ORANGE',x,y,z) + put('59900','TRANS_ORANGE',x,y,z+1/3) + # Small grass/flower tufts frame the scene. + for x,y in ((1,1),(13,13),(10,3)): + put('4727','BRIGHT_GREEN',x,y,1/3) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + stock=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):n for k,n in used.items() if n>stock.get(k[0],{}).get(k[1],0)} + tests.check('inventory limits',not excess,str(excess)) + tests.check('four wheels',sum(n for (pid,c),n in used.items() if pid=='87697')==4) + tests.check('surfboard on roof',b.named('surfboard').bounding_box[0].z>b.named('chassis').bounding_box[1].z+3) + tests.check('person between van and fire',b.named('chassis').center.x < b.named('person_torso').center.x < b.named('firepit').center.x) + return tests.report() diff --git a/brickwright/alt/alt-012/hero-1024.avif b/brickwright/alt/alt-012/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..cbc4185d5a958b7055e245062bd39ac4401db459 Binary files /dev/null and b/brickwright/alt/alt-012/hero-1024.avif differ diff --git a/brickwright/alt/alt-012/model.mpd b/brickwright/alt/alt-012/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..4ec76cc75d2009fe5be857177c86fc0516d502ff --- /dev/null +++ b/brickwright/alt/alt-012/model.mpd @@ -0,0 +1,85 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 0 80 -32 90 1 0 0 0 1 0 0 0 1 3004.dat +1 25 80 -40 90 1 0 0 0 1 0 0 0 1 3023b.dat +1 0 80 -48 90 1 0 0 0 1 0 0 0 1 2926.dat +1 14 30 -43 90 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 24 -43 90 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 130 -43 90 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 136 -43 90 0 0 -1 1 0 0 0 -1 0 87697.dat +1 0 80 -32 230 1 0 0 0 1 0 0 0 1 3004.dat +1 25 80 -40 230 1 0 0 0 1 0 0 0 1 3023b.dat +1 0 80 -48 230 1 0 0 0 1 0 0 0 1 2926.dat +1 14 30 -43 230 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 24 -43 230 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 130 -43 230 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 136 -43 230 0 0 -1 1 0 0 0 -1 0 87697.dat +1 72 80 -56 160 0 0 -1 0 1 0 1 0 0 3029.dat +1 322 80 -80 60 1 0 0 0 1 0 0 0 1 3001.dat +1 322 80 -80 260 1 0 0 0 1 0 0 0 1 3001.dat +1 322 50 -80 120 0 0 -1 0 1 0 1 0 0 3010.dat +1 322 50 -80 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 322 110 -80 120 0 0 -1 0 1 0 1 0 0 3010.dat +1 322 110 -80 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 47 60 -104 50 1 0 0 0 1 0 0 0 1 3065.dat +1 47 60 -128 70 1 0 0 0 1 0 0 0 1 3039.dat +1 47 100 -104 50 1 0 0 0 1 0 0 0 1 3065.dat +1 47 100 -128 70 1 0 0 0 1 0 0 0 1 3039.dat +1 71 50 -128 140 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 50 -128 220 0 0 -1 0 1 0 1 0 0 3245c.dat +1 0 50 -128 100 0 0 -1 0 1 0 1 0 0 60592.dat +1 0 50 -128 180 0 0 -1 0 1 0 1 0 0 60592.dat +1 71 110 -128 140 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 110 -128 220 0 0 -1 0 1 0 1 0 0 3245c.dat +1 15 110 -128 100 0 0 -1 0 1 0 1 0 0 60592.dat +1 15 110 -128 180 0 0 -1 0 1 0 1 0 0 60592.dat +1 322 80 -104 260 1 0 0 0 1 0 0 0 1 3001.dat +1 322 80 -128 260 1 0 0 0 1 0 0 0 1 3001.dat +1 19 80 -48 40 1 0 0 0 1 0 0 0 1 3020.dat +1 71 80 -56 30 1 0 0 0 1 0 0 0 1 2431.dat +1 19 80 -48 280 1 0 0 0 1 0 0 0 1 3020.dat +1 71 80 -56 290 1 0 0 0 1 0 0 0 1 2431.dat +1 19 140 -16 140 1 0 0 0 1 0 0 0 1 3022.dat +1 28 140 -24 140 1 0 0 0 1 0 0 0 1 3068b.dat +1 71 60 -136 160 0 0 -1 0 1 0 1 0 0 3034.dat +1 71 100 -136 160 0 0 -1 0 1 0 1 0 0 3034.dat +1 322 80 -136 60 1 0 0 0 1 0 0 0 1 3020.dat +1 322 80 -136 260 1 0 0 0 1 0 0 0 1 3020.dat +1 19 80 -144 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 80 -144 210 1 0 0 0 1 0 0 0 1 3023b.dat +1 70 80 -152 160 0 0 -1 0 1 0 1 0 0 3795.dat +1 19 70 -176 110 1 0 0 0 1 0 0 0 1 3040b.dat +1 2 70 -160 160 0 0 -1 0 1 0 1 0 0 2431.dat +1 19 70 -176 210 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 19 90 -176 110 1 0 0 0 1 0 0 0 1 3040b.dat +1 2 90 -160 160 0 0 -1 0 1 0 1 0 0 2431.dat +1 19 90 -176 210 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 70 170 -32 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 190 -32 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 1 180 -56 160 1 0 0 0 1 0 0 0 1 3003.dat +1 272 220 -56 150 1 0 0 0 1 0 0 0 1 3004.dat +1 272 220 -56 170 1 0 0 0 1 0 0 0 1 3004.dat +1 25 200 -80 160 1 0 0 0 1 0 0 0 1 3003.dat +1 14 190 -104 150 1 0 0 0 1 0 0 0 1 3005.dat +1 2 210 -104 150 0 0 -1 0 1 0 1 0 0 4070.dat +1 15 224 -94 150 0 -1 0 0 0 -1 1 0 0 98138p07.dat +1 14 190 -104 170 1 0 0 0 1 0 0 0 1 3005.dat +1 2 210 -104 170 0 0 -1 0 1 0 1 0 0 4070.dat +1 15 224 -94 170 0 -1 0 0 0 -1 1 0 0 98138p07.dat +1 25 200 -56 130 1 0 0 0 1 0 0 0 1 3004.dat +1 14 210 -80 130 1 0 0 0 1 0 0 0 1 3005.dat +1 25 200 -56 190 1 0 0 0 1 0 0 0 1 3004.dat +1 14 210 -80 190 1 0 0 0 1 0 0 0 1 3005.dat +1 19 200 -112 160 1 0 0 0 1 0 0 0 1 3022.dat +1 72 270 -16 170 1 0 0 0 1 0 0 0 1 11212.dat +1 484 260 -40 150 1 0 0 0 1 0 0 0 1 30136.dat +1 484 260 -40 190 1 0 0 0 1 0 0 0 1 30136.dat +1 484 270 -64 160 0 0 -1 0 1 0 1 0 0 30136.dat +1 57 250 -48 150 1 0 0 0 1 0 0 0 1 6141.dat +1 57 250 -72 150 1 0 0 0 1 0 0 0 1 59900.dat +1 57 250 -48 190 1 0 0 0 1 0 0 0 1 6141.dat +1 57 250 -72 190 1 0 0 0 1 0 0 0 1 59900.dat +1 57 270 -72 170 1 0 0 0 1 0 0 0 1 6141.dat +1 57 270 -96 170 1 0 0 0 1 0 0 0 1 59900.dat +1 10 30 -32 30 1 0 0 0 1 0 0 0 1 4727.dat +1 10 270 -32 270 1 0 0 0 1 0 0 0 1 4727.dat +1 10 210 -32 70 1 0 0 0 1 0 0 0 1 4727.dat diff --git a/brickwright/alt/alt-012/thumb-512.avif b/brickwright/alt/alt-012/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..86f48097948004d7bce6233dfbaa650de9b259c9 Binary files /dev/null and b/brickwright/alt/alt-012/thumb-512.avif differ diff --git a/brickwright/alt/alt-012/trace.jsonl.gz b/brickwright/alt/alt-012/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..df65cf6115c04057d4b3f65b64eb26d43229efa6 --- /dev/null +++ b/brickwright/alt/alt-012/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:728332261f008b06f4e627d28183df7235047037c9ec51b83e84b06a86e482fb +size 7601 diff --git a/brickwright/alt/alt-012/view-0.avif b/brickwright/alt/alt-012/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..6dc30d4b0ede4022ac5ed56a511d1a9746b3bb4e Binary files /dev/null and b/brickwright/alt/alt-012/view-0.avif differ diff --git a/brickwright/alt/alt-012/view-1.avif b/brickwright/alt/alt-012/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..c6db0272900b0abe0929c8fb696431b89a5609ea Binary files /dev/null and b/brickwright/alt/alt-012/view-1.avif differ diff --git a/brickwright/alt/alt-012/view-2.avif b/brickwright/alt/alt-012/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..9d4d1840a45566d01219d6d0d08810f2260416cd Binary files /dev/null and b/brickwright/alt/alt-012/view-2.avif differ diff --git a/brickwright/alt/alt-012/view-3.avif b/brickwright/alt/alt-012/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..adfbe6e44e2d1e8a175da40c74db3fc351a290b5 Binary files /dev/null and b/brickwright/alt/alt-012/view-3.avif differ diff --git a/brickwright/alt/alt-012/view-4.avif b/brickwright/alt/alt-012/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..d6099924fd398ce94cda3f7455e27b6a99e1e0c7 Binary files /dev/null and b/brickwright/alt/alt-012/view-4.avif differ diff --git a/brickwright/alt/alt-012/view-5.avif b/brickwright/alt/alt-012/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..83f31bc5b1df3dbd8b1ba655047cfcde35afccad Binary files /dev/null and b/brickwright/alt/alt-012/view-5.avif differ diff --git a/brickwright/alt/alt-012/view-6.avif b/brickwright/alt/alt-012/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..af799afd0ecee1bc30e0a01e78d1443bbf99be40 Binary files /dev/null and b/brickwright/alt/alt-012/view-6.avif differ diff --git a/brickwright/alt/alt-012/view-7.avif b/brickwright/alt/alt-012/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..79d2cbad1f5be6ef2eb8792061f8fffdf85a7bf7 Binary files /dev/null and b/brickwright/alt/alt-012/view-7.avif differ diff --git a/brickwright/alt/alt-013/build.py b/brickwright/alt/alt-013/build.py new file mode 100644 index 0000000000000000000000000000000000000000..fbe1c03733e4ba8a3354a1b77eae2c821f3d5c3b --- /dev/null +++ b/brickwright/alt/alt-013/build.py @@ -0,0 +1,85 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + +C=bl.Color + +def create_build(): + b=bl.LegoBuild() + def add(pid,col,pos,rot=bl.Rotation.DEG_0,name=None): + return b.add(bl.Element(pid,col),pos,rotation=rot,name=name) + # Compact four-wheel chassis. The wheels use the inventory's matching hubs and tyres. + for y in (1,9): + axle=add('2926',C.BLACK,(0,y,1),name='axle_'+str(y)) + for side in (bl.Direction.LEFT,bl.Direction.RIGHT): + rim=b.connect(bl.Element('6014b',C.YELLOW),'hinge_3_on',to=axle.find_connector('hinge_3_in',facing=side)) + tyre=bl.Element('87697',C.BLACK) + b.connect(tyre,tyre.find_connector('fixed_13_on',facing=bl.Direction.BACK),to=rim.find_connector('fixed_13_in',toward=bl.Direction.BACK)) + add('3029',C.DARK_BLUISH_GRAY,(0,0,4/3),bl.Rotation.DEG_90,'chassis') + for x in (0,2): + add('2456',C.BLACK,(x,4,5/3),bl.Rotation.DEG_90) + add('3001',C.DARK_BLUISH_GRAY,(0,10,5/3)) + # Yellow cab, sloped bonnet and clear raked windscreen. + add('3001',C.YELLOW,(0,2,5/3)) + for x in (0,2): + add('3004',C.ORANGE,(x,1,5/3)) + add('3037',C.YELLOW,(0,0,8/3)) + add('3001',C.YELLOW,(0,2,8/3)) + for x in (0,2): + add('3039',C.TRANS_CLEAR,(x,1,11/3)) + add('3010',C.BRIGHT_LIGHT_YELLOW,(0,3,11/3)) + add('3032',C.YELLOW,(-1,1,14/3),name='cab_roof') + add('59900',C.TRANS_ORANGE,(0,2,5),name='beacon_left') + add('59900',C.TRANS_ORANGE,(3,2,5),name='beacon_right') + # Front grille / bumper at the nose. + for x in (0,2): + add('2877',C.WHITE,(x,0,5/3)) + # Tall exhaust behind the cab, well clear of the elevated load body. + add('3245c',C.LIGHT_BLUISH_GRAY,(3,4,8/3),bl.Rotation.DEG_90,'exhaust_stack') + + # Ratcheting hinge at the rear: locked at a 45 degree tipping angle. + pivot=add('92582',C.BLACK,(1,10,8/3),bl.Rotation.DEG_90,'bed_pivot') + bed=bl.LegoBuild() + hinge=bed.add(bl.Element('60471',C.BLACK),(1,7,0),rotation=bl.Rotation.DEG_180,name='hinge') + for x in (0,2): + bed.add(bl.Element('3034',C.LIGHT_BLUISH_GRAY),(x,0,1/3),rotation=bl.Rotation.DEG_90) + # Open rear, high solid front bulkhead and orange sideboards. + for x in (0,3): + for y in (0,4): + bed.add(bl.Element('3010',C.ORANGE),(x,y,2/3),rotation=bl.Rotation.DEG_90) + bed.add(bl.Element('3004',C.ORANGE),(1,0,2/3)) + bed.add(bl.Element('3010',C.BRIGHT_LIGHT_YELLOW),(0,0,5/3)) + # Two rough grey rocks retained at the low discharge end. + bed.add(bl.Element('3004',C.LIGHT_BLUISH_GRAY),(1,5,2/3),name='load_rock_a') + bed.add(bl.Element('3676',C.DARK_BLUISH_GRAY),(1,6,2/3),name='load_rock_b') + b.connect(bed,hinge.find_connector('hinge_2_on'),to=pivot.find_connector('hinge_2_in'),mounting=bl.Mounting(angle=135),name='raised_bed') + b=bl.translate_to_ground(b) + # Spilled rubble: a broad, interlocked, irregular mound behind the truck. + add('3001',C.DARK_BLUISH_GRAY,(0,13,0),name='pile_base_a') + add('3003',C.DARK_TAN,(1,15,0),name='pile_base_b') + add('85080',C.LIGHT_BLUISH_GRAY,(-1,15,0),name='pile_round_left') + add('85080',C.LIGHT_BLUISH_GRAY,(3,15,0),bl.Rotation.DEG_90,'pile_round_right') + add('3001',C.LIGHT_BLUISH_GRAY,(0,14,1),name='pile_bridge') + add('3004',C.LIGHT_BLUISH_GRAY,(0,16,1),name='pile_tie_left') + add('3004',C.LIGHT_BLUISH_GRAY,(2,16,1),name='pile_tie_right') + add('3676',C.DARK_BLUISH_GRAY,(1,16,2),bl.Rotation.DEG_180,'pile_back_rock') + add('3676',C.DARK_BLUISH_GRAY,(1,14,2),name='pile_top') + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=2) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):n for k,n in used.items() if n>inventory.get(k[0],{}).get(k[1],0)} + tests.check('Inventory limits',not excess,str(excess)) + tests.check('Four tyres',used[('87697','BLACK')]==4) + bed=b.named('raised_bed') + tests.check('Bed visibly tipped',bed.height>5 and bed.pose.rotation.entries[2][1]!=0) + tests.check('Rocks at low end and behind truck',all(n in b.names for n in ['pile_base_a','pile_base_b','pile_top']) and 'load_rock_b' in bed.content.names) + return tests.report() diff --git a/brickwright/alt/alt-013/hero-1024.avif b/brickwright/alt/alt-013/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..190534f2f2c7c2f5389842d547c9850d36bd1606 Binary files /dev/null and b/brickwright/alt/alt-013/hero-1024.avif differ diff --git a/brickwright/alt/alt-013/model.mpd b/brickwright/alt/alt-013/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..4ad5d32e42ced4483e829941d72914a3d99bcd70 --- /dev/null +++ b/brickwright/alt/alt-013/model.mpd @@ -0,0 +1,56 @@ +0 FILE main.ldr +0 main +0 Name: main +1 0 40 -30 30 1 0 0 0 1 0 0 0 1 2926.dat +1 14 90 -25 30 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 96 -25 30 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 -10 -25 30 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 -16 -25 30 0 0 -1 1 0 0 0 -1 0 87697.dat +1 0 40 -30 190 1 0 0 0 1 0 0 0 1 2926.dat +1 14 90 -25 190 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 96 -25 190 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 -10 -25 190 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 -16 -25 190 0 0 -1 1 0 0 0 -1 0 87697.dat +1 72 40 -38 120 0 0 -1 0 1 0 1 0 0 3029.dat +1 0 20 -62 140 0 0 -1 0 1 0 1 0 0 2456.dat +1 0 60 -62 140 0 0 -1 0 1 0 1 0 0 2456.dat +1 72 40 -62 220 1 0 0 0 1 0 0 0 1 3001.dat +1 14 40 -62 60 1 0 0 0 1 0 0 0 1 3001.dat +1 25 20 -62 30 1 0 0 0 1 0 0 0 1 3004.dat +1 25 60 -62 30 1 0 0 0 1 0 0 0 1 3004.dat +1 14 40 -86 30 1 0 0 0 1 0 0 0 1 3037.dat +1 14 40 -86 60 1 0 0 0 1 0 0 0 1 3001.dat +1 47 20 -110 50 1 0 0 0 1 0 0 0 1 3039.dat +1 47 60 -110 50 1 0 0 0 1 0 0 0 1 3039.dat +1 226 40 -110 70 1 0 0 0 1 0 0 0 1 3010.dat +1 14 40 -118 60 1 0 0 0 1 0 0 0 1 3032.dat +1 57 10 -142 50 1 0 0 0 1 0 0 0 1 59900.dat +1 57 70 -142 50 1 0 0 0 1 0 0 0 1 59900.dat +1 15 20 -62 10 1 0 0 0 1 0 0 0 1 2877.dat +1 15 60 -62 10 1 0 0 0 1 0 0 0 1 2877.dat +1 71 70 -110 100 0 0 -1 0 1 0 1 0 0 3245c.dat +1 0 40 -70 220 0 0 -1 0 1 0 1 0 0 92582.dat +1 16 0 -191.965512 105.549207 1 0 0 0 0.707107 0.707107 0 -0.707107 0.707107 raised_bed.ldr +1 72 40 -24 280 1 0 0 0 1 0 0 0 1 3001.dat +1 28 40 -24 320 1 0 0 0 1 0 0 0 1 3003.dat +1 71 -10 -24 330 1 0 0 0 1 0 0 0 1 85080.dat +1 71 70 -24 310 0 0 -1 0 1 0 1 0 0 85080.dat +1 71 40 -48 300 1 0 0 0 1 0 0 0 1 3001.dat +1 71 20 -48 330 1 0 0 0 1 0 0 0 1 3004.dat +1 71 60 -48 330 1 0 0 0 1 0 0 0 1 3004.dat +1 72 50 -72 330 -1 0 0 0 1 0 0 0 -1 3676.dat +1 72 30 -72 310 1 0 0 0 1 0 0 0 1 3676.dat +0 FILE raised_bed.ldr +0 raised_bed +0 Name: raised_bed +1 0 40 -8 150 -1 0 0 0 1 0 0 0 -1 60471.dat +1 71 20 -16 80 0 0 -1 0 1 0 1 0 0 3034.dat +1 71 60 -16 80 0 0 -1 0 1 0 1 0 0 3034.dat +1 25 10 -40 40 0 0 -1 0 1 0 1 0 0 3010.dat +1 25 10 -40 120 0 0 -1 0 1 0 1 0 0 3010.dat +1 25 70 -40 40 0 0 -1 0 1 0 1 0 0 3010.dat +1 25 70 -40 120 0 0 -1 0 1 0 1 0 0 3010.dat +1 25 40 -40 10 1 0 0 0 1 0 0 0 1 3004.dat +1 226 40 -64 10 1 0 0 0 1 0 0 0 1 3010.dat +1 71 40 -40 110 1 0 0 0 1 0 0 0 1 3004.dat +1 72 30 -40 150 1 0 0 0 1 0 0 0 1 3676.dat diff --git a/brickwright/alt/alt-013/thumb-512.avif b/brickwright/alt/alt-013/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..666db81acf6872536dae61feb1f424d9b6804fcb Binary files /dev/null and b/brickwright/alt/alt-013/thumb-512.avif differ diff --git a/brickwright/alt/alt-013/trace.jsonl.gz b/brickwright/alt/alt-013/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..c008798fc42d77e290da260a0e534fe5d8335cdc --- /dev/null +++ b/brickwright/alt/alt-013/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f839ad5013446d3edc4d543bc452dd991d8a7c9e7935534239b393b8b41be639 +size 8246 diff --git a/brickwright/alt/alt-013/view-0.avif b/brickwright/alt/alt-013/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..41914d9cc1a3c8c454c26bae6a48c628738c6f43 Binary files /dev/null and b/brickwright/alt/alt-013/view-0.avif differ diff --git a/brickwright/alt/alt-013/view-1.avif b/brickwright/alt/alt-013/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..8a01c0875b42b1766256c91df8f85a8e53782a56 Binary files /dev/null and b/brickwright/alt/alt-013/view-1.avif differ diff --git a/brickwright/alt/alt-013/view-2.avif b/brickwright/alt/alt-013/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..cb8af270a37e807cfdaa006625c00f2b9f57e551 Binary files /dev/null and b/brickwright/alt/alt-013/view-2.avif differ diff --git a/brickwright/alt/alt-013/view-3.avif b/brickwright/alt/alt-013/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..5d76fd849b7f875aac4c5328341702dbbbed68a2 Binary files /dev/null and b/brickwright/alt/alt-013/view-3.avif differ diff --git a/brickwright/alt/alt-013/view-4.avif b/brickwright/alt/alt-013/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..58425cc1509435757b3c97787e0eb44356ae2ae5 Binary files /dev/null and b/brickwright/alt/alt-013/view-4.avif differ diff --git a/brickwright/alt/alt-013/view-5.avif b/brickwright/alt/alt-013/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..51c2a066e5f914165b79c6a2ebcd0ea2dc6b8797 Binary files /dev/null and b/brickwright/alt/alt-013/view-5.avif differ diff --git a/brickwright/alt/alt-013/view-6.avif b/brickwright/alt/alt-013/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..1fddcd1b57575acb88c7cd93916628ca5ee17cc3 Binary files /dev/null and b/brickwright/alt/alt-013/view-6.avif differ diff --git a/brickwright/alt/alt-013/view-7.avif b/brickwright/alt/alt-013/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..f32bdd5d5a5f1338c3f42d93b9b42813051969a9 Binary files /dev/null and b/brickwright/alt/alt-013/view-7.avif differ diff --git a/brickwright/alt/alt-014/build.py b/brickwright/alt/alt-014/build.py new file mode 100644 index 0000000000000000000000000000000000000000..550ae35218935c88f66963c3bfcc4f4f1a0f674f --- /dev/null +++ b/brickwright/alt/alt-014/build.py @@ -0,0 +1,100 @@ +import json +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + C=bl.Color + def add(pid,c,x,y,z,r=0,name=None): + return b.add(bl.Element(pid,c),(x,y,z),rotation=bl.Rotation(r),name=name) + # Shore and discreet blue water/support plates below the ferry. + add('3028',C.BRIGHT_GREEN,-2,-6,0,name='shore') + for y in (0,4): add('3031',C.BLUE,2,y,0) + for y in (12,14): add('3034',C.LIGHT_BLUISH_GRAY,0,y,0) + for x in (0,4): + add('3001',C.DARK_TAN,x,-5,1/3) + add('3001',C.TAN,x,-3,1/3) + for x in (0,2,4,6): add('3068b',C.DARK_TAN,x,-5,4/3) + # Interlocked broad pontoon hull, with a full drive-through deck. + colors=[C.BLUE]*6+[C.DARK_AZURE]*4+[C.MEDIUM_AZURE]*4+[C.LIGHT_BLUISH_GRAY]*2 + for k,(y,x) in enumerate((y,x) for y in range(0,16,2) for x in (0,4)): + add('3001',colors[k],x,y,1/3) + add('3029',C.DARK_BLUISH_GRAY,2,1,4/3,1,name='vehicle_deck') + for x in (0,6): + for y in (1,5): add('87079',C.LIGHT_BLUISH_GRAY,x,y,4/3,1) + add('3020',C.MEDIUM_AZURE,x,9,4/3,1) + add('3023b',C.TAN,x,0,4/3) + add('3032',C.YELLOW,0,13,4/3) + add('3020',C.TAN,6,13,4/3,1) + # Deployed loading bridge: overlaps the quayside and the bow by a stud. + add('3031',C.BLUE,2,-3,4/3,name='landing_ramp') + for x in (0,6): + add('3004',C.ORANGE,x,-2,4/3) + add('6141',C.TRANS_ORANGE,x,-2,7/3) + # Deck edge rails leave the car and loading entrance unobstructed. + for x in (0,7): + add('15332',C.WHITE,x,9,5/3,1) + # Elevated stern wheelhouse, supported on four piers. + for x in (1,6): + for y in (13,15): + add('3245c',C.LIGHT_BLUISH_GRAY,x,y,5/3,1) + for x in (1,4): + add('3002',C.BLACK,x,13,11/3) + add('3002',C.BLACK,x,15,11/3) + add('3795',C.REDDISH_BROWN,1,13,14/3) + add('3795',C.REDDISH_BROWN,1,15,14/3) + for x in (1,3,5): add('60592',C.WHITE,x,13,5,name='front_window_'+str(x)) + for x in (1,6): + add('3065',C.TRANS_CLEAR,x,14,5,1) + add('3004',C.WHITE,x,14,6,1) + for x in (1,3,5): + add('3004',C.LIGHT_BLUISH_GRAY,x,16,5) + add('3004',C.LIGHT_BLUISH_GRAY,x,16,6) + add('3031',C.BRIGHT_GREEN,1,13,7,name='cabin_roof') + add('3020',C.TAN,5,13,7,1) + # Blue roof finish and navigation beacon. + for x in (1,6): add('3710',C.BLUE,x,13,22/3,1) + add('3710',C.BLUE,2,16,22/3) + add('3941',C.TRANS_ORANGE,3,14,22/3) + add('3957b',C.LIGHT_BLUISH_GRAY,6,16,23/3) + # Red compact car, secured to a hidden parking cradle. + add('3003',C.DARK_RED,3,5,5/3) + add('3022',C.TAN,3,5,8/3) + for x in (3,4): add('3460',C.MEDIUM_AZURE,x,2,3,1) + # Four real tyres and yellow wheel rims. + for y in (3,7): + axle=add('2926',C.BLACK,2,y,8/3,name='axle_'+str(y)) + for side,r in ((bl.Direction.RIGHT,bl.Rotation.DEG_270),(bl.Direction.LEFT,bl.Rotation.DEG_90)): + rim=b.connect(bl.Element('6014b',C.YELLOW),'hinge_3_on',to=axle.find_connector('hinge_3_in',facing=side),target_rotation=r) + tyre=bl.Element('87697',C.BLACK) + b.connect(tyre,tyre.find_connectors('fixed_13_on')[0],to=rim.find_connectors('fixed_13_in')[0],target_rotation=r) + for y in (2,4,6,8): add('3001',C.RED,2,y,10/3) + # Sloping transparent windscreen, rear glass, red hood and roof. + for x in (2,4): + add('3039',C.TRANS_CLEAR,x,4,13/3) + add('3039',C.BLUE,x,6,13/3,2) + add('30165',C.RED,x,2,13/3) + add('85984',C.RED,x,9,13/3,2) + add('3710',C.ORANGE,2,5,16/3) + add('3710',C.ORANGE,2,6,16/3) + for x in (2,5): add('54200',C.TRANS_RED,x,8,13/3,2) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + excess=[] + for e,n in b.list_elements().items(): + if n>inventory.get(e.ldraw_id,{}).get(e.color.name,0): excess.append((e.ldraw_id,e.color.name,n)) + tests.check('only supplied inventory',not excess,str(excess)) + tests.check('four car tyres',sum(n for e,n in b.list_elements().items() if e.ldraw_id=='87697')==4) + tests.check('raised stern cabin',b.named('front_window_3').bounding_box[0].z>b.named('vehicle_deck').bounding_box[1].z+3) + ramp=b.named('landing_ramp').bounding_box + tests.check('ramp overlaps shore and bow',ramp[0].y<0 and ramp[1].y>0) + return tests.report() diff --git a/brickwright/alt/alt-014/hero-1024.avif b/brickwright/alt/alt-014/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..acd6ed494236d71d9af10b342d0a0c672d81c500 Binary files /dev/null and b/brickwright/alt/alt-014/hero-1024.avif differ diff --git a/brickwright/alt/alt-014/model.mpd b/brickwright/alt/alt-014/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..f1f11a884f34afa70acf7e6564f479909b40b2f0 --- /dev/null +++ b/brickwright/alt/alt-014/model.mpd @@ -0,0 +1,107 @@ +1 10 80 -8 -60 1 0 0 0 1 0 0 0 1 3028.dat +1 1 80 -8 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 80 -8 120 1 0 0 0 1 0 0 0 1 3031.dat +1 71 80 -8 260 1 0 0 0 1 0 0 0 1 3034.dat +1 71 80 -8 300 1 0 0 0 1 0 0 0 1 3034.dat +1 28 40 -32 -80 1 0 0 0 1 0 0 0 1 3001.dat +1 19 40 -32 -40 1 0 0 0 1 0 0 0 1 3001.dat +1 28 120 -32 -80 1 0 0 0 1 0 0 0 1 3001.dat +1 19 120 -32 -40 1 0 0 0 1 0 0 0 1 3001.dat +1 28 20 -40 -80 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 60 -40 -80 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 100 -40 -80 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 140 -40 -80 1 0 0 0 1 0 0 0 1 3068b.dat +1 1 40 -32 20 1 0 0 0 1 0 0 0 1 3001.dat +1 1 120 -32 20 1 0 0 0 1 0 0 0 1 3001.dat +1 1 40 -32 60 1 0 0 0 1 0 0 0 1 3001.dat +1 1 120 -32 60 1 0 0 0 1 0 0 0 1 3001.dat +1 1 40 -32 100 1 0 0 0 1 0 0 0 1 3001.dat +1 1 120 -32 100 1 0 0 0 1 0 0 0 1 3001.dat +1 321 40 -32 140 1 0 0 0 1 0 0 0 1 3001.dat +1 321 120 -32 140 1 0 0 0 1 0 0 0 1 3001.dat +1 321 40 -32 180 1 0 0 0 1 0 0 0 1 3001.dat +1 321 120 -32 180 1 0 0 0 1 0 0 0 1 3001.dat +1 322 40 -32 220 1 0 0 0 1 0 0 0 1 3001.dat +1 322 120 -32 220 1 0 0 0 1 0 0 0 1 3001.dat +1 322 40 -32 260 1 0 0 0 1 0 0 0 1 3001.dat +1 322 120 -32 260 1 0 0 0 1 0 0 0 1 3001.dat +1 71 40 -32 300 1 0 0 0 1 0 0 0 1 3001.dat +1 71 120 -32 300 1 0 0 0 1 0 0 0 1 3001.dat +1 72 80 -40 140 0 0 -1 0 1 0 1 0 0 3029.dat +1 71 20 -40 60 0 0 -1 0 1 0 1 0 0 87079.dat +1 71 20 -40 140 0 0 -1 0 1 0 1 0 0 87079.dat +1 322 20 -40 220 0 0 -1 0 1 0 1 0 0 3020.dat +1 19 20 -40 10 1 0 0 0 1 0 0 0 1 3023b.dat +1 71 140 -40 60 0 0 -1 0 1 0 1 0 0 87079.dat +1 71 140 -40 140 0 0 -1 0 1 0 1 0 0 87079.dat +1 322 140 -40 220 0 0 -1 0 1 0 1 0 0 3020.dat +1 19 140 -40 10 1 0 0 0 1 0 0 0 1 3023b.dat +1 14 60 -40 300 1 0 0 0 1 0 0 0 1 3032.dat +1 19 140 -40 300 0 0 -1 0 1 0 1 0 0 3020.dat +1 1 80 -40 -20 1 0 0 0 1 0 0 0 1 3031.dat +1 25 20 -56 -30 1 0 0 0 1 0 0 0 1 3004.dat +1 57 10 -64 -30 1 0 0 0 1 0 0 0 1 6141.dat +1 25 140 -56 -30 1 0 0 0 1 0 0 0 1 3004.dat +1 57 130 -64 -30 1 0 0 0 1 0 0 0 1 6141.dat +1 15 10 -88 220 0 0 -1 0 1 0 1 0 0 15332.dat +1 15 150 -88 220 0 0 -1 0 1 0 1 0 0 15332.dat +1 71 30 -88 280 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 30 -88 320 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 130 -88 280 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 130 -88 320 0 0 -1 0 1 0 1 0 0 3245c.dat +1 0 50 -112 280 1 0 0 0 1 0 0 0 1 3002.dat +1 0 50 -112 320 1 0 0 0 1 0 0 0 1 3002.dat +1 0 110 -112 280 1 0 0 0 1 0 0 0 1 3002.dat +1 0 110 -112 320 1 0 0 0 1 0 0 0 1 3002.dat +1 70 80 -120 280 1 0 0 0 1 0 0 0 1 3795.dat +1 70 80 -120 320 1 0 0 0 1 0 0 0 1 3795.dat +1 15 40 -168 270 1 0 0 0 1 0 0 0 1 60592.dat +1 15 80 -168 270 1 0 0 0 1 0 0 0 1 60592.dat +1 15 120 -168 270 1 0 0 0 1 0 0 0 1 60592.dat +1 47 30 -144 300 0 0 -1 0 1 0 1 0 0 3065.dat +1 15 30 -168 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 47 130 -144 300 0 0 -1 0 1 0 1 0 0 3065.dat +1 15 130 -168 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 40 -144 330 1 0 0 0 1 0 0 0 1 3004.dat +1 71 40 -168 330 1 0 0 0 1 0 0 0 1 3004.dat +1 71 80 -144 330 1 0 0 0 1 0 0 0 1 3004.dat +1 71 80 -168 330 1 0 0 0 1 0 0 0 1 3004.dat +1 71 120 -144 330 1 0 0 0 1 0 0 0 1 3004.dat +1 71 120 -168 330 1 0 0 0 1 0 0 0 1 3004.dat +1 10 60 -176 300 1 0 0 0 1 0 0 0 1 3031.dat +1 19 120 -176 300 0 0 -1 0 1 0 1 0 0 3020.dat +1 1 30 -184 300 0 0 -1 0 1 0 1 0 0 3710.dat +1 1 130 -184 300 0 0 -1 0 1 0 1 0 0 3710.dat +1 1 80 -184 330 1 0 0 0 1 0 0 0 1 3710.dat +1 57 80 -200 300 1 0 0 0 1 0 0 0 1 3941.dat +1 71 130 -192 330 1 0 0 0 1 0 0 0 1 3957b.dat +1 320 80 -64 120 1 0 0 0 1 0 0 0 1 3003.dat +1 19 80 -72 120 1 0 0 0 1 0 0 0 1 3022.dat +1 322 70 -80 120 0 0 -1 0 1 0 1 0 0 3460.dat +1 322 90 -80 120 0 0 -1 0 1 0 1 0 0 3460.dat +1 0 80 -72 70 1 0 0 0 1 0 0 0 1 2926.dat +1 14 30 -67 70 0 0 1 0 1 0 -1 0 0 6014b.dat +1 0 24 -67 70 0 0 1 0 1 0 -1 0 0 87697.dat +1 14 130 -67 70 0 0 -1 0 1 0 1 0 0 6014b.dat +1 0 136 -67 70 0 0 -1 0 1 0 1 0 0 87697.dat +1 0 80 -72 150 1 0 0 0 1 0 0 0 1 2926.dat +1 14 30 -67 150 0 0 1 0 1 0 -1 0 0 6014b.dat +1 0 24 -67 150 0 0 1 0 1 0 -1 0 0 87697.dat +1 14 130 -67 150 0 0 -1 0 1 0 1 0 0 6014b.dat +1 0 136 -67 150 0 0 -1 0 1 0 1 0 0 87697.dat +1 4 80 -104 60 1 0 0 0 1 0 0 0 1 3001.dat +1 4 80 -104 100 1 0 0 0 1 0 0 0 1 3001.dat +1 4 80 -104 140 1 0 0 0 1 0 0 0 1 3001.dat +1 4 80 -104 180 1 0 0 0 1 0 0 0 1 3001.dat +1 47 60 -128 110 1 0 0 0 1 0 0 0 1 3039.dat +1 1 60 -128 130 -1 0 0 0 1 0 0 0 -1 3039.dat +1 4 60 -128 60 1 0 0 0 1 0 0 0 1 30165.dat +1 4 60 -104 190 -1 0 0 0 1 0 0 0 -1 85984.dat +1 47 100 -128 110 1 0 0 0 1 0 0 0 1 3039.dat +1 1 100 -128 130 -1 0 0 0 1 0 0 0 -1 3039.dat +1 4 100 -128 60 1 0 0 0 1 0 0 0 1 30165.dat +1 4 100 -104 190 -1 0 0 0 1 0 0 0 -1 85984.dat +1 25 80 -136 110 1 0 0 0 1 0 0 0 1 3710.dat +1 25 80 -136 130 1 0 0 0 1 0 0 0 1 3710.dat +1 36 50 -104 170 -1 0 0 0 1 0 0 0 -1 54200.dat +1 36 110 -104 170 -1 0 0 0 1 0 0 0 -1 54200.dat diff --git a/brickwright/alt/alt-014/thumb-512.avif b/brickwright/alt/alt-014/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..7279af6fbcfabb0998ab3a410db5baa623c03bec Binary files /dev/null and b/brickwright/alt/alt-014/thumb-512.avif differ diff --git a/brickwright/alt/alt-014/trace.jsonl.gz b/brickwright/alt/alt-014/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..98c6fc19ef3a989446dcb6297890aa216d9124e0 --- /dev/null +++ b/brickwright/alt/alt-014/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e1fceab2b11a56d55eb1cb0012e366f0facc36694ab0e92e02a3da808cc664b +size 8611 diff --git a/brickwright/alt/alt-014/view-0.avif b/brickwright/alt/alt-014/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..82c8b9f08498b18023ab76045c5ae17c4158a776 Binary files /dev/null and b/brickwright/alt/alt-014/view-0.avif differ diff --git a/brickwright/alt/alt-014/view-1.avif b/brickwright/alt/alt-014/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..6b18ad5808a52289f42522d6c9b45bbbff9fe010 Binary files /dev/null and b/brickwright/alt/alt-014/view-1.avif differ diff --git a/brickwright/alt/alt-014/view-2.avif b/brickwright/alt/alt-014/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..d6390d9fae508ca24b3f279364cf4a00598da733 Binary files /dev/null and b/brickwright/alt/alt-014/view-2.avif differ diff --git a/brickwright/alt/alt-014/view-3.avif b/brickwright/alt/alt-014/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..4fa7c6d201d17b7dc32e1dcc2595585c4bb51d15 Binary files /dev/null and b/brickwright/alt/alt-014/view-3.avif differ diff --git a/brickwright/alt/alt-014/view-4.avif b/brickwright/alt/alt-014/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..05ebbbd9f765bea8d1f4487d3bf4a52fe2a836f8 Binary files /dev/null and b/brickwright/alt/alt-014/view-4.avif differ diff --git a/brickwright/alt/alt-014/view-5.avif b/brickwright/alt/alt-014/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..d1272c06a7341153e6d89746f98ee78f4060d276 Binary files /dev/null and b/brickwright/alt/alt-014/view-5.avif differ diff --git a/brickwright/alt/alt-014/view-6.avif b/brickwright/alt/alt-014/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..3ccd3361636c09b7a726a650eab1c6a5d1dd63ad Binary files /dev/null and b/brickwright/alt/alt-014/view-6.avif differ diff --git a/brickwright/alt/alt-014/view-7.avif b/brickwright/alt/alt-014/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..be99e49c2b610975dfaf34f15ebcfa4601083acf Binary files /dev/null and b/brickwright/alt/alt-014/view-7.avif differ diff --git a/brickwright/alt/alt-015/build.py b/brickwright/alt/alt-015/build.py new file mode 100644 index 0000000000000000000000000000000000000000..2e40f61527fe6b056a16e3e6cd7cd93fec2517be --- /dev/null +++ b/brickwright/alt/alt-015/build.py @@ -0,0 +1,103 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid, color, x, y, z, rot=0, name=None): + return b.add(bl.Element(pid, getattr(bl.Color, color)), (x,y,z), rotation=bl.Rotation(rot), name=name) + + # Tug: broad, flat keel, black hull and interlocked blue deck. + put('3029','DARK_BLUISH_GRAY',0,0,0,1,'tug_keel') + for y in (0,3,6,9): + for x in (0,2): + put('3002','BLACK',x,y,1/3,1) + for y in (0,4,7,11): + put('3710','BLUE',0,y,4/3) + for y in (1,5,9): + put('3020','MEDIUM_AZURE',0,y,4/3) + for y in (3,8): + for x in (0,2): + put('3023b','DARK_AZURE',x,y,4/3) + # Large black rubber fenders with black centers, one on either side. + for i,(x,rot,direction) in enumerate(((0,3,bl.Direction.RIGHT),(3,1,bl.Direction.LEFT))): + mount = put('2458','DARK_BLUISH_GRAY',x,7,2,rot,name=f'fender_mount_{i}') + rim = bl.Element('55981',bl.Color.BLACK) + wheel = b.connect(rim,'pin_hole',to=mount.find_connector('pin'),mounting=bl.Mounting(offset=-0.6),name=f'hub_{i}') + tire = bl.Element('58090',bl.Color.BLACK) + b.connect(tire,tire.find_connector('fixed_8_on',facing=bl.Direction.BACK),to=wheel.find_connector('fixed_8_in',facing=direction),name=f'tire_{i}') + for y in (0,4,8): + put('3031','BLUE',0,y,5/3) + # Rounded red pushing bow, touching the barge's stern. + for x in (0,2): + put('30165','RED',x,0,2,name=f'bow_{x}') + # White wheelhouse with forward glazing and side windows. + for x in (0,2): + put('3003','YELLOW',x,2,2) + put('3003','YELLOW',x,4,2) + for x in (0,2): + put('3039','TRANS_CLEAR',x,2,3) + for x in (0,3): + put('3065','TRANS_CLEAR',x,4,3,1) + put('3003','ORANGE',1,4,3) + put('3010','BRIGHT_LIGHT_YELLOW',0,3,4) + put('3010','BRIGHT_LIGHT_YELLOW',0,4,4) + put('3010','BRIGHT_LIGHT_YELLOW',0,5,4) + # Thin roof over the glazing, with white edging. + put('3032','YELLOW',0,2,5,1,'cabin_roof') + put('3069b','WHITE',0,2,16/3) + put('3069b','WHITE',2,2,16/3) + put('6141','TRANS_ORANGE',0,6,16/3) + put('59900','TRANS_ORANGE',3,6,16/3) + # A tall round funnel, kept clear of the wheelhouse. + for z in (2,3,4,5): + put('3941','DARK_PURPLE',1,9,z,name=f'funnel_{z}') + put('14769','DARK_BLUISH_GRAY',1,9,6,name='funnel_cap') + for x in (0,3): + put('3062b','DARK_ORANGE',x,11,2) + put('6141','DARK_BLUISH_GRAY',x,11,3) + + # Barge: wide, low hull with a stud-connected cargo deck. + put('3028','BRIGHT_GREEN',-1,-12,0,1,'barge_keel') + for x in (-1,3): + for y in (-12,-6): + put('2456','DARK_RED' if x == -1 else 'BLACK',x,y,1/3,1) + for y in (-12,-8,-4): + put('3001','RED',1,y,1/3,1) + for y in (-12,-2): + put('3795','REDDISH_BROWN',-1,y,4/3) + for x in (-1,3): + put('3034','LIGHT_BLUISH_GRAY',x,-10,4/3,1) + for y in (-10,-6): + put('3020','TAN',1,y,4/3,1) + # Low timber coamings along the sides and across each end. + for x in (-1,4): + for y in (-10,-6): + put('3010','REDDISH_BROWN',x,y,5/3,1) + for y in (-12,-1): + for x in (-1,2): + put('3622','TAN',x,y,5/3) + for i,(y,color) in enumerate(((-11,'RED'),(-7,'LIME'),(-3,'BLUE'))): + for level in (0,1): + put('3001',color,0,y,5/3+level,name=f'crate_{i}_body_{level}') + put('87079','LIGHT_BLUISH_GRAY',0,y,11/3,name=f'crate_{i}_lid') + return b + + +def run_tests(): + build = create_build() + tests = TestContext(build) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=2) + inventory = json.load(open('/inputs/parts.json')) + used = Counter((p.content.ldraw_id,p.content.color.name) for p in build.flattened_placements) + excess = {str(k):v for k,v in used.items() if v > inventory.get(k[0],{}).get(k[1],0)} + tests.check('Inventory limits',not excess,str(excess)) + tests.check('Black tire fenders on both sides',sum(v for (pid,c),v in used.items() if pid=='58090' and c=='BLACK')==2 and build.named('tire_0').center.x < 0 and build.named('tire_1').center.x > 4) + tests.check('Three colorful crates',all(f'crate_{i}_lid' in build.names for i in range(3))) + tests.check('Tall funnel above wheelhouse',build.named('funnel_cap').bounding_box[1].z > build.named('cabin_roof').bounding_box[1].z + 0.5) + tests.check('Bow presses against barge stern',abs(build.named('bow_0').bounding_box[0].y-build.named('barge_keel').bounding_box[1].y)<0.001) + return tests.report() diff --git a/brickwright/alt/alt-015/hero-1024.avif b/brickwright/alt/alt-015/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..86d7ac868f867c6eb3414bb0244ede7550c639f4 Binary files /dev/null and b/brickwright/alt/alt-015/hero-1024.avif differ diff --git a/brickwright/alt/alt-015/model.mpd b/brickwright/alt/alt-015/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..5e057a21631faf2ed63153ed622bd02501db9fdb --- /dev/null +++ b/brickwright/alt/alt-015/model.mpd @@ -0,0 +1,88 @@ +1 72 40 -8 120 0 0 -1 0 1 0 1 0 0 3029.dat +1 0 20 -32 30 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 60 -32 30 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 20 -32 90 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 60 -32 90 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 20 -32 150 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 60 -32 150 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 20 -32 210 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 60 -32 210 0 0 -1 0 1 0 1 0 0 3002.dat +1 1 40 -40 10 1 0 0 0 1 0 0 0 1 3710.dat +1 1 40 -40 90 1 0 0 0 1 0 0 0 1 3710.dat +1 1 40 -40 150 1 0 0 0 1 0 0 0 1 3710.dat +1 1 40 -40 230 1 0 0 0 1 0 0 0 1 3710.dat +1 322 40 -40 40 1 0 0 0 1 0 0 0 1 3020.dat +1 322 40 -40 120 1 0 0 0 1 0 0 0 1 3020.dat +1 322 40 -40 200 1 0 0 0 1 0 0 0 1 3020.dat +1 321 20 -40 70 1 0 0 0 1 0 0 0 1 3023b.dat +1 321 60 -40 70 1 0 0 0 1 0 0 0 1 3023b.dat +1 321 20 -40 170 1 0 0 0 1 0 0 0 1 3023b.dat +1 321 60 -40 170 1 0 0 0 1 0 0 0 1 3023b.dat +1 72 10 -72 160 0 0 1 0 1 0 -1 0 0 2458.dat +1 0 -23 -62 160 0 0 1 0 1 0 -1 0 0 55981.dat +1 0 -23 -62 160 0 0 -1 0 1 0 1 0 0 58090.dat +1 72 70 -72 160 0 0 -1 0 1 0 1 0 0 2458.dat +1 0 103 -62 160 0 0 -1 0 1 0 1 0 0 55981.dat +1 0 103 -62 160 0 0 1 0 1 0 -1 0 0 58090.dat +1 1 40 -48 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 40 -48 120 1 0 0 0 1 0 0 0 1 3031.dat +1 1 40 -48 200 1 0 0 0 1 0 0 0 1 3031.dat +1 4 20 -72 20 1 0 0 0 1 0 0 0 1 30165.dat +1 4 60 -72 20 1 0 0 0 1 0 0 0 1 30165.dat +1 14 20 -72 60 1 0 0 0 1 0 0 0 1 3003.dat +1 14 20 -72 100 1 0 0 0 1 0 0 0 1 3003.dat +1 14 60 -72 60 1 0 0 0 1 0 0 0 1 3003.dat +1 14 60 -72 100 1 0 0 0 1 0 0 0 1 3003.dat +1 47 20 -96 70 1 0 0 0 1 0 0 0 1 3039.dat +1 47 60 -96 70 1 0 0 0 1 0 0 0 1 3039.dat +1 47 10 -96 100 0 0 -1 0 1 0 1 0 0 3065.dat +1 47 70 -96 100 0 0 -1 0 1 0 1 0 0 3065.dat +1 25 40 -96 100 1 0 0 0 1 0 0 0 1 3003.dat +1 226 40 -120 70 1 0 0 0 1 0 0 0 1 3010.dat +1 226 40 -120 90 1 0 0 0 1 0 0 0 1 3010.dat +1 226 40 -120 110 1 0 0 0 1 0 0 0 1 3010.dat +1 14 40 -128 100 0 0 -1 0 1 0 1 0 0 3032.dat +1 15 20 -136 50 1 0 0 0 1 0 0 0 1 3069b.dat +1 15 60 -136 50 1 0 0 0 1 0 0 0 1 3069b.dat +1 57 10 -136 130 1 0 0 0 1 0 0 0 1 6141.dat +1 57 70 -152 130 1 0 0 0 1 0 0 0 1 59900.dat +1 85 40 -72 200 1 0 0 0 1 0 0 0 1 3941.dat +1 85 40 -96 200 1 0 0 0 1 0 0 0 1 3941.dat +1 85 40 -120 200 1 0 0 0 1 0 0 0 1 3941.dat +1 85 40 -144 200 1 0 0 0 1 0 0 0 1 3941.dat +1 72 40 -152 200 1 0 0 0 1 0 0 0 1 14769.dat +1 484 10 -72 230 1 0 0 0 1 0 0 0 1 3062b.dat +1 72 10 -80 230 1 0 0 0 1 0 0 0 1 6141.dat +1 484 70 -72 230 1 0 0 0 1 0 0 0 1 3062b.dat +1 72 70 -80 230 1 0 0 0 1 0 0 0 1 6141.dat +1 10 40 -8 -120 0 0 -1 0 1 0 1 0 0 3028.dat +1 320 0 -32 -180 0 0 -1 0 1 0 1 0 0 2456.dat +1 320 0 -32 -60 0 0 -1 0 1 0 1 0 0 2456.dat +1 0 80 -32 -180 0 0 -1 0 1 0 1 0 0 2456.dat +1 0 80 -32 -60 0 0 -1 0 1 0 1 0 0 2456.dat +1 4 40 -32 -200 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 40 -32 -120 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 40 -32 -40 0 0 -1 0 1 0 1 0 0 3001.dat +1 70 40 -40 -220 1 0 0 0 1 0 0 0 1 3795.dat +1 70 40 -40 -20 1 0 0 0 1 0 0 0 1 3795.dat +1 71 0 -40 -120 0 0 -1 0 1 0 1 0 0 3034.dat +1 71 80 -40 -120 0 0 -1 0 1 0 1 0 0 3034.dat +1 19 40 -40 -160 0 0 -1 0 1 0 1 0 0 3020.dat +1 19 40 -40 -80 0 0 -1 0 1 0 1 0 0 3020.dat +1 70 -10 -64 -160 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 -10 -64 -80 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 90 -64 -160 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 90 -64 -80 0 0 -1 0 1 0 1 0 0 3010.dat +1 19 10 -64 -230 1 0 0 0 1 0 0 0 1 3622.dat +1 19 70 -64 -230 1 0 0 0 1 0 0 0 1 3622.dat +1 19 10 -64 -10 1 0 0 0 1 0 0 0 1 3622.dat +1 19 70 -64 -10 1 0 0 0 1 0 0 0 1 3622.dat +1 4 40 -64 -200 1 0 0 0 1 0 0 0 1 3001.dat +1 4 40 -88 -200 1 0 0 0 1 0 0 0 1 3001.dat +1 71 40 -96 -200 1 0 0 0 1 0 0 0 1 87079.dat +1 27 40 -64 -120 1 0 0 0 1 0 0 0 1 3001.dat +1 27 40 -88 -120 1 0 0 0 1 0 0 0 1 3001.dat +1 71 40 -96 -120 1 0 0 0 1 0 0 0 1 87079.dat +1 1 40 -64 -40 1 0 0 0 1 0 0 0 1 3001.dat +1 1 40 -88 -40 1 0 0 0 1 0 0 0 1 3001.dat +1 71 40 -96 -40 1 0 0 0 1 0 0 0 1 87079.dat diff --git a/brickwright/alt/alt-015/thumb-512.avif b/brickwright/alt/alt-015/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..31c8c29f779e8016b0847d6a3f1643077c996a9f Binary files /dev/null and b/brickwright/alt/alt-015/thumb-512.avif differ diff --git a/brickwright/alt/alt-015/trace.jsonl.gz b/brickwright/alt/alt-015/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..2d812da68ac5e55da12457f35557b851572e0ced --- /dev/null +++ b/brickwright/alt/alt-015/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0620b793c56c1d7e8d22c6ad7ffe0235dfe283211c430cdfc15a5927e96ea6e +size 7732 diff --git a/brickwright/alt/alt-015/view-0.avif b/brickwright/alt/alt-015/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..8bef183cab4de6fd2bfab8a434f9658d4163d871 Binary files /dev/null and b/brickwright/alt/alt-015/view-0.avif differ diff --git a/brickwright/alt/alt-015/view-1.avif b/brickwright/alt/alt-015/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..0e22e789dab94ec0b3250c2e520195fcc02d3ae2 Binary files /dev/null and b/brickwright/alt/alt-015/view-1.avif differ diff --git a/brickwright/alt/alt-015/view-2.avif b/brickwright/alt/alt-015/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..f5b9f71174a1cfa05db8be959df1c4b1587a1473 Binary files /dev/null and b/brickwright/alt/alt-015/view-2.avif differ diff --git a/brickwright/alt/alt-015/view-3.avif b/brickwright/alt/alt-015/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..27bbc38c8a4bb2f56518f9980adf77ce1812fe06 Binary files /dev/null and b/brickwright/alt/alt-015/view-3.avif differ diff --git a/brickwright/alt/alt-015/view-4.avif b/brickwright/alt/alt-015/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..11bb58dbca79e79226d4e1b723a12c8a7616a324 Binary files /dev/null and b/brickwright/alt/alt-015/view-4.avif differ diff --git a/brickwright/alt/alt-015/view-5.avif b/brickwright/alt/alt-015/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..abfa242da8d504aa88e45370dafa0880f4769b99 Binary files /dev/null and b/brickwright/alt/alt-015/view-5.avif differ diff --git a/brickwright/alt/alt-015/view-6.avif b/brickwright/alt/alt-015/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..ad207776c193427a3f62a34dd17c31376ededfc4 Binary files /dev/null and b/brickwright/alt/alt-015/view-6.avif differ diff --git a/brickwright/alt/alt-015/view-7.avif b/brickwright/alt/alt-015/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..f252cec36314c1a38c0f5849e6c987c7b7763302 Binary files /dev/null and b/brickwright/alt/alt-015/view-7.avif differ diff --git a/brickwright/alt/alt-016/build.py b/brickwright/alt/alt-016/build.py new file mode 100644 index 0000000000000000000000000000000000000000..c2d62550198ce5fefa2686b654ee8056e7ff92a2 --- /dev/null +++ b/brickwright/alt/alt-016/build.py @@ -0,0 +1,82 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid, color, x, y, z, rot=0, name=None): + return b.add(bl.Element(pid, getattr(bl.Color, color)), (x,y,z), bl.Rotation(rot), name=name) + # Narrow keel, flared chines, and a stepped racing bow. + put('3029','DARK_BLUISH_GRAY',1,1,0,1,'keel') + put('3023b','TAN',2,-1,0,1,name='bow_underplate') + put('3001','RED',1,0,1/3,name='foredeck') + put('3001','RED',2,2,1/3,1) + put('3001','RED',2,6,1/3,1) + put('3002','BLACK',2,10,1/3,1) + for x,r in [(0,3),(4,1)]: + for y in (3,9): + put('3660b','WHITE',x,y,1/3,r) + for x in (0,5): + put('3009','RED',x,3,4/3,1) + put('3659','RED',x,9,4/3,1) + for y in (3,5): put('2877','WHITE',x,y,7/3,1) + for y in (7,9): put('3004','WHITE',x,y,7/3,1) + put('3040b','WHITE',x,11,7/3,2) + # Bow cap and clear racing windscreen. + put('85984','RED',2,-1,1/3,name='bow_tip') + for x in (1,3): put('85984','RED',x,0,4/3) + put('3020','TAN',1,1,4/3) + for x in (1,3): put('3039','TRANS_CLEAR',x,1,5/3) + # Tandem cockpit; the forward cushion carries a seated brick-built driver. + for y,label in [(5,'front'),(9,'rear')]: + put('3022','TAN',2,y,4/3,name=label+'_seat_base') + put('3004','BLACK',2,y+1,5/3,name=label+'_seat_back') + put('3023b','TAN',2,9,5/3,name='rear_cushion') + put('3023b','DARK_AZURE',2,4,4/3,name='driver_legs') + put('3004','ORANGE',2,5,5/3,name='driver_torso') + for x in (2,3): put('3005','YELLOW',x,5,8/3,name='driver_head' if x==2 else None) + for x in (1,4): + put('3023b','TAN',x,4,4/3,1) + put('3005','YELLOW',x,5,5/3,name='driver_hand_'+str(x)) + put('30367c','WHITE',2,5,11/3,name='driver_helmet') + # Round steering control on a side-stud dashboard, facing the driver. + put('3004','BLACK',2,3,4/3,name='dashboard') + mount=put('47905','BLACK',2,3,7/3,name='steering_mount') + wheel=bl.Element('14769',bl.Color.DARK_BLUISH_GRAY) + b.connect(wheel,wheel.find_connector('tube'),to=mount.find_connector('stud',facing=bl.Direction.BACK),name='steering_wheel') + # A transom bridge and external outboard leg and cowling. + put('3001','RED',1,11,4/3,name='transom') + put('3795','REDDISH_BROWN',2,11,7/3,1,name='motor_mount') + put('87079','LIGHT_BLUISH_GRAY',2,10,8/3,1,name='transom_cover') + put('3004','DARK_BLUISH_GRAY',2,15,1/3,name='motor_skeg') + put('3004','DARK_BLUISH_GRAY',2,15,4/3,name='motor_leg') + put('3003','DARK_RED',2,14,8/3,name='motor_core') + for x in (2,3): put('3040b','BLACK',x,14,11/3,2,name='motor_cowling_'+str(x)) + # Three independent buoys, each securely fixed to its own patch of water. + for i,y in enumerate((0,6,12)): + put('3031','BLUE',9,y,0,name='water_'+str(i)) + put('33291','BRIGHT_LIGHT_ORANGE',10,y+1,1/3,name='buoy_foot_'+str(i)) + put('59900','TRANS_ORANGE',10,y+1,2/3,name='buoy_'+str(i)) + put('6141','RED',10,y+1,5/3,name='buoy_cap_'+str(i)) + return b + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=4) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):v for k,v in used.items() if v>inventory.get(k[0],{}).get(k[1],0)} + t.check('Inventory limits',not excess,str(excess)) + seats=[b.named(s+'_seat_base').center for s in ('front','rear')] + t.check('Two tandem seats',seats[0].x==seats[1].x and seats[0].y6 and buoys[1].y-buoys[0].y==buoys[2].y-buoys[1].y,str(buoys)) + t.check('External stern motor',b.named('motor_core').center.y>b.named('transom').center.y,'Outboard behind transom') + return t.report() diff --git a/brickwright/alt/alt-016/hero-1024.avif b/brickwright/alt/alt-016/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..1e4ede300709364ea86b979049079876ac4091a7 Binary files /dev/null and b/brickwright/alt/alt-016/hero-1024.avif differ diff --git a/brickwright/alt/alt-016/model.mpd b/brickwright/alt/alt-016/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..049505dc00adc01ccf5a7ce039b802c40e46f814 --- /dev/null +++ b/brickwright/alt/alt-016/model.mpd @@ -0,0 +1,67 @@ +1 72 60 -8 140 0 0 -1 0 1 0 1 0 0 3029.dat +1 19 50 -8 0 0 0 -1 0 1 0 1 0 0 3023b.dat +1 4 60 -32 20 1 0 0 0 1 0 0 0 1 3001.dat +1 4 60 -32 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 60 -32 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 0 60 -32 230 0 0 -1 0 1 0 1 0 0 3002.dat +1 15 30 -32 80 0 0 1 0 1 0 -1 0 0 3660b.dat +1 15 30 -32 200 0 0 1 0 1 0 -1 0 0 3660b.dat +1 15 90 -32 80 0 0 -1 0 1 0 1 0 0 3660b.dat +1 15 90 -32 200 0 0 -1 0 1 0 1 0 0 3660b.dat +1 4 10 -56 120 0 0 -1 0 1 0 1 0 0 3009.dat +1 4 10 -56 220 0 0 -1 0 1 0 1 0 0 3659.dat +1 15 10 -80 80 0 0 -1 0 1 0 1 0 0 2877.dat +1 15 10 -80 120 0 0 -1 0 1 0 1 0 0 2877.dat +1 15 10 -80 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 15 10 -80 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 15 10 -80 230 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 4 110 -56 120 0 0 -1 0 1 0 1 0 0 3009.dat +1 4 110 -56 220 0 0 -1 0 1 0 1 0 0 3659.dat +1 15 110 -80 80 0 0 -1 0 1 0 1 0 0 2877.dat +1 15 110 -80 120 0 0 -1 0 1 0 1 0 0 2877.dat +1 15 110 -80 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 15 110 -80 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 15 110 -80 230 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 4 60 -8 -10 1 0 0 0 1 0 0 0 1 85984.dat +1 4 40 -32 10 1 0 0 0 1 0 0 0 1 85984.dat +1 4 80 -32 10 1 0 0 0 1 0 0 0 1 85984.dat +1 19 60 -40 40 1 0 0 0 1 0 0 0 1 3020.dat +1 47 40 -64 50 1 0 0 0 1 0 0 0 1 3039.dat +1 47 80 -64 50 1 0 0 0 1 0 0 0 1 3039.dat +1 19 60 -40 120 1 0 0 0 1 0 0 0 1 3022.dat +1 0 60 -64 130 1 0 0 0 1 0 0 0 1 3004.dat +1 19 60 -40 200 1 0 0 0 1 0 0 0 1 3022.dat +1 0 60 -64 210 1 0 0 0 1 0 0 0 1 3004.dat +1 19 60 -48 190 1 0 0 0 1 0 0 0 1 3023b.dat +1 321 60 -40 90 1 0 0 0 1 0 0 0 1 3023b.dat +1 25 60 -64 110 1 0 0 0 1 0 0 0 1 3004.dat +1 14 50 -88 110 1 0 0 0 1 0 0 0 1 3005.dat +1 14 70 -88 110 1 0 0 0 1 0 0 0 1 3005.dat +1 19 30 -40 100 0 0 -1 0 1 0 1 0 0 3023b.dat +1 14 30 -64 110 1 0 0 0 1 0 0 0 1 3005.dat +1 19 90 -40 100 0 0 -1 0 1 0 1 0 0 3023b.dat +1 14 90 -64 110 1 0 0 0 1 0 0 0 1 3005.dat +1 15 60 -112 120 1 0 0 0 1 0 0 0 1 30367c.dat +1 0 60 -56 70 1 0 0 0 1 0 0 0 1 3004.dat +1 0 50 -80 70 1 0 0 0 1 0 0 0 1 47905.dat +1 72 50 -70 88 1 0 0 0 0 1 0 -1 0 14769.dat +1 4 60 -56 240 1 0 0 0 1 0 0 0 1 3001.dat +1 70 60 -64 280 0 0 -1 0 1 0 1 0 0 3795.dat +1 71 60 -72 240 0 0 -1 0 1 0 1 0 0 87079.dat +1 72 60 -32 310 1 0 0 0 1 0 0 0 1 3004.dat +1 72 60 -56 310 1 0 0 0 1 0 0 0 1 3004.dat +1 320 60 -88 300 1 0 0 0 1 0 0 0 1 3003.dat +1 0 50 -112 290 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 0 70 -112 290 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 1 220 -8 40 1 0 0 0 1 0 0 0 1 3031.dat +1 191 210 -16 30 1 0 0 0 1 0 0 0 1 33291.dat +1 57 210 -40 30 1 0 0 0 1 0 0 0 1 59900.dat +1 4 210 -48 30 1 0 0 0 1 0 0 0 1 6141.dat +1 1 220 -8 160 1 0 0 0 1 0 0 0 1 3031.dat +1 191 210 -16 150 1 0 0 0 1 0 0 0 1 33291.dat +1 57 210 -40 150 1 0 0 0 1 0 0 0 1 59900.dat +1 4 210 -48 150 1 0 0 0 1 0 0 0 1 6141.dat +1 1 220 -8 280 1 0 0 0 1 0 0 0 1 3031.dat +1 191 210 -16 270 1 0 0 0 1 0 0 0 1 33291.dat +1 57 210 -40 270 1 0 0 0 1 0 0 0 1 59900.dat +1 4 210 -48 270 1 0 0 0 1 0 0 0 1 6141.dat diff --git a/brickwright/alt/alt-016/thumb-512.avif b/brickwright/alt/alt-016/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..112cdd1b24acd0d2bb2a550c0eac3836ef18e689 Binary files /dev/null and b/brickwright/alt/alt-016/thumb-512.avif differ diff --git a/brickwright/alt/alt-016/trace.jsonl.gz b/brickwright/alt/alt-016/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..56b88e7c077546817523ea9d39d5adfac14a4528 --- /dev/null +++ b/brickwright/alt/alt-016/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8435ce1804b63a6a07b816bcb7652c8248ac7ba2ab2424d1b6c0aadc75cbe163 +size 8442 diff --git a/brickwright/alt/alt-016/view-0.avif b/brickwright/alt/alt-016/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..50c28d31166cd9793d219ac39c273541a927e2c9 Binary files /dev/null and b/brickwright/alt/alt-016/view-0.avif differ diff --git a/brickwright/alt/alt-016/view-1.avif b/brickwright/alt/alt-016/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..8a28d4a99c4248d523090fd3c4b444df59d6e0ca Binary files /dev/null and b/brickwright/alt/alt-016/view-1.avif differ diff --git a/brickwright/alt/alt-016/view-2.avif b/brickwright/alt/alt-016/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..e9bca03232ebf43fb3136da333f7e67ef2f94ecb Binary files /dev/null and b/brickwright/alt/alt-016/view-2.avif differ diff --git a/brickwright/alt/alt-016/view-3.avif b/brickwright/alt/alt-016/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..80fa40df71e70e9d5aced9563b18d3b013d5e003 Binary files /dev/null and b/brickwright/alt/alt-016/view-3.avif differ diff --git a/brickwright/alt/alt-016/view-4.avif b/brickwright/alt/alt-016/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..7134af7469acfa988cde4ab85e300b80ebf64e04 Binary files /dev/null and b/brickwright/alt/alt-016/view-4.avif differ diff --git a/brickwright/alt/alt-016/view-5.avif b/brickwright/alt/alt-016/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..bf52b58b87f404ff91d5e66af42ad1fb6d7b3999 Binary files /dev/null and b/brickwright/alt/alt-016/view-5.avif differ diff --git a/brickwright/alt/alt-016/view-6.avif b/brickwright/alt/alt-016/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..fd56a4dfc95f39e62b6e232eadad5703b1f9aeec Binary files /dev/null and b/brickwright/alt/alt-016/view-6.avif differ diff --git a/brickwright/alt/alt-016/view-7.avif b/brickwright/alt/alt-016/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..9dc9eccf08f25f3c84282502bf223a8756b03e67 Binary files /dev/null and b/brickwright/alt/alt-016/view-7.avif differ diff --git a/brickwright/alt/alt-017/build.py b/brickwright/alt/alt-017/build.py new file mode 100644 index 0000000000000000000000000000000000000000..6e5db2b7209982eb42825b57f85874a9afdf5c85 --- /dev/null +++ b/brickwright/alt/alt-017/build.py @@ -0,0 +1,101 @@ +import json +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + C = bl.Color + def add(pid, color, x,y,z, rot=0, name=None): + return b.add(bl.Element(pid, getattr(C,color)), (x,y,z), rotation=bl.Rotation(rot), name=name) + # A single apron ties the parked aircraft, access ladder and pilot together. + add('91405','BRIGHT_GREEN',0,0,0,name='apron') + for x,y in [(5,6),(7,11)]: + add('3001','DARK_BLUISH_GRAY',x,y,1/3) + add('3004','BLACK',x+1,y,4/3) + add('3029','DARK_BLUISH_GRAY',6,3,7/3,1,'fuselage_floor') + add('3031','BLUE',6,-1,7/3) + add('3034','LIGHT_BLUISH_GRAY',7,-4,8/3,1,'nose_spine') + # Raised, open cockpit: windscreen, two coamings, seat and instrument panel. + for x in (6,9): + add('3010','LIGHT_BLUISH_GRAY',x,0,8/3,1) + add('2431','LIGHT_BLUISH_GRAY',x,0,11/3,1) + add('3010','LIGHT_BLUISH_GRAY',6,4,8/3) + add('3022','TAN',7,2,3,name='seat_cushion') + add('3004','BLACK',7,3,10/3,name='seat_back') + add('85984','BLACK',7,0,3,name='instruments') + for x in (6,8): + add('3039','TRANS_CLEAR',x,-2,3,name='windscreen_'+str(x)) + for x in (7,8): + add('50950','MEDIUM_AZURE',x,-5,3) + for y in (5,7,9,11): + add('3001','LIGHT_BLUISH_GRAY',6,y,8/3) + add('3010','LIGHT_BLUISH_GRAY',6,13,8/3) + # Rear pin-mounted black rims read as two hollow jet nozzles. + for i,x in enumerate((5,9)): + p=add('2458','DARK_BLUISH_GRAY',x,14,4,2,'exhaust_mount_'+str(i)) + e=bl.Element('55981',C.BLACK) + b.connect(e,'pin_hole',to=p.find_connector('pin'),mounting=bl.Mounting(offset=-0.75),name='exhaust_'+str(i)) + # Interlocking wing roots. Each successive strip is two studs farther aft. + for side in (0,1): + xs=(4,2,0) if side==0 else (10,12,14) + for k,x in enumerate(xs): + add('3001','BLUE',x,6+2*k,8/3,1,'wing_%s_%s'%(side,k)) + for x,y in ([(2,8),(0,10)] if side==0 else [(10,8),(12,10)]): + add('3020','MEDIUM_AZURE',x,y,7/3) + add('3034','LIGHT_BLUISH_GRAY',4,8,11/3,name='wing_spar') + for x in (4,10): + add('3001','MEDIUM_AZURE',x,10,8/3,1) + # Blue and azure leading-edge fairings emphasize the swept planform. + for x,y in [(4,6),(10,6),(0,10),(14,10)]: + add('3039','BLUE',x,y,11/3) + for x in (2,12): + add('3045','MEDIUM_AZURE',x,8,11/3) + for x,y in [(2,10),(12,10),(0,12),(14,12)]: + add('3068b','DARK_TAN',x,y,11/3) + for y in (6,10): + add('87079','LIGHT_BLUISH_GRAY',6,y,11/3) + # Tailplane and twin high swept fins. + for i,x in enumerate((4,9)): + add('11212','DARK_BLUISH_GRAY',x,12,11/3,name='tailplane_'+str(i)) + for i,x in enumerate((6,9)): + add('60481a','WHITE',x,12,4,name='tail_fin_'+str(i)) + add('60481a','WHITE',x,13,6,name='tail_fin_tip_'+str(i)) + add('3004','DARK_BLUE',7,12,11/3) + add('3040b','BLACK',7,12,14/3,2) + add('3040b','BLACK',8,12,14/3,2) + # A broad open-rung boarding ladder beside the cockpit. + for level in range(4): + add('3710','BLUE',10,0,1/3+level*4/3,1,'ladder_rung_'+str(level)) + if level<3: + for y in (0,3): + add('3005','LIGHT_BLUISH_GRAY' if level<2 else 'WHITE',10,y,2/3+level*4/3) + # Brick-built pilot: boots, flight suit, yellow hands/head and dark helmet. + add('3004','DARK_BLUE',12,2,1/3,name='pilot_boots') + add('3004','DARK_BLUE',12,2,4/3,name='pilot_suit') + add('3710','ORANGE',11,2,7/3,name='pilot_shoulders') + for x in (11,14): + add('3005','YELLOW',x,2,4/3) + add('3005','YELLOW',12,2,8/3,name='pilot_head') + add('3005','YELLOW',13,2,8/3) + add('85984','BLACK',12,2,11/3,name='pilot_helmet') + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + over=[] + for e,n in b.list_elements().items(): + limit=inventory.get(e.ldraw_id,{}).get(e.color.name,0) + if n>limit: over.append((e.ldraw_id,e.color.name,n,limit)) + tests.check('Inventory limits',not over,str(over)) + tests.check('Twin rear exhausts',all('exhaust_'+str(i) in b.names for i in range(2))) + tests.check('Swept-back wings',all(b.named('wing_0_'+str(i)).center.y < b.named('wing_0_'+str(i+1)).center.y for i in range(2))) + tests.check('Open cockpit with seat', 'seat_cushion' in b.names and 'seat_back' in b.names and 'instruments' in b.names) + tests.check('Ladder and pilot',all('ladder_rung_'+str(i) in b.names for i in range(4)) and 'pilot_head' in b.names) + return tests.report() diff --git a/brickwright/alt/alt-017/hero-1024.avif b/brickwright/alt/alt-017/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..1c86edebe17a0f1ab8d1e9089a77210e2a74e7ac Binary files /dev/null and b/brickwright/alt/alt-017/hero-1024.avif differ diff --git a/brickwright/alt/alt-017/model.mpd b/brickwright/alt/alt-017/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..87f5a010f8560e49bfa6b22da95222e2916e1f6e --- /dev/null +++ b/brickwright/alt/alt-017/model.mpd @@ -0,0 +1,81 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 72 140 -32 140 1 0 0 0 1 0 0 0 1 3001.dat +1 0 140 -56 130 1 0 0 0 1 0 0 0 1 3004.dat +1 72 180 -32 240 1 0 0 0 1 0 0 0 1 3001.dat +1 0 180 -56 230 1 0 0 0 1 0 0 0 1 3004.dat +1 72 160 -64 180 0 0 -1 0 1 0 1 0 0 3029.dat +1 1 160 -64 20 1 0 0 0 1 0 0 0 1 3031.dat +1 71 160 -72 0 0 0 -1 0 1 0 1 0 0 3034.dat +1 71 130 -88 40 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 130 -96 40 0 0 -1 0 1 0 1 0 0 2431.dat +1 71 190 -88 40 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 190 -96 40 0 0 -1 0 1 0 1 0 0 2431.dat +1 71 160 -88 90 1 0 0 0 1 0 0 0 1 3010.dat +1 19 160 -80 60 1 0 0 0 1 0 0 0 1 3022.dat +1 0 160 -104 70 1 0 0 0 1 0 0 0 1 3004.dat +1 0 160 -72 10 1 0 0 0 1 0 0 0 1 85984.dat +1 47 140 -96 -10 1 0 0 0 1 0 0 0 1 3039.dat +1 47 180 -96 -10 1 0 0 0 1 0 0 0 1 3039.dat +1 322 150 -96 -70 1 0 0 0 1 0 0 0 1 50950.dat +1 322 170 -96 -70 1 0 0 0 1 0 0 0 1 50950.dat +1 71 160 -88 120 1 0 0 0 1 0 0 0 1 3001.dat +1 71 160 -88 160 1 0 0 0 1 0 0 0 1 3001.dat +1 71 160 -88 200 1 0 0 0 1 0 0 0 1 3001.dat +1 71 160 -88 240 1 0 0 0 1 0 0 0 1 3001.dat +1 71 160 -88 270 1 0 0 0 1 0 0 0 1 3010.dat +1 72 120 -120 290 -1 0 0 0 1 0 0 0 -1 2458.dat +1 0 120 -110 326 -1 0 0 0 1 0 0 0 -1 55981.dat +1 72 200 -120 290 -1 0 0 0 1 0 0 0 -1 2458.dat +1 0 200 -110 326 -1 0 0 0 1 0 0 0 -1 55981.dat +1 1 100 -88 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 60 -88 200 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 20 -88 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 322 80 -64 180 1 0 0 0 1 0 0 0 1 3020.dat +1 322 40 -64 220 1 0 0 0 1 0 0 0 1 3020.dat +1 1 220 -88 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 260 -88 200 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 300 -88 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 322 240 -64 180 1 0 0 0 1 0 0 0 1 3020.dat +1 322 280 -64 220 1 0 0 0 1 0 0 0 1 3020.dat +1 71 160 -96 180 1 0 0 0 1 0 0 0 1 3034.dat +1 322 100 -88 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 322 220 -88 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 100 -112 150 1 0 0 0 1 0 0 0 1 3039.dat +1 1 220 -112 150 1 0 0 0 1 0 0 0 1 3039.dat +1 1 20 -112 230 1 0 0 0 1 0 0 0 1 3039.dat +1 1 300 -112 230 1 0 0 0 1 0 0 0 1 3039.dat +1 322 50 -112 190 1 0 0 0 1 0 0 0 1 3045.dat +1 322 250 -112 190 1 0 0 0 1 0 0 0 1 3045.dat +1 28 60 -96 220 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 260 -96 220 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 20 -96 260 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 300 -96 260 1 0 0 0 1 0 0 0 1 3068b.dat +1 71 160 -96 140 1 0 0 0 1 0 0 0 1 87079.dat +1 71 160 -96 220 1 0 0 0 1 0 0 0 1 87079.dat +1 72 110 -96 270 1 0 0 0 1 0 0 0 1 11212.dat +1 72 210 -96 270 1 0 0 0 1 0 0 0 1 11212.dat +1 15 130 -144 270 1 0 0 0 1 0 0 0 1 60481a.dat +1 15 130 -192 290 1 0 0 0 1 0 0 0 1 60481a.dat +1 15 190 -144 270 1 0 0 0 1 0 0 0 1 60481a.dat +1 15 190 -192 290 1 0 0 0 1 0 0 0 1 60481a.dat +1 272 160 -112 250 1 0 0 0 1 0 0 0 1 3004.dat +1 0 150 -136 250 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 0 170 -136 250 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 1 210 -16 40 0 0 -1 0 1 0 1 0 0 3710.dat +1 71 210 -40 10 1 0 0 0 1 0 0 0 1 3005.dat +1 71 210 -40 70 1 0 0 0 1 0 0 0 1 3005.dat +1 1 210 -48 40 0 0 -1 0 1 0 1 0 0 3710.dat +1 71 210 -72 10 1 0 0 0 1 0 0 0 1 3005.dat +1 71 210 -72 70 1 0 0 0 1 0 0 0 1 3005.dat +1 1 210 -80 40 0 0 -1 0 1 0 1 0 0 3710.dat +1 15 210 -104 10 1 0 0 0 1 0 0 0 1 3005.dat +1 15 210 -104 70 1 0 0 0 1 0 0 0 1 3005.dat +1 1 210 -112 40 0 0 -1 0 1 0 1 0 0 3710.dat +1 272 260 -32 50 1 0 0 0 1 0 0 0 1 3004.dat +1 272 260 -56 50 1 0 0 0 1 0 0 0 1 3004.dat +1 25 260 -64 50 1 0 0 0 1 0 0 0 1 3710.dat +1 14 230 -56 50 1 0 0 0 1 0 0 0 1 3005.dat +1 14 290 -56 50 1 0 0 0 1 0 0 0 1 3005.dat +1 14 250 -88 50 1 0 0 0 1 0 0 0 1 3005.dat +1 14 270 -88 50 1 0 0 0 1 0 0 0 1 3005.dat +1 0 260 -88 50 1 0 0 0 1 0 0 0 1 85984.dat diff --git a/brickwright/alt/alt-017/thumb-512.avif b/brickwright/alt/alt-017/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..0c180f733bc1b4b76ccb4e1b5c87fa91247b401d Binary files /dev/null and b/brickwright/alt/alt-017/thumb-512.avif differ diff --git a/brickwright/alt/alt-017/trace.jsonl.gz b/brickwright/alt/alt-017/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..52a6fe938010bca3bcb96c60b8ceeaf6f72d1714 --- /dev/null +++ b/brickwright/alt/alt-017/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b63ec30f4f812276517ea0e7b3635dcb8f6c70574ca8250d6a10ba08582b8e5 +size 7801 diff --git a/brickwright/alt/alt-017/view-0.avif b/brickwright/alt/alt-017/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..1ca9c27fa74bd89fff1663f0b645f2ad6e899fe7 Binary files /dev/null and b/brickwright/alt/alt-017/view-0.avif differ diff --git a/brickwright/alt/alt-017/view-1.avif b/brickwright/alt/alt-017/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..c28f505f51c14ad07f34c8453f51ad53d7433dcb Binary files /dev/null and b/brickwright/alt/alt-017/view-1.avif differ diff --git a/brickwright/alt/alt-017/view-2.avif b/brickwright/alt/alt-017/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..3edbd6e037f12a3703760d20e51b1e58f2bd5b21 Binary files /dev/null and b/brickwright/alt/alt-017/view-2.avif differ diff --git a/brickwright/alt/alt-017/view-3.avif b/brickwright/alt/alt-017/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..41f988d7c70bb073bfe0a63923da10533d245997 Binary files /dev/null and b/brickwright/alt/alt-017/view-3.avif differ diff --git a/brickwright/alt/alt-017/view-4.avif b/brickwright/alt/alt-017/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..17bd87ae07a4419ab7deaab88e677abb0df57ee8 Binary files /dev/null and b/brickwright/alt/alt-017/view-4.avif differ diff --git a/brickwright/alt/alt-017/view-5.avif b/brickwright/alt/alt-017/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..76a484aba881b9cbc49160138eb66a2fd4b3a0ec Binary files /dev/null and b/brickwright/alt/alt-017/view-5.avif differ diff --git a/brickwright/alt/alt-017/view-6.avif b/brickwright/alt/alt-017/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..64496e7e2ddaa421edcb0867e2e98fe9dcaced39 Binary files /dev/null and b/brickwright/alt/alt-017/view-6.avif differ diff --git a/brickwright/alt/alt-017/view-7.avif b/brickwright/alt/alt-017/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..d4b85c20f457bb9d918f0a79fbcf08df7ffb38b3 Binary files /dev/null and b/brickwright/alt/alt-017/view-7.avif differ diff --git a/brickwright/alt/alt-018/build.py b/brickwright/alt/alt-018/build.py new file mode 100644 index 0000000000000000000000000000000000000000..6fcc01f69bca56606050ec00fce89398b9861220 --- /dev/null +++ b/brickwright/alt/alt-018/build.py @@ -0,0 +1,130 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + C = bl.Color + def put(pid, color, x,y,z, rot=0, name=None): + return b.add(bl.Element(pid, getattr(C,color)), (x,y,z), rotation=bl.Rotation(rot), name=name) + # Two long runners, with raised cross-bearers: all helicopter weight + # is carried by these two separated landing skids. + for x in (1,8): + for y in range(1,13,2): + put('3004','DARK_BLUE',x,y,0,1) + for y in (2,6,10): + put('3010','LIGHT_BLUISH_GRAY' if y==6 else 'BRIGHT_LIGHT_YELLOW',x,y,1,1) + for y in (3,9): + put('3034','LIGHT_BLUISH_GRAY',1,y,2) + put('3001','LIGHT_BLUISH_GRAY',3,y,7/3) + put('3029','DARK_BLUISH_GRAY',3,1,10/3,1,'cabin_floor') + # Sunny yellow rescue fuselage. + for y in (3,5,7,9): + put('3001','YELLOW',2,y,11/3) + put('3003','YELLOW',6,y,11/3) + # Medical crosses are built into both side walls, not merely implied. + for x in (2,7): + for z in (14/3,20/3): + put('3004','LIGHT_BLUISH_GRAY',x,5,z,1) + put('3004','RED',x,7,z,1) + put('3004','LIGHT_BLUISH_GRAY',x,9,z,1) + put('3009','RED',x,5,17/3,1) + for x in (3,5): + put('3065','TRANS_CLEAR',x,3,14/3) + put('3039','TRANS_CLEAR',x,3,17/3) + for x in (2,7): + put('87544','TRANS_CLEAR',x,3,14/3,1) + # Rounded nose under the clear windscreen. + put('3037','YELLOW',3,1,11/3) + # Cabin roof and rounded engine fairing. + put('3037','YELLOW',3,3,20/3) + put('3032','YELLOW',2,5,23/3) + for x in (2,5): + put('3021','GREEN',x,9,23/3) + for y in (7,9): + put('3001','MEDIUM_AZURE',3,y,8) + for x in (3,4,5,6): + put('93273','MEDIUM_AZURE',x,7,9) + # Rotor mast with a genuine turntable and a long, light two-blade rotor. + put('3941','DARK_PURPLE',4,5,8,name='rotor_mast') + base=put('3680','BLUE',4,5,9) + top=b.connect(bl.Element('3679',C.LIGHT_BLUISH_GRAY),'turntable_pin', + to=base.find_connector('turntable_socket'),name='rotor_bearing') + for x in (-3,5): + put('3460','MEDIUM_AZURE',x,5,28/3,name='main_blade_'+str(x)) + put('14769','DARK_BLUISH_GRAY',4,5,29/3) + # Elevated narrow tail boom, bridged at its seam. + put('3001','LIGHT_BLUISH_GRAY',3,11,11/3) + put('3795','REDDISH_BROWN',4,11,14/3,1) + for y in (11,15): + put('3001','MEDIUM_AZURE',4,y,5,1) + put('3020','MEDIUM_AZURE',4,13,6,1) + for x in (4,5): + put('60481a','RED',x,17,6) + put('47905','RED',5,18,8,1,name='tail_rotor_mount') + mount=b.named('tail_rotor_mount') + blade=bl.Element('15397',C.MEDIUM_LAVENDER) + tail=b.connect(blade,blade.find_connector('antistud',toward=bl.Position(0,0,0)), + to=mount.find_connector('stud',facing=bl.Direction.LEFT),name='tail_rotor') + b.connect(bl.Element('6141',C.RED),'antistud', + to=tail.find_connector('stud',toward=tail.center),name='tail_hub') + # Stretcher: two trestles, a longitudinal spine and two deck sections. + for y in (5,10): + put('3004','DARK_BLUISH_GRAY',13,y,0) + put('3795','REDDISH_BROWN',13,5,1,1) + for y in (4,8): + put('3031','BLUE',12,y,4/3,name='stretcher_deck_'+str(y)) + for x in (12,15): + for y in (3,11): + put('3023b','TAN',x,y,5/3,1,name='handle_'+str(x)+'_'+str(y)) + put('3069b','WHITE',13,4,5/3) + # Supine patient: face points upwards, closed eyes, arms at the sides. + put('3001','TAN',12,5,5/3,name='patient_head') + for x in (13,14): + put('98138p0c','WHITE',x,5,8/3) + for y in (7,9): + put('3003','BLUE',13,y,5/3,name='patient_body_'+str(y)) + for x in (12,15): + put('3004','MEDIUM_NOUGAT',x,7,5/3,1) + for x in (13,14): + put('3004','BLACK',x,11,5/3,1) + # Standing paramedic, facing the patient's head (+Y). + for x in (12,14): + put('3002','BLACK',x,0,0,1) + for x in (12,15): + put('3004','DARK_BLUE',x,1,1,1) + put('3001','ORANGE',12,1,2,name='medic_torso') + for x in (11,16): + put('3005','MEDIUM_NOUGAT',x,2,2) + for x in (11,13,15): + put('3004','ORANGE',x,2,3) + put('3010','ORANGE',12,1,3) + put('30414','TAN',12,2,4,2,name='medic_face') + for x in (12,14): + put('3004','TAN',x,1,4) + face=b.named('medic_face') + studs=sorted(face.find_connectors('stud',facing=bl.Direction.BACK),key=lambda c:c.position.x) + for i in (1,2): + b.connect(bl.Element('98138p07',C.WHITE),'antistud',to=studs[i]) + put('3020','TAN',12,1,5) + put('3710','ORANGE',12,2,16/3) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=3) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):n for k,n in used.items() if n>inventory.get(k[0],{}).get(k[1],0)} + tests.check('Inventory quantities and colors',not excess,str(excess)) + tests.check('Two parallel landing runners',sum(n for (pid,c),n in used.items() if pid=='3004' and c=='DARK_BLUE')>=12) + tests.check('Two medical cross side markings',used[('3009','RED')]==2 and used[('3004','RED')]==4) + tests.check('Long main rotor and side tail rotor',all(n in b.names for n in ['main_blade_-3','main_blade_5','tail_rotor'])) + tests.check('Patient lies on stretcher with standing medic at head',all(n in b.names for n in ['patient_head','medic_torso','stretcher_deck_4','stretcher_deck_8'])) + return tests.report() diff --git a/brickwright/alt/alt-018/hero-1024.avif b/brickwright/alt/alt-018/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..fbe5e3edd5c0095280c9fae10bcec6b59aa0bbbb Binary files /dev/null and b/brickwright/alt/alt-018/hero-1024.avif differ diff --git a/brickwright/alt/alt-018/model.mpd b/brickwright/alt/alt-018/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..03fac7e9ecd944d57d29ac1952c185060cbb2481 --- /dev/null +++ b/brickwright/alt/alt-018/model.mpd @@ -0,0 +1,115 @@ +1 272 30 -24 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 30 -24 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 30 -24 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 30 -24 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 30 -24 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 30 -24 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 30 -48 80 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 30 -48 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 30 -48 240 0 0 -1 0 1 0 1 0 0 3010.dat +1 272 170 -24 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 170 -24 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 170 -24 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 170 -24 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 170 -24 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 170 -24 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 170 -48 80 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 170 -48 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 170 -48 240 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 100 -56 80 1 0 0 0 1 0 0 0 1 3034.dat +1 71 100 -80 80 1 0 0 0 1 0 0 0 1 3001.dat +1 71 100 -56 200 1 0 0 0 1 0 0 0 1 3034.dat +1 71 100 -80 200 1 0 0 0 1 0 0 0 1 3001.dat +1 72 100 -88 140 0 0 -1 0 1 0 1 0 0 3029.dat +1 14 80 -112 80 1 0 0 0 1 0 0 0 1 3001.dat +1 14 140 -112 80 1 0 0 0 1 0 0 0 1 3003.dat +1 14 80 -112 120 1 0 0 0 1 0 0 0 1 3001.dat +1 14 140 -112 120 1 0 0 0 1 0 0 0 1 3003.dat +1 14 80 -112 160 1 0 0 0 1 0 0 0 1 3001.dat +1 14 140 -112 160 1 0 0 0 1 0 0 0 1 3003.dat +1 14 80 -112 200 1 0 0 0 1 0 0 0 1 3001.dat +1 14 140 -112 200 1 0 0 0 1 0 0 0 1 3003.dat +1 71 50 -136 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 50 -136 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 50 -136 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 50 -184 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 50 -184 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 50 -184 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 50 -160 160 0 0 -1 0 1 0 1 0 0 3009.dat +1 71 150 -136 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 150 -136 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 150 -136 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 150 -184 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 150 -184 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 150 -184 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 150 -160 160 0 0 -1 0 1 0 1 0 0 3009.dat +1 47 80 -136 70 1 0 0 0 1 0 0 0 1 3065.dat +1 47 80 -160 90 1 0 0 0 1 0 0 0 1 3039.dat +1 47 120 -136 70 1 0 0 0 1 0 0 0 1 3065.dat +1 47 120 -160 90 1 0 0 0 1 0 0 0 1 3039.dat +1 47 50 -184 80 0 0 -1 0 1 0 1 0 0 87544.dat +1 47 150 -184 80 0 0 -1 0 1 0 1 0 0 87544.dat +1 14 100 -112 50 1 0 0 0 1 0 0 0 1 3037.dat +1 14 100 -184 90 1 0 0 0 1 0 0 0 1 3037.dat +1 14 100 -192 140 1 0 0 0 1 0 0 0 1 3032.dat +1 2 70 -192 200 1 0 0 0 1 0 0 0 1 3021.dat +1 2 130 -192 200 1 0 0 0 1 0 0 0 1 3021.dat +1 322 100 -216 160 1 0 0 0 1 0 0 0 1 3001.dat +1 322 100 -216 200 1 0 0 0 1 0 0 0 1 3001.dat +1 322 70 -216 180 1 0 0 0 1 0 0 0 1 93273.dat +1 322 90 -216 180 1 0 0 0 1 0 0 0 1 93273.dat +1 322 110 -216 180 1 0 0 0 1 0 0 0 1 93273.dat +1 322 130 -216 180 1 0 0 0 1 0 0 0 1 93273.dat +1 85 100 -216 120 1 0 0 0 1 0 0 0 1 3941.dat +1 1 100 -224 120 1 0 0 0 1 0 0 0 1 3680.dat +1 71 100 -224 120 1 0 0 0 1 0 0 0 1 3679.dat +1 322 20 -232 110 1 0 0 0 1 0 0 0 1 3460.dat +1 322 180 -232 110 1 0 0 0 1 0 0 0 1 3460.dat +1 72 100 -240 120 1 0 0 0 1 0 0 0 1 14769.dat +1 71 100 -112 240 1 0 0 0 1 0 0 0 1 3001.dat +1 70 100 -120 280 0 0 -1 0 1 0 1 0 0 3795.dat +1 322 100 -144 260 0 0 -1 0 1 0 1 0 0 3001.dat +1 322 100 -144 340 0 0 -1 0 1 0 1 0 0 3001.dat +1 322 100 -152 300 0 0 -1 0 1 0 1 0 0 3020.dat +1 4 90 -192 370 1 0 0 0 1 0 0 0 1 60481a.dat +1 4 110 -192 370 1 0 0 0 1 0 0 0 1 60481a.dat +1 4 110 -216 370 0 0 -1 0 1 0 1 0 0 47905.dat +1 30 128 -206 370 0 -1 0 0 0 -1 1 0 0 15397.dat +1 4 136 -206 370 0 -1 0 0 0 -1 1 0 0 6141.dat +1 72 280 -24 110 1 0 0 0 1 0 0 0 1 3004.dat +1 72 280 -24 210 1 0 0 0 1 0 0 0 1 3004.dat +1 70 280 -32 160 0 0 -1 0 1 0 1 0 0 3795.dat +1 1 280 -40 120 1 0 0 0 1 0 0 0 1 3031.dat +1 1 280 -40 200 1 0 0 0 1 0 0 0 1 3031.dat +1 19 250 -48 80 0 0 -1 0 1 0 1 0 0 3023b.dat +1 19 250 -48 240 0 0 -1 0 1 0 1 0 0 3023b.dat +1 19 310 -48 80 0 0 -1 0 1 0 1 0 0 3023b.dat +1 19 310 -48 240 0 0 -1 0 1 0 1 0 0 3023b.dat +1 15 280 -48 90 1 0 0 0 1 0 0 0 1 3069b.dat +1 19 280 -64 120 1 0 0 0 1 0 0 0 1 3001.dat +1 15 270 -72 110 1 0 0 0 1 0 0 0 1 98138p0c.dat +1 15 290 -72 110 1 0 0 0 1 0 0 0 1 98138p0c.dat +1 1 280 -64 160 1 0 0 0 1 0 0 0 1 3003.dat +1 1 280 -64 200 1 0 0 0 1 0 0 0 1 3003.dat +1 84 250 -64 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 310 -64 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 270 -64 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 290 -64 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 260 -24 30 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 300 -24 30 0 0 -1 0 1 0 1 0 0 3002.dat +1 272 250 -48 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 310 -48 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 280 -72 40 1 0 0 0 1 0 0 0 1 3001.dat +1 84 230 -72 50 1 0 0 0 1 0 0 0 1 3005.dat +1 84 330 -72 50 1 0 0 0 1 0 0 0 1 3005.dat +1 25 240 -96 50 1 0 0 0 1 0 0 0 1 3004.dat +1 25 280 -96 50 1 0 0 0 1 0 0 0 1 3004.dat +1 25 320 -96 50 1 0 0 0 1 0 0 0 1 3004.dat +1 25 280 -96 30 1 0 0 0 1 0 0 0 1 3010.dat +1 19 280 -120 50 -1 0 0 0 1 0 0 0 -1 30414.dat +1 19 260 -120 30 1 0 0 0 1 0 0 0 1 3004.dat +1 19 300 -120 30 1 0 0 0 1 0 0 0 1 3004.dat +1 15 270 -110 68 -1 0 0 0 0 -1 0 -1 0 98138p07.dat +1 15 290 -110 68 -1 0 0 0 0 -1 0 -1 0 98138p07.dat +1 19 280 -128 40 1 0 0 0 1 0 0 0 1 3020.dat +1 25 280 -136 50 1 0 0 0 1 0 0 0 1 3710.dat diff --git a/brickwright/alt/alt-018/thumb-512.avif b/brickwright/alt/alt-018/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..a5f555486fd984b21e9a8b6277a225b37bf3c954 Binary files /dev/null and b/brickwright/alt/alt-018/thumb-512.avif differ diff --git a/brickwright/alt/alt-018/trace.jsonl.gz b/brickwright/alt/alt-018/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..f11eee51fd3db2c0de4503d25757e20af8176704 --- /dev/null +++ b/brickwright/alt/alt-018/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5828cd5cd9fd60cea7f98ccfdfa870a1db31c3cbf3f2083fbba85241309f5a80 +size 7917 diff --git a/brickwright/alt/alt-018/view-0.avif b/brickwright/alt/alt-018/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..b19876200d5a79745f3daae332fe766bdd0cabf7 Binary files /dev/null and b/brickwright/alt/alt-018/view-0.avif differ diff --git a/brickwright/alt/alt-018/view-1.avif b/brickwright/alt/alt-018/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..97b05b8cc517ceaf0f5843bd2bbbd0d14870b222 Binary files /dev/null and b/brickwright/alt/alt-018/view-1.avif differ diff --git a/brickwright/alt/alt-018/view-2.avif b/brickwright/alt/alt-018/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..f2db0cacfc53156df021863545cb4b630878cf88 Binary files /dev/null and b/brickwright/alt/alt-018/view-2.avif differ diff --git a/brickwright/alt/alt-018/view-3.avif b/brickwright/alt/alt-018/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..4773f1864f8264a70e57d08515ecc3e79dc8b25e Binary files /dev/null and b/brickwright/alt/alt-018/view-3.avif differ diff --git a/brickwright/alt/alt-018/view-4.avif b/brickwright/alt/alt-018/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..e58035d249804fea2142f5b68bbb680f9f0b220d Binary files /dev/null and b/brickwright/alt/alt-018/view-4.avif differ diff --git a/brickwright/alt/alt-018/view-5.avif b/brickwright/alt/alt-018/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..b92d54ea10e62b1d230049ed1b75c1837fbd14b7 Binary files /dev/null and b/brickwright/alt/alt-018/view-5.avif differ diff --git a/brickwright/alt/alt-018/view-6.avif b/brickwright/alt/alt-018/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..333392fc96f49cb07aded2853441210cc41887a7 Binary files /dev/null and b/brickwright/alt/alt-018/view-6.avif differ diff --git a/brickwright/alt/alt-018/view-7.avif b/brickwright/alt/alt-018/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..f43d08f8ba5a369bcfb70a06b11cdb164182a857 Binary files /dev/null and b/brickwright/alt/alt-018/view-7.avif differ diff --git a/brickwright/alt/alt-019/build.py b/brickwright/alt/alt-019/build.py new file mode 100644 index 0000000000000000000000000000000000000000..0adb1492614e88286ba2ac174b8a931264934933 --- /dev/null +++ b/brickwright/alt/alt-019/build.py @@ -0,0 +1,105 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + C=bl.Color + def add(pid,col,x,y,z,rot=bl.Rotation.DEG_0,name=None): + return b.add(bl.Element(pid,col),(x,y,z),rotation=rot,name=name) + # Four rubber landing wheels on two through-axle plates. + for j,y in enumerate((3,13)): + axle=add('2926',C.BLACK,8,y,1,name=f'landing_axle_{j}') + for side in (bl.Direction.LEFT,bl.Direction.RIGHT): + rim=bl.Element('6014b',C.YELLOW) + r=b.connect(rim,'hinge_3_on',to=axle.find_connector('hinge_3_in',facing=side)) + tyre=bl.Element('87697',C.BLACK) + b.connect(tyre,tyre.find_connector('fixed_13_on',facing=bl.Direction.FRONT),to=r.find_connector('fixed_13_in',facing=side)) + for i,y in enumerate(range(2,18,2)): + color=[C.DARK_BLUISH_GRAY]*3+[C.BLUE]*5 + add('3001',color[i],8,y,4/3) + for x in (8,10): + add('3660b',C.MEDIUM_AZURE,x,0,4/3) + add('3660b',C.WHITE,x,18,4/3,bl.Rotation.DEG_180) + for x in (8,10): add('3020',C.MEDIUM_AZURE,x,0,7/3,bl.Rotation.DEG_90) + for y in (4,6): add('3020',C.MEDIUM_AZURE,8,y,7/3) + add('3029',C.DARK_BLUISH_GRAY,4,8,7/3,name='wing_center') + for x in (8,10): add('3795',C.REDDISH_BROWN,x,12,7/3,bl.Rotation.DEG_90) + add('3020',C.TAN,8,18,7/3) + for x in (0,12): add('3034',C.LIGHT_BLUISH_GRAY,x,10,8/3,name=f'wing_{x}') + # Cabin band, narrow dark blue passenger windows separated by gray pillars. + for x in (8,11): + for y in range(2,18,2): + add('3004',C.WHITE if (x==8 and y==4) else C.LIGHT_BLUISH_GRAY if y in (6,12) else C.DARK_BLUE,x,y,8/3,bl.Rotation.DEG_90) + # Interior cross braces support both roof edges. + for y in (3,7,11,15): add('3004',C.LIGHT_BLUISH_GRAY,9,y,8/3) + for x in (8,10): add('3039',C.TRANS_CLEAR,x,0,8/3) + for x in (8,10): + add('6215',C.WHITE,x,2,11/3,bl.Rotation.DEG_90) + add('6215',C.WHITE,x,17,11/3,bl.Rotation.DEG_270) + for y in (5,9,13): add('3031',C.BLUE,8,y,11/3) + for y in (6,8,10,12): add('87079',C.LIGHT_BLUISH_GRAY,8,y,4) + for y in (5,14): add('2431',C.LIGHT_BLUISH_GRAY,8,y,4) + # Rear cabin and elevated tailplane. + add('3001',C.MEDIUM_AZURE,8,18,8/3) + add('3020',C.TAN,8,15,4) + add('3460',C.MEDIUM_AZURE,6,16,13/3,name='tailplane') + add('3004',C.WHITE,9,17,14/3,bl.Rotation.DEG_90) + add('60481a',C.WHITE,9,17,17/3,name='tail_fin') + # Sideways nacelles suspended from the outer wing plates. + for i,x in enumerate((3,17)): + mount=add('47905',C.BLACK,x,10,5/3,name=f'engine_pylon_{i}') + e=bl.Element('3941',C.DARK_PURPLE) + rear=b.connect(e,e.find_connector('antistud',toward=(.5,.5,0)),to=mount.find_connector('stud',facing=bl.Direction.FRONT),target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90),name=f'engine_{i}') + front=b.connect(e,e.find_connector('antistud',toward=(.5,.5,0)),to=rear.find_connector('stud',toward=rear.to_world((.5,.5,1))),target_rotation=rear.pose.rotation) + cap=bl.Element('14769',C.DARK_BLUISH_GRAY) + b.connect(cap,cap.find_connector('antistud',toward=(.5,.5,0)),to=front.find_connector('stud',toward=front.to_world((.5,.5,1))),target_rotation=front.pose.rotation) + # A narrow white boarding doorway in the near side of the forward cabin. + # The flight model is grounded precisely on its rubber tyres. + b=bl.translate_to_ground(b) + # Independent boarding stair and traveler diorama, beside the front door. + add('3028',C.BRIGHT_GREEN,-4,5,0,name='stair_base') + add('3022',C.TAN,0,5,1/3) + add('3001',C.LIGHT_BLUISH_GRAY,2,5,1/3) + for z in (4/3,5/3): + for y in (5,6): add('3023b',C.TAN,4,y,z) + for y in (5,6): add('3245c',C.LIGHT_BLUISH_GRAY,6,y,1/3) + for i,z in enumerate((2/3,4/3,2,7/3)): + add('3068b',C.DARK_TAN,2*i,5,z,name=f'stair_tread_{i}') + # Side guardrail held by a pair of tall posts and bridging header. + for x in (4,6): add('3245c',C.LIGHT_BLUISH_GRAY,x,7,1/3) + add('3010',C.LIGHT_BLUISH_GRAY,4,7,7/3) + add('15332',C.WHITE,4,7,10/3,name='stair_guardrail') + # Brick-built traveler: dark trousers, orange coat, yellow head and dark hair. + for x in (-3,-1): + add('3005',C.MEDIUM_NOUGAT,x,5,1/3) + add('3002',C.BLACK,-3,5,4/3,name='traveler_hips') + add('3004',C.ORANGE,-3,5,7/3,name='traveler_coat') + shoulder=add('47905',C.RED,-1,5,7/3,name='traveler_hand') + add('3005',C.YELLOW,-2,5,10/3,name='traveler_head') + add('6141',C.DARK_PURPLE,-2,5,13/3) + # A sideways rectangular brown case directly gripped by the hand's stud. + case=bl.Element('3004',C.MEDIUM_NOUGAT) + held=b.connect(case,case.find_connector('antistud',toward=bl.Direction.LEFT),to=shoulder.find_connector('stud',facing=bl.Direction.FRONT),target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90),name='suitcase') + return b + + +def run_tests(): + build=create_build() + tests=TestContext(build) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=2) + inventory=json.load(open('/inputs/parts.json')) + used=build.list_elements() + excess=[f'{e.ldraw_id}/{e.color.name}: {n}' for e,n in used.items() if n>inventory.get(e.ldraw_id,{}).get(e.color.name,0)] + tests.check('inventory limits',not excess,str(excess)) + parts=build.flattened_placements + tests.check('four rubber landing wheels',sum(p.content.ldraw_id=='87697' for p in parts)==4) + tests.check('one engine under each wing',all(build.named(f'engine_{i}').center.z < build.named(f'wing_{x}').center.z for i,x in enumerate((0,12)))) + tests.check('four rising stair treads',all(build.named(f'stair_tread_{i}').center.z < build.named(f'stair_tread_{i+1}').center.z for i in range(3))) + tests.check('traveler at foot of stairs',build.named('traveler_hips').center.x < build.named('stair_tread_0').center.x) + tests.check('suitcase attached to traveler',any(build.named('suitcase') in component and build.named('traveler_hand') in component for component in build.connected_components)) + return tests.report() diff --git a/brickwright/alt/alt-019/hero-1024.avif b/brickwright/alt/alt-019/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..f8266eb3f4d3f7eb73171bb2e3b9b9069b860890 Binary files /dev/null and b/brickwright/alt/alt-019/hero-1024.avif differ diff --git a/brickwright/alt/alt-019/model.mpd b/brickwright/alt/alt-019/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..d2d8626bdae4b20a699af89d6ae737fa4dda8918 --- /dev/null +++ b/brickwright/alt/alt-019/model.mpd @@ -0,0 +1,105 @@ +1 0 200 -30 70 1 0 0 0 1 0 0 0 1 2926.dat +1 14 250 -25 70 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 256 -25 70 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 150 -25 70 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 144 -25 70 0 0 1 -1 0 0 0 -1 0 87697.dat +1 0 200 -30 270 1 0 0 0 1 0 0 0 1 2926.dat +1 14 250 -25 270 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 256 -25 270 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 150 -25 270 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 144 -25 270 0 0 1 -1 0 0 0 -1 0 87697.dat +1 72 200 -54 60 1 0 0 0 1 0 0 0 1 3001.dat +1 72 200 -54 100 1 0 0 0 1 0 0 0 1 3001.dat +1 72 200 -54 140 1 0 0 0 1 0 0 0 1 3001.dat +1 1 200 -54 180 1 0 0 0 1 0 0 0 1 3001.dat +1 1 200 -54 220 1 0 0 0 1 0 0 0 1 3001.dat +1 1 200 -54 260 1 0 0 0 1 0 0 0 1 3001.dat +1 1 200 -54 300 1 0 0 0 1 0 0 0 1 3001.dat +1 1 200 -54 340 1 0 0 0 1 0 0 0 1 3001.dat +1 322 180 -54 30 1 0 0 0 1 0 0 0 1 3660b.dat +1 15 180 -54 370 -1 0 0 0 1 0 0 0 -1 3660b.dat +1 322 220 -54 30 1 0 0 0 1 0 0 0 1 3660b.dat +1 15 220 -54 370 -1 0 0 0 1 0 0 0 -1 3660b.dat +1 322 180 -62 40 0 0 -1 0 1 0 1 0 0 3020.dat +1 322 220 -62 40 0 0 -1 0 1 0 1 0 0 3020.dat +1 322 200 -62 100 1 0 0 0 1 0 0 0 1 3020.dat +1 322 200 -62 140 1 0 0 0 1 0 0 0 1 3020.dat +1 72 200 -62 200 1 0 0 0 1 0 0 0 1 3029.dat +1 70 180 -62 300 0 0 -1 0 1 0 1 0 0 3795.dat +1 70 220 -62 300 0 0 -1 0 1 0 1 0 0 3795.dat +1 19 200 -62 380 1 0 0 0 1 0 0 0 1 3020.dat +1 71 80 -70 220 1 0 0 0 1 0 0 0 1 3034.dat +1 71 320 -70 220 1 0 0 0 1 0 0 0 1 3034.dat +1 272 170 -86 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 15 170 -86 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 170 -86 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 170 -86 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 170 -86 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 170 -86 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 170 -86 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 170 -86 340 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 230 -86 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 230 -86 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 230 -86 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 230 -86 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 230 -86 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 230 -86 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 230 -86 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 230 -86 340 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 200 -86 70 1 0 0 0 1 0 0 0 1 3004.dat +1 71 200 -86 150 1 0 0 0 1 0 0 0 1 3004.dat +1 71 200 -86 230 1 0 0 0 1 0 0 0 1 3004.dat +1 71 200 -86 310 1 0 0 0 1 0 0 0 1 3004.dat +1 47 180 -86 30 1 0 0 0 1 0 0 0 1 3039.dat +1 47 220 -86 30 1 0 0 0 1 0 0 0 1 3039.dat +1 15 180 -110 60 0 0 -1 0 1 0 1 0 0 6215.dat +1 15 180 -110 380 0 0 1 0 1 0 -1 0 0 6215.dat +1 15 220 -110 60 0 0 -1 0 1 0 1 0 0 6215.dat +1 15 220 -110 380 0 0 1 0 1 0 -1 0 0 6215.dat +1 1 200 -94 140 1 0 0 0 1 0 0 0 1 3031.dat +1 1 200 -94 220 1 0 0 0 1 0 0 0 1 3031.dat +1 1 200 -94 300 1 0 0 0 1 0 0 0 1 3031.dat +1 71 200 -102 140 1 0 0 0 1 0 0 0 1 87079.dat +1 71 200 -102 180 1 0 0 0 1 0 0 0 1 87079.dat +1 71 200 -102 220 1 0 0 0 1 0 0 0 1 87079.dat +1 71 200 -102 260 1 0 0 0 1 0 0 0 1 87079.dat +1 71 200 -102 110 1 0 0 0 1 0 0 0 1 2431.dat +1 71 200 -102 290 1 0 0 0 1 0 0 0 1 2431.dat +1 322 200 -86 380 1 0 0 0 1 0 0 0 1 3001.dat +1 19 200 -102 320 1 0 0 0 1 0 0 0 1 3020.dat +1 322 200 -110 330 1 0 0 0 1 0 0 0 1 3460.dat +1 15 190 -134 360 0 0 -1 0 1 0 1 0 0 3004.dat +1 15 190 -182 370 1 0 0 0 1 0 0 0 1 60481a.dat +1 0 70 -62 210 1 0 0 0 1 0 0 0 1 47905.dat +1 85 60 -42 176 1 0 0 0 0 -1 0 1 0 3941.dat +1 85 60 -42 152 1 0 0 0 0 -1 0 1 0 3941.dat +1 72 60 -42 144 1 0 0 0 0 -1 0 1 0 14769.dat +1 0 350 -62 210 1 0 0 0 1 0 0 0 1 47905.dat +1 85 340 -42 176 1 0 0 0 0 -1 0 1 0 3941.dat +1 85 340 -42 152 1 0 0 0 0 -1 0 1 0 3941.dat +1 72 340 -42 144 1 0 0 0 0 -1 0 1 0 14769.dat +1 10 40 -8 160 1 0 0 0 1 0 0 0 1 3028.dat +1 19 20 -16 120 1 0 0 0 1 0 0 0 1 3022.dat +1 71 80 -32 120 1 0 0 0 1 0 0 0 1 3001.dat +1 19 100 -40 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 100 -40 130 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 100 -48 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 100 -48 130 1 0 0 0 1 0 0 0 1 3023b.dat +1 71 140 -56 110 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 140 -56 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 28 20 -24 120 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 60 -40 120 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 100 -56 120 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 140 -64 120 1 0 0 0 1 0 0 0 1 3068b.dat +1 71 100 -56 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 140 -56 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 120 -80 150 1 0 0 0 1 0 0 0 1 3010.dat +1 15 120 -128 150 1 0 0 0 1 0 0 0 1 15332.dat +1 84 -50 -32 110 1 0 0 0 1 0 0 0 1 3005.dat +1 84 -10 -32 110 1 0 0 0 1 0 0 0 1 3005.dat +1 0 -30 -56 120 1 0 0 0 1 0 0 0 1 3002.dat +1 25 -40 -80 110 1 0 0 0 1 0 0 0 1 3004.dat +1 4 -10 -80 110 1 0 0 0 1 0 0 0 1 47905.dat +1 14 -30 -104 110 1 0 0 0 1 0 0 0 1 3005.dat +1 85 -30 -112 110 1 0 0 0 1 0 0 0 1 6141.dat +1 84 -20 -70 76 1 0 0 0 0 -1 0 1 0 3004.dat diff --git a/brickwright/alt/alt-019/thumb-512.avif b/brickwright/alt/alt-019/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..fe73ed5fec45a7bb5253832476d31e5382036217 Binary files /dev/null and b/brickwright/alt/alt-019/thumb-512.avif differ diff --git a/brickwright/alt/alt-019/trace.jsonl.gz b/brickwright/alt/alt-019/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..2753d6d007b5e25a0d052d74bbc63a817f12c340 --- /dev/null +++ b/brickwright/alt/alt-019/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca7c317df495d4914a6b7147337d83e01f64e9a359ef03bc3c116fab8d9854b1 +size 8215 diff --git a/brickwright/alt/alt-019/view-0.avif b/brickwright/alt/alt-019/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..bf44d95c64b56b0f745fb24c9db782fe9133cedf Binary files /dev/null and b/brickwright/alt/alt-019/view-0.avif differ diff --git a/brickwright/alt/alt-019/view-1.avif b/brickwright/alt/alt-019/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..f0c38d382bb491162349ae757e8b63227021c35d Binary files /dev/null and b/brickwright/alt/alt-019/view-1.avif differ diff --git a/brickwright/alt/alt-019/view-2.avif b/brickwright/alt/alt-019/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..f4e638960ab86a350604481565376649ae114d64 Binary files /dev/null and b/brickwright/alt/alt-019/view-2.avif differ diff --git a/brickwright/alt/alt-019/view-3.avif b/brickwright/alt/alt-019/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..6cfcc58b84727bc414c14f8326ece2ed048892dd Binary files /dev/null and b/brickwright/alt/alt-019/view-3.avif differ diff --git a/brickwright/alt/alt-019/view-4.avif b/brickwright/alt/alt-019/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..df637882b2d1e465495420bdcce33db29863caa9 Binary files /dev/null and b/brickwright/alt/alt-019/view-4.avif differ diff --git a/brickwright/alt/alt-019/view-5.avif b/brickwright/alt/alt-019/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..3cebc6bb17259bb45d2e558278caf4ab70ce5e5c Binary files /dev/null and b/brickwright/alt/alt-019/view-5.avif differ diff --git a/brickwright/alt/alt-019/view-6.avif b/brickwright/alt/alt-019/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..a2a1e4fc19b85e8d859dc8f21dd295a591aac824 Binary files /dev/null and b/brickwright/alt/alt-019/view-6.avif differ diff --git a/brickwright/alt/alt-019/view-7.avif b/brickwright/alt/alt-019/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..4151c7c78685d97ffa92fa41c409c007de5f0717 Binary files /dev/null and b/brickwright/alt/alt-019/view-7.avif differ diff --git a/brickwright/alt/alt-020/build.py b/brickwright/alt/alt-020/build.py new file mode 100644 index 0000000000000000000000000000000000000000..1838b925a044636e542b8ec8031c4babc350dbee --- /dev/null +++ b/brickwright/alt/alt-020/build.py @@ -0,0 +1,128 @@ +import json +import math +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + vehicle = bl.LegoBuild() + C=bl.Color + def put(pid, col, xyz, rot=bl.Rotation.DEG_0, name=None): + return vehicle.add(bl.Element(pid,col),xyz,rotation=rot,name=name) + # The two small-wheel axles: tractor front and trailer. + for y,label in [(1,'front'),(15,'trailer')]: + axle=put('2926',C.BLACK,(0,y,1),name=label+'_axle') + for d,s in [(bl.Direction.LEFT,'left'),(bl.Direction.RIGHT,'right')]: + rim=vehicle.connect(bl.Element('6014b',C.YELLOW),'hinge_3_on',to=axle.find_connector('hinge_3_in',facing=d),name=label+'_'+s+'_rim') + tyre=bl.Element('87697',C.BLACK) + vehicle.connect(tyre,tyre.find_connector('fixed_13_on',facing=bl.Direction.BACK),to=rim.find_connector('fixed_13_in',toward=d),name=label+'_'+s+'_tyre') + put('3710',C.BLUE,(0,y,4/3)) + put('3710',C.BLUE,(0,y,5/3)) + # Large rear tires on outward-facing Technic pins. + for x,rot,s,d in [(0,bl.Rotation.DEG_270,'right',bl.Direction.RIGHT),(3,bl.Rotation.DEG_90,'left',bl.Direction.LEFT)]: + mount=put('2458',C.DARK_BLUISH_GRAY,(x,5,1),rot,name='rear_'+s+'_mount') + rim=vehicle.connect(bl.Element('55981',C.BLACK),'pin_hole',to=mount.find_connector('pin'),mounting=bl.Mounting(offset=-0.5),name='rear_'+s+'_rim') + tyre=bl.Element('58090',C.BLACK) + vehicle.connect(tyre,tyre.find_connector('fixed_8_on',facing=bl.Direction.BACK),to=rim.find_connector('fixed_8_in',toward=d),name='rear_'+s+'_tyre') + for x in [0,2]: + put('3034',C.LIGHT_BLUISH_GRAY,(x,0,2),bl.Rotation.DEG_90) + put('3795',C.REDDISH_BROWN,(x,12,2),bl.Rotation.DEG_90) + # A stud-locked drawbar joins the two rolling assemblies. + put('3460',C.MEDIUM_AZURE,(1,7,5/3),bl.Rotation.DEG_90,name='drawbar') + put('3666',C.MEDIUM_AZURE,(2,8,5/3),bl.Rotation.DEG_90) + put('3023b',C.ORANGE,(1,7,7/3)) + put('3004',C.DARK_BLUISH_GRAY,(1,7,8/3)) + # Green engine hood and grille, narrow enough to clear the front wheels. + put('3001',C.GREEN,(0,1,7/3)) + put('3001',C.GREEN,(0,3,7/3)) + for x in [0,2]: + put('3039',C.GREEN,(x,1,10/3)) + put('3003',C.GREEN,(x,3,10/3)) + if x == 0: + put('2431',C.GREEN,(x,1,13/3),bl.Rotation.DEG_90) + else: + put('3710',C.ORANGE,(x,1,13/3),bl.Rotation.DEG_90) + for x in [0,2]: + put('2877',C.WHITE,(x,0,7/3)) + for x in [0,3]: + lamp=put('4070',C.GREEN,(x,0,10/3)) + light=bl.Element('6141',C.TRANS_ORANGE) + vehicle.connect(light,'antistud',to=lamp.find_connector('stud',facing=bl.Direction.FRONT),name='headlamp_'+str(x)) + # Exhaust and open operator's station. + put('3005',C.LIGHT_BLUISH_GRAY,(2,3,14/3)) + put('3957b',C.LIGHT_BLUISH_GRAY,(2,3,17/3),name='exhaust') + put('3003',C.GREEN,(1,5,7/3)) + put('3068b',C.DARK_TAN,(1,5,10/3),name='seat') + put('3004',C.BLACK,(1,7,11/3),name='seat_back') + steer=put('47905',C.BLACK,(1,4,13/3),name='steering_column') + wheel=bl.Element('14769',C.DARK_BLUISH_GRAY) + vehicle.connect(wheel,wheel.find_connector('antistud',toward=(0,0,0)),to=steer.find_connector('stud',facing=bl.Direction.BACK),name='steering_wheel') + # Rear fenders over the oversized tires. + for x in [0,3]: + put('3004',C.DARK_GREEN,(x,5,7/3),bl.Rotation.DEG_90) + put('3710',C.TAN,(x,5,10/3),bl.Rotation.DEG_90) + # Trailer headboard/tailboard and low side rails. + for y in [12,17]: + put('15207',C.REDDISH_BROWN,(0,y,7/3)) + for x in [0,3]: + put('3010',C.REDDISH_BROWN,(x,13,7/3),bl.Rotation.DEG_90) + # Three rectangular hay bales, with tan binding bands. + for y in [13,15]: + put('3003',C.YELLOW,(1,y,7/3),name='hay_base_'+str(y)) + put('3022',C.TAN,(1,y,10/3)) + put('3003',C.YELLOW,(1,y,11/3),name='hay_top_'+str(y)) + put('3020',C.TAN,(0,14,14/3)) + put('3001',C.BRIGHT_LIGHT_ORANGE,(0,14,5),name='upper_hay') + put('3020',C.TAN,(0,14,6)) + + # Slight natural chassis pitch puts rear and trailer tires on the ground. + # Tires differ by 1/12 brick in the nominal grid assembly. + angle=-math.degrees(math.atan((1/12)*1.2/9.5)) + vehicle=bl.translate_to_ground(bl.LegoBuild([bl.Placement(vehicle,bl.Pose(bl.rotation_about(bl.Vec3(1,0,0),angle)))])) + build=bl.LegoBuild() + build.add_raw(vehicle,name='tractor_and_trailer') + # A freestanding, broad-footed brick-built farmer beside the wagon. + farmer=bl.LegoBuild() + def f(pid,col,pos,rot=bl.Rotation.DEG_0): + return farmer.add(bl.Element(pid,col),pos,rotation=rot) + for x in [0,2]: + f('3002',C.BLACK,(x,0,0),bl.Rotation.DEG_90) + f('3003',C.BLUE,(x,1,1)) + f('3001',C.BLUE,(0,1,2)) + f('3001',C.RED,(0,1,3)) + for x in [-1,4]: + f('3005',C.YELLOW,(x,1,2)) + f('3004',C.RED,(x,1,3),bl.Rotation.DEG_90) + f('3666',C.MEDIUM_AZURE,(-1,1,4)) + f('3710',C.ORANGE,(0,2,4)) + f('3003',C.MEDIUM_NOUGAT,(1,1,13/3)) + # Simple face represented by two printed eye tiles on SNOT bricks. + for x in [1,2]: + eye_mount=f('47905',C.BLACK,(x,1,16/3)) + eye=bl.Element('98138p07',C.WHITE) + farmer.connect(eye,'antistud',to=eye_mount.find_connector('stud',facing=bl.Direction.FRONT)) + # Rear studs of the face mounts remain unobstructed. + f('3031',C.BLUE,(0,0,19/3)) + f('3003',C.DARK_TAN,(1,1,20/3)) + f('3068b',C.DARK_TAN,(1,1,23/3)) + build.add(farmer,(8,12,0),name='farmer') + return build + + +def run_tests(): + build=create_build() + tests=TestContext(build) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=2) + inventory=json.load(open('/inputs/parts.json')) + bad=[] + for e,n in build.list_elements().items(): + allowed=inventory.get(e.ldraw_id,{}).get(e.color.name,0) + if n>allowed: bad.append((e.ldraw_id,e.color.name,n,allowed)) + tests.check('Only supplied parts and quantities',not bad,str(bad)) + counts=build.list_elements() + tests.check('Six tires, with larger rear pair',counts[bl.Element('58090',bl.Color.BLACK)]==2 and counts[bl.Element('87697',bl.Color.BLACK)]==4,'Two large rear and four smaller front/trailer tires') + tests.check('Hay load',counts[bl.Element('3003',bl.Color.YELLOW)]>=4,'Two lower bales and an upper bale') + tests.check('Farmer beside trailer','farmer' in build.names,'Freestanding farmer separate from connected towing assembly') + return tests.report() diff --git a/brickwright/alt/alt-020/hero-1024.avif b/brickwright/alt/alt-020/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..e1320c93aab6e0fb98b602964fd9aacfd2df605a Binary files /dev/null and b/brickwright/alt/alt-020/hero-1024.avif differ diff --git a/brickwright/alt/alt-020/model.mpd b/brickwright/alt/alt-020/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..5bcc514ec8a0a25d31addc9d91903b1b1fddf907 --- /dev/null +++ b/brickwright/alt/alt-020/model.mpd @@ -0,0 +1,101 @@ +0 FILE main.ldr +0 main +0 Name: main +1 16 0 0 0 1 0 0 0 1 0 0 0 1 tractor_and_trailer.ldr +1 16 180 0 240 1 0 0 0 1 0 0 0 1 farmer.ldr +0 FILE tractor_and_trailer.ldr +0 tractor_and_trailer +0 Name: tractor_and_trailer +1 16 0 -1.663066 0 1 0 0 0 0.999945 0.010526 0 -0.010526 0.999945 submodel.ldr +0 FILE farmer.ldr +0 farmer +0 Name: farmer +1 0 20 -24 30 0 0 -1 0 1 0 1 0 0 3002.dat +1 1 20 -48 40 1 0 0 0 1 0 0 0 1 3003.dat +1 0 60 -24 30 0 0 -1 0 1 0 1 0 0 3002.dat +1 1 60 -48 40 1 0 0 0 1 0 0 0 1 3003.dat +1 1 40 -72 40 1 0 0 0 1 0 0 0 1 3001.dat +1 4 40 -96 40 1 0 0 0 1 0 0 0 1 3001.dat +1 14 -10 -72 30 1 0 0 0 1 0 0 0 1 3005.dat +1 4 -10 -96 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 14 90 -72 30 1 0 0 0 1 0 0 0 1 3005.dat +1 4 90 -96 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 322 40 -104 30 1 0 0 0 1 0 0 0 1 3666.dat +1 25 40 -104 50 1 0 0 0 1 0 0 0 1 3710.dat +1 84 40 -128 40 1 0 0 0 1 0 0 0 1 3003.dat +1 0 30 -152 30 1 0 0 0 1 0 0 0 1 47905.dat +1 15 30 -142 12 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 0 50 -152 30 1 0 0 0 1 0 0 0 1 47905.dat +1 15 50 -142 12 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 1 40 -160 40 1 0 0 0 1 0 0 0 1 3031.dat +1 28 40 -184 40 1 0 0 0 1 0 0 0 1 3003.dat +1 28 40 -192 40 1 0 0 0 1 0 0 0 1 3068b.dat +0 FILE submodel.ldr +0 submodel +0 Name: submodel +1 0 40 -32 30 1 0 0 0 1 0 0 0 1 2926.dat +1 14 90 -27 30 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 96 -27 30 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 -10 -27 30 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 -16 -27 30 0 0 -1 1 0 0 0 -1 0 87697.dat +1 1 40 -40 30 1 0 0 0 1 0 0 0 1 3710.dat +1 1 40 -48 30 1 0 0 0 1 0 0 0 1 3710.dat +1 0 40 -32 310 1 0 0 0 1 0 0 0 1 2926.dat +1 14 90 -27 310 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 96 -27 310 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 -10 -27 310 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 -16 -27 310 0 0 -1 1 0 0 0 -1 0 87697.dat +1 1 40 -40 310 1 0 0 0 1 0 0 0 1 3710.dat +1 1 40 -48 310 1 0 0 0 1 0 0 0 1 3710.dat +1 72 10 -48 120 0 0 1 0 1 0 -1 0 0 2458.dat +1 0 -21 -38 120 0 0 1 0 1 0 -1 0 0 55981.dat +1 0 -21 -38 120 0 0 -1 0 1 0 1 0 0 58090.dat +1 72 70 -48 120 0 0 -1 0 1 0 1 0 0 2458.dat +1 0 101 -38 120 0 0 -1 0 1 0 1 0 0 55981.dat +1 0 101 -38 120 0 0 -1 0 1 0 1 0 0 58090.dat +1 71 20 -56 80 0 0 -1 0 1 0 1 0 0 3034.dat +1 70 20 -56 300 0 0 -1 0 1 0 1 0 0 3795.dat +1 71 60 -56 80 0 0 -1 0 1 0 1 0 0 3034.dat +1 70 60 -56 300 0 0 -1 0 1 0 1 0 0 3795.dat +1 322 30 -48 220 0 0 -1 0 1 0 1 0 0 3460.dat +1 322 50 -48 220 0 0 -1 0 1 0 1 0 0 3666.dat +1 25 40 -64 150 1 0 0 0 1 0 0 0 1 3023b.dat +1 72 40 -88 150 1 0 0 0 1 0 0 0 1 3004.dat +1 2 40 -80 40 1 0 0 0 1 0 0 0 1 3001.dat +1 2 40 -80 80 1 0 0 0 1 0 0 0 1 3001.dat +1 2 20 -104 50 1 0 0 0 1 0 0 0 1 3039.dat +1 2 20 -104 80 1 0 0 0 1 0 0 0 1 3003.dat +1 2 10 -112 60 0 0 -1 0 1 0 1 0 0 2431.dat +1 2 60 -104 50 1 0 0 0 1 0 0 0 1 3039.dat +1 2 60 -104 80 1 0 0 0 1 0 0 0 1 3003.dat +1 25 50 -112 60 0 0 -1 0 1 0 1 0 0 3710.dat +1 15 20 -80 10 1 0 0 0 1 0 0 0 1 2877.dat +1 15 60 -80 10 1 0 0 0 1 0 0 0 1 2877.dat +1 2 10 -104 10 1 0 0 0 1 0 0 0 1 4070.dat +1 57 10 -94 -4 1 0 0 0 0 -1 0 1 0 6141.dat +1 2 70 -104 10 1 0 0 0 1 0 0 0 1 4070.dat +1 57 70 -94 -4 1 0 0 0 0 -1 0 1 0 6141.dat +1 71 50 -136 70 1 0 0 0 1 0 0 0 1 3005.dat +1 71 50 -144 70 1 0 0 0 1 0 0 0 1 3957b.dat +1 2 40 -80 120 1 0 0 0 1 0 0 0 1 3003.dat +1 28 40 -88 120 1 0 0 0 1 0 0 0 1 3068b.dat +1 0 40 -112 150 1 0 0 0 1 0 0 0 1 3004.dat +1 0 30 -128 90 1 0 0 0 1 0 0 0 1 47905.dat +1 72 30 -118 108 1 0 0 0 0 1 0 -1 0 14769.dat +1 288 10 -80 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 10 -88 140 0 0 -1 0 1 0 1 0 0 3710.dat +1 288 70 -80 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 70 -88 140 0 0 -1 0 1 0 1 0 0 3710.dat +1 70 40 -80 250 1 0 0 0 1 0 0 0 1 15207.dat +1 70 40 -80 350 1 0 0 0 1 0 0 0 1 15207.dat +1 70 10 -80 300 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 70 -80 300 0 0 -1 0 1 0 1 0 0 3010.dat +1 14 40 -80 280 1 0 0 0 1 0 0 0 1 3003.dat +1 19 40 -88 280 1 0 0 0 1 0 0 0 1 3022.dat +1 14 40 -112 280 1 0 0 0 1 0 0 0 1 3003.dat +1 14 40 -80 320 1 0 0 0 1 0 0 0 1 3003.dat +1 19 40 -88 320 1 0 0 0 1 0 0 0 1 3022.dat +1 14 40 -112 320 1 0 0 0 1 0 0 0 1 3003.dat +1 19 40 -120 300 1 0 0 0 1 0 0 0 1 3020.dat +1 191 40 -144 300 1 0 0 0 1 0 0 0 1 3001.dat +1 19 40 -152 300 1 0 0 0 1 0 0 0 1 3020.dat diff --git a/brickwright/alt/alt-020/thumb-512.avif b/brickwright/alt/alt-020/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..586a8478338be0f8137ea126ea30b96b2f9d6b42 Binary files /dev/null and b/brickwright/alt/alt-020/thumb-512.avif differ diff --git a/brickwright/alt/alt-020/trace.jsonl.gz b/brickwright/alt/alt-020/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..c60663042b1b7dc081e2c08c2a2db32290574639 --- /dev/null +++ b/brickwright/alt/alt-020/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:389aa3f11003632c0f737b42cf0b242f59c86aa3fa6b54d33dca45b3513486f9 +size 8746 diff --git a/brickwright/alt/alt-020/view-0.avif b/brickwright/alt/alt-020/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..3d51ae4893c121058e8b7e7b798f124003bf467d Binary files /dev/null and b/brickwright/alt/alt-020/view-0.avif differ diff --git a/brickwright/alt/alt-020/view-1.avif b/brickwright/alt/alt-020/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..e18ede30f7a869d8d616eda2bbcf9f2c136510d7 Binary files /dev/null and b/brickwright/alt/alt-020/view-1.avif differ diff --git a/brickwright/alt/alt-020/view-2.avif b/brickwright/alt/alt-020/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..87772fb4c7108f71d2a740722bc821381a8ad28a Binary files /dev/null and b/brickwright/alt/alt-020/view-2.avif differ diff --git a/brickwright/alt/alt-020/view-3.avif b/brickwright/alt/alt-020/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..27511f4c789d489115c88109837cbb758cc5d667 Binary files /dev/null and b/brickwright/alt/alt-020/view-3.avif differ diff --git a/brickwright/alt/alt-020/view-4.avif b/brickwright/alt/alt-020/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..e7cfc6ddda0d41a823ab6cd6b269cc68e3d49e94 Binary files /dev/null and b/brickwright/alt/alt-020/view-4.avif differ diff --git a/brickwright/alt/alt-020/view-5.avif b/brickwright/alt/alt-020/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..db550af0f595e1a1efe628471d2f56607e54c756 Binary files /dev/null and b/brickwright/alt/alt-020/view-5.avif differ diff --git a/brickwright/alt/alt-020/view-6.avif b/brickwright/alt/alt-020/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..70fa137fc9dbb84acb758e63709290e882160e3c Binary files /dev/null and b/brickwright/alt/alt-020/view-6.avif differ diff --git a/brickwright/alt/alt-020/view-7.avif b/brickwright/alt/alt-020/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..ae11a88a60467f41b4537afc7494cfea03de8644 Binary files /dev/null and b/brickwright/alt/alt-020/view-7.avif differ diff --git a/brickwright/alt/alt-021/build.py b/brickwright/alt/alt-021/build.py new file mode 100644 index 0000000000000000000000000000000000000000..475f630009ed8cc7c856241774093f9e94f6cfe6 --- /dev/null +++ b/brickwright/alt/alt-021/build.py @@ -0,0 +1,124 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + C = bl.Color + def put(pid, color, x,y,z, rot=0, name=None): + return b.add(bl.Element(pid, getattr(C,color)), (x,y,z), bl.Rotation(rot), name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='landscape') + # Grey apron and the mine floor. + put('3029','DARK_BLUISH_GRAY',2,10,1/3,name='mine_floor') + # Stout timber jambs, with log-textured faces. + for x in (4,10): + put('3002','REDDISH_BROWN',x,10,2/3,1) + for k in range(4): + put('30136','DARK_ORANGE',x,10,5/3+k) + for x in (4,8): + put('3010','REDDISH_BROWN',x,10,17/3) + put('3795','REDDISH_BROWN',5,10,20/3,name='timber_cap') + # Rough rock shoulders flanking the entrance. + for x in (2,12): + put('3001','LIGHT_BLUISH_GRAY',x,10,2/3,1) + put('3001','DARK_TAN',x,10,5/3,1) + put('3001','LIGHT_BLUISH_GRAY',x,10,8/3,1) + for y in (11,13): + put('3245c','LIGHT_BLUISH_GRAY',x,y,11/3) + put('85080','LIGHT_BLUISH_GRAY',x,11,17/3) + # A shadowed rear wall gives the opening real depth. + for k in range(4): + for x in (5,8): + put('3002','BLACK',x,14,1/3+k) + for k in range(2): + put('2456','BLACK',5,14,13/3+k) + # Stone arch and roof ledges. + for x in (4,10): + for k in range(5): + # Narrow inner returns behind the wooden portal. + if k < 4: + put('3004','LIGHT_BLUISH_GRAY',x,13,2/3+k) + put('15254','LIGHT_BLUISH_GRAY',5,13,14/3,name='stone_arch') + put('3034','LIGHT_BLUISH_GRAY',4,10,7) + put('3034','LIGHT_BLUISH_GRAY',4,12,20/3) + for x in (4,8): + put('3010','LIGHT_BLUISH_GRAY',x,12,7) + # Short rails and sleepers lead out of the opening. + for y in (2,8): + put('3020','TAN',5,y,1/3) + for x in (3,10): + put('87079','LIGHT_BLUISH_GRAY',x,2,1/3,1) + put('2431','LIGHT_BLUISH_GRAY',x,6,1/3,1) + # Discreet studded pedestal fixes the parked cart to the scenery. + put('3003','DARK_TAN',6,5,1/3) + put('3022','TAN',6,5,4/3) + put('3022','TAN',6,5,5/3) + # Four genuine rim/tyre assemblies on two transverse wheel-bearing plates. + for i,y in enumerate((3,8)): + axle=put('2926','BLACK',5,y,5/3,name='axle_'+str(i)) + for j,d in enumerate((bl.Direction.LEFT,bl.Direction.RIGHT)): + rim=b.connect(bl.Element('6014b',C.YELLOW),'hinge_3_on', + to=axle.find_connector('hinge_3_in',toward=d),name=f'wheel_{i}_{j}') + tyre=bl.Element('87697',C.BLACK) + b.connect(tyre,tyre.find_connector('fixed_13_on',facing=bl.Direction.BACK), + to=rim.find_connector('fixed_13_in',facing=rim.pose.rotation@bl.Vec3(0,1,0))) + # Six-stud long open hopper. + put('3795','REDDISH_BROWN',5,3,2,1,name='cart_floor_left') + # The second half uses neutral plates from the inventory. + put('3021','GREEN',7,3,2,1) + put('3021','GREEN',7,6,2,1) + put('15207','REDDISH_BROWN',5,4,7/3,1,name='cart_side_left') + put('15207','REDDISH_BROWN',8,4,7/3,3,name='cart_side_right') + for y in (3,8): + put('3010','REDDISH_BROWN',5,y,7/3) + for y in (4,6): + put('3003','YELLOW',6,y,7/3,name='ore_'+str(y)) + for x in (6,7): + put('93273','YELLOW',x,4,10/3,name='ore_ridge_'+str(x)) + + # Brick-built miner: separated boots, blue workwear and a goggled face. + for x in (12,14): + for k in range(2): + put('3004','DARK_BLUE',x,5,1/3+k,1) + put('3002','BLUE',12,5,7/3) + put('3002','BLUE',12,5,10/3) + for x in (11,15): + put('3005','YELLOW',x,5,7/3) + put('3004','DARK_BLUE',x,5,10/3,1) + put('3710','BLUE',12,5,13/3) + put('3710','BLUE',11,6,13/3) + put('3003','YELLOW',13,5,14/3,name='miner_face') + for x in (13,14): + face=put('47905','BLACK',x,5,17/3,name='goggle_'+str(x)) + eye=bl.Element('98138p07',C.WHITE) + b.connect(eye,'antistud',to=face.find_connector('stud',facing=bl.Direction.FRONT)) + # The rear-facing goggle studs remain exposed inside the helmet. + put('3003','ORANGE',13,5,20/3,name='hard_hat') + put('3023b','ORANGE',13,5,23/3) + # A brick-built pick, firmly held by the miner's projecting hand. + put('3023b','TAN',11,4,13/3,1,name='grip') + for k in range(2): + put('3062b','REDDISH_BROWN',11,4,14/3+k) + put('3023b','TAN',11,4,20/3,name='pickaxe_head') + put('3040b','BLACK',10,4,7,3) + put('3040b','BLACK',12,4,7,1) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + allowed=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):v for k,v in used.items() if v>allowed.get(k[0],{}).get(k[1],0)} + tests.check('inventory limits',not excess,str(excess)) + tests.check('four cart wheels',sum(v for (p,c),v in used.items() if p=='6014b')==4) + tests.check('yellow ore in hopper',all(b.named('ore_'+str(y)).content.color==bl.Color.YELLOW for y in (4,6))) + tests.check('timber portal',used['30136','DARK_ORANGE']==8) + tests.check('miner and held pickaxe',all(n in b.names for n in ('hard_hat','grip','pickaxe_head'))) + return tests.report() diff --git a/brickwright/alt/alt-021/hero-1024.avif b/brickwright/alt/alt-021/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..c544569cd581c73ab17ccf29ea663d293beeb144 Binary files /dev/null and b/brickwright/alt/alt-021/hero-1024.avif differ diff --git a/brickwright/alt/alt-021/model.mpd b/brickwright/alt/alt-021/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..00fb3340f1e05f0ddc0c5f2aa470763d10866a0e --- /dev/null +++ b/brickwright/alt/alt-021/model.mpd @@ -0,0 +1,105 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 72 160 -16 240 1 0 0 0 1 0 0 0 1 3029.dat +1 70 100 -40 230 0 0 -1 0 1 0 1 0 0 3002.dat +1 484 100 -64 210 1 0 0 0 1 0 0 0 1 30136.dat +1 484 100 -88 210 1 0 0 0 1 0 0 0 1 30136.dat +1 484 100 -112 210 1 0 0 0 1 0 0 0 1 30136.dat +1 484 100 -136 210 1 0 0 0 1 0 0 0 1 30136.dat +1 70 220 -40 230 0 0 -1 0 1 0 1 0 0 3002.dat +1 484 220 -64 210 1 0 0 0 1 0 0 0 1 30136.dat +1 484 220 -88 210 1 0 0 0 1 0 0 0 1 30136.dat +1 484 220 -112 210 1 0 0 0 1 0 0 0 1 30136.dat +1 484 220 -136 210 1 0 0 0 1 0 0 0 1 30136.dat +1 70 120 -160 210 1 0 0 0 1 0 0 0 1 3010.dat +1 70 200 -160 210 1 0 0 0 1 0 0 0 1 3010.dat +1 70 160 -168 220 1 0 0 0 1 0 0 0 1 3795.dat +1 71 60 -40 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 28 60 -64 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 60 -88 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 60 -136 230 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 60 -136 270 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 50 -160 250 1 0 0 0 1 0 0 0 1 85080.dat +1 71 260 -40 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 28 260 -64 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 260 -88 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 260 -136 230 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 260 -136 270 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 250 -160 250 1 0 0 0 1 0 0 0 1 85080.dat +1 0 130 -32 300 1 0 0 0 1 0 0 0 1 3002.dat +1 0 190 -32 300 1 0 0 0 1 0 0 0 1 3002.dat +1 0 130 -56 300 1 0 0 0 1 0 0 0 1 3002.dat +1 0 190 -56 300 1 0 0 0 1 0 0 0 1 3002.dat +1 0 130 -80 300 1 0 0 0 1 0 0 0 1 3002.dat +1 0 190 -80 300 1 0 0 0 1 0 0 0 1 3002.dat +1 0 130 -104 300 1 0 0 0 1 0 0 0 1 3002.dat +1 0 190 -104 300 1 0 0 0 1 0 0 0 1 3002.dat +1 0 160 -128 300 1 0 0 0 1 0 0 0 1 2456.dat +1 0 160 -152 300 1 0 0 0 1 0 0 0 1 2456.dat +1 71 100 -40 270 1 0 0 0 1 0 0 0 1 3004.dat +1 71 100 -64 270 1 0 0 0 1 0 0 0 1 3004.dat +1 71 100 -88 270 1 0 0 0 1 0 0 0 1 3004.dat +1 71 100 -112 270 1 0 0 0 1 0 0 0 1 3004.dat +1 71 220 -40 270 1 0 0 0 1 0 0 0 1 3004.dat +1 71 220 -64 270 1 0 0 0 1 0 0 0 1 3004.dat +1 71 220 -88 270 1 0 0 0 1 0 0 0 1 3004.dat +1 71 220 -112 270 1 0 0 0 1 0 0 0 1 3004.dat +1 71 160 -160 270 1 0 0 0 1 0 0 0 1 15254.dat +1 71 160 -176 220 1 0 0 0 1 0 0 0 1 3034.dat +1 71 160 -168 260 1 0 0 0 1 0 0 0 1 3034.dat +1 71 120 -192 250 1 0 0 0 1 0 0 0 1 3010.dat +1 71 200 -192 250 1 0 0 0 1 0 0 0 1 3010.dat +1 19 140 -16 60 1 0 0 0 1 0 0 0 1 3020.dat +1 19 140 -16 180 1 0 0 0 1 0 0 0 1 3020.dat +1 71 80 -16 80 0 0 -1 0 1 0 1 0 0 87079.dat +1 71 70 -16 160 0 0 -1 0 1 0 1 0 0 2431.dat +1 71 220 -16 80 0 0 -1 0 1 0 1 0 0 87079.dat +1 71 210 -16 160 0 0 -1 0 1 0 1 0 0 2431.dat +1 28 140 -32 120 1 0 0 0 1 0 0 0 1 3003.dat +1 19 140 -40 120 1 0 0 0 1 0 0 0 1 3022.dat +1 19 140 -48 120 1 0 0 0 1 0 0 0 1 3022.dat +1 0 140 -48 70 1 0 0 0 1 0 0 0 1 2926.dat +1 14 190 -43 70 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 196 -43 70 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 90 -43 70 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 84 -43 70 0 0 1 -1 0 0 0 -1 0 87697.dat +1 0 140 -48 170 1 0 0 0 1 0 0 0 1 2926.dat +1 14 190 -43 170 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 196 -43 170 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 90 -43 170 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 84 -43 170 0 0 1 -1 0 0 0 -1 0 87697.dat +1 70 120 -56 120 0 0 -1 0 1 0 1 0 0 3795.dat +1 2 160 -56 90 0 0 -1 0 1 0 1 0 0 3021.dat +1 2 160 -56 150 0 0 -1 0 1 0 1 0 0 3021.dat +1 70 110 -80 120 0 0 -1 0 1 0 1 0 0 15207.dat +1 70 170 -80 120 0 0 1 0 1 0 -1 0 0 15207.dat +1 70 140 -80 70 1 0 0 0 1 0 0 0 1 3010.dat +1 70 140 -80 170 1 0 0 0 1 0 0 0 1 3010.dat +1 14 140 -80 100 1 0 0 0 1 0 0 0 1 3003.dat +1 14 140 -80 140 1 0 0 0 1 0 0 0 1 3003.dat +1 14 130 -80 120 1 0 0 0 1 0 0 0 1 93273.dat +1 14 150 -80 120 1 0 0 0 1 0 0 0 1 93273.dat +1 272 250 -32 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 250 -56 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 290 -32 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 290 -56 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 1 270 -80 120 1 0 0 0 1 0 0 0 1 3002.dat +1 1 270 -104 120 1 0 0 0 1 0 0 0 1 3002.dat +1 14 230 -80 110 1 0 0 0 1 0 0 0 1 3005.dat +1 272 230 -104 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 14 310 -80 110 1 0 0 0 1 0 0 0 1 3005.dat +1 272 310 -104 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 1 280 -112 110 1 0 0 0 1 0 0 0 1 3710.dat +1 1 260 -112 130 1 0 0 0 1 0 0 0 1 3710.dat +1 14 280 -136 120 1 0 0 0 1 0 0 0 1 3003.dat +1 0 270 -160 110 1 0 0 0 1 0 0 0 1 47905.dat +1 15 270 -150 92 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 0 290 -160 110 1 0 0 0 1 0 0 0 1 47905.dat +1 15 290 -150 92 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 25 280 -184 120 1 0 0 0 1 0 0 0 1 3003.dat +1 25 280 -192 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 230 -112 100 0 0 -1 0 1 0 1 0 0 3023b.dat +1 70 230 -136 90 1 0 0 0 1 0 0 0 1 3062b.dat +1 70 230 -160 90 1 0 0 0 1 0 0 0 1 3062b.dat +1 19 240 -168 90 1 0 0 0 1 0 0 0 1 3023b.dat +1 0 230 -192 90 0 0 1 0 1 0 -1 0 0 3040b.dat +1 0 250 -192 90 0 0 -1 0 1 0 1 0 0 3040b.dat diff --git a/brickwright/alt/alt-021/thumb-512.avif b/brickwright/alt/alt-021/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..e51a0ed009048b8edc7fb1848da83bed94e68333 Binary files /dev/null and b/brickwright/alt/alt-021/thumb-512.avif differ diff --git a/brickwright/alt/alt-021/trace.jsonl.gz b/brickwright/alt/alt-021/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..eb99efb1e774e13ea3fc33269b5d22cf5579e5d2 --- /dev/null +++ b/brickwright/alt/alt-021/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7abd2c69d368d46fe8514a27d6885f86834196ee705c6d217fbec3d7855989c0 +size 9098 diff --git a/brickwright/alt/alt-021/view-0.avif b/brickwright/alt/alt-021/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..b7c4312e6acdc80092ed477ca619e91da76a7c96 Binary files /dev/null and b/brickwright/alt/alt-021/view-0.avif differ diff --git a/brickwright/alt/alt-021/view-1.avif b/brickwright/alt/alt-021/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..4a4babf5b606d1d115118a87514b0a6b2be9fec1 Binary files /dev/null and b/brickwright/alt/alt-021/view-1.avif differ diff --git a/brickwright/alt/alt-021/view-2.avif b/brickwright/alt/alt-021/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..1c8e78ab9e7b1ef64b38f3caf8f5615c424f5977 Binary files /dev/null and b/brickwright/alt/alt-021/view-2.avif differ diff --git a/brickwright/alt/alt-021/view-3.avif b/brickwright/alt/alt-021/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..2c3a81779154610fe38e0a0344de264b496cb24b Binary files /dev/null and b/brickwright/alt/alt-021/view-3.avif differ diff --git a/brickwright/alt/alt-021/view-4.avif b/brickwright/alt/alt-021/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..66f33f8b798c4325843c01e85a237af99346b469 Binary files /dev/null and b/brickwright/alt/alt-021/view-4.avif differ diff --git a/brickwright/alt/alt-021/view-5.avif b/brickwright/alt/alt-021/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..9d89b3e2b8e6abf4a24b75dbcf4ce56ef3f84297 Binary files /dev/null and b/brickwright/alt/alt-021/view-5.avif differ diff --git a/brickwright/alt/alt-021/view-6.avif b/brickwright/alt/alt-021/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..977fd842c2d626e5cb8174a48a8422aef2c4d7a2 Binary files /dev/null and b/brickwright/alt/alt-021/view-6.avif differ diff --git a/brickwright/alt/alt-021/view-7.avif b/brickwright/alt/alt-021/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..c68fc3b4c2ce62cc7a92152fd933f14e15c95135 Binary files /dev/null and b/brickwright/alt/alt-021/view-7.avif differ diff --git a/brickwright/alt/alt-022/build.py b/brickwright/alt/alt-022/build.py new file mode 100644 index 0000000000000000000000000000000000000000..9b6c7503fc97df5a6c2cdf197b92b57120a5d13e --- /dev/null +++ b/brickwright/alt/alt-022/build.py @@ -0,0 +1,83 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + wagon = bl.LegoBuild() + lift=0 + def put(id, color, xyz, rot=bl.Rotation.DEG_0, name=None): + return wagon.add(bl.Element(id, getattr(bl.Color,color)), (xyz[0],xyz[1],xyz[2]+lift), rotation=rot, name=name) + # Two complete wheelsets, mounted under a long central chassis. + for i,x in enumerate((2,9)): + axle=put('2926','BLACK',(x,0,0),bl.Rotation.DEG_90, 'axle_'+str(i)) + for j,c in enumerate(axle.find_connectors('hinge_3_in')): + rim=wagon.connect(bl.Element('6014b',bl.Color.YELLOW),'hinge_3_on',to=c,name=f'rim_{i}_{j}') + tyre=bl.Element('87697',bl.Color.BLACK) + wagon.connect(tyre,tyre.find_connector('fixed_13_on',facing=bl.Direction.FRONT),to=rim.find_connector('fixed_13_in',toward=bl.Direction.FRONT),name=f'tyre_{i}_{j}') + for x in (2,9): + for y in (0,2): put('3004','DARK_BLUISH_GRAY',(x,y,1/3),bl.Rotation.DEG_90) + lift=1 + put('3029','DARK_BLUISH_GRAY',(0,0,1/3),name='chassis') + for x in (0,6): put('3795','REDDISH_BROWN',(x,-2,1/3)) + for x in (0,8): put('3020','TAN',(x,4,1/3)) + for x in (4,6): put('3022','TAN',(x,4,1/3)) + # Cross-members tie the floor panels and both long walls together. + for x in (1,9): put('3034','LIGHT_BLUISH_GRAY',(x,-2,2/3),bl.Rotation.DEG_90) + # Lower wall course. Front wall is two studs thick, forming a stable resting face. + for x in (0,3,6,9): put('3002','REDDISH_BROWN',(x,-2,1)) + for x in (4,6): + for y in (4,5): put('3023b','TAN',(x,y,2/3)) + for x in (0,4,8): put('3010','LIGHT_BLUISH_GRAY',(x,5,1)) + for x in (0,11): + for y in (0,2): put('3004','LIGHT_BLUISH_GRAY',(x,y,1),bl.Rotation.DEG_90) + put('3005','LIGHT_BLUISH_GRAY',(x,4,1)) + # Staggered rust-brown rim, with a visibly hollow cargo compartment. + for x in (0,4,8): put('3010','REDDISH_BROWN',(x,-2,2)) + for x in (0,6): put('3009','DARK_ORANGE',(x,5,2)) + for x in (0,11): + for y in (-1,1,3): put('30136','DARK_ORANGE',(x,y,2),bl.Rotation.DEG_90) + # Interior planking hides the multicolour structural floor. + put('87079','LIGHT_BLUISH_GRAY',(4,2,2/3)) + # Buffers at either end, visible below the tipped body. + for x in (-1,10): + put('3002','BLACK',(x,1,-2/3)) + # Roll exactly onto the broad long side; its wall, not the tyres, bears the load. + scene=bl.LegoBuild() + tipped=bl.LegoBuild() + tipped.add_raw(wagon,bl.Pose(bl.rotation_about(bl.Vec3(1,0,0),90),bl.Position.ZERO)) + tipped=bl.translate_to_ground(tipped) + scene.add_raw(tipped,name='overturned_wagon') + coal=bl.LegoBuild() + def lump(id,x,y,z,rot=bl.Rotation.DEG_0): + coal.add(bl.Element(id,bl.Color.BLACK),(x,y,z),rotation=rot) + # Broad foot, staggered centre and broken angular summit. + lump('2456',0,0,0); lump('2456',1,2,0) + for x,y in ((0,0),(3,0),(1,2),(4,2)): lump('3002',x,y,1) + for x,y in ((1,1),(4,2)): lump('3002',x,y,2) + lump('3004',2,1,3) + lump('3040b',1,1,3); lump('3040b',4,2,3,bl.Rotation.DEG_180) + lump('85984',2,2,3) + lump('3040b',0,0,2); lump('3040b',6,2,3,bl.Rotation.DEG_180) + scene.add_raw(coal,bl.Pose(translation=bl.Position(2,-9.5,0)),name='spilled_coal') + return scene + + +def run_tests(): + build=create_build() + tests=TestContext(build) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=2) + inventory=json.load(open('/inputs/parts.json')) + counts=Counter((p.content.ldraw_id,p.content.color.name) for p in build.flattened_placements) + excess={str(k):v for k,v in counts.items() if v>inventory.get(k[0],{}).get(k[1],0)} + tests.check('Only available inventory',not excess,str(excess)) + wagon=build.named('overturned_wagon') + coal=build.named('spilled_coal') + tests.check('Four exposed wheels',sum(p.content.ldraw_id=='87697' for p in build.flattened_placements)==4) + tests.check('Black coal heap',all(p.content.color==bl.Color.BLACK for p in coal.content.flattened_placements)) + tests.check('Wagon lying on its side',wagon.height>5 and wagon.depth<7) + tests.check('Coal beside the open wagon',coal.bounding_box[1].y < wagon.bounding_box[0].y) + return tests.report() diff --git a/brickwright/alt/alt-022/hero-1024.avif b/brickwright/alt/alt-022/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..b50470425830bd93c69bdadf69c52f9429bdba69 Binary files /dev/null and b/brickwright/alt/alt-022/hero-1024.avif differ diff --git a/brickwright/alt/alt-022/model.mpd b/brickwright/alt/alt-022/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..27f6c53a770ee1c923664a8913115b2b23755241 --- /dev/null +++ b/brickwright/alt/alt-022/model.mpd @@ -0,0 +1,83 @@ +0 FILE main.ldr +0 main +0 Name: main +1 16 0 0 0 1 0 0 0 1 0 0 0 1 overturned_wagon.ldr +1 16 40 0 -190 1 0 0 0 1 0 0 0 1 spilled_coal.ldr +0 FILE overturned_wagon.ldr +0 overturned_wagon +0 Name: overturned_wagon +1 16 0 -40 0 1 0 0 0 0 -1 0 1 0 submodel.ldr +0 FILE spilled_coal.ldr +0 spilled_coal +0 Name: spilled_coal +1 0 60 -24 20 1 0 0 0 1 0 0 0 1 2456.dat +1 0 80 -24 60 1 0 0 0 1 0 0 0 1 2456.dat +1 0 30 -48 20 1 0 0 0 1 0 0 0 1 3002.dat +1 0 90 -48 20 1 0 0 0 1 0 0 0 1 3002.dat +1 0 50 -48 60 1 0 0 0 1 0 0 0 1 3002.dat +1 0 110 -48 60 1 0 0 0 1 0 0 0 1 3002.dat +1 0 50 -72 40 1 0 0 0 1 0 0 0 1 3002.dat +1 0 110 -72 60 1 0 0 0 1 0 0 0 1 3002.dat +1 0 60 -96 30 1 0 0 0 1 0 0 0 1 3004.dat +1 0 30 -96 50 1 0 0 0 1 0 0 0 1 3040b.dat +1 0 90 -96 50 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 0 60 -72 50 1 0 0 0 1 0 0 0 1 85984.dat +1 0 10 -72 30 1 0 0 0 1 0 0 0 1 3040b.dat +1 0 130 -96 50 -1 0 0 0 1 0 0 0 -1 3040b.dat +0 FILE submodel.ldr +0 submodel +0 Name: submodel +1 0 50 -8 40 0 0 -1 0 1 0 1 0 0 2926.dat +1 14 50 -3 -10 0 1 0 -1 0 0 0 0 1 6014b.dat +1 0 50 -3 -16 0 1 0 -1 0 0 0 0 1 87697.dat +1 14 50 -3 90 0 1 0 1 0 0 0 0 -1 6014b.dat +1 0 50 -3 96 0 1 0 -1 0 0 0 0 1 87697.dat +1 0 190 -8 40 0 0 -1 0 1 0 1 0 0 2926.dat +1 14 190 -3 -10 0 1 0 -1 0 0 0 0 1 6014b.dat +1 0 190 -3 -16 0 1 0 -1 0 0 0 0 1 87697.dat +1 14 190 -3 90 0 1 0 1 0 0 0 0 -1 6014b.dat +1 0 190 -3 96 0 1 0 -1 0 0 0 0 1 87697.dat +1 72 50 -32 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 72 50 -32 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 72 190 -32 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 72 190 -32 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 72 120 -40 40 1 0 0 0 1 0 0 0 1 3029.dat +1 70 60 -40 -20 1 0 0 0 1 0 0 0 1 3795.dat +1 70 180 -40 -20 1 0 0 0 1 0 0 0 1 3795.dat +1 19 40 -40 100 1 0 0 0 1 0 0 0 1 3020.dat +1 19 200 -40 100 1 0 0 0 1 0 0 0 1 3020.dat +1 19 100 -40 100 1 0 0 0 1 0 0 0 1 3022.dat +1 19 140 -40 100 1 0 0 0 1 0 0 0 1 3022.dat +1 71 40 -48 40 0 0 -1 0 1 0 1 0 0 3034.dat +1 71 200 -48 40 0 0 -1 0 1 0 1 0 0 3034.dat +1 70 30 -72 -20 1 0 0 0 1 0 0 0 1 3002.dat +1 70 90 -72 -20 1 0 0 0 1 0 0 0 1 3002.dat +1 70 150 -72 -20 1 0 0 0 1 0 0 0 1 3002.dat +1 70 210 -72 -20 1 0 0 0 1 0 0 0 1 3002.dat +1 19 100 -48 90 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 100 -48 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 140 -48 90 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 140 -48 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 71 40 -72 110 1 0 0 0 1 0 0 0 1 3010.dat +1 71 120 -72 110 1 0 0 0 1 0 0 0 1 3010.dat +1 71 200 -72 110 1 0 0 0 1 0 0 0 1 3010.dat +1 71 10 -72 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 10 -72 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 10 -72 90 1 0 0 0 1 0 0 0 1 3005.dat +1 71 230 -72 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 230 -72 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 230 -72 90 1 0 0 0 1 0 0 0 1 3005.dat +1 70 40 -96 -30 1 0 0 0 1 0 0 0 1 3010.dat +1 70 120 -96 -30 1 0 0 0 1 0 0 0 1 3010.dat +1 70 200 -96 -30 1 0 0 0 1 0 0 0 1 3010.dat +1 484 60 -96 110 1 0 0 0 1 0 0 0 1 3009.dat +1 484 180 -96 110 1 0 0 0 1 0 0 0 1 3009.dat +1 484 10 -96 0 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 10 -96 40 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 10 -96 80 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 230 -96 0 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 230 -96 40 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 230 -96 80 0 0 -1 0 1 0 1 0 0 30136.dat +1 71 120 -48 60 1 0 0 0 1 0 0 0 1 87079.dat +1 0 10 -32 40 1 0 0 0 1 0 0 0 1 3002.dat +1 0 230 -32 40 1 0 0 0 1 0 0 0 1 3002.dat diff --git a/brickwright/alt/alt-022/thumb-512.avif b/brickwright/alt/alt-022/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..a3d8bb42222e209bb7aba093981d5c98c445e052 Binary files /dev/null and b/brickwright/alt/alt-022/thumb-512.avif differ diff --git a/brickwright/alt/alt-022/trace.jsonl.gz b/brickwright/alt/alt-022/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..867769c018d35ad031e342c8d745777d9ceef205 --- /dev/null +++ b/brickwright/alt/alt-022/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94e1be71c1fe56e9f6a34e578b17965b99686857e04d8bb6c3ad5b24bb0f1748 +size 7922 diff --git a/brickwright/alt/alt-022/view-0.avif b/brickwright/alt/alt-022/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..63187b0cb90f8e0084f48490c7516eb93a6847f9 Binary files /dev/null and b/brickwright/alt/alt-022/view-0.avif differ diff --git a/brickwright/alt/alt-022/view-1.avif b/brickwright/alt/alt-022/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..b08d545b321b7e1f9d3b299d3781fedc1221ccc5 Binary files /dev/null and b/brickwright/alt/alt-022/view-1.avif differ diff --git a/brickwright/alt/alt-022/view-2.avif b/brickwright/alt/alt-022/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..c8304035e9922ce431f130755211af405bf731f6 Binary files /dev/null and b/brickwright/alt/alt-022/view-2.avif differ diff --git a/brickwright/alt/alt-022/view-3.avif b/brickwright/alt/alt-022/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..981e2676f546e34f95177fec3ef01b3958f283b6 Binary files /dev/null and b/brickwright/alt/alt-022/view-3.avif differ diff --git a/brickwright/alt/alt-022/view-4.avif b/brickwright/alt/alt-022/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..8ed44d925bea7efc82c8b1e05b06aa60ddbaf9ce Binary files /dev/null and b/brickwright/alt/alt-022/view-4.avif differ diff --git a/brickwright/alt/alt-022/view-5.avif b/brickwright/alt/alt-022/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..bd19e168fa416fedf2a5ed5bf00be49bcc64619c Binary files /dev/null and b/brickwright/alt/alt-022/view-5.avif differ diff --git a/brickwright/alt/alt-022/view-6.avif b/brickwright/alt/alt-022/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..4b9966321bc1b2a60f2632371d45a28df232015a Binary files /dev/null and b/brickwright/alt/alt-022/view-6.avif differ diff --git a/brickwright/alt/alt-022/view-7.avif b/brickwright/alt/alt-022/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..8a2f6e3c2b5633d826e3bc147838f93d0522fbdf Binary files /dev/null and b/brickwright/alt/alt-022/view-7.avif differ diff --git a/brickwright/alt/alt-023/build.py b/brickwright/alt/alt-023/build.py new file mode 100644 index 0000000000000000000000000000000000000000..578b4b0561a614f8e6dd97c7c1027e1a9d4e3ebc --- /dev/null +++ b/brickwright/alt/alt-023/build.py @@ -0,0 +1,74 @@ +import json +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid, col, x,y,z, name=None, rot=bl.Rotation.DEG_0): + return b.add(bl.Element(pid, getattr(bl.Color,col)), (x,y,z), rotation=rot, name=name) + # Two transverse axle carriers, with four independently mounted wheels. + for i,x in enumerate((1,6)): + axle=put('2926','BLACK',x,1,0, 'axle_'+str(i), bl.Rotation.DEG_90) + for j,d in enumerate((bl.Direction.FRONT,bl.Direction.BACK)): + rim=bl.Element('6014b',bl.Color.YELLOW) + w=b.connect(rim,'hinge_3_on',to=axle.find_connector('hinge_3_in',facing=d),name=f'wheel_{i}_{j}') + tire=bl.Element('87697',bl.Color.BLACK) + b.connect(tire,tire.find_connector('fixed_13_on',facing=bl.Direction.FRONT),to=w.find_connector('fixed_13_in',toward=bl.Direction.FRONT),target_rotation=w.pose.rotation,name=f'tyre_{i}_{j}') + # Longitudinal black frame ties the axles together. + for y in (1,3): + put('2456','BLACK',1,y,1/3) + for x in (0,4): + put('3031','BLUE',x,2,4/3) + put('3020','MEDIUM_AZURE',x,0,4/3) + # Broad flat deck, with metal outer strips and blue central decking. + for y in (0,5): + put('3034','LIGHT_BLUISH_GRAY',0,y,5/3) + for x in (0,4): + put('3020','MEDIUM_AZURE',x,3,5/3) + put('3710','BLUE',x,2,5/3) + # Four steel stakes leave a four-stud-wide load bed. + for x in (0,6): + for y in (0,6): + put('3245c','LIGHT_BLUISH_GRAY',x,y,2, f'post_{x}_{y}') + # Round buffers at both ends distinguish the railway underframe. + for x,d in ((0,bl.Direction.RIGHT),(7,bl.Direction.LEFT)): + mount=put('4070','GREEN',x,2,1/3, rot=bl.Rotation.DEG_270 if x==0 else bl.Rotation.DEG_90) + disc=bl.Element('6141',bl.Color.DARK_BLUISH_GRAY) + b.connect(disc,disc.find_connector('antistud',toward=bl.Direction.DOWN),to=mount.find_connector('stud',facing=d),name=f'buffer_{x}') + # Each log is a locked, stagger-bonded 12-stud timber. The pale + # exposed ends contrast with dark brown and orange bark. + for k,y in enumerate((1,4)): + put('3020','TAN',-2,y,2, f'log{k}_bottom_front') + put('3795','REDDISH_BROWN',4,y,2, f'log{k}_bottom_middle') + put('3022','TAN',2,y,2, f'log{k}_bottom_back') + for x in (-2,3,8): + put('3003','MEDIUM_NOUGAT',x,y,7/3, f'log{k}_core_{x}') + for x in (0,5): + put('3002','REDDISH_BROWN',x,y,7/3, f'log{k}_bark_{x}') + for dy in (0,1): + put('3010','REDDISH_BROWN',2,y+dy,10/3, f'log{k}_crown_{dy}') + for x in (-2,0,6,8): + put('30136','DARK_ORANGE',x,y,10/3, f'log{k}_textured_{x}') + put('3004','MEDIUM_NOUGAT',x,y+1,10/3, f'log{k}_ridge_{x}') + return bl.translate_to_ground(b) + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + excess=[] + for e,n in b.list_elements().items(): + allowed=inventory.get(e.ldraw_id,{}).get(e.color.name,0) + if n>allowed: excess.append(f'{e.ldraw_id}/{e.color.name}: {n}>{allowed}') + tests.check('Inventory limits',not excess,str(excess)) + tests.check('Four wheels and four upright stakes',sum(e.ldraw_id=='6014b' for e in [p.content for p in b.flattened_placements])==4 and sum(e.ldraw_id=='3245c' for e in [p.content for p in b.flattened_placements])==4) + # Deck runs x=0..8; both independently built logs run x=-2..10. + for k in range(2): + parts=[p for n,p in b.names.items() if n.startswith(f'log{k}_')] + tests.check(f'Log {k+1} overhangs both wagon ends', bool(parts) and min(p.bounding_box[0].x for p in parts)<0 and max(p.bounding_box[1].x for p in parts)>8) + return tests.report() diff --git a/brickwright/alt/alt-023/hero-1024.avif b/brickwright/alt/alt-023/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..5418299ee5d195478c9286834175ee6847a9a058 Binary files /dev/null and b/brickwright/alt/alt-023/hero-1024.avif differ diff --git a/brickwright/alt/alt-023/model.mpd b/brickwright/alt/alt-023/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..7b7a205d71f5d187c3f5ceb7a1759163da123a8b --- /dev/null +++ b/brickwright/alt/alt-023/model.mpd @@ -0,0 +1,66 @@ +1 0 30 -30 60 0 0 -1 0 1 0 1 0 0 2926.dat +1 14 30 -25 10 0 1 0 -1 0 0 0 0 1 6014b.dat +1 0 30 -25 4 0 1 0 -1 0 0 0 0 1 87697.dat +1 14 30 -25 110 0 1 0 1 0 0 0 0 -1 6014b.dat +1 0 30 -25 116 0 1 0 1 0 0 0 0 -1 87697.dat +1 0 130 -30 60 0 0 -1 0 1 0 1 0 0 2926.dat +1 14 130 -25 10 0 1 0 -1 0 0 0 0 1 6014b.dat +1 0 130 -25 4 0 1 0 -1 0 0 0 0 1 87697.dat +1 14 130 -25 110 0 1 0 1 0 0 0 0 -1 6014b.dat +1 0 130 -25 116 0 1 0 1 0 0 0 0 -1 87697.dat +1 0 80 -54 40 1 0 0 0 1 0 0 0 1 2456.dat +1 0 80 -54 80 1 0 0 0 1 0 0 0 1 2456.dat +1 1 40 -62 80 1 0 0 0 1 0 0 0 1 3031.dat +1 322 40 -62 20 1 0 0 0 1 0 0 0 1 3020.dat +1 1 120 -62 80 1 0 0 0 1 0 0 0 1 3031.dat +1 322 120 -62 20 1 0 0 0 1 0 0 0 1 3020.dat +1 71 80 -70 20 1 0 0 0 1 0 0 0 1 3034.dat +1 71 80 -70 120 1 0 0 0 1 0 0 0 1 3034.dat +1 322 40 -70 80 1 0 0 0 1 0 0 0 1 3020.dat +1 1 40 -70 50 1 0 0 0 1 0 0 0 1 3710.dat +1 322 120 -70 80 1 0 0 0 1 0 0 0 1 3020.dat +1 1 120 -70 50 1 0 0 0 1 0 0 0 1 3710.dat +1 71 20 -118 10 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 20 -118 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 140 -118 10 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 140 -118 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 2 10 -54 50 0 0 1 0 1 0 -1 0 0 4070.dat +1 72 -4 -44 50 0 1 0 0 0 -1 -1 0 0 6141.dat +1 2 150 -54 50 0 0 -1 0 1 0 1 0 0 4070.dat +1 72 164 -44 50 0 -1 0 0 0 -1 1 0 0 6141.dat +1 19 0 -78 40 1 0 0 0 1 0 0 0 1 3020.dat +1 70 140 -78 40 1 0 0 0 1 0 0 0 1 3795.dat +1 19 60 -78 40 1 0 0 0 1 0 0 0 1 3022.dat +1 84 -20 -102 40 1 0 0 0 1 0 0 0 1 3003.dat +1 84 80 -102 40 1 0 0 0 1 0 0 0 1 3003.dat +1 84 180 -102 40 1 0 0 0 1 0 0 0 1 3003.dat +1 70 30 -102 40 1 0 0 0 1 0 0 0 1 3002.dat +1 70 130 -102 40 1 0 0 0 1 0 0 0 1 3002.dat +1 70 80 -126 30 1 0 0 0 1 0 0 0 1 3010.dat +1 70 80 -126 50 1 0 0 0 1 0 0 0 1 3010.dat +1 484 -20 -126 30 1 0 0 0 1 0 0 0 1 30136.dat +1 84 -20 -126 50 1 0 0 0 1 0 0 0 1 3004.dat +1 484 20 -126 30 1 0 0 0 1 0 0 0 1 30136.dat +1 84 20 -126 50 1 0 0 0 1 0 0 0 1 3004.dat +1 484 140 -126 30 1 0 0 0 1 0 0 0 1 30136.dat +1 84 140 -126 50 1 0 0 0 1 0 0 0 1 3004.dat +1 484 180 -126 30 1 0 0 0 1 0 0 0 1 30136.dat +1 84 180 -126 50 1 0 0 0 1 0 0 0 1 3004.dat +1 19 0 -78 100 1 0 0 0 1 0 0 0 1 3020.dat +1 70 140 -78 100 1 0 0 0 1 0 0 0 1 3795.dat +1 19 60 -78 100 1 0 0 0 1 0 0 0 1 3022.dat +1 84 -20 -102 100 1 0 0 0 1 0 0 0 1 3003.dat +1 84 80 -102 100 1 0 0 0 1 0 0 0 1 3003.dat +1 84 180 -102 100 1 0 0 0 1 0 0 0 1 3003.dat +1 70 30 -102 100 1 0 0 0 1 0 0 0 1 3002.dat +1 70 130 -102 100 1 0 0 0 1 0 0 0 1 3002.dat +1 70 80 -126 90 1 0 0 0 1 0 0 0 1 3010.dat +1 70 80 -126 110 1 0 0 0 1 0 0 0 1 3010.dat +1 484 -20 -126 90 1 0 0 0 1 0 0 0 1 30136.dat +1 84 -20 -126 110 1 0 0 0 1 0 0 0 1 3004.dat +1 484 20 -126 90 1 0 0 0 1 0 0 0 1 30136.dat +1 84 20 -126 110 1 0 0 0 1 0 0 0 1 3004.dat +1 484 140 -126 90 1 0 0 0 1 0 0 0 1 30136.dat +1 84 140 -126 110 1 0 0 0 1 0 0 0 1 3004.dat +1 484 180 -126 90 1 0 0 0 1 0 0 0 1 30136.dat +1 84 180 -126 110 1 0 0 0 1 0 0 0 1 3004.dat diff --git a/brickwright/alt/alt-023/thumb-512.avif b/brickwright/alt/alt-023/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..540701d45a64ffb3f6df1079553f22471473dde4 Binary files /dev/null and b/brickwright/alt/alt-023/thumb-512.avif differ diff --git a/brickwright/alt/alt-023/trace.jsonl.gz b/brickwright/alt/alt-023/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..bc2eb9c4b9d019f5d54df7e5a7ff13424c82c31c --- /dev/null +++ b/brickwright/alt/alt-023/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c62f665ea3d5709e553697cdd799ac60497129346f546112f396693ed9ba65e +size 6795 diff --git a/brickwright/alt/alt-023/view-0.avif b/brickwright/alt/alt-023/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..f8f6987856fbfb38366e3ab92cca1b9aabd96561 Binary files /dev/null and b/brickwright/alt/alt-023/view-0.avif differ diff --git a/brickwright/alt/alt-023/view-1.avif b/brickwright/alt/alt-023/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..5aa81cc5623da37e15d396b6d636f4953e2f9f6a Binary files /dev/null and b/brickwright/alt/alt-023/view-1.avif differ diff --git a/brickwright/alt/alt-023/view-2.avif b/brickwright/alt/alt-023/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..a8f16b7315e864fd8083a0f1ec210a9bd97fccec Binary files /dev/null and b/brickwright/alt/alt-023/view-2.avif differ diff --git a/brickwright/alt/alt-023/view-3.avif b/brickwright/alt/alt-023/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..3adc96ccc2326fd57327ed9f09e62c6c08745d51 Binary files /dev/null and b/brickwright/alt/alt-023/view-3.avif differ diff --git a/brickwright/alt/alt-023/view-4.avif b/brickwright/alt/alt-023/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..0d0ef12a10f661f9bbb54a5cc8150441a9115ecf Binary files /dev/null and b/brickwright/alt/alt-023/view-4.avif differ diff --git a/brickwright/alt/alt-023/view-5.avif b/brickwright/alt/alt-023/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..599b2c174168d39e94d2fe5ebe6d83b55ba0b44b Binary files /dev/null and b/brickwright/alt/alt-023/view-5.avif differ diff --git a/brickwright/alt/alt-023/view-6.avif b/brickwright/alt/alt-023/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..b57844461fc193d039cd5cb960c98196d7e53bb4 Binary files /dev/null and b/brickwright/alt/alt-023/view-6.avif differ diff --git a/brickwright/alt/alt-023/view-7.avif b/brickwright/alt/alt-023/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..752dd835ef1988b7c193ea847257f4d0d637eb13 Binary files /dev/null and b/brickwright/alt/alt-023/view-7.avif differ diff --git a/brickwright/alt/alt-024/build.py b/brickwright/alt/alt-024/build.py new file mode 100644 index 0000000000000000000000000000000000000000..963801dfd9c161913a6d453dd1e618debb40cebc --- /dev/null +++ b/brickwright/alt/alt-024/build.py @@ -0,0 +1,95 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + C = bl.Color + def put(pid, color, xyz, rot=bl.Rotation.DEG_0, name=None): + return b.add(bl.Element(pid, getattr(C, color)), xyz, rotation=rot, name=name) + + # Two transverse railway axles, with four bare metal-style flanged rims. + for x in (1, 10): + axle = put('2926', 'BLACK', (x, 0, 1/3), bl.Rotation.DEG_90, 'axle_'+str(x)) + for i, conn in enumerate(axle.find_connectors('hinge_3_in')): + b.connect(bl.Element('6014b', C.YELLOW), 'hinge_3_on', to=conn, + name='rail_wheel_'+str(x)+'_'+str(i)) + put('3029', 'DARK_BLUISH_GRAY', (0, 0, 2/3), name='chassis') + for x in (0, 3, 6, 9): + put('3002', 'BLACK', (x, 1, 1)) + put('3031', 'BLUE', (4, 0, 2)) + put('87081', 'BLACK', (4, 0, 7/3), name='slewing_pedestal') + for y in (0, 2): + put('3034', 'LIGHT_BLUISH_GRAY', (2, y, 10/3)) + # Dense rear ballast, projecting two studs beyond the upper deck. + for z in (11/3, 14/3): + for y in (0, 2): + put('3002', 'BLACK', (0, y, z), name='counterweight_'+str(y)+'_'+str(z)) + for y in (0, 2): + put('87079', 'LIGHT_BLUISH_GRAY', (-1, y, 17/3)) + # Enclosed operator cab, with side windows and sloping clear windscreen. + for y in (0, 2): + put('3001', 'YELLOW', (3, y, 11/3)) + for y in (0, 3): + put('60592', 'BLACK', (3, y, 14/3), name='cab_side_window_'+str(y)) + for y in (1, 2): + for z in (14/3, 17/3): + put('3005', 'YELLOW', (3, y, z)) + for y in (0, 2): + put('3065', 'TRANS_CLEAR', (6, y, 14/3), bl.Rotation.DEG_90) + put('3039', 'TRANS_CLEAR', (5, y, 17/3), bl.Rotation.DEG_90) + put('3032', 'YELLOW', (2, 0, 20/3), name='cab_roof') + put('6141', 'TRANS_ORANGE', (3, 1, 7), name='warning_beacon') + # Locking knuckle carries a slender, reinforced box boom at 45 degrees. + put('3003', 'YELLOW', (8, 1, 11/3)) + pivot = put('92582', 'BLACK', (8, 1, 14/3), name='boom_pivot') + boom = bl.LegoBuild() + root = boom.add(bl.Element('30387', C.YELLOW), (0, 0, 0), name='root') + for x in (5, 9): + boom.add(bl.Element('3010', C.BRIGHT_LIGHT_YELLOW), (x, 0, 0)) + boom.add(bl.Element('60479', C.YELLOW), (1, 0, 1)) + boom.add(bl.Element('3460', C.MEDIUM_AZURE), (3, 0, -1/3)) + tip = boom.add(bl.Element('47905', C.BLACK), (12, 0, 4/3), name='tip') + arm = b.connect(boom, root.find_connector('hinge_2_on'), to=pivot.find_connector('hinge_2_in'), + target_rotation=bl.rotation_about(bl.Vec3(0,1,0), -45), name='raised_boom') + # A side-stud swivel keeps the J-shaped lifting hook vertical. + tipworld = b.named(['raised_boom', 'tip']) + hook = bl.LegoBuild() + hook.add(bl.Element('3710', C.BLUE), (0, 0, 0)) + for x in (0, 2): + hook.add(bl.Element('3004', C.BLACK), (x, 0, 1/3)) + hook.add(bl.Element('3005', C.LIGHT_BLUISH_GRAY), (3, 0, 4/3)) + hook.add(bl.Element('3005', C.LIGHT_BLUISH_GRAY), (0, 0, 4/3)) + hook.add(bl.Element('3005', C.LIGHT_BLUISH_GRAY), (0, 0, 7/3)) + hook.add(bl.Element('3005', C.LIGHT_BLUISH_GRAY), (0, 0, 10/3)) + stem = hook.add(bl.Element('4070', C.GREEN), (0, 0, 13/3)) + b.connect(hook, stem.find_connector('antistud', facing=bl.Direction.FRONT), + to=tipworld.find_connector('stud', facing=bl.Direction.FRONT), + target_rotation=bl.Mat3.IDENTITY, name='J_hook') + return bl.translate_to_ground(b) + + +def run_tests(): + b = create_build() + tests = TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory = json.load(open('/inputs/parts.json')) + used = Counter((p.content.ldraw_id, p.content.color.name) for p in b.flattened_placements) + excess = {str(k): n for k,n in used.items() if n > inventory.get(k[0], {}).get(k[1], 0)} + tests.check('Supplied inventory only', not excess, str(excess)) + tests.check('Four railway wheels', sum(n for (p,c),n in used.items() if p == '6014b') == 4) + tests.check('Raised boom', b.height > 12, str(b.height)) + tests.check('Large counterweight', used[('3002', 'BLACK')] == 8) + boom = b.named('raised_boom') + tip = b.named(['raised_boom', 'tip']) + pivot = b.named('boom_pivot') + tests.check('Boom tip above its pivot', tip.center.z > pivot.center.z + 6) + tests.check('Upward 45 degree boom', abs(boom.pose.rotation.entries[2][0] - 2**-0.5) < 1e-6) + tests.check('Open J-shaped hook at tip', b.named('J_hook').height > 5) + ballast = [p for name,p in b.names.items() if name.startswith('counterweight_')] + tests.check('Ballast projects behind cab', len(ballast) == 4 and min(p.bounding_box[0].x for p in ballast) < b.named('cab_side_window_0').bounding_box[0].x - 2) + return tests.report() diff --git a/brickwright/alt/alt-024/hero-1024.avif b/brickwright/alt/alt-024/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..f946af18e1eee567632aa96cd3de65d2daf16740 Binary files /dev/null and b/brickwright/alt/alt-024/hero-1024.avif differ diff --git a/brickwright/alt/alt-024/model.mpd b/brickwright/alt/alt-024/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..46ff971ed3dd523f21512b0fb7607dae85f72eba --- /dev/null +++ b/brickwright/alt/alt-024/model.mpd @@ -0,0 +1,62 @@ +0 FILE main.ldr +0 main +0 Name: main +1 0 30 -18 40 0 0 -1 0 1 0 1 0 0 2926.dat +1 14 30 -13 -10 0 1 0 -1 0 0 0 0 1 6014b.dat +1 14 30 -13 90 0 1 0 1 0 0 0 0 -1 6014b.dat +1 0 210 -18 40 0 0 -1 0 1 0 1 0 0 2926.dat +1 14 210 -13 -10 0 1 0 -1 0 0 0 0 1 6014b.dat +1 14 210 -13 90 0 1 0 1 0 0 0 0 -1 6014b.dat +1 72 120 -26 40 1 0 0 0 1 0 0 0 1 3029.dat +1 0 30 -50 40 1 0 0 0 1 0 0 0 1 3002.dat +1 0 90 -50 40 1 0 0 0 1 0 0 0 1 3002.dat +1 0 150 -50 40 1 0 0 0 1 0 0 0 1 3002.dat +1 0 210 -50 40 1 0 0 0 1 0 0 0 1 3002.dat +1 1 120 -58 40 1 0 0 0 1 0 0 0 1 3031.dat +1 0 120 -82 40 1 0 0 0 1 0 0 0 1 87081.dat +1 71 120 -90 20 1 0 0 0 1 0 0 0 1 3034.dat +1 71 120 -90 60 1 0 0 0 1 0 0 0 1 3034.dat +1 0 30 -114 20 1 0 0 0 1 0 0 0 1 3002.dat +1 0 30 -114 60 1 0 0 0 1 0 0 0 1 3002.dat +1 0 30 -138 20 1 0 0 0 1 0 0 0 1 3002.dat +1 0 30 -138 60 1 0 0 0 1 0 0 0 1 3002.dat +1 71 20 -146 20 1 0 0 0 1 0 0 0 1 87079.dat +1 71 20 -146 60 1 0 0 0 1 0 0 0 1 87079.dat +1 14 100 -114 20 1 0 0 0 1 0 0 0 1 3001.dat +1 14 100 -114 60 1 0 0 0 1 0 0 0 1 3001.dat +1 0 80 -162 10 1 0 0 0 1 0 0 0 1 60592.dat +1 0 80 -162 70 1 0 0 0 1 0 0 0 1 60592.dat +1 14 70 -138 30 1 0 0 0 1 0 0 0 1 3005.dat +1 14 70 -162 30 1 0 0 0 1 0 0 0 1 3005.dat +1 14 70 -138 50 1 0 0 0 1 0 0 0 1 3005.dat +1 14 70 -162 50 1 0 0 0 1 0 0 0 1 3005.dat +1 47 130 -138 20 0 0 -1 0 1 0 1 0 0 3065.dat +1 47 110 -162 20 0 0 -1 0 1 0 1 0 0 3039.dat +1 47 130 -138 60 0 0 -1 0 1 0 1 0 0 3065.dat +1 47 110 -162 60 0 0 -1 0 1 0 1 0 0 3039.dat +1 14 100 -170 40 1 0 0 0 1 0 0 0 1 3032.dat +1 57 70 -178 30 1 0 0 0 1 0 0 0 1 6141.dat +1 14 180 -114 40 1 0 0 0 1 0 0 0 1 3003.dat +1 0 180 -122 40 1 0 0 0 1 0 0 0 1 92582.dat +1 16 206.970563 -125.171573 30 0.707107 0.707107 0 -0.707107 0.707107 0 0 0 1 raised_boom.ldr +1 16 341.220346 -216.47518 10 1 0 0 0 1 0 0 0 1 J_hook.ldr +0 FILE raised_boom.ldr +0 raised_boom +0 Name: raised_boom +1 14 40 -24 10 1 0 0 0 1 0 0 0 1 30387.dat +1 226 140 -24 10 1 0 0 0 1 0 0 0 1 3010.dat +1 226 220 -24 10 1 0 0 0 1 0 0 0 1 3010.dat +1 14 140 -32 10 1 0 0 0 1 0 0 0 1 60479.dat +1 322 140 0 10 1 0 0 0 1 0 0 0 1 3460.dat +1 0 250 -56 10 1 0 0 0 1 0 0 0 1 47905.dat +0 FILE J_hook.ldr +0 J_hook +0 Name: J_hook +1 1 40 -8 10 1 0 0 0 1 0 0 0 1 3710.dat +1 0 20 -32 10 1 0 0 0 1 0 0 0 1 3004.dat +1 0 60 -32 10 1 0 0 0 1 0 0 0 1 3004.dat +1 71 70 -56 10 1 0 0 0 1 0 0 0 1 3005.dat +1 71 10 -56 10 1 0 0 0 1 0 0 0 1 3005.dat +1 71 10 -80 10 1 0 0 0 1 0 0 0 1 3005.dat +1 71 10 -104 10 1 0 0 0 1 0 0 0 1 3005.dat +1 2 10 -128 10 1 0 0 0 1 0 0 0 1 4070.dat diff --git a/brickwright/alt/alt-024/thumb-512.avif b/brickwright/alt/alt-024/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..bc5ce8c3a39a2c287878b3ee0d10d1e6b17a033b Binary files /dev/null and b/brickwright/alt/alt-024/thumb-512.avif differ diff --git a/brickwright/alt/alt-024/trace.jsonl.gz b/brickwright/alt/alt-024/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..7e5fea46dc61959bccdbc3436da0be8b4985972c --- /dev/null +++ b/brickwright/alt/alt-024/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5b2013d6c15fa5bafb8f96eef4c52bfe377b75483fc5d80b65611e7bb898346 +size 9061 diff --git a/brickwright/alt/alt-024/view-0.avif b/brickwright/alt/alt-024/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..57d0876e5b0a34f2bf1add8fa76970a4a10edf18 Binary files /dev/null and b/brickwright/alt/alt-024/view-0.avif differ diff --git a/brickwright/alt/alt-024/view-1.avif b/brickwright/alt/alt-024/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..967b44bbd943d6d85f182c1a0591195ea326d204 Binary files /dev/null and b/brickwright/alt/alt-024/view-1.avif differ diff --git a/brickwright/alt/alt-024/view-2.avif b/brickwright/alt/alt-024/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..2b18cc84cd1e4da91e6cc577b00fc41f27cac460 Binary files /dev/null and b/brickwright/alt/alt-024/view-2.avif differ diff --git a/brickwright/alt/alt-024/view-3.avif b/brickwright/alt/alt-024/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..1077b28e412047dfb09eb762c6dcfc9e4fcdd67c Binary files /dev/null and b/brickwright/alt/alt-024/view-3.avif differ diff --git a/brickwright/alt/alt-024/view-4.avif b/brickwright/alt/alt-024/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..d173ed76658bd43d8ee0e6ce8d691c062c1655b4 Binary files /dev/null and b/brickwright/alt/alt-024/view-4.avif differ diff --git a/brickwright/alt/alt-024/view-5.avif b/brickwright/alt/alt-024/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..2cdc805792d5278fdf948bf25d61b7205fa00bb2 Binary files /dev/null and b/brickwright/alt/alt-024/view-5.avif differ diff --git a/brickwright/alt/alt-024/view-6.avif b/brickwright/alt/alt-024/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..16c0c1adb97bf7fea6e9b7fdd6883f5a50ee42a0 Binary files /dev/null and b/brickwright/alt/alt-024/view-6.avif differ diff --git a/brickwright/alt/alt-024/view-7.avif b/brickwright/alt/alt-024/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..aea332c0c123c88639c68bfb16cb948bae99a5ea Binary files /dev/null and b/brickwright/alt/alt-024/view-7.avif differ diff --git a/brickwright/alt/alt-025/build.py b/brickwright/alt/alt-025/build.py new file mode 100644 index 0000000000000000000000000000000000000000..5b6564cae16d6ce8e16fbb379c16ba2f67453532 --- /dev/null +++ b/brickwright/alt/alt-025/build.py @@ -0,0 +1,110 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + C = bl.Color + def add(pid, col, x,y,z, rot=0, name=None): + return b.add(bl.Element(pid, getattr(C,col)), (x,y,z+1), bl.Rotation(rot), name=name) + # Four flanged-looking yellow hubs on black tyres, attached to axle plates. + for j,y in enumerate((2,9)): + axle=add('2926','BLACK',1,y,-1/3,name=f'axle_{j}') + add('3001','DARK_GREEN',1,y,0) + for k,d in enumerate((bl.Direction.LEFT, bl.Direction.RIGHT)): + hub=b.connect(bl.Element('6014b',C.YELLOW),'hinge_3_on',to=axle.find_connector('hinge_3_in',facing=d),name=f'hub_{j}_{k}') + tire=bl.Element('87697',C.BLACK) + b.connect(tire,tire.find_connector('fixed_13_on',facing=bl.Direction.BACK),to=hub.find_connector('fixed_13_in',toward=bl.Direction.FRONT),name=f'tyre_{j}_{k}') + add('3028','BRIGHT_GREEN',0,0,1,1,name='wagon_floor') + # Black underframe ends and red body sills. + for y in (0,10): + add('2456','BLACK',0,y,4/3) + for x in (0,4): + for y in (2,6): + add('3001','RED',x,y,4/3,1) + # Corner pillars, alternating red and gold, leave the front completely open. + for x in (0,5): + for y in (0,10): + for h in range(5): + add('3004',('ORANGE' if h==2 else 'RED') if h%2==0 else 'BRIGHT_LIGHT_YELLOW',x,y,7/3+h,1) + # Open barred side galleries, with yellow top rails. + for x in (0,5): + add('15332','WHITE',x,3,7/3,1) + add('3010','BRIGHT_LIGHT_YELLOW',x,3,13/3,1) + add('3004','ORANGE',x,7,7/3,1) + add('3004','ORANGE',x,7,10/3,1) + add('3004','ORANGE',x,7,13/3,1) + for y in (2,6): + add('3001','RED',x if x==0 else 4,y,19/3,1) + # Rear wall and decorative window. + add('3001','ORANGE',1,10,7/3) + add('60598','WHITE',1,10,10/3,name='rear_window') + add('3001','BRIGHT_LIGHT_ORANGE',1,10,19/3) + # Roof deck ties all columns and rails together. + for y in (0,4): + add('3031','BLUE',1,y,22/3) + for x in (0,5): + add('3460','MEDIUM_AZURE',x,0,22/3,1) + add('3032','YELLOW',0,8,22/3) + # Broad alternating stripes, pitched down to both eaves. + for y,col in ((0,'YELLOW'),(4,'MAGENTA'),(8,'YELLOW')): + add('3037',col,0,y,23/3,3) + add('3037',col,4,y,23/3,1) + for dy in (0,2): + add('3003','YELLOW' if col=='YELLOW' else 'BRIGHT_PINK',2,y+dy,23/3) + # Elephant's neck anchors to the wagon floor. + for z in (7/3,): + add('3001','DARK_BLUISH_GRAY',1,0,z) + for x in (-1,3): + add('3010','LIGHT_BLUISH_GRAY',x,-1,10/3) + add('3001','DARK_BLUISH_GRAY',1,0,10/3) + # Wide ears and a four-stud-wide head extending beyond the open end. + for x in (-1,5): + add('3245c','LIGHT_BLUISH_GRAY',x,-1,13/3,name=f'ear_{x}') + add('3004','LIGHT_BLUISH_GRAY',x,-1,19/3) + for y in (-3,-1): + add('3001','LIGHT_BLUISH_GRAY',1,y,13/3) + add('3001','LIGHT_BLUISH_GRAY',1,-2,16/3) + add('3001','LIGHT_BLUISH_GRAY',1,0,16/3) + # Eyes on forward-facing studs, flanking the trunk root. + for x in (1,4): + eye=add('47905','BLACK',x,-4,16/3) + t=bl.Element('98138p07',C.WHITE) + b.connect(t,'tube',to=eye.find_connector('stud',facing=bl.Direction.FRONT),name=f'eye_{x}') + add('3004','LIGHT_BLUISH_GRAY',2,-4,16/3) + for x in (1,3): + add('87079','LIGHT_BLUISH_GRAY',x,-4,19/3,1) + add('85080','LIGHT_BLUISH_GRAY',x,0,19/3) + # U-shaped trunk: descending root, projecting bottom, raised tip. + add('3245c','LIGHT_BLUISH_GRAY',2,-4,10/3,name='trunk_root') + for x in (2,3): + add('3010','LIGHT_BLUISH_GRAY',x,-7,7/3,1,name=f'trunk_curve_{x}') + add('3245c','LIGHT_BLUISH_GRAY',2,-7,10/3,name='upturned_trunk_tip') + add('3005','LIGHT_BLUISH_GRAY',2,-7,16/3,name='trunk_tip_cap_left') + add('3005','LIGHT_BLUISH_GRAY',3,-7,16/3,name='trunk_tip_cap_right') + return bl.translate_to_ground(b) + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + stock=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + over=[(pid,col,n,stock.get(pid,{}).get(col,0)) for (pid,col),n in used.items() if n>stock.get(pid,{}).get(col,0)] + t.check('Inventory quantities and colors',not over,str(over)) + t.check('Four wheels',sum(n for (pid,col),n in used.items() if pid=='6014b')==4) + t.check('Striped pitched roof',used['3037','YELLOW']==4 and used['3037','MAGENTA']==2) + t.check('Two visible elephant eyes',used['98138p07','WHITE']==2) + floor=b.named('wagon_floor').bounding_box + root=b.named('trunk_root').bounding_box + bend=b.named('trunk_curve_2').bounding_box + tip=b.named('trunk_tip_cap_left').bounding_box + t.check('Elephant projects beyond open end',root[1].y < floor[0].y and b.named('eye_1').center.y < floor[0].y) + t.check('Trunk curls forward and upward',tip[0].y < root[0].y and tip[0].z > bend[1].z + 1) + t.check('Paired broad ears',b.named('ear_-1').height >= 2 and b.named('ear_5').height >= 2) + return t.report() diff --git a/brickwright/alt/alt-025/hero-1024.avif b/brickwright/alt/alt-025/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..526dc2222b9e93e0e087fe89413e25609344f818 Binary files /dev/null and b/brickwright/alt/alt-025/hero-1024.avif differ diff --git a/brickwright/alt/alt-025/model.mpd b/brickwright/alt/alt-025/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..5cf435bea2ed513611a658a59bfb8a85a1db041c --- /dev/null +++ b/brickwright/alt/alt-025/model.mpd @@ -0,0 +1,100 @@ +1 0 60 -30 50 1 0 0 0 1 0 0 0 1 2926.dat +1 288 60 -54 60 1 0 0 0 1 0 0 0 1 3001.dat +1 14 110 -25 50 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 116 -25 50 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 10 -25 50 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 4 -25 50 0 0 -1 1 0 0 0 -1 0 87697.dat +1 0 60 -30 190 1 0 0 0 1 0 0 0 1 2926.dat +1 288 60 -54 200 1 0 0 0 1 0 0 0 1 3001.dat +1 14 110 -25 190 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 116 -25 190 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 10 -25 190 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 4 -25 190 0 0 -1 1 0 0 0 -1 0 87697.dat +1 10 60 -62 120 0 0 -1 0 1 0 1 0 0 3028.dat +1 0 60 -86 20 1 0 0 0 1 0 0 0 1 2456.dat +1 0 60 -86 220 1 0 0 0 1 0 0 0 1 2456.dat +1 4 20 -86 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 20 -86 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 100 -86 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 100 -86 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 10 -110 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 10 -134 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 10 -158 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 10 -182 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 10 -206 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 10 -110 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 10 -134 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 10 -158 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 10 -182 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 10 -206 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 110 -110 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 110 -134 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 110 -158 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 110 -182 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 110 -206 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 110 -110 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 110 -134 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 110 -158 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 110 -182 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 110 -206 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 15 10 -134 100 0 0 -1 0 1 0 1 0 0 15332.dat +1 226 10 -158 100 0 0 -1 0 1 0 1 0 0 3010.dat +1 25 10 -110 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 10 -134 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 10 -158 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 20 -206 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 20 -206 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 15 110 -134 100 0 0 -1 0 1 0 1 0 0 15332.dat +1 226 110 -158 100 0 0 -1 0 1 0 1 0 0 3010.dat +1 25 110 -110 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 110 -134 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 110 -158 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 100 -206 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 100 -206 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 25 60 -110 220 1 0 0 0 1 0 0 0 1 3001.dat +1 15 60 -182 220 1 0 0 0 1 0 0 0 1 60598.dat +1 191 60 -206 220 1 0 0 0 1 0 0 0 1 3001.dat +1 1 60 -214 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 60 -214 120 1 0 0 0 1 0 0 0 1 3031.dat +1 322 10 -214 80 0 0 -1 0 1 0 1 0 0 3460.dat +1 322 110 -214 80 0 0 -1 0 1 0 1 0 0 3460.dat +1 14 60 -214 200 1 0 0 0 1 0 0 0 1 3032.dat +1 14 30 -238 40 0 0 1 0 1 0 -1 0 0 3037.dat +1 14 90 -238 40 0 0 -1 0 1 0 1 0 0 3037.dat +1 14 60 -238 20 1 0 0 0 1 0 0 0 1 3003.dat +1 14 60 -238 60 1 0 0 0 1 0 0 0 1 3003.dat +1 26 30 -238 120 0 0 1 0 1 0 -1 0 0 3037.dat +1 26 90 -238 120 0 0 -1 0 1 0 1 0 0 3037.dat +1 29 60 -238 100 1 0 0 0 1 0 0 0 1 3003.dat +1 29 60 -238 140 1 0 0 0 1 0 0 0 1 3003.dat +1 14 30 -238 200 0 0 1 0 1 0 -1 0 0 3037.dat +1 14 90 -238 200 0 0 -1 0 1 0 1 0 0 3037.dat +1 14 60 -238 180 1 0 0 0 1 0 0 0 1 3003.dat +1 14 60 -238 220 1 0 0 0 1 0 0 0 1 3003.dat +1 72 60 -110 20 1 0 0 0 1 0 0 0 1 3001.dat +1 71 20 -134 -10 1 0 0 0 1 0 0 0 1 3010.dat +1 71 100 -134 -10 1 0 0 0 1 0 0 0 1 3010.dat +1 72 60 -134 20 1 0 0 0 1 0 0 0 1 3001.dat +1 71 0 -182 -10 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 0 -206 -10 1 0 0 0 1 0 0 0 1 3004.dat +1 71 120 -182 -10 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 120 -206 -10 1 0 0 0 1 0 0 0 1 3004.dat +1 71 60 -158 -40 1 0 0 0 1 0 0 0 1 3001.dat +1 71 60 -158 0 1 0 0 0 1 0 0 0 1 3001.dat +1 71 60 -182 -20 1 0 0 0 1 0 0 0 1 3001.dat +1 71 60 -182 20 1 0 0 0 1 0 0 0 1 3001.dat +1 0 30 -182 -70 1 0 0 0 1 0 0 0 1 47905.dat +1 15 30 -172 -88 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 0 90 -182 -70 1 0 0 0 1 0 0 0 1 47905.dat +1 15 90 -172 -88 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 71 60 -182 -70 1 0 0 0 1 0 0 0 1 3004.dat +1 71 40 -190 -40 0 0 -1 0 1 0 1 0 0 87079.dat +1 71 30 -206 30 1 0 0 0 1 0 0 0 1 85080.dat +1 71 80 -190 -40 0 0 -1 0 1 0 1 0 0 87079.dat +1 71 70 -206 30 1 0 0 0 1 0 0 0 1 85080.dat +1 71 60 -158 -70 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 50 -110 -100 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 70 -110 -100 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 60 -158 -130 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 50 -182 -130 1 0 0 0 1 0 0 0 1 3005.dat +1 71 70 -182 -130 1 0 0 0 1 0 0 0 1 3005.dat diff --git a/brickwright/alt/alt-025/thumb-512.avif b/brickwright/alt/alt-025/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..1ce3b474bef04c44f7f091c49a148f96cedeb13e Binary files /dev/null and b/brickwright/alt/alt-025/thumb-512.avif differ diff --git a/brickwright/alt/alt-025/trace.jsonl.gz b/brickwright/alt/alt-025/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..23e06776b07b6c237112b1dffb42ca60bb55395d --- /dev/null +++ b/brickwright/alt/alt-025/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a400e680a295ba289b9751b19f625c3b314afe83d9ba3b26e010684a07a0e555 +size 7932 diff --git a/brickwright/alt/alt-025/view-0.avif b/brickwright/alt/alt-025/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..80cb3aa88f2dfec711887536ffb0cf4cd62a6ee4 Binary files /dev/null and b/brickwright/alt/alt-025/view-0.avif differ diff --git a/brickwright/alt/alt-025/view-1.avif b/brickwright/alt/alt-025/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..ba55b9b64c3e26a86023dd743aa0e2f41b5061c9 Binary files /dev/null and b/brickwright/alt/alt-025/view-1.avif differ diff --git a/brickwright/alt/alt-025/view-2.avif b/brickwright/alt/alt-025/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..58ebd0eed257e5c5b2bc2d79bd27abf6275c6f5d Binary files /dev/null and b/brickwright/alt/alt-025/view-2.avif differ diff --git a/brickwright/alt/alt-025/view-3.avif b/brickwright/alt/alt-025/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..beac7b0de50cfb8b2bbaeb7dbe00761fa8335cd9 Binary files /dev/null and b/brickwright/alt/alt-025/view-3.avif differ diff --git a/brickwright/alt/alt-025/view-4.avif b/brickwright/alt/alt-025/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..41a837f507a233f9b9d0c347367ad1085bf972df Binary files /dev/null and b/brickwright/alt/alt-025/view-4.avif differ diff --git a/brickwright/alt/alt-025/view-5.avif b/brickwright/alt/alt-025/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..01c54643d0aff143d3fedfb22fd779c48251d772 Binary files /dev/null and b/brickwright/alt/alt-025/view-5.avif differ diff --git a/brickwright/alt/alt-025/view-6.avif b/brickwright/alt/alt-025/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..977e26eadaf42c35f4d8fb29d5ff86f043416833 Binary files /dev/null and b/brickwright/alt/alt-025/view-6.avif differ diff --git a/brickwright/alt/alt-025/view-7.avif b/brickwright/alt/alt-025/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..5e9c7c74f1b6db92913ed52019419b256a6742f8 Binary files /dev/null and b/brickwright/alt/alt-025/view-7.avif differ diff --git a/brickwright/alt/alt-026/build.py b/brickwright/alt/alt-026/build.py new file mode 100644 index 0000000000000000000000000000000000000000..4a8b7eca480a94eabd89ff417aedfdbfaf825198 --- /dev/null +++ b/brickwright/alt/alt-026/build.py @@ -0,0 +1,85 @@ +import json +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + def add(pid,col,x,y,z,rot=bl.Rotation.DEG_0,name=None): + return b.add(bl.Element(pid,getattr(bl.Color,col)),(x,y,z),rotation=rot,name=name) + # Two actual pin-mounted wheelsets, with broad crossmembers above them. + for i,y in enumerate((1,6)): + axle=add('2926','BLACK',1,y,1,name=f'axle_{i}') + for j,d in enumerate((bl.Direction.RIGHT,bl.Direction.LEFT)): + rim=bl.Element('6014b',bl.Color.YELLOW) + w=b.connect(rim,'hinge_3_on',to=axle.find_connector('hinge_3_in',toward=d),name=f'wheel_{i}_{j}') + tyre=bl.Element('87697',bl.Color.BLACK) + b.connect(tyre,tyre.find_connector('fixed_13_on',facing=bl.Direction.BACK),to=w.find_connector('fixed_13_in',toward=bl.Direction.BACK),name=f'tyre_{i}_{j}') + for y in (1,5): add('3001','DARK_BLUISH_GRAY',1,y,4/3) + # Floor, with the brown centre completely concealed by the passenger. + for x in (0,4): add('3034','LIGHT_BLUISH_GRAY',x,0,7/3,bl.Rotation.DEG_90) + add('3795','REDDISH_BROWN',2,0,7/3,bl.Rotation.DEG_90) + add('3022','TAN',2,6,7/3) + for x in (0,5): + for y in (0,2,4,6): add('3245c','LIGHT_BLUISH_GRAY',x,y,8/3,bl.Rotation.DEG_90) + for y in (0,7): + for z in (8/3,11/3): add('3010','LIGHT_BLUISH_GRAY',1,y,z) + # Broad smooth metal lip, overhanging the outside of the cart. + for x in (-1,5): + for y in (0,4): add('87079','LIGHT_BLUISH_GRAY',x,y,14/3,bl.Rotation.DEG_90) + for y in (0,7): add('2431','LIGHT_BLUISH_GRAY',1,y,14/3,name=f'rim_{y}') + # Pink body seated securely on the floor. + add('3020','TAN',1,2,8/3) + add('3020','TAN',1,4,8/3) + for z in (3,4): + for x in (1,3): + for y in (2,4): add('3003','BRIGHT_PINK',x,y,z) + # The two long forelegs run forward from the shoulders and across the rim. + for x in (1,4): + add('3010','BRIGHT_PINK',x,-1,5,bl.Rotation.DEG_90,name=f'foreleg_{x}') + for y in (3,4,5): add('3010' if y==3 else '3004','BRIGHT_PINK',1 if y==3 else 2,y,5) + add('3004','BRIGHT_PINK',2,2,5) + # Square, friendly head leaning beyond the front of the cart. + for z in (6,7): + for y in (0,2): + if z==7 and y==0: continue + add('3001','BRIGHT_PINK',1,y,z) + for x in (1,4): add('3005','BRIGHT_PINK',x,0,7) + for x in (2,3): add('47905','BLACK',x,0,7,name=f'snout_mount_{x}') + for x in (1,4): add('3005','BRIGHT_PINK',x,1,7) + for x in (1,4): + mount=add('47905','BLACK',x,0,8,name=f'eye_mount_{x}') + e=bl.Element('98138p07',bl.Color.WHITE) + b.connect(e,'tube',to=mount.find_connector('stud',facing=bl.Direction.FRONT),name=f'eye_{x}') + add('3004','BRIGHT_PINK',2,0,8) + add('3001','BRIGHT_PINK',1,2,8) + # Snout assembled sideways: studs become the two round nostrils. + e=bl.Element('3003',bl.Color.DARK_PINK) + s=b.connect(e,e.find_connector('antistud',toward=bl.Position(-0.5,-0.5,0)),to=b.named('snout_mount_2').find_connector('stud',facing=bl.Direction.FRONT),name='snout') + for i,c in enumerate(sorted(s.find_connectors('stud',facing=bl.Direction.FRONT), key=lambda c: (-c.position.z,c.position.x))[:2]): + e=bl.Element('6141',bl.Color.DARK_BLUISH_GRAY) + b.connect(e,'antistud',to=c,name=f'nostril_{i}') + for x in (1,4): add('54200','DARK_PINK',x,0,9,name=f'ear_{x}') + return bl.translate_to_ground(b) + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + over=[] + for e,n in b.list_elements().items(): + allowed=inventory.get(e.ldraw_id,{}).get(e.color.name,0) + if n>allowed: over.append(f'{e.ldraw_id}/{e.color.name}: {n}>{allowed}') + tests.check('inventory limits',not over,str(over)) + tests.check('four wheels',sum(n for e,n in b.list_elements().items() if e.ldraw_id=='87697')==4) + tests.check('two eyes and two ears',sum(n for e,n in b.list_elements().items() if e.ldraw_id=='98138p07')==2 and sum(n for e,n in b.list_elements().items() if e.ldraw_id=='54200')==2) + snout=b.named('snout') + tests.check('snout projects beyond cart front',snout.bounding_box[0].y < 0, str(snout.bounding_box)) + legs=[b.named('foreleg_1'),b.named('foreleg_4')] + rim_z=b.named('rim_0').bounding_box[1].z + tests.check('front legs rest over rim',all(p.bounding_box[0].y < 0 and abs(p.bounding_box[0].z-rim_z)<0.01 for p in legs)) + return tests.report() diff --git a/brickwright/alt/alt-026/hero-1024.avif b/brickwright/alt/alt-026/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..58ce5fd0acc427cd14b21b7800ccdfc3eb4bb440 Binary files /dev/null and b/brickwright/alt/alt-026/hero-1024.avif differ diff --git a/brickwright/alt/alt-026/model.mpd b/brickwright/alt/alt-026/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..36ddff938ef18248a06be4313e16d442175d165a --- /dev/null +++ b/brickwright/alt/alt-026/model.mpd @@ -0,0 +1,70 @@ +1 0 60 -30 30 1 0 0 0 1 0 0 0 1 2926.dat +1 14 10 -25 30 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 4 -25 30 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 110 -25 30 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 116 -25 30 0 0 -1 1 0 0 0 -1 0 87697.dat +1 0 60 -30 130 1 0 0 0 1 0 0 0 1 2926.dat +1 14 10 -25 130 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 4 -25 130 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 110 -25 130 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 116 -25 130 0 0 -1 1 0 0 0 -1 0 87697.dat +1 72 60 -54 40 1 0 0 0 1 0 0 0 1 3001.dat +1 72 60 -54 120 1 0 0 0 1 0 0 0 1 3001.dat +1 71 20 -62 80 0 0 -1 0 1 0 1 0 0 3034.dat +1 71 100 -62 80 0 0 -1 0 1 0 1 0 0 3034.dat +1 70 60 -62 60 0 0 -1 0 1 0 1 0 0 3795.dat +1 19 60 -62 140 1 0 0 0 1 0 0 0 1 3022.dat +1 71 10 -110 20 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 10 -110 60 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 10 -110 100 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 10 -110 140 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 110 -110 20 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 110 -110 60 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 110 -110 100 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 110 -110 140 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 60 -86 10 1 0 0 0 1 0 0 0 1 3010.dat +1 71 60 -110 10 1 0 0 0 1 0 0 0 1 3010.dat +1 71 60 -86 150 1 0 0 0 1 0 0 0 1 3010.dat +1 71 60 -110 150 1 0 0 0 1 0 0 0 1 3010.dat +1 71 0 -118 40 0 0 -1 0 1 0 1 0 0 87079.dat +1 71 0 -118 120 0 0 -1 0 1 0 1 0 0 87079.dat +1 71 120 -118 40 0 0 -1 0 1 0 1 0 0 87079.dat +1 71 120 -118 120 0 0 -1 0 1 0 1 0 0 87079.dat +1 71 60 -118 10 1 0 0 0 1 0 0 0 1 2431.dat +1 71 60 -118 150 1 0 0 0 1 0 0 0 1 2431.dat +1 19 60 -70 60 1 0 0 0 1 0 0 0 1 3020.dat +1 19 60 -70 100 1 0 0 0 1 0 0 0 1 3020.dat +1 29 40 -94 60 1 0 0 0 1 0 0 0 1 3003.dat +1 29 40 -94 100 1 0 0 0 1 0 0 0 1 3003.dat +1 29 80 -94 60 1 0 0 0 1 0 0 0 1 3003.dat +1 29 80 -94 100 1 0 0 0 1 0 0 0 1 3003.dat +1 29 40 -118 60 1 0 0 0 1 0 0 0 1 3003.dat +1 29 40 -118 100 1 0 0 0 1 0 0 0 1 3003.dat +1 29 80 -118 60 1 0 0 0 1 0 0 0 1 3003.dat +1 29 80 -118 100 1 0 0 0 1 0 0 0 1 3003.dat +1 29 30 -142 20 0 0 -1 0 1 0 1 0 0 3010.dat +1 29 90 -142 20 0 0 -1 0 1 0 1 0 0 3010.dat +1 29 60 -142 70 1 0 0 0 1 0 0 0 1 3010.dat +1 29 60 -142 90 1 0 0 0 1 0 0 0 1 3004.dat +1 29 60 -142 110 1 0 0 0 1 0 0 0 1 3004.dat +1 29 60 -142 50 1 0 0 0 1 0 0 0 1 3004.dat +1 29 60 -166 20 1 0 0 0 1 0 0 0 1 3001.dat +1 29 60 -166 60 1 0 0 0 1 0 0 0 1 3001.dat +1 29 60 -190 60 1 0 0 0 1 0 0 0 1 3001.dat +1 29 30 -190 10 1 0 0 0 1 0 0 0 1 3005.dat +1 29 90 -190 10 1 0 0 0 1 0 0 0 1 3005.dat +1 0 50 -190 10 1 0 0 0 1 0 0 0 1 47905.dat +1 0 70 -190 10 1 0 0 0 1 0 0 0 1 47905.dat +1 29 30 -190 30 1 0 0 0 1 0 0 0 1 3005.dat +1 29 90 -190 30 1 0 0 0 1 0 0 0 1 3005.dat +1 0 30 -214 10 1 0 0 0 1 0 0 0 1 47905.dat +1 15 30 -204 -8 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 0 90 -214 10 1 0 0 0 1 0 0 0 1 47905.dat +1 15 90 -204 -8 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 29 60 -214 10 1 0 0 0 1 0 0 0 1 3004.dat +1 29 60 -214 60 1 0 0 0 1 0 0 0 1 3001.dat +1 5 60 -190 -24 1 0 0 0 0 -1 0 1 0 3003.dat +1 72 50 -200 -32 1 0 0 0 0 -1 0 1 0 6141.dat +1 72 70 -200 -32 1 0 0 0 0 -1 0 1 0 6141.dat +1 5 30 -214 10 1 0 0 0 1 0 0 0 1 54200.dat +1 5 90 -214 10 1 0 0 0 1 0 0 0 1 54200.dat diff --git a/brickwright/alt/alt-026/thumb-512.avif b/brickwright/alt/alt-026/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..5d93e3cba53e6c2ead8277cc269ab3b7ba76f265 Binary files /dev/null and b/brickwright/alt/alt-026/thumb-512.avif differ diff --git a/brickwright/alt/alt-026/trace.jsonl.gz b/brickwright/alt/alt-026/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..5bff492d57a93bcf08c6ed2a305b198287ed3edc --- /dev/null +++ b/brickwright/alt/alt-026/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7443e3b46971922271f1cd86af17c19b7de727df3b41aec6e1991b5b77daab7 +size 7480 diff --git a/brickwright/alt/alt-026/view-0.avif b/brickwright/alt/alt-026/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..13442c1d20b36e87ba42a21b51dea6eec343b13e Binary files /dev/null and b/brickwright/alt/alt-026/view-0.avif differ diff --git a/brickwright/alt/alt-026/view-1.avif b/brickwright/alt/alt-026/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..c7147e1e3f17897b1712678142a326b5e8c0ae9f Binary files /dev/null and b/brickwright/alt/alt-026/view-1.avif differ diff --git a/brickwright/alt/alt-026/view-2.avif b/brickwright/alt/alt-026/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..447cfeb86b8d174ee7fa014ecd17621185a87cbb Binary files /dev/null and b/brickwright/alt/alt-026/view-2.avif differ diff --git a/brickwright/alt/alt-026/view-3.avif b/brickwright/alt/alt-026/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..ef9b3edfabe1b58f140dedaf10a1a94a9048f51a Binary files /dev/null and b/brickwright/alt/alt-026/view-3.avif differ diff --git a/brickwright/alt/alt-026/view-4.avif b/brickwright/alt/alt-026/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..bd544cf8b948362347437d515740aef4a01a912a Binary files /dev/null and b/brickwright/alt/alt-026/view-4.avif differ diff --git a/brickwright/alt/alt-026/view-5.avif b/brickwright/alt/alt-026/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..173b05eeceb0de2bf870c39fbfeac911a79414a9 Binary files /dev/null and b/brickwright/alt/alt-026/view-5.avif differ diff --git a/brickwright/alt/alt-026/view-6.avif b/brickwright/alt/alt-026/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..54dbb9b3dab3713a861312cab7278f69100ebf0a Binary files /dev/null and b/brickwright/alt/alt-026/view-6.avif differ diff --git a/brickwright/alt/alt-026/view-7.avif b/brickwright/alt/alt-026/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..464348ef6b1bfa80e2777750edd6211be32e5519 Binary files /dev/null and b/brickwright/alt/alt-026/view-7.avif differ diff --git a/brickwright/alt/alt-027/build.py b/brickwright/alt/alt-027/build.py new file mode 100644 index 0000000000000000000000000000000000000000..692c51ce5d1986f59bdbfcc0727f894fea54f098 --- /dev/null +++ b/brickwright/alt/alt-027/build.py @@ -0,0 +1,97 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + def add(pid,col,x,y,z,rot=0,name=None): + return b.add(bl.Element(pid,getattr(bl.Color,col)),(x,y,z),bl.Rotation(rot),name=name) + def face(pid,col,target,x): + e=bl.Element(pid,getattr(bl.Color,col)) + return b.connect(e,e.find_connector('antistud' if pid!='98138p07' else 'tube',toward=bl.Direction.RIGHT),to=target.find_connector('stud',facing=bl.Direction.FRONT,toward=(x,0,0))) + # A shared platform ties the two broad boots together. + add('3029','DARK_BLUISH_GRAY',0,0,0,name='platform') + for x in (3,7): + add('3002','BLACK',x,0,1/3,1) + for level in range(4): + for y in (1,2): + add('3004','DARK_BLUE',x,y,4/3+level) + add('2456','BLACK',3,1,16/3,name='belt') + # Staggered blue jacket. + for level in range(4): + z=19/3+level + if level >= 2: + trim=add('30414','BLUE',3,1,z) + add('3004','DARK_AZURE',7,1,z) + add('3001','BLUE',3,2,z) + add('3004','DARK_AZURE',7,2,z) + if level==3: + face('3069b','WHITE',trim,3.5) + face('3069b','WHITE',trim,5.5) + else: + for x in (4.5,5.5): + e=bl.Element('6141',bl.Color.TRANS_ORANGE) + b.connect(e,e.find_connector('antistud'),to=trim.find_connector('stud',facing=bl.Direction.FRONT,toward=(x,0,z))) + elif level%2==0: + add('3001','BLUE',3,1,z) + add('3004','DARK_AZURE',7,1,z) + add('3004','DARK_AZURE',7,2,z) + else: + add('3003','BLUE',3,1,z) + add('3001','BLUE',5,1,z) + # Sideways jacket decorations: white collar and brass-colored buttons. + # Arms overhang and are stitched to the torso by shoulder plates. + add('3003','BLUE',1,1,28/3,name='flag_sleeve') + add('3002','BLUE',9,1,28/3,name='lamp_sleeve') + add('3023b','DARK_AZURE',2,1,31/3) + add('3710','BLUE',8,1,31/3) + add('3003','YELLOW',0,1,31/3,name='flag_hand') + add('3003','YELLOW',11,1,25/3,name='lantern_hand') + # Neck and expressive three-brick face. + add('3003','YELLOW',5,1,31/3) + mouth=add('30414','TAN',4,1,34/3) + eyes=add('30414','TAN',4,1,37/3) + for z in (34/3,37/3): + for x in (4,6): add('3004','TAN',x,2,z) + add('3001','TAN',4,1,40/3) + face('3069b','WHITE',mouth,5.5) + face('98138p07','WHITE',eyes,4.5) + face('98138p07','WHITE',eyes,7.5) + face('3023b','TAN',eyes,5.5) + # Wide peaked blue cap. + add('3031','BLUE',4,0,43/3,name='cap_peak') + add('3710','BLUE',3,0,43/3,1) + add('3710','BLUE',8,0,43/3,1) + add('3039','BLUE',3,1,44/3,3) + add('3003','BLUE',5,1,44/3) + add('3039','BLUE',7,1,44/3,1) + # The raised hand grips a brown flagstaff with a sideways green flag. + for z in (34/3,37/3): add('3062b','REDDISH_BROWN',0,1,z) + mount=add('4070','GREEN',0,1,40/3,name='flag_mount') + flag=bl.Element('3021',bl.Color.GREEN) + b.connect(flag,flag.find_connector('antistud',toward=bl.Direction.LEFT),to=mount.find_connector('stud',facing=bl.Direction.FRONT),name='green_flag') + # Lantern: base, amber light, clear glazing, roof, and open carrying loop. + add('11212','DARK_BLUISH_GRAY',12,0,28/3,name='lantern_base') + add('3941','TRANS_ORANGE',12,1,29/3) + add('3941','TRANS_CLEAR',12,1,32/3) + add('11212','DARK_BLUISH_GRAY',12,0,35/3) + add('60592','BLACK',12,1,12,name='lantern_handle') + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + stock=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + violations=[(pid,c,n,stock.get(pid,{}).get(c,0)) for (pid,c),n in used.items() if n>stock.get(pid,{}).get(c,0)] + tests.check('inventory limits',not violations,str(violations)) + tests.check('green flag',b.named('green_flag').content.color==bl.Color.GREEN) + tests.check('blue cap and uniform',b.named('cap_peak').content.color==bl.Color.BLUE and b.named('flag_sleeve').content.color==bl.Color.BLUE) + tests.check('two hands and lantern',all(n in b.names for n in ['flag_hand','lantern_hand','lantern_base','lantern_handle'])) + return tests.report() diff --git a/brickwright/alt/alt-027/hero-1024.avif b/brickwright/alt/alt-027/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..fc6ec1a95ace75bf2c85f2ba654a712115b01ff4 Binary files /dev/null and b/brickwright/alt/alt-027/hero-1024.avif differ diff --git a/brickwright/alt/alt-027/model.mpd b/brickwright/alt/alt-027/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..b43bf51461896afcebde356c918860ff9dac3c18 --- /dev/null +++ b/brickwright/alt/alt-027/model.mpd @@ -0,0 +1,70 @@ +1 72 120 -8 40 1 0 0 0 1 0 0 0 1 3029.dat +1 0 80 -32 30 0 0 -1 0 1 0 1 0 0 3002.dat +1 272 80 -56 30 1 0 0 0 1 0 0 0 1 3004.dat +1 272 80 -56 50 1 0 0 0 1 0 0 0 1 3004.dat +1 272 80 -80 30 1 0 0 0 1 0 0 0 1 3004.dat +1 272 80 -80 50 1 0 0 0 1 0 0 0 1 3004.dat +1 272 80 -104 30 1 0 0 0 1 0 0 0 1 3004.dat +1 272 80 -104 50 1 0 0 0 1 0 0 0 1 3004.dat +1 272 80 -128 30 1 0 0 0 1 0 0 0 1 3004.dat +1 272 80 -128 50 1 0 0 0 1 0 0 0 1 3004.dat +1 0 160 -32 30 0 0 -1 0 1 0 1 0 0 3002.dat +1 272 160 -56 30 1 0 0 0 1 0 0 0 1 3004.dat +1 272 160 -56 50 1 0 0 0 1 0 0 0 1 3004.dat +1 272 160 -80 30 1 0 0 0 1 0 0 0 1 3004.dat +1 272 160 -80 50 1 0 0 0 1 0 0 0 1 3004.dat +1 272 160 -104 30 1 0 0 0 1 0 0 0 1 3004.dat +1 272 160 -104 50 1 0 0 0 1 0 0 0 1 3004.dat +1 272 160 -128 30 1 0 0 0 1 0 0 0 1 3004.dat +1 272 160 -128 50 1 0 0 0 1 0 0 0 1 3004.dat +1 0 120 -152 40 1 0 0 0 1 0 0 0 1 2456.dat +1 1 100 -176 40 1 0 0 0 1 0 0 0 1 3001.dat +1 321 160 -176 30 1 0 0 0 1 0 0 0 1 3004.dat +1 321 160 -176 50 1 0 0 0 1 0 0 0 1 3004.dat +1 1 80 -200 40 1 0 0 0 1 0 0 0 1 3003.dat +1 1 140 -200 40 1 0 0 0 1 0 0 0 1 3001.dat +1 1 100 -224 30 1 0 0 0 1 0 0 0 1 30414.dat +1 321 160 -224 30 1 0 0 0 1 0 0 0 1 3004.dat +1 1 100 -224 60 1 0 0 0 1 0 0 0 1 3001.dat +1 321 160 -224 50 1 0 0 0 1 0 0 0 1 3004.dat +1 57 90 -214 12 1 0 0 0 0 -1 0 1 0 6141.dat +1 57 110 -214 12 1 0 0 0 0 -1 0 1 0 6141.dat +1 1 100 -248 30 1 0 0 0 1 0 0 0 1 30414.dat +1 321 160 -248 30 1 0 0 0 1 0 0 0 1 3004.dat +1 1 100 -248 60 1 0 0 0 1 0 0 0 1 3001.dat +1 321 160 -248 50 1 0 0 0 1 0 0 0 1 3004.dat +1 15 80 -238 12 1 0 0 0 0 -1 0 1 0 3069b.dat +1 15 120 -238 12 1 0 0 0 0 -1 0 1 0 3069b.dat +1 1 40 -248 40 1 0 0 0 1 0 0 0 1 3003.dat +1 1 210 -248 40 1 0 0 0 1 0 0 0 1 3002.dat +1 321 60 -256 30 1 0 0 0 1 0 0 0 1 3023b.dat +1 1 200 -256 30 1 0 0 0 1 0 0 0 1 3710.dat +1 14 20 -272 40 1 0 0 0 1 0 0 0 1 3003.dat +1 14 240 -224 40 1 0 0 0 1 0 0 0 1 3003.dat +1 14 120 -272 40 1 0 0 0 1 0 0 0 1 3003.dat +1 19 120 -296 30 1 0 0 0 1 0 0 0 1 30414.dat +1 19 120 -320 30 1 0 0 0 1 0 0 0 1 30414.dat +1 19 100 -296 50 1 0 0 0 1 0 0 0 1 3004.dat +1 19 140 -296 50 1 0 0 0 1 0 0 0 1 3004.dat +1 19 100 -320 50 1 0 0 0 1 0 0 0 1 3004.dat +1 19 140 -320 50 1 0 0 0 1 0 0 0 1 3004.dat +1 19 120 -344 40 1 0 0 0 1 0 0 0 1 3001.dat +1 15 120 -286 12 1 0 0 0 0 -1 0 1 0 3069b.dat +1 15 90 -310 12 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 150 -310 12 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 19 120 -310 12 1 0 0 0 0 -1 0 1 0 3023b.dat +1 1 120 -352 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 70 -352 40 0 0 -1 0 1 0 1 0 0 3710.dat +1 1 170 -352 40 0 0 -1 0 1 0 1 0 0 3710.dat +1 1 90 -376 40 0 0 1 0 1 0 -1 0 0 3039.dat +1 1 120 -376 40 1 0 0 0 1 0 0 0 1 3003.dat +1 1 150 -376 40 0 0 -1 0 1 0 1 0 0 3039.dat +1 70 10 -296 30 1 0 0 0 1 0 0 0 1 3062b.dat +1 70 10 -320 30 1 0 0 0 1 0 0 0 1 3062b.dat +1 2 10 -344 30 1 0 0 0 1 0 0 0 1 4070.dat +1 2 -10 -344 16 1 0 0 0 0 -1 0 1 0 3021.dat +1 72 270 -232 30 1 0 0 0 1 0 0 0 1 11212.dat +1 57 260 -256 40 1 0 0 0 1 0 0 0 1 3941.dat +1 47 260 -280 40 1 0 0 0 1 0 0 0 1 3941.dat +1 72 270 -288 30 1 0 0 0 1 0 0 0 1 11212.dat +1 0 260 -336 30 1 0 0 0 1 0 0 0 1 60592.dat diff --git a/brickwright/alt/alt-027/thumb-512.avif b/brickwright/alt/alt-027/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..eade6d4fe528445b504f35655ee349d1d425a124 Binary files /dev/null and b/brickwright/alt/alt-027/thumb-512.avif differ diff --git a/brickwright/alt/alt-027/trace.jsonl.gz b/brickwright/alt/alt-027/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..dabad3e10e24a6417a2649167a60636d5bd32618 --- /dev/null +++ b/brickwright/alt/alt-027/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0a74046fbdce3d24140c10319cfb336e25ade7f21f445bb6c2950740600d7b2 +size 6325 diff --git a/brickwright/alt/alt-027/view-0.avif b/brickwright/alt/alt-027/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..799ce410420a3a787f416382bf73ccde89f72b5d Binary files /dev/null and b/brickwright/alt/alt-027/view-0.avif differ diff --git a/brickwright/alt/alt-027/view-1.avif b/brickwright/alt/alt-027/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..38d0ce80d03f77ec5763688558c3c4d6c99d80fd Binary files /dev/null and b/brickwright/alt/alt-027/view-1.avif differ diff --git a/brickwright/alt/alt-027/view-2.avif b/brickwright/alt/alt-027/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..ae1285708d1b2659ae20c0f09ca0d1961430dcd3 Binary files /dev/null and b/brickwright/alt/alt-027/view-2.avif differ diff --git a/brickwright/alt/alt-027/view-3.avif b/brickwright/alt/alt-027/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..6af6086d98226d9c48a3d031f3823af4985f6b81 Binary files /dev/null and b/brickwright/alt/alt-027/view-3.avif differ diff --git a/brickwright/alt/alt-027/view-4.avif b/brickwright/alt/alt-027/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..f0f53b161dd81e82d2a3ff22f54e8ca84e842dce Binary files /dev/null and b/brickwright/alt/alt-027/view-4.avif differ diff --git a/brickwright/alt/alt-027/view-5.avif b/brickwright/alt/alt-027/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..add967501576075db65a20d04611e5a4ece85cf2 Binary files /dev/null and b/brickwright/alt/alt-027/view-5.avif differ diff --git a/brickwright/alt/alt-027/view-6.avif b/brickwright/alt/alt-027/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..5894b8efba958acc1fd00339e21f22426707e192 Binary files /dev/null and b/brickwright/alt/alt-027/view-6.avif differ diff --git a/brickwright/alt/alt-027/view-7.avif b/brickwright/alt/alt-027/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..e0f070929d35f076b0d476b73375581bc4eca35c Binary files /dev/null and b/brickwright/alt/alt-027/view-7.avif differ diff --git a/brickwright/alt/alt-028/build.py b/brickwright/alt/alt-028/build.py new file mode 100644 index 0000000000000000000000000000000000000000..ae146abe314924eefc157b6fefbebf52d6b75b6c --- /dev/null +++ b/brickwright/alt/alt-028/build.py @@ -0,0 +1,89 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + lift = 0 + def put(pid, color, x, y, z, rot=bl.Rotation.DEG_0, name=None): + return b.add(bl.Element(pid, getattr(bl.Color,color)), (x,y,z+lift), rotation=rot, name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='landscape') + for y in (4,10): + put('3021','GREEN',4,y,1/3,bl.Rotation.DEG_90) + lift = 1/3 + # Two concealed black bearing pedestals secure the display to its base. + for y in (4,10): + put('3002','BLACK',4,y,1/3,bl.Rotation.DEG_90) + for y in (5,11): + axle=put('2926','BLACK',3,y,4/3) + for direction in (bl.Direction.LEFT,bl.Direction.RIGHT): + wheel=bl.Element('6014b',bl.Color.YELLOW) + rim=b.connect(wheel,'hinge_3_on',to=axle.find_connector('hinge_3_in',facing=direction)) + tyre=bl.Element('87697',bl.Color.BLACK) + b.connect(tyre,tyre.find_connector('fixed_13_on',facing=bl.Direction.BACK),to=rim.find_connector('fixed_13_in',toward=bl.Direction.BACK)) + put('3029','DARK_BLUISH_GRAY',3,2,5/3,bl.Rotation.DEG_90,name='chassis') + # Alternating full-height hazard bars across the front buffer beam. + for i in range(4): + put('47905' if i%2==0 else '3005','BLACK' if i%2==0 else 'YELLOW',3+i,2,2,name=f'bumper_stripe_{i}') + # Low engine compartment with sloped yellow crown. + for y in (4,6): + put('3001','YELLOW',3,y,2) + put('3037','YELLOW',3,4,3,name='hood_front') + put('3037','YELLOW',3,6,3,bl.Rotation.DEG_180,name='hood_back') + # Slim dark exhaust above the rear edge of the hood. + put('3004','DARK_BLUISH_GRAY',4,6,4) + put('3004','BLACK',4,6,5) + # Cab floor and yellow lower body. + for y in (9,11): + put('3001','YELLOW',3,y,2) + for x in (3,5): + put('3065','TRANS_CLEAR',x,9,3) + put('3010','BRIGHT_LIGHT_YELLOW',3,9,4) + for x in (3,6): + put('60592','BLACK',x,10,3,bl.Rotation.DEG_90,name=f'cab_side_window_{x}') + for z in (3,4): + for x in (3,5): + put('3004','BRIGHT_LIGHT_YELLOW',x,12,z) + put('3032','YELLOW',2,9,5,name='cab_roof') + # Rear buffer and exposed running-board details. + put('3002','BLACK',3,13,2) + put('6141','RED',3,13,3) + put('6141','RED',5,13,3) + lift = 0 + # Saguaro: offset arms grow from a stud-connected trunk. + for z in (1/3,4/3): + put('3003','GREEN',11,8,z) + put('3001','GREEN',9,8,7/3) + put('3001','GREEN',11,8,10/3) + for z in (13/3,16/3): + put('3003','GREEN',11,8,z) + for y in (8,9): + put('3004','DARK_GREEN',8,y,10/3) + put('3004','DARK_GREEN',14,y,13/3) + put('3004','DARK_GREEN',14,y,16/3) + put('3039','GREEN',8,8,13/3) + put('3039','GREEN',11,8,19/3) + put('3039','GREEN',14,8,19/3) + # Sandy patches at the cactus foot, leaving its trunk attached to the base. + for x,y in ((9,6),(11,6),(13,6),(13,10)): + put('3068b','DARK_TAN',x,y,1/3) + return b + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + counts=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):n for k,n in counts.items() if n>inventory.get(k[0],{}).get(k[1],0)} + t.check('inventory limits',not excess,str(excess)) + t.check('raised cab above short hood',b.named('cab_roof').bounding_box[0].z>b.named('hood_front').bounding_box[1].z,'Cab roof above hood') + t.check('four wheels',sum(n for (pid,c),n in counts.items() if pid=='6014b')==4,'Four yellow wheel rims') + t.check('striped front bumper',all(b.named(f'bumper_stripe_{i}').content.color == (bl.Color.BLACK if i%2==0 else bl.Color.YELLOW) for i in range(4)),'Alternating black and yellow') + t.check('cactus beside locomotive',b.named('chassis').bounding_box[1].x<9,'Branching cactus to the side') + return t.report() diff --git a/brickwright/alt/alt-028/hero-1024.avif b/brickwright/alt/alt-028/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..0057d509d0e4be082c23f33ae9bfad6dff4e155d Binary files /dev/null and b/brickwright/alt/alt-028/hero-1024.avif differ diff --git a/brickwright/alt/alt-028/model.mpd b/brickwright/alt/alt-028/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..6047160d9170e2853bc33b8300fde203709d9de7 --- /dev/null +++ b/brickwright/alt/alt-028/model.mpd @@ -0,0 +1,60 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 2 100 -16 110 0 0 -1 0 1 0 1 0 0 3021.dat +1 2 100 -16 230 0 0 -1 0 1 0 1 0 0 3021.dat +1 0 100 -40 110 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 100 -40 230 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 100 -48 110 1 0 0 0 1 0 0 0 1 2926.dat +1 14 150 -43 110 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 156 -43 110 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 50 -43 110 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 44 -43 110 0 0 -1 1 0 0 0 -1 0 87697.dat +1 0 100 -48 230 1 0 0 0 1 0 0 0 1 2926.dat +1 14 150 -43 230 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 156 -43 230 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 50 -43 230 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 44 -43 230 0 0 -1 1 0 0 0 -1 0 87697.dat +1 72 100 -56 160 0 0 -1 0 1 0 1 0 0 3029.dat +1 0 70 -80 50 1 0 0 0 1 0 0 0 1 47905.dat +1 14 90 -80 50 1 0 0 0 1 0 0 0 1 3005.dat +1 0 110 -80 50 1 0 0 0 1 0 0 0 1 47905.dat +1 14 130 -80 50 1 0 0 0 1 0 0 0 1 3005.dat +1 14 100 -80 100 1 0 0 0 1 0 0 0 1 3001.dat +1 14 100 -80 140 1 0 0 0 1 0 0 0 1 3001.dat +1 14 100 -104 110 1 0 0 0 1 0 0 0 1 3037.dat +1 14 100 -104 130 -1 0 0 0 1 0 0 0 -1 3037.dat +1 72 100 -128 130 1 0 0 0 1 0 0 0 1 3004.dat +1 0 100 -152 130 1 0 0 0 1 0 0 0 1 3004.dat +1 14 100 -80 200 1 0 0 0 1 0 0 0 1 3001.dat +1 14 100 -80 240 1 0 0 0 1 0 0 0 1 3001.dat +1 47 80 -104 190 1 0 0 0 1 0 0 0 1 3065.dat +1 47 120 -104 190 1 0 0 0 1 0 0 0 1 3065.dat +1 226 100 -128 190 1 0 0 0 1 0 0 0 1 3010.dat +1 0 70 -128 220 0 0 -1 0 1 0 1 0 0 60592.dat +1 0 130 -128 220 0 0 -1 0 1 0 1 0 0 60592.dat +1 226 80 -104 250 1 0 0 0 1 0 0 0 1 3004.dat +1 226 120 -104 250 1 0 0 0 1 0 0 0 1 3004.dat +1 226 80 -128 250 1 0 0 0 1 0 0 0 1 3004.dat +1 226 120 -128 250 1 0 0 0 1 0 0 0 1 3004.dat +1 14 100 -136 220 1 0 0 0 1 0 0 0 1 3032.dat +1 0 90 -80 280 1 0 0 0 1 0 0 0 1 3002.dat +1 4 70 -88 270 1 0 0 0 1 0 0 0 1 6141.dat +1 4 110 -88 270 1 0 0 0 1 0 0 0 1 6141.dat +1 2 240 -32 180 1 0 0 0 1 0 0 0 1 3003.dat +1 2 240 -56 180 1 0 0 0 1 0 0 0 1 3003.dat +1 2 220 -80 180 1 0 0 0 1 0 0 0 1 3001.dat +1 2 260 -104 180 1 0 0 0 1 0 0 0 1 3001.dat +1 2 240 -128 180 1 0 0 0 1 0 0 0 1 3003.dat +1 2 240 -152 180 1 0 0 0 1 0 0 0 1 3003.dat +1 288 180 -104 170 1 0 0 0 1 0 0 0 1 3004.dat +1 288 300 -128 170 1 0 0 0 1 0 0 0 1 3004.dat +1 288 300 -152 170 1 0 0 0 1 0 0 0 1 3004.dat +1 288 180 -104 190 1 0 0 0 1 0 0 0 1 3004.dat +1 288 300 -128 190 1 0 0 0 1 0 0 0 1 3004.dat +1 288 300 -152 190 1 0 0 0 1 0 0 0 1 3004.dat +1 2 180 -128 190 1 0 0 0 1 0 0 0 1 3039.dat +1 2 240 -176 190 1 0 0 0 1 0 0 0 1 3039.dat +1 2 300 -176 190 1 0 0 0 1 0 0 0 1 3039.dat +1 28 200 -16 140 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 240 -16 140 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 280 -16 140 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 280 -16 220 1 0 0 0 1 0 0 0 1 3068b.dat diff --git a/brickwright/alt/alt-028/thumb-512.avif b/brickwright/alt/alt-028/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..6fc8cc441c4404e678897eaa404add2bf4a0238c Binary files /dev/null and b/brickwright/alt/alt-028/thumb-512.avif differ diff --git a/brickwright/alt/alt-028/trace.jsonl.gz b/brickwright/alt/alt-028/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..3e7ec94151fcf0b836d82cd53b9ac79da9b1e94a --- /dev/null +++ b/brickwright/alt/alt-028/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36828c9dbdcc64e4cf69cb80d4d601b694fa5481b820499755ac2f3c0e6461b7 +size 6454 diff --git a/brickwright/alt/alt-028/view-0.avif b/brickwright/alt/alt-028/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..b774cc9b8a4865f097ef36ee32fd95abffa68995 Binary files /dev/null and b/brickwright/alt/alt-028/view-0.avif differ diff --git a/brickwright/alt/alt-028/view-1.avif b/brickwright/alt/alt-028/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..bfce9f253ba2172f56d5ca85782e70cfd2be49a6 Binary files /dev/null and b/brickwright/alt/alt-028/view-1.avif differ diff --git a/brickwright/alt/alt-028/view-2.avif b/brickwright/alt/alt-028/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..9db3bcedd0c735383e5d6b07465a0de65f8c9f13 Binary files /dev/null and b/brickwright/alt/alt-028/view-2.avif differ diff --git a/brickwright/alt/alt-028/view-3.avif b/brickwright/alt/alt-028/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..0194f9b6eadcfb9cea8fa2c656e10ca5efd5fded Binary files /dev/null and b/brickwright/alt/alt-028/view-3.avif differ diff --git a/brickwright/alt/alt-028/view-4.avif b/brickwright/alt/alt-028/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..63fe0a2626914e24da9124ad8e738eeb1a6d444f Binary files /dev/null and b/brickwright/alt/alt-028/view-4.avif differ diff --git a/brickwright/alt/alt-028/view-5.avif b/brickwright/alt/alt-028/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..12b40015d092b300052495f99662e45a15708712 Binary files /dev/null and b/brickwright/alt/alt-028/view-5.avif differ diff --git a/brickwright/alt/alt-028/view-6.avif b/brickwright/alt/alt-028/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..27baf8a45d252e91cd96909302719532a0d40939 Binary files /dev/null and b/brickwright/alt/alt-028/view-6.avif differ diff --git a/brickwright/alt/alt-028/view-7.avif b/brickwright/alt/alt-028/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..b6d841cb33ec2bcc7035d97d8e66d5ecb0d079c2 Binary files /dev/null and b/brickwright/alt/alt-028/view-7.avif differ diff --git a/brickwright/alt/alt-029/build.py b/brickwright/alt/alt-029/build.py new file mode 100644 index 0000000000000000000000000000000000000000..8d93f2df0db18ccae0fe984c4b62299b7981ec03 --- /dev/null +++ b/brickwright/alt/alt-029/build.py @@ -0,0 +1,86 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid, color, x, y, z, rot=0, name=None): + return b.add(bl.Element(pid, getattr(bl.Color,color)), (x,y,z), rotation=bl.Rotation(rot), name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='landscape') + # A continuous blue river flows through the single opening. + for y in (0,4,8): + put('3031','BLUE',6,y,1/3) + for x in (6,8): + put('3020','MEDIUM_AZURE',x,12,1/3,1) + # Stone abutments, bonded through the common landscape and deck. + for x in (4,10): + for level in range(2): + put('3001','LIGHT_BLUISH_GRAY',x,6,1/3+level,1) + for x in (4,11): + for y in (6,8): + put('3245c','LIGHT_BLUISH_GRAY',x,y,7/3,1) + for x in (5,10): + for level in range(2): + put('3004','LIGHT_BLUISH_GRAY',x,7,7/3+level,1) + put('3005','LIGHT_BLUISH_GRAY',x,9,7/3+level) + put('15254','LIGHT_BLUISH_GRAY',5,6,7/3,name='single_arch') + put('3029','DARK_BLUISH_GRAY',2,6,13/3,name='bridge_deck') + # End parapets leave the train and arch in clear view. + for x in (2,12): + put('3004','DARK_BLUISH_GRAY',x,6,14/3) + put('3004','DARK_BLUISH_GRAY',x,9,14/3) + # Rail-bed support hidden inside the engine, positively stud-locked. + put('3002','BLACK',7,6,14/3,1) + put('3022','TAN',7,7,17/3) + for x in (5,10): + axle = put('2926','BLACK',x,6,17/3,1,name='axle_'+str(x)) + for target in axle.find_connectors('hinge_3_in'): + wheel = b.connect(bl.Element('6014b',bl.Color.YELLOW),'hinge_3_on',to=target) + tire = bl.Element('87697',bl.Color.BLACK) + b.connect(tire,tire.find_connector('fixed_13_on',facing=bl.Direction.BACK),to=wheel.find_connector('fixed_13_in',facing=target.axis)) + for y in (6,8): + put('3034','LIGHT_BLUISH_GRAY',4,y,6) + for x in (4,8): + put('3001','RED',x,y,19/3) + # Long dark boiler, front smokebox and a windowed cab. + put('2456','BLACK',4,7,22/3,name='boiler') + for x in (6,8): + put('85984','BLACK',x,6,22/3) + for x in (5,6,7,9): + put('3040b','BLACK',x,7,25/3) + for y in (6,9): + put('60592','BLACK',10,y,22/3,name='cab_window_'+str(y)) + put('2456','BLACK',10,5,28/3,1,name='cab_roof') + put('3062b','REDDISH_BROWN',4,7,25/3,name='chimney') + put('3062b','REDDISH_BROWN',4,7,28/3) + put('30367c','WHITE',4,7,31/3,name='steam') + put('3062b','DARK_ORANGE',8,7,25/3,name='steam_dome') + lamp_mount = put('47905','BLACK',4,6,22/3,1,name='headlamp_mount') + lamp = bl.Element('6141',bl.Color.TRANS_ORANGE) + b.connect(lamp, lamp.find_connector('antistud'), to=lamp_mount.find_connector('stud',facing=bl.Direction.RIGHT), name='headlamp') + # Grassy banks with ochre rocks and low plants. + for x,y in ((2,2),(12,12),(1,12),(12,2)): + put('3003','DARK_TAN',x,y,1/3) + put('3068b','DARK_TAN',x,y,4/3) + for x,y in ((2,5),(10,14),(2,10)): + put('4727','BRIGHT_GREEN',x,y,1/3) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):v for k,v in used.items() if v>inventory.get(k[0],{}).get(k[1],0)} + tests.check('inventory limits',not excess,str(excess)) + tests.check('one arch directly below engine',sum(p.content.ldraw_id=='15254' for p in b.flattened_placements)==1 and b.named('single_arch').center.x==b.named('bridge_deck').center.x,'Single central stone arch beneath locomotive') + tests.check('four train wheels',sum(p.content.ldraw_id=='6014b' for p in b.flattened_placements)==4) + tests.check('river beneath bridge',b.named('single_arch').bounding_box[0].z>2/3) + tests.check('steam engine details', all(n in b.names for n in ('boiler','chimney','steam','cab_roof'))) + return tests.report() diff --git a/brickwright/alt/alt-029/hero-1024.avif b/brickwright/alt/alt-029/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..0d83fe156349b1bd8dd709bcfa0429c18f51fe23 Binary files /dev/null and b/brickwright/alt/alt-029/hero-1024.avif differ diff --git a/brickwright/alt/alt-029/model.mpd b/brickwright/alt/alt-029/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..f95d8fe5f3666d9ab3abcb681ac4d122775addc7 --- /dev/null +++ b/brickwright/alt/alt-029/model.mpd @@ -0,0 +1,73 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 1 160 -16 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 160 -16 120 1 0 0 0 1 0 0 0 1 3031.dat +1 1 160 -16 200 1 0 0 0 1 0 0 0 1 3031.dat +1 322 140 -16 280 0 0 -1 0 1 0 1 0 0 3020.dat +1 322 180 -16 280 0 0 -1 0 1 0 1 0 0 3020.dat +1 71 100 -32 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 100 -56 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 220 -32 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 220 -56 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 90 -104 140 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 90 -104 180 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 230 -104 140 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 230 -104 180 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 110 -80 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 110 -80 190 1 0 0 0 1 0 0 0 1 3005.dat +1 71 110 -104 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 110 -104 190 1 0 0 0 1 0 0 0 1 3005.dat +1 71 210 -80 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 210 -80 190 1 0 0 0 1 0 0 0 1 3005.dat +1 71 210 -104 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 210 -104 190 1 0 0 0 1 0 0 0 1 3005.dat +1 71 160 -104 130 1 0 0 0 1 0 0 0 1 15254.dat +1 72 160 -112 160 1 0 0 0 1 0 0 0 1 3029.dat +1 72 60 -136 130 1 0 0 0 1 0 0 0 1 3004.dat +1 72 60 -136 190 1 0 0 0 1 0 0 0 1 3004.dat +1 72 260 -136 130 1 0 0 0 1 0 0 0 1 3004.dat +1 72 260 -136 190 1 0 0 0 1 0 0 0 1 3004.dat +1 0 160 -136 150 0 0 -1 0 1 0 1 0 0 3002.dat +1 19 160 -144 160 1 0 0 0 1 0 0 0 1 3022.dat +1 0 110 -144 160 0 0 -1 0 1 0 1 0 0 2926.dat +1 14 110 -139 110 0 1 0 -1 0 0 0 0 1 6014b.dat +1 0 110 -139 104 0 1 0 1 0 0 0 0 -1 87697.dat +1 14 110 -139 210 0 1 0 1 0 0 0 0 -1 6014b.dat +1 0 110 -139 216 0 1 0 -1 0 0 0 0 1 87697.dat +1 0 210 -144 160 0 0 -1 0 1 0 1 0 0 2926.dat +1 14 210 -139 110 0 1 0 -1 0 0 0 0 1 6014b.dat +1 0 210 -139 104 0 1 0 1 0 0 0 0 -1 87697.dat +1 14 210 -139 210 0 1 0 1 0 0 0 0 -1 6014b.dat +1 0 210 -139 216 0 1 0 -1 0 0 0 0 1 87697.dat +1 71 160 -152 140 1 0 0 0 1 0 0 0 1 3034.dat +1 4 120 -176 140 1 0 0 0 1 0 0 0 1 3001.dat +1 4 200 -176 140 1 0 0 0 1 0 0 0 1 3001.dat +1 71 160 -152 180 1 0 0 0 1 0 0 0 1 3034.dat +1 4 120 -176 180 1 0 0 0 1 0 0 0 1 3001.dat +1 4 200 -176 180 1 0 0 0 1 0 0 0 1 3001.dat +1 0 140 -200 160 1 0 0 0 1 0 0 0 1 2456.dat +1 0 140 -176 130 1 0 0 0 1 0 0 0 1 85984.dat +1 0 180 -176 130 1 0 0 0 1 0 0 0 1 85984.dat +1 0 110 -224 170 1 0 0 0 1 0 0 0 1 3040b.dat +1 0 130 -224 170 1 0 0 0 1 0 0 0 1 3040b.dat +1 0 150 -224 170 1 0 0 0 1 0 0 0 1 3040b.dat +1 0 190 -224 170 1 0 0 0 1 0 0 0 1 3040b.dat +1 0 220 -224 130 1 0 0 0 1 0 0 0 1 60592.dat +1 0 220 -224 190 1 0 0 0 1 0 0 0 1 60592.dat +1 0 220 -248 160 0 0 -1 0 1 0 1 0 0 2456.dat +1 70 90 -224 150 1 0 0 0 1 0 0 0 1 3062b.dat +1 70 90 -248 150 1 0 0 0 1 0 0 0 1 3062b.dat +1 15 100 -272 160 1 0 0 0 1 0 0 0 1 30367c.dat +1 484 170 -224 150 1 0 0 0 1 0 0 0 1 3062b.dat +1 0 90 -200 130 0 0 -1 0 1 0 1 0 0 47905.dat +1 57 72 -190 130 0 1 0 0 0 1 1 0 0 6141.dat +1 28 60 -32 60 1 0 0 0 1 0 0 0 1 3003.dat +1 28 60 -40 60 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 260 -32 260 1 0 0 0 1 0 0 0 1 3003.dat +1 28 260 -40 260 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 40 -32 260 1 0 0 0 1 0 0 0 1 3003.dat +1 28 40 -40 260 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 260 -32 60 1 0 0 0 1 0 0 0 1 3003.dat +1 28 260 -40 60 1 0 0 0 1 0 0 0 1 3068b.dat +1 10 50 -32 110 1 0 0 0 1 0 0 0 1 4727.dat +1 10 210 -32 290 1 0 0 0 1 0 0 0 1 4727.dat +1 10 50 -32 210 1 0 0 0 1 0 0 0 1 4727.dat diff --git a/brickwright/alt/alt-029/thumb-512.avif b/brickwright/alt/alt-029/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..a59be324cd58eba1b933c4b777264855f81b06f7 Binary files /dev/null and b/brickwright/alt/alt-029/thumb-512.avif differ diff --git a/brickwright/alt/alt-029/trace.jsonl.gz b/brickwright/alt/alt-029/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..a2ed892553bd6a01f49e7b3d856980d21ff9dfdf --- /dev/null +++ b/brickwright/alt/alt-029/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4eee1846854e926c8a86953a5c6d6fe54567da74559f5d299239713b1a2fa10 +size 7203 diff --git a/brickwright/alt/alt-029/view-0.avif b/brickwright/alt/alt-029/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..8b5633b779504fd9f38f5edbeae2bd98ecf03826 Binary files /dev/null and b/brickwright/alt/alt-029/view-0.avif differ diff --git a/brickwright/alt/alt-029/view-1.avif b/brickwright/alt/alt-029/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..d00cb10435bf676e9aa0ff1d900baf304d87073d Binary files /dev/null and b/brickwright/alt/alt-029/view-1.avif differ diff --git a/brickwright/alt/alt-029/view-2.avif b/brickwright/alt/alt-029/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..f32a52630d1976e64f5b5f4afcf21b5f19b95c80 Binary files /dev/null and b/brickwright/alt/alt-029/view-2.avif differ diff --git a/brickwright/alt/alt-029/view-3.avif b/brickwright/alt/alt-029/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..ebe1ec60a65f4e53ac61ac69af1c7867c5a4c342 Binary files /dev/null and b/brickwright/alt/alt-029/view-3.avif differ diff --git a/brickwright/alt/alt-029/view-4.avif b/brickwright/alt/alt-029/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..f6be202a130db9f03bcf1899dfb3286608b4ed67 Binary files /dev/null and b/brickwright/alt/alt-029/view-4.avif differ diff --git a/brickwright/alt/alt-029/view-5.avif b/brickwright/alt/alt-029/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..9019b8e4d95fb3c9f8e4b4d847581babe01c09ef Binary files /dev/null and b/brickwright/alt/alt-029/view-5.avif differ diff --git a/brickwright/alt/alt-029/view-6.avif b/brickwright/alt/alt-029/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..97c597988290170313babf8340aac322b37ed31d Binary files /dev/null and b/brickwright/alt/alt-029/view-6.avif differ diff --git a/brickwright/alt/alt-029/view-7.avif b/brickwright/alt/alt-029/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..ff2bf669fe93b6265ed2afb80ec40ae3ad5a50b5 Binary files /dev/null and b/brickwright/alt/alt-029/view-7.avif differ diff --git a/brickwright/alt/alt-030/build.py b/brickwright/alt/alt-030/build.py new file mode 100644 index 0000000000000000000000000000000000000000..38f38ab7be2880b09b5fccd4697913d4dc72adb3 --- /dev/null +++ b/brickwright/alt/alt-030/build.py @@ -0,0 +1,92 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + C = bl.Color + def add(pid, color, x,y,z, name=None, rot=bl.Rotation.DEG_0): + return b.add(bl.Element(pid, color), (x,y,z), rotation=rot, name=name) + # A rigid green diorama foundation and a gray ballast strip. + add('91405',C.BRIGHT_GREEN,0,0,0,'ground') + add('3029',C.DARK_BLUISH_GRAY,2,2,1/3,'ballast') + # Three timber sleepers, extending toward the worker. + for i,x in enumerate((3,7,11)): + add('3010', C.REDDISH_BROWN,x,2,2/3,'sleeper_'+str(i),bl.Rotation.DEG_90) + if i<2: + add('3795',C.REDDISH_BROWN,x,2,5/3,'timber_cap_'+str(i),bl.Rotation.DEG_90) + add('6141',C.REDDISH_BROWN,11,3,5/3,'rail_packing') + # Rail web, with a continuous smooth steel running surface. + for i,x in enumerate((2,6,10)): + add('3010',C.LIGHT_BLUISH_GRAY,x,3,2,'rail_web_'+str(i)) + for i,x in enumerate((2,6,10)): + add('87079',C.LIGHT_BLUISH_GRAY,x,3,3,'rail_top_'+str(i)) + # Spike next to, not through, the rail. + add('3005',C.LIGHT_BLUISH_GRAY,7,6,2,'spike') + add('6141',C.DARK_BLUISH_GRAY,7,6,3,'spike_head') + # Kneeling leg: knee on the earth and shin trailing behind. + add('3002',C.BLACK,8,12,1/3,'back_boot',bl.Rotation.DEG_90) + add('3001',C.BLUE,8,8,1/3,'grounded_shin',bl.Rotation.DEG_90) + add('3710',C.BLUE,8,10,4/3,'trailing_shin_bridge',bl.Rotation.DEG_90) + add('3003',C.BLUE,8,8,4/3,'kneeling_thigh_lower') + add('3003',C.BLUE,8,8,7/3,'kneeling_thigh_upper') + # Opposite foot forward, shin vertical, thigh bent horizontally. + add('3002',C.BLACK,12,6,1/3,'front_boot',bl.Rotation.DEG_90) + add('3003',C.BLUE,12,7,4/3,'upright_shin') + add('3001',C.BLUE,11,7,7/3,'raised_thigh',bl.Rotation.DEG_90) + add('3001',C.DARK_BLUISH_GRAY,8,8,10/3,'belt') + # High-visibility orange work vest with a reflective stripe. + add('3001',C.ORANGE,8,8,13/3,'vest_lower') + add('3020',C.TAN,8,8,16/3,'vest_stripe') + add('3001',C.ORANGE,8,8,17/3,'vest_upper') + # Raised bent hammer arm, joined through an overlapping shoulder beam. + add('3010',C.ORANGE,6,8,20/3,'raised_shoulder') + add('3003',C.ORANGE,6,7,23/3,'raised_elbow') + add('3004',C.TAN,7,6,26/3,'hammer_hand',bl.Rotation.DEG_90) + add('3062b',C.REDDISH_BROWN,7,6,29/3,'hammer_handle_lower') + add('3062b',C.REDDISH_BROWN,7,6,32/3,'hammer_handle_upper') + add('3010',C.LIGHT_BLUISH_GRAY,5,6,35/3,'hammer_head') + # Other arm reaches down, its hand resting on the raised knee. + add('3004',C.TAN,12,7,10/3,'resting_hand',bl.Rotation.DEG_90) + add('3004',C.ORANGE,12,8,13/3,'lower_arm',bl.Rotation.DEG_90) + add('3004',C.ORANGE,12,8,16/3,'upper_arm',bl.Rotation.DEG_90) + add('3023b',C.ORANGE,12,8,19/3,'sleeve_cuff',bl.Rotation.DEG_90) + add('3010',C.ORANGE,10,8,20/3,'other_shoulder') + add('3010',C.ORANGE,8,9,20/3,'back_shoulders') + # Head and forward-facing eyes, built with genuine side studs. + add('3001',C.TAN,8,8,23/3,'head_lower') + face=add('30414',C.TAN,8,8,26/3,'face') + for x in (8,10): + add('3004',C.TAN,x,9,26/3) + for x in (8.5,11.5): + eye=bl.Element('98138p07',C.WHITE) + b.connect(eye,eye.find_connector('tube'),to=face.find_connector('stud',facing=bl.Direction.FRONT,toward=(x,7,9.25)),name='eye_'+str(x)) + # Wide hard-hat brim and curved yellow crown. + add('3032',C.YELLOW,7,7,29/3,'helmet_brim') + add('3037',C.YELLOW,8,7,10,'helmet_front') + add('3037',C.YELLOW,8,9,10,'helmet_back',bl.Rotation.DEG_180) + return b + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):v for k,v in used.items() if v>inventory.get(k[0],{}).get(k[1],0)} + t.check('Uses only available parts and quantities',not excess,str(excess)) + hammer=b.named('hammer_head') + spike=b.named('spike_head') + t.check('Hammer above spike',hammer.center.z>spike.center.z and hammer.bounding_box[0].x <= spike.center.x <= hammer.bounding_box[1].x and abs(hammer.center.y-spike.center.y)<0.1) + timber=b.named('timber_cap_1') + spike_shaft=b.named('spike') + t.check('Spike seated on wooden sleeper beside rail',abs(spike_shaft.bounding_box[0].z-timber.alignment_box[1].z)<0.01 and spike.center.y>b.named('rail_top_1').bounding_box[1].y) + t.check('Printed face and raised hammer grip',sum(p.content.ldraw_id=='98138p07' for p in b.flattened_placements)==2 and b.named('hammer_hand').center.z>b.named('vest_upper').center.z) + t.check('One knee grounded, opposite knee raised',b.named('grounded_shin').bounding_box[0].z < b.named('raised_thigh').bounding_box[0].z) + t.check('Yellow hard hat',b.named('helmet_brim').content.color==bl.Color.YELLOW) + return t.report() diff --git a/brickwright/alt/alt-030/hero-1024.avif b/brickwright/alt/alt-030/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..7093b0947248e293a86218eafa938b33454a7dd5 Binary files /dev/null and b/brickwright/alt/alt-030/hero-1024.avif differ diff --git a/brickwright/alt/alt-030/model.mpd b/brickwright/alt/alt-030/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..f9e8b051a6f6cacddc2b7df2dd001ef211c30276 --- /dev/null +++ b/brickwright/alt/alt-030/model.mpd @@ -0,0 +1,49 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 72 160 -16 80 1 0 0 0 1 0 0 0 1 3029.dat +1 70 70 -40 80 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 80 -48 100 0 0 -1 0 1 0 1 0 0 3795.dat +1 70 150 -40 80 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 160 -48 100 0 0 -1 0 1 0 1 0 0 3795.dat +1 70 230 -40 80 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 230 -48 70 1 0 0 0 1 0 0 0 1 6141.dat +1 71 80 -72 70 1 0 0 0 1 0 0 0 1 3010.dat +1 71 160 -72 70 1 0 0 0 1 0 0 0 1 3010.dat +1 71 240 -72 70 1 0 0 0 1 0 0 0 1 3010.dat +1 71 80 -80 80 1 0 0 0 1 0 0 0 1 87079.dat +1 71 160 -80 80 1 0 0 0 1 0 0 0 1 87079.dat +1 71 240 -80 80 1 0 0 0 1 0 0 0 1 87079.dat +1 71 150 -72 130 1 0 0 0 1 0 0 0 1 3005.dat +1 72 150 -80 130 1 0 0 0 1 0 0 0 1 6141.dat +1 0 180 -32 270 0 0 -1 0 1 0 1 0 0 3002.dat +1 1 180 -32 200 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 170 -40 240 0 0 -1 0 1 0 1 0 0 3710.dat +1 1 180 -56 180 1 0 0 0 1 0 0 0 1 3003.dat +1 1 180 -80 180 1 0 0 0 1 0 0 0 1 3003.dat +1 0 260 -32 150 0 0 -1 0 1 0 1 0 0 3002.dat +1 1 260 -56 160 1 0 0 0 1 0 0 0 1 3003.dat +1 1 240 -80 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 72 200 -104 180 1 0 0 0 1 0 0 0 1 3001.dat +1 25 200 -128 180 1 0 0 0 1 0 0 0 1 3001.dat +1 19 200 -136 180 1 0 0 0 1 0 0 0 1 3020.dat +1 25 200 -160 180 1 0 0 0 1 0 0 0 1 3001.dat +1 25 160 -184 170 1 0 0 0 1 0 0 0 1 3010.dat +1 25 140 -208 160 1 0 0 0 1 0 0 0 1 3003.dat +1 19 150 -232 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 70 150 -256 130 1 0 0 0 1 0 0 0 1 3062b.dat +1 70 150 -280 130 1 0 0 0 1 0 0 0 1 3062b.dat +1 71 140 -304 130 1 0 0 0 1 0 0 0 1 3010.dat +1 19 250 -104 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 250 -128 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 250 -152 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 250 -160 180 0 0 -1 0 1 0 1 0 0 3023b.dat +1 25 240 -184 170 1 0 0 0 1 0 0 0 1 3010.dat +1 25 200 -184 190 1 0 0 0 1 0 0 0 1 3010.dat +1 19 200 -208 180 1 0 0 0 1 0 0 0 1 3001.dat +1 19 200 -232 170 1 0 0 0 1 0 0 0 1 30414.dat +1 19 180 -232 190 1 0 0 0 1 0 0 0 1 3004.dat +1 19 220 -232 190 1 0 0 0 1 0 0 0 1 3004.dat +1 15 170 -222 152 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 230 -222 152 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 14 200 -240 180 1 0 0 0 1 0 0 0 1 3032.dat +1 14 200 -264 170 1 0 0 0 1 0 0 0 1 3037.dat +1 14 200 -264 190 -1 0 0 0 1 0 0 0 -1 3037.dat diff --git a/brickwright/alt/alt-030/thumb-512.avif b/brickwright/alt/alt-030/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..6a266e425e6adca409c4888e261706d187be31e5 Binary files /dev/null and b/brickwright/alt/alt-030/thumb-512.avif differ diff --git a/brickwright/alt/alt-030/trace.jsonl.gz b/brickwright/alt/alt-030/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..560171238d7046b14a5781a42d3eca4ca30309f3 --- /dev/null +++ b/brickwright/alt/alt-030/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aeb2e28f0c079c70ba81094eb4dada39c97f16b5988d1fc446da24f185119fba +size 7827 diff --git a/brickwright/alt/alt-030/view-0.avif b/brickwright/alt/alt-030/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..3a8fdb2430a0f8903cf58679896b85ebbbf591ee Binary files /dev/null and b/brickwright/alt/alt-030/view-0.avif differ diff --git a/brickwright/alt/alt-030/view-1.avif b/brickwright/alt/alt-030/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..b4d426e1447745458fa0b648593995286b7863f1 Binary files /dev/null and b/brickwright/alt/alt-030/view-1.avif differ diff --git a/brickwright/alt/alt-030/view-2.avif b/brickwright/alt/alt-030/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..67c4cd375e0a7cf69ad5aa33435c1824bca11f48 Binary files /dev/null and b/brickwright/alt/alt-030/view-2.avif differ diff --git a/brickwright/alt/alt-030/view-3.avif b/brickwright/alt/alt-030/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..27becc43ede37d5d6713743be8bacc145e81f14b Binary files /dev/null and b/brickwright/alt/alt-030/view-3.avif differ diff --git a/brickwright/alt/alt-030/view-4.avif b/brickwright/alt/alt-030/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..5c7da4c5725c16ba922e06db8170386f5967b5d3 Binary files /dev/null and b/brickwright/alt/alt-030/view-4.avif differ diff --git a/brickwright/alt/alt-030/view-5.avif b/brickwright/alt/alt-030/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..da1a5b0ac8e2f68542212a184bf96ce4a969a56b Binary files /dev/null and b/brickwright/alt/alt-030/view-5.avif differ diff --git a/brickwright/alt/alt-030/view-6.avif b/brickwright/alt/alt-030/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..819055ca812f0731b40029b6e9d3d3ab8b183ba0 Binary files /dev/null and b/brickwright/alt/alt-030/view-6.avif differ diff --git a/brickwright/alt/alt-030/view-7.avif b/brickwright/alt/alt-030/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..db57fc2f7d7b4a44631fe2432cd961479c1db659 Binary files /dev/null and b/brickwright/alt/alt-030/view-7.avif differ diff --git a/brickwright/alt/alt-031/build.py b/brickwright/alt/alt-031/build.py new file mode 100644 index 0000000000000000000000000000000000000000..fe9ac6bef06b5da791964f80c9d2e522669917af --- /dev/null +++ b/brickwright/alt/alt-031/build.py @@ -0,0 +1,126 @@ +import bricklayer as bl +from brickwright import TestContext +import json +from collections import Counter + + +def create_build(): + b = bl.LegoBuild() + C=bl.Color + def put(pid,col,x,y,z,rot=bl.Rotation.DEG_0,name=None): + return b.add(bl.Element(pid,col),(x,y,z),rotation=rot,name=name) + # Three widely spaced short landing struts, with broad pads. + for i,(x,y) in enumerate([(1,3),(9,3),(5,9)]): + if i<2: + put('11212',C.DARK_BLUISH_GRAY,x,y,0,name=f'foot_{i}') + else: + put('3031',C.BLUE,x-1,y-1,0,name=f'foot_{i}') + for dy in (0,1): + put('3245c',C.LIGHT_BLUISH_GRAY,x,y+dy,1/3,name=f'leg_{i}_{dy}') + # The flattened, stepped disc: brick core and a seam-bridging deck. + for y,xs,pid,col in [ + (0,[2,6],'3001',C.LIGHT_BLUISH_GRAY), + (2,[0,4,8],'3001',C.MEDIUM_AZURE), + (4,[0,6],'2456',C.BLACK), + (6,[0,4,8],'3001',C.DARK_BLUISH_GRAY), + (8,[0],'3001',C.MEDIUM_AZURE), + (8,[4,8],'3001',C.LIGHT_BLUISH_GRAY), + (10,[2,6],'3001',C.BLUE)]: + for x in xs: put(pid,col,x,y,7/3) + put('3029',C.DARK_BLUISH_GRAY,0,4,10/3) + for y in (2,8): put('3034',C.LIGHT_BLUISH_GRAY,2,y,10/3) + for y in (0,10): + for x in (2,6): put('3020',C.MEDIUM_AZURE,x,y,10/3) + for x in (0,10): + put('3022',C.TAN,x,2,10/3) + for y in (8,9): put('3023b',C.TAN,x,y,10/3) + # Sloping upper rim, interrupted at the forward airlock. + for x in (2,3,8,9): put('3040b',C.MEDIUM_AZURE,x,0,11/3) + for x in (2,3,8,9): put('3040b',C.MEDIUM_AZURE,x,10,11/3,bl.Rotation.DEG_180) + for x,rot in [(0,bl.Rotation.DEG_270),(10,bl.Rotation.DEG_90)]: + for y in (4,6): put('3039',C.BLUE,x,y,11/3,rot) + for x,y,rot in [(0,2,0),(10,2,90),(10,8,180),(0,8,270)]: + put('3045',C.MEDIUM_AZURE,x,y,11/3,bl.Rotation(rot//90)) + # Low central cabin, with a generous open front portal. + for x in (4,6): + put('3795',C.REDDISH_BROWN,x,0,11/3,bl.Rotation.DEG_90) + for x in (3,8): + for y in (2,6): put('3010',C.LIGHT_BLUISH_GRAY,x,y,11/3,bl.Rotation.DEG_90) + for x in (4,6): put('3004',C.LIGHT_BLUISH_GRAY,x,9,11/3) + for x in (3,8): + put('3622',C.TAN,x,3,14/3,bl.Rotation.DEG_90) + put('3010',C.MEDIUM_AZURE,x,6,14/3,bl.Rotation.DEG_90) + for x in (4,6): put('3004',C.LIGHT_BLUISH_GRAY,x,9,14/3) + put('15254',C.LIGHT_BLUISH_GRAY,3,2,14/3,name='airlock_arch') + for x in (3,8): + put('3622',C.TAN,x,3,17/3,bl.Rotation.DEG_90) + put('3010',C.MEDIUM_AZURE,x,6,17/3,bl.Rotation.DEG_90) + for x in (4,6): put('3004',C.LIGHT_BLUISH_GRAY,x,9,17/3) + # Roof spans the cabin; its overhangs and curved shoulders retain a saucer profile. + put('3028',C.BRIGHT_GREEN,0,3,20/3,name='roof') + for x in (0,11): + for y in (3,6): put('50950',C.MEDIUM_AZURE,x,y,21/3,bl.Rotation.DEG_0 if y==3 else bl.Rotation.DEG_180) + for x,y,rot in [(1,3,0),(9,3,90),(9,7,180),(1,7,270)]: + put('85080',C.LIGHT_BLUISH_GRAY,x,y,21/3,bl.Rotation(rot//90)) + put('87081',C.BLACK,4,4,21/3) + put('30151b',C.TRANS_CLEAR,5,5,24/3,name='observation_dome') + for x in (2,9): + put('6141',C.TRANS_ORANGE,x,5,21/3) + put('59900',C.TRANS_ORANGE,x,5,22/3) + # Locking hinge at the airlock and an inclined, plated gangway. + hinge=put('30387',C.YELLOW,5,0,4,bl.Rotation.DEG_270,name='ramp_hinge') + r=bl.LegoBuild() + def rp(pid,col,x,y,z,rot=bl.Rotation.DEG_0,name=None): + return r.add(bl.Element(pid,col),(x,y+1,z),rotation=rot,name=name) + rp('3032',C.YELLOW,0,0,0,bl.Rotation.DEG_90) + rp('3031',C.BLUE,0,6,0) + rp('3710',C.BLUE,0,-1,0) + for y in (-1,5,7): rp('87079',C.LIGHT_BLUISH_GRAY,0,y,1/3) + rh=rp('60471',C.BLACK,1,9,1/3,bl.Rotation.DEG_180) + # Friendly little green traveller, fixed securely halfway along the ramp. + for x in (1,2): rp('3005',C.LIME,x,3,1/3,name=f'alien_foot_{x}') + rp('3003',C.GREEN,1,3,4/3,name='alien_body') + for x in (1,2): + head=rp('4070',C.GREEN,x,3,7/3) + eye=bl.Element('98138p07',C.WHITE) + r.connect(eye,eye.find_connector('tube'),to=head.find_connector('stud',facing=bl.Direction.FRONT),name=f'alien_eye_{x}') + rp('3004',C.BRIGHT_GREEN,1,4,7/3) + rp('3039',C.LIME,1,3,10/3,bl.Rotation.DEG_180) + for x in (0,3): + rp('3023b',C.DARK_AZURE,x,3,1/3,bl.Rotation.DEG_90) + rp('3005',C.LIME,x,4,2/3) + rp('3005',C.LIME,x,4,5/3) + # Solve the incline so the lower plate edge rests exactly on the ground. + import math + source=rh.find_connector('hinge_2_on') + target=hinge.find_connector('hinge_2_in') + lo,hi=0.0,60.0 + for _ in range(60): + angle=(lo+hi)/2 + t=math.radians(angle) + z=source.position.y*math.sin(t)/1.2+source.position.z*math.cos(t) + if zinventory.get(pid,{}).get(col,0)] + tests.check('Inventory limits',not over,str(over)) + tests.check('Three landing feet',sum(n.startswith('foot_') for n in b.names)==3) + ramp=b.named('ramp_and_alien') + tests.check('Ramp reaches ground',abs(ramp.bounding_box[0].z)<1e-6) + alien=ramp.content.named('alien_body') + tests.check('Alien halfway along ramp',0.35 < alien.center.y/11 < 0.65) + tests.check('Two alien eyes',all(f'alien_eye_{i}' in ramp.content.names for i in (1,2))) + tests.check('Open side portal',b.named('airlock_arch').content.ldraw_id=='15254') + tests.check('Short tripod legs',all(abs(b.named(f'leg_{i}_0').content.alignment_height-2)<1e-6 for i in range(3))) + return tests.report() diff --git a/brickwright/alt/alt-031/hero-1024.avif b/brickwright/alt/alt-031/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..73982f0e1dd1618bfb0356c09403025bd7a0feae Binary files /dev/null and b/brickwright/alt/alt-031/hero-1024.avif differ diff --git a/brickwright/alt/alt-031/model.mpd b/brickwright/alt/alt-031/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..e06dc54b2d2643e32d61d9bfd770215971a85197 --- /dev/null +++ b/brickwright/alt/alt-031/model.mpd @@ -0,0 +1,119 @@ +0 FILE main.ldr +0 main +0 Name: main +1 72 50 -8 90 1 0 0 0 1 0 0 0 1 11212.dat +1 71 40 -56 70 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 40 -56 90 1 0 0 0 1 0 0 0 1 3245c.dat +1 72 210 -8 90 1 0 0 0 1 0 0 0 1 11212.dat +1 71 200 -56 70 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 200 -56 90 1 0 0 0 1 0 0 0 1 3245c.dat +1 1 120 -8 200 1 0 0 0 1 0 0 0 1 3031.dat +1 71 120 -56 190 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 120 -56 210 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 80 -80 20 1 0 0 0 1 0 0 0 1 3001.dat +1 71 160 -80 20 1 0 0 0 1 0 0 0 1 3001.dat +1 322 40 -80 60 1 0 0 0 1 0 0 0 1 3001.dat +1 322 120 -80 60 1 0 0 0 1 0 0 0 1 3001.dat +1 322 200 -80 60 1 0 0 0 1 0 0 0 1 3001.dat +1 0 60 -80 100 1 0 0 0 1 0 0 0 1 2456.dat +1 0 180 -80 100 1 0 0 0 1 0 0 0 1 2456.dat +1 72 40 -80 140 1 0 0 0 1 0 0 0 1 3001.dat +1 72 120 -80 140 1 0 0 0 1 0 0 0 1 3001.dat +1 72 200 -80 140 1 0 0 0 1 0 0 0 1 3001.dat +1 322 40 -80 180 1 0 0 0 1 0 0 0 1 3001.dat +1 71 120 -80 180 1 0 0 0 1 0 0 0 1 3001.dat +1 71 200 -80 180 1 0 0 0 1 0 0 0 1 3001.dat +1 1 80 -80 220 1 0 0 0 1 0 0 0 1 3001.dat +1 1 160 -80 220 1 0 0 0 1 0 0 0 1 3001.dat +1 72 120 -88 120 1 0 0 0 1 0 0 0 1 3029.dat +1 71 120 -88 60 1 0 0 0 1 0 0 0 1 3034.dat +1 71 120 -88 180 1 0 0 0 1 0 0 0 1 3034.dat +1 322 80 -88 20 1 0 0 0 1 0 0 0 1 3020.dat +1 322 160 -88 20 1 0 0 0 1 0 0 0 1 3020.dat +1 322 80 -88 220 1 0 0 0 1 0 0 0 1 3020.dat +1 322 160 -88 220 1 0 0 0 1 0 0 0 1 3020.dat +1 19 20 -88 60 1 0 0 0 1 0 0 0 1 3022.dat +1 19 20 -88 170 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 20 -88 190 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 220 -88 60 1 0 0 0 1 0 0 0 1 3022.dat +1 19 220 -88 170 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 220 -88 190 1 0 0 0 1 0 0 0 1 3023b.dat +1 322 50 -112 30 1 0 0 0 1 0 0 0 1 3040b.dat +1 322 70 -112 30 1 0 0 0 1 0 0 0 1 3040b.dat +1 322 170 -112 30 1 0 0 0 1 0 0 0 1 3040b.dat +1 322 190 -112 30 1 0 0 0 1 0 0 0 1 3040b.dat +1 322 50 -112 210 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 322 70 -112 210 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 322 170 -112 210 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 322 190 -112 210 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 1 30 -112 100 0 0 1 0 1 0 -1 0 0 3039.dat +1 1 30 -112 140 0 0 1 0 1 0 -1 0 0 3039.dat +1 1 210 -112 100 0 0 -1 0 1 0 1 0 0 3039.dat +1 1 210 -112 140 0 0 -1 0 1 0 1 0 0 3039.dat +1 322 10 -112 70 1 0 0 0 1 0 0 0 1 3045.dat +1 322 210 -112 50 0 0 -1 0 1 0 1 0 0 3045.dat +1 322 230 -112 170 -1 0 0 0 1 0 0 0 -1 3045.dat +1 322 30 -112 190 0 0 1 0 1 0 -1 0 0 3045.dat +1 70 100 -96 60 0 0 -1 0 1 0 1 0 0 3795.dat +1 70 140 -96 60 0 0 -1 0 1 0 1 0 0 3795.dat +1 71 70 -112 80 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 70 -112 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 170 -112 80 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 170 -112 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 100 -112 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 140 -112 190 1 0 0 0 1 0 0 0 1 3004.dat +1 19 70 -136 90 0 0 -1 0 1 0 1 0 0 3622.dat +1 322 70 -136 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 19 170 -136 90 0 0 -1 0 1 0 1 0 0 3622.dat +1 322 170 -136 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 100 -136 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 140 -136 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 120 -160 50 1 0 0 0 1 0 0 0 1 15254.dat +1 19 70 -160 90 0 0 -1 0 1 0 1 0 0 3622.dat +1 322 70 -160 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 19 170 -160 90 0 0 -1 0 1 0 1 0 0 3622.dat +1 322 170 -160 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 100 -160 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 140 -160 190 1 0 0 0 1 0 0 0 1 3004.dat +1 10 120 -168 120 1 0 0 0 1 0 0 0 1 3028.dat +1 322 10 -192 90 1 0 0 0 1 0 0 0 1 50950.dat +1 322 10 -192 150 -1 0 0 0 1 0 0 0 -1 50950.dat +1 322 230 -192 90 1 0 0 0 1 0 0 0 1 50950.dat +1 322 230 -192 150 -1 0 0 0 1 0 0 0 -1 50950.dat +1 71 30 -192 90 1 0 0 0 1 0 0 0 1 85080.dat +1 71 190 -192 70 0 0 -1 0 1 0 1 0 0 85080.dat +1 71 210 -192 150 -1 0 0 0 1 0 0 0 -1 85080.dat +1 71 50 -192 170 0 0 1 0 1 0 -1 0 0 85080.dat +1 0 120 -192 120 1 0 0 0 1 0 0 0 1 87081.dat +1 47 120 -232 120 1 0 0 0 1 0 0 0 1 30151b.dat +1 57 50 -176 110 1 0 0 0 1 0 0 0 1 6141.dat +1 57 50 -200 110 1 0 0 0 1 0 0 0 1 59900.dat +1 57 190 -176 110 1 0 0 0 1 0 0 0 1 6141.dat +1 57 190 -200 110 1 0 0 0 1 0 0 0 1 59900.dat +1 14 110 -120 40 0 0 1 0 1 0 -1 0 0 30387.dat +1 16 70 0 -212.47469 1 0 0 0 0.906079 -0.423108 0 0.423108 0.906079 ramp_and_alien.ldr +0 FILE ramp_and_alien.ldr +0 ramp_and_alien +0 Name: ramp_and_alien +1 14 40 -8 80 0 0 -1 0 1 0 1 0 0 3032.dat +1 1 40 -8 180 1 0 0 0 1 0 0 0 1 3031.dat +1 1 40 -8 10 1 0 0 0 1 0 0 0 1 3710.dat +1 71 40 -16 20 1 0 0 0 1 0 0 0 1 87079.dat +1 71 40 -16 140 1 0 0 0 1 0 0 0 1 87079.dat +1 71 40 -16 180 1 0 0 0 1 0 0 0 1 87079.dat +1 0 40 -16 210 -1 0 0 0 1 0 0 0 -1 60471.dat +1 27 30 -32 90 1 0 0 0 1 0 0 0 1 3005.dat +1 27 50 -32 90 1 0 0 0 1 0 0 0 1 3005.dat +1 2 40 -56 100 1 0 0 0 1 0 0 0 1 3003.dat +1 2 30 -80 90 1 0 0 0 1 0 0 0 1 4070.dat +1 15 30 -70 76 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 2 50 -80 90 1 0 0 0 1 0 0 0 1 4070.dat +1 15 50 -70 76 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 10 40 -80 110 1 0 0 0 1 0 0 0 1 3004.dat +1 27 40 -104 90 -1 0 0 0 1 0 0 0 -1 3039.dat +1 321 10 -16 100 0 0 -1 0 1 0 1 0 0 3023b.dat +1 27 10 -40 110 1 0 0 0 1 0 0 0 1 3005.dat +1 27 10 -64 110 1 0 0 0 1 0 0 0 1 3005.dat +1 321 70 -16 100 0 0 -1 0 1 0 1 0 0 3023b.dat +1 27 70 -40 110 1 0 0 0 1 0 0 0 1 3005.dat +1 27 70 -64 110 1 0 0 0 1 0 0 0 1 3005.dat diff --git a/brickwright/alt/alt-031/thumb-512.avif b/brickwright/alt/alt-031/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..824462a655e51586196b0413e367f22328722cc5 Binary files /dev/null and b/brickwright/alt/alt-031/thumb-512.avif differ diff --git a/brickwright/alt/alt-031/trace.jsonl.gz b/brickwright/alt/alt-031/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..c9a3c684f9f0e4e1baae38d4ec55900670f4ff29 --- /dev/null +++ b/brickwright/alt/alt-031/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:645934365ffc1c95feeae55ee79c525723cf1ff6fc89332f7ca025c44817b3bf +size 9963 diff --git a/brickwright/alt/alt-031/view-0.avif b/brickwright/alt/alt-031/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..e2352d211da7ee243aae6d1a47cc94d0cf5b7cc8 Binary files /dev/null and b/brickwright/alt/alt-031/view-0.avif differ diff --git a/brickwright/alt/alt-031/view-1.avif b/brickwright/alt/alt-031/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..626db5784dd686900b4fe8d89ba2a83928811506 Binary files /dev/null and b/brickwright/alt/alt-031/view-1.avif differ diff --git a/brickwright/alt/alt-031/view-2.avif b/brickwright/alt/alt-031/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..2529f65fbb5760ae569b9b9a3c7d37a911b12b9a Binary files /dev/null and b/brickwright/alt/alt-031/view-2.avif differ diff --git a/brickwright/alt/alt-031/view-3.avif b/brickwright/alt/alt-031/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..d048f0fcf3e9b6c2adde5da74365f975b71738e5 Binary files /dev/null and b/brickwright/alt/alt-031/view-3.avif differ diff --git a/brickwright/alt/alt-031/view-4.avif b/brickwright/alt/alt-031/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..aa23a45555e6baced327ec842cc880afd4e82103 Binary files /dev/null and b/brickwright/alt/alt-031/view-4.avif differ diff --git a/brickwright/alt/alt-031/view-5.avif b/brickwright/alt/alt-031/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..db132bd85114e0608d9d6b13229de2640cce516f Binary files /dev/null and b/brickwright/alt/alt-031/view-5.avif differ diff --git a/brickwright/alt/alt-031/view-6.avif b/brickwright/alt/alt-031/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..333ca90c66185b12524bd80193f14959d18a5666 Binary files /dev/null and b/brickwright/alt/alt-031/view-6.avif differ diff --git a/brickwright/alt/alt-031/view-7.avif b/brickwright/alt/alt-031/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..0e141dc810e16225de28ede6115e8a6c823eaee1 Binary files /dev/null and b/brickwright/alt/alt-031/view-7.avif differ diff --git a/brickwright/alt/alt-032/build.py b/brickwright/alt/alt-032/build.py new file mode 100644 index 0000000000000000000000000000000000000000..12af3bfc193b01e2215aac5f346c3bbe95c6198c --- /dev/null +++ b/brickwright/alt/alt-032/build.py @@ -0,0 +1,79 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + C = bl.Color + def add(pid, color, x, y, z, rot=bl.Rotation.DEG_0, name=None): + return b.add(bl.Element(pid, color), (x,y,z), rotation=rot, name=name) + # Heavy, interlocked chest plinth; the inside remains a hollow mouth. + add('2456',C.BLACK,0,0,0) + add('2456',C.BLACK,0,4,0) + for x in (0,3): add('3002',C.BLACK,x,2,0) + for z in (1,2): + # End grain and horizontal wooden planks. + for x in (0,5): + for y in (1,3): + add('3004',C.MEDIUM_NOUGAT,x,y,z,bl.Rotation.DEG_90) + for y in (0,5): + if z == 1: + for x in (0,2,4): add('30136',C.DARK_ORANGE,x,y,z) + elif y == 5: + add('3010',C.REDDISH_BROWN,0,y,z) + add('3004',C.DARK_RED,4,y,z) + else: + add('3004',C.DARK_RED,0,y,z) + add('3004',C.DARK_RED,4,y,z) + # Two front-facing studs secure the hanging tongue, not just surface contact. + mounts = [add('47905',C.RED,x,0,2,name='tongue_mount_'+str(x)) for x in (2,3)] + tongue = bl.Element('30165', C.RED) + b.connect(tongue, tongue.find_connector('antistud',toward=bl.Position(-.5,.5,0)), + to=mounts[0].find_connector('stud',facing=bl.Direction.FRONT), + target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90), name='hanging_tongue') + add('85984',C.RED,2,0,3,name='tongue_lip') + # Brown rim panels leave the mouth visibly open. + add('15207',C.REDDISH_BROWN,0,0,3,bl.Rotation.DEG_90) + add('15207',C.REDDISH_BROWN,5,0,3,bl.Rotation.DEG_90) + # Side-stud backing locks the lid in the fully open display position. + mount = add('30414',C.TAN,1,5,3,name='lid_mount') + add('3062b',C.REDDISH_BROWN,0,5,3) + add('3062b',C.REDDISH_BROWN,5,5,3) + lid = bl.LegoBuild() + for y in (0,2): lid.add(bl.Element('3795',C.REDDISH_BROWN),(0,y,0)) + for x in (0,2,3,5): + lid.add(bl.Element('60481a',C.WHITE),(x,1,1/3),name='tooth_'+str(x)) + for x in (1,4): lid.add(bl.Element('3040b',C.REDDISH_BROWN),(x,1,1/3)) + lid.add(bl.Element('3010',C.REDDISH_BROWN),(0,3,1/3)) + lid.add(bl.Element('3004',C.DARK_RED),(4,3,1/3)) + # A pair of eyes makes the treasure chest's monster character unmistakable. + for x in (1,4): lid.add(bl.Element('98138p07',C.WHITE),(x,3,4/3)) + source = lid.find_connector('antistud',toward=bl.Position(1.5,.5,0)) + b.connect(lid, source, to=mount.find_connector('stud',facing=bl.Direction.FRONT,toward=bl.Direction.RIGHT), + target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90),name='open_lid') + # Separate small sword, flat on the ground: wooden grip, metal guard and blade. + add('3710',C.TAN,9,0,0,bl.Rotation.DEG_90,name='sword_spine') + add('3023b',C.TAN,9,4,0,bl.Rotation.DEG_90) + add('6141',C.REDDISH_BROWN,9,0,1/3,name='sword_grip') + add('2431',C.LIGHT_BLUISH_GRAY,8,1,1/3,name='sword_guard') + add('2431',C.LIGHT_BLUISH_GRAY,9,2,1/3,bl.Rotation.DEG_90,name='sword_blade') + return b + + +def run_tests(): + build = create_build() + tests = TestContext(build) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=2) + inventory = json.load(open('/inputs/parts.json')) + used = Counter((p.content.ldraw_id,p.content.color.name) for p in build.flattened_placements) + excess = {str(k):v for k,v in used.items() if v > inventory.get(k[0],{}).get(k[1],0)} + tests.check('Only supplied parts and quantities',not excess,str(excess)) + tests.check('Four white lid fangs',sum(p.content.ldraw_id == '60481a' and p.content.color == bl.Color.WHITE for p in build.flattened_placements)==4) + tests.check('Tongue hangs outside front',build.named('hanging_tongue').bounding_box[0].y < 0) + tests.check('Lid is open above chest',build.named('open_lid').bounding_box[1].z > 6) + tests.check('Sword beside chest',build.named('sword_blade').bounding_box[0].x > 6) + return tests.report() diff --git a/brickwright/alt/alt-032/hero-1024.avif b/brickwright/alt/alt-032/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..28c7b2f1f9bdfc4ee9818b343a85ce943329c95c Binary files /dev/null and b/brickwright/alt/alt-032/hero-1024.avif differ diff --git a/brickwright/alt/alt-032/model.mpd b/brickwright/alt/alt-032/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..08ad5b4939b071b82a671ead31da6f71bd59a0ef --- /dev/null +++ b/brickwright/alt/alt-032/model.mpd @@ -0,0 +1,55 @@ +0 FILE main.ldr +0 main +0 Name: main +1 0 60 -24 20 1 0 0 0 1 0 0 0 1 2456.dat +1 0 60 -24 100 1 0 0 0 1 0 0 0 1 2456.dat +1 0 30 -24 60 1 0 0 0 1 0 0 0 1 3002.dat +1 0 90 -24 60 1 0 0 0 1 0 0 0 1 3002.dat +1 84 10 -48 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 10 -48 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 110 -48 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 110 -48 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 484 20 -48 10 1 0 0 0 1 0 0 0 1 30136.dat +1 484 60 -48 10 1 0 0 0 1 0 0 0 1 30136.dat +1 484 100 -48 10 1 0 0 0 1 0 0 0 1 30136.dat +1 484 20 -48 110 1 0 0 0 1 0 0 0 1 30136.dat +1 484 60 -48 110 1 0 0 0 1 0 0 0 1 30136.dat +1 484 100 -48 110 1 0 0 0 1 0 0 0 1 30136.dat +1 84 10 -72 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 10 -72 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 110 -72 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 110 -72 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 320 20 -72 10 1 0 0 0 1 0 0 0 1 3004.dat +1 320 100 -72 10 1 0 0 0 1 0 0 0 1 3004.dat +1 70 40 -72 110 1 0 0 0 1 0 0 0 1 3010.dat +1 320 100 -72 110 1 0 0 0 1 0 0 0 1 3004.dat +1 4 50 -72 10 1 0 0 0 1 0 0 0 1 47905.dat +1 4 70 -72 10 1 0 0 0 1 0 0 0 1 47905.dat +1 4 60 -52 -24 1 0 0 0 0 -1 0 1 0 30165.dat +1 4 60 -72 10 1 0 0 0 1 0 0 0 1 85984.dat +1 70 10 -96 40 0 0 -1 0 1 0 1 0 0 15207.dat +1 70 110 -96 40 0 0 -1 0 1 0 1 0 0 15207.dat +1 19 60 -96 110 1 0 0 0 1 0 0 0 1 30414.dat +1 70 10 -96 110 1 0 0 0 1 0 0 0 1 3062b.dat +1 70 110 -96 110 1 0 0 0 1 0 0 0 1 3062b.dat +1 16 0 -76 100 1 0 0 0 0 -1 0 1 0 open_lid.ldr +1 19 190 -8 40 0 0 -1 0 1 0 1 0 0 3710.dat +1 19 190 -8 100 0 0 -1 0 1 0 1 0 0 3023b.dat +1 70 190 -16 10 1 0 0 0 1 0 0 0 1 6141.dat +1 71 200 -16 30 1 0 0 0 1 0 0 0 1 2431.dat +1 71 190 -16 80 0 0 -1 0 1 0 1 0 0 2431.dat +0 FILE open_lid.ldr +0 open_lid +0 Name: open_lid +1 70 60 -8 20 1 0 0 0 1 0 0 0 1 3795.dat +1 70 60 -8 60 1 0 0 0 1 0 0 0 1 3795.dat +1 15 10 -56 50 1 0 0 0 1 0 0 0 1 60481a.dat +1 15 50 -56 50 1 0 0 0 1 0 0 0 1 60481a.dat +1 15 70 -56 50 1 0 0 0 1 0 0 0 1 60481a.dat +1 15 110 -56 50 1 0 0 0 1 0 0 0 1 60481a.dat +1 70 30 -32 50 1 0 0 0 1 0 0 0 1 3040b.dat +1 70 90 -32 50 1 0 0 0 1 0 0 0 1 3040b.dat +1 70 40 -32 70 1 0 0 0 1 0 0 0 1 3010.dat +1 320 100 -32 70 1 0 0 0 1 0 0 0 1 3004.dat +1 15 30 -40 70 1 0 0 0 1 0 0 0 1 98138p07.dat +1 15 90 -40 70 1 0 0 0 1 0 0 0 1 98138p07.dat diff --git a/brickwright/alt/alt-032/thumb-512.avif b/brickwright/alt/alt-032/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..418297bf7ac3b581954551b090a0a4e881dec5e6 Binary files /dev/null and b/brickwright/alt/alt-032/thumb-512.avif differ diff --git a/brickwright/alt/alt-032/trace.jsonl.gz b/brickwright/alt/alt-032/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..f950ef2bd5589beac0e4c70e0fc67226125f6b8f --- /dev/null +++ b/brickwright/alt/alt-032/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab22d524f817d475297f23e25a63953daa951dd2cd368876641980fa0faf601e +size 6622 diff --git a/brickwright/alt/alt-032/view-0.avif b/brickwright/alt/alt-032/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..962136e5b910012001795b82b629d6ca776d5817 Binary files /dev/null and b/brickwright/alt/alt-032/view-0.avif differ diff --git a/brickwright/alt/alt-032/view-1.avif b/brickwright/alt/alt-032/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..ce97ebd7d81f3a26e6242835dc930924f829ce11 Binary files /dev/null and b/brickwright/alt/alt-032/view-1.avif differ diff --git a/brickwright/alt/alt-032/view-2.avif b/brickwright/alt/alt-032/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..75aff621bb07a7dc14c89eba0a4d7466a9e2b05e Binary files /dev/null and b/brickwright/alt/alt-032/view-2.avif differ diff --git a/brickwright/alt/alt-032/view-3.avif b/brickwright/alt/alt-032/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..b7b9b17e117acb08608d63e8ffad3465f80e25e5 Binary files /dev/null and b/brickwright/alt/alt-032/view-3.avif differ diff --git a/brickwright/alt/alt-032/view-4.avif b/brickwright/alt/alt-032/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..001a5ec3f93e71af4385e915542d82944f73c508 Binary files /dev/null and b/brickwright/alt/alt-032/view-4.avif differ diff --git a/brickwright/alt/alt-032/view-5.avif b/brickwright/alt/alt-032/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..6fe10b58b59ec01a067b7b89f38ec19e6fbe767a Binary files /dev/null and b/brickwright/alt/alt-032/view-5.avif differ diff --git a/brickwright/alt/alt-032/view-6.avif b/brickwright/alt/alt-032/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..88f4b34001d7fb59271e71033c7e44541983abf7 Binary files /dev/null and b/brickwright/alt/alt-032/view-6.avif differ diff --git a/brickwright/alt/alt-032/view-7.avif b/brickwright/alt/alt-032/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..a54e917cebdca7a65371ec9ce25f85c82162abd4 Binary files /dev/null and b/brickwright/alt/alt-032/view-7.avif differ diff --git a/brickwright/alt/alt-033/build.py b/brickwright/alt/alt-033/build.py new file mode 100644 index 0000000000000000000000000000000000000000..de582ba8671e873b254b6ad4024bf3e8ad39d3a5 --- /dev/null +++ b/brickwright/alt/alt-033/build.py @@ -0,0 +1,110 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid, color, x,y,z, rot=0, name=None): + return b.add(bl.Element(pid, getattr(bl.Color,color)), (x,y,z), rotation=bl.Rotation(rot), name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='foundation') + # Two small city blocks, with inset-looking dark glazing and cornices. + for side,x in enumerate((0,12)): + wall='TAN' if side==0 else 'DARK_TAN' + put('3001',wall,x,10,1/3) + put('3001',wall,x,12,1/3) + for z in (4/3,7/3): + put('3004','ORANGE',x,10,z,1) + put('3004','ORANGE',x+3,10,z,1) + put('3004','DARK_BLUE',x+1,10,z) + put('3001','BRIGHT_LIGHT_ORANGE',x,12,z) + put('3004','DARK_BLUE',x+1,11,z) + put('3031','BLUE',x,10,10/3,name=f'roof_{side}') + put('3010','BRIGHT_LIGHT_YELLOW',x,10,11/3) + put('3010','BRIGHT_LIGHT_YELLOW',x,13,11/3) + put('3004','BRIGHT_LIGHT_YELLOW',x,11,11/3,1) + put('3004','BRIGHT_LIGHT_YELLOW',x+3,11,11/3,1) + put('2877','WHITE',x+1,11,11/3,name=f'roof_vent_{side}') + put('3069b','WHITE',x+1,11,14/3,name=f'vent_cap_{side}') + # Broad boots, long braced lower legs and clearly defined knees. + for i,x in enumerate((5,9)): + fx=4 if i==0 else 9 + for y in (5,7): put('3002','BLACK',fx,y,1/3) + put('3001','DARK_BLUISH_GRAY',x,5,4/3,1) + for z in (7/3,13/3): + for y in (7,8): put('3245c','LIGHT_BLUISH_GRAY',x,y,z) + for y in (7,8): put('3004','DARK_BLUISH_GRAY',x,y,19/3,name=f'knee_{i}_{y}') + for j in range(4): put('3003','BLUE' if j%2 else 'MEDIUM_AZURE',x,7,(22+3*j)/3) + for z in (34/3,37/3): put('2456','BLACK',5,7,z) + for y in (6,8): put('3034','LIGHT_BLUISH_GRAY',4,y,40/3) + for level in range(3): + for y in (6,8): + for x in (4,8): + c = 'MEDIUM_AZURE' if level==1 else ('LIGHT_BLUISH_GRAY' if level==2 and y==8 else 'BLUE') + put('3001',c,x,y,(41+3*level)/3) + # Shoulders bridge securely into the chest, arms are suspended stud-built stacks. + for x in (2,8): put('2456','DARK_RED',x,7,50/3) + for y in (6,9): + for x in (4,8): put('3010','LIGHT_BLUISH_GRAY',x,y,50/3) + for x in (2,12): + for z in (44/3,47/3): put('3003','ORANGE',x,7,z) + for z in (38/3,41/3): put('3003','DARK_TAN',x,7,z) + put('3022','TAN',2,7,37/3) + put('3003','DARK_RED',2,7,34/3,name='empty_fist') + put('3795','REDDISH_BROWN',12,3,37/3,1,name='holding_palm') + put('3003','DARK_RED',12,2,38/3) + put('3022','TAN',12,2,41/3,name='car_support') + # Neck, square helmet, expressive stud-mounted eyes and mouth. + put('3003','YELLOW',7,7,53/3) + put('3020','MEDIUM_AZURE',6,6,56/3) + put('3020','MEDIUM_AZURE',6,8,56/3) + for z in (57/3,60/3): + put('30414','BLUE',6,6,z,name='face_lower' if z==19 else 'face_upper') + put('3010','MEDIUM_AZURE',6,7,z) + put('3001','RED',6,8,z) + put('3031','BLUE',6,6,63/3,name='helmet') + for x in (6,9): put('3957b','BLUE',x,7,64/3,name=f'antenna_{x}') + face=b.named('face_upper') + for direction in (bl.Direction.LEFT,bl.Direction.RIGHT): + eye=bl.Element('98138p07',bl.Color.WHITE) + b.connect(eye,eye.find_connector('antistud'),to=face.find_connector('stud',facing=bl.Direction.FRONT,toward=direction)) + mouth=bl.Element('3069b',bl.Color.WHITE) + b.connect(mouth,mouth.find_connector('antistud',toward=bl.Direction.RIGHT),to=b.named('face_lower').find_connectors('stud',facing=bl.Direction.FRONT)[1]) + # Real four-wheeled car, supported under its chassis by the robot's hand. + car=bl.LegoBuild() + def cp(pid,col,pos,rot=0): + return car.add(bl.Element(pid,getattr(bl.Color,col)),pos,rotation=bl.Rotation(rot)) + for y in (0,4): + axle=cp('2926','BLACK',(0,y,0)) + for direction in (bl.Direction.LEFT,bl.Direction.RIGHT): + rim=bl.Element('6014b',bl.Color.YELLOW) + wheel=car.connect(rim,'hinge_3_on',to=axle.find_connector('hinge_3_in',toward=direction)) + tire=bl.Element('87697',bl.Color.BLACK) + car.connect(tire,tire.find_connector('fixed_13_on',facing=bl.Direction.BACK),to=wheel.find_connector('fixed_13_in',toward=bl.Direction.BACK),target_rotation=wheel.pose.rotation) + cp('3032','YELLOW',(0,0,1/3),1) + for y in (0,4): cp('3001','RED',(0,y,2/3)) + for x in (0,2): cp('3039','TRANS_CLEAR',(x,2,2/3)) + cp('3020','TAN',(0,2,5/3)) + for x in (0,2): cp('85984','RED',(x,0,5/3)) + b.add_raw(car,bl.Pose(translation=bl.Position(11,0,41/3)),name='held_car') + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + stock=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess=[(pid,col,n,stock.get(pid,{}).get(col,0)) for (pid,col),n in used.items() if n>stock.get(pid,{}).get(col,0)] + tests.check('Inventory limits',not excess,str(excess)) + knee=b.named('knee_0_7').bounding_box[0].z + roof_height=max(b.named(f'vent_cap_{i}').bounding_box[1].z for i in (0,1)) + tests.check('Both roofs below knees',roof_height11) + return tests.report() diff --git a/brickwright/alt/alt-033/hero-1024.avif b/brickwright/alt/alt-033/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..4d87e2f06e95fe5b114a18344cb2786db0c2eac2 Binary files /dev/null and b/brickwright/alt/alt-033/hero-1024.avif differ diff --git a/brickwright/alt/alt-033/model.mpd b/brickwright/alt/alt-033/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..7ce2b91443d66e69024a2bc66da4501738905056 --- /dev/null +++ b/brickwright/alt/alt-033/model.mpd @@ -0,0 +1,140 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 19 40 -32 220 1 0 0 0 1 0 0 0 1 3001.dat +1 19 40 -32 260 1 0 0 0 1 0 0 0 1 3001.dat +1 25 10 -56 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 70 -56 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 40 -56 210 1 0 0 0 1 0 0 0 1 3004.dat +1 191 40 -56 260 1 0 0 0 1 0 0 0 1 3001.dat +1 272 40 -56 230 1 0 0 0 1 0 0 0 1 3004.dat +1 25 10 -80 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 70 -80 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 40 -80 210 1 0 0 0 1 0 0 0 1 3004.dat +1 191 40 -80 260 1 0 0 0 1 0 0 0 1 3001.dat +1 272 40 -80 230 1 0 0 0 1 0 0 0 1 3004.dat +1 1 40 -88 240 1 0 0 0 1 0 0 0 1 3031.dat +1 226 40 -112 210 1 0 0 0 1 0 0 0 1 3010.dat +1 226 40 -112 270 1 0 0 0 1 0 0 0 1 3010.dat +1 226 10 -112 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 70 -112 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 15 40 -112 230 1 0 0 0 1 0 0 0 1 2877.dat +1 15 40 -120 230 1 0 0 0 1 0 0 0 1 3069b.dat +1 28 280 -32 220 1 0 0 0 1 0 0 0 1 3001.dat +1 28 280 -32 260 1 0 0 0 1 0 0 0 1 3001.dat +1 25 250 -56 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 310 -56 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 280 -56 210 1 0 0 0 1 0 0 0 1 3004.dat +1 191 280 -56 260 1 0 0 0 1 0 0 0 1 3001.dat +1 272 280 -56 230 1 0 0 0 1 0 0 0 1 3004.dat +1 25 250 -80 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 310 -80 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 280 -80 210 1 0 0 0 1 0 0 0 1 3004.dat +1 191 280 -80 260 1 0 0 0 1 0 0 0 1 3001.dat +1 272 280 -80 230 1 0 0 0 1 0 0 0 1 3004.dat +1 1 280 -88 240 1 0 0 0 1 0 0 0 1 3031.dat +1 226 280 -112 210 1 0 0 0 1 0 0 0 1 3010.dat +1 226 280 -112 270 1 0 0 0 1 0 0 0 1 3010.dat +1 226 250 -112 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 310 -112 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 15 280 -112 230 1 0 0 0 1 0 0 0 1 2877.dat +1 15 280 -120 230 1 0 0 0 1 0 0 0 1 3069b.dat +1 0 110 -32 120 1 0 0 0 1 0 0 0 1 3002.dat +1 0 110 -32 160 1 0 0 0 1 0 0 0 1 3002.dat +1 72 120 -56 140 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 120 -104 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 120 -104 170 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 120 -152 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 120 -152 170 1 0 0 0 1 0 0 0 1 3245c.dat +1 72 120 -176 150 1 0 0 0 1 0 0 0 1 3004.dat +1 72 120 -176 170 1 0 0 0 1 0 0 0 1 3004.dat +1 322 120 -200 160 1 0 0 0 1 0 0 0 1 3003.dat +1 1 120 -224 160 1 0 0 0 1 0 0 0 1 3003.dat +1 322 120 -248 160 1 0 0 0 1 0 0 0 1 3003.dat +1 1 120 -272 160 1 0 0 0 1 0 0 0 1 3003.dat +1 0 210 -32 120 1 0 0 0 1 0 0 0 1 3002.dat +1 0 210 -32 160 1 0 0 0 1 0 0 0 1 3002.dat +1 72 200 -56 140 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 200 -104 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 200 -104 170 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 200 -152 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 200 -152 170 1 0 0 0 1 0 0 0 1 3245c.dat +1 72 200 -176 150 1 0 0 0 1 0 0 0 1 3004.dat +1 72 200 -176 170 1 0 0 0 1 0 0 0 1 3004.dat +1 322 200 -200 160 1 0 0 0 1 0 0 0 1 3003.dat +1 1 200 -224 160 1 0 0 0 1 0 0 0 1 3003.dat +1 322 200 -248 160 1 0 0 0 1 0 0 0 1 3003.dat +1 1 200 -272 160 1 0 0 0 1 0 0 0 1 3003.dat +1 0 160 -296 160 1 0 0 0 1 0 0 0 1 2456.dat +1 0 160 -320 160 1 0 0 0 1 0 0 0 1 2456.dat +1 71 160 -328 140 1 0 0 0 1 0 0 0 1 3034.dat +1 71 160 -328 180 1 0 0 0 1 0 0 0 1 3034.dat +1 1 120 -352 140 1 0 0 0 1 0 0 0 1 3001.dat +1 1 200 -352 140 1 0 0 0 1 0 0 0 1 3001.dat +1 1 120 -352 180 1 0 0 0 1 0 0 0 1 3001.dat +1 1 200 -352 180 1 0 0 0 1 0 0 0 1 3001.dat +1 322 120 -376 140 1 0 0 0 1 0 0 0 1 3001.dat +1 322 200 -376 140 1 0 0 0 1 0 0 0 1 3001.dat +1 322 120 -376 180 1 0 0 0 1 0 0 0 1 3001.dat +1 322 200 -376 180 1 0 0 0 1 0 0 0 1 3001.dat +1 1 120 -400 140 1 0 0 0 1 0 0 0 1 3001.dat +1 1 200 -400 140 1 0 0 0 1 0 0 0 1 3001.dat +1 71 120 -400 180 1 0 0 0 1 0 0 0 1 3001.dat +1 71 200 -400 180 1 0 0 0 1 0 0 0 1 3001.dat +1 320 100 -424 160 1 0 0 0 1 0 0 0 1 2456.dat +1 320 220 -424 160 1 0 0 0 1 0 0 0 1 2456.dat +1 71 120 -424 130 1 0 0 0 1 0 0 0 1 3010.dat +1 71 200 -424 130 1 0 0 0 1 0 0 0 1 3010.dat +1 71 120 -424 190 1 0 0 0 1 0 0 0 1 3010.dat +1 71 200 -424 190 1 0 0 0 1 0 0 0 1 3010.dat +1 25 60 -376 160 1 0 0 0 1 0 0 0 1 3003.dat +1 25 60 -400 160 1 0 0 0 1 0 0 0 1 3003.dat +1 28 60 -328 160 1 0 0 0 1 0 0 0 1 3003.dat +1 28 60 -352 160 1 0 0 0 1 0 0 0 1 3003.dat +1 25 260 -376 160 1 0 0 0 1 0 0 0 1 3003.dat +1 25 260 -400 160 1 0 0 0 1 0 0 0 1 3003.dat +1 28 260 -328 160 1 0 0 0 1 0 0 0 1 3003.dat +1 28 260 -352 160 1 0 0 0 1 0 0 0 1 3003.dat +1 19 60 -304 160 1 0 0 0 1 0 0 0 1 3022.dat +1 320 60 -296 160 1 0 0 0 1 0 0 0 1 3003.dat +1 70 260 -304 120 0 0 -1 0 1 0 1 0 0 3795.dat +1 320 260 -328 60 1 0 0 0 1 0 0 0 1 3003.dat +1 19 260 -336 60 1 0 0 0 1 0 0 0 1 3022.dat +1 14 160 -448 160 1 0 0 0 1 0 0 0 1 3003.dat +1 322 160 -456 140 1 0 0 0 1 0 0 0 1 3020.dat +1 322 160 -456 180 1 0 0 0 1 0 0 0 1 3020.dat +1 1 160 -480 130 1 0 0 0 1 0 0 0 1 30414.dat +1 322 160 -480 150 1 0 0 0 1 0 0 0 1 3010.dat +1 4 160 -480 180 1 0 0 0 1 0 0 0 1 3001.dat +1 1 160 -504 130 1 0 0 0 1 0 0 0 1 30414.dat +1 322 160 -504 150 1 0 0 0 1 0 0 0 1 3010.dat +1 4 160 -504 180 1 0 0 0 1 0 0 0 1 3001.dat +1 1 160 -512 160 1 0 0 0 1 0 0 0 1 3031.dat +1 1 130 -520 150 1 0 0 0 1 0 0 0 1 3957b.dat +1 1 190 -520 150 1 0 0 0 1 0 0 0 1 3957b.dat +1 15 190 -494 112 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 130 -494 112 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 160 -470 112 1 0 0 0 0 -1 0 1 0 3069b.dat +1 16 220 -328 0 1 0 0 0 1 0 0 0 1 held_car.ldr +0 FILE held_car.ldr +0 held_car +0 Name: held_car +1 0 40 -8 10 1 0 0 0 1 0 0 0 1 2926.dat +1 14 90 -3 10 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 96 -3 10 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 -10 -3 10 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 -16 -3 10 0 0 1 -1 0 0 0 -1 0 87697.dat +1 0 40 -8 90 1 0 0 0 1 0 0 0 1 2926.dat +1 14 90 -3 90 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 96 -3 90 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 -10 -3 90 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 -16 -3 90 0 0 1 -1 0 0 0 -1 0 87697.dat +1 14 40 -16 60 0 0 -1 0 1 0 1 0 0 3032.dat +1 4 40 -40 20 1 0 0 0 1 0 0 0 1 3001.dat +1 4 40 -40 100 1 0 0 0 1 0 0 0 1 3001.dat +1 47 20 -40 70 1 0 0 0 1 0 0 0 1 3039.dat +1 47 60 -40 70 1 0 0 0 1 0 0 0 1 3039.dat +1 19 40 -48 60 1 0 0 0 1 0 0 0 1 3020.dat +1 4 20 -40 10 1 0 0 0 1 0 0 0 1 85984.dat +1 4 60 -40 10 1 0 0 0 1 0 0 0 1 85984.dat diff --git a/brickwright/alt/alt-033/thumb-512.avif b/brickwright/alt/alt-033/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..1ebc193629345d74a29baee684a5dc3ba8465c4e Binary files /dev/null and b/brickwright/alt/alt-033/thumb-512.avif differ diff --git a/brickwright/alt/alt-033/trace.jsonl.gz b/brickwright/alt/alt-033/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..c2ec0f3465c90dd9aacfdef285f6fe362539db82 --- /dev/null +++ b/brickwright/alt/alt-033/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fa8aaeedb906aac2c23636c0279fbce896e8d4c4cc6b91079672c923a981d58 +size 7074 diff --git a/brickwright/alt/alt-033/view-0.avif b/brickwright/alt/alt-033/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..ba0e81f1bd66f5eeb707a0659d76fdd20130f9bf Binary files /dev/null and b/brickwright/alt/alt-033/view-0.avif differ diff --git a/brickwright/alt/alt-033/view-1.avif b/brickwright/alt/alt-033/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..331f00ac5773a4f570239ac215ae67aec796b135 Binary files /dev/null and b/brickwright/alt/alt-033/view-1.avif differ diff --git a/brickwright/alt/alt-033/view-2.avif b/brickwright/alt/alt-033/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..66da99e8e5627a1b1150fd801717055ece1a55f5 Binary files /dev/null and b/brickwright/alt/alt-033/view-2.avif differ diff --git a/brickwright/alt/alt-033/view-3.avif b/brickwright/alt/alt-033/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..17e9e55fd02dc5919ca4e480f5b47fe83f7166c8 Binary files /dev/null and b/brickwright/alt/alt-033/view-3.avif differ diff --git a/brickwright/alt/alt-033/view-4.avif b/brickwright/alt/alt-033/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..cfc9b8e4b845e22f20c844a6aa84df73f34a2faa Binary files /dev/null and b/brickwright/alt/alt-033/view-4.avif differ diff --git a/brickwright/alt/alt-033/view-5.avif b/brickwright/alt/alt-033/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..dd0663b66c8dcb1e768e6f2fcfde3895be9903c7 Binary files /dev/null and b/brickwright/alt/alt-033/view-5.avif differ diff --git a/brickwright/alt/alt-033/view-6.avif b/brickwright/alt/alt-033/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..c6b205c6605f7d4cf6ad891fb45a91bdffd6320f Binary files /dev/null and b/brickwright/alt/alt-033/view-6.avif differ diff --git a/brickwright/alt/alt-033/view-7.avif b/brickwright/alt/alt-033/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..03bbd9576975cffa19487d0c04b6111da6f8d0ee Binary files /dev/null and b/brickwright/alt/alt-033/view-7.avif differ diff --git a/brickwright/alt/alt-034/build.py b/brickwright/alt/alt-034/build.py new file mode 100644 index 0000000000000000000000000000000000000000..c786505f48f36d8a3ce14d6b4eba68a4dfe4d8f5 --- /dev/null +++ b/brickwright/alt/alt-034/build.py @@ -0,0 +1,104 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid,col,x,y,z,rot=0,name=None): + return b.add(bl.Element(pid,getattr(bl.Color,col)),(x,y,z),rotation=bl.Rotation(rot),name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='meadow') + # Broad masonry footing, hollow masonry courses, and bonded stone bands. + for x in (4,8): + for y in (7,9): put('3001','DARK_TAN',x,y,1/3) + for y in (7,10): + put('3622','TAN',4,y,4/3); put('3004','TAN',7,y,4/3); put('3622','TAN',9,y,4/3) + for x in (4,11): put('3004','TAN',x,8,4/3,1) + for x in (4,8): + for y in (7,9): put('3001','LIGHT_BLUISH_GRAY',x,y,7/3) + for y in (7,10): + for x in (4,8): put('3010','LIGHT_BLUISH_GRAY',x,y,10/3) + for x in (4,11): put('3004','LIGHT_BLUISH_GRAY',x,8,10/3,1) + for y in (7,10): + for x in (4,6,8): put('3004','LIGHT_BLUISH_GRAY',x,y,13/3) + for x in (10,11): put('3005','LIGHT_BLUISH_GRAY',x,y,13/3) + for x in (4,11): put('3004','DARK_BLUISH_GRAY',x,8,13/3,1) + for x,y in ((4,7),(8,7),(4,9)): put('3001','DARK_BLUISH_GRAY',x,y,16/3) + for x in (8,10): put('3003','DARK_TAN',x,9,16/3) + for y in (6,8): put('3034','LIGHT_BLUISH_GRAY',4,y,19/3) + put('3795','REDDISH_BROWN',5,5,20/3) + # Four upper-window piers leave a generous open front. + for x in (4,10): + for y in (7,9): + for z in (20/3,26/3): put('3245c','LIGHT_BLUISH_GRAY',x,y,z) + put('2877','WHITE',x,y,32/3) + put('15254','LIGHT_BLUISH_GRAY',5,7,35/3,name='window_arch') + # Rear lintel, with small outer posts beside the arch. + for y in (7,9): + for x in (4,11): + for z in (35/3,38/3): put('3005','MEDIUM_NOUGAT',x,y,z) + for z in (35/3,38/3): put('2456','DARK_RED',5,9,z) + # Pink tiled, overhanging gable roof. + for x in (4,8): + put('3037','MAGENTA',x,6,41/3) + put('3037','MAGENTA',x,10,41/3,2) + for x in (4,6,8,10): + put('3039','MAGENTA',x,7,44/3) + put('3039','MAGENTA',x,9,44/3,2) + for x in (4,8): put('3001','BRIGHT_PINK',x,8,47/3) + # Princess: projecting pink bodice, tan face, and hands on the sill. + put('3020','TAN',6,6,7) + put('3001','BRIGHT_PINK',6,6,22/3,name='princess_skirt') + put('3001','BRIGHT_PINK',6,5,25/3,name='leaning_bodice') + for x in (5,10): + put('3005','MEDIUM_LAVENDER',x,5,7) + put('3023b','TAN',x,5,8,1) + put('3020','TAN',6,5,28/3) + face=put('30414','TAN',6,5,29/3,name='princess_face') + put('3010','BRIGHT_LIGHT_YELLOW',6,6,29/3) + put('3001','YELLOW',6,5,32/3,name='golden_crown_hair') + for x in (6.5,8.5): + eye=bl.Element('98138p07',bl.Color.WHITE) + b.connect(eye,'antistud',to=face.find_connector('stud',facing=bl.Direction.FRONT,toward=(x,5,10))) + # A single long yellow plate is a load-bearing braid spine. + hair=bl.Element('60479',bl.Color.YELLOW) + down=bl.Mat3(((0,1,0),(0,0,-1),(-1,0,0))) + braid=b.connect(hair,hair.find_connectors('antistud')[0],to=face.find_connector('stud',facing=bl.Direction.FRONT,toward=bl.Direction.LEFT),target_rotation=down,name='ground_length_hair') + # Thick yellow locks along the braid, facing outward. + for i in (1,3,5,7): + # Yellow rectangular braid segments use only available yellow stock. + seg=bl.Element('3003',bl.Color.YELLOW) + c=seg.find_connector('antistud',toward=bl.Direction.RIGHT) + target=braid.find_connectors('stud',toward=bl.Direction.DOWN)[i] + b.connect(seg,c,to=target,name='braid_lock_'+str(i)) + # Man below, in blue with dark boots and a brown cap. + for x in (3,5): put('3004','BLACK',x,2,1/3,1) + put('3001','BLUE',3,2,4/3) + for x in (2,5): put('3002','BLUE',x,2,7/3) + for x in (2,7): put('3004','MEDIUM_NOUGAT',x,2,10/3,1) + man=put('30414','TAN',3,2,10/3,name='man_face') + put('3010','REDDISH_BROWN',3,3,10/3) + put('3002','REDDISH_BROWN',3,2,13/3,name='man_hair') + top_lock=bl.Element('3001',bl.Color.YELLOW) + b.connect(top_lock,top_lock.find_connectors('antistud')[0],to=braid.find_connectors('stud',toward=bl.Direction.DOWN)[11],target_rotation=down,name='upper_braid') + put('3068b','DARK_TAN',9,4,1/3,name='hair_landing') + for x in (3.5,5.5): + b.connect(bl.Element('98138p07',bl.Color.WHITE),'antistud',to=man.find_connector('stud',facing=bl.Direction.FRONT,toward=(x,2,4))) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + allowed=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + over=[(k,n,allowed.get(k[0],{}).get(k[1],0)) for k,n in used.items() if n>allowed.get(k[0],{}).get(k[1],0)] + tests.check('inventory quantities',not over,str(over)) + tests.check('hair reaches meadow',b.named('ground_length_hair').bounding_box[0].z <= 2/3+0.01) + tests.check('woman in upper window',b.named('princess_face').center.z>9) + tests.check('man stands below woman',b.named('man_face').center.z < b.named('princess_face').center.z-4) + return tests.report() diff --git a/brickwright/alt/alt-034/hero-1024.avif b/brickwright/alt/alt-034/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..98bac3fa21d7b4d805ae1a7d4c5b98e57df4c1d9 Binary files /dev/null and b/brickwright/alt/alt-034/hero-1024.avif differ diff --git a/brickwright/alt/alt-034/model.mpd b/brickwright/alt/alt-034/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..ed5f58be6a4832afc229c8170d20bab01c12971d --- /dev/null +++ b/brickwright/alt/alt-034/model.mpd @@ -0,0 +1,112 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 28 120 -32 160 1 0 0 0 1 0 0 0 1 3001.dat +1 28 120 -32 200 1 0 0 0 1 0 0 0 1 3001.dat +1 28 200 -32 160 1 0 0 0 1 0 0 0 1 3001.dat +1 28 200 -32 200 1 0 0 0 1 0 0 0 1 3001.dat +1 19 110 -56 150 1 0 0 0 1 0 0 0 1 3622.dat +1 19 160 -56 150 1 0 0 0 1 0 0 0 1 3004.dat +1 19 210 -56 150 1 0 0 0 1 0 0 0 1 3622.dat +1 19 110 -56 210 1 0 0 0 1 0 0 0 1 3622.dat +1 19 160 -56 210 1 0 0 0 1 0 0 0 1 3004.dat +1 19 210 -56 210 1 0 0 0 1 0 0 0 1 3622.dat +1 19 90 -56 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 230 -56 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 120 -80 160 1 0 0 0 1 0 0 0 1 3001.dat +1 71 120 -80 200 1 0 0 0 1 0 0 0 1 3001.dat +1 71 200 -80 160 1 0 0 0 1 0 0 0 1 3001.dat +1 71 200 -80 200 1 0 0 0 1 0 0 0 1 3001.dat +1 71 120 -104 150 1 0 0 0 1 0 0 0 1 3010.dat +1 71 200 -104 150 1 0 0 0 1 0 0 0 1 3010.dat +1 71 120 -104 210 1 0 0 0 1 0 0 0 1 3010.dat +1 71 200 -104 210 1 0 0 0 1 0 0 0 1 3010.dat +1 71 90 -104 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 230 -104 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 100 -128 150 1 0 0 0 1 0 0 0 1 3004.dat +1 71 140 -128 150 1 0 0 0 1 0 0 0 1 3004.dat +1 71 180 -128 150 1 0 0 0 1 0 0 0 1 3004.dat +1 71 210 -128 150 1 0 0 0 1 0 0 0 1 3005.dat +1 71 230 -128 150 1 0 0 0 1 0 0 0 1 3005.dat +1 71 100 -128 210 1 0 0 0 1 0 0 0 1 3004.dat +1 71 140 -128 210 1 0 0 0 1 0 0 0 1 3004.dat +1 71 180 -128 210 1 0 0 0 1 0 0 0 1 3004.dat +1 71 210 -128 210 1 0 0 0 1 0 0 0 1 3005.dat +1 71 230 -128 210 1 0 0 0 1 0 0 0 1 3005.dat +1 72 90 -128 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 72 230 -128 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 72 120 -152 160 1 0 0 0 1 0 0 0 1 3001.dat +1 72 200 -152 160 1 0 0 0 1 0 0 0 1 3001.dat +1 72 120 -152 200 1 0 0 0 1 0 0 0 1 3001.dat +1 28 180 -152 200 1 0 0 0 1 0 0 0 1 3003.dat +1 28 220 -152 200 1 0 0 0 1 0 0 0 1 3003.dat +1 71 160 -160 140 1 0 0 0 1 0 0 0 1 3034.dat +1 71 160 -160 180 1 0 0 0 1 0 0 0 1 3034.dat +1 70 160 -168 120 1 0 0 0 1 0 0 0 1 3795.dat +1 71 100 -208 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 100 -256 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 15 100 -280 150 1 0 0 0 1 0 0 0 1 2877.dat +1 71 100 -208 190 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 100 -256 190 1 0 0 0 1 0 0 0 1 3245c.dat +1 15 100 -280 190 1 0 0 0 1 0 0 0 1 2877.dat +1 71 220 -208 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 220 -256 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 15 220 -280 150 1 0 0 0 1 0 0 0 1 2877.dat +1 71 220 -208 190 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 220 -256 190 1 0 0 0 1 0 0 0 1 3245c.dat +1 15 220 -280 190 1 0 0 0 1 0 0 0 1 2877.dat +1 71 160 -328 150 1 0 0 0 1 0 0 0 1 15254.dat +1 84 90 -304 150 1 0 0 0 1 0 0 0 1 3005.dat +1 84 90 -328 150 1 0 0 0 1 0 0 0 1 3005.dat +1 84 230 -304 150 1 0 0 0 1 0 0 0 1 3005.dat +1 84 230 -328 150 1 0 0 0 1 0 0 0 1 3005.dat +1 84 90 -304 190 1 0 0 0 1 0 0 0 1 3005.dat +1 84 90 -328 190 1 0 0 0 1 0 0 0 1 3005.dat +1 84 230 -304 190 1 0 0 0 1 0 0 0 1 3005.dat +1 84 230 -328 190 1 0 0 0 1 0 0 0 1 3005.dat +1 320 160 -304 200 1 0 0 0 1 0 0 0 1 2456.dat +1 320 160 -328 200 1 0 0 0 1 0 0 0 1 2456.dat +1 26 120 -352 150 1 0 0 0 1 0 0 0 1 3037.dat +1 26 120 -352 210 -1 0 0 0 1 0 0 0 -1 3037.dat +1 26 200 -352 150 1 0 0 0 1 0 0 0 1 3037.dat +1 26 200 -352 210 -1 0 0 0 1 0 0 0 -1 3037.dat +1 26 100 -376 170 1 0 0 0 1 0 0 0 1 3039.dat +1 26 100 -376 190 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 140 -376 170 1 0 0 0 1 0 0 0 1 3039.dat +1 26 140 -376 190 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 180 -376 170 1 0 0 0 1 0 0 0 1 3039.dat +1 26 180 -376 190 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 220 -376 170 1 0 0 0 1 0 0 0 1 3039.dat +1 26 220 -376 190 -1 0 0 0 1 0 0 0 -1 3039.dat +1 29 120 -400 180 1 0 0 0 1 0 0 0 1 3001.dat +1 29 200 -400 180 1 0 0 0 1 0 0 0 1 3001.dat +1 19 160 -176 140 1 0 0 0 1 0 0 0 1 3020.dat +1 29 160 -200 140 1 0 0 0 1 0 0 0 1 3001.dat +1 29 160 -224 120 1 0 0 0 1 0 0 0 1 3001.dat +1 30 110 -192 110 1 0 0 0 1 0 0 0 1 3005.dat +1 19 110 -200 120 0 0 -1 0 1 0 1 0 0 3023b.dat +1 30 210 -192 110 1 0 0 0 1 0 0 0 1 3005.dat +1 19 210 -200 120 0 0 -1 0 1 0 1 0 0 3023b.dat +1 19 160 -232 120 1 0 0 0 1 0 0 0 1 3020.dat +1 19 160 -256 110 1 0 0 0 1 0 0 0 1 30414.dat +1 226 160 -256 130 1 0 0 0 1 0 0 0 1 3010.dat +1 14 160 -280 120 1 0 0 0 1 0 0 0 1 3001.dat +1 15 130 -246 92 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 170 -246 92 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 14 190 -136 92 0 0 1 1 0 0 0 1 0 60479.dat +1 14 200 -36 68 0 0 1 1 0 0 0 1 0 3003.dat +1 14 200 -76 68 0 0 1 1 0 0 0 1 0 3003.dat +1 14 200 -116 68 0 0 1 1 0 0 0 1 0 3003.dat +1 14 200 -156 68 0 0 1 1 0 0 0 1 0 3003.dat +1 0 70 -32 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 110 -32 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 1 100 -56 60 1 0 0 0 1 0 0 0 1 3001.dat +1 1 70 -80 60 1 0 0 0 1 0 0 0 1 3002.dat +1 1 130 -80 60 1 0 0 0 1 0 0 0 1 3002.dat +1 84 50 -104 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 150 -104 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 100 -104 50 1 0 0 0 1 0 0 0 1 30414.dat +1 70 100 -104 70 1 0 0 0 1 0 0 0 1 3010.dat +1 70 90 -128 60 1 0 0 0 1 0 0 0 1 3002.dat +1 14 200 -216 68 0 0 1 1 0 0 0 1 0 3001.dat +1 28 200 -16 100 1 0 0 0 1 0 0 0 1 3068b.dat +1 15 70 -94 32 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 110 -94 32 1 0 0 0 0 -1 0 1 0 98138p07.dat diff --git a/brickwright/alt/alt-034/thumb-512.avif b/brickwright/alt/alt-034/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..95c0e4e9e5b64fa273ea1bc827b726af1f2a5871 Binary files /dev/null and b/brickwright/alt/alt-034/thumb-512.avif differ diff --git a/brickwright/alt/alt-034/trace.jsonl.gz b/brickwright/alt/alt-034/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..be0478f9a46b7aa34f5f8ca63e35554536080d2a --- /dev/null +++ b/brickwright/alt/alt-034/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bcd0d1fee3780d616bc1ebfa866f2273012b3fa82ac1f5f1238a8b89165091d8 +size 7735 diff --git a/brickwright/alt/alt-034/view-0.avif b/brickwright/alt/alt-034/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..d48c9e4c40e5714ffa01d2451090f7b373d9e514 Binary files /dev/null and b/brickwright/alt/alt-034/view-0.avif differ diff --git a/brickwright/alt/alt-034/view-1.avif b/brickwright/alt/alt-034/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..3c301f5e5bd3eaeaea78ef7cbe66afbb0feb1194 Binary files /dev/null and b/brickwright/alt/alt-034/view-1.avif differ diff --git a/brickwright/alt/alt-034/view-2.avif b/brickwright/alt/alt-034/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..0fb77bb6bab6d2a2bda42904750e9859f9d42f76 Binary files /dev/null and b/brickwright/alt/alt-034/view-2.avif differ diff --git a/brickwright/alt/alt-034/view-3.avif b/brickwright/alt/alt-034/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..ea5748bfd9c68f5cf2ba7ede652bcd3bbadc6cdd Binary files /dev/null and b/brickwright/alt/alt-034/view-3.avif differ diff --git a/brickwright/alt/alt-034/view-4.avif b/brickwright/alt/alt-034/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..e6880cdf99134f5d9f2601da47cf016731d66a25 Binary files /dev/null and b/brickwright/alt/alt-034/view-4.avif differ diff --git a/brickwright/alt/alt-034/view-5.avif b/brickwright/alt/alt-034/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..00da3d73e94bd6fefe6405bf7dbd19e20618a892 Binary files /dev/null and b/brickwright/alt/alt-034/view-5.avif differ diff --git a/brickwright/alt/alt-034/view-6.avif b/brickwright/alt/alt-034/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..5c2355a17b60a765c02fa7538e24fd843d2ac94c Binary files /dev/null and b/brickwright/alt/alt-034/view-6.avif differ diff --git a/brickwright/alt/alt-034/view-7.avif b/brickwright/alt/alt-034/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..5dbb73123c7efb75cf1cc969bd25939c9277fe43 Binary files /dev/null and b/brickwright/alt/alt-034/view-7.avif differ diff --git a/brickwright/alt/alt-035/build.py b/brickwright/alt/alt-035/build.py new file mode 100644 index 0000000000000000000000000000000000000000..a6a85b76a4314ba24b2b91ffce3df4c4029a03cc --- /dev/null +++ b/brickwright/alt/alt-035/build.py @@ -0,0 +1,109 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + C = bl.Color + def put(pid, color, x, y, z, r=0, name=None): + return b.add(bl.Element(pid, color), (x,y,z), rotation=bl.Rotation(r), name=name) + + # Four yellow hubs with wide black tyres on two transverse axles. + for i,x in enumerate((1,6)): + axle=put('2926',C.BLACK,x,2,1,1,name=f'axle_{i}') + for j,c in enumerate(axle.find_connectors('hinge_3_in')): + rim=b.connect(bl.Element('6014b',C.YELLOW),'hinge_3_on',to=c,name=f'wheel_{i}_{j}') + tyre=bl.Element('87697',C.BLACK) + b.connect(tyre,tyre.find_connector('fixed_13_on',facing=bl.Direction.BACK),to=rim.find_connector('fixed_13_in',toward=bl.Direction.FRONT),name=f'tyre_{i}_{j}') + put('3002',C.BLACK,x if i==0 else x-1,2,4/3,1) + for x in (2,4): + put('3034',C.LIGHT_BLUISH_GRAY,x,0,7/3,1) + put('3032',C.YELLOW,1,2,8/3) + for y in (0,6): + put('3795',C.REDDISH_BROWN,1,y,8/3) + # Curving, inset lower shell. + for y in (2,4): + put('3660b',C.REDDISH_BROWN,0,y,3,3) + put('3660b',C.REDDISH_BROWN,6,y,3,1) + for x in (2,4): + put('3660b',C.TAN,x,6,3,2) + for x in (1,6): + put('3004',C.ORANGE,x,0,3,1) + # Thick pumpkin ribs surround an open passenger cabin. + for layer in range(3): + z=4+layer + if layer<2: + put('3001',C.BRIGHT_LIGHT_ORANGE,0,2,z,1) + put('3001',C.BRIGHT_LIGHT_ORANGE,6,2,z,1) + put('3001',C.ORANGE,2,6,z) + else: + for x in (0,7): + for y in (2,4):put('30136',C.DARK_ORANGE,x,y,z,1) + for y in (6,7):put('3010',C.ORANGE,2,y,z) + for x in (1,6):put('3004',C.ORANGE,x,0,z,1) + + # Staircase is an interlocked stepped stack, fastened beneath the threshold. + put('3022',C.TAN,3,-3,1/3) + for y in (-3,-2):put('3023b',C.TAN,3,y,2/3) + put('3002',C.REDDISH_BROWN,3,-2,1,1,name='stair_riser') + put('3069b',C.WHITE,3,-3,1,name='bottom_tread') + put('3069b',C.WHITE,3,-2,2,name='middle_tread') + put('3022',C.TAN,3,-1,2) + put('3069b',C.WHITE,3,-1,7/3,name='top_tread') + # Rounded shoulder ribs rise into a small crown above the hollow cabin. + lower_put = put + def put(pid, color, x, y, z, r=0, name=None): + return lower_put(pid,color,x,y,z-1,r,name) + put('15254',C.LIGHT_BLUISH_GRAY,1,0,8,name='open_door_arch') + put('6081',C.YELLOW,0,2,8,3) + put('6081',C.YELLOW,6,2,8,1) + put('3037',C.YELLOW,2,6,8,2) + for y in (2,4): + put('3039',C.BRIGHT_LIGHT_ORANGE,1,y,9,3) + put('3039',C.BRIGHT_LIGHT_ORANGE,5,y,9,1) + put('3003',C.YELLOW,3,4,9) + put('3004',C.BRIGHT_LIGHT_YELLOW,3,6,9) + for y in (2,4):put('3020',C.TAN,2,y,10) + put('3037',C.YELLOW,2,0,10) + put('3037',C.YELLOW,2,6,10,2) + for x in (2,4):put('3039',C.GREEN,x,2,31/3) + for x in (2,4):put('3039',C.GREEN,x,4,31/3,2) + # A hooked green stalk: rising, bending sideways, then curling down. + put('3004',C.DARK_GREEN,3,3,34/3,1,name='stem_base') + put('3004',C.DARK_GREEN,3,3,37/3,1) + put('3004',C.BRIGHT_GREEN,3,3,40/3) + put('3004',C.BRIGHT_GREEN,3,4,40/3) + put('3004',C.DARK_GREEN,5,3,40/3,1) + put('3004',C.DARK_GREEN,5,3,37/3,1,name='stem_curled_tip') + put('2431',C.GREEN,3,3,43/3) + put('2431',C.GREEN,3,4,43/3) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((e.ldraw_id,e.color.name) for p in b.flattened_placements for e in [p.content]) + excess={str(k):n for k,n in used.items() if n>inventory.get(k[0],{}).get(k[1],0)} + tests.check('inventory limits',not excess,str(excess)) + tests.check('four wheels',sum(n for (p,c),n in used.items() if p=='87697')==4,'Four black tyres with yellow hubs') + treads=[b.named(n).center.z for n in ('bottom_tread','middle_tread','top_tread')] + tests.check('ascending attached staircase', treads[0]base.center.x and tip.center.z>base.center.z and tip.content.color==bl.Color.DARK_GREEN,'Raised green stalk with a downward hooked end') + # The entrance is an empty four-stud-wide volume beneath the arch. + clear=True + for p in b.flattened_placements: + lo,hi=p.bounding_box + if lo.x<4.9 and hi.x>3.1 and lo.y<0.9 and hi.y>0.1 and lo.z<6.5 and hi.z>3.4: + clear=False + tests.check('open side doorway',clear,'Clear entrance above the staircase into the hollow cabin') + tests.check('curved pumpkin shoulders',used[('6081','YELLOW')]==2 and used[('3039','BRIGHT_LIGHT_ORANGE')]==4,'Curved and sloped gold shoulders above orange body') + return tests.report() diff --git a/brickwright/alt/alt-035/hero-1024.avif b/brickwright/alt/alt-035/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..e3f078ab06773453b96b3423311bf580ed6158b4 Binary files /dev/null and b/brickwright/alt/alt-035/hero-1024.avif differ diff --git a/brickwright/alt/alt-035/model.mpd b/brickwright/alt/alt-035/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..33bdac0c052ca787032afba8a88fcba1abc4e27f --- /dev/null +++ b/brickwright/alt/alt-035/model.mpd @@ -0,0 +1,77 @@ +1 0 30 -32 80 0 0 -1 0 1 0 1 0 0 2926.dat +1 14 30 -27 30 0 1 0 -1 0 0 0 0 1 6014b.dat +1 0 30 -27 24 0 1 0 1 0 0 0 0 -1 87697.dat +1 14 30 -27 130 0 1 0 1 0 0 0 0 -1 6014b.dat +1 0 30 -27 136 0 1 0 1 0 0 0 0 -1 87697.dat +1 0 40 -56 70 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 130 -32 80 0 0 -1 0 1 0 1 0 0 2926.dat +1 14 130 -27 30 0 1 0 -1 0 0 0 0 1 6014b.dat +1 0 130 -27 24 0 1 0 1 0 0 0 0 -1 87697.dat +1 14 130 -27 130 0 1 0 1 0 0 0 0 -1 6014b.dat +1 0 130 -27 136 0 1 0 1 0 0 0 0 -1 87697.dat +1 0 120 -56 70 0 0 -1 0 1 0 1 0 0 3002.dat +1 71 60 -64 80 0 0 -1 0 1 0 1 0 0 3034.dat +1 71 100 -64 80 0 0 -1 0 1 0 1 0 0 3034.dat +1 14 80 -72 80 1 0 0 0 1 0 0 0 1 3032.dat +1 70 80 -72 20 1 0 0 0 1 0 0 0 1 3795.dat +1 70 80 -72 140 1 0 0 0 1 0 0 0 1 3795.dat +1 70 30 -96 60 0 0 1 0 1 0 -1 0 0 3660b.dat +1 70 130 -96 60 0 0 -1 0 1 0 1 0 0 3660b.dat +1 70 30 -96 100 0 0 1 0 1 0 -1 0 0 3660b.dat +1 70 130 -96 100 0 0 -1 0 1 0 1 0 0 3660b.dat +1 19 60 -96 130 -1 0 0 0 1 0 0 0 -1 3660b.dat +1 19 100 -96 130 -1 0 0 0 1 0 0 0 -1 3660b.dat +1 25 30 -96 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 130 -96 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 191 20 -120 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 191 140 -120 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 25 80 -120 140 1 0 0 0 1 0 0 0 1 3001.dat +1 25 30 -120 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 130 -120 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 191 20 -144 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 191 140 -144 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 25 80 -144 140 1 0 0 0 1 0 0 0 1 3001.dat +1 25 30 -144 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 130 -144 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 484 10 -168 60 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 10 -168 100 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 150 -168 60 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 150 -168 100 0 0 -1 0 1 0 1 0 0 30136.dat +1 25 80 -168 130 1 0 0 0 1 0 0 0 1 3010.dat +1 25 80 -168 150 1 0 0 0 1 0 0 0 1 3010.dat +1 25 30 -168 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 130 -168 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 80 -16 -40 1 0 0 0 1 0 0 0 1 3022.dat +1 19 80 -24 -50 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 80 -24 -30 1 0 0 0 1 0 0 0 1 3023b.dat +1 70 80 -48 -10 0 0 -1 0 1 0 1 0 0 3002.dat +1 15 80 -32 -50 1 0 0 0 1 0 0 0 1 3069b.dat +1 15 80 -56 -30 1 0 0 0 1 0 0 0 1 3069b.dat +1 19 80 -56 0 1 0 0 0 1 0 0 0 1 3022.dat +1 15 80 -64 -10 1 0 0 0 1 0 0 0 1 3069b.dat +1 71 80 -216 10 1 0 0 0 1 0 0 0 1 15254.dat +1 14 30 -200 80 0 0 1 0 1 0 -1 0 0 6081.dat +1 14 130 -200 80 0 0 -1 0 1 0 1 0 0 6081.dat +1 14 80 -192 130 -1 0 0 0 1 0 0 0 -1 3037.dat +1 191 50 -216 60 0 0 1 0 1 0 -1 0 0 3039.dat +1 191 110 -216 60 0 0 -1 0 1 0 1 0 0 3039.dat +1 191 50 -216 100 0 0 1 0 1 0 -1 0 0 3039.dat +1 191 110 -216 100 0 0 -1 0 1 0 1 0 0 3039.dat +1 14 80 -216 100 1 0 0 0 1 0 0 0 1 3003.dat +1 226 80 -216 130 1 0 0 0 1 0 0 0 1 3004.dat +1 19 80 -224 60 1 0 0 0 1 0 0 0 1 3020.dat +1 19 80 -224 100 1 0 0 0 1 0 0 0 1 3020.dat +1 14 80 -240 30 1 0 0 0 1 0 0 0 1 3037.dat +1 14 80 -240 130 -1 0 0 0 1 0 0 0 -1 3037.dat +1 2 60 -248 70 1 0 0 0 1 0 0 0 1 3039.dat +1 2 100 -248 70 1 0 0 0 1 0 0 0 1 3039.dat +1 2 60 -248 90 -1 0 0 0 1 0 0 0 -1 3039.dat +1 2 100 -248 90 -1 0 0 0 1 0 0 0 -1 3039.dat +1 288 70 -272 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 70 -296 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 10 80 -320 70 1 0 0 0 1 0 0 0 1 3004.dat +1 10 80 -320 90 1 0 0 0 1 0 0 0 1 3004.dat +1 288 110 -320 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 110 -296 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 2 100 -328 70 1 0 0 0 1 0 0 0 1 2431.dat +1 2 100 -328 90 1 0 0 0 1 0 0 0 1 2431.dat diff --git a/brickwright/alt/alt-035/thumb-512.avif b/brickwright/alt/alt-035/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..fcf61a76ed630d6ab56eac51a300ba43cc625769 Binary files /dev/null and b/brickwright/alt/alt-035/thumb-512.avif differ diff --git a/brickwright/alt/alt-035/trace.jsonl.gz b/brickwright/alt/alt-035/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..78fe024375c579144519221181cf5df424b0a9f8 --- /dev/null +++ b/brickwright/alt/alt-035/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5509d87ddd5b066af01a0a4635edaba1a356fce28942861d14856338e4cc61a +size 9284 diff --git a/brickwright/alt/alt-035/view-0.avif b/brickwright/alt/alt-035/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..33ecbef1aca43f89c2c796ca23fe0909f8ec0152 Binary files /dev/null and b/brickwright/alt/alt-035/view-0.avif differ diff --git a/brickwright/alt/alt-035/view-1.avif b/brickwright/alt/alt-035/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..b168d2edc59d72b50298f905e3de9e01210c2774 Binary files /dev/null and b/brickwright/alt/alt-035/view-1.avif differ diff --git a/brickwright/alt/alt-035/view-2.avif b/brickwright/alt/alt-035/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..4730cc7a066c53ba7988e258f739efe314ca9b1e Binary files /dev/null and b/brickwright/alt/alt-035/view-2.avif differ diff --git a/brickwright/alt/alt-035/view-3.avif b/brickwright/alt/alt-035/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..5b7ecc6e5cc6b157bd7fe4d459ac1e771927f8c5 Binary files /dev/null and b/brickwright/alt/alt-035/view-3.avif differ diff --git a/brickwright/alt/alt-035/view-4.avif b/brickwright/alt/alt-035/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..e9dec0ec231904b6766322708cca2e2a5816b5ca Binary files /dev/null and b/brickwright/alt/alt-035/view-4.avif differ diff --git a/brickwright/alt/alt-035/view-5.avif b/brickwright/alt/alt-035/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..d8ce423e4feec0b360256aa632ccf9cafb46a21c Binary files /dev/null and b/brickwright/alt/alt-035/view-5.avif differ diff --git a/brickwright/alt/alt-035/view-6.avif b/brickwright/alt/alt-035/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..c81060e9aa5d79ad4a191453ed73e78cbbf03b01 Binary files /dev/null and b/brickwright/alt/alt-035/view-6.avif differ diff --git a/brickwright/alt/alt-035/view-7.avif b/brickwright/alt/alt-035/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..020f08b68b309b3f39ff848cc5a78429b453e8d1 Binary files /dev/null and b/brickwright/alt/alt-035/view-7.avif differ diff --git a/brickwright/alt/alt-036/build.py b/brickwright/alt/alt-036/build.py new file mode 100644 index 0000000000000000000000000000000000000000..a55530e9f803c167da87f4a3bd0dd64af46dd046 --- /dev/null +++ b/brickwright/alt/alt-036/build.py @@ -0,0 +1,101 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + def put(pid,col,x,y,h,r=0,name=None): + return b.add(bl.Element(pid,getattr(bl.Color,col)),(x,y,h/3),rotation=bl.Rotation(r),name=name) + # A woven-looking square rug: concentric motifs on a single strong backing. + put('91405','BRIGHT_GREEN',0,0,0,name='rug backing') + border=['DARK_PURPLE','BRIGHT_PINK','DARK_RED','DARK_PINK','ORANGE','BRIGHT_PINK','LIME','DARK_PURPLE'] + for k in range(8): + put('3003',border[k],2*k,0,1) + put('3003',border[7-k],2*k,14,1) + side=['BRIGHT_PINK','DARK_RED','DARK_PINK','ORANGE','LIME','BRIGHT_PINK'] + for k,c in enumerate(side): + put('3003',c,0,2+2*k,1) + put('3003',c,14,12-2*k,1) + rows=[['DARK_GREEN','DARK_TAN','DARK_GREEN'],['RED','DARK_PURPLE','RED'],['DARK_TAN','TAN','DARK_TAN'],['DARK_TAN','TAN','DARK_TAN'],['RED','DARK_PURPLE','RED'],['DARK_GREEN','DARK_PURPLE','DARK_GREEN']] + # Dark tan is limited; two central outer motifs use orange instead. + rows[3][0]=rows[3][2]='ORANGE' + for j,row in enumerate(rows): + for i,c in enumerate(row): put('3001',c,2+4*i,2+2*j,1) + # Low yellow oil lamp, with a loop handle and an ascending spout. + for y in (7,9): put('3001','YELLOW',3,y,4) + for y in (7,9): put('3001','BRIGHT_LIGHT_ORANGE',3,y,7) + put('3004','BRIGHT_LIGHT_YELLOW',2,8,7,1) + put('3004','BRIGHT_LIGHT_YELLOW',7,8,7,1) + put('3037','YELLOW',3,7,10) + put('3037','YELLOW',3,9,10,2) + put('3003','YELLOW',7,8,4,name='spout foot') + for y in (8,9): put('3004','BRIGHT_LIGHT_YELLOW',4,y,13) + put('3005','YELLOW',4,8,16,name='lamp lid knob') + put('3004','BRIGHT_LIGHT_YELLOW',1,8,4) + put('3004','BRIGHT_LIGHT_YELLOW',0,8,7) + put('3004','BRIGHT_LIGHT_YELLOW',0,8,10) + put('3010','BRIGHT_LIGHT_YELLOW',0,8,13,name='lamp loop handle') + put('3003','YELLOW',7,8,10) + put('3003','YELLOW',8,8,13) + put('3004','BRIGHT_LIGHT_YELLOW',9,8,16,1,name='spout tip') + # Offset courses describe an S-curving smoke tail, rooted in the spout. + put('3004','DARK_AZURE',9,8,19,1,name='smoke root') + for x,h in ((9,22),(10,25),(10,28),(9,31)): + put('3003','BLUE',x,8,h,name='smoke '+str(h)) + put('3003','MEDIUM_AZURE',8,8,34,name='smoke waist') + put('3660b','MEDIUM_AZURE',7,8,37,3) + put('3660b','MEDIUM_AZURE',9,8,37,1) + put('3001','BLUE',7,8,40,name='waist') + put('3020','TAN',7,8,43,name='gold sash') + put('3001','MEDIUM_AZURE',7,8,44,name='chest lower') + # Broad shoulders and suspended arms. + put('3660b','MEDIUM_AZURE',5,8,47,3) + put('3660b','MEDIUM_AZURE',11,8,47,1) + put('3001','MEDIUM_AZURE',7,8,47) + put('3001','BLUE',5,8,50) + put('3001','BLUE',9,8,50) + for x in (5,11): + put('3022','TAN',x,8,46,name='cuff '+str(x)) + put('3003','MEDIUM_AZURE',x,8,43,name='fist '+str(x)) + put('3045','MEDIUM_AZURE',x,8,53) + put('3004','BLACK',8,8,53,name='goatee') + put('3004','MEDIUM_AZURE',8,9,53,name='neck') + mouth=put('30414','BLUE',7,8,56,name='head lower') + put('3010','MEDIUM_AZURE',7,9,56) + e=bl.Element('3069b',bl.Color.WHITE) + b.connect(e,e.find_connector('antistud',toward=bl.Direction.RIGHT),to=mouth.find_connector('stud',facing=bl.Direction.FRONT,toward=(8.5,8,19)),target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90),name='smile') + face=put('30414','BLUE',7,8,59,name='face') + put('3010','MEDIUM_AZURE',7,9,59) + for x in (7.5,10.5): + e=bl.Element('98138p07',bl.Color.WHITE) + b.connect(e,e.find_connector('antistud'),to=face.find_connector('stud',facing=bl.Direction.FRONT,toward=(x,8,20)),name='eye '+str(x)) + # A central blue nose between the printed eyes. + e=bl.Element('3023b',bl.Color.DARK_AZURE) + b.connect(e,e.find_connector('antistud',toward=bl.Direction.RIGHT),to=face.find_connector('stud',facing=bl.Direction.FRONT,toward=(8.5,8,20)),target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90),name='nose') + for x in (7,9): put('3039','BLUE',x,8,62) + put('3004','BLACK',8,9,65,name='topknot') + # Present the decorated front toward the standard viewing direction. + out=bl.LegoBuild() + turn=bl.Pose(bl.Rotation.DEG_180.matrix,bl.Position(16,16,0)) + for p in b.placements: + out.add_raw(p.content,turn.compose(p.pose),name=b.name_of(p)) + return out + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + over=[(i,c,n,inventory.get(i,{}).get(c,0)) for (i,c),n in used.items() if n>inventory.get(i,{}).get(c,0)] + t.check('inventory respected',not over,str(over)) + t.check('smoke rises from spout',b.named('smoke root').alignment_box[0].z==b.named('spout tip').alignment_box[1].z) + t.check('curved taper',abs(b.named('smoke 28').center.x-b.named('smoke waist').center.x)>=2 and b.named('smoke root').alignment_width=40) + t.check('two eyes',len([n for n in b.names if n.startswith('eye ')])==2) + return t.report() diff --git a/brickwright/alt/alt-036/hero-1024.avif b/brickwright/alt/alt-036/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..4bb0e93dc4feedfeb1cd7e8e6e3952db5cf57450 Binary files /dev/null and b/brickwright/alt/alt-036/hero-1024.avif differ diff --git a/brickwright/alt/alt-036/model.mpd b/brickwright/alt/alt-036/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..a9360f86fd15c4a9016004900740adee1833d4e0 --- /dev/null +++ b/brickwright/alt/alt-036/model.mpd @@ -0,0 +1,101 @@ +1 10 160 -8 160 -1 0 0 0 1 0 0 0 -1 91405.dat +1 85 300 -32 300 -1 0 0 0 1 0 0 0 -1 3003.dat +1 85 300 -32 20 -1 0 0 0 1 0 0 0 -1 3003.dat +1 29 260 -32 300 -1 0 0 0 1 0 0 0 -1 3003.dat +1 27 260 -32 20 -1 0 0 0 1 0 0 0 -1 3003.dat +1 320 220 -32 300 -1 0 0 0 1 0 0 0 -1 3003.dat +1 29 220 -32 20 -1 0 0 0 1 0 0 0 -1 3003.dat +1 5 180 -32 300 -1 0 0 0 1 0 0 0 -1 3003.dat +1 25 180 -32 20 -1 0 0 0 1 0 0 0 -1 3003.dat +1 25 140 -32 300 -1 0 0 0 1 0 0 0 -1 3003.dat +1 5 140 -32 20 -1 0 0 0 1 0 0 0 -1 3003.dat +1 29 100 -32 300 -1 0 0 0 1 0 0 0 -1 3003.dat +1 320 100 -32 20 -1 0 0 0 1 0 0 0 -1 3003.dat +1 27 60 -32 300 -1 0 0 0 1 0 0 0 -1 3003.dat +1 29 60 -32 20 -1 0 0 0 1 0 0 0 -1 3003.dat +1 85 20 -32 300 -1 0 0 0 1 0 0 0 -1 3003.dat +1 85 20 -32 20 -1 0 0 0 1 0 0 0 -1 3003.dat +1 29 300 -32 260 -1 0 0 0 1 0 0 0 -1 3003.dat +1 29 20 -32 60 -1 0 0 0 1 0 0 0 -1 3003.dat +1 320 300 -32 220 -1 0 0 0 1 0 0 0 -1 3003.dat +1 320 20 -32 100 -1 0 0 0 1 0 0 0 -1 3003.dat +1 5 300 -32 180 -1 0 0 0 1 0 0 0 -1 3003.dat +1 5 20 -32 140 -1 0 0 0 1 0 0 0 -1 3003.dat +1 25 300 -32 140 -1 0 0 0 1 0 0 0 -1 3003.dat +1 25 20 -32 180 -1 0 0 0 1 0 0 0 -1 3003.dat +1 27 300 -32 100 -1 0 0 0 1 0 0 0 -1 3003.dat +1 27 20 -32 220 -1 0 0 0 1 0 0 0 -1 3003.dat +1 29 300 -32 60 -1 0 0 0 1 0 0 0 -1 3003.dat +1 29 20 -32 260 -1 0 0 0 1 0 0 0 -1 3003.dat +1 288 240 -32 260 -1 0 0 0 1 0 0 0 -1 3001.dat +1 28 160 -32 260 -1 0 0 0 1 0 0 0 -1 3001.dat +1 288 80 -32 260 -1 0 0 0 1 0 0 0 -1 3001.dat +1 4 240 -32 220 -1 0 0 0 1 0 0 0 -1 3001.dat +1 85 160 -32 220 -1 0 0 0 1 0 0 0 -1 3001.dat +1 4 80 -32 220 -1 0 0 0 1 0 0 0 -1 3001.dat +1 28 240 -32 180 -1 0 0 0 1 0 0 0 -1 3001.dat +1 19 160 -32 180 -1 0 0 0 1 0 0 0 -1 3001.dat +1 28 80 -32 180 -1 0 0 0 1 0 0 0 -1 3001.dat +1 25 240 -32 140 -1 0 0 0 1 0 0 0 -1 3001.dat +1 19 160 -32 140 -1 0 0 0 1 0 0 0 -1 3001.dat +1 25 80 -32 140 -1 0 0 0 1 0 0 0 -1 3001.dat +1 4 240 -32 100 -1 0 0 0 1 0 0 0 -1 3001.dat +1 85 160 -32 100 -1 0 0 0 1 0 0 0 -1 3001.dat +1 4 80 -32 100 -1 0 0 0 1 0 0 0 -1 3001.dat +1 288 240 -32 60 -1 0 0 0 1 0 0 0 -1 3001.dat +1 85 160 -32 60 -1 0 0 0 1 0 0 0 -1 3001.dat +1 288 80 -32 60 -1 0 0 0 1 0 0 0 -1 3001.dat +1 14 220 -56 160 -1 0 0 0 1 0 0 0 -1 3001.dat +1 14 220 -56 120 -1 0 0 0 1 0 0 0 -1 3001.dat +1 191 220 -80 160 -1 0 0 0 1 0 0 0 -1 3001.dat +1 191 220 -80 120 -1 0 0 0 1 0 0 0 -1 3001.dat +1 226 270 -80 140 0 0 1 0 1 0 -1 0 0 3004.dat +1 226 170 -80 140 0 0 1 0 1 0 -1 0 0 3004.dat +1 14 220 -104 150 -1 0 0 0 1 0 0 0 -1 3037.dat +1 14 220 -104 130 1 0 0 0 1 0 0 0 1 3037.dat +1 14 160 -56 140 -1 0 0 0 1 0 0 0 -1 3003.dat +1 226 220 -128 150 -1 0 0 0 1 0 0 0 -1 3004.dat +1 226 220 -128 130 -1 0 0 0 1 0 0 0 -1 3004.dat +1 14 230 -152 150 -1 0 0 0 1 0 0 0 -1 3005.dat +1 226 280 -56 150 -1 0 0 0 1 0 0 0 -1 3004.dat +1 226 300 -80 150 -1 0 0 0 1 0 0 0 -1 3004.dat +1 226 300 -104 150 -1 0 0 0 1 0 0 0 -1 3004.dat +1 226 280 -128 150 -1 0 0 0 1 0 0 0 -1 3010.dat +1 14 160 -104 140 -1 0 0 0 1 0 0 0 -1 3003.dat +1 14 140 -128 140 -1 0 0 0 1 0 0 0 -1 3003.dat +1 226 130 -152 140 0 0 1 0 1 0 -1 0 0 3004.dat +1 321 130 -176 140 0 0 1 0 1 0 -1 0 0 3004.dat +1 1 120 -200 140 -1 0 0 0 1 0 0 0 -1 3003.dat +1 1 100 -224 140 -1 0 0 0 1 0 0 0 -1 3003.dat +1 1 100 -248 140 -1 0 0 0 1 0 0 0 -1 3003.dat +1 1 120 -272 140 -1 0 0 0 1 0 0 0 -1 3003.dat +1 322 140 -296 140 -1 0 0 0 1 0 0 0 -1 3003.dat +1 322 150 -320 140 0 0 -1 0 1 0 1 0 0 3660b.dat +1 322 130 -320 140 0 0 1 0 1 0 -1 0 0 3660b.dat +1 1 140 -344 140 -1 0 0 0 1 0 0 0 -1 3001.dat +1 19 140 -352 140 -1 0 0 0 1 0 0 0 -1 3020.dat +1 322 140 -376 140 -1 0 0 0 1 0 0 0 -1 3001.dat +1 322 190 -400 140 0 0 -1 0 1 0 1 0 0 3660b.dat +1 322 90 -400 140 0 0 1 0 1 0 -1 0 0 3660b.dat +1 322 140 -400 140 -1 0 0 0 1 0 0 0 -1 3001.dat +1 1 180 -424 140 -1 0 0 0 1 0 0 0 -1 3001.dat +1 1 100 -424 140 -1 0 0 0 1 0 0 0 -1 3001.dat +1 19 200 -376 140 -1 0 0 0 1 0 0 0 -1 3022.dat +1 322 200 -368 140 -1 0 0 0 1 0 0 0 -1 3003.dat +1 322 210 -448 130 -1 0 0 0 1 0 0 0 -1 3045.dat +1 19 80 -376 140 -1 0 0 0 1 0 0 0 -1 3022.dat +1 322 80 -368 140 -1 0 0 0 1 0 0 0 -1 3003.dat +1 322 90 -448 130 -1 0 0 0 1 0 0 0 -1 3045.dat +1 0 140 -448 150 -1 0 0 0 1 0 0 0 -1 3004.dat +1 322 140 -448 130 -1 0 0 0 1 0 0 0 -1 3004.dat +1 1 140 -472 150 -1 0 0 0 1 0 0 0 -1 30414.dat +1 322 140 -472 130 -1 0 0 0 1 0 0 0 -1 3010.dat +1 15 140 -462 168 -1 0 0 0 0 -1 0 -1 0 3069b.dat +1 1 140 -496 150 -1 0 0 0 1 0 0 0 -1 30414.dat +1 322 140 -496 130 -1 0 0 0 1 0 0 0 -1 3010.dat +1 15 170 -486 168 -1 0 0 0 0 -1 0 -1 0 98138p07.dat +1 15 110 -486 168 -1 0 0 0 0 -1 0 -1 0 98138p07.dat +1 321 140 -486 168 -1 0 0 0 0 -1 0 -1 0 3023b.dat +1 1 160 -520 130 -1 0 0 0 1 0 0 0 -1 3039.dat +1 1 120 -520 130 -1 0 0 0 1 0 0 0 -1 3039.dat +1 0 140 -544 130 -1 0 0 0 1 0 0 0 -1 3004.dat diff --git a/brickwright/alt/alt-036/thumb-512.avif b/brickwright/alt/alt-036/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..ecb191d916ecc1e59584873e7a012ab95f3b2605 Binary files /dev/null and b/brickwright/alt/alt-036/thumb-512.avif differ diff --git a/brickwright/alt/alt-036/trace.jsonl.gz b/brickwright/alt/alt-036/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..f2840461192f6e6422f6296f4f6f16df4119e717 --- /dev/null +++ b/brickwright/alt/alt-036/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4f1457e53880f21fdffe343cb1c2b6b927579450f5af97340984301002e30f6 +size 6830 diff --git a/brickwright/alt/alt-036/view-0.avif b/brickwright/alt/alt-036/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..cfcc25dd4bb99f9b495e69162e46549687bb826b Binary files /dev/null and b/brickwright/alt/alt-036/view-0.avif differ diff --git a/brickwright/alt/alt-036/view-1.avif b/brickwright/alt/alt-036/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..8fd08824a15d653875d44a7592caf8a5b9c6819e Binary files /dev/null and b/brickwright/alt/alt-036/view-1.avif differ diff --git a/brickwright/alt/alt-036/view-2.avif b/brickwright/alt/alt-036/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..032511b15c364d154ffa61a46e9c164a44765d43 Binary files /dev/null and b/brickwright/alt/alt-036/view-2.avif differ diff --git a/brickwright/alt/alt-036/view-3.avif b/brickwright/alt/alt-036/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..a676bfcf2819f9b6c94becd515fe31ba1a325cec Binary files /dev/null and b/brickwright/alt/alt-036/view-3.avif differ diff --git a/brickwright/alt/alt-036/view-4.avif b/brickwright/alt/alt-036/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..6ef2e4e0d7a9a63596a8f94e7aff48f6a9d9cea0 Binary files /dev/null and b/brickwright/alt/alt-036/view-4.avif differ diff --git a/brickwright/alt/alt-036/view-5.avif b/brickwright/alt/alt-036/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..8f6aa88d0eed137e3a745303ec682e477ef5137c Binary files /dev/null and b/brickwright/alt/alt-036/view-5.avif differ diff --git a/brickwright/alt/alt-036/view-6.avif b/brickwright/alt/alt-036/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..4cce18c83226a7876ec8707d5f9a408c49b578fe Binary files /dev/null and b/brickwright/alt/alt-036/view-6.avif differ diff --git a/brickwright/alt/alt-036/view-7.avif b/brickwright/alt/alt-036/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..c986513d1d70ae070c7f30f4562cc95c8c6c4012 Binary files /dev/null and b/brickwright/alt/alt-036/view-7.avif differ diff --git a/brickwright/alt/alt-037/build.py b/brickwright/alt/alt-037/build.py new file mode 100644 index 0000000000000000000000000000000000000000..b30f48147c76c0cbddca932d21fa0dd840ccbb66 --- /dev/null +++ b/brickwright/alt/alt-037/build.py @@ -0,0 +1,87 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + C = bl.Color + def add(pid, color, x,y,z, rot=0, name=None): + return b.add(bl.Element(pid,color),(x,y,z),rotation=bl.Rotation(rot),name=name) + add('91405',C.BRIGHT_GREEN,0,0,0,name='meadow') + # A bonded rocky outcrop, carrying the two raised front feet. + for y in (2,4): add('3001',C.DARK_BLUISH_GRAY,6,y,1/3) + add('3001',C.DARK_BLUISH_GRAY,6,3,4/3) + for x in (6,8): + for y in (2,5): add('3004',C.DARK_BLUISH_GRAY,x,y,4/3) + for x in (4,10): + add('3676',C.DARK_BLUISH_GRAY,x,3,1/3, name='rock_flank_'+str(x)) + add('11212',C.DARK_BLUISH_GRAY,x-1 if x==4 else x,3,4/3) + # Hooves and slender pairs of legs. Rear feet remain on the meadow. + for x in (6,9): + add('3004',C.BLACK,x,4,7/3,1,name='front_hoof_'+str(x)) + add('3245c',C.LIGHT_BLUISH_GRAY,x,4,10/3,1) + add('3004',C.BLACK,x,9,1/3,1,name='rear_hoof_'+str(x)) + for z in (4/3,10/3): add('3245c',C.LIGHT_BLUISH_GRAY,x,9,z,1) + # Barrel, breast and shoulder, bonded across both pairs of legs. + for y in (4,6,8): add('3001',C.LIGHT_BLUISH_GRAY,6,y,16/3) + for x in (6,8): add('3004',C.LIGHT_BLUISH_GRAY,x,4,19/3) + for x in (6,7,8,9): add('3010',C.LIGHT_BLUISH_GRAY,x,5,19/3,1) + # Long hanging tail, tied to the rump by a cantilevered root brick. + add('3002',C.BLACK,7,9,19/3,1,name='tail_root') + for z in (7/3,10/3,13/3,16/3): add('30136',C.BLACK,7,11,z) + for x in (7,8): add('3040b',C.BLACK,x,10,4/3) + # Raised neck, long equine muzzle, paired ears and side-facing eyes. + for z in (16/3,19/3,22/3): add('3004',C.LIGHT_BLUISH_GRAY,7,3,z) + add('3245c',C.LIGHT_BLUISH_GRAY,7,4,22/3) + add('3004',C.LIGHT_BLUISH_GRAY,7,3,25/3) + add('3020',C.TAN,7,1,28/3,1) + add('3004',C.LIGHT_BLUISH_GRAY,7,3,29/3) + eye=add('47905',C.BLACK,7,4,29/3,1) + for x in (7,8): + e=bl.Element('98138p07',C.WHITE) + b.connect(e,'antistud',to=eye.find_connector('stud',facing=bl.Direction.RIGHT if x==7 else bl.Direction.LEFT),name='eye_'+str(x)) + add('3005',C.WHITE,x,3,32/3,name='ear_'+str(x)) + add('3040b',C.BLACK,x,1,29/3,name='muzzle_'+str(x)) + # Mane down the back of the neck. + for z in (22/3,25/3): add('3004',C.WHITE,7,5,z) + for x in (7,8): add('3005',C.WHITE,x,5,28/3) + # Two broad wings. Gray spars are covered with sculpted white feathers. + for x in (0,8): add('3034',C.LIGHT_BLUISH_GRAY,x,6,22/3,name='wing_spar_'+str(x)) + add('3004',C.LIGHT_BLUISH_GRAY,7,6,23/3,name='wing_bridge') + for side in (0,1): + # Mirrored placement of the curved primary feather banks. + xs = (0,2) if side==0 else (12,14) + for x in xs: add('6215',C.WHITE,x,6,23/3,1) + x=4 if side==0 else 10 + add('3660b',C.WHITE,x,6,23/3) + add('2877',C.WHITE,x,7,26/3) + add('3004',C.WHITE,x,6,26/3) + for fx in ((0,2) if side==0 else (12,14)): + add('60481a',C.WHITE,fx,7,26/3,3 if side==0 else 1) + add('2877',C.WHITE,2 if side==0 else 12,6,26/3) + # Smooth white coverts on each inner wing. + for x in (4,10): add('3069b',C.WHITE,x,6,29/3) + # Small flowers distinguish the meadow from the stone perch. + for x,y in ((3,11),(13,1),(12,13)): + leaf=add('4727',C.BRIGHT_GREEN,x,y,1/3) + flower=bl.Element('33291',C.DARK_PINK) + b.connect(flower,flower.find_connector('antistud'),to=leaf.find_connector('stud',facing=bl.Direction.UP)) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):v for k,v in used.items() if v>inventory.get(k[0],{}).get(k[1],0)} + tests.check('inventory limits',not excess,str(excess)) + tests.check('two spread wings',all('wing_spar_'+str(x) in b.names for x in (0,8)), 'Paired eight-stud spars extend to both sides') + tests.check('front hooves raised on rock',all(abs(b.named('front_hoof_'+str(x)).alignment_box[0].z-7/3)<0.001 for x in (6,9)), 'Front hooves stand two bricks above rear hooves') + tests.check('long hanging tail',sum(v for (pid,col),v in used.items() if pid=='30136' and col=='BLACK')==4,'Four-brick hanging tail behind rear legs') + return tests.report() diff --git a/brickwright/alt/alt-037/hero-1024.avif b/brickwright/alt/alt-037/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..6ec67b1cb68439a08a61dd5aaeeb0b1883f79ee0 Binary files /dev/null and b/brickwright/alt/alt-037/hero-1024.avif differ diff --git a/brickwright/alt/alt-037/model.mpd b/brickwright/alt/alt-037/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..4b0ef020683959026b623d7d660f0e1fb727c71a --- /dev/null +++ b/brickwright/alt/alt-037/model.mpd @@ -0,0 +1,83 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 72 160 -32 60 1 0 0 0 1 0 0 0 1 3001.dat +1 72 160 -32 100 1 0 0 0 1 0 0 0 1 3001.dat +1 72 160 -56 80 1 0 0 0 1 0 0 0 1 3001.dat +1 72 140 -56 50 1 0 0 0 1 0 0 0 1 3004.dat +1 72 140 -56 110 1 0 0 0 1 0 0 0 1 3004.dat +1 72 180 -56 50 1 0 0 0 1 0 0 0 1 3004.dat +1 72 180 -56 110 1 0 0 0 1 0 0 0 1 3004.dat +1 72 90 -32 90 1 0 0 0 1 0 0 0 1 3676.dat +1 72 90 -40 90 1 0 0 0 1 0 0 0 1 11212.dat +1 72 210 -32 90 1 0 0 0 1 0 0 0 1 3676.dat +1 72 230 -40 90 1 0 0 0 1 0 0 0 1 11212.dat +1 0 130 -80 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 130 -128 100 0 0 -1 0 1 0 1 0 0 3245c.dat +1 0 130 -32 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 130 -80 200 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 130 -128 200 0 0 -1 0 1 0 1 0 0 3245c.dat +1 0 190 -80 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 190 -128 100 0 0 -1 0 1 0 1 0 0 3245c.dat +1 0 190 -32 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 190 -80 200 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 190 -128 200 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 160 -152 100 1 0 0 0 1 0 0 0 1 3001.dat +1 71 160 -152 140 1 0 0 0 1 0 0 0 1 3001.dat +1 71 160 -152 180 1 0 0 0 1 0 0 0 1 3001.dat +1 71 140 -176 90 1 0 0 0 1 0 0 0 1 3004.dat +1 71 180 -176 90 1 0 0 0 1 0 0 0 1 3004.dat +1 71 130 -176 140 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 150 -176 140 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 170 -176 140 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 190 -176 140 0 0 -1 0 1 0 1 0 0 3010.dat +1 0 160 -176 210 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 160 -80 230 1 0 0 0 1 0 0 0 1 30136.dat +1 0 160 -104 230 1 0 0 0 1 0 0 0 1 30136.dat +1 0 160 -128 230 1 0 0 0 1 0 0 0 1 30136.dat +1 0 160 -152 230 1 0 0 0 1 0 0 0 1 30136.dat +1 0 150 -56 230 1 0 0 0 1 0 0 0 1 3040b.dat +1 0 170 -56 230 1 0 0 0 1 0 0 0 1 3040b.dat +1 71 160 -152 70 1 0 0 0 1 0 0 0 1 3004.dat +1 71 160 -176 70 1 0 0 0 1 0 0 0 1 3004.dat +1 71 160 -200 70 1 0 0 0 1 0 0 0 1 3004.dat +1 71 160 -224 90 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 160 -224 70 1 0 0 0 1 0 0 0 1 3004.dat +1 19 160 -232 60 0 0 -1 0 1 0 1 0 0 3020.dat +1 71 160 -256 70 1 0 0 0 1 0 0 0 1 3004.dat +1 0 150 -256 90 0 0 -1 0 1 0 1 0 0 47905.dat +1 15 132 -246 90 0 1 0 0 0 1 1 0 0 98138p07.dat +1 15 150 -280 70 1 0 0 0 1 0 0 0 1 3005.dat +1 0 150 -256 50 1 0 0 0 1 0 0 0 1 3040b.dat +1 15 168 -246 90 0 -1 0 0 0 -1 1 0 0 98138p07.dat +1 15 170 -280 70 1 0 0 0 1 0 0 0 1 3005.dat +1 0 170 -256 50 1 0 0 0 1 0 0 0 1 3040b.dat +1 15 160 -200 110 1 0 0 0 1 0 0 0 1 3004.dat +1 15 160 -224 110 1 0 0 0 1 0 0 0 1 3004.dat +1 15 150 -248 110 1 0 0 0 1 0 0 0 1 3005.dat +1 15 170 -248 110 1 0 0 0 1 0 0 0 1 3005.dat +1 71 80 -184 140 1 0 0 0 1 0 0 0 1 3034.dat +1 71 240 -184 140 1 0 0 0 1 0 0 0 1 3034.dat +1 71 160 -208 130 1 0 0 0 1 0 0 0 1 3004.dat +1 15 20 -208 140 0 0 -1 0 1 0 1 0 0 6215.dat +1 15 60 -208 140 0 0 -1 0 1 0 1 0 0 6215.dat +1 15 100 -208 150 1 0 0 0 1 0 0 0 1 3660b.dat +1 15 100 -232 150 1 0 0 0 1 0 0 0 1 2877.dat +1 15 100 -232 130 1 0 0 0 1 0 0 0 1 3004.dat +1 15 30 -256 150 0 0 1 0 1 0 -1 0 0 60481a.dat +1 15 70 -256 150 0 0 1 0 1 0 -1 0 0 60481a.dat +1 15 60 -232 130 1 0 0 0 1 0 0 0 1 2877.dat +1 15 260 -208 140 0 0 -1 0 1 0 1 0 0 6215.dat +1 15 300 -208 140 0 0 -1 0 1 0 1 0 0 6215.dat +1 15 220 -208 150 1 0 0 0 1 0 0 0 1 3660b.dat +1 15 220 -232 150 1 0 0 0 1 0 0 0 1 2877.dat +1 15 220 -232 130 1 0 0 0 1 0 0 0 1 3004.dat +1 15 250 -256 150 0 0 -1 0 1 0 1 0 0 60481a.dat +1 15 290 -256 150 0 0 -1 0 1 0 1 0 0 60481a.dat +1 15 260 -232 130 1 0 0 0 1 0 0 0 1 2877.dat +1 15 100 -240 130 1 0 0 0 1 0 0 0 1 3069b.dat +1 15 220 -240 130 1 0 0 0 1 0 0 0 1 3069b.dat +1 10 70 -32 230 1 0 0 0 1 0 0 0 1 4727.dat +1 5 70 -40 230 1 0 0 0 1 0 0 0 1 33291.dat +1 10 270 -32 30 1 0 0 0 1 0 0 0 1 4727.dat +1 5 270 -40 30 1 0 0 0 1 0 0 0 1 33291.dat +1 10 250 -32 270 1 0 0 0 1 0 0 0 1 4727.dat +1 5 250 -40 270 1 0 0 0 1 0 0 0 1 33291.dat diff --git a/brickwright/alt/alt-037/thumb-512.avif b/brickwright/alt/alt-037/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..0841ec73457587069069db14735d4ef4308aa544 Binary files /dev/null and b/brickwright/alt/alt-037/thumb-512.avif differ diff --git a/brickwright/alt/alt-037/trace.jsonl.gz b/brickwright/alt/alt-037/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..bb940684d87b0eca2d1ac5b9c317953260cc92d4 --- /dev/null +++ b/brickwright/alt/alt-037/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81877fa7587ce23e66ff928adc2c281ec5297d718ea24dbacaeb72e2748a72e3 +size 7070 diff --git a/brickwright/alt/alt-037/view-0.avif b/brickwright/alt/alt-037/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..a4f2d793a1d79aa3eea87eadef060a0c64533593 Binary files /dev/null and b/brickwright/alt/alt-037/view-0.avif differ diff --git a/brickwright/alt/alt-037/view-1.avif b/brickwright/alt/alt-037/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..44aa8b0505ee73773c1a1de1fe58e9486f111fd0 Binary files /dev/null and b/brickwright/alt/alt-037/view-1.avif differ diff --git a/brickwright/alt/alt-037/view-2.avif b/brickwright/alt/alt-037/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..064d3b4171199ec886dc87e3f7de569ae4f869db Binary files /dev/null and b/brickwright/alt/alt-037/view-2.avif differ diff --git a/brickwright/alt/alt-037/view-3.avif b/brickwright/alt/alt-037/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..b5ccde94d90c74cf9fa7371c18e165f743dd06cf Binary files /dev/null and b/brickwright/alt/alt-037/view-3.avif differ diff --git a/brickwright/alt/alt-037/view-4.avif b/brickwright/alt/alt-037/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..0d2f4225cac9825fdb1043323df498053d931a0f Binary files /dev/null and b/brickwright/alt/alt-037/view-4.avif differ diff --git a/brickwright/alt/alt-037/view-5.avif b/brickwright/alt/alt-037/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..311efd66323aca87863368c1aa0c667c17d66b4b Binary files /dev/null and b/brickwright/alt/alt-037/view-5.avif differ diff --git a/brickwright/alt/alt-037/view-6.avif b/brickwright/alt/alt-037/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..c76d73bca642d5649c33e2999d76f4e11e676a76 Binary files /dev/null and b/brickwright/alt/alt-037/view-6.avif differ diff --git a/brickwright/alt/alt-037/view-7.avif b/brickwright/alt/alt-037/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..57ad5dde5c9eb8787fc0681659dc31979d939db5 Binary files /dev/null and b/brickwright/alt/alt-037/view-7.avif differ diff --git a/brickwright/alt/alt-038/build.py b/brickwright/alt/alt-038/build.py new file mode 100644 index 0000000000000000000000000000000000000000..970c46c1e4afed82592e0dfcb0369a77fd916e3f --- /dev/null +++ b/brickwright/alt/alt-038/build.py @@ -0,0 +1,89 @@ +import json +import math +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + C=bl.Color + def put(pid,col,x,y,z,r=0,name=None): + return b.add(bl.Element(pid,col),(x,y,z),bl.Rotation(r),name=name) + put('91405',C.BRIGHT_GREEN,0,0,0,name='ground') + # Open wooden coffin, six studs long, four wide. Thin end walls. + put('3029',C.DARK_BLUISH_GRAY,1,4,1/3,name='grave_path') + put('3010',C.REDDISH_BROWN,2,4,2/3,name='coffin_front') + put('3010',C.REDDISH_BROWN,2,7,2/3,name='coffin_back') + put('15207',C.REDDISH_BROWN,1,4,2/3,1,name='coffin_end_a') + put('15207',C.REDDISH_BROWN,6,4,2/3,3,name='coffin_end_b') + # A transparent core raises the sheet above the open cavity. + put('3065',C.TRANS_CLEAR,3,5,2/3) + put('3065',C.TRANS_CLEAR,3,5,5/3) + for y in [5,6]: + put('3004',C.WHITE,3,y,8/3) + put('3004',C.WHITE,3,y,11/3) + # Billowing, rounded shoulders. + put('6215',C.WHITE,1,5,14/3,2) + put('6215',C.WHITE,4,5,14/3) + for x in [3,4]: + put('3005',C.WHITE,x,5,17/3) + put('3005',C.WHITE,x,6,17/3) + face=put('44728',C.WHITE,3,5,20/3,name='ghost_face') + for i,c in enumerate(face.find_connectors('stud',facing=bl.Direction.FRONT,toward=bl.Direction.UP,count=2)): + eye=bl.Element('98138p07',C.WHITE) + b.connect(eye,eye.find_connector('antistud'),to=c,name='eye_'+str(i)) + mouth=bl.Element('3069b',C.WHITE) + b.connect(mouth,mouth.find_connector('antistud',toward=bl.Direction.RIGHT),to=face.find_connector('stud',facing=bl.Direction.FRONT,toward=bl.Position(3.5,4,5.7)),target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90),name='smooth_sheet') + put('30367c',C.WHITE,3,5,7,name='ghost_crown') + # Broad stone marker, with an arched crown. + for z in [1/3,4/3,7/3]: + put('3010',C.LIGHT_BLUISH_GRAY,7,9,z) + put('3004',C.LIGHT_BLUISH_GRAY,11,9,z) + for x in [7,9,11]: + put('3245c',C.LIGHT_BLUISH_GRAY,x,9,10/3) + put('15254',C.LIGHT_BLUISH_GRAY,7,9,16/3,name='stone_arch') + # A locking hinge keeps the detached lid securely propped at an angle. + foot=put('92582',C.BLACK,9,5,2/3,1,name='lid_foot') + lid=bl.LegoBuild() + hinge=lid.add(bl.Element('60471',C.BLACK),(1,0,0)) + for x in [0,2]: + lid.add(bl.Element('3795',C.REDDISH_BROWN),(x,0,1/3),bl.Rotation.DEG_90) + for y in [0,5]: + lid.add(bl.Element('3010',C.REDDISH_BROWN),(0,y,2/3)) + b.connect(lid,hinge.find_connector('hinge_2_on'),to=foot.find_connector('hinge_2_in'),target_rotation=bl.rotation_about(bl.Vec3(1,0,0),math.degrees(math.acos(2.5/math.hypot(6.5,0.1))-math.atan2(0.1,6.5))),name='leaning_lid') + # The bare tree: bark-textured trunk and angular, leafless branches. + for z in [0,1,2,4,5]: + put('30136',C.DARK_ORANGE,13,12,1/3+z,name='trunk_'+str(z)) + put('3009',C.DARK_ORANGE,11,12,10/3,name='lower_branch') + put('3062b',C.DARK_ORANGE,11,12,13/3) + put('3062b',C.DARK_ORANGE,16,12,13/3) + put('3009',C.DARK_ORANGE,12,12,19/3,name='upper_branch') + put('30136',C.DARK_ORANGE,12,12,22/3) + put('30136',C.DARK_ORANGE,16,12,22/3) + put('3062b',C.DARK_ORANGE,12,12,25/3) + put('3062b',C.DARK_ORANGE,17,12,25/3) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + stock=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):n for k,n in used.items() if n>stock.get(k[0],{}).get(k[1],0)} + tests.check('inventory limits',not excess,str(excess)) + tests.check('two eyes',sum(1 for p in b.flattened_placements if p.content.ldraw_id=='98138p07')==2) + coffin=b.named('coffin_front').center + stone=b.named('stone_arch').center + tree=b.named('trunk_0').center + tests.check('tree opposite coffin across gravestone',coffin.x < stone.x < tree.x and coffin.y < stone.y < tree.y) + tests.check('ghost rises above open coffin',b.named('ghost_crown').center.z > b.named('coffin_front').center.z+4) + lid=b.named('leaning_lid') + lid_boards=[p for p in b.flattened_placements if p.content.ldraw_id=='3795'] + tests.check('lid leans against marker',all(abs(p.bounding_box[1].y-b.named('stone_arch').bounding_box[0].y)<0.01 for p in lid_boards)) + tests.check('coffin has open cavity',b.named('coffin_back').bounding_box[0].y-b.named('coffin_front').bounding_box[1].y>=2) + return tests.report() diff --git a/brickwright/alt/alt-038/hero-1024.avif b/brickwright/alt/alt-038/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..abe6f1207cfa2a93b3e80856bbcc48700c507c73 Binary files /dev/null and b/brickwright/alt/alt-038/hero-1024.avif differ diff --git a/brickwright/alt/alt-038/model.mpd b/brickwright/alt/alt-038/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..63e27b29d373fb2c2b5dab29b9d068c8d9a9c111 --- /dev/null +++ b/brickwright/alt/alt-038/model.mpd @@ -0,0 +1,59 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 72 140 -16 120 1 0 0 0 1 0 0 0 1 3029.dat +1 70 80 -40 90 1 0 0 0 1 0 0 0 1 3010.dat +1 70 80 -40 150 1 0 0 0 1 0 0 0 1 3010.dat +1 70 30 -40 120 0 0 -1 0 1 0 1 0 0 15207.dat +1 70 130 -40 120 0 0 1 0 1 0 -1 0 0 15207.dat +1 47 80 -40 110 1 0 0 0 1 0 0 0 1 3065.dat +1 47 80 -64 110 1 0 0 0 1 0 0 0 1 3065.dat +1 15 80 -88 110 1 0 0 0 1 0 0 0 1 3004.dat +1 15 80 -112 110 1 0 0 0 1 0 0 0 1 3004.dat +1 15 80 -88 130 1 0 0 0 1 0 0 0 1 3004.dat +1 15 80 -112 130 1 0 0 0 1 0 0 0 1 3004.dat +1 15 60 -136 120 -1 0 0 0 1 0 0 0 -1 6215.dat +1 15 100 -136 120 1 0 0 0 1 0 0 0 1 6215.dat +1 15 70 -160 110 1 0 0 0 1 0 0 0 1 3005.dat +1 15 70 -160 130 1 0 0 0 1 0 0 0 1 3005.dat +1 15 90 -160 110 1 0 0 0 1 0 0 0 1 3005.dat +1 15 90 -160 130 1 0 0 0 1 0 0 0 1 3005.dat +1 15 80 -168 110 1 0 0 0 1 0 0 0 1 44728.dat +1 15 70 -158 88 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 90 -158 88 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 80 -138 88 1 0 0 0 0 -1 0 1 0 3069b.dat +1 15 80 -192 120 1 0 0 0 1 0 0 0 1 30367c.dat +1 71 180 -32 190 1 0 0 0 1 0 0 0 1 3010.dat +1 71 240 -32 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 180 -56 190 1 0 0 0 1 0 0 0 1 3010.dat +1 71 240 -56 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 180 -80 190 1 0 0 0 1 0 0 0 1 3010.dat +1 71 240 -80 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 160 -128 190 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 200 -128 190 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 240 -128 190 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 200 -176 190 1 0 0 0 1 0 0 0 1 15254.dat +1 0 200 -24 120 0 0 -1 0 1 0 1 0 0 92582.dat +1 16 160 -36.778364 139.489667 1 0 0 0 0.398724 -0.917071 0 0.917071 0.398724 leaning_lid.ldr +1 484 280 -32 250 1 0 0 0 1 0 0 0 1 30136.dat +1 484 280 -56 250 1 0 0 0 1 0 0 0 1 30136.dat +1 484 280 -80 250 1 0 0 0 1 0 0 0 1 30136.dat +1 484 280 -128 250 1 0 0 0 1 0 0 0 1 30136.dat +1 484 280 -152 250 1 0 0 0 1 0 0 0 1 30136.dat +1 484 280 -104 250 1 0 0 0 1 0 0 0 1 3009.dat +1 484 230 -128 250 1 0 0 0 1 0 0 0 1 3062b.dat +1 484 330 -128 250 1 0 0 0 1 0 0 0 1 3062b.dat +1 484 300 -176 250 1 0 0 0 1 0 0 0 1 3009.dat +1 484 260 -200 250 1 0 0 0 1 0 0 0 1 30136.dat +1 484 340 -200 250 1 0 0 0 1 0 0 0 1 30136.dat +1 484 250 -224 250 1 0 0 0 1 0 0 0 1 3062b.dat +1 484 350 -224 250 1 0 0 0 1 0 0 0 1 3062b.dat +0 FILE leaning_lid.ldr +0 leaning_lid +0 Name: leaning_lid +1 0 40 -8 10 1 0 0 0 1 0 0 0 1 60471.dat +1 70 20 -16 60 0 0 -1 0 1 0 1 0 0 3795.dat +1 70 60 -16 60 0 0 -1 0 1 0 1 0 0 3795.dat +1 70 40 -40 10 1 0 0 0 1 0 0 0 1 3010.dat +1 70 40 -40 110 1 0 0 0 1 0 0 0 1 3010.dat diff --git a/brickwright/alt/alt-038/thumb-512.avif b/brickwright/alt/alt-038/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..aa439219a3a134b009237976cc9e7dbbf5117e36 Binary files /dev/null and b/brickwright/alt/alt-038/thumb-512.avif differ diff --git a/brickwright/alt/alt-038/trace.jsonl.gz b/brickwright/alt/alt-038/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..8343d56e3c4331a161e1e701c8447a7f648e197f --- /dev/null +++ b/brickwright/alt/alt-038/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d65426ce47f97a796d6e8122c1cc7339d7374dbeda92d2b5117e5403aead9010 +size 7495 diff --git a/brickwright/alt/alt-038/view-0.avif b/brickwright/alt/alt-038/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..b91b2f887a63fa6a5d5ca3e9bf2ecc7d5f5a2def Binary files /dev/null and b/brickwright/alt/alt-038/view-0.avif differ diff --git a/brickwright/alt/alt-038/view-1.avif b/brickwright/alt/alt-038/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..6ca75362dd68b5e0696f36f865c05ed4b7f809b4 Binary files /dev/null and b/brickwright/alt/alt-038/view-1.avif differ diff --git a/brickwright/alt/alt-038/view-2.avif b/brickwright/alt/alt-038/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..f819999ed88a4e8630728e236f905b1021685e0b Binary files /dev/null and b/brickwright/alt/alt-038/view-2.avif differ diff --git a/brickwright/alt/alt-038/view-3.avif b/brickwright/alt/alt-038/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..9678be5f0e269b01cbdf5230165946f9c00d540b Binary files /dev/null and b/brickwright/alt/alt-038/view-3.avif differ diff --git a/brickwright/alt/alt-038/view-4.avif b/brickwright/alt/alt-038/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..9730d0db3b6863bcf3ad0d68a5df6f511f071a36 Binary files /dev/null and b/brickwright/alt/alt-038/view-4.avif differ diff --git a/brickwright/alt/alt-038/view-5.avif b/brickwright/alt/alt-038/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..e31d9e4079b34b961b28ef051385fa02b2f699e3 Binary files /dev/null and b/brickwright/alt/alt-038/view-5.avif differ diff --git a/brickwright/alt/alt-038/view-6.avif b/brickwright/alt/alt-038/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..5c33c5fb53d07aef0a9ba51bf4bc2d9d33294d8f Binary files /dev/null and b/brickwright/alt/alt-038/view-6.avif differ diff --git a/brickwright/alt/alt-038/view-7.avif b/brickwright/alt/alt-038/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..cc8ebd9e66bd553162bd3939edf832b2e66bfa03 Binary files /dev/null and b/brickwright/alt/alt-038/view-7.avif differ diff --git a/brickwright/alt/alt-039/build.py b/brickwright/alt/alt-039/build.py new file mode 100644 index 0000000000000000000000000000000000000000..3e9cea1c2b6b9504b979624e8d41cb7fca7d7422 --- /dev/null +++ b/brickwright/alt/alt-039/build.py @@ -0,0 +1,97 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + C=bl.Color + def put(pid,col,x,y,z,name=None,rot=bl.Rotation.DEG_0): + return b.add(bl.Element(pid,col),(x,y,z),rotation=rot,name=name) + def eye(base, name): + e=bl.Element('98138p07',C.WHITE) + return b.connect(e,e.find_connector('antistud'),to=base.find_connector('stud',facing=bl.Direction.FRONT),name=name) + put('91405',C.BRIGHT_GREEN,0,0,0,'floor') + # A six-stud writing table with two substantial trestles. + for x in (2,7): + for z in (1/3,4/3): + put('3010',C.REDDISH_BROWN,x,4,z,rot=bl.Rotation.DEG_90) + for y in (4,6): + put('3004',C.LIGHT_BLUISH_GRAY,x,y,7/3,rot=bl.Rotation.DEG_90) + for y in (4,6): + put('3795',C.REDDISH_BROWN,2,y,10/3,'desktop_'+str(y)) + # Open volume: contrasting covers and two gently angled white page blocks. + put('3020',C.TAN,3,5,11/3,'book_cover') + put('3040b',C.WHITE,3,5,4,'page_left',bl.Rotation.DEG_90) + put('3040b',C.WHITE,5,5,4,'page_right',bl.Rotation.DEG_270) + # High backed chair and the wizard's seated legs. + put('3002',C.BLACK,3,10,1/3,'chair_base') + put('3002',C.BLACK,3,10,4/3) + put('3031',C.BLUE,3,9,7/3,'seat') + for z in (8/3,11/3,14/3): + put('30136',C.DARK_ORANGE,3,12,z) + put('30136',C.DARK_ORANGE,5,12,z) + for x in (3,5): + put('3003',C.BLUE,x,7,1/3,'boot_'+str(x)) + put('3039',C.BLUE,x,7,4/3) + put('3001',C.BLUE,3,9,8/3,'robe_lower') + put('3001',C.BLUE,3,9,11/3,'robe_upper') + # Beard slopes sweep from the chin down towards the desk. + for x in (4,5): + put('60481a',C.WHITE,x,7,11/3,'beard_'+str(x)) + # Arms reach out on either side of the white beard. + for x in (3,6): + put('3710',C.BLUE,x,7,14/3,rot=bl.Rotation.DEG_90) + put('3004',C.DARK_BLUE,x,8,5,rot=bl.Rotation.DEG_90) + put('3005',C.MEDIUM_NOUGAT,x,7,5,'hand_'+str(x)) + put('3003',C.DARK_TAN,4,9,14/3,'neck') + for x in (4,5): + face=put('47905',C.BLACK,x,9,17/3,'face_'+str(x)) + eye(face,'wizard_eye_'+str(x)) + put('3031',C.BLUE,3,8,20/3,'hat_brim') + put('3942c',C.BLUE,4,9,7,'pointed_hat') + # Open-front bookcase: warm wooden piers and two real shelves. + for x in (10,15): + for z in (1/3,4/3,7/3,11/3,14/3): + put('30136' if z==1/3 else '3004',C.DARK_ORANGE if z==1/3 else C.MEDIUM_NOUGAT,x,10,z,rot=bl.Rotation.DEG_90) + put('3034',C.LIGHT_BLUISH_GRAY,9,10,10/3,'middle_shelf') + put('3034',C.LIGHT_BLUISH_GRAY,9,10,17/3,'top_shelf') + # Upright, colored spines leave air around the books. + for x,col in [(11,C.DARK_RED),(12,C.DARK_GREEN),(13,C.DARK_BLUE)]: + for z in (1/3,4/3): + put('3004',col,x,10,z,rot=bl.Rotation.DEG_90) + for x,col in [(11,C.BRIGHT_LIGHT_YELLOW),(13,C.DARK_AZURE),(14,C.DARK_BLUE)]: + for z in (11/3,14/3): + put('3004',col,x,10,z,rot=bl.Rotation.DEG_90) + # Small wide-eyed owl atop the bookcase. + put('3022',C.TAN,11,10,6,'owl_feet') + put('3003',C.DARK_TAN,11,10,19/3,'owl_body') + for x in (10,13): + put('3040b',C.TAN,x,10,6,'owl_wing_'+str(x)) + for x in (11,12): + face=put('47905',C.BLACK,x,10,22/3,'owl_face_'+str(x)) + eye(face,'owl_eye_'+str(x)) + put('3022',C.TAN,11,10,25/3,'owl_crown') + # Orient the scene so its open fronts face the presentation camera. + presented=bl.LegoBuild() + turn=bl.Pose(bl.Rotation.DEG_180.matrix,bl.Position(16,16,0)) + for p in b.placements: + presented.add_raw(p.content,turn.compose(p.pose),name=b.name_of(p)) + return presented + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):v for k,v in used.items() if v>inventory.get(k[0],{}).get(k[1],0)} + tests.check('Inventory limits',not excess,str(excess)) + tests.check('Wizard has blue cone hat and white beard',b.named('pointed_hat').content.color==bl.Color.BLUE and all(b.named('beard_'+str(x)).content.color==bl.Color.WHITE for x in (4,5))) + tests.check('Open book has two pages',all('page_'+s in b.names for s in ('left','right'))) + tests.check('Owl above the bookcase',b.named('owl_body').bounding_box[0].z>=b.named('top_shelf').bounding_box[1].z) + return tests.report() diff --git a/brickwright/alt/alt-039/hero-1024.avif b/brickwright/alt/alt-039/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..963b80c2fd426338368d71c4fcf8209169f8fbe9 Binary files /dev/null and b/brickwright/alt/alt-039/hero-1024.avif differ diff --git a/brickwright/alt/alt-039/model.mpd b/brickwright/alt/alt-039/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..449398650d1570bd53310bc67600201d6050f5ab --- /dev/null +++ b/brickwright/alt/alt-039/model.mpd @@ -0,0 +1,77 @@ +1 10 160 -8 160 -1 0 0 0 1 0 0 0 -1 91405.dat +1 70 270 -32 200 0 0 1 0 1 0 -1 0 0 3010.dat +1 70 270 -56 200 0 0 1 0 1 0 -1 0 0 3010.dat +1 71 270 -80 220 0 0 1 0 1 0 -1 0 0 3004.dat +1 71 270 -80 180 0 0 1 0 1 0 -1 0 0 3004.dat +1 70 170 -32 200 0 0 1 0 1 0 -1 0 0 3010.dat +1 70 170 -56 200 0 0 1 0 1 0 -1 0 0 3010.dat +1 71 170 -80 220 0 0 1 0 1 0 -1 0 0 3004.dat +1 71 170 -80 180 0 0 1 0 1 0 -1 0 0 3004.dat +1 70 220 -88 220 -1 0 0 0 1 0 0 0 -1 3795.dat +1 70 220 -88 180 -1 0 0 0 1 0 0 0 -1 3795.dat +1 19 220 -96 200 -1 0 0 0 1 0 0 0 -1 3020.dat +1 15 250 -120 210 0 0 1 0 1 0 -1 0 0 3040b.dat +1 15 190 -120 210 0 0 -1 0 1 0 1 0 0 3040b.dat +1 0 230 -32 100 -1 0 0 0 1 0 0 0 -1 3002.dat +1 0 230 -56 100 -1 0 0 0 1 0 0 0 -1 3002.dat +1 1 220 -64 100 -1 0 0 0 1 0 0 0 -1 3031.dat +1 484 240 -88 70 -1 0 0 0 1 0 0 0 -1 30136.dat +1 484 200 -88 70 -1 0 0 0 1 0 0 0 -1 30136.dat +1 484 240 -112 70 -1 0 0 0 1 0 0 0 -1 30136.dat +1 484 200 -112 70 -1 0 0 0 1 0 0 0 -1 30136.dat +1 484 240 -136 70 -1 0 0 0 1 0 0 0 -1 30136.dat +1 484 200 -136 70 -1 0 0 0 1 0 0 0 -1 30136.dat +1 1 240 -32 160 -1 0 0 0 1 0 0 0 -1 3003.dat +1 1 240 -56 150 -1 0 0 0 1 0 0 0 -1 3039.dat +1 1 200 -32 160 -1 0 0 0 1 0 0 0 -1 3003.dat +1 1 200 -56 150 -1 0 0 0 1 0 0 0 -1 3039.dat +1 1 220 -88 120 -1 0 0 0 1 0 0 0 -1 3001.dat +1 1 220 -112 120 -1 0 0 0 1 0 0 0 -1 3001.dat +1 15 230 -136 150 -1 0 0 0 1 0 0 0 -1 60481a.dat +1 15 210 -136 150 -1 0 0 0 1 0 0 0 -1 60481a.dat +1 1 250 -120 140 0 0 1 0 1 0 -1 0 0 3710.dat +1 272 250 -144 140 0 0 1 0 1 0 -1 0 0 3004.dat +1 84 250 -144 170 -1 0 0 0 1 0 0 0 -1 3005.dat +1 1 190 -120 140 0 0 1 0 1 0 -1 0 0 3710.dat +1 272 190 -144 140 0 0 1 0 1 0 -1 0 0 3004.dat +1 84 190 -144 170 -1 0 0 0 1 0 0 0 -1 3005.dat +1 28 220 -136 120 -1 0 0 0 1 0 0 0 -1 3003.dat +1 0 230 -160 130 -1 0 0 0 1 0 0 0 -1 47905.dat +1 15 230 -150 148 -1 0 0 0 0 -1 0 -1 0 98138p07.dat +1 0 210 -160 130 -1 0 0 0 1 0 0 0 -1 47905.dat +1 15 210 -150 148 -1 0 0 0 0 -1 0 -1 0 98138p07.dat +1 1 220 -168 120 -1 0 0 0 1 0 0 0 -1 3031.dat +1 1 220 -216 120 -1 0 0 0 1 0 0 0 -1 3942c.dat +1 484 110 -32 100 0 0 1 0 1 0 -1 0 0 30136.dat +1 84 110 -56 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 84 110 -80 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 84 110 -112 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 84 110 -136 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 484 10 -32 100 0 0 1 0 1 0 -1 0 0 30136.dat +1 84 10 -56 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 84 10 -80 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 84 10 -112 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 84 10 -136 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 71 60 -88 100 -1 0 0 0 1 0 0 0 -1 3034.dat +1 71 60 -144 100 -1 0 0 0 1 0 0 0 -1 3034.dat +1 320 90 -32 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 320 90 -56 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 288 70 -32 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 288 70 -56 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 272 50 -32 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 272 50 -56 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 226 90 -112 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 226 90 -136 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 321 50 -112 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 321 50 -136 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 272 30 -112 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 272 30 -136 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 19 80 -152 100 -1 0 0 0 1 0 0 0 -1 3022.dat +1 28 80 -176 100 -1 0 0 0 1 0 0 0 -1 3003.dat +1 19 110 -168 90 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 19 50 -168 90 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 0 90 -200 110 -1 0 0 0 1 0 0 0 -1 47905.dat +1 15 90 -190 128 -1 0 0 0 0 -1 0 -1 0 98138p07.dat +1 0 70 -200 110 -1 0 0 0 1 0 0 0 -1 47905.dat +1 15 70 -190 128 -1 0 0 0 0 -1 0 -1 0 98138p07.dat +1 19 80 -208 100 -1 0 0 0 1 0 0 0 -1 3022.dat diff --git a/brickwright/alt/alt-039/thumb-512.avif b/brickwright/alt/alt-039/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..65b6eb354209d912fca64ebee6d5d3eabbd3d937 Binary files /dev/null and b/brickwright/alt/alt-039/thumb-512.avif differ diff --git a/brickwright/alt/alt-039/trace.jsonl.gz b/brickwright/alt/alt-039/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..0429c4500630f31f570d0100514508a0049195f1 --- /dev/null +++ b/brickwright/alt/alt-039/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff8f35115de212a0451bf083a2c842b76351fbc49423706b5c4a8063eb9100ea +size 6644 diff --git a/brickwright/alt/alt-039/view-0.avif b/brickwright/alt/alt-039/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..97cf2027fa71b02d9ee2a251b909b3184778ec1b Binary files /dev/null and b/brickwright/alt/alt-039/view-0.avif differ diff --git a/brickwright/alt/alt-039/view-1.avif b/brickwright/alt/alt-039/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..d60c86f3f8d463b270fdd3a20931990b9c8d3acc Binary files /dev/null and b/brickwright/alt/alt-039/view-1.avif differ diff --git a/brickwright/alt/alt-039/view-2.avif b/brickwright/alt/alt-039/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..2b5dc538be6eefab145c5db6d765d112fae5cbba Binary files /dev/null and b/brickwright/alt/alt-039/view-2.avif differ diff --git a/brickwright/alt/alt-039/view-3.avif b/brickwright/alt/alt-039/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..a9247a8957fe5ea1c2f753e2d6b76743af99849c Binary files /dev/null and b/brickwright/alt/alt-039/view-3.avif differ diff --git a/brickwright/alt/alt-039/view-4.avif b/brickwright/alt/alt-039/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..907c78054d8a51b8c52937b1a45bc42ea74fcf21 Binary files /dev/null and b/brickwright/alt/alt-039/view-4.avif differ diff --git a/brickwright/alt/alt-039/view-5.avif b/brickwright/alt/alt-039/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..babdf60abc939f7ed32d04b57e28ef819939f74b Binary files /dev/null and b/brickwright/alt/alt-039/view-5.avif differ diff --git a/brickwright/alt/alt-039/view-6.avif b/brickwright/alt/alt-039/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..c5a0697183bca92a319ab7c80686bf7df7f8576d Binary files /dev/null and b/brickwright/alt/alt-039/view-6.avif differ diff --git a/brickwright/alt/alt-039/view-7.avif b/brickwright/alt/alt-039/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..4cc67f15221e16fdc342da3312f82dbaf735d87e Binary files /dev/null and b/brickwright/alt/alt-039/view-7.avif differ diff --git a/brickwright/alt/alt-040/build.py b/brickwright/alt/alt-040/build.py new file mode 100644 index 0000000000000000000000000000000000000000..3a3a3b61e0104e807fbdba0c33db57fb7d3621e7 --- /dev/null +++ b/brickwright/alt/alt-040/build.py @@ -0,0 +1,75 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid, col, x, y, z, name=None, rot=bl.Rotation.DEG_0): + return b.add(bl.Element(pid, getattr(bl.Color, col)), (x,y,z), rotation=rot, name=name) + p=bl.PLATE + put('3028','BRIGHT_GREEN',0,0,0,'ground') + # Heavy boots, a flared purple skirt, and shoulders. + for y in (1,3): put('3002','BLACK',1,y,p) + for x in range(1,5): put('60481a','DARK_PURPLE',x,0,1+p) + for z in (1+p,2+p): put('3001','DARK_PURPLE',1,2,z) + put('3001','DARK_GREEN',1,1,3+p,'belt') + put('3001','DARK_PURPLE',1,1,4+p) + put('3003','DARK_PURPLE',2,1,5+p,'neck') + put('3003','DARK_PURPLE',5,1,4+p,'forearm') + put('3003','DARK_PURPLE',4,1,5+p,'upper_arm') + put('3023b','TAN',6,2,5+p,'wrist') + hand=put('4070','GREEN',7,2,5+2*p,'hand',bl.Rotation.DEG_90) + # Green face, projecting hooked nose, and printed eyes. + put('3001','LIME',1,1,6+p,'jaw') + for x in (1,4): + eye=put('4070','GREEN',x,1,7+p) + tile=bl.Element('98138p07',bl.Color.WHITE) + b.connect(tile, tile.find_connector('tube'), to=eye.find_connector('stud',facing=bl.Direction.FRONT),name='eye_'+str(x)) + for x in (2,3): put('3040b','GREEN',x,0,7+p) + for x in (1,3): put('3004','LIME',x,2,7+p) + # Oversized black brim and crooked tapering crown. + for y in (0,2): put('2456','BLACK',0,y,8+p,'brim_'+str(y)) + for z in (9+p,10+p): put('3002','BLACK',1,1,z) + for x in (1,2): put('3040b','BLACK',x,1,11+p) + put('3040b','BLACK',1,2,12+p,'hat_point') + # Fire supports the round pot, with extra tongues licking up its sides. + for x in (7,8): put('3004','ORANGE',x,1,p,rot=bl.Rotation.DEG_90) + for y in (1,2): put('3023b','ORANGE',7,y,1+p) + put('87081','BLACK',6,0,1+2*p,'cauldron') + for x,y,r in [(7,0,0),(7,3,0),(6,1,1),(9,1,1)]: + put('30136','BLACK',x,y,2+2*p,rot=bl.Rotation(r)) + put('3022','TAN',7,1,2+2*p) + put('3068b','LIME',7,1,3,'potion') + for x,y in [(7,0),(8,0),(10,2)]: + put('6141','TRANS_ORANGE',x,y,p) + put('59900','TRANS_ORANGE',x,y,2*p) + # A clip on the outstretched hand grips a long stirring rod. + clip=bl.Element('61252',bl.Color.LIGHT_BLUISH_GRAY) + grip=b.connect(clip,'antistud',to=hand.find_connector('stud',facing=bl.Direction.LEFT), + target_rotation=bl.rotation_about(bl.Vec3(0,1,0),90),name='grip') + rod=bl.Element('3957b',bl.Color.LIGHT_BLUISH_GRAY) + b.connect(rod,'bar',to=grip.find_connector('clip'), + target_rotation=bl.rotation_about(bl.Vec3(1,0,0),180), + mounting=bl.Mounting(offset=1.375), name='stirring_stick') + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((e.ldraw_id,e.color.name) for p in b.flattened_placements for e in [p.content]) + excess={str(k):n for k,n in used.items() if n>inventory.get(k[0],{}).get(k[1],0)} + tests.check('inventory limits',not excess,str(excess)) + tests.check('black pointed hat',b.named('hat_point').content.color==bl.Color.BLACK and b.named('hat_point').center.z>b.named('jaw').center.z+4) + tests.check('green potion above orange fire',b.named('potion').content.color==bl.Color.LIME and b.named('potion').center.z>b.named('cauldron').center.z) + tests.check('witch grips stirring stick',len(b.joints)>=4) + tip=b.named('stirring_stick').bounding_box[0] + lo,hi=b.named('potion').bounding_box + tests.check('stick reaches liquid inside cauldron',lo.xinventory.get(e.ldraw_id,{}).get(e.color.name,0): + excess.append((e.ldraw_id,e.color.name,n)) + tests.check('Inventory limits',not excess,str(excess)) + tests.check('Blue pointed hat',build.named('pointed_hat').content.ldraw_id=='3942c') + tests.check('Red nose',build.named('nose').content.color==bl.Color.RED) + tests.check('Both arms raised',all(build.named('hand_'+str(x)).center.z>build.named('torso').center.z+2 for x in (2,8))) + tests.check('Lid tipped back',build.named('open_lid').pose.rotation!=bl.Mat3.IDENTITY) + tests.check('Crank projects from side',build.named('crank_handle').center.x>12) + return tests.report() diff --git a/brickwright/alt/alt-041/hero-1024.avif b/brickwright/alt/alt-041/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..a42dd7a7f55c910f23222a7ba2944054e0607b76 Binary files /dev/null and b/brickwright/alt/alt-041/hero-1024.avif differ diff --git a/brickwright/alt/alt-041/model.mpd b/brickwright/alt/alt-041/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..470bcb03e4f88fa5af804379992a9caae31455c6 --- /dev/null +++ b/brickwright/alt/alt-041/model.mpd @@ -0,0 +1,83 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 120 -8 60 1 0 0 0 1 0 0 0 1 3028.dat +1 71 80 -8 140 1 0 0 0 1 0 0 0 1 3034.dat +1 322 200 -8 140 1 0 0 0 1 0 0 0 1 3020.dat +1 4 40 -32 20 1 0 0 0 1 0 0 0 1 3001.dat +1 4 120 -32 20 1 0 0 0 1 0 0 0 1 3001.dat +1 4 200 -32 20 1 0 0 0 1 0 0 0 1 3001.dat +1 4 40 -32 140 1 0 0 0 1 0 0 0 1 3001.dat +1 4 120 -32 140 1 0 0 0 1 0 0 0 1 3001.dat +1 4 200 -32 140 1 0 0 0 1 0 0 0 1 3001.dat +1 4 20 -32 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 220 -32 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 20 -56 40 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 20 -56 120 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 220 -56 40 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 220 -56 120 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 80 -56 20 1 0 0 0 1 0 0 0 1 3001.dat +1 1 160 -56 20 1 0 0 0 1 0 0 0 1 3001.dat +1 27 80 -56 140 1 0 0 0 1 0 0 0 1 3001.dat +1 27 160 -56 140 1 0 0 0 1 0 0 0 1 3001.dat +1 14 40 -80 20 1 0 0 0 1 0 0 0 1 3001.dat +1 14 120 -80 20 1 0 0 0 1 0 0 0 1 3001.dat +1 14 200 -80 20 1 0 0 0 1 0 0 0 1 3001.dat +1 14 40 -80 140 1 0 0 0 1 0 0 0 1 3001.dat +1 191 120 -80 140 1 0 0 0 1 0 0 0 1 3001.dat +1 191 200 -80 140 1 0 0 0 1 0 0 0 1 3001.dat +1 27 20 -80 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 27 220 -80 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 29 20 -104 40 0 0 -1 0 1 0 1 0 0 3001.dat +1 85 20 -104 120 0 0 -1 0 1 0 1 0 0 3001.dat +1 29 220 -104 40 0 0 -1 0 1 0 1 0 0 3001.dat +1 29 220 -104 120 0 0 -1 0 1 0 1 0 0 3001.dat +1 85 80 -104 20 1 0 0 0 1 0 0 0 1 3001.dat +1 29 160 -104 20 1 0 0 0 1 0 0 0 1 3001.dat +1 85 80 -104 140 1 0 0 0 1 0 0 0 1 3001.dat +1 85 160 -104 140 1 0 0 0 1 0 0 0 1 3001.dat +1 85 120 -32 80 1 0 0 0 1 0 0 0 1 3003.dat +1 85 120 -56 80 1 0 0 0 1 0 0 0 1 3941.dat +1 85 120 -80 80 1 0 0 0 1 0 0 0 1 3941.dat +1 85 120 -104 80 1 0 0 0 1 0 0 0 1 3941.dat +1 85 120 -128 80 1 0 0 0 1 0 0 0 1 3941.dat +1 85 120 -152 80 1 0 0 0 1 0 0 0 1 3003.dat +1 191 120 -176 60 1 0 0 0 1 0 0 0 1 3001.dat +1 10 120 -200 60 1 0 0 0 1 0 0 0 1 2456.dat +1 322 70 -224 60 0 0 1 0 1 0 -1 0 0 3660b.dat +1 322 60 -248 60 1 0 0 0 1 0 0 0 1 3003.dat +1 15 60 -272 60 1 0 0 0 1 0 0 0 1 30367c.dat +1 322 170 -224 60 0 0 -1 0 1 0 1 0 0 3660b.dat +1 322 180 -248 60 1 0 0 0 1 0 0 0 1 3003.dat +1 15 180 -272 60 1 0 0 0 1 0 0 0 1 30367c.dat +1 15 90 -224 50 1 0 0 0 1 0 0 0 1 3005.dat +1 15 130 -224 50 1 0 0 0 1 0 0 0 1 3005.dat +1 4 110 -224 50 1 0 0 0 1 0 0 0 1 47905.dat +1 4 110 -214 40 1 0 0 0 0 -1 0 1 0 54200.dat +1 0 90 -248 50 1 0 0 0 1 0 0 0 1 47905.dat +1 15 90 -238 32 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 4 110 -248 50 1 0 0 0 1 0 0 0 1 47905.dat +1 4 110 -238 32 1 0 0 0 0 -1 0 1 0 6141.dat +1 0 130 -248 50 1 0 0 0 1 0 0 0 1 47905.dat +1 15 130 -238 32 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 4 110 -238 24 1 0 0 0 0 -1 0 1 0 6141.dat +1 15 100 -272 60 1 0 0 0 1 0 0 0 1 6215.dat +1 1 100 -320 60 1 0 0 0 1 0 0 0 1 3942c.dat +1 0 120 -112 150 -1 0 0 0 1 0 0 0 -1 60471.dat +1 16 0 -95.814792 179.735495 1 0 0 0 0.34202 -0.939693 0 0.939693 0.34202 open_lid.ldr +1 0 230 -128 70 0 0 -1 0 1 0 1 0 0 47905.dat +1 70 264 -118 70 0 -1 0 0 0 -1 1 0 0 3062b.dat +1 25 272 -88 70 0 -1 0 1 0 0 0 0 1 3710.dat +1 484 296 -118 70 0 -1 0 1 0 0 0 0 1 3062b.dat +1 4 304 -118 70 0 -1 0 1 0 0 0 0 1 6141.dat +0 FILE open_lid.ldr +0 open_lid +0 Name: open_lid +1 0 120 -8 20 0 0 1 0 1 0 -1 0 0 92582.dat +1 72 120 0 40 1 0 0 0 1 0 0 0 1 3029.dat +1 14 60 0 120 1 0 0 0 1 0 0 0 1 3032.dat +1 1 160 0 120 1 0 0 0 1 0 0 0 1 3031.dat +1 322 220 0 120 0 0 -1 0 1 0 1 0 0 3020.dat +1 70 60 8 80 1 0 0 0 1 0 0 0 1 3795.dat +1 70 180 8 80 1 0 0 0 1 0 0 0 1 3795.dat +1 71 120 8 120 1 0 0 0 1 0 0 0 1 3034.dat diff --git a/brickwright/alt/alt-041/thumb-512.avif b/brickwright/alt/alt-041/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..68a10cc6e74fb969a5f4829672925ea7d52a0697 Binary files /dev/null and b/brickwright/alt/alt-041/thumb-512.avif differ diff --git a/brickwright/alt/alt-041/trace.jsonl.gz b/brickwright/alt/alt-041/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..584b5255b819a8cd93a4368cc27cb671917e061e --- /dev/null +++ b/brickwright/alt/alt-041/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecde6eb82855c583596957e80d37768d63de115e839f6b9a9e930c025e0d8fe7 +size 8299 diff --git a/brickwright/alt/alt-041/view-0.avif b/brickwright/alt/alt-041/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..5a984e712eeef3bf0620be65d238dd0a068781ab Binary files /dev/null and b/brickwright/alt/alt-041/view-0.avif differ diff --git a/brickwright/alt/alt-041/view-1.avif b/brickwright/alt/alt-041/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..dd257858ddcfb34e485e5a5ce264f7159a9383b5 Binary files /dev/null and b/brickwright/alt/alt-041/view-1.avif differ diff --git a/brickwright/alt/alt-041/view-2.avif b/brickwright/alt/alt-041/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..a0ad40a7b945a322385662b416509908f1b022ef Binary files /dev/null and b/brickwright/alt/alt-041/view-2.avif differ diff --git a/brickwright/alt/alt-041/view-3.avif b/brickwright/alt/alt-041/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..113f0bd0ae4b9a2e358ad2613631956fe6e2cd35 Binary files /dev/null and b/brickwright/alt/alt-041/view-3.avif differ diff --git a/brickwright/alt/alt-041/view-4.avif b/brickwright/alt/alt-041/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..4c426db3686406a9d5dca0501d3069810bcc66ad Binary files /dev/null and b/brickwright/alt/alt-041/view-4.avif differ diff --git a/brickwright/alt/alt-041/view-5.avif b/brickwright/alt/alt-041/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..be1212c8804b3dc40ac8955f795b853bac36c769 Binary files /dev/null and b/brickwright/alt/alt-041/view-5.avif differ diff --git a/brickwright/alt/alt-041/view-6.avif b/brickwright/alt/alt-041/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..f42df188fedc113248504fbaba256978d3b898f2 Binary files /dev/null and b/brickwright/alt/alt-041/view-6.avif differ diff --git a/brickwright/alt/alt-041/view-7.avif b/brickwright/alt/alt-041/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..07e2c7afe8665cffadc4c03457650cc360879174 Binary files /dev/null and b/brickwright/alt/alt-041/view-7.avif differ diff --git a/brickwright/alt/alt-042/build.py b/brickwright/alt/alt-042/build.py new file mode 100644 index 0000000000000000000000000000000000000000..a40b9da5df8a1a0493687103dc1f960073713426 --- /dev/null +++ b/brickwright/alt/alt-042/build.py @@ -0,0 +1,84 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + C = bl.Color + def put(pid, color, x, y, z, name=None, rot=bl.Rotation.DEG_0): + return b.add(bl.Element(pid, color), (x,y,z), rotation=rot, name=name) + # A broad silver cake board and a separate, smaller silver serving plate. + put('3029',C.DARK_BLUISH_GRAY,-2,2,0,'cake_board') + put('3034',C.LIGHT_BLUISH_GRAY,0,0,0,'board_front') + put('3034',C.LIGHT_BLUISH_GRAY,0,6,0,'board_back') + put('11212',C.DARK_BLUISH_GRAY,12,1,0,'slice_plate_right') + put('11212',C.DARK_BLUISH_GRAY,15,1,0,'slice_plate_left') + # Twelve two-stud squares form an octagonal cake. Three squares have + # been lifted out of the front-right quadrant onto the small plate. + main = [(4,0),(4,2),(6,2),(0,4),(2,4),(4,4),(6,4),(2,6),(4,6)] + cut = [(2,0),(0,2),(2,2)] + cells = main + [(x+13,y) for x,y in cut] + for i,(x,y) in enumerate(cells): + if i < 8: + put('3003',C.MEDIUM_NOUGAT,x,y,1/3,f'sponge_base_{i}') + else: + for dy in (0,1): + put('3004',C.MEDIUM_NOUGAT,x,y+dy,1/3,f'sponge_base_{i}_{dy}') + # Strawberry filling: long bricks bridge the smaller sponge blocks. + for i,(x,y,r) in enumerate([(2,4,bl.Rotation.DEG_90),(4,4,bl.Rotation.DEG_90),(4,2,bl.Rotation.DEG_0)]): + put('3001',C.BRIGHT_PINK,x,y,4/3,f'cake_filling_{i}',r) + for x in (0,6): + put('3003',C.BRIGHT_PINK,x,4,4/3) + put('3003',C.BRIGHT_PINK,4,0,4/3,'cake_filling_tip') + for i,(x,y) in enumerate(cut): + put('3003',C.BRIGHT_PINK,x+13,y,4/3,f'slice_filling_{i}') + # Pale vanilla sponge above the filling. + for i,(x,y) in enumerate([(0,4),(4,4),(0,5),(4,5),(2,6),(2,7)]): + put('3010',C.BRIGHT_LIGHT_YELLOW,x,y,7/3,f'upper_sponge_{i}') + for x in (15,16): + put('3010',C.BRIGHT_LIGHT_YELLOW,x,0,7/3,f'slice_upper_{x}',bl.Rotation.DEG_90) + put('3001',C.TAN,4,0,7/3,'front_upper_sponge',bl.Rotation.DEG_90) + for x,y in [(6,2),(6,3),(13,2),(13,3)]: + put('3004',C.TAN,x,y,7/3) + # White icing, rounded at the outer edges and flat along the cut faces. + for i,(x,y,r) in enumerate([(0,4,bl.Rotation.DEG_180),(5,4,bl.Rotation.DEG_0),(5,2,bl.Rotation.DEG_0),(13,2,bl.Rotation.DEG_180)]): + put('6215',C.WHITE,x,y,10/3,f'rounded_icing_{i}',r) + for i,(x,y) in enumerate([(2,7),(4,7),(15,0),(15,1)]): + put('2877',C.WHITE,x,y,10/3,f'piped_icing_{i}') + for x,y in [(2,6),(4,6),(3,4),(3,5)]: + put('3004',C.WHITE,x,y,10/3) + for x,y in [(4,2),(4,3),(16,2),(16,3)]: + put('3005',C.WHITE,x,y,10/3) + for x in (4,5): + put('3040b',C.WHITE,x,0,10/3) + # Three lavender candles with orange flame cones, each firmly studded in. + for i,(x,y) in enumerate([(2,5),(4,6),(6,3)]): + for j in range(2): + put('3005',C.MEDIUM_LAVENDER,x,y,13/3+j,f'candle_{i}_{j}') + put('6141',C.TRANS_ORANGE,x,y,19/3,f'flame_base_{i}') + put('59900',C.TRANS_ORANGE,x,y,20/3,f'flame_{i}') + # Little red sugar cherries, including one on the plated slice. + for i,(x,y) in enumerate([(1,4),(4,7),(15,2)]): + put('6141',C.RED,x,y,13/3,f'cherry_{i}') + return b + + +def run_tests(): + b = create_build() + tests = TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=2) + inventory = json.load(open('/inputs/parts.json')) + used = Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess = [(pid,col,n,inventory.get(pid,{}).get(col,0)) for (pid,col),n in used.items() if n > inventory.get(pid,{}).get(col,0)] + tests.check('Only supplied parts and quantities',not excess,str(excess)) + tests.check('Exactly three lit candles',sum(p.content.ldraw_id == '59900' for p in b.flattened_placements)==3) + tests.check('Pink filling on cake and separate slice',all(b.named(n).content.color == bl.Color.BRIGHT_PINK for n in ['cake_filling_tip','slice_filling_0','slice_filling_1','slice_filling_2'])) + # The front-right quarter is genuinely empty above the board. + obstructing = [p for p in b.flattened_placements if p.center.z > 1/3 and 0 < p.center.x < 4 and 0 < p.center.y < 4] + tests.check('Open quarter-wedge in cake',not obstructing) + tests.check('Matching slice beside the cake',b.named('slice_filling_0').center.x > b.named('cake_board').bounding_box[1].x) + return tests.report() diff --git a/brickwright/alt/alt-042/hero-1024.avif b/brickwright/alt/alt-042/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..0db6ea574ed7cadf45d2dffa86b5a2ba0c988449 Binary files /dev/null and b/brickwright/alt/alt-042/hero-1024.avif differ diff --git a/brickwright/alt/alt-042/model.mpd b/brickwright/alt/alt-042/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..f3589f8b5071c335d8144f5c03f0fd1227d1968d --- /dev/null +++ b/brickwright/alt/alt-042/model.mpd @@ -0,0 +1,76 @@ +1 72 80 -8 80 1 0 0 0 1 0 0 0 1 3029.dat +1 71 80 -8 20 1 0 0 0 1 0 0 0 1 3034.dat +1 71 80 -8 140 1 0 0 0 1 0 0 0 1 3034.dat +1 72 270 -8 50 1 0 0 0 1 0 0 0 1 11212.dat +1 72 330 -8 50 1 0 0 0 1 0 0 0 1 11212.dat +1 84 100 -32 20 1 0 0 0 1 0 0 0 1 3003.dat +1 84 100 -32 60 1 0 0 0 1 0 0 0 1 3003.dat +1 84 140 -32 60 1 0 0 0 1 0 0 0 1 3003.dat +1 84 20 -32 100 1 0 0 0 1 0 0 0 1 3003.dat +1 84 60 -32 100 1 0 0 0 1 0 0 0 1 3003.dat +1 84 100 -32 100 1 0 0 0 1 0 0 0 1 3003.dat +1 84 140 -32 100 1 0 0 0 1 0 0 0 1 3003.dat +1 84 60 -32 140 1 0 0 0 1 0 0 0 1 3003.dat +1 84 100 -32 130 1 0 0 0 1 0 0 0 1 3004.dat +1 84 100 -32 150 1 0 0 0 1 0 0 0 1 3004.dat +1 84 320 -32 10 1 0 0 0 1 0 0 0 1 3004.dat +1 84 320 -32 30 1 0 0 0 1 0 0 0 1 3004.dat +1 84 280 -32 50 1 0 0 0 1 0 0 0 1 3004.dat +1 84 280 -32 70 1 0 0 0 1 0 0 0 1 3004.dat +1 84 320 -32 50 1 0 0 0 1 0 0 0 1 3004.dat +1 84 320 -32 70 1 0 0 0 1 0 0 0 1 3004.dat +1 29 60 -56 120 0 0 -1 0 1 0 1 0 0 3001.dat +1 29 100 -56 120 0 0 -1 0 1 0 1 0 0 3001.dat +1 29 120 -56 60 1 0 0 0 1 0 0 0 1 3001.dat +1 29 20 -56 100 1 0 0 0 1 0 0 0 1 3003.dat +1 29 140 -56 100 1 0 0 0 1 0 0 0 1 3003.dat +1 29 100 -56 20 1 0 0 0 1 0 0 0 1 3003.dat +1 29 320 -56 20 1 0 0 0 1 0 0 0 1 3003.dat +1 29 280 -56 60 1 0 0 0 1 0 0 0 1 3003.dat +1 29 320 -56 60 1 0 0 0 1 0 0 0 1 3003.dat +1 226 40 -80 90 1 0 0 0 1 0 0 0 1 3010.dat +1 226 120 -80 90 1 0 0 0 1 0 0 0 1 3010.dat +1 226 40 -80 110 1 0 0 0 1 0 0 0 1 3010.dat +1 226 120 -80 110 1 0 0 0 1 0 0 0 1 3010.dat +1 226 80 -80 130 1 0 0 0 1 0 0 0 1 3010.dat +1 226 80 -80 150 1 0 0 0 1 0 0 0 1 3010.dat +1 226 310 -80 40 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 330 -80 40 0 0 -1 0 1 0 1 0 0 3010.dat +1 19 100 -80 40 0 0 -1 0 1 0 1 0 0 3001.dat +1 19 140 -80 50 1 0 0 0 1 0 0 0 1 3004.dat +1 19 140 -80 70 1 0 0 0 1 0 0 0 1 3004.dat +1 19 280 -80 50 1 0 0 0 1 0 0 0 1 3004.dat +1 19 280 -80 70 1 0 0 0 1 0 0 0 1 3004.dat +1 15 40 -104 100 -1 0 0 0 1 0 0 0 -1 6215.dat +1 15 120 -104 100 1 0 0 0 1 0 0 0 1 6215.dat +1 15 120 -104 60 1 0 0 0 1 0 0 0 1 6215.dat +1 15 300 -104 60 -1 0 0 0 1 0 0 0 -1 6215.dat +1 15 60 -104 150 1 0 0 0 1 0 0 0 1 2877.dat +1 15 100 -104 150 1 0 0 0 1 0 0 0 1 2877.dat +1 15 320 -104 10 1 0 0 0 1 0 0 0 1 2877.dat +1 15 320 -104 30 1 0 0 0 1 0 0 0 1 2877.dat +1 15 60 -104 130 1 0 0 0 1 0 0 0 1 3004.dat +1 15 100 -104 130 1 0 0 0 1 0 0 0 1 3004.dat +1 15 80 -104 90 1 0 0 0 1 0 0 0 1 3004.dat +1 15 80 -104 110 1 0 0 0 1 0 0 0 1 3004.dat +1 15 90 -104 50 1 0 0 0 1 0 0 0 1 3005.dat +1 15 90 -104 70 1 0 0 0 1 0 0 0 1 3005.dat +1 15 330 -104 50 1 0 0 0 1 0 0 0 1 3005.dat +1 15 330 -104 70 1 0 0 0 1 0 0 0 1 3005.dat +1 15 90 -104 30 1 0 0 0 1 0 0 0 1 3040b.dat +1 15 110 -104 30 1 0 0 0 1 0 0 0 1 3040b.dat +1 30 50 -128 110 1 0 0 0 1 0 0 0 1 3005.dat +1 30 50 -152 110 1 0 0 0 1 0 0 0 1 3005.dat +1 57 50 -160 110 1 0 0 0 1 0 0 0 1 6141.dat +1 57 50 -184 110 1 0 0 0 1 0 0 0 1 59900.dat +1 30 90 -128 130 1 0 0 0 1 0 0 0 1 3005.dat +1 30 90 -152 130 1 0 0 0 1 0 0 0 1 3005.dat +1 57 90 -160 130 1 0 0 0 1 0 0 0 1 6141.dat +1 57 90 -184 130 1 0 0 0 1 0 0 0 1 59900.dat +1 30 130 -128 70 1 0 0 0 1 0 0 0 1 3005.dat +1 30 130 -152 70 1 0 0 0 1 0 0 0 1 3005.dat +1 57 130 -160 70 1 0 0 0 1 0 0 0 1 6141.dat +1 57 130 -184 70 1 0 0 0 1 0 0 0 1 59900.dat +1 4 30 -112 90 1 0 0 0 1 0 0 0 1 6141.dat +1 4 90 -112 150 1 0 0 0 1 0 0 0 1 6141.dat +1 4 310 -112 50 1 0 0 0 1 0 0 0 1 6141.dat diff --git a/brickwright/alt/alt-042/thumb-512.avif b/brickwright/alt/alt-042/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..a124ade9745d44803d5395e88dc1462dc8fd37c3 Binary files /dev/null and b/brickwright/alt/alt-042/thumb-512.avif differ diff --git a/brickwright/alt/alt-042/trace.jsonl.gz b/brickwright/alt/alt-042/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..b54e563a4f01ba6d7a48de3ef74d337641ed6734 --- /dev/null +++ b/brickwright/alt/alt-042/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afafc50391964d1ba9da85a921ec3e1b449f257895489d9ed0a4ccde63198503 +size 6404 diff --git a/brickwright/alt/alt-042/view-0.avif b/brickwright/alt/alt-042/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..878599b9d72eb8314348eb186f97c3d3c14e03ef Binary files /dev/null and b/brickwright/alt/alt-042/view-0.avif differ diff --git a/brickwright/alt/alt-042/view-1.avif b/brickwright/alt/alt-042/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..5eb3db966bd3fe0fb7c445be77e447704f5c6a7e Binary files /dev/null and b/brickwright/alt/alt-042/view-1.avif differ diff --git a/brickwright/alt/alt-042/view-2.avif b/brickwright/alt/alt-042/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..b8a0bc2567ec9290a0a77e2a4808791c7e48a2bf Binary files /dev/null and b/brickwright/alt/alt-042/view-2.avif differ diff --git a/brickwright/alt/alt-042/view-3.avif b/brickwright/alt/alt-042/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..64548fd2546f3d2bea80444585ef3f7480426621 Binary files /dev/null and b/brickwright/alt/alt-042/view-3.avif differ diff --git a/brickwright/alt/alt-042/view-4.avif b/brickwright/alt/alt-042/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..24480c17db09d3c4ab90dfe5b88e1b2fa3487f79 Binary files /dev/null and b/brickwright/alt/alt-042/view-4.avif differ diff --git a/brickwright/alt/alt-042/view-5.avif b/brickwright/alt/alt-042/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..561cab8d482240af56e680b776a19619afc6adbd Binary files /dev/null and b/brickwright/alt/alt-042/view-5.avif differ diff --git a/brickwright/alt/alt-042/view-6.avif b/brickwright/alt/alt-042/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..fc0303ed53ed5228f3ba70d5648ba64fe99fb073 Binary files /dev/null and b/brickwright/alt/alt-042/view-6.avif differ diff --git a/brickwright/alt/alt-042/view-7.avif b/brickwright/alt/alt-042/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..020b92328074b4f1be829ab2d9c517a3143e9caf Binary files /dev/null and b/brickwright/alt/alt-042/view-7.avif differ diff --git a/brickwright/alt/alt-043/build.py b/brickwright/alt/alt-043/build.py new file mode 100644 index 0000000000000000000000000000000000000000..664bddfd300e92260632ea193d08dabe60cf392c --- /dev/null +++ b/brickwright/alt/alt-043/build.py @@ -0,0 +1,93 @@ +import bricklayer as bl +from brickwright import TestContext +import json + + +def create_build(): + b=bl.LegoBuild() + def put(pid,col,x,y,z,name=None,rot=bl.Rotation.DEG_0): + return b.add(bl.Element(pid,getattr(bl.Color,col)),(x,y,z),rotation=rot,name=name) + put('3029','DARK_BLUISH_GRAY',2,0,0,'wide_base') + for x in (0,8): put('3034','LIGHT_BLUISH_GRAY',x,1,1/3) + # Gray pedestal and open meridian cradle. + put('3001','DARK_BLUISH_GRAY',2,1,2/3) + for y in (1,2): put('3004','LIGHT_BLUISH_GRAY',3,y,5/3) + hinge=put('92582','BLACK',3,1,8/3,'locking_pivot') + for x in (0,9): + put('3004','LIGHT_BLUISH_GRAY',x,1,2/3,rot=bl.Rotation.DEG_90) + for z in (5/3,11/3,17/3): + put('3245c','LIGHT_BLUISH_GRAY',x,1,z,rot=bl.Rotation.DEG_90) + put('3245c','LIGHT_BLUISH_GRAY',x,1,23/3,rot=bl.Rotation.DEG_90) + # Each upper arm turns inward over the globe. + put('3010','LIGHT_BLUISH_GRAY',0,1,29/3) + put('3010','LIGHT_BLUISH_GRAY',6,1,29/3) + put('2431','LIGHT_BLUISH_GRAY',0,1,32/3) + put('2431','LIGHT_BLUISH_GRAY',6,1,32/3) + # The entire ocean-and-continent sphere is carried by a locking hinge. + g=bl.LegoBuild() + def gp(pid,col,x,y,z,rot=bl.Rotation.DEG_0): + return g.add(bl.Element(pid,getattr(bl.Color,col)),(x,y+(0 if pid=='60471' else 1),z),rotation=rot) + gp('60471','BLACK',-1,0,0) + gp('3003','BLUE',-1,-1,1/3) + for x in (-2,0): + gp('3660b','MEDIUM_AZURE',x,-2,4/3) + gp('3660b','MEDIUM_AZURE',x,0,4/3,bl.Rotation.DEG_180) + # Equatorial belt, with irregular green land in the blue sea. + gp('3001','BLUE',-2,-2,7/3) + gp('3001','GREEN',-2,0,7/3) + for y in (-2,0): + gp('3004','DARK_AZURE',-3,y,7/3,bl.Rotation.DEG_90) + gp('3004','DARK_GREEN',2,y,7/3,bl.Rotation.DEG_90) + for x,c in [(-2,'DARK_AZURE'),(0,'BRIGHT_GREEN')]: gp('3004',c,x,-3,7/3) + for x,c in [(-2,'DARK_GREEN'),(0,'DARK_AZURE')]: gp('3004',c,x,2,7/3) + # Sloping, chamfered upper hemisphere. + for x,y,r in [(-3,-3,0),(1,-3,90),(1,1,180),(-3,1,270)]: + gp('3045','MEDIUM_AZURE',x,y,10/3,bl.Rotation(r//90)) + gp('3039','GREEN',-1,-3,10/3) + gp('3039','BLUE',-1,1,10/3,bl.Rotation.DEG_180) + gp('3039','BLUE',-3,-1,10/3,bl.Rotation.DEG_270) + gp('3039','GREEN',1,-1,10/3,bl.Rotation.DEG_90) + gp('3003','BLUE',-1,-1,10/3) + for x in (-2,0): + gp('3039','BLUE',x,-2,13/3) + gp('3039','GREEN',x,0,13/3,bl.Rotation.DEG_180) + b.connect(g,g.find_connector('hinge_2_on'),to=hinge.find_connector('hinge_2_in'),mounting=bl.Mounting(angle=112.5),name='tilted_globe') + # Three distinct books: dark binding, green binding, red binding. + z=2/3 + for y in (0,2): put('2456','BLACK',10,y,z,'bottom_book' if y==0 else None) + for x in (10,12): put('3022','TAN',x,1,z+1) + for y in (1,2): put('3023b','TAN',14,y,z+1) + for y in (0,2): put('3795','REDDISH_BROWN',10,y,z+4/3) + z+=5/3 + put('3031','BRIGHT_GREEN',11,0,z,'middle_book') + for x in (11,13): put('3004','WHITE',x,0,z+1/3) + put('3001','TAN',11,1,z+1/3) + for x in (11,13): put('3021','GREEN',x,0,z+4/3,rot=bl.Rotation.DEG_90) + z+=5/3 + for y in (0,2): put('3001','RED',11,y,z) + for y in (0,2): put('3020','TAN',11,y,z+1) + for y in (0,2): put('3001','RED',11,y,z+4/3,'red_top_cover' if y==0 else None) + return b + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used={} + for e,n in b.list_elements().items(): + used[(e.ldraw_id,e.color.name)]=n + excess=[(p,c,n,inventory.get(p,{}).get(c,0)) for (p,c),n in used.items() if n>inventory.get(p,{}).get(c,0)] + t.check('inventory limits',not excess,str(excess)) + book_z=[b.named(k).alignment_box[0].z for k in ('bottom_book','middle_book','red_top_cover')] + t.check('three books',book_z[0]=10 and greens>=6,f'{blues} blue and {greens} green elements') + t.check('tilted sphere',abs(b.named('tilted_globe').pose.rotation.entries[2][0])>0.1 or abs(b.named('tilted_globe').pose.rotation.entries[2][1])>0.1) + t.check('wide stable base',b.named('wide_base').alignment_width==12) + return t.report() diff --git a/brickwright/alt/alt-043/hero-1024.avif b/brickwright/alt/alt-043/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..0ce372cba2831f3f5bb891a4bde9902801b57380 Binary files /dev/null and b/brickwright/alt/alt-043/hero-1024.avif differ diff --git a/brickwright/alt/alt-043/model.mpd b/brickwright/alt/alt-043/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..f8678214af64187d2e56285274678188551bfc82 --- /dev/null +++ b/brickwright/alt/alt-043/model.mpd @@ -0,0 +1,77 @@ +0 FILE main.ldr +0 main +0 Name: main +1 72 160 -8 40 1 0 0 0 1 0 0 0 1 3029.dat +1 71 80 -16 40 1 0 0 0 1 0 0 0 1 3034.dat +1 71 240 -16 40 1 0 0 0 1 0 0 0 1 3034.dat +1 72 80 -40 40 1 0 0 0 1 0 0 0 1 3001.dat +1 71 80 -64 30 1 0 0 0 1 0 0 0 1 3004.dat +1 71 80 -64 50 1 0 0 0 1 0 0 0 1 3004.dat +1 0 80 -72 40 1 0 0 0 1 0 0 0 1 92582.dat +1 71 10 -40 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 10 -88 40 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 10 -136 40 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 10 -184 40 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 10 -232 40 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 190 -40 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 190 -88 40 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 190 -136 40 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 190 -184 40 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 190 -232 40 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 40 -256 30 1 0 0 0 1 0 0 0 1 3010.dat +1 71 160 -256 30 1 0 0 0 1 0 0 0 1 3010.dat +1 71 40 -264 30 1 0 0 0 1 0 0 0 1 2431.dat +1 71 160 -264 30 1 0 0 0 1 0 0 0 1 2431.dat +1 16 78.465104 -76.283557 40 0 -0.382683 -0.92388 0 0.92388 -0.382683 1 0 0 tilted_globe.ldr +1 0 260 -40 20 1 0 0 0 1 0 0 0 1 2456.dat +1 0 260 -40 60 1 0 0 0 1 0 0 0 1 2456.dat +1 19 220 -48 40 1 0 0 0 1 0 0 0 1 3022.dat +1 19 260 -48 40 1 0 0 0 1 0 0 0 1 3022.dat +1 19 300 -48 30 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 300 -48 50 1 0 0 0 1 0 0 0 1 3023b.dat +1 70 260 -56 20 1 0 0 0 1 0 0 0 1 3795.dat +1 70 260 -56 60 1 0 0 0 1 0 0 0 1 3795.dat +1 10 260 -64 40 1 0 0 0 1 0 0 0 1 3031.dat +1 15 240 -88 10 1 0 0 0 1 0 0 0 1 3004.dat +1 15 280 -88 10 1 0 0 0 1 0 0 0 1 3004.dat +1 19 260 -88 40 1 0 0 0 1 0 0 0 1 3001.dat +1 2 240 -96 30 0 0 -1 0 1 0 1 0 0 3021.dat +1 2 280 -96 30 0 0 -1 0 1 0 1 0 0 3021.dat +1 4 260 -120 20 1 0 0 0 1 0 0 0 1 3001.dat +1 4 260 -120 60 1 0 0 0 1 0 0 0 1 3001.dat +1 19 260 -128 20 1 0 0 0 1 0 0 0 1 3020.dat +1 19 260 -128 60 1 0 0 0 1 0 0 0 1 3020.dat +1 4 260 -152 20 1 0 0 0 1 0 0 0 1 3001.dat +1 4 260 -152 60 1 0 0 0 1 0 0 0 1 3001.dat +0 FILE tilted_globe.ldr +0 tilted_globe +0 Name: tilted_globe +1 0 0 -8 10 1 0 0 0 1 0 0 0 1 60471.dat +1 1 0 -32 20 1 0 0 0 1 0 0 0 1 3003.dat +1 322 -20 -56 10 1 0 0 0 1 0 0 0 1 3660b.dat +1 322 -20 -56 30 -1 0 0 0 1 0 0 0 -1 3660b.dat +1 322 20 -56 10 1 0 0 0 1 0 0 0 1 3660b.dat +1 322 20 -56 30 -1 0 0 0 1 0 0 0 -1 3660b.dat +1 1 0 -80 0 1 0 0 0 1 0 0 0 1 3001.dat +1 2 0 -80 40 1 0 0 0 1 0 0 0 1 3001.dat +1 321 -50 -80 0 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 50 -80 0 0 0 -1 0 1 0 1 0 0 3004.dat +1 321 -50 -80 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 50 -80 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 321 -20 -80 -30 1 0 0 0 1 0 0 0 1 3004.dat +1 10 20 -80 -30 1 0 0 0 1 0 0 0 1 3004.dat +1 288 -20 -80 70 1 0 0 0 1 0 0 0 1 3004.dat +1 321 20 -80 70 1 0 0 0 1 0 0 0 1 3004.dat +1 322 -50 -104 -10 1 0 0 0 1 0 0 0 1 3045.dat +1 322 30 -104 -30 0 0 -1 0 1 0 1 0 0 3045.dat +1 322 50 -104 50 -1 0 0 0 1 0 0 0 -1 3045.dat +1 322 -30 -104 70 0 0 1 0 1 0 -1 0 0 3045.dat +1 2 0 -104 -10 1 0 0 0 1 0 0 0 1 3039.dat +1 1 0 -104 50 -1 0 0 0 1 0 0 0 -1 3039.dat +1 1 -30 -104 20 0 0 1 0 1 0 -1 0 0 3039.dat +1 2 30 -104 20 0 0 -1 0 1 0 1 0 0 3039.dat +1 1 0 -104 20 1 0 0 0 1 0 0 0 1 3003.dat +1 1 -20 -128 10 1 0 0 0 1 0 0 0 1 3039.dat +1 2 -20 -128 30 -1 0 0 0 1 0 0 0 -1 3039.dat +1 1 20 -128 10 1 0 0 0 1 0 0 0 1 3039.dat +1 2 20 -128 30 -1 0 0 0 1 0 0 0 -1 3039.dat diff --git a/brickwright/alt/alt-043/thumb-512.avif b/brickwright/alt/alt-043/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..885557c07bf919d71d9e1674bafa75987b0facb4 Binary files /dev/null and b/brickwright/alt/alt-043/thumb-512.avif differ diff --git a/brickwright/alt/alt-043/trace.jsonl.gz b/brickwright/alt/alt-043/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..14235f25a3b6b1ee973c3e3d0a57f8d9a26a495c --- /dev/null +++ b/brickwright/alt/alt-043/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e852282366644ad0476a0b4bcc0a398d4215eeb32b8a1ae4886df17098da962 +size 6747 diff --git a/brickwright/alt/alt-043/view-0.avif b/brickwright/alt/alt-043/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..3a7c57d05c1e3ebd951acd0e238015f53c80c9eb Binary files /dev/null and b/brickwright/alt/alt-043/view-0.avif differ diff --git a/brickwright/alt/alt-043/view-1.avif b/brickwright/alt/alt-043/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..c9c19a8fceca7a01eacba0d3f85146fa7ca20da4 Binary files /dev/null and b/brickwright/alt/alt-043/view-1.avif differ diff --git a/brickwright/alt/alt-043/view-2.avif b/brickwright/alt/alt-043/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..67daa1139c1ff18d8ff6dd319f6e519c450e28d7 Binary files /dev/null and b/brickwright/alt/alt-043/view-2.avif differ diff --git a/brickwright/alt/alt-043/view-3.avif b/brickwright/alt/alt-043/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..2a0c710b5f4a48ca060e63475e08d75409ab5d34 Binary files /dev/null and b/brickwright/alt/alt-043/view-3.avif differ diff --git a/brickwright/alt/alt-043/view-4.avif b/brickwright/alt/alt-043/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..c037adc95c903333bcf31b3ac2af112fe422093a Binary files /dev/null and b/brickwright/alt/alt-043/view-4.avif differ diff --git a/brickwright/alt/alt-043/view-5.avif b/brickwright/alt/alt-043/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..f1139bca3b151b60f8e83a46c5def010691a44ca Binary files /dev/null and b/brickwright/alt/alt-043/view-5.avif differ diff --git a/brickwright/alt/alt-043/view-6.avif b/brickwright/alt/alt-043/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..83b003402dd610630948a6145bf3ff834342e3ed Binary files /dev/null and b/brickwright/alt/alt-043/view-6.avif differ diff --git a/brickwright/alt/alt-043/view-7.avif b/brickwright/alt/alt-043/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..6e7b534b629c870a96df831f5cf0647fa168e319 Binary files /dev/null and b/brickwright/alt/alt-043/view-7.avif differ diff --git a/brickwright/alt/alt-044/build.py b/brickwright/alt/alt-044/build.py new file mode 100644 index 0000000000000000000000000000000000000000..90d595cb5e2c806de2f5498da37b012d75b78d7e --- /dev/null +++ b/brickwright/alt/alt-044/build.py @@ -0,0 +1,72 @@ +import bricklayer as bl +from brickwright import TestContext +import json + + +def create_build(): + b = bl.LegoBuild() + def add(pid, col, xyz, name=None, rot=bl.Rotation.DEG_0): + return b.add(bl.Element(pid, getattr(bl.Color,col)), xyz, rotation=rot, name=name) + add('3029','DARK_BLUISH_GRAY',(0,-2,0),'plinth') + add('3034','LIGHT_BLUISH_GRAY',(2,2,0),'floor_middle') + add('3034','LIGHT_BLUISH_GRAY',(2,4,0),'floor_back') + # Solid armored back, with a bonded roof bridging its courses. + for h in range(4): + for x in (2,7): + add('3002','BLACK',(x,4,1/3+h)) + for y in (4,5): + add('3004','DARK_BLUISH_GRAY' if h<2 else 'LIGHT_BLUISH_GRAY',(5,y,1/3+h)) + for x in (2,9): + for y in (0,2): + for z in (1/3,7/3): + add('3245c','LIGHT_BLUISH_GRAY',(x,y,z),rot=bl.Rotation.DEG_90) + for y in (0,2,4): + for x in (2,6): + add('3001','DARK_BLUISH_GRAY' if y==4 else 'LIGHT_BLUISH_GRAY',(x,y,13/3)) + for x in (2,7): + add('11212','DARK_BLUISH_GRAY',(x,3,16/3)) + # Two separate piles of long yellow bullion bars. + for k,x in enumerate((3,6)): + for h in range(2): + add('3001','YELLOW',(x,0,1/3+h),f'gold_{k}_{h}',bl.Rotation.DEG_90) + # A two-stud-thick armored door carried by a vertical pivot. + pivot=add('3680','BLUE',(2,-2,1/3),'hinge_base') + top=b.connect(bl.Element('3679',bl.Color.LIGHT_BLUISH_GRAY),'turntable_pin',to=pivot.find_connector('turntable_socket'),target_rotation=bl.Rotation.DEG_270,name='hinge_top') + d=bl.LegoBuild() + def doorpart(pid,col,x,y,z,name=None): + return d.add(bl.Element(pid,getattr(bl.Color,col)),(x,y,z),name=name) + doorpart('2456','BLACK',0,0,0) + for y in (0,1): + doorpart('3010','LIGHT_BLUISH_GRAY',0,y,1) + doorpart('3004','LIGHT_BLUISH_GRAY',4,y,1) + doorpart('3010','LIGHT_BLUISH_GRAY',0,y,2) + doorpart('3005','LIGHT_BLUISH_GRAY',5,y,2) + mount=doorpart('47905','BLACK',4,0,2,'dial_mount') + # Leave a small internal cavity behind the dial's mounting stud. + doorpart('2456','BLACK',0,0,3) + dial=bl.Element('14769',bl.Color.DARK_BLUISH_GRAY) + d.connect(dial,dial.find_connector('tube'),to=mount.find_connector('stud',facing=bl.Direction.FRONT),name='round_dial') + doorpart('87079','LIGHT_BLUISH_GRAY',1,0,4) + # The thick leaf stands at a right angle to the opening. + rotation=bl.Rotation.DEG_270.matrix + pivot_offset=rotation @ bl.Vec3(1,1,0) + pose=bl.Pose(rotation,bl.Position(3-pivot_offset.x,-1-pivot_offset.y,2/3)) + b.add_raw(d,pose,name='open_door') + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + limits=json.load(open('/inputs/parts.json')) + violations=[] + for e,n in b.list_elements().items(): + allowed=limits.get(e.ldraw_id,{}).get(e.color.name,0) + if n>allowed: violations.append(f'{e.ldraw_id} {e.color.name}: {n}>{allowed}') + tests.check('Inventory limits',not violations,str(violations)) + tests.check('Two stacks of yellow bars', all(f'gold_{i}_{j}' in b.names for i in range(2) for j in range(2)), 'Two piles, each two 2 x 4 yellow bars high') + tests.check('Thick open door with round exterior dial',b.named('open_door').content.alignment_depth>=2 and 'round_dial' in b.named('open_door').content.names,'Two-stud armored leaf, opened 90 degrees') + return tests.report() diff --git a/brickwright/alt/alt-044/hero-1024.avif b/brickwright/alt/alt-044/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..9c25feac8801423ef6820f426ff445d0e9e8ed46 Binary files /dev/null and b/brickwright/alt/alt-044/hero-1024.avif differ diff --git a/brickwright/alt/alt-044/model.mpd b/brickwright/alt/alt-044/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..7f4c7a30edf10051ccaa62e4c3754a96893b6c06 --- /dev/null +++ b/brickwright/alt/alt-044/model.mpd @@ -0,0 +1,61 @@ +0 FILE main.ldr +0 main +0 Name: main +1 72 120 -8 0 1 0 0 0 1 0 0 0 1 3029.dat +1 71 120 -8 60 1 0 0 0 1 0 0 0 1 3034.dat +1 71 120 -8 100 1 0 0 0 1 0 0 0 1 3034.dat +1 0 70 -32 100 1 0 0 0 1 0 0 0 1 3002.dat +1 0 170 -32 100 1 0 0 0 1 0 0 0 1 3002.dat +1 72 120 -32 90 1 0 0 0 1 0 0 0 1 3004.dat +1 72 120 -32 110 1 0 0 0 1 0 0 0 1 3004.dat +1 0 70 -56 100 1 0 0 0 1 0 0 0 1 3002.dat +1 0 170 -56 100 1 0 0 0 1 0 0 0 1 3002.dat +1 72 120 -56 90 1 0 0 0 1 0 0 0 1 3004.dat +1 72 120 -56 110 1 0 0 0 1 0 0 0 1 3004.dat +1 0 70 -80 100 1 0 0 0 1 0 0 0 1 3002.dat +1 0 170 -80 100 1 0 0 0 1 0 0 0 1 3002.dat +1 71 120 -80 90 1 0 0 0 1 0 0 0 1 3004.dat +1 71 120 -80 110 1 0 0 0 1 0 0 0 1 3004.dat +1 0 70 -104 100 1 0 0 0 1 0 0 0 1 3002.dat +1 0 170 -104 100 1 0 0 0 1 0 0 0 1 3002.dat +1 71 120 -104 90 1 0 0 0 1 0 0 0 1 3004.dat +1 71 120 -104 110 1 0 0 0 1 0 0 0 1 3004.dat +1 71 50 -56 20 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 50 -104 20 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 50 -56 60 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 50 -104 60 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 190 -56 20 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 190 -104 20 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 190 -56 60 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 190 -104 60 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 80 -128 20 1 0 0 0 1 0 0 0 1 3001.dat +1 71 160 -128 20 1 0 0 0 1 0 0 0 1 3001.dat +1 71 80 -128 60 1 0 0 0 1 0 0 0 1 3001.dat +1 71 160 -128 60 1 0 0 0 1 0 0 0 1 3001.dat +1 72 80 -128 100 1 0 0 0 1 0 0 0 1 3001.dat +1 72 160 -128 100 1 0 0 0 1 0 0 0 1 3001.dat +1 72 70 -136 90 1 0 0 0 1 0 0 0 1 11212.dat +1 72 170 -136 90 1 0 0 0 1 0 0 0 1 11212.dat +1 14 80 -32 40 0 0 -1 0 1 0 1 0 0 3001.dat +1 14 80 -56 40 0 0 -1 0 1 0 1 0 0 3001.dat +1 14 140 -32 40 0 0 -1 0 1 0 1 0 0 3001.dat +1 14 140 -56 40 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 60 -16 -20 1 0 0 0 1 0 0 0 1 3680.dat +1 71 60 -16 -20 0 0 1 0 1 0 -1 0 0 3679.dat +1 16 40 -16 0 0 0 1 0 1 0 -1 0 0 open_door.ldr +0 FILE open_door.ldr +0 open_door +0 Name: open_door +1 0 60 -24 20 1 0 0 0 1 0 0 0 1 2456.dat +1 71 40 -48 10 1 0 0 0 1 0 0 0 1 3010.dat +1 71 100 -48 10 1 0 0 0 1 0 0 0 1 3004.dat +1 71 40 -72 10 1 0 0 0 1 0 0 0 1 3010.dat +1 71 110 -72 10 1 0 0 0 1 0 0 0 1 3005.dat +1 71 40 -48 30 1 0 0 0 1 0 0 0 1 3010.dat +1 71 100 -48 30 1 0 0 0 1 0 0 0 1 3004.dat +1 71 40 -72 30 1 0 0 0 1 0 0 0 1 3010.dat +1 71 110 -72 30 1 0 0 0 1 0 0 0 1 3005.dat +1 0 90 -72 10 1 0 0 0 1 0 0 0 1 47905.dat +1 0 60 -96 20 1 0 0 0 1 0 0 0 1 2456.dat +1 72 90 -62 -8 1 0 0 0 0 -1 0 1 0 14769.dat +1 71 60 -104 20 1 0 0 0 1 0 0 0 1 87079.dat diff --git a/brickwright/alt/alt-044/thumb-512.avif b/brickwright/alt/alt-044/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..35b14e81f942087dba47ef1cde2bc6037ba081f1 Binary files /dev/null and b/brickwright/alt/alt-044/thumb-512.avif differ diff --git a/brickwright/alt/alt-044/trace.jsonl.gz b/brickwright/alt/alt-044/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..421a7f436db9ded70e6d83553930499ba1ddda9f --- /dev/null +++ b/brickwright/alt/alt-044/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f9e7300e8629322f4772dbe4ca6ed39b8f81e0cef708e680cc06f0d3887f5d2 +size 6437 diff --git a/brickwright/alt/alt-044/view-0.avif b/brickwright/alt/alt-044/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..f878c47a577b5bb74bc34681f9a129cc2a207d71 Binary files /dev/null and b/brickwright/alt/alt-044/view-0.avif differ diff --git a/brickwright/alt/alt-044/view-1.avif b/brickwright/alt/alt-044/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..30fd2afdb78700d8891e09bea8551105998d9cf5 Binary files /dev/null and b/brickwright/alt/alt-044/view-1.avif differ diff --git a/brickwright/alt/alt-044/view-2.avif b/brickwright/alt/alt-044/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..b1b61e478eaa6da8dbb0e50e0fa558cff661ca96 Binary files /dev/null and b/brickwright/alt/alt-044/view-2.avif differ diff --git a/brickwright/alt/alt-044/view-3.avif b/brickwright/alt/alt-044/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..0b7ce51b909d460da8e1547e2765e8ef1e53d191 Binary files /dev/null and b/brickwright/alt/alt-044/view-3.avif differ diff --git a/brickwright/alt/alt-044/view-4.avif b/brickwright/alt/alt-044/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..3ce992d1c297cd935982ff482f3ff4e6bc18281b Binary files /dev/null and b/brickwright/alt/alt-044/view-4.avif differ diff --git a/brickwright/alt/alt-044/view-5.avif b/brickwright/alt/alt-044/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..e4e04a619df851eebce734853bbcb6b2de740588 Binary files /dev/null and b/brickwright/alt/alt-044/view-5.avif differ diff --git a/brickwright/alt/alt-044/view-6.avif b/brickwright/alt/alt-044/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..51f5f3ca35ff22203386f1ba12eca91f412e2944 Binary files /dev/null and b/brickwright/alt/alt-044/view-6.avif differ diff --git a/brickwright/alt/alt-044/view-7.avif b/brickwright/alt/alt-044/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..cecb7e7e47c87a9138032f9f2e004abecce4b71d Binary files /dev/null and b/brickwright/alt/alt-044/view-7.avif differ diff --git a/brickwright/alt/alt-045/build.py b/brickwright/alt/alt-045/build.py new file mode 100644 index 0000000000000000000000000000000000000000..be8033f084fd4a9d49267a0d99fc9a6ce754810f --- /dev/null +++ b/brickwright/alt/alt-045/build.py @@ -0,0 +1,102 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + C=bl.Color + def add(p,c,x,y,z,name=None,r=bl.Rotation.DEG_0): + return b.add(bl.Element(p,c),(x,y,z),rotation=r,name=name) + add('91405',C.BRIGHT_GREEN,0,0,0,'studio_base') + # Three-foot wooden easel, with a broad front rail and rear bracing. + for x in (0,6): + add('3002',C.REDDISH_BROWN,x,8,1/3) + for z in (4/3,7/3): + add('30136',C.DARK_ORANGE,x,9,z) + add('3002',C.REDDISH_BROWN,3,11,1/3) + for z in (4/3,7/3): + add('3010',C.REDDISH_BROWN,2,11,z) + add('3034',C.LIGHT_BLUISH_GRAY,0,8,10/3,'easel_crossbar') + add('3020',C.MEDIUM_AZURE,2,10,10/3) + add('3022',C.TAN,3,9,11/3) + add('3022',C.TAN,3,9,12/3) + add('3034',C.LIGHT_BLUISH_GRAY,0,8,13/3,'canvas_shelf') + # Picture: a pale yellow field, blue vase, green stalk and red bloom. + for row in range(4): + z=14/3+row + for x in (1,5): + add('3004',C.BRIGHT_LIGHT_YELLOW,x,9,z) + if row<2: + add('3003',C.BLUE,3,8,z,'picture_vase_'+str(row)) + elif row==2: + add('3004',C.BRIGHT_GREEN,3,9,z,'picture_stem') + else: + for fx in (3,4): + petal=add('47905',C.RED,fx,9,z,'picture_red_flower' if fx==3 else 'picture_flower_right') + disc=bl.Element('6141',C.RED) + b.connect(disc,'antistud',to=petal.find_connector('stud',facing=bl.Direction.FRONT)) + for x in (0,7): + for z in (14/3,20/3): + add('3245c',C.LIGHT_BLUISH_GRAY,x,8,z,r=bl.Rotation.DEG_90) + for x in (0,4): + add('3010',C.LIGHT_BLUISH_GRAY,x,9,26/3) + add('3795',C.REDDISH_BROWN,1,8,29/3,'easel_top_clamp') + # Small four-legged table, kept separate in silhouette but attached to base. + for x in (12,15): + for y in (6,9): + for z in (1/3,4/3,7/3): + add('3062b' if z==1/3 and y==6 else '3005',C.REDDISH_BROWN if z==1/3 and y==6 else (C.LIGHT_BLUISH_GRAY if z==1/3 else C.MEDIUM_NOUGAT),x,y,z) + for y in (6,8): + add('3001',C.DARK_TAN,12,y,10/3) + for y in (6,8): + add('3020',C.TAN,12,y,13/3) + vase=add('3942c',C.BLUE,13,7,14/3,'real_blue_vase') + leaves=bl.Element('4727',C.BRIGHT_GREEN) + stem=b.connect(leaves,'tube',to=vase.find_connector('stud',facing=bl.Direction.UP),name='real_flower_stem') + flower=bl.Element('30165',C.RED) + b.connect(flower,flower.find_connector('antistud',toward=bl.Direction.RIGHT),to=stem.find_connector('stud',facing=bl.Direction.UP),name='real_red_flower') + # Brick-built artist: boots, blue trousers, white smock, and black beret. + scene=b + b=bl.LegoBuild() + for x in (8,10): + add('3004',C.BLACK,x,6,1/3,r=bl.Rotation.DEG_90) + for z in (4/3,7/3): + add('3004',C.DARK_BLUE,x,6,z,r=bl.Rotation.DEG_90) + add('6215',C.WHITE,8,6,10/3,'smock_lower') + add('3004',C.WHITE,8,6,13/3,'smock_upper') + add('3004',C.WHITE,8,7,13/3) + # Left arm and hand extended toward the canvas. + add('3004',C.WHITE,7,6,16/3,'painting_arm') + add('3005',C.YELLOW,7,6,19/3,'painting_hand') + clip=add('61252',C.LIGHT_BLUISH_GRAY,7,6,22/3,'brush_grip') + antenna=bl.Element('3957b',C.LIGHT_BLUISH_GRAY) + b.connect(antenna,'bar',to=clip.find_connector('clip'),target_rotation=bl.rotation_about(bl.Vec3(0,1,0),-90),mounting=bl.Mounting(offset=-1),name='brush') + add('3004',C.WHITE,8,7,16/3,r=bl.Rotation.DEG_90) + add('3005',C.YELLOW,8,8,19/3,'other_hand') + add('3003',C.YELLOW,9,6,16/3,'face') + for x in (9,10): + eye=add('47905',C.BLACK,x,6,19/3) + e=bl.Element('98138p07',C.WHITE) + b.connect(e,'antistud',to=eye.find_connector('stud',facing=bl.Direction.FRONT),name='eye_'+str(x)) + add('3002',C.BLACK,8,6,22/3,'beret') + # Keep semantic names available in the complete scene. + for p in b.placements: + scene.add_raw(p.content,bl.Pose(p.pose.rotation,p.pose.translation+bl.Position(1,2,0)),name=b.name_of(p)) + return scene + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((e.ldraw_id,e.color.name) for p in b.flattened_placements for e in [p.content]) + excess={str(k):n for k,n in used.items() if n>inventory.get(k[0],{}).get(k[1],0)} + t.check('Inventory limits',not excess,str(excess)) + t.check('Picture and matching still life',all(n in b.names for n in ['picture_vase_0','picture_red_flower','real_blue_vase','real_red_flower']),'Red flowers, blue vases') + t.check('Artist between easel and table',b.named('face').center.x>b.named('canvas_shelf').center.x and b.named('face').center.xstock.get(e.ldraw_id,{}).get(e.color.name,0): + excess.append((e.ldraw_id,e.color.name,n)) + t.check('inventory',not excess,str(excess)) + t.check('tall spout',b.named('spout_tip').center.z>b.named('lid').center.z,'Spout rises above the lid') + t.check('two cups',all(n in b.names for n in ['upright_cup','fallen_cup']),'Upright and sideways vessels') + t.check('loop handle', b.named('loop_handle').content.ldraw_id == '60592', 'Open frame forms the pot handle') + t.check('opposite ends', b.named('dessert_plate').center.y > b.named('upright_cup').center.y + 3, 'Cake is beyond the teapot, opposite the cups') + axis = b.named('fallen_cup').pose.rotation @ bl.Vec3(0,0,1) + t.check('sideways cup', abs(axis.z) < 0.01, 'Cup axis is horizontal') + return t.report() diff --git a/brickwright/alt/alt-046/hero-1024.avif b/brickwright/alt/alt-046/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..32ee09e787ffb6e5b363721659dcc750bc756cfa Binary files /dev/null and b/brickwright/alt/alt-046/hero-1024.avif differ diff --git a/brickwright/alt/alt-046/model.mpd b/brickwright/alt/alt-046/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..a6ebffded243b81264abd077b5120c3d14ce4a11 --- /dev/null +++ b/brickwright/alt/alt-046/model.mpd @@ -0,0 +1,77 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 71 40 -16 20 1 0 0 0 1 0 0 0 1 87079.dat +1 71 120 -16 20 1 0 0 0 1 0 0 0 1 87079.dat +1 71 200 -16 20 1 0 0 0 1 0 0 0 1 87079.dat +1 71 280 -16 20 1 0 0 0 1 0 0 0 1 87079.dat +1 71 40 -32 310 1 0 0 0 1 0 0 0 1 3010.dat +1 71 120 -32 310 1 0 0 0 1 0 0 0 1 3010.dat +1 71 200 -32 310 1 0 0 0 1 0 0 0 1 3010.dat +1 71 280 -32 310 1 0 0 0 1 0 0 0 1 3010.dat +1 71 20 -32 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 300 -32 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 20 -32 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 300 -32 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 72 20 -32 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 72 300 -32 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 322 160 -16 140 1 0 0 0 1 0 0 0 1 3020.dat +1 322 160 -16 180 1 0 0 0 1 0 0 0 1 3020.dat +1 322 140 -40 150 1 0 0 0 1 0 0 0 1 3660b.dat +1 322 140 -40 170 -1 0 0 0 1 0 0 0 -1 3660b.dat +1 322 180 -40 150 1 0 0 0 1 0 0 0 1 3660b.dat +1 322 180 -40 170 -1 0 0 0 1 0 0 0 -1 3660b.dat +1 322 160 -64 140 1 0 0 0 1 0 0 0 1 3001.dat +1 322 160 -64 180 1 0 0 0 1 0 0 0 1 3001.dat +1 322 160 -88 150 1 0 0 0 1 0 0 0 1 3010.dat +1 322 160 -88 170 1 0 0 0 1 0 0 0 1 3010.dat +1 84 130 -88 190 1 0 0 0 1 0 0 0 1 3005.dat +1 322 150 -112 150 0 0 1 0 1 0 -1 0 0 3045.dat +1 322 170 -112 150 1 0 0 0 1 0 0 0 1 3045.dat +1 322 170 -112 170 0 0 -1 0 1 0 1 0 0 3045.dat +1 322 150 -112 170 -1 0 0 0 1 0 0 0 -1 3045.dat +1 19 160 -120 160 1 0 0 0 1 0 0 0 1 3022.dat +1 4 150 -128 150 1 0 0 0 1 0 0 0 1 6141.dat +1 322 150 -88 130 1 0 0 0 1 0 0 0 1 3665a.dat +1 322 150 -112 110 1 0 0 0 1 0 0 0 1 3665a.dat +1 322 170 -88 130 1 0 0 0 1 0 0 0 1 3665a.dat +1 322 170 -112 110 1 0 0 0 1 0 0 0 1 3665a.dat +1 322 160 -136 90 1 0 0 0 1 0 0 0 1 3004.dat +1 321 160 -144 90 1 0 0 0 1 0 0 0 1 3023b.dat +1 1 170 -72 220 0 0 -1 0 1 0 1 0 0 3710.dat +1 15 170 -120 220 0 0 -1 0 1 0 1 0 0 60592.dat +1 16 40 -8 120 1 0 0 0 1 0 0 0 1 upright_cup.ldr +1 1 180 -16 80 1 0 0 0 1 0 0 0 1 3031.dat +1 1 160 -24 70 1 0 0 0 1 0 0 0 1 3710.dat +1 321 180 -24 90 1 0 0 0 1 0 0 0 1 3023b.dat +1 71 50 -32 50 1 0 0 0 1 0 0 0 1 3005.dat +1 4 50 -56 50 0 0 -1 0 1 0 1 0 0 47905.dat +1 16 60 -16 80 0 -1 0 -1 0 0 0 0 -1 fallen_cup.ldr +1 10 240 -16 240 1 0 0 0 1 0 0 0 1 3031.dat +1 19 240 -24 240 1 0 0 0 1 0 0 0 1 3020.dat +1 19 230 -48 250 1 0 0 0 1 0 0 0 1 3040b.dat +1 15 230 -72 270 1 0 0 0 1 0 0 0 1 3040b.dat +1 19 250 -48 250 1 0 0 0 1 0 0 0 1 3040b.dat +1 15 250 -72 270 1 0 0 0 1 0 0 0 1 3040b.dat +1 4 230 -80 270 1 0 0 0 1 0 0 0 1 6141.dat +0 FILE upright_cup.ldr +0 upright_cup +0 Name: upright_cup +1 72 30 -8 30 1 0 0 0 1 0 0 0 1 11212.dat +1 29 20 -32 10 1 0 0 0 1 0 0 0 1 3004.dat +1 29 50 -32 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 29 40 -32 50 1 0 0 0 1 0 0 0 1 3004.dat +1 29 10 -32 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 26 40 -40 10 1 0 0 0 1 0 0 0 1 3710.dat +1 15 70 -88 20 0 0 -1 0 1 0 1 0 0 60592.dat +0 FILE fallen_cup.ldr +0 fallen_cup +0 Name: fallen_cup +1 72 30 -8 30 1 0 0 0 1 0 0 0 1 11212.dat +1 29 20 -32 10 1 0 0 0 1 0 0 0 1 3004.dat +1 29 50 -32 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 29 40 -32 50 1 0 0 0 1 0 0 0 1 3004.dat +1 29 10 -32 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 26 40 -40 10 1 0 0 0 1 0 0 0 1 3710.dat +1 15 70 -88 20 0 0 -1 0 1 0 1 0 0 60592.dat diff --git a/brickwright/alt/alt-046/thumb-512.avif b/brickwright/alt/alt-046/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..c8b226bfb8f3351bde5dde1dd3b8c2222497170f Binary files /dev/null and b/brickwright/alt/alt-046/thumb-512.avif differ diff --git a/brickwright/alt/alt-046/trace.jsonl.gz b/brickwright/alt/alt-046/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..60bbe82e1010b7c78724f8812ac2cc84750f8d64 --- /dev/null +++ b/brickwright/alt/alt-046/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72069001e11941e433679c9766e2fa79b72c9cdd7f24986c615d44d07bb6f5e0 +size 8151 diff --git a/brickwright/alt/alt-046/view-0.avif b/brickwright/alt/alt-046/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..9ed301de048c33fada8f6900de9293f18d1f5345 Binary files /dev/null and b/brickwright/alt/alt-046/view-0.avif differ diff --git a/brickwright/alt/alt-046/view-1.avif b/brickwright/alt/alt-046/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..3c4a8aa97fdcff5430f3fb3b91dd0b95c1eaa316 Binary files /dev/null and b/brickwright/alt/alt-046/view-1.avif differ diff --git a/brickwright/alt/alt-046/view-2.avif b/brickwright/alt/alt-046/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..5206f0181d0004255678c0d6d31bc35f12629516 Binary files /dev/null and b/brickwright/alt/alt-046/view-2.avif differ diff --git a/brickwright/alt/alt-046/view-3.avif b/brickwright/alt/alt-046/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..b0d7da3b8a65022d970db118bcec80f2476cb170 Binary files /dev/null and b/brickwright/alt/alt-046/view-3.avif differ diff --git a/brickwright/alt/alt-046/view-4.avif b/brickwright/alt/alt-046/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..1730407142386ebbdf2c380cf835ab8f6bac0c62 Binary files /dev/null and b/brickwright/alt/alt-046/view-4.avif differ diff --git a/brickwright/alt/alt-046/view-5.avif b/brickwright/alt/alt-046/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..32eefe4a009ae7643f0efc74f5e5db6bc75cce2b Binary files /dev/null and b/brickwright/alt/alt-046/view-5.avif differ diff --git a/brickwright/alt/alt-046/view-6.avif b/brickwright/alt/alt-046/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..70e8fecc0c563f9434b40d59d013498a72fe1b9f Binary files /dev/null and b/brickwright/alt/alt-046/view-6.avif differ diff --git a/brickwright/alt/alt-046/view-7.avif b/brickwright/alt/alt-046/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..318ef8654eb76ab6166223a7022968db1e84566b Binary files /dev/null and b/brickwright/alt/alt-046/view-7.avif differ diff --git a/brickwright/alt/alt-047/build.py b/brickwright/alt/alt-047/build.py new file mode 100644 index 0000000000000000000000000000000000000000..e19e54dd052832740d1c18d0db745af9aa70f415 --- /dev/null +++ b/brickwright/alt/alt-047/build.py @@ -0,0 +1,87 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid, color, x,y,z, rot=bl.Rotation.DEG_0, name=None): + return b.add(bl.Element(pid, getattr(bl.Color,color)), (x,y,z), rotation=rot, name=name) + # A square, cross-laminated pedestal. + for i,(x,y) in enumerate([(0,0),(4,0),(0,4),(4,4)]): + put('3031','BLUE' if i<3 else 'BRIGHT_GREEN',x,y,0,name=f'base_{i}') + put('3032','YELLOW',1,2,1/3,name='pedestal_bridge') + for y in (0,6): put('3034','LIGHT_BLUISH_GRAY',0,y,1/3) + for x in (0,7): put('2431','LIGHT_BLUISH_GRAY',x,2,1/3,bl.Rotation.DEG_90) + # Projecting boots and two slender, separated legs. + for x in (1,5): put('3002','BLACK',x,2,2/3,bl.Rotation.DEG_90,name=f'boot_{x}') + for x in (2,5): + put('3004','BLACK',x,3,5/3,bl.Rotation.DEG_90) + for z in (8/3,11/3,14/3): put('3004','DARK_BLUE',x,3,z,bl.Rotation.DEG_90) + for y in (2,3,4): + for x in (2,4): put('3004','DARK_BLUE',x,y,17/3) + # Red tunic; the wide final course binds the hanging arms to the body. + for k in range(4): + z=20/3+k + if k in (0,2): + for x in (2,4): put('3004','DARK_RED' if k==0 else 'RED',x,4,z) + c='BLACK' if k==0 else 'RED' + put('3004',c,3,2,z) + for x in (2,5): + mount=put('47905',c,x,2,z) + if k==2: + button=bl.Element('6141',bl.Color.TRANS_ORANGE) + b.connect(button,button.find_connector('antistud'),to=mount.find_connector('stud',facing=bl.Direction.FRONT),name=f'button_{x}') + else: + if k<3: put('3001','RED',2,2,z) + else: + for y in (2,3): put('3009','RED',-1,y,z,name=f'shoulder_{y}') + put('3001','RED',5,2,z,name='shoulder_left') + for x in (2,4): put('3004','RED',x,4,z) + for x in (-1,7): + put('3003','MEDIUM_NOUGAT',x,2,20/3,name=f'hand_{x}') + for z in (23/3,26/3): put('3003','RED',x,2,z,name=f'sleeve_{x}_{z}') + # Lower jaw, and a true two-brick-high mouth cavity. + put('3001','TAN',2,2,32/3,name='jaw') + for x in (2,5): put('3005','MEDIUM_NOUGAT',x,4,32/3) + for z in (35/3,38/3): + for x in (2,5): put('3004','MEDIUM_NOUGAT',x,2,z,bl.Rotation.DEG_90) + for x in (2,4): put('3004','MEDIUM_NOUGAT',x,4,z) + put('3005','YELLOW',3,2,35/3,name='nut') + put('6141','REDDISH_BROWN',3,2,38/3,name='nut_cap') + face=put('30414','TAN',2,2,41/3,name='face') + for x in (2,4): put('3003','MEDIUM_NOUGAT',x,3,41/3) + studs=sorted(face.find_connectors('stud',facing=bl.Direction.FRONT),key=lambda c:c.position.x) + eye=bl.Element('98138p07',bl.Color.WHITE) + for i in (0,3): b.connect(eye,eye.find_connector('antistud'),to=studs[i],name=f'eye_{i}') + nose=bl.Element('3023b',bl.Color.TAN) + b.connect(nose,nose.find_connector('antistud',toward=bl.Direction.RIGHT),to=studs[1],target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90),name='nose') + # Tall black military shako, with a broad bottom course. + for y in (1,3): put('2456','BLACK',1,y,44/3,name=f'hat_brim_{y}') + for z in (47/3,50/3,53/3): + for x in (2,4): put('3002','BLACK',x,2,z,bl.Rotation.DEG_90) + put('87081','BLACK',2,1,56/3,name='hat_crown') + # The long rear handle is a rigid depiction of the nutcracker lever. + # Overlapping plates make the cantilever secure. + put('3795','REDDISH_BROWN',3,4,32/3,bl.Rotation.DEG_90,name='lever') + put('3710','TAN',3,5,11,bl.Rotation.DEG_90,name='lever_reinforcement') + return b + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + counts=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):n for k,n in counts.items() if n>inventory.get(k[0],{}).get(k[1],0)} + t.check('inventory limits',not excess,str(excess)) + t.check('square pedestal',all(b.named(f'base_{i}').alignment_width==4 and b.named(f'base_{i}').alignment_depth==4 for i in range(4)),'Four joined 4x4 plates form an 8x8 square') + t.check('yellow nut in mouth',b.named('nut').content.color==bl.Color.YELLOW and b.named('jaw').bounding_box[1].z < b.named('face').bounding_box[0].z,'Yellow nut seated on lower jaw beneath face') + t.check('long rear lever',b.named('lever').alignment_depth==6,'Six-stud rearward lever') + t.check('straight paired arms',b.named('hand_-1').pose.translation.z==b.named('hand_7').pose.translation.z,'Symmetric vertical sleeves and hands') + t.check('tall black hat',b.named('hat_crown').bounding_box[1].z-b.named('hat_brim_1').bounding_box[0].z>=4,'Four black courses') + return t.report() diff --git a/brickwright/alt/alt-047/hero-1024.avif b/brickwright/alt/alt-047/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..69e1ec4bdd7f71d7008c30645f0d75609127abf8 Binary files /dev/null and b/brickwright/alt/alt-047/hero-1024.avif differ diff --git a/brickwright/alt/alt-047/model.mpd b/brickwright/alt/alt-047/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..f44c937b4d2a371257477b0cac8506a173682450 --- /dev/null +++ b/brickwright/alt/alt-047/model.mpd @@ -0,0 +1,81 @@ +1 1 40 -8 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 120 -8 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 40 -8 120 1 0 0 0 1 0 0 0 1 3031.dat +1 10 120 -8 120 1 0 0 0 1 0 0 0 1 3031.dat +1 14 80 -16 80 1 0 0 0 1 0 0 0 1 3032.dat +1 71 80 -16 20 1 0 0 0 1 0 0 0 1 3034.dat +1 71 80 -16 140 1 0 0 0 1 0 0 0 1 3034.dat +1 71 10 -16 80 0 0 -1 0 1 0 1 0 0 2431.dat +1 71 150 -16 80 0 0 -1 0 1 0 1 0 0 2431.dat +1 0 40 -40 70 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 120 -40 70 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 50 -64 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 50 -88 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 50 -112 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 50 -136 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 110 -64 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 110 -88 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 110 -112 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 110 -136 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 60 -160 50 1 0 0 0 1 0 0 0 1 3004.dat +1 272 100 -160 50 1 0 0 0 1 0 0 0 1 3004.dat +1 272 60 -160 70 1 0 0 0 1 0 0 0 1 3004.dat +1 272 100 -160 70 1 0 0 0 1 0 0 0 1 3004.dat +1 272 60 -160 90 1 0 0 0 1 0 0 0 1 3004.dat +1 272 100 -160 90 1 0 0 0 1 0 0 0 1 3004.dat +1 320 60 -184 90 1 0 0 0 1 0 0 0 1 3004.dat +1 320 100 -184 90 1 0 0 0 1 0 0 0 1 3004.dat +1 0 80 -184 50 1 0 0 0 1 0 0 0 1 3004.dat +1 0 50 -184 50 1 0 0 0 1 0 0 0 1 47905.dat +1 0 110 -184 50 1 0 0 0 1 0 0 0 1 47905.dat +1 4 80 -208 60 1 0 0 0 1 0 0 0 1 3001.dat +1 4 60 -208 90 1 0 0 0 1 0 0 0 1 3004.dat +1 4 100 -208 90 1 0 0 0 1 0 0 0 1 3004.dat +1 4 60 -232 90 1 0 0 0 1 0 0 0 1 3004.dat +1 4 100 -232 90 1 0 0 0 1 0 0 0 1 3004.dat +1 4 80 -232 50 1 0 0 0 1 0 0 0 1 3004.dat +1 4 50 -232 50 1 0 0 0 1 0 0 0 1 47905.dat +1 57 50 -222 32 1 0 0 0 0 -1 0 1 0 6141.dat +1 4 110 -232 50 1 0 0 0 1 0 0 0 1 47905.dat +1 57 110 -222 32 1 0 0 0 0 -1 0 1 0 6141.dat +1 4 40 -256 50 1 0 0 0 1 0 0 0 1 3009.dat +1 4 40 -256 70 1 0 0 0 1 0 0 0 1 3009.dat +1 4 140 -256 60 1 0 0 0 1 0 0 0 1 3001.dat +1 4 60 -256 90 1 0 0 0 1 0 0 0 1 3004.dat +1 4 100 -256 90 1 0 0 0 1 0 0 0 1 3004.dat +1 84 0 -184 60 1 0 0 0 1 0 0 0 1 3003.dat +1 4 0 -208 60 1 0 0 0 1 0 0 0 1 3003.dat +1 4 0 -232 60 1 0 0 0 1 0 0 0 1 3003.dat +1 84 160 -184 60 1 0 0 0 1 0 0 0 1 3003.dat +1 4 160 -208 60 1 0 0 0 1 0 0 0 1 3003.dat +1 4 160 -232 60 1 0 0 0 1 0 0 0 1 3003.dat +1 19 80 -280 60 1 0 0 0 1 0 0 0 1 3001.dat +1 84 50 -280 90 1 0 0 0 1 0 0 0 1 3005.dat +1 84 110 -280 90 1 0 0 0 1 0 0 0 1 3005.dat +1 84 50 -304 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 110 -304 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 60 -304 90 1 0 0 0 1 0 0 0 1 3004.dat +1 84 100 -304 90 1 0 0 0 1 0 0 0 1 3004.dat +1 84 50 -328 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 110 -328 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 60 -328 90 1 0 0 0 1 0 0 0 1 3004.dat +1 84 100 -328 90 1 0 0 0 1 0 0 0 1 3004.dat +1 14 70 -304 50 1 0 0 0 1 0 0 0 1 3005.dat +1 70 70 -312 50 1 0 0 0 1 0 0 0 1 6141.dat +1 19 80 -352 50 1 0 0 0 1 0 0 0 1 30414.dat +1 84 60 -352 80 1 0 0 0 1 0 0 0 1 3003.dat +1 84 100 -352 80 1 0 0 0 1 0 0 0 1 3003.dat +1 15 50 -342 32 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 110 -342 32 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 19 80 -342 32 1 0 0 0 0 -1 0 1 0 3023b.dat +1 0 80 -376 40 1 0 0 0 1 0 0 0 1 2456.dat +1 0 80 -376 80 1 0 0 0 1 0 0 0 1 2456.dat +1 0 60 -400 70 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 100 -400 70 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 60 -424 70 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 100 -424 70 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 60 -448 70 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 100 -448 70 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 80 -472 60 1 0 0 0 1 0 0 0 1 87081.dat +1 70 80 -264 140 0 0 -1 0 1 0 1 0 0 3795.dat +1 19 70 -272 140 0 0 -1 0 1 0 1 0 0 3710.dat diff --git a/brickwright/alt/alt-047/thumb-512.avif b/brickwright/alt/alt-047/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..bf14bbc3b34b5bd09afb00a64290f920028bf852 Binary files /dev/null and b/brickwright/alt/alt-047/thumb-512.avif differ diff --git a/brickwright/alt/alt-047/trace.jsonl.gz b/brickwright/alt/alt-047/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..1f9516bdcbf44a2b57a203ccca519929632e8cd3 --- /dev/null +++ b/brickwright/alt/alt-047/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5fdbaf14836150f4a84ac2fd7a525df37a9f3ee19b255f86bd431909a99a429 +size 7199 diff --git a/brickwright/alt/alt-047/view-0.avif b/brickwright/alt/alt-047/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..51c56f5880c0e2c8a4237375d9814a422832f588 Binary files /dev/null and b/brickwright/alt/alt-047/view-0.avif differ diff --git a/brickwright/alt/alt-047/view-1.avif b/brickwright/alt/alt-047/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..795181fb49869c53ceb6c3df3bd1b12ca2ce142a Binary files /dev/null and b/brickwright/alt/alt-047/view-1.avif differ diff --git a/brickwright/alt/alt-047/view-2.avif b/brickwright/alt/alt-047/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..5ae18ea5d72bc1031db9a87d8f5e219850754c8f Binary files /dev/null and b/brickwright/alt/alt-047/view-2.avif differ diff --git a/brickwright/alt/alt-047/view-3.avif b/brickwright/alt/alt-047/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..5b0788e36f02ac13ca626187c388a82951bb20b5 Binary files /dev/null and b/brickwright/alt/alt-047/view-3.avif differ diff --git a/brickwright/alt/alt-047/view-4.avif b/brickwright/alt/alt-047/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..616a790126e31a0e26a162c25329a84ac148d77f Binary files /dev/null and b/brickwright/alt/alt-047/view-4.avif differ diff --git a/brickwright/alt/alt-047/view-5.avif b/brickwright/alt/alt-047/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..e6685b32d3aec54bf9ce718bedc41aeefc02b000 Binary files /dev/null and b/brickwright/alt/alt-047/view-5.avif differ diff --git a/brickwright/alt/alt-047/view-6.avif b/brickwright/alt/alt-047/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..8108cd5548fa9e03637e63590c16107b6556ab32 Binary files /dev/null and b/brickwright/alt/alt-047/view-6.avif differ diff --git a/brickwright/alt/alt-047/view-7.avif b/brickwright/alt/alt-047/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..cb121c0bd1bd54b313e22130269124ce284af586 Binary files /dev/null and b/brickwright/alt/alt-047/view-7.avif differ diff --git a/brickwright/alt/alt-048/build.py b/brickwright/alt/alt-048/build.py new file mode 100644 index 0000000000000000000000000000000000000000..e90168a013599ba6a9fe609474b4f2b8a2eacdf9 --- /dev/null +++ b/brickwright/alt/alt-048/build.py @@ -0,0 +1,84 @@ +import json +import bricklayer as bl +from brickwright import TestContext +C=bl.Color + +def create_build(): + b=bl.LegoBuild() + def add(pid,col,pos,rot=bl.Rotation.DEG_0,name=None): + return b.add(bl.Element(pid,col),pos,rotation=rot,name=name) + # Broad red runners form the toy's two flat feet. + for x in (0,4): + for y in (0,4,8,12): add('3001',C.RED,(x,y,0),bl.Rotation.DEG_90) + add('85984',C.RED,(x,0,1),name='toe_'+str(x)) + add('3029',C.DARK_BLUISH_GRAY,(1,1,1),bl.Rotation.DEG_90,name='base') + # Hollow cup with a blue bottom and rounded rim. + add('3031',C.BLUE,(1,1,4/3),name='water') + for z in (5/3,8/3): + for y in (1,4): add('3010',C.LIGHT_BLUISH_GRAY,(1,y,z)) + for x in (1,4): add('3004',C.LIGHT_BLUISH_GRAY,(x,2,z),bl.Rotation.DEG_90) + for y in (1,4): + add('2431',C.LIGHT_BLUISH_GRAY,(1,y,11/3),name='rim_'+str(y)) + for x in (1,4): + add('3004',C.LIGHT_BLUISH_GRAY,(x,2,11/3),bl.Rotation.DEG_90) + # A stout stand and locking pivot hold the dipping pose. + for x in (1,4): + for z in (4/3,): + add('3245c',C.LIGHT_BLUISH_GRAY,(x,12,z),bl.Rotation.DEG_90) + add('3001',C.DARK_BLUISH_GRAY,(1,12,10/3),name='crossbar') + pivot=add('92582',C.BLACK,(2,12,13/3),bl.Rotation.DEG_270,name='pivot') + # Build the bird in its own upright coordinate frame; tilt it as one unit. + bird=bl.LegoBuild() + def ba(pid,col,pos,rot=bl.Rotation.DEG_0,name=None): + return bird.add(bl.Element(pid,col),pos,rotation=rot,name=name) + hinge=ba('60471',C.BLACK,(0,0,0),name='lock') + # Slim neck, red to echo the traditional glass drinking toy. + for z in (1/3,5/3,3,4): + ba('3004',C.RED,(0,0,z)) + # Blue rounded bulb behind the pivot. + for x in (-1,1): + ba('3660b',C.MEDIUM_AZURE,(x,1,1/3)) + ba('3660b',C.MEDIUM_AZURE,(x,3,1/3),bl.Rotation.DEG_180) + ba('3031',C.BLUE,(-1,0,4/3)) + ba('3001',C.BLUE,(-1,1,5/3)) + ba('3023b',C.DARK_AZURE,(0,0,8/3)) + for x in (-1,0,1,2): + ba('50950',C.MEDIUM_AZURE,(x,1,8/3)) + for x in (-1,1): + ba('3039',C.BLUE,(x,3,5/3),bl.Rotation.DEG_180) + # White head with a red bill and sideways printed eyes. + ba('3004',C.RED,(0,0,5)) + ba('3020',C.MEDIUM_AZURE,(-1,0,6)) + ba('3004',C.WHITE,(0,0,19/3)) + # Eye mounts have clear space between their inward-facing studs. + for x in (-1,2): + eye=ba('47905',C.BLACK,(x,1,19/3),bl.Rotation.DEG_90) + tile=bl.Element('98138p07',C.WHITE) + bird.connect(tile,'antistud',to=eye.find_connector('stud',facing=bl.Direction.RIGHT if x==-1 else bl.Direction.LEFT),name='eye_'+str(x)) + ba('3003',C.RED,(0,-1,22/3),name='beak') + ba('3004',C.RED,(0,0,25/3)) + # Oversized top-hat brim, narrow crown and curved-looking upper edge. + ba('2456',C.BLACK,(-2,0,28/3),name='hat_brim') + ba('3002',C.BLACK,(-1,0,31/3),name='hat_crown') + ba('3002',C.BLACK,(-1,0,34/3)) + source=hinge.find_connector('hinge_2_on') + b.connect(bird,source,to=pivot.find_connector('hinge_2_in'),mounting=bl.Mounting(angle=180),name='bird') + return b + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + stock=json.load(open('/inputs/parts.json')) + excess=[] + for e,n in b.list_elements().items(): + if n>stock.get(e.ldraw_id,{}).get(e.color.name,0): excess.append((e.ldraw_id,e.color.name,n)) + t.check('inventory limits',not excess,str(excess)) + t.check('two red feet', all('toe_'+str(x) in b.names for x in (0,4))) + beak=b.named(['bird','beak']).bounding_box + t.check('beak dips inside cup', beak[0].z < 14/3 and beak[0].y >= 2 and beak[1].y <= 4+1e-6, str(beak)) + t.check('broad supporting feet', b.named('base').bounding_box[1].y <= 16) + t.check('top hat and eyes', all(n in b.named('bird').content.names for n in ('hat_brim','hat_crown','eye_-1','eye_2'))) + return t.report() diff --git a/brickwright/alt/alt-048/hero-1024.avif b/brickwright/alt/alt-048/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..1e26d40030b486490e6a70dc0e12d7dc28222cd6 Binary files /dev/null and b/brickwright/alt/alt-048/hero-1024.avif differ diff --git a/brickwright/alt/alt-048/model.mpd b/brickwright/alt/alt-048/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..60564a82508ff95b96707d8ed90fddc24edac02f --- /dev/null +++ b/brickwright/alt/alt-048/model.mpd @@ -0,0 +1,65 @@ +0 FILE main.ldr +0 main +0 Name: main +1 4 20 -24 40 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 20 -24 120 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 20 -24 200 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 20 -24 280 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 20 -24 10 1 0 0 0 1 0 0 0 1 85984.dat +1 4 100 -24 40 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 100 -24 120 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 100 -24 200 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 100 -24 280 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 100 -24 10 1 0 0 0 1 0 0 0 1 85984.dat +1 72 60 -32 140 0 0 -1 0 1 0 1 0 0 3029.dat +1 1 60 -40 60 1 0 0 0 1 0 0 0 1 3031.dat +1 71 60 -64 30 1 0 0 0 1 0 0 0 1 3010.dat +1 71 60 -64 90 1 0 0 0 1 0 0 0 1 3010.dat +1 71 30 -64 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 90 -64 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 60 -88 30 1 0 0 0 1 0 0 0 1 3010.dat +1 71 60 -88 90 1 0 0 0 1 0 0 0 1 3010.dat +1 71 30 -88 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 90 -88 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 60 -96 30 1 0 0 0 1 0 0 0 1 2431.dat +1 71 60 -96 90 1 0 0 0 1 0 0 0 1 2431.dat +1 71 30 -112 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 90 -112 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 30 -80 260 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 90 -80 260 0 0 -1 0 1 0 1 0 0 3245c.dat +1 72 60 -104 260 1 0 0 0 1 0 0 0 1 3001.dat +1 0 60 -112 260 0 0 1 0 1 0 -1 0 0 92582.dat +1 16 40 -128 256 1 0 0 0 0 -1 0 1 0 bird.ldr +0 FILE bird.ldr +0 bird +0 Name: bird +1 0 20 -8 10 1 0 0 0 1 0 0 0 1 60471.dat +1 4 20 -32 10 1 0 0 0 1 0 0 0 1 3004.dat +1 4 20 -64 10 1 0 0 0 1 0 0 0 1 3004.dat +1 4 20 -96 10 1 0 0 0 1 0 0 0 1 3004.dat +1 4 20 -120 10 1 0 0 0 1 0 0 0 1 3004.dat +1 322 0 -32 50 1 0 0 0 1 0 0 0 1 3660b.dat +1 322 0 -32 70 -1 0 0 0 1 0 0 0 -1 3660b.dat +1 322 40 -32 50 1 0 0 0 1 0 0 0 1 3660b.dat +1 322 40 -32 70 -1 0 0 0 1 0 0 0 -1 3660b.dat +1 1 20 -40 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 20 -64 40 1 0 0 0 1 0 0 0 1 3001.dat +1 321 20 -72 10 1 0 0 0 1 0 0 0 1 3023b.dat +1 322 -10 -88 50 1 0 0 0 1 0 0 0 1 50950.dat +1 322 10 -88 50 1 0 0 0 1 0 0 0 1 50950.dat +1 322 30 -88 50 1 0 0 0 1 0 0 0 1 50950.dat +1 322 50 -88 50 1 0 0 0 1 0 0 0 1 50950.dat +1 1 0 -64 70 -1 0 0 0 1 0 0 0 -1 3039.dat +1 1 40 -64 70 -1 0 0 0 1 0 0 0 -1 3039.dat +1 4 20 -144 10 1 0 0 0 1 0 0 0 1 3004.dat +1 322 20 -152 20 1 0 0 0 1 0 0 0 1 3020.dat +1 15 20 -176 10 1 0 0 0 1 0 0 0 1 3004.dat +1 0 -10 -176 30 0 0 -1 0 1 0 1 0 0 47905.dat +1 15 -28 -166 30 0 1 0 0 0 1 1 0 0 98138p07.dat +1 0 50 -176 30 0 0 -1 0 1 0 1 0 0 47905.dat +1 15 68 -166 30 0 -1 0 0 0 -1 1 0 0 98138p07.dat +1 4 20 -200 0 1 0 0 0 1 0 0 0 1 3003.dat +1 4 20 -224 10 1 0 0 0 1 0 0 0 1 3004.dat +1 0 20 -248 20 1 0 0 0 1 0 0 0 1 2456.dat +1 0 10 -272 20 1 0 0 0 1 0 0 0 1 3002.dat +1 0 10 -296 20 1 0 0 0 1 0 0 0 1 3002.dat diff --git a/brickwright/alt/alt-048/thumb-512.avif b/brickwright/alt/alt-048/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..8e1a560397f0bba98ddb449bb4e9d19f88864f90 Binary files /dev/null and b/brickwright/alt/alt-048/thumb-512.avif differ diff --git a/brickwright/alt/alt-048/trace.jsonl.gz b/brickwright/alt/alt-048/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..5aaf4bf260721874cc5a674abde8307708553fdc --- /dev/null +++ b/brickwright/alt/alt-048/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f32816fe936aa1325c9ea4fed13f8b3bf4d094cf39da0771287d376917d6999 +size 9868 diff --git a/brickwright/alt/alt-048/view-0.avif b/brickwright/alt/alt-048/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..85d0387dbfb88a3143dbab4ba5ae82ce8273fc6a Binary files /dev/null and b/brickwright/alt/alt-048/view-0.avif differ diff --git a/brickwright/alt/alt-048/view-1.avif b/brickwright/alt/alt-048/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..5e7c65e2c7b136c133548904dc893d74b1308361 Binary files /dev/null and b/brickwright/alt/alt-048/view-1.avif differ diff --git a/brickwright/alt/alt-048/view-2.avif b/brickwright/alt/alt-048/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..150abe5aab08234269da8b79ae02a34111f2cb61 Binary files /dev/null and b/brickwright/alt/alt-048/view-2.avif differ diff --git a/brickwright/alt/alt-048/view-3.avif b/brickwright/alt/alt-048/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..115f7266454c075ec1f2067a861e80c13e59de9b Binary files /dev/null and b/brickwright/alt/alt-048/view-3.avif differ diff --git a/brickwright/alt/alt-048/view-4.avif b/brickwright/alt/alt-048/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..bb4a199f2c7b481fd1dc02314f45abe1cc479208 Binary files /dev/null and b/brickwright/alt/alt-048/view-4.avif differ diff --git a/brickwright/alt/alt-048/view-5.avif b/brickwright/alt/alt-048/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..66d03d68be60ad9d49d32f23963eda33326760e4 Binary files /dev/null and b/brickwright/alt/alt-048/view-5.avif differ diff --git a/brickwright/alt/alt-048/view-6.avif b/brickwright/alt/alt-048/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..44ac9ca64a936eee625ec2f442180f66bcf80ed0 Binary files /dev/null and b/brickwright/alt/alt-048/view-6.avif differ diff --git a/brickwright/alt/alt-048/view-7.avif b/brickwright/alt/alt-048/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..179b1f438825f983ac37073cde426a2f4ced2514 Binary files /dev/null and b/brickwright/alt/alt-048/view-7.avif differ diff --git a/brickwright/alt/alt-049/build.py b/brickwright/alt/alt-049/build.py new file mode 100644 index 0000000000000000000000000000000000000000..e67a57637ec905e12fcaeba4f181402465ad2dda --- /dev/null +++ b/brickwright/alt/alt-049/build.py @@ -0,0 +1,81 @@ +import bricklayer as bl +from brickwright import TestContext +import json +from collections import Counter + + +def create_build(): + b = bl.LegoBuild() + C = bl.Color + def add(pid, color, pos, rot=bl.Rotation.DEG_0, name=None): + return b.add(bl.Element(pid, color), pos, rotation=rot, name=name) + # Three floor plates, tied together by the bench's rear cross-foot. + add('3029', C.DARK_BLUISH_GRAY, (0,4,0), name='rack_floor') + for x in (4,6): + add('3034', C.LIGHT_BLUISH_GRAY, (x,-4,0), bl.Rotation.DEG_90) + # Bench feet, spine and smooth upholstered pad. + for y in (-2,3): + add('3001', C.DARK_BLUISH_GRAY, (4,y,1/3)) + add('2456', C.BLACK, (5,-2,4/3), bl.Rotation.DEG_90, name='bench_pad') + for y in (-2,2): + add('87079', C.LIGHT_BLUISH_GRAY, (5,y,7/3), bl.Rotation.DEG_90) + # The rear two studs of the pad are supported on a matching black brick. + add('3004', C.BLACK, (5,4,4/3)) + add('3004', C.BLACK, (5,5,4/3)) + # A pair of tall steel uprights with wide, black stabilizer feet. + for x in (2,8): + add('3002', C.BLACK, (x-1,6,1/3)) + for z in (4/3,10/3): + add('3245c', C.LIGHT_BLUISH_GRAY, (x,6,z), name=f'upright_{x}_{z}') + # Flat, narrow bar, with outward-facing pin blocks at its ends. + left=add('2458', C.DARK_BLUISH_GRAY, (1,6,16/3), bl.Rotation.DEG_270, 'bar_left') + right=add('2458', C.DARK_BLUISH_GRAY, (10,6,16/3), bl.Rotation.DEG_90, 'bar_right') + for x in (2,6): + add('3010', C.LIGHT_BLUISH_GRAY, (x,6,16/3)) + # Tiled grip also locks the pin blocks to the bar. + for x in (1,5): + add('2431', C.LIGHT_BLUISH_GRAY, (x,6,19/3)) + add('3004', C.LIGHT_BLUISH_GRAY, (9,6,19/3)) + for n, block in enumerate((left,right)): + rim = b.connect(bl.Element('55981', C.BLACK), 'pin_hole', to=block.find_connector('pin'), mounting=bl.Mounting(offset=-0.6), name=f'barbell_disc_{n}') + b.connect(bl.Element('58090', C.BLACK), bl.Element('58090', C.BLACK).find_connector('fixed_8_on', toward=bl.Direction.BACK), to=rim.find_connector('fixed_8_in', toward=bl.Direction.BACK), name=f'barbell_weight_{n}') + # The smaller dumbbell is a loose, usable accessory lying alongside the pad. + axle = b.add_raw(bl.Element('2926', C.BLACK), bl.Pose(translation=bl.Position(-1,0,11/12)), name='dumbbell_handle') + for n, pin in enumerate(axle.find_connectors('hinge_3_in')): + wheel = b.connect(bl.Element('6014b', C.YELLOW), 'hinge_3_on', to=pin, name=f'dumbbell_hub_{n}') + tire = bl.Element('87697', C.BLACK) + b.connect(tire, tire.find_connector('fixed_13_on', toward=bl.Direction.BACK), to=wheel.find_connector('fixed_13_in', toward=bl.Direction.BACK), name=f'dumbbell_weight_{n}') + # A smooth mat lets the loose discs rest without clashing with floor studs. + add('87079', C.LIGHT_BLUISH_GRAY, (0,4,1/3)) + # Two spare discs, with yellow hubs, leaned against the left rack foot. + for n in range(2): + disc = bl.LegoBuild() + hub = disc.add_raw(bl.Element('6014b', C.YELLOW)) + tire = bl.Element('87697', C.BLACK) + disc.connect(tire, tire.find_connector('fixed_13_on', toward=bl.Direction.BACK), to=hub.find_connector('fixed_13_in', toward=bl.Direction.BACK)) + rotation = bl.rotation_about(bl.Vec3(1,0,0), -12) + tilted = bl.LegoBuild() + tilted.add_raw(disc, bl.Pose(rotation=rotation)) + floor = 2/3 + # The polygonal tyre contact sits slightly inside its conservative box. + z = floor - tilted.bounding_box[0].z - 0.025 + b.add_raw(tilted, bl.Pose(translation=bl.Position(0.1+2.5*n,5.4,z)), name=f'spare_weight_{n}') + return b + + +def run_tests(): + b = create_build() + tests = TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + # The rack/bench, loose dumbbell and two loose spare weights are four assemblies. + tests.check_connected(expected_components=4) + inventory = json.load(open('/inputs/parts.json')) + used = Counter((p.content.ldraw_id, p.content.color.name) for p in b.flattened_placements) + tests.check('inventory limits', all(n <= inventory.get(pid, {}).get(c,0) for (pid,c),n in used.items()), str(used)) + tests.check('two large barbell weights', sum(p.content.ldraw_id == '58090' for p in b.flattened_placements) == 2) + tests.check('dumbbell and two spare discs', sum(p.content.ldraw_id == '87697' for p in b.flattened_placements) == 4) + tests.check('bench between the uprights', b.named('upright_2_1.3333333333333333').center.x < b.named('bench_pad').center.x < b.named('upright_8_1.3333333333333333').center.x) + tests.check('bar above bench', b.named('bar_left').center.z > b.named('bench_pad').center.z + 2) + tests.check('spare discs are tilted', all(abs(b.named(f'spare_weight_{n}').content.placements[0].pose.rotation.entries[1][2]) > 0.1 for n in range(2))) + return tests.report() diff --git a/brickwright/alt/alt-049/hero-1024.avif b/brickwright/alt/alt-049/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..0baa0aed9d7a1bd346a89c4eeaf2a3a931b32780 Binary files /dev/null and b/brickwright/alt/alt-049/hero-1024.avif differ diff --git a/brickwright/alt/alt-049/model.mpd b/brickwright/alt/alt-049/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..0e9a6d3a331333c6e5fd2451595dcc0449df56a5 --- /dev/null +++ b/brickwright/alt/alt-049/model.mpd @@ -0,0 +1,56 @@ +0 FILE main.ldr +0 main +0 Name: main +1 72 120 -8 120 1 0 0 0 1 0 0 0 1 3029.dat +1 71 100 -8 0 0 0 -1 0 1 0 1 0 0 3034.dat +1 71 140 -8 0 0 0 -1 0 1 0 1 0 0 3034.dat +1 72 120 -32 -20 1 0 0 0 1 0 0 0 1 3001.dat +1 72 120 -32 80 1 0 0 0 1 0 0 0 1 3001.dat +1 0 120 -56 20 0 0 -1 0 1 0 1 0 0 2456.dat +1 71 120 -64 0 0 0 -1 0 1 0 1 0 0 87079.dat +1 71 120 -64 80 0 0 -1 0 1 0 1 0 0 87079.dat +1 0 120 -56 90 1 0 0 0 1 0 0 0 1 3004.dat +1 0 120 -56 110 1 0 0 0 1 0 0 0 1 3004.dat +1 0 50 -32 140 1 0 0 0 1 0 0 0 1 3002.dat +1 71 60 -80 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 60 -128 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 0 170 -32 140 1 0 0 0 1 0 0 0 1 3002.dat +1 71 180 -80 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 180 -128 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 72 30 -152 140 0 0 1 0 1 0 -1 0 0 2458.dat +1 72 210 -152 140 0 0 -1 0 1 0 1 0 0 2458.dat +1 71 80 -152 130 1 0 0 0 1 0 0 0 1 3010.dat +1 71 160 -152 130 1 0 0 0 1 0 0 0 1 3010.dat +1 71 60 -160 130 1 0 0 0 1 0 0 0 1 2431.dat +1 71 140 -160 130 1 0 0 0 1 0 0 0 1 2431.dat +1 71 200 -176 130 1 0 0 0 1 0 0 0 1 3004.dat +1 0 -3 -142 140 0 0 1 0 1 0 -1 0 0 55981.dat +1 0 -3 -142 140 0 0 1 0 1 0 -1 0 0 58090.dat +1 0 243 -142 140 0 0 -1 0 1 0 1 0 0 55981.dat +1 0 243 -142 140 0 0 1 0 1 0 -1 0 0 58090.dat +1 0 -20 -30 0 1 0 0 0 1 0 0 0 1 2926.dat +1 14 -70 -25 0 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 -76 -25 0 0 0 1 -1 0 0 0 -1 0 87697.dat +1 14 30 -25 0 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 36 -25 0 0 0 1 -1 0 0 0 -1 0 87697.dat +1 71 40 -16 100 1 0 0 0 1 0 0 0 1 87079.dat +1 16 2 -41.516984 108 1 0 0 0 1 0 0 0 1 spare_weight_0.ldr +1 16 52 -41.516984 108 1 0 0 0 1 0 0 0 1 spare_weight_1.ldr +0 FILE spare_weight_0.ldr +0 spare_weight_0 +0 Name: spare_weight_0 +1 16 0 0 0 1 0 0 0 0.978148 0.207912 0 -0.207912 0.978148 submodel.ldr +0 FILE spare_weight_1.ldr +0 spare_weight_1 +0 Name: spare_weight_1 +1 16 0 0 0 1 0 0 0 0.978148 0.207912 0 -0.207912 0.978148 submodel_2.ldr +0 FILE submodel.ldr +0 submodel +0 Name: submodel +1 14 0 0 0 1 0 0 0 1 0 0 0 1 6014b.dat +1 0 0 0 -6 1 0 0 0 1 0 0 0 1 87697.dat +0 FILE submodel_2.ldr +0 submodel_2 +0 Name: submodel_2 +1 14 0 0 0 1 0 0 0 1 0 0 0 1 6014b.dat +1 0 0 0 -6 1 0 0 0 1 0 0 0 1 87697.dat diff --git a/brickwright/alt/alt-049/thumb-512.avif b/brickwright/alt/alt-049/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..8174b6e5eda7402343c2b34d2c9ab17a5b68dda1 Binary files /dev/null and b/brickwright/alt/alt-049/thumb-512.avif differ diff --git a/brickwright/alt/alt-049/trace.jsonl.gz b/brickwright/alt/alt-049/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..61cf84496d6c5d9e370b04f7759d77dbe354956c --- /dev/null +++ b/brickwright/alt/alt-049/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a9fc53533bced90755ed76c121b76ff35a6ff29b740fbcc33bf8bdc072d5482 +size 7488 diff --git a/brickwright/alt/alt-049/view-0.avif b/brickwright/alt/alt-049/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..ed3cc050af3d9cd5b0bb889e3cc9a5770e3e3f2b Binary files /dev/null and b/brickwright/alt/alt-049/view-0.avif differ diff --git a/brickwright/alt/alt-049/view-1.avif b/brickwright/alt/alt-049/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..efddc49c6c7e5212c65c887fe0e841d49c729ff0 Binary files /dev/null and b/brickwright/alt/alt-049/view-1.avif differ diff --git a/brickwright/alt/alt-049/view-2.avif b/brickwright/alt/alt-049/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..fb34ce8f18bb1357b403b22e399973ed02d33cfe Binary files /dev/null and b/brickwright/alt/alt-049/view-2.avif differ diff --git a/brickwright/alt/alt-049/view-3.avif b/brickwright/alt/alt-049/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..5724ab64bcbcc7024c0766e6b52b022c8ae1e5ef Binary files /dev/null and b/brickwright/alt/alt-049/view-3.avif differ diff --git a/brickwright/alt/alt-049/view-4.avif b/brickwright/alt/alt-049/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..fa5a98411b016a5e21a52fc19acdf5949e833363 Binary files /dev/null and b/brickwright/alt/alt-049/view-4.avif differ diff --git a/brickwright/alt/alt-049/view-5.avif b/brickwright/alt/alt-049/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..335d8c47d193521696837da7157859b72b04cfc3 Binary files /dev/null and b/brickwright/alt/alt-049/view-5.avif differ diff --git a/brickwright/alt/alt-049/view-6.avif b/brickwright/alt/alt-049/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..2c45b6b1df375a74296d63edf0ea3dda0c6fd268 Binary files /dev/null and b/brickwright/alt/alt-049/view-6.avif differ diff --git a/brickwright/alt/alt-049/view-7.avif b/brickwright/alt/alt-049/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..bbdd34fdcfc14eed7d77cf2ea8ef5079bf97c037 Binary files /dev/null and b/brickwright/alt/alt-049/view-7.avif differ diff --git a/brickwright/alt/alt-050/build.py b/brickwright/alt/alt-050/build.py new file mode 100644 index 0000000000000000000000000000000000000000..31e307da25824e996585fbd416386cc9a81e6223 --- /dev/null +++ b/brickwright/alt/alt-050/build.py @@ -0,0 +1,78 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + C=bl.Color + def add(pid,c,x,y,z,r=bl.Rotation.DEG_0,name=None): + return b.add(bl.Element(pid,c),(x,y,z),rotation=r,name=name) + # Two real wheel trucks, each carrying two yellow hubs and black rubber tyres. + for k,y in enumerate((2,6)): + truck=add('2926',C.BLACK,0,y,2/3,name=f'truck_{k}') + for j,d in enumerate((bl.Direction.LEFT,bl.Direction.RIGHT)): + rim=b.connect(bl.Element('6014b',C.YELLOW),'hinge_3_on',to=truck.find_connector('hinge_3_in',toward=d),name=f'hub_{k}_{j}') + tyre=bl.Element('87697',C.BLACK) + b.connect(tyre,tyre.find_connector('fixed_13_on',facing=bl.Direction.BACK),to=rim.find_connector('fixed_13_in',facing=d),name=f'wheel_{k}_{j}') + for x in (0,2): + add('3034',C.LIGHT_BLUISH_GRAY,x,0,1,bl.Rotation.DEG_90,name=f'sole_{x}') + # A black raised heel and blue forefoot, above the thin chassis. + for x in (0,2): + add('3002',C.BLACK,x,5,4/3,bl.Rotation.DEG_90,name=f'heel_{x}') + add('3004',C.BLACK,0,4,4/3) + add('3004',C.BLACK,2,4,4/3) + for y in (0,2): + add('3001',C.BLUE,0,y,4/3) + # Rounded/sloped toe, then full-width instep. + for x in (0,2): + add('3039',C.BLUE,x,0,7/3) + for y in (2,4,6): + add('3001',C.BLUE,0,y,7/3) + for x in (0,2): + add('3039',C.BLUE,x,2,10/3) + for y in (4,6): + add('3001',C.MEDIUM_AZURE,0,y,10/3) + # Ankle shaft: blue front with white transverse laces, solid lower ankle. + for level in range(2): + z=13/3+level + face=add('30414',C.BLUE,0,4,z,name=f'lace_mount_{level}') + lace=bl.Element('3069b',C.WHITE) + b.connect(lace,lace.find_connector('antistud',toward=bl.Direction.RIGHT),to=face.find_connector('stud',facing=bl.Direction.FRONT,toward=(1.5,4,z+0.5)),target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90),name=f'lace_{level}') + for x in (0,2): + add('3002',C.BLUE,x,5,z,bl.Rotation.DEG_90) + # Upper ankle is open, with a dark-blue collar around its cavity. + for z in (19/3,22/3): + for x in (0,2): + add('3004',C.DARK_BLUE,x,4,z) + add('3004',C.DARK_BLUE,x,7,z) + for x in (0,3): + add('3004',C.DARK_BLUE,x,5,z,bl.Rotation.DEG_90) + # A red stop projects below and forward of the toe; it is attached to the sole. + add('3003',C.RED,1,-1,0,name='toe_stop') + return bl.translate_to_ground(b) + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + allowed=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + bad={str(k):v for k,v in used.items() if v>allowed.get(k[0],{}).get(k[1],0)} + tests.check('Inventory limits',not bad,str(bad)) + tests.check('Four rubber wheels',sum(v for (p,c),v in used.items() if p=='87697')==4) + tests.check('Tall blue boot',b.height>7 and sum(v for (p,c),v in used.items() if c in ('BLUE','DARK_BLUE','MEDIUM_AZURE'))>=20) + tests.check('Red front toe stop',used[('3003','RED')]==1) + heel=b.named('heel_0').bounding_box + rear=b.named('wheel_1_0').bounding_box + stop=b.named('toe_stop').bounding_box + sole=b.named('sole_0').bounding_box + tests.check('Raised black heel',used[('3002','BLACK')]==2 and heel[1].z>rear[1].z) + tests.check('Stop projects down and forward',stop[0].yINVENTORY.get(pid,{}).get(col,0): + raise ValueError(f'Inventory exceeded: {pid} {col} {used[(pid,col)]}') + return b.add(bl.Element(pid,getattr(bl.Color,col)),pos,rotation=rot,name=name) + def box(x,y,w,d,z,palette,ids): + # Tile a rectangular structural course, selecting only inventory stock. + cells={(a,c) for a in range(x,x+w) for c in range(y,y+d)} + options=[] + for color in palette: + for pid in ids: + e=bl.Element(pid,getattr(bl.Color,color)) + for r in (bl.Rotation.DEG_0,bl.Rotation.DEG_90): + ww,dd=e.rotated_footprint(r) + options.append((color,pid,r,ww,dd)) + def solve(left,counts): + if not left:return [] + a,c=min(left,key=lambda q:(q[1],q[0])) + for color,pid,r,ww,dd in options: + key=(pid,color) + if used[key]+counts[key]>=INVENTORY.get(pid,{}).get(color,0):continue + cover={(i,j) for i in range(a,a+ww) for j in range(c,c+dd)} + if cover<=left: + counts[key]+=1 + result=solve(left-cover,counts) + if result is not None:return [(pid,color,(a,c,z),r)]+result + counts[key]-=1 + return None + result=solve(cells,Counter()) + if result is None:raise ValueError(f'Cannot fill {x,y,w,d,z,palette}') + for pid,color,pos,r in result:add(pid,color,pos,r) + bricks=['2456','3001','3002','3003','3010','3004','3005'] + add('91405','BRIGHT_GREEN',(0,0,0),name='flood_base') + # A raised flood surface surrounds the submerged lower house. + for x,y,w,d in [(0,0,16,7),(0,7,2,8),(14,7,2,8),(0,15,16,1)]: + box(x,y,w,d,1/3,['DARK_GREEN','GREEN','LIME','DARK_TAN','BRIGHT_GREEN'],bricks) + box(x,y,w,d,4/3,['MEDIUM_AZURE','DARK_AZURE','BLUE','DARK_BLUE'],bricks) + # Submerged masonry, front door recessed between two window bays. + for z in [1/3,4/3]: + for x,y,w,d in [(2,7,5,1),(11,7,3,1),(2,8,1,7),(13,8,1,7),(3,14,10,1)]: + box(x,y,w,d,z,['BRIGHT_PINK','LIME','MEDIUM_LAVENDER','MAGENTA','DARK_GREEN','RED','WHITE','DARK_RED','YELLOWISH_GREEN'],['3009','3010','3004','3005']) + # Six-brick entrance and two open window frames at flood level. + frame=add('60596','BLACK',(7,7,1/3),name='front_door') + leaf=bl.Element('60623',bl.Color.YELLOW) + b.connect(leaf,'hinge_9_in',to=frame.find_connector('hinge_9_on',toward=bl.Direction.RIGHT),target_rotation=bl.Rotation.DEG_0,name='door_leaf') + used[('60623','YELLOW')]+=1 + for x in [3,11]: + f=add('60593','TAN',(x,7,7/3),name=f'window_{x}') + + # Slender gray corner and door posts; sunny yellow side walls. + for x in [2,13]: + for z in [7/3,13/3]: + add('3245c','LIGHT_BLUISH_GRAY',(x,7,z),bl.Rotation.DEG_90) + for z in [7/3,10/3,13/3]: + box(5,7,2,1,z,['BRIGHT_LIGHT_YELLOW','ORANGE'],['3004']) + for z in [7/3,10/3,13/3,16/3]: + for x,y,w,d in [(2,9,1,5),(13,9,1,5),(2,14,12,1)]: + box(x,y,w,d,z,['BRIGHT_LIGHT_YELLOW','ORANGE','MEDIUM_NOUGAT','TAN','LIGHT_BLUISH_GRAY'],['3010','3622','3004','3005']) + box(3,7,4,1,16/3,['BRIGHT_LIGHT_YELLOW','ORANGE','LIGHT_BLUISH_GRAY','MEDIUM_NOUGAT','TAN'],['3010','3004']) + box(11,7,2,1,16/3,['LIGHT_BLUISH_GRAY','MEDIUM_NOUGAT','TAN'],['3004']) + # Roof deck ties the four walls together, front and rear sloping eaves. + add('3028','BRIGHT_GREEN',(2,7,19/3),name='roof_deck_front') + add('3029','DARK_BLUISH_GRAY',(2,11,20/3),name='roof_deck_back') + # rear deck support on the back wall (front overlap sits on the lower plate) + add('3034','LIGHT_BLUISH_GRAY',(2,13,19/3)) + add('3020','TAN',(10,13,19/3)) + for y,z,r in [(7,20/3,bl.Rotation.DEG_0),(13,7,bl.Rotation.DEG_180)]: + for x in [2,6]:add('3037','MAGENTA',(x,y,z),r) + for x in [10,12]:add('3039','MAGENTA',(x,y,z),r) + # Low, flat central roof terrace with a contrasting cap. + box(2,9,12,2,20/3,['BLACK','DARK_RED'],bricks) + box(2,11,12,2,7,['BLACK','DARK_RED'],bricks) + for x in [2,6,10]:add('87079','LIGHT_BLUISH_GRAY',(x,9,23/3)) + # Chimney rises at the left rear of the refuge. + for z in [8,9,10]:add('3003','DARK_RED',(3,11,z),name=f'chimney_{z}') + add('3003','DARK_TAN',(3,11,11)) + add('14769','DARK_BLUISH_GRAY',(3,11,12),name='chimney_cap') + # A compact brick-built resident: black legs, red coat, + # yellow hands and face, and brown hair. + for x in [9,10]: + add('3004','BLACK',(x,11,8),bl.Rotation.DEG_90) + add('3001','RED',(8,11,9),name='person_coat') + add('3005','YELLOW',(8,11,8),name='left_hand') + add('3005','YELLOW',(11,11,8),name='right_hand') + add('3003','YELLOW',(9,11,10),name='person_head') + add('3002','REDDISH_BROWN',(8,11,11),name='person_hair') + # Small open rescue skiff, with brown gunwales and tan seating. + add('3795','REDDISH_BROWN',(8,3,7/3),name='boat_keel') + add('3795','REDDISH_BROWN',(8,5,7/3)) + add('15207','REDDISH_BROWN',(9,3,8/3),name='boat_near_gunwale') + add('15207','REDDISH_BROWN',(9,6,8/3),bl.Rotation.DEG_180,name='boat_far_gunwale') + for y in [3,5]: + add('3660b','REDDISH_BROWN',(7,y,8/3),bl.Rotation.DEG_270) + add('3660b','REDDISH_BROWN',(13,y,8/3),bl.Rotation.DEG_90) + add('3022','TAN',(10,4,8/3)) + add('3068b','DARK_TAN',(10,4,3),name='boat_bench') + return b + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + actual=b.list_elements() + bad=[(e.ldraw_id,e.color.name,n) for e,n in actual.items() if n>INVENTORY.get(e.ldraw_id,{}).get(e.color.name,0)] + t.check('Inventory quantities and colors',not bad,str(bad)) + t.check('Flood reaches both window sills',all(abs(b.named(f'window_{x}').alignment_box[0].z-7/3)<1e-6 for x in [3,11]),'Water surface and sills at 2 1/3 bricks') + t.check('Boat beside entrance','boat_keel' in b.names,'Open boat immediately in front of entrance') + t.check('Person on roof next to chimney',b.named('person_head').center.z>b.named('roof_deck_back').center.z and 'chimney_cap' in b.names,'Brick-built resident and tall chimney') + return t.report() diff --git a/brickwright/alt/alt-051/hero-1024.avif b/brickwright/alt/alt-051/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..f0b298b1b857006a41883ed6dde47ff3204c7e91 Binary files /dev/null and b/brickwright/alt/alt-051/hero-1024.avif differ diff --git a/brickwright/alt/alt-051/model.mpd b/brickwright/alt/alt-051/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..b0f2bfe59c95dbc83c2b8a8b830095eda8de2b28 --- /dev/null +++ b/brickwright/alt/alt-051/model.mpd @@ -0,0 +1,203 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 288 40 -32 20 1 0 0 0 1 0 0 0 1 3001.dat +1 288 120 -32 20 1 0 0 0 1 0 0 0 1 3001.dat +1 288 200 -32 20 1 0 0 0 1 0 0 0 1 3001.dat +1 288 280 -32 20 1 0 0 0 1 0 0 0 1 3001.dat +1 288 20 -32 50 1 0 0 0 1 0 0 0 1 3004.dat +1 288 60 -32 50 1 0 0 0 1 0 0 0 1 3004.dat +1 288 100 -32 50 1 0 0 0 1 0 0 0 1 3004.dat +1 288 140 -32 50 1 0 0 0 1 0 0 0 1 3004.dat +1 288 180 -32 50 1 0 0 0 1 0 0 0 1 3004.dat +1 288 220 -32 50 1 0 0 0 1 0 0 0 1 3004.dat +1 288 260 -32 50 1 0 0 0 1 0 0 0 1 3004.dat +1 288 300 -32 50 1 0 0 0 1 0 0 0 1 3004.dat +1 2 40 -32 80 1 0 0 0 1 0 0 0 1 3001.dat +1 2 120 -32 80 1 0 0 0 1 0 0 0 1 3001.dat +1 2 200 -32 80 1 0 0 0 1 0 0 0 1 3001.dat +1 2 280 -32 80 1 0 0 0 1 0 0 0 1 3001.dat +1 2 20 -32 120 1 0 0 0 1 0 0 0 1 3003.dat +1 2 60 -32 120 1 0 0 0 1 0 0 0 1 3003.dat +1 2 100 -32 120 1 0 0 0 1 0 0 0 1 3003.dat +1 2 140 -32 120 1 0 0 0 1 0 0 0 1 3003.dat +1 27 200 -32 120 1 0 0 0 1 0 0 0 1 3001.dat +1 27 280 -32 120 1 0 0 0 1 0 0 0 1 3001.dat +1 322 40 -56 20 1 0 0 0 1 0 0 0 1 3001.dat +1 322 120 -56 20 1 0 0 0 1 0 0 0 1 3001.dat +1 322 200 -56 20 1 0 0 0 1 0 0 0 1 3001.dat +1 322 280 -56 20 1 0 0 0 1 0 0 0 1 3001.dat +1 322 20 -56 60 1 0 0 0 1 0 0 0 1 3003.dat +1 322 60 -56 60 1 0 0 0 1 0 0 0 1 3003.dat +1 322 100 -56 60 1 0 0 0 1 0 0 0 1 3003.dat +1 322 140 -56 60 1 0 0 0 1 0 0 0 1 3003.dat +1 322 200 -56 50 1 0 0 0 1 0 0 0 1 3010.dat +1 322 280 -56 50 1 0 0 0 1 0 0 0 1 3010.dat +1 322 200 -56 70 1 0 0 0 1 0 0 0 1 3010.dat +1 322 280 -56 70 1 0 0 0 1 0 0 0 1 3010.dat +1 322 20 -56 90 1 0 0 0 1 0 0 0 1 3004.dat +1 322 60 -56 90 1 0 0 0 1 0 0 0 1 3004.dat +1 322 100 -56 90 1 0 0 0 1 0 0 0 1 3004.dat +1 322 140 -56 90 1 0 0 0 1 0 0 0 1 3004.dat +1 321 200 -56 100 1 0 0 0 1 0 0 0 1 3001.dat +1 321 280 -56 100 1 0 0 0 1 0 0 0 1 3001.dat +1 321 40 -56 120 1 0 0 0 1 0 0 0 1 3001.dat +1 321 120 -56 120 1 0 0 0 1 0 0 0 1 3001.dat +1 321 180 -56 130 1 0 0 0 1 0 0 0 1 3004.dat +1 321 220 -56 130 1 0 0 0 1 0 0 0 1 3004.dat +1 321 260 -56 130 1 0 0 0 1 0 0 0 1 3004.dat +1 321 300 -56 130 1 0 0 0 1 0 0 0 1 3004.dat +1 27 20 -32 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 27 20 -32 260 0 0 -1 0 1 0 1 0 0 3001.dat +1 321 20 -56 150 1 0 0 0 1 0 0 0 1 3004.dat +1 321 20 -56 170 1 0 0 0 1 0 0 0 1 3004.dat +1 321 20 -56 190 1 0 0 0 1 0 0 0 1 3004.dat +1 321 20 -56 210 1 0 0 0 1 0 0 0 1 3004.dat +1 1 20 -56 260 0 0 -1 0 1 0 1 0 0 3001.dat +1 27 300 -32 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 27 300 -32 260 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 300 -56 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 300 -56 260 0 0 -1 0 1 0 1 0 0 3001.dat +1 27 20 -32 310 1 0 0 0 1 0 0 0 1 3004.dat +1 27 60 -32 310 1 0 0 0 1 0 0 0 1 3004.dat +1 27 100 -32 310 1 0 0 0 1 0 0 0 1 3004.dat +1 27 140 -32 310 1 0 0 0 1 0 0 0 1 3004.dat +1 27 170 -32 310 1 0 0 0 1 0 0 0 1 3005.dat +1 27 190 -32 310 1 0 0 0 1 0 0 0 1 3005.dat +1 27 210 -32 310 1 0 0 0 1 0 0 0 1 3005.dat +1 27 230 -32 310 1 0 0 0 1 0 0 0 1 3005.dat +1 27 250 -32 310 1 0 0 0 1 0 0 0 1 3005.dat +1 27 270 -32 310 1 0 0 0 1 0 0 0 1 3005.dat +1 27 290 -32 310 1 0 0 0 1 0 0 0 1 3005.dat +1 27 310 -32 310 1 0 0 0 1 0 0 0 1 3005.dat +1 272 20 -56 310 1 0 0 0 1 0 0 0 1 3004.dat +1 272 60 -56 310 1 0 0 0 1 0 0 0 1 3004.dat +1 272 100 -56 310 1 0 0 0 1 0 0 0 1 3004.dat +1 272 140 -56 310 1 0 0 0 1 0 0 0 1 3004.dat +1 272 180 -56 310 1 0 0 0 1 0 0 0 1 3004.dat +1 272 220 -56 310 1 0 0 0 1 0 0 0 1 3004.dat +1 272 260 -56 310 1 0 0 0 1 0 0 0 1 3004.dat +1 272 300 -56 310 1 0 0 0 1 0 0 0 1 3004.dat +1 29 80 -32 150 1 0 0 0 1 0 0 0 1 3010.dat +1 29 130 -32 150 1 0 0 0 1 0 0 0 1 3005.dat +1 29 240 -32 150 1 0 0 0 1 0 0 0 1 3004.dat +1 29 270 -32 150 1 0 0 0 1 0 0 0 1 3005.dat +1 29 50 -32 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 29 50 -32 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 29 50 -32 290 1 0 0 0 1 0 0 0 1 3005.dat +1 29 270 -32 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 29 270 -32 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 29 270 -32 290 1 0 0 0 1 0 0 0 1 3005.dat +1 29 100 -32 290 1 0 0 0 1 0 0 0 1 3010.dat +1 29 160 -32 290 1 0 0 0 1 0 0 0 1 3004.dat +1 29 200 -32 290 1 0 0 0 1 0 0 0 1 3004.dat +1 29 240 -32 290 1 0 0 0 1 0 0 0 1 3004.dat +1 29 60 -56 150 1 0 0 0 1 0 0 0 1 3004.dat +1 29 100 -56 150 1 0 0 0 1 0 0 0 1 3004.dat +1 29 130 -56 150 1 0 0 0 1 0 0 0 1 3005.dat +1 29 230 -56 150 1 0 0 0 1 0 0 0 1 3005.dat +1 30 250 -56 150 1 0 0 0 1 0 0 0 1 3005.dat +1 30 270 -56 150 1 0 0 0 1 0 0 0 1 3005.dat +1 30 50 -56 170 1 0 0 0 1 0 0 0 1 3005.dat +1 30 50 -56 190 1 0 0 0 1 0 0 0 1 3005.dat +1 30 50 -56 210 1 0 0 0 1 0 0 0 1 3005.dat +1 30 50 -56 230 1 0 0 0 1 0 0 0 1 3005.dat +1 26 50 -56 250 1 0 0 0 1 0 0 0 1 3005.dat +1 26 50 -56 270 1 0 0 0 1 0 0 0 1 3005.dat +1 26 50 -56 290 1 0 0 0 1 0 0 0 1 3005.dat +1 26 270 -56 170 1 0 0 0 1 0 0 0 1 3005.dat +1 4 270 -56 240 0 0 -1 0 1 0 1 0 0 3009.dat +1 4 120 -56 290 1 0 0 0 1 0 0 0 1 3009.dat +1 4 200 -56 290 1 0 0 0 1 0 0 0 1 3004.dat +1 4 240 -56 290 1 0 0 0 1 0 0 0 1 3004.dat +1 0 180 -152 150 -1 0 0 0 1 0 0 0 -1 60596.dat +1 14 148 -152 145 1 0 0 0 1 0 0 0 1 60623.dat +1 19 80 -128 150 1 0 0 0 1 0 0 0 1 60593.dat +1 19 240 -128 150 1 0 0 0 1 0 0 0 1 60593.dat +1 71 50 -104 160 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 50 -152 160 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 270 -104 160 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 270 -152 160 0 0 -1 0 1 0 1 0 0 3245c.dat +1 226 120 -80 150 1 0 0 0 1 0 0 0 1 3004.dat +1 226 120 -104 150 1 0 0 0 1 0 0 0 1 3004.dat +1 226 120 -128 150 1 0 0 0 1 0 0 0 1 3004.dat +1 226 50 -80 220 0 0 -1 0 1 0 1 0 0 3010.dat +1 84 50 -80 270 1 0 0 0 1 0 0 0 1 3005.dat +1 226 270 -80 220 0 0 -1 0 1 0 1 0 0 3010.dat +1 84 270 -80 270 1 0 0 0 1 0 0 0 1 3005.dat +1 226 80 -80 290 1 0 0 0 1 0 0 0 1 3010.dat +1 226 160 -80 290 1 0 0 0 1 0 0 0 1 3010.dat +1 226 240 -80 290 1 0 0 0 1 0 0 0 1 3010.dat +1 226 50 -104 220 0 0 -1 0 1 0 1 0 0 3010.dat +1 84 50 -104 270 1 0 0 0 1 0 0 0 1 3005.dat +1 226 270 -104 220 0 0 -1 0 1 0 1 0 0 3010.dat +1 84 270 -104 270 1 0 0 0 1 0 0 0 1 3005.dat +1 226 80 -104 290 1 0 0 0 1 0 0 0 1 3010.dat +1 226 140 -104 290 1 0 0 0 1 0 0 0 1 3004.dat +1 226 180 -104 290 1 0 0 0 1 0 0 0 1 3004.dat +1 226 220 -104 290 1 0 0 0 1 0 0 0 1 3004.dat +1 226 260 -104 290 1 0 0 0 1 0 0 0 1 3004.dat +1 226 50 -128 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 50 -128 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 50 -128 270 1 0 0 0 1 0 0 0 1 3005.dat +1 25 270 -128 220 0 0 -1 0 1 0 1 0 0 3010.dat +1 84 270 -128 270 1 0 0 0 1 0 0 0 1 3005.dat +1 25 80 -128 290 1 0 0 0 1 0 0 0 1 3010.dat +1 25 160 -128 290 1 0 0 0 1 0 0 0 1 3010.dat +1 25 240 -128 290 1 0 0 0 1 0 0 0 1 3010.dat +1 25 50 -152 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 50 -152 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 50 -152 270 1 0 0 0 1 0 0 0 1 3005.dat +1 25 270 -152 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 270 -152 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 270 -152 270 1 0 0 0 1 0 0 0 1 3005.dat +1 25 60 -152 290 1 0 0 0 1 0 0 0 1 3004.dat +1 25 100 -152 290 1 0 0 0 1 0 0 0 1 3004.dat +1 25 140 -152 290 1 0 0 0 1 0 0 0 1 3004.dat +1 25 180 -152 290 1 0 0 0 1 0 0 0 1 3004.dat +1 25 220 -152 290 1 0 0 0 1 0 0 0 1 3004.dat +1 25 260 -152 290 1 0 0 0 1 0 0 0 1 3004.dat +1 25 80 -152 150 1 0 0 0 1 0 0 0 1 3004.dat +1 71 120 -152 150 1 0 0 0 1 0 0 0 1 3004.dat +1 71 240 -152 150 1 0 0 0 1 0 0 0 1 3004.dat +1 10 160 -160 200 1 0 0 0 1 0 0 0 1 3028.dat +1 72 160 -168 260 1 0 0 0 1 0 0 0 1 3029.dat +1 71 120 -160 280 1 0 0 0 1 0 0 0 1 3034.dat +1 19 240 -160 280 1 0 0 0 1 0 0 0 1 3020.dat +1 26 80 -184 170 1 0 0 0 1 0 0 0 1 3037.dat +1 26 160 -184 170 1 0 0 0 1 0 0 0 1 3037.dat +1 26 220 -184 170 1 0 0 0 1 0 0 0 1 3039.dat +1 26 260 -184 170 1 0 0 0 1 0 0 0 1 3039.dat +1 26 80 -192 270 -1 0 0 0 1 0 0 0 -1 3037.dat +1 26 160 -192 270 -1 0 0 0 1 0 0 0 -1 3037.dat +1 26 220 -192 270 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 260 -192 270 -1 0 0 0 1 0 0 0 -1 3039.dat +1 0 100 -184 200 1 0 0 0 1 0 0 0 1 2456.dat +1 0 220 -184 200 1 0 0 0 1 0 0 0 1 2456.dat +1 0 70 -192 240 1 0 0 0 1 0 0 0 1 3002.dat +1 0 130 -192 240 1 0 0 0 1 0 0 0 1 3002.dat +1 0 190 -192 240 1 0 0 0 1 0 0 0 1 3002.dat +1 0 250 -192 240 1 0 0 0 1 0 0 0 1 3002.dat +1 71 80 -192 200 1 0 0 0 1 0 0 0 1 87079.dat +1 71 160 -192 200 1 0 0 0 1 0 0 0 1 87079.dat +1 71 240 -192 200 1 0 0 0 1 0 0 0 1 87079.dat +1 320 80 -216 240 1 0 0 0 1 0 0 0 1 3003.dat +1 320 80 -240 240 1 0 0 0 1 0 0 0 1 3003.dat +1 320 80 -264 240 1 0 0 0 1 0 0 0 1 3003.dat +1 28 80 -288 240 1 0 0 0 1 0 0 0 1 3003.dat +1 72 80 -296 240 1 0 0 0 1 0 0 0 1 14769.dat +1 0 190 -216 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 210 -216 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 200 -240 240 1 0 0 0 1 0 0 0 1 3001.dat +1 14 170 -216 230 1 0 0 0 1 0 0 0 1 3005.dat +1 14 230 -216 230 1 0 0 0 1 0 0 0 1 3005.dat +1 14 200 -264 240 1 0 0 0 1 0 0 0 1 3003.dat +1 70 190 -288 240 1 0 0 0 1 0 0 0 1 3002.dat +1 70 220 -64 80 1 0 0 0 1 0 0 0 1 3795.dat +1 70 220 -64 120 1 0 0 0 1 0 0 0 1 3795.dat +1 70 220 -88 70 1 0 0 0 1 0 0 0 1 15207.dat +1 70 220 -88 130 -1 0 0 0 1 0 0 0 -1 15207.dat +1 70 170 -88 80 0 0 1 0 1 0 -1 0 0 3660b.dat +1 70 270 -88 80 0 0 -1 0 1 0 1 0 0 3660b.dat +1 70 170 -88 120 0 0 1 0 1 0 -1 0 0 3660b.dat +1 70 270 -88 120 0 0 -1 0 1 0 1 0 0 3660b.dat +1 19 220 -72 100 1 0 0 0 1 0 0 0 1 3022.dat +1 28 220 -80 100 1 0 0 0 1 0 0 0 1 3068b.dat diff --git a/brickwright/alt/alt-051/thumb-512.avif b/brickwright/alt/alt-051/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..5f291947c45dc4e38a325b43fa6bf5cf59d4e5d7 Binary files /dev/null and b/brickwright/alt/alt-051/thumb-512.avif differ diff --git a/brickwright/alt/alt-051/trace.jsonl.gz b/brickwright/alt/alt-051/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..cad989457b191ff8ce689d5cf6fccb041006cdf7 --- /dev/null +++ b/brickwright/alt/alt-051/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2014dbb1a2fd4553f33cbf5e6842de273912be659b4303854c94f0d35efd04cd +size 9775 diff --git a/brickwright/alt/alt-051/view-0.avif b/brickwright/alt/alt-051/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..a4b76f888ba3edf0d0bb298d2d8fb54a4a8fd6a0 Binary files /dev/null and b/brickwright/alt/alt-051/view-0.avif differ diff --git a/brickwright/alt/alt-051/view-1.avif b/brickwright/alt/alt-051/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..075ecd31778b57d16c1996edc2ea9c95cf881468 Binary files /dev/null and b/brickwright/alt/alt-051/view-1.avif differ diff --git a/brickwright/alt/alt-051/view-2.avif b/brickwright/alt/alt-051/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..9699cfb488e076fb1abcaf13a87254c20cdd9101 Binary files /dev/null and b/brickwright/alt/alt-051/view-2.avif differ diff --git a/brickwright/alt/alt-051/view-3.avif b/brickwright/alt/alt-051/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..4a2ef0aaac45c9a024fe3b4a41599ef781387265 Binary files /dev/null and b/brickwright/alt/alt-051/view-3.avif differ diff --git a/brickwright/alt/alt-051/view-4.avif b/brickwright/alt/alt-051/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..9aa62dd50cf4b9685def0e44d447e280af3e7b0f Binary files /dev/null and b/brickwright/alt/alt-051/view-4.avif differ diff --git a/brickwright/alt/alt-051/view-5.avif b/brickwright/alt/alt-051/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..3b2c5aa84470b279d68ffe634b53ee7ca8638368 Binary files /dev/null and b/brickwright/alt/alt-051/view-5.avif differ diff --git a/brickwright/alt/alt-051/view-6.avif b/brickwright/alt/alt-051/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..bfa6283593f2c87ea0cfd1d3cc2f18772bbe4549 Binary files /dev/null and b/brickwright/alt/alt-051/view-6.avif differ diff --git a/brickwright/alt/alt-051/view-7.avif b/brickwright/alt/alt-051/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..289797bc64b9c48efe9219ed2ad46a1446c2e121 Binary files /dev/null and b/brickwright/alt/alt-051/view-7.avif differ diff --git a/brickwright/alt/alt-052/build.py b/brickwright/alt/alt-052/build.py new file mode 100644 index 0000000000000000000000000000000000000000..9e2ba720a4289de57380779b68bad4686eb27923 --- /dev/null +++ b/brickwright/alt/alt-052/build.py @@ -0,0 +1,91 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + def put(pid,c,x,y,z,r=0,name=None): + return b.add(bl.Element(pid,getattr(bl.Color,c)),(x,y,z),bl.Rotation(r),name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='meadow') + z=1/3 + # Pale, faceted stalk. The rear is bonded by long lintel courses. + for h in (0,2): + for x in (4,6,8,10): put('3245c','LIGHT_BLUISH_GRAY',x,13,z+h) + for h in (4,5): + for x in (4,8): put('3010','BRIGHT_LIGHT_YELLOW',x,13,z+h) + for x in (4,11): + for h in (0,1): + for y in (9,11): put('3004','MEDIUM_NOUGAT',x,y,z+h,1) + for y in (9,11): put('3004','TAN',x,y,z+2,1) + for h in (3,4): + put('3622','TAN',x,9,z+h,1) + put('3005','WHITE',x,12,z+h) + for y in (9,11): + put('3660b','WHITE',3 if x==4 else 11,y,z+5,3 if x==4 else 1) + for x in (4,10): + for h in (0,1): put('3004','BRIGHT_LIGHT_YELLOW',x,8,z+h) + frame=put('60593','TAN',x,8,z+2,name='window_'+str(x)) + # Open cottage windows with substantial tan surrounds. + put('3004','BRIGHT_LIGHT_YELLOW',x,8,z+5) + b.add(bl.door(4,2,6,bl.DoorVariant.WINDOWED,door_color=bl.Color.YELLOW,frame_color=bl.Color.WHITE),(6,7,z),name='entrance') + # Broad octagonal cap, with concealed core and interlocking upper courses. + rz=z+6 + for y in (7,13): + for x in (4,8): put('3001','RED',x,y,rz) + for x in (2,12): put('3001','RED',x,9,rz,1) + for y in (9,11): + for x in (4,8): put('3001','DARK_TAN',x,y,rz) + for y in (8,13): + put('3009','RED',4,y,rz+1) + put('3004','RED',10,y,rz+1) + for x in (3,12): put('3659','RED',x,9,rz+1,1) + put('6215','WHITE',4,9,rz+1,name='cap_spot_a') + put('3001','RED',7,9,rz+1) + put('3004','RED',11,9,rz+1,1) + put('3004','RED',4,11,rz+1,1) + put('3001','RED',5,11,rz+1) + put('6215','WHITE',9,11,rz+1,2,name='cap_spot_b') + for x in (6,8): put('3003','RED',x,10,rz+2) + for x in (5,10): put('3004','RED',x,10,rz+2,1) + put('3069b','WHITE',7,10,rz+3,name='cap_spot_c') + # White speckles visible on the brim. + for x,y in ((4,7),(10,14)): + put('2877','WHITE',x,y,rz+1) + # Low winding stepping stones leading from the meadow edge to the door. + for x,y in ((5,0),(4,2),(5,4),(7,5)): + put('3068b','DARK_TAN',x,y,z) + # Two smaller red-capped mushrooms flanking the winding walk. + for n,(x,y) in enumerate(((2,4),(11,3))): + put('3004','WHITE',x,y,z,name='small_stalk_'+str(n)) + put('3003','RED',x,y,z+1,name='small_cap_'+str(n)) + put('3069b','WHITE',x,y,z+2,name='small_spot_'+str(n)) + # Low red slopes soften the upper silhouette of the main cap. + for x,y,r in ((7,9,0),(9,9,0),(5,12,2),(7,12,2)): + put('85984','RED',x,y,rz+2,r) + # A few flowers along the walk, leaving the stepping stones clear. + for n,(x,y) in enumerate(((1,1),(13,6),(13,12))): + leaves=put('4727','BRIGHT_GREEN',x,y,z) + bloom=bl.Element('33291',bl.Color.DARK_PINK if n!=1 else bl.Color.BRIGHT_LIGHT_ORANGE) + b.connect(bloom,bloom.find_connector('antistud'),to=leaves.find_connector('stud')) + return b + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + over=[(p,c,q,inventory.get(p,{}).get(c,0)) for (p,c),q in used.items() if q>inventory.get(p,{}).get(c,0)] + t.check('Inventory limits',not over,str(over)) + t.check('Door and two stalk windows',all(n in b.names for n in ['entrance','window_4','window_10']), 'Windowed door and two framed windows') + t.check('Two smaller mushrooms',all('small_cap_'+str(i) in b.names for i in range(2)), 'Two capped stalks beside the walk') + stones=[p for p in b.flattened_placements if p.content.ldraw_id=='3068b' and p.content.color==bl.Color.DARK_TAN] + t.check('Curving four-stone approach',len(stones)==4 and len({p.center.x for p in stones})>=3,'Four offset stepping stones lead to the door') + t.check('Overhanging mushroom cap',b.named('cap_spot_a').center.z>b.named('entrance').bounding_box[1].z,'Spotted cap sits above the six-brick-high entrance') + t.check('White spotted red cap',all('cap_spot_'+i in b.names for i in 'abc'),'Three upper spots plus two white brim spots') + return t.report() diff --git a/brickwright/alt/alt-052/hero-1024.avif b/brickwright/alt/alt-052/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..bebae905fa5a27ae57f589453587cf75bf6872d5 Binary files /dev/null and b/brickwright/alt/alt-052/hero-1024.avif differ diff --git a/brickwright/alt/alt-052/model.mpd b/brickwright/alt/alt-052/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..655fd93bc605c7be0e577ea31c7e08ba81c468f3 --- /dev/null +++ b/brickwright/alt/alt-052/model.mpd @@ -0,0 +1,103 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 71 100 -56 270 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 140 -56 270 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 180 -56 270 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 220 -56 270 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 100 -104 270 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 140 -104 270 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 180 -104 270 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 220 -104 270 1 0 0 0 1 0 0 0 1 3245c.dat +1 226 120 -128 270 1 0 0 0 1 0 0 0 1 3010.dat +1 226 200 -128 270 1 0 0 0 1 0 0 0 1 3010.dat +1 226 120 -152 270 1 0 0 0 1 0 0 0 1 3010.dat +1 226 200 -152 270 1 0 0 0 1 0 0 0 1 3010.dat +1 84 90 -32 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 90 -32 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 90 -56 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 90 -56 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 90 -80 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 90 -80 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 90 -104 210 0 0 -1 0 1 0 1 0 0 3622.dat +1 15 90 -104 250 1 0 0 0 1 0 0 0 1 3005.dat +1 19 90 -128 210 0 0 -1 0 1 0 1 0 0 3622.dat +1 15 90 -128 250 1 0 0 0 1 0 0 0 1 3005.dat +1 15 90 -152 200 0 0 1 0 1 0 -1 0 0 3660b.dat +1 15 90 -152 240 0 0 1 0 1 0 -1 0 0 3660b.dat +1 84 230 -32 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 230 -32 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 230 -56 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 230 -56 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 230 -80 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 230 -80 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 230 -104 210 0 0 -1 0 1 0 1 0 0 3622.dat +1 15 230 -104 250 1 0 0 0 1 0 0 0 1 3005.dat +1 19 230 -128 210 0 0 -1 0 1 0 1 0 0 3622.dat +1 15 230 -128 250 1 0 0 0 1 0 0 0 1 3005.dat +1 15 230 -152 200 0 0 -1 0 1 0 1 0 0 3660b.dat +1 15 230 -152 240 0 0 -1 0 1 0 1 0 0 3660b.dat +1 226 100 -32 170 1 0 0 0 1 0 0 0 1 3004.dat +1 226 100 -56 170 1 0 0 0 1 0 0 0 1 3004.dat +1 19 100 -128 170 1 0 0 0 1 0 0 0 1 60593.dat +1 226 100 -152 170 1 0 0 0 1 0 0 0 1 3004.dat +1 226 220 -32 170 1 0 0 0 1 0 0 0 1 3004.dat +1 226 220 -56 170 1 0 0 0 1 0 0 0 1 3004.dat +1 19 220 -128 170 1 0 0 0 1 0 0 0 1 60593.dat +1 226 220 -152 170 1 0 0 0 1 0 0 0 1 3004.dat +1 16 160 -8 160 1 0 0 0 1 0 0 0 1 entrance.ldr +1 4 120 -176 160 1 0 0 0 1 0 0 0 1 3001.dat +1 4 200 -176 160 1 0 0 0 1 0 0 0 1 3001.dat +1 4 120 -176 280 1 0 0 0 1 0 0 0 1 3001.dat +1 4 200 -176 280 1 0 0 0 1 0 0 0 1 3001.dat +1 4 60 -176 220 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 260 -176 220 0 0 -1 0 1 0 1 0 0 3001.dat +1 28 120 -176 200 1 0 0 0 1 0 0 0 1 3001.dat +1 28 200 -176 200 1 0 0 0 1 0 0 0 1 3001.dat +1 28 120 -176 240 1 0 0 0 1 0 0 0 1 3001.dat +1 28 200 -176 240 1 0 0 0 1 0 0 0 1 3001.dat +1 4 140 -200 170 1 0 0 0 1 0 0 0 1 3009.dat +1 4 220 -200 170 1 0 0 0 1 0 0 0 1 3004.dat +1 4 140 -200 270 1 0 0 0 1 0 0 0 1 3009.dat +1 4 220 -200 270 1 0 0 0 1 0 0 0 1 3004.dat +1 4 70 -200 220 0 0 -1 0 1 0 1 0 0 3659.dat +1 4 250 -200 220 0 0 -1 0 1 0 1 0 0 3659.dat +1 15 100 -200 200 1 0 0 0 1 0 0 0 1 6215.dat +1 4 180 -200 200 1 0 0 0 1 0 0 0 1 3001.dat +1 4 230 -200 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 90 -200 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 140 -200 240 1 0 0 0 1 0 0 0 1 3001.dat +1 15 220 -200 240 -1 0 0 0 1 0 0 0 -1 6215.dat +1 4 140 -224 220 1 0 0 0 1 0 0 0 1 3003.dat +1 4 180 -224 220 1 0 0 0 1 0 0 0 1 3003.dat +1 4 110 -224 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 210 -224 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 15 160 -232 210 1 0 0 0 1 0 0 0 1 3069b.dat +1 15 100 -200 150 1 0 0 0 1 0 0 0 1 2877.dat +1 15 220 -200 290 1 0 0 0 1 0 0 0 1 2877.dat +1 28 120 -16 20 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 100 -16 60 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 120 -16 100 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 160 -16 120 1 0 0 0 1 0 0 0 1 3068b.dat +1 15 60 -32 90 1 0 0 0 1 0 0 0 1 3004.dat +1 4 60 -56 100 1 0 0 0 1 0 0 0 1 3003.dat +1 15 60 -64 90 1 0 0 0 1 0 0 0 1 3069b.dat +1 15 240 -32 70 1 0 0 0 1 0 0 0 1 3004.dat +1 4 240 -56 80 1 0 0 0 1 0 0 0 1 3003.dat +1 15 240 -64 70 1 0 0 0 1 0 0 0 1 3069b.dat +1 4 160 -200 190 1 0 0 0 1 0 0 0 1 85984.dat +1 4 200 -200 190 1 0 0 0 1 0 0 0 1 85984.dat +1 4 120 -200 250 -1 0 0 0 1 0 0 0 -1 85984.dat +1 4 160 -200 250 -1 0 0 0 1 0 0 0 -1 85984.dat +1 10 30 -32 30 1 0 0 0 1 0 0 0 1 4727.dat +1 5 30 -40 30 1 0 0 0 1 0 0 0 1 33291.dat +1 10 270 -32 130 1 0 0 0 1 0 0 0 1 4727.dat +1 191 270 -40 130 1 0 0 0 1 0 0 0 1 33291.dat +1 10 270 -32 250 1 0 0 0 1 0 0 0 1 4727.dat +1 5 270 -40 250 1 0 0 0 1 0 0 0 1 33291.dat +0 FILE entrance.ldr +0 entrance +0 Name: entrance +1 15 0 -144 0 1 0 0 0 1 0 0 0 1 60599.dat +1 14 -32 -144 -15 1 0 0 0 1 0 0 0 1 60623.dat diff --git a/brickwright/alt/alt-052/thumb-512.avif b/brickwright/alt/alt-052/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..6e5841c3778961b510e954c38ff5fcfb7834310e Binary files /dev/null and b/brickwright/alt/alt-052/thumb-512.avif differ diff --git a/brickwright/alt/alt-052/trace.jsonl.gz b/brickwright/alt/alt-052/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..3a6743728bc78a080d63c9e7332051c0dd2c9c56 --- /dev/null +++ b/brickwright/alt/alt-052/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7170d3d4694fe9411ad6089ff62a4332d0908b5ca784178fa34e2f9085a57fb +size 7536 diff --git a/brickwright/alt/alt-052/view-0.avif b/brickwright/alt/alt-052/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..86abd5f6125aadde45932eea61d5b91150c7a8f6 Binary files /dev/null and b/brickwright/alt/alt-052/view-0.avif differ diff --git a/brickwright/alt/alt-052/view-1.avif b/brickwright/alt/alt-052/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..e17ae42f5f51b7b80063f3dfde9705d44164c5df Binary files /dev/null and b/brickwright/alt/alt-052/view-1.avif differ diff --git a/brickwright/alt/alt-052/view-2.avif b/brickwright/alt/alt-052/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..1377ae8e912785fb9086fe5149e4b300521cb326 Binary files /dev/null and b/brickwright/alt/alt-052/view-2.avif differ diff --git a/brickwright/alt/alt-052/view-3.avif b/brickwright/alt/alt-052/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..a23e0f0de7f75d6a3a933ccde6754584df3d934b Binary files /dev/null and b/brickwright/alt/alt-052/view-3.avif differ diff --git a/brickwright/alt/alt-052/view-4.avif b/brickwright/alt/alt-052/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..f5d86bbf12b4dd68b7967ebf81ebcb0e5c886c16 Binary files /dev/null and b/brickwright/alt/alt-052/view-4.avif differ diff --git a/brickwright/alt/alt-052/view-5.avif b/brickwright/alt/alt-052/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..d425408998d418939bf8dd8225dd9a27ef790ad0 Binary files /dev/null and b/brickwright/alt/alt-052/view-5.avif differ diff --git a/brickwright/alt/alt-052/view-6.avif b/brickwright/alt/alt-052/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..0e25c63ee126952d3877f995c6c4eae28a35b24b Binary files /dev/null and b/brickwright/alt/alt-052/view-6.avif differ diff --git a/brickwright/alt/alt-052/view-7.avif b/brickwright/alt/alt-052/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..d0c39c25535e668baef56ade8c8410ea3e75fa8e Binary files /dev/null and b/brickwright/alt/alt-052/view-7.avif differ diff --git a/brickwright/alt/alt-053/build.py b/brickwright/alt/alt-053/build.py new file mode 100644 index 0000000000000000000000000000000000000000..292918142df89e6c06c606f3290aad989ec5d310 --- /dev/null +++ b/brickwright/alt/alt-053/build.py @@ -0,0 +1,139 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + phase=['station'] + def put(pid,c,x,y,z,r=0,name=None): + if phase[0]=='station' and z>=19/3-0.001: + z+=1 + if phase[0]=='truck': + z+=1/3 + return b.add(bl.Element(pid,getattr(bl.Color,c)),(x,y,z),bl.Rotation(r),name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='base') + # Gray portal, tied across the top with the upstairs floor. + for x in (2,12): + for z in (1/3,7/3,13/3): + put('3245c','LIGHT_BLUISH_GRAY',x,7,z) + for y in (9,13): + put('3001','LIGHT_BLUISH_GRAY',x,y,1/3,1) + for y in (9,11,13): + put('3004','LIGHT_BLUISH_GRAY',x,y,4/3,1) + # Rear structural columns leave the back completely open. + put('3245c','LIGHT_BLUISH_GRAY',x,14,7/3) + put('3004','DARK_BLUISH_GRAY',x,14,13/3) + put('3004','DARK_BLUISH_GRAY',x,14,16/3) + phase[0]='columns' + for x in (2,12): + put('3004','LIGHT_BLUISH_GRAY',x,7,19/3) + put('3004','WHITE',x,14,19/3) + phase[0]='station' + put('3028','BRIGHT_GREEN',2,7,19/3,name='upper_floor') + put('3034','LIGHT_BLUISH_GRAY',2,13,19/3) + put('3020','TAN',10,13,19/3) + # Red lintel and cream dormitory facade. + put('3009','RED',2,7,20/3) + put('3009','RED',8,7,20/3) + for x in (2,6,10): + put('3010','BRIGHT_LIGHT_YELLOW',x,8,20/3) + for x in (4,8): + put('60598','RED',x,7,23/3,name='window_'+str(x)) + for x in (2,12): + for z in (23/3,26/3,29/3): + put('3004','BRIGHT_LIGHT_YELLOW',x,7,z) + put('3004','MEDIUM_NOUGAT',x,8,z) + # Side walls, warm masonry, with an open rear edge. + for y in (9,12): + put('3622','TAN',x,y,20/3,1) + for y in (9,11,13): + put('3004','DARK_BLUE',x,y,23/3,1) + put('3004','DARK_BLUE',x,y,26/3,1) + for y in (9,13): + put('3010','BRIGHT_LIGHT_YELLOW',x,y,29/3,1) if y==9 else put('3004','BRIGHT_LIGHT_YELLOW',x,y,29/3,1) + # Flat roof, with an unmistakable red parapet over the engine bay. + put('3029','DARK_BLUISH_GRAY',2,7,32/3,name='roof_front') + for x in (2,6,10): + put('3031','BLUE',x,11,32/3) + for x in (2,6,10): + put('3659','RED',x,7,11) + for x in (4,8): + put('87079','LIGHT_BLUISH_GRAY',x,10,11) + put('2431','LIGHT_BLUISH_GRAY',x,14,11) + # Bed visible through the open back: brown frame, blue duvet, white pillow. + put('3002','REDDISH_BROWN',4,9,20/3,1,name='bed_frame_front') + put('3002','REDDISH_BROWN',4,12,20/3,1,name='bed_frame_back') + put('3001','BLUE',4,9,23/3,1,name='bed_blanket') + put('3004','WHITE',4,13,23/3,name='bed_pillow') + put('15207','REDDISH_BROWN',3,14,23/3,name='headboard') + # Engine is anchored under its chassis to the display base. + phase[0]='anchor' + put('3002','BLACK',6,5,1/3,1,name='truck_anchor') + put('3023b','TAN',6,5,4/3) + put('3023b','TAN',6,6,4/3) + phase[0]='truck' + put('3022','TAN',6,5,4/3) + put('3022','TAN',8,5,4/3) + axles=[] + for y in (3,10): + a=put('2926','BLACK',6,y,4/3,name='axle_'+str(y)); axles.append(a) + for direction in (bl.Direction.LEFT,bl.Direction.RIGHT): + rim=bl.Element('6014b',bl.Color.YELLOW) + wheel=b.connect(rim,'hinge_3_on',to=a.find_connector('hinge_3_in',facing=direction)) + tire=bl.Element('87697',bl.Color.BLACK) + b.connect(tire,tire.find_connector('fixed_13_on',facing=bl.Direction.BACK),to=wheel.find_connector('fixed_13_in',toward=bl.Direction.FRONT)) + for x in (6,8): + put('3795','REDDISH_BROWN',x,4,5/3,1) + put('3020','TAN',6,2,5/3) + put('3020','MEDIUM_AZURE',6,10,5/3) + for x in (6,8): + for y in (2,6): + put('3001','RED',x,y,2,1) + put('3001','RED',6,10,2) + # Cab windscreen and two roof beams; rear equipment lockers. + for x in (6,8): + put('3039','TRANS_CLEAR',x,2,3) + for x in (6,9): + put('3004','RED',x,4,3,1) + for y in (6,8,10): + put('3001','RED',6,y,3) + for x in (6,8): + put('3020','MEDIUM_AZURE',x,2,4,1) + for x in (6,8): + put('2877','WHITE',x,6,4) + for y in (8,10): + put('3003','RED',6,y,4) + put('3003','RED',8,y,4) + # A low ladder rack levels the cab and rear body. + for x in (6,9): + put('3004','RED',x,4,13/3,1) + for x in (6,9): + put('3666','MEDIUM_AZURE',x,6,5,1) + put('3460','MEDIUM_AZURE',x,4,16/3,1,name='ladder_rail_'+str(x)) + for i,y in enumerate((4,6,8,11)): + put('3710','BLUE',6,y,17/3,name='ladder_rung_'+str(i)) + for x in (6,9): + put('6141','TRANS_ORANGE',x,2,13/3) + return b + + +def run_tests(): + b=create_build(); tests=TestContext(b) + tests.check_no_floating(); tests.check_no_collisions(); tests.check_connected(expected_components=1) + allowed=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess=[(pid,c,n,allowed.get(pid,{}).get(c,0)) for (pid,c),n in used.items() if n>allowed.get(pid,{}).get(c,0)] + tests.check('Inventory limits',not excess,str(excess)) + tests.check('Two storeys',b.named('upper_floor').center.z>6 and b.named('roof_front').center.z>10,'Garage below elevated sleeping room') + tests.check('Bed in upstairs room',b.named('bed_blanket').center.z>b.named('upper_floor').center.z,'Bed frame, blanket, pillow and headboard') + tests.check('Ladder on engine roof',all('ladder_rail_'+str(x) in b.names for x in (6,9)) and all('ladder_rung_'+str(i) in b.names for i in range(4)),'Two rails and four rungs') + front_axle=b.named('axle_3').center.y + rear_axle=b.named('axle_10').center.y + portal=b.named('upper_floor').alignment_box[0].y + tests.check('Truck halfway through portal',front_axle < portal < rear_axle and abs((front_axle+rear_axle)/2-portal)<0.51,'Axles straddle the garage entrance symmetrically') + tests.check('Four rubber tires',sum(p.content.ldraw_id=='87697' for p in b.flattened_placements)==4,'Four attached wheels') + back_obstructions=[p for p in b.flattened_placements if p.bounding_box[0].x<10 and p.bounding_box[1].x>8 and p.bounding_box[0].y>=14.9 and p.bounding_box[0].z>8 and p.bounding_box[1].z<11.6] + tests.check('Open back of sleeping room',not back_obstructions,'Rear opening beside the bed is unobstructed') + return tests.report() diff --git a/brickwright/alt/alt-053/hero-1024.avif b/brickwright/alt/alt-053/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..ff755124f816fad1d3f6bf2e818f45c341d1fa8f Binary files /dev/null and b/brickwright/alt/alt-053/hero-1024.avif differ diff --git a/brickwright/alt/alt-053/model.mpd b/brickwright/alt/alt-053/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..f0a4be51019ef14bbcbc62201ad8f532263af23e --- /dev/null +++ b/brickwright/alt/alt-053/model.mpd @@ -0,0 +1,136 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 71 60 -56 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 60 -104 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 60 -152 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 60 -32 220 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 60 -32 300 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 50 -56 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 50 -56 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 50 -56 280 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 60 -104 290 1 0 0 0 1 0 0 0 1 3245c.dat +1 72 60 -128 290 1 0 0 0 1 0 0 0 1 3004.dat +1 72 60 -152 290 1 0 0 0 1 0 0 0 1 3004.dat +1 71 260 -56 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 260 -104 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 260 -152 150 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 260 -32 220 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 260 -32 300 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 250 -56 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 250 -56 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 250 -56 280 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 260 -104 290 1 0 0 0 1 0 0 0 1 3245c.dat +1 72 260 -128 290 1 0 0 0 1 0 0 0 1 3004.dat +1 72 260 -152 290 1 0 0 0 1 0 0 0 1 3004.dat +1 71 60 -176 150 1 0 0 0 1 0 0 0 1 3004.dat +1 15 60 -176 290 1 0 0 0 1 0 0 0 1 3004.dat +1 71 260 -176 150 1 0 0 0 1 0 0 0 1 3004.dat +1 15 260 -176 290 1 0 0 0 1 0 0 0 1 3004.dat +1 10 160 -184 200 1 0 0 0 1 0 0 0 1 3028.dat +1 71 120 -184 280 1 0 0 0 1 0 0 0 1 3034.dat +1 19 240 -184 280 1 0 0 0 1 0 0 0 1 3020.dat +1 4 100 -208 150 1 0 0 0 1 0 0 0 1 3009.dat +1 4 220 -208 150 1 0 0 0 1 0 0 0 1 3009.dat +1 226 80 -208 170 1 0 0 0 1 0 0 0 1 3010.dat +1 226 160 -208 170 1 0 0 0 1 0 0 0 1 3010.dat +1 226 240 -208 170 1 0 0 0 1 0 0 0 1 3010.dat +1 4 120 -280 160 1 0 0 0 1 0 0 0 1 60598.dat +1 4 200 -280 160 1 0 0 0 1 0 0 0 1 60598.dat +1 226 60 -232 150 1 0 0 0 1 0 0 0 1 3004.dat +1 84 60 -232 170 1 0 0 0 1 0 0 0 1 3004.dat +1 226 60 -256 150 1 0 0 0 1 0 0 0 1 3004.dat +1 84 60 -256 170 1 0 0 0 1 0 0 0 1 3004.dat +1 226 60 -280 150 1 0 0 0 1 0 0 0 1 3004.dat +1 84 60 -280 170 1 0 0 0 1 0 0 0 1 3004.dat +1 19 50 -208 210 0 0 -1 0 1 0 1 0 0 3622.dat +1 19 50 -208 270 0 0 -1 0 1 0 1 0 0 3622.dat +1 272 50 -232 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 50 -256 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 50 -232 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 50 -256 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 50 -232 280 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 50 -256 280 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 50 -280 220 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 50 -280 280 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 260 -232 150 1 0 0 0 1 0 0 0 1 3004.dat +1 84 260 -232 170 1 0 0 0 1 0 0 0 1 3004.dat +1 226 260 -256 150 1 0 0 0 1 0 0 0 1 3004.dat +1 84 260 -256 170 1 0 0 0 1 0 0 0 1 3004.dat +1 226 260 -280 150 1 0 0 0 1 0 0 0 1 3004.dat +1 84 260 -280 170 1 0 0 0 1 0 0 0 1 3004.dat +1 19 250 -208 210 0 0 -1 0 1 0 1 0 0 3622.dat +1 19 250 -208 270 0 0 -1 0 1 0 1 0 0 3622.dat +1 272 250 -232 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 250 -256 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 250 -232 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 250 -256 240 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 250 -232 280 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 250 -256 280 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 250 -280 220 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 250 -280 280 0 0 -1 0 1 0 1 0 0 3004.dat +1 72 160 -288 180 1 0 0 0 1 0 0 0 1 3029.dat +1 1 80 -288 260 1 0 0 0 1 0 0 0 1 3031.dat +1 1 160 -288 260 1 0 0 0 1 0 0 0 1 3031.dat +1 1 240 -288 260 1 0 0 0 1 0 0 0 1 3031.dat +1 4 80 -312 150 1 0 0 0 1 0 0 0 1 3659.dat +1 4 160 -312 150 1 0 0 0 1 0 0 0 1 3659.dat +1 4 240 -312 150 1 0 0 0 1 0 0 0 1 3659.dat +1 71 120 -296 220 1 0 0 0 1 0 0 0 1 87079.dat +1 71 120 -296 290 1 0 0 0 1 0 0 0 1 2431.dat +1 71 200 -296 220 1 0 0 0 1 0 0 0 1 87079.dat +1 71 200 -296 290 1 0 0 0 1 0 0 0 1 2431.dat +1 70 100 -208 210 0 0 -1 0 1 0 1 0 0 3002.dat +1 70 100 -208 270 0 0 -1 0 1 0 1 0 0 3002.dat +1 1 100 -232 220 0 0 -1 0 1 0 1 0 0 3001.dat +1 15 100 -232 270 1 0 0 0 1 0 0 0 1 3004.dat +1 70 100 -232 290 1 0 0 0 1 0 0 0 1 15207.dat +1 0 140 -32 130 0 0 -1 0 1 0 1 0 0 3002.dat +1 19 140 -40 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 140 -40 130 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 140 -48 120 1 0 0 0 1 0 0 0 1 3022.dat +1 19 180 -48 120 1 0 0 0 1 0 0 0 1 3022.dat +1 0 160 -48 70 1 0 0 0 1 0 0 0 1 2926.dat +1 14 210 -43 70 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 216 -43 70 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 110 -43 70 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 104 -43 70 0 0 -1 1 0 0 0 -1 0 87697.dat +1 0 160 -48 210 1 0 0 0 1 0 0 0 1 2926.dat +1 14 210 -43 210 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 216 -43 210 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 110 -43 210 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 104 -43 210 0 0 -1 1 0 0 0 -1 0 87697.dat +1 70 140 -56 140 0 0 -1 0 1 0 1 0 0 3795.dat +1 70 180 -56 140 0 0 -1 0 1 0 1 0 0 3795.dat +1 19 160 -56 60 1 0 0 0 1 0 0 0 1 3020.dat +1 322 160 -56 220 1 0 0 0 1 0 0 0 1 3020.dat +1 4 140 -80 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 140 -80 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 180 -80 80 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 180 -80 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 4 160 -80 220 1 0 0 0 1 0 0 0 1 3001.dat +1 47 140 -104 70 1 0 0 0 1 0 0 0 1 3039.dat +1 47 180 -104 70 1 0 0 0 1 0 0 0 1 3039.dat +1 4 130 -104 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 190 -104 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 160 -104 140 1 0 0 0 1 0 0 0 1 3001.dat +1 4 160 -104 180 1 0 0 0 1 0 0 0 1 3001.dat +1 4 160 -104 220 1 0 0 0 1 0 0 0 1 3001.dat +1 322 140 -112 80 0 0 -1 0 1 0 1 0 0 3020.dat +1 322 180 -112 80 0 0 -1 0 1 0 1 0 0 3020.dat +1 15 140 -128 130 1 0 0 0 1 0 0 0 1 2877.dat +1 15 180 -128 130 1 0 0 0 1 0 0 0 1 2877.dat +1 4 140 -128 180 1 0 0 0 1 0 0 0 1 3003.dat +1 4 180 -128 180 1 0 0 0 1 0 0 0 1 3003.dat +1 4 140 -128 220 1 0 0 0 1 0 0 0 1 3003.dat +1 4 180 -128 220 1 0 0 0 1 0 0 0 1 3003.dat +1 4 130 -136 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 190 -136 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 322 130 -136 180 0 0 -1 0 1 0 1 0 0 3666.dat +1 322 130 -144 160 0 0 -1 0 1 0 1 0 0 3460.dat +1 322 190 -136 180 0 0 -1 0 1 0 1 0 0 3666.dat +1 322 190 -144 160 0 0 -1 0 1 0 1 0 0 3460.dat +1 1 160 -152 90 1 0 0 0 1 0 0 0 1 3710.dat +1 1 160 -152 130 1 0 0 0 1 0 0 0 1 3710.dat +1 1 160 -152 170 1 0 0 0 1 0 0 0 1 3710.dat +1 1 160 -152 230 1 0 0 0 1 0 0 0 1 3710.dat +1 57 130 -120 50 1 0 0 0 1 0 0 0 1 6141.dat +1 57 190 -120 50 1 0 0 0 1 0 0 0 1 6141.dat diff --git a/brickwright/alt/alt-053/thumb-512.avif b/brickwright/alt/alt-053/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..2a6eb9d6ce05640a930e4620fe8799bff20839ce Binary files /dev/null and b/brickwright/alt/alt-053/thumb-512.avif differ diff --git a/brickwright/alt/alt-053/trace.jsonl.gz b/brickwright/alt/alt-053/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..1f2575b6cdeb9966fbaa9a4a9fa52a9671ecff28 --- /dev/null +++ b/brickwright/alt/alt-053/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed0feb054dcc2b9e0f9c97cb9e0893e50f085e1d3871d46eb35c42387f43819b +size 7349 diff --git a/brickwright/alt/alt-053/view-0.avif b/brickwright/alt/alt-053/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..efec45f63ed3a7b614380a2ea58f461f366a4f93 Binary files /dev/null and b/brickwright/alt/alt-053/view-0.avif differ diff --git a/brickwright/alt/alt-053/view-1.avif b/brickwright/alt/alt-053/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..a8aee68106bac2e7fe89bd457c4aa313e9c69e20 Binary files /dev/null and b/brickwright/alt/alt-053/view-1.avif differ diff --git a/brickwright/alt/alt-053/view-2.avif b/brickwright/alt/alt-053/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..0b6769bfca59ac05bfb9cba62f8558f13aa027fb Binary files /dev/null and b/brickwright/alt/alt-053/view-2.avif differ diff --git a/brickwright/alt/alt-053/view-3.avif b/brickwright/alt/alt-053/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..2714669a3917349340e4ca7695537e4cdf56d7e3 Binary files /dev/null and b/brickwright/alt/alt-053/view-3.avif differ diff --git a/brickwright/alt/alt-053/view-4.avif b/brickwright/alt/alt-053/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..fe4bce32989feb3b6b2ec66b08d8d673ed418a16 Binary files /dev/null and b/brickwright/alt/alt-053/view-4.avif differ diff --git a/brickwright/alt/alt-053/view-5.avif b/brickwright/alt/alt-053/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..04bc19eab32f2b6edcb6868605d68f5043403b8a Binary files /dev/null and b/brickwright/alt/alt-053/view-5.avif differ diff --git a/brickwright/alt/alt-053/view-6.avif b/brickwright/alt/alt-053/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..50f3615141585a764b6e49ed75e4be2c0c7fe22b Binary files /dev/null and b/brickwright/alt/alt-053/view-6.avif differ diff --git a/brickwright/alt/alt-053/view-7.avif b/brickwright/alt/alt-053/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..0b25bb41dff1fb4d7020efd366416afb6c041462 Binary files /dev/null and b/brickwright/alt/alt-053/view-7.avif differ diff --git a/brickwright/alt/alt-054/build.py b/brickwright/alt/alt-054/build.py new file mode 100644 index 0000000000000000000000000000000000000000..2d72dcb6edd754394a29529a0ce8376c7510243e --- /dev/null +++ b/brickwright/alt/alt-054/build.py @@ -0,0 +1,119 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def add(pid, color, x, y, z, name=None, rot=bl.Rotation.DEG_0): + return b.add(bl.Element(pid, getattr(bl.Color, color)), (x,y,z), rotation=rot, name=name) + add('91405','BRIGHT_GREEN',0,0,0,'forecourt') + # Four tied columns support a genuinely flat, broad canopy. + for i,(x,y) in enumerate([(0,6),(0,8),(10,6),(10,8)]): + for z in [1/3,7/3]: + add('3245c','LIGHT_BLUISH_GRAY',x,y,z) + for z in [13/3,16/3]: + add('3004','LIGHT_BLUISH_GRAY',x,y,z) + add('3028','BRIGHT_GREEN',0,3,19/3,'canopy') + for x in [0,6]: + add('3009','RED',x,3,20/3) + for x in [0,4,8]: + add('3001','RED',x,8 if x==8 else 7,20/3) + # Red edge returns, leaving an uncluttered flat roof surface. + for x in [0,10]: + add('3004','RED',x,4,20/3,rot=bl.Rotation.DEG_90) + # Pump islands, red pedestals, white meter housings and black sloped displays. + for i,x in enumerate([1,9]): + add('3022','TAN',x,3,1/3,'island_'+str(i)) + add('3003','RED',x,3,2/3,'pump_'+str(i)) + add('2877','WHITE',x,3,5/3) + add('3004','WHITE',x,4,5/3) + add('85984','BLACK',x,3,8/3,'display_'+str(i)) + add('3004','RED',x,4,8/3) + add('3069b','WHITE',x,4,11/3) + # Small adjoining shop, with a real glazed door and display window. + shopdoor=bl.door(4,1,6,door_variant=bl.DoorVariant.WINDOWED, + door_color=bl.Color.YELLOW,frame_color=bl.Color.BLACK) + b.add(shopdoor,(10,9,1/3),name='shop_door') + for z in [1/3,4/3]: + add('3004','DARK_BLUE',14,9,z) + add('87544','TRANS_CLEAR',14,9,7/3,'shop_window') + add('3004','DARK_BLUE',14,9,16/3) + for level in range(6): + z=1/3+level + # Side walls and rear wall; alternating lengths provide bonds. + add('3010','BRIGHT_LIGHT_YELLOW',10,10,z,rot=bl.Rotation.DEG_90) if level<4 else add('3001','BLUE',10,10,z,rot=bl.Rotation.DEG_90) + add('3010','BRIGHT_LIGHT_YELLOW',15,10,z,rot=bl.Rotation.DEG_90) if level<4 else add('3004','DARK_BLUE',15,10,z,rot=bl.Rotation.DEG_90) + if level>=4: + add('3004','DARK_BLUE',15,12,z,rot=bl.Rotation.DEG_90) + add('2456','DARK_RED' if level<2 else ('BLACK' if level<4 else 'BRIGHT_GREEN'),10,14,z) + add('3032','YELLOW',10,11,19/3,'shop_roof') + for x in [10,13]: + add('3021','GREEN',x,9,19/3) + add('3001','RED',12,9,20/3) + # The rear-right fascia bridges the canopy/shop roof seam. + # Car, parked between the two pumps. Its four wheels are pin-connected. + car=bl.LegoBuild() + def ca(pid,col,x,y,z,rot=bl.Rotation.DEG_0): + return car.add(bl.Element(pid,getattr(bl.Color,col)),(x,y,z),rotation=rot) + for y in [1,6]: + axle=ca('2926','BLACK',0,y,0) + for direction in [bl.Direction.LEFT,bl.Direction.RIGHT]: + rim=car.connect(bl.Element('6014b',bl.Color.YELLOW),'hinge_3_on', + to=axle.find_connector('hinge_3_in',toward=direction)) + tire=bl.Element('87697',bl.Color.BLACK) + car.connect(tire,tire.find_connector('fixed_13_on',facing=bl.Direction.BACK), + to=rim.find_connector('fixed_13_in',toward=direction)) + ca('3031','BLUE',0,0,1/3) + ca('3031','BLUE',0,4,1/3) + ca('3001','MEDIUM_AZURE',0,1,2/3) + ca('3001','MEDIUM_AZURE',0,6,2/3) + ca('3002','BLUE',0,3,2/3,bl.Rotation.DEG_90) + ca('3002','BLUE',2,3,2/3,bl.Rotation.DEG_90) + for x in [0,2]: + ca('3039','TRANS_CLEAR',x,2,5/3) + ca('3039','BLUE',x,4,5/3,bl.Rotation.DEG_180) + ca('3020','MEDIUM_AZURE',0,3,8/3) + ca('3710','BLUE',0,0,2/3) + ca('3710','BLUE',0,7,5/3) + ca('6141','TRANS_ORANGE',0,0,1) + ca('6141','TRANS_ORANGE',3,0,1) + ca('6141','RED',0,7,2) + ca('6141','RED',3,7,2) + car=bl.translate_to_ground(car) + for x in [2,6]: + for y in [0,6]: + add('87079','LIGHT_BLUISH_GRAY',x,y,1/3) + b.add_raw(car,bl.Pose(translation=bl.Position(4,0,2/3)),name='car') + # Loose spare tires lie flat in a real, stable stack beside the shop. + tire=bl.Element('58090',bl.Color.BLACK) + rotation=bl.rotation_about(bl.Vec3(1,0,0),90) + for x in [12,14]: + for y in [4,6]: + add('3068b','DARK_TAN',x,y,1/3) + for i in range(2): + b.add_raw(tire,bl.Pose(rotation,bl.Position(14,6,2/3+0.85/1.2+i*1.7/1.2)),name='spare_'+str(i)) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + # The parked car and the two loose stacked spare tires are removable pieces. + tests.check_connected(expected_components=4) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):v for k,v in used.items() if v>inventory.get(k[0],{}).get(k[1],0)} + tests.check('inventory limits',not excess,str(excess)) + tests.check('two fuel pumps',all('pump_'+str(i) in b.names for i in range(2))) + tests.check('two stacked spare tires',sum(p.content.ldraw_id=='58090' for p in b.flattened_placements)==2) + tests.check('flat canopy and adjacent shop',all(n in b.names for n in ['canopy','shop_roof','shop_door','shop_window'])) + left=b.named('pump_0').center.x + right=b.named('pump_1').center.x + tests.check('car between the pumps',left < b.named('car').center.x < right) + canopy_bottom=b.named('canopy').bounding_box[0].z + tests.check('pumps beneath canopy',all(b.named('pump_'+str(i)).bounding_box[1].z < canopy_bottom for i in range(2))) + return tests.report() diff --git a/brickwright/alt/alt-054/hero-1024.avif b/brickwright/alt/alt-054/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..c161844ac0b557c7be0d9c18f027553f44056a05 Binary files /dev/null and b/brickwright/alt/alt-054/hero-1024.avif differ diff --git a/brickwright/alt/alt-054/model.mpd b/brickwright/alt/alt-054/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..8abd358fef5f5e046a5cea6f2f2c36db2f610811 --- /dev/null +++ b/brickwright/alt/alt-054/model.mpd @@ -0,0 +1,117 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 71 20 -56 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 20 -104 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 20 -128 130 1 0 0 0 1 0 0 0 1 3004.dat +1 71 20 -152 130 1 0 0 0 1 0 0 0 1 3004.dat +1 71 20 -56 170 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 20 -104 170 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 20 -128 170 1 0 0 0 1 0 0 0 1 3004.dat +1 71 20 -152 170 1 0 0 0 1 0 0 0 1 3004.dat +1 71 220 -56 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 220 -104 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 220 -128 130 1 0 0 0 1 0 0 0 1 3004.dat +1 71 220 -152 130 1 0 0 0 1 0 0 0 1 3004.dat +1 71 220 -56 170 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 220 -104 170 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 220 -128 170 1 0 0 0 1 0 0 0 1 3004.dat +1 71 220 -152 170 1 0 0 0 1 0 0 0 1 3004.dat +1 10 120 -160 120 1 0 0 0 1 0 0 0 1 3028.dat +1 4 60 -184 70 1 0 0 0 1 0 0 0 1 3009.dat +1 4 180 -184 70 1 0 0 0 1 0 0 0 1 3009.dat +1 4 40 -184 160 1 0 0 0 1 0 0 0 1 3001.dat +1 4 120 -184 160 1 0 0 0 1 0 0 0 1 3001.dat +1 4 200 -184 180 1 0 0 0 1 0 0 0 1 3001.dat +1 4 10 -184 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 210 -184 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 40 -16 80 1 0 0 0 1 0 0 0 1 3022.dat +1 4 40 -40 80 1 0 0 0 1 0 0 0 1 3003.dat +1 15 40 -64 70 1 0 0 0 1 0 0 0 1 2877.dat +1 15 40 -64 90 1 0 0 0 1 0 0 0 1 3004.dat +1 0 40 -64 70 1 0 0 0 1 0 0 0 1 85984.dat +1 4 40 -88 90 1 0 0 0 1 0 0 0 1 3004.dat +1 15 40 -96 90 1 0 0 0 1 0 0 0 1 3069b.dat +1 19 200 -16 80 1 0 0 0 1 0 0 0 1 3022.dat +1 4 200 -40 80 1 0 0 0 1 0 0 0 1 3003.dat +1 15 200 -64 70 1 0 0 0 1 0 0 0 1 2877.dat +1 15 200 -64 90 1 0 0 0 1 0 0 0 1 3004.dat +1 0 200 -64 70 1 0 0 0 1 0 0 0 1 85984.dat +1 4 200 -88 90 1 0 0 0 1 0 0 0 1 3004.dat +1 15 200 -96 90 1 0 0 0 1 0 0 0 1 3069b.dat +1 16 240 -8 190 1 0 0 0 1 0 0 0 1 shop_door.ldr +1 272 300 -32 190 1 0 0 0 1 0 0 0 1 3004.dat +1 272 300 -56 190 1 0 0 0 1 0 0 0 1 3004.dat +1 47 300 -128 190 1 0 0 0 1 0 0 0 1 87544.dat +1 272 300 -152 190 1 0 0 0 1 0 0 0 1 3004.dat +1 226 210 -32 240 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 310 -32 240 0 0 -1 0 1 0 1 0 0 3010.dat +1 320 260 -32 300 1 0 0 0 1 0 0 0 1 2456.dat +1 226 210 -56 240 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 310 -56 240 0 0 -1 0 1 0 1 0 0 3010.dat +1 320 260 -56 300 1 0 0 0 1 0 0 0 1 2456.dat +1 226 210 -80 240 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 310 -80 240 0 0 -1 0 1 0 1 0 0 3010.dat +1 0 260 -80 300 1 0 0 0 1 0 0 0 1 2456.dat +1 226 210 -104 240 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 310 -104 240 0 0 -1 0 1 0 1 0 0 3010.dat +1 0 260 -104 300 1 0 0 0 1 0 0 0 1 2456.dat +1 1 220 -128 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 272 310 -128 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 310 -128 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 10 260 -128 300 1 0 0 0 1 0 0 0 1 2456.dat +1 1 220 -152 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 272 310 -152 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 310 -152 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 10 260 -152 300 1 0 0 0 1 0 0 0 1 2456.dat +1 14 260 -160 260 1 0 0 0 1 0 0 0 1 3032.dat +1 2 230 -160 200 1 0 0 0 1 0 0 0 1 3021.dat +1 2 290 -160 200 1 0 0 0 1 0 0 0 1 3021.dat +1 4 280 -184 200 1 0 0 0 1 0 0 0 1 3001.dat +1 71 80 -16 20 1 0 0 0 1 0 0 0 1 87079.dat +1 71 80 -16 140 1 0 0 0 1 0 0 0 1 87079.dat +1 71 160 -16 20 1 0 0 0 1 0 0 0 1 87079.dat +1 71 160 -16 140 1 0 0 0 1 0 0 0 1 87079.dat +1 16 80 -16 0 1 0 0 0 1 0 0 0 1 car.ldr +1 28 260 -16 100 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 260 -16 140 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 300 -16 100 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 300 -16 140 1 0 0 0 1 0 0 0 1 3068b.dat +1 0 280 -33 120 1 0 0 0 0 -1 0 1 0 58090.dat +1 0 280 -67 120 1 0 0 0 0 -1 0 1 0 58090.dat +0 FILE shop_door.ldr +0 shop_door +0 Name: shop_door +1 0 0 -144 0 -1 0 0 0 1 0 0 0 -1 60596.dat +1 14 -32 -144 -5 1 0 0 0 1 0 0 0 1 60623.dat +0 FILE car.ldr +0 car +0 Name: car +1 0 40 -30 30 1 0 0 0 1 0 0 0 1 2926.dat +1 14 90 -25 30 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 96 -25 30 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 -10 -25 30 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 -16 -25 30 0 0 -1 1 0 0 0 -1 0 87697.dat +1 0 40 -30 130 1 0 0 0 1 0 0 0 1 2926.dat +1 14 90 -25 130 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 96 -25 130 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 -10 -25 130 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 -16 -25 130 0 0 -1 1 0 0 0 -1 0 87697.dat +1 1 40 -38 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 40 -38 120 1 0 0 0 1 0 0 0 1 3031.dat +1 322 40 -62 40 1 0 0 0 1 0 0 0 1 3001.dat +1 322 40 -62 140 1 0 0 0 1 0 0 0 1 3001.dat +1 1 20 -62 90 0 0 -1 0 1 0 1 0 0 3002.dat +1 1 60 -62 90 0 0 -1 0 1 0 1 0 0 3002.dat +1 47 20 -86 70 1 0 0 0 1 0 0 0 1 3039.dat +1 1 20 -86 90 -1 0 0 0 1 0 0 0 -1 3039.dat +1 47 60 -86 70 1 0 0 0 1 0 0 0 1 3039.dat +1 1 60 -86 90 -1 0 0 0 1 0 0 0 -1 3039.dat +1 322 40 -94 80 1 0 0 0 1 0 0 0 1 3020.dat +1 1 40 -46 10 1 0 0 0 1 0 0 0 1 3710.dat +1 1 40 -70 150 1 0 0 0 1 0 0 0 1 3710.dat +1 57 10 -54 10 1 0 0 0 1 0 0 0 1 6141.dat +1 57 70 -54 10 1 0 0 0 1 0 0 0 1 6141.dat +1 4 10 -78 150 1 0 0 0 1 0 0 0 1 6141.dat +1 4 70 -78 150 1 0 0 0 1 0 0 0 1 6141.dat diff --git a/brickwright/alt/alt-054/thumb-512.avif b/brickwright/alt/alt-054/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..6e27b11881529fec68fe1f080cc6810bbc2989fb Binary files /dev/null and b/brickwright/alt/alt-054/thumb-512.avif differ diff --git a/brickwright/alt/alt-054/trace.jsonl.gz b/brickwright/alt/alt-054/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..e75d300f21541a85f2659d945855dfdac64ff818 --- /dev/null +++ b/brickwright/alt/alt-054/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa67dd18ae8684b39a4fbb5d2bad8473fbdd1235f5c3bc6f4945afddd9bbbd3b +size 9487 diff --git a/brickwright/alt/alt-054/view-0.avif b/brickwright/alt/alt-054/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..fd27e82a95a487199763712cb4b521b99052ab93 Binary files /dev/null and b/brickwright/alt/alt-054/view-0.avif differ diff --git a/brickwright/alt/alt-054/view-1.avif b/brickwright/alt/alt-054/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..3998ce5216356e8fb38a1fb6e285961239b4641e Binary files /dev/null and b/brickwright/alt/alt-054/view-1.avif differ diff --git a/brickwright/alt/alt-054/view-2.avif b/brickwright/alt/alt-054/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..e619ea2c8e0751de2ab17202f888ed06b30afff4 Binary files /dev/null and b/brickwright/alt/alt-054/view-2.avif differ diff --git a/brickwright/alt/alt-054/view-3.avif b/brickwright/alt/alt-054/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..8b2dd39cc6eb0f94a0217b4ec32c88de1cbc63d6 Binary files /dev/null and b/brickwright/alt/alt-054/view-3.avif differ diff --git a/brickwright/alt/alt-054/view-4.avif b/brickwright/alt/alt-054/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..fd7b901dbc835adeeaa75d09e85491f837c9a5c4 Binary files /dev/null and b/brickwright/alt/alt-054/view-4.avif differ diff --git a/brickwright/alt/alt-054/view-5.avif b/brickwright/alt/alt-054/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..2bbb9ed0d4da7abbbf7d521d1976019d43427e4c Binary files /dev/null and b/brickwright/alt/alt-054/view-5.avif differ diff --git a/brickwright/alt/alt-054/view-6.avif b/brickwright/alt/alt-054/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..450fdf0801bf3dc1ce38d9f5ba27f230d1eadafa Binary files /dev/null and b/brickwright/alt/alt-054/view-6.avif differ diff --git a/brickwright/alt/alt-054/view-7.avif b/brickwright/alt/alt-054/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..f37f3e6dcf1acd127b22c3e64b53ff5cf5df5ccf Binary files /dev/null and b/brickwright/alt/alt-054/view-7.avif differ diff --git a/brickwright/alt/alt-055/build.py b/brickwright/alt/alt-055/build.py new file mode 100644 index 0000000000000000000000000000000000000000..02347805beb85e1b3b937ab27156adc9f0824ce3 --- /dev/null +++ b/brickwright/alt/alt-055/build.py @@ -0,0 +1,118 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid, color, pos, name=None, rot=bl.Rotation.DEG_0): + return b.add(bl.Element(pid, getattr(bl.Color, color)), pos, rotation=rot, name=name) + put('91405','BRIGHT_GREEN',(0,0,0),'site') + # Grey forecourt, with the station floor behind it. + put('3029','DARK_BLUISH_GRAY',(0,3,1/3),'forecourt') + put('3028','BRIGHT_GREEN',(0,7,1/3),'floor_front') + put('3031','BLUE',(0,13,1/3),'office_floor') + put('3031','BLUE',(4,13,1/3),'floor_middle') + put('3031','BLUE',(8,13,1/3),'cell_floor') + # Front facade: window and entrance, open roof and open rear. + b.add(bl.door(4,2,6,bl.DoorVariant.WINDOWED,door_color=bl.Color.YELLOW,frame_color=bl.Color.WHITE),(1,5,2/3),name='entrance') + for z in (2/3,5/3,8/3): + put('3010','LIGHT_BLUISH_GRAY',(5,5,z)) + put('3010','MEDIUM_AZURE',(5,6,z)) + put('60598','WHITE',(5,5,11/3),'office_window') + for x in (0,9): + for z in (2/3,8/3,14/3): + put('3245c','LIGHT_BLUISH_GRAY',(x,5,z),rot=bl.Rotation.DEG_90) + # Taller side returns frame the cutaway rooms without closing the back. + for y in (7,11): + put('3001','LIGHT_BLUISH_GRAY',(0,y,5/3),rot=bl.Rotation.DEG_90) + # Blue lintel links every facade bay; white grille insignia. + for x in (0,2,4,6,8): + put('3004','DARK_BLUE',(x,5,20/3)) + put('3004','DARK_BLUE',(x,6,20/3)) + put('3034','LIGHT_BLUISH_GRAY',(1,5,23/3),'lintel') + put('2877','WHITE',(4,5,8),'station_badge') + put('3957b','BLUE',(7,6,8),'radio_aerial') + # Low side walls leave the rooms visible from the rear. + for y in (7,11): + put('3001','LIGHT_BLUISH_GRAY',(0,y,2/3),rot=bl.Rotation.DEG_90) + put('3004','LIGHT_BLUISH_GRAY',(0,15,2/3)) + # Cell door, side bars and masonry enclosure. + b.add(bl.door(4,1,6,bl.DoorVariant.GRILLE,door_color=bl.Color.LIGHT_BLUISH_GRAY,frame_color=bl.Color.BLACK),(6,10,2/3),name='barred_cell') + for z in (2/3,8/3): + put('15332','WHITE',(5,11,z),rot=bl.Rotation.DEG_90) + for y in (9,13): + put('3001','DARK_BLUISH_GRAY',(10,y,2/3),rot=bl.Rotation.DEG_90) + for y in (10,12,14): + put('3004','LIGHT_BLUISH_GRAY',(11,y,5/3),rot=bl.Rotation.DEG_90) + put('3010','LIGHT_BLUISH_GRAY',(6,10,20/3),'cell_header') + put('3710','BLUE',(6,10,23/3)) + # Desk beside the cell, with writing paper and a sloped terminal. + for y in (10,13): + put('3005','MEDIUM_NOUGAT',(2,y,2/3)) + put('3020','TAN',(2,10,5/3),'desk',rot=bl.Rotation.DEG_90) + put('3069b','WHITE',(2,12,2),'paper') + put('85984','BLACK',(2,10,2),'terminal',rot=bl.Rotation.DEG_180) + put('3003','DARK_RED',(2,14,2/3),'chair_seat') + put('3004','DARK_RED',(2,15,5/3),'chair_back') + # A brick-built prisoner: boots, orange uniform, striped belt and yellow face. + for x in (7,8): + put('3005','WHITE',(x,14,2/3),'leg_'+str(x)) + put('3004','ORANGE',(7,14,5/3),'prisoner_body') + put('3710','ORANGE',(6,14,8/3),'prisoner_shoulders') + for x in (6,9): + put('3005','YELLOW',(x,14,5/3),'prisoner_hand_'+str(x)) + for x in (7,8): + mount=put('47905','BLACK',(x,14,3),'head_mount_'+str(x)) + face=bl.Element('3005',bl.Color.YELLOW) + f=b.connect(face,face.find_connector('antistud'),to=mount.find_connector('stud',facing=bl.Direction.BACK),name='face_'+str(x)) + eye=bl.Element('98138p07',bl.Color.WHITE) + b.connect(eye,'antistud',to=f.find_connector('stud',facing=bl.Direction.BACK),name='eye_'+str(x)) + put('3004','BLACK',(7,14,4),'prisoner_hair') + # The independently parked car is a second assembly. + car=bl.LegoBuild() + def cp(pid,color,pos,name=None,rot=bl.Rotation.DEG_0): + return car.add(bl.Element(pid,getattr(bl.Color,color)),pos,rotation=rot,name=name) + for y in (1,6): + axle=cp('2926','BLACK',(0,y,0)) + for side in (bl.Direction.LEFT,bl.Direction.RIGHT): + rim=bl.Element('6014b',bl.Color.YELLOW) + wheel=car.connect(rim,'hinge_3_on',to=axle.find_connector('hinge_3_in',facing=side)) + tire=bl.Element('87697',bl.Color.BLACK) + car.connect(tire,tire.find_connector('fixed_13_on',facing=bl.Direction.BACK),to=wheel.find_connector('fixed_13_in',toward=bl.Direction.BACK)) + cp('2456','BLACK',(0,1,1/3),rot=bl.Rotation.DEG_90) + cp('2456','BLACK',(2,1,1/3),rot=bl.Rotation.DEG_90) + for x in (0,2): + cp('6215','WHITE',(x,-1,4/3),rot=bl.Rotation.DEG_90) + cp('6215','WHITE',(x,6,4/3),rot=bl.Rotation.DEG_270) + for x in (0,2): + cp('3039','TRANS_CLEAR',(x,2,4/3)) + cp('3065','TRANS_CLEAR',(x,4,4/3)) + cp('3020','TAN',(0,3,7/3),'roof_plate') + cp('3004','WHITE',(0,3,8/3)) + cp('3004','WHITE',(2,3,8/3)) + cp('3004','WHITE',(0,4,8/3)) + cp('3004','WHITE',(2,4,8/3)) + cp('3710','BLUE',(0,3,11/3),'blue_roof_light') + car=bl.translate_to_ground(car) + b.add_raw(car,bl.Pose(translation=bl.Position(18,1,0)),name='police_car') + return b + + +def run_tests(): + build=create_build() + tests=TestContext(build) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=2) + stock=json.load(open('/inputs/parts.json')) + used=Counter((e.ldraw_id,e.color.name) for p in build.flattened_placements for e in [p.content]) + excess={str(k):n for k,n in used.items() if n>stock.get(k[0],{}).get(k[1],0)} + tests.check('inventory limits',not excess,str(excess)) + tests.check('barred cell present',used[('60621','LIGHT_BLUISH_GRAY')]==1) + tests.check('prisoner inside cell',7 <= build.named('prisoner_body').center.x <= 10 and build.named('prisoner_body').center.y > 11) + tests.check('desk beside cell',build.named('desk').center.x < build.named('barred_cell').center.x) + tests.check('four car tyres',used[('87697','BLACK')]==4) + tests.check('blue roof beacon',build.named(['police_car','blue_roof_light']).content.color==bl.Color.BLUE) + return tests.report() diff --git a/brickwright/alt/alt-055/hero-1024.avif b/brickwright/alt/alt-055/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..2d88638b87f44cd812593c7387c0420a1b02539b Binary files /dev/null and b/brickwright/alt/alt-055/hero-1024.avif differ diff --git a/brickwright/alt/alt-055/model.mpd b/brickwright/alt/alt-055/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..d0013e6531fd45a6ac25b4a412e64092b20f0674 --- /dev/null +++ b/brickwright/alt/alt-055/model.mpd @@ -0,0 +1,111 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 72 120 -16 100 1 0 0 0 1 0 0 0 1 3029.dat +1 10 120 -16 200 1 0 0 0 1 0 0 0 1 3028.dat +1 1 40 -16 300 1 0 0 0 1 0 0 0 1 3031.dat +1 1 120 -16 300 1 0 0 0 1 0 0 0 1 3031.dat +1 1 200 -16 300 1 0 0 0 1 0 0 0 1 3031.dat +1 16 60 -16 120 1 0 0 0 1 0 0 0 1 entrance.ldr +1 71 140 -40 110 1 0 0 0 1 0 0 0 1 3010.dat +1 322 140 -40 130 1 0 0 0 1 0 0 0 1 3010.dat +1 71 140 -64 110 1 0 0 0 1 0 0 0 1 3010.dat +1 322 140 -64 130 1 0 0 0 1 0 0 0 1 3010.dat +1 71 140 -88 110 1 0 0 0 1 0 0 0 1 3010.dat +1 322 140 -88 130 1 0 0 0 1 0 0 0 1 3010.dat +1 15 140 -160 120 1 0 0 0 1 0 0 0 1 60598.dat +1 71 10 -64 120 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 10 -112 120 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 10 -160 120 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 190 -64 120 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 190 -112 120 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 190 -160 120 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 20 -64 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 20 -64 260 0 0 -1 0 1 0 1 0 0 3001.dat +1 272 20 -184 110 1 0 0 0 1 0 0 0 1 3004.dat +1 272 20 -184 130 1 0 0 0 1 0 0 0 1 3004.dat +1 272 60 -184 110 1 0 0 0 1 0 0 0 1 3004.dat +1 272 60 -184 130 1 0 0 0 1 0 0 0 1 3004.dat +1 272 100 -184 110 1 0 0 0 1 0 0 0 1 3004.dat +1 272 100 -184 130 1 0 0 0 1 0 0 0 1 3004.dat +1 272 140 -184 110 1 0 0 0 1 0 0 0 1 3004.dat +1 272 140 -184 130 1 0 0 0 1 0 0 0 1 3004.dat +1 272 180 -184 110 1 0 0 0 1 0 0 0 1 3004.dat +1 272 180 -184 130 1 0 0 0 1 0 0 0 1 3004.dat +1 71 100 -192 120 1 0 0 0 1 0 0 0 1 3034.dat +1 15 100 -216 110 1 0 0 0 1 0 0 0 1 2877.dat +1 1 150 -200 130 1 0 0 0 1 0 0 0 1 3957b.dat +1 71 20 -40 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 20 -40 260 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 20 -40 310 1 0 0 0 1 0 0 0 1 3004.dat +1 16 160 -16 210 1 0 0 0 1 0 0 0 1 barred_cell.ldr +1 15 110 -64 260 0 0 -1 0 1 0 1 0 0 15332.dat +1 15 110 -112 260 0 0 -1 0 1 0 1 0 0 15332.dat +1 72 220 -40 220 0 0 -1 0 1 0 1 0 0 3001.dat +1 72 220 -40 300 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 230 -64 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 230 -64 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 230 -64 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 160 -184 210 1 0 0 0 1 0 0 0 1 3010.dat +1 1 160 -192 210 1 0 0 0 1 0 0 0 1 3710.dat +1 84 50 -40 210 1 0 0 0 1 0 0 0 1 3005.dat +1 84 50 -40 270 1 0 0 0 1 0 0 0 1 3005.dat +1 19 60 -48 240 0 0 -1 0 1 0 1 0 0 3020.dat +1 15 60 -56 250 1 0 0 0 1 0 0 0 1 3069b.dat +1 0 60 -48 210 -1 0 0 0 1 0 0 0 -1 85984.dat +1 320 60 -40 300 1 0 0 0 1 0 0 0 1 3003.dat +1 320 60 -64 310 1 0 0 0 1 0 0 0 1 3004.dat +1 15 150 -40 290 1 0 0 0 1 0 0 0 1 3005.dat +1 15 170 -40 290 1 0 0 0 1 0 0 0 1 3005.dat +1 25 160 -64 290 1 0 0 0 1 0 0 0 1 3004.dat +1 25 160 -72 290 1 0 0 0 1 0 0 0 1 3710.dat +1 14 130 -64 290 1 0 0 0 1 0 0 0 1 3005.dat +1 14 190 -64 290 1 0 0 0 1 0 0 0 1 3005.dat +1 0 150 -96 290 1 0 0 0 1 0 0 0 1 47905.dat +1 14 150 -86 324 1 0 0 0 0 1 0 -1 0 3005.dat +1 15 150 -86 332 1 0 0 0 0 1 0 -1 0 98138p07.dat +1 0 170 -96 290 1 0 0 0 1 0 0 0 1 47905.dat +1 14 170 -86 324 1 0 0 0 0 1 0 -1 0 3005.dat +1 15 170 -86 332 1 0 0 0 0 1 0 -1 0 98138p07.dat +1 0 160 -120 290 1 0 0 0 1 0 0 0 1 3004.dat +1 16 360 0 20 1 0 0 0 1 0 0 0 1 police_car.ldr +0 FILE entrance.ldr +0 entrance +0 Name: entrance +1 15 0 -144 0 1 0 0 0 1 0 0 0 1 60599.dat +1 14 -32 -144 -15 1 0 0 0 1 0 0 0 1 60623.dat +0 FILE barred_cell.ldr +0 barred_cell +0 Name: barred_cell +1 0 0 -144 0 -1 0 0 0 1 0 0 0 -1 60596.dat +1 71 -32 -144 -5 1 0 0 0 1 0 0 0 1 60621.dat +0 FILE police_car.ldr +0 police_car +0 Name: police_car +1 0 40 -30 30 1 0 0 0 1 0 0 0 1 2926.dat +1 14 90 -25 30 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 96 -25 30 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 -10 -25 30 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 -16 -25 30 0 0 -1 1 0 0 0 -1 0 87697.dat +1 0 40 -30 130 1 0 0 0 1 0 0 0 1 2926.dat +1 14 90 -25 130 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 96 -25 130 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 -10 -25 130 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 -16 -25 130 0 0 -1 1 0 0 0 -1 0 87697.dat +1 0 20 -54 80 0 0 -1 0 1 0 1 0 0 2456.dat +1 0 60 -54 80 0 0 -1 0 1 0 1 0 0 2456.dat +1 15 20 -78 0 0 0 -1 0 1 0 1 0 0 6215.dat +1 15 20 -78 160 0 0 1 0 1 0 -1 0 0 6215.dat +1 15 60 -78 0 0 0 -1 0 1 0 1 0 0 6215.dat +1 15 60 -78 160 0 0 1 0 1 0 -1 0 0 6215.dat +1 47 20 -78 70 1 0 0 0 1 0 0 0 1 3039.dat +1 47 20 -78 90 1 0 0 0 1 0 0 0 1 3065.dat +1 47 60 -78 70 1 0 0 0 1 0 0 0 1 3039.dat +1 47 60 -78 90 1 0 0 0 1 0 0 0 1 3065.dat +1 19 40 -86 80 1 0 0 0 1 0 0 0 1 3020.dat +1 15 20 -110 70 1 0 0 0 1 0 0 0 1 3004.dat +1 15 60 -110 70 1 0 0 0 1 0 0 0 1 3004.dat +1 15 20 -110 90 1 0 0 0 1 0 0 0 1 3004.dat +1 15 60 -110 90 1 0 0 0 1 0 0 0 1 3004.dat +1 1 40 -118 70 1 0 0 0 1 0 0 0 1 3710.dat diff --git a/brickwright/alt/alt-055/thumb-512.avif b/brickwright/alt/alt-055/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..8cfb517d0e01f26d246ffd4b8859bea401d84faa Binary files /dev/null and b/brickwright/alt/alt-055/thumb-512.avif differ diff --git a/brickwright/alt/alt-055/trace.jsonl.gz b/brickwright/alt/alt-055/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..e6a87330d0c199102e05d4445c9298a7b7690207 --- /dev/null +++ b/brickwright/alt/alt-055/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b234a81379597a1d3ea8dc719eb034a3e9ebed9a2970879f5795a5f8d4126c72 +size 7870 diff --git a/brickwright/alt/alt-055/view-0.avif b/brickwright/alt/alt-055/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..e1d03b7eec3802c57b44385b7ddb747849a7f5bc Binary files /dev/null and b/brickwright/alt/alt-055/view-0.avif differ diff --git a/brickwright/alt/alt-055/view-1.avif b/brickwright/alt/alt-055/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..1c1745d2ceb84eefa5910af35df09a7daa9aba3a Binary files /dev/null and b/brickwright/alt/alt-055/view-1.avif differ diff --git a/brickwright/alt/alt-055/view-2.avif b/brickwright/alt/alt-055/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..538fd45b10015dff23b859bdf522d5c5ef0794ff Binary files /dev/null and b/brickwright/alt/alt-055/view-2.avif differ diff --git a/brickwright/alt/alt-055/view-3.avif b/brickwright/alt/alt-055/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..bc7886f8a2062de8c8ce5167b2b5189c2375dc17 Binary files /dev/null and b/brickwright/alt/alt-055/view-3.avif differ diff --git a/brickwright/alt/alt-055/view-4.avif b/brickwright/alt/alt-055/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..4ae21bbf9791172a98bb3e0560473421e0afe69e Binary files /dev/null and b/brickwright/alt/alt-055/view-4.avif differ diff --git a/brickwright/alt/alt-055/view-5.avif b/brickwright/alt/alt-055/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..646793226691c7bb10872037c897bbb84d73e001 Binary files /dev/null and b/brickwright/alt/alt-055/view-5.avif differ diff --git a/brickwright/alt/alt-055/view-6.avif b/brickwright/alt/alt-055/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..a3b83e192b01a44896cc0ff16b5f1d2ae0ef4464 Binary files /dev/null and b/brickwright/alt/alt-055/view-6.avif differ diff --git a/brickwright/alt/alt-055/view-7.avif b/brickwright/alt/alt-055/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..e38b716c8c8ba59767026d58fd1d80ecb3d59126 Binary files /dev/null and b/brickwright/alt/alt-055/view-7.avif differ diff --git a/brickwright/alt/alt-056/build.py b/brickwright/alt/alt-056/build.py new file mode 100644 index 0000000000000000000000000000000000000000..dfbe6f47c5b5913730a4b59d15ea7f1093efa97b --- /dev/null +++ b/brickwright/alt/alt-056/build.py @@ -0,0 +1,111 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + C=bl.Color + def put(pid,col,x,y,z,rot=0,name=None): + return b.add(bl.Element(pid,getattr(C,col)),(x,y,z),bl.Rotation(rot),name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='ground') + # Broad, rooted trunk; the same core rises through the cabin and roof. + for i in range(5): + put('3003','MEDIUM_NOUGAT',7,8,1/3+i,name='lower_trunk_'+str(i)) + for x,rot in [(6,0),(9,0)]: + put('3040b','REDDISH_BROWN',x,8,1/3,rot) + # Four stout timber supports share the load of the wraparound deck. + for x,y in [(3,5),(11,5),(3,10),(11,10)]: + for k in range(5): + col='DARK_ORANGE' if k<2 else 'MEDIUM_NOUGAT' + if k<2: put('30136',col,x,y,1/3+k) + else: put('3004', 'MEDIUM_NOUGAT' if k<4 else 'TAN',x,y,1/3+k) + put('3029','DARK_BLUISH_GRAY',2,2,16/3,name='front_balcony') + put('3028','BRIGHT_GREEN',2,6,16/3,name='rear_balcony') + for x in (2,8): put('3795','REDDISH_BROWN',x,4,17/3) + # White balcony balustrade with an opening at the ladder. + put('15332','WHITE',8,2,17/3,name='front_railing') + put('15332','WHITE',2,7,17/3,1,name='side_railing') + put('15207','REDDISH_BROWN',13,7,17/3,1) + put('15207','REDDISH_BROWN',2,11,17/3) + # Ladder: two timber stringers, four exposed rungs, and a broad landing. + for k in range(4): + z=1/3+4*k/3 + put('3710','TAN' if k<2 else 'BLUE',3,1,z,name='rung_'+str(k)) + for x in (3,6): put('3005','MEDIUM_NOUGAT',x,1,z+1/3) + put('3020','TAN',3,1,17/3,name='ladder_landing') + # Cabin walls stand behind the balcony, leaving a central open doorway. + z=17/3 + # side walls, sill and glazed lattice openings + for x in (5,10): + put('3010','REDDISH_BROWN',x,7,z,1) + frame=put('60593','TAN',x,8,z+1,1,name='window_'+str(x)) + for yy in (7,10): + for k in range(3): put('3005','LIGHT_BLUISH_GRAY' if k==0 else 'YELLOW' if k==1 else 'MEDIUM_LAVENDER',x,yy,z+1+k) + # Rear wall and doorway piers. + for k in range(4): + put('3010','BRIGHT_LIGHT_YELLOW',6,11,z+k) + for x in (5,9): + put('3004','BRIGHT_LIGHT_YELLOW',x,6,z+k) + # trunk remains visible inside, rises through the aperture in the roof + for k in range(9): + col='MEDIUM_NOUGAT' if k<3 else 'DARK_TAN' if k<7 else 'REDDISH_BROWN' + if k<7: put('3003',col,7,8,z+k,name='upper_trunk_'+str(k)) + else: put('3002',col,7,8,z+k,name='upper_trunk_'+str(k)) + # Roof deck, pierced visually by the continuing tree core. + for x in (3,9): put('3020','MEDIUM_AZURE',x,8,29/3) + for y in (6,10): put('3034','LIGHT_BLUISH_GRAY',4,y,29/3) + for x in (4,8): + put('3037','MAGENTA',x,6,10) + put('3037','MAGENTA',x,10,10,2) + # Support the raised slopes on both sides of the trunk. + for x in (4,9): put('3002','BLACK',x,8,10) + for x in (4,10): + put('3039','MAGENTA',x,7,11) + put('3039','MAGENTA',x,9,11,2) + for x in (6,9): + put('3040b','MAGENTA',x,7,11) + put('3040b','MAGENTA',x,9,11,2) + # Spreading leafy crown with irregular green tiers and leaf sprigs. + put('2456','BRIGHT_GREEN',5,8,44/3) + put('3031','BRIGHT_GREEN',6,7,47/3) + put('3001','DARK_GREEN',4,7,16) + put('3001','GREEN',8,7,16) + for x,y in [(5,5),(8,9)]: + put('3001','DARK_GREEN',x,y,16) + put('3039','LIME',8,5,17) + put('3039','GREEN',11,9,17,2) + put('3021','GREEN',5,6,17) + put('3021','GREEN',8,8,17) + put('3003','LIME',7,7,52/3) + put('3039','GREEN',5,7,52/3) + put('3039','GREEN',9,8,52/3,2) + for x,y in [(5,8),(10,8),(7,7)]: + put('4727','BRIGHT_GREEN',x,y,55/3) + # Small white bird on the roof: rounded body, head, orange beak and tail. + put('6215','WHITE',4,8,12,name='bird_body') + head=put('47905','BLACK',4,8,40/3,name='bird_head') + for direction in (bl.Direction.FRONT,bl.Direction.BACK): + eye=bl.Element('98138p07',C.WHITE) + b.connect(eye,eye.find_connector('antistud'),to=head.find_connector('stud',facing=direction)) + put('3023b','ORANGE',3,8,13,name='bird_beak') + put('3069b','WHITE',4,8,43/3,name='bird_crown') + put('3069b','WHITE',5,8,13,name='bird_tail') + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):v for k,v in used.items() if v>inventory.get(k[0],{}).get(k[1],0)} + tests.check('Inventory limits',not excess,str(excess)) + tests.check('Trunk continues above roof',b.named('upper_trunk_8').center.z>b.named('bird_body').center.z,'Continuous core reaches the leafy crown') + tests.check('Balcony and ladder',all(n in b.names for n in ['front_balcony','rear_balcony','ladder_landing','rung_0','rung_3','front_railing']), 'Wraparound deck with railings and ground-reaching ladder') + tests.check('Bird on roof','bird_head' in b.names and 'bird_beak' in b.names,'White bird with orange beak') + return tests.report() diff --git a/brickwright/alt/alt-056/hero-1024.avif b/brickwright/alt/alt-056/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..91303449b13d9938a67d40daa15908838916f623 Binary files /dev/null and b/brickwright/alt/alt-056/hero-1024.avif differ diff --git a/brickwright/alt/alt-056/model.mpd b/brickwright/alt/alt-056/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..c1a3a8dd54600e70aa0c1133ff8102c21f64778e --- /dev/null +++ b/brickwright/alt/alt-056/model.mpd @@ -0,0 +1,127 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 84 160 -32 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 160 -56 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 160 -80 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 160 -104 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 160 -128 180 1 0 0 0 1 0 0 0 1 3003.dat +1 70 130 -32 190 1 0 0 0 1 0 0 0 1 3040b.dat +1 70 190 -32 190 1 0 0 0 1 0 0 0 1 3040b.dat +1 484 80 -32 110 1 0 0 0 1 0 0 0 1 30136.dat +1 484 80 -56 110 1 0 0 0 1 0 0 0 1 30136.dat +1 84 80 -80 110 1 0 0 0 1 0 0 0 1 3004.dat +1 84 80 -104 110 1 0 0 0 1 0 0 0 1 3004.dat +1 19 80 -128 110 1 0 0 0 1 0 0 0 1 3004.dat +1 484 240 -32 110 1 0 0 0 1 0 0 0 1 30136.dat +1 484 240 -56 110 1 0 0 0 1 0 0 0 1 30136.dat +1 84 240 -80 110 1 0 0 0 1 0 0 0 1 3004.dat +1 84 240 -104 110 1 0 0 0 1 0 0 0 1 3004.dat +1 19 240 -128 110 1 0 0 0 1 0 0 0 1 3004.dat +1 484 80 -32 210 1 0 0 0 1 0 0 0 1 30136.dat +1 484 80 -56 210 1 0 0 0 1 0 0 0 1 30136.dat +1 84 80 -80 210 1 0 0 0 1 0 0 0 1 3004.dat +1 84 80 -104 210 1 0 0 0 1 0 0 0 1 3004.dat +1 19 80 -128 210 1 0 0 0 1 0 0 0 1 3004.dat +1 484 240 -32 210 1 0 0 0 1 0 0 0 1 30136.dat +1 484 240 -56 210 1 0 0 0 1 0 0 0 1 30136.dat +1 84 240 -80 210 1 0 0 0 1 0 0 0 1 3004.dat +1 84 240 -104 210 1 0 0 0 1 0 0 0 1 3004.dat +1 19 240 -128 210 1 0 0 0 1 0 0 0 1 3004.dat +1 72 160 -136 80 1 0 0 0 1 0 0 0 1 3029.dat +1 10 160 -136 180 1 0 0 0 1 0 0 0 1 3028.dat +1 70 100 -144 100 1 0 0 0 1 0 0 0 1 3795.dat +1 70 220 -144 100 1 0 0 0 1 0 0 0 1 3795.dat +1 15 200 -184 50 1 0 0 0 1 0 0 0 1 15332.dat +1 15 50 -184 180 0 0 -1 0 1 0 1 0 0 15332.dat +1 70 270 -160 180 0 0 -1 0 1 0 1 0 0 15207.dat +1 70 80 -160 230 1 0 0 0 1 0 0 0 1 15207.dat +1 19 100 -16 30 1 0 0 0 1 0 0 0 1 3710.dat +1 84 70 -40 30 1 0 0 0 1 0 0 0 1 3005.dat +1 84 130 -40 30 1 0 0 0 1 0 0 0 1 3005.dat +1 19 100 -48 30 1 0 0 0 1 0 0 0 1 3710.dat +1 84 70 -72 30 1 0 0 0 1 0 0 0 1 3005.dat +1 84 130 -72 30 1 0 0 0 1 0 0 0 1 3005.dat +1 1 100 -80 30 1 0 0 0 1 0 0 0 1 3710.dat +1 84 70 -104 30 1 0 0 0 1 0 0 0 1 3005.dat +1 84 130 -104 30 1 0 0 0 1 0 0 0 1 3005.dat +1 1 100 -112 30 1 0 0 0 1 0 0 0 1 3710.dat +1 84 70 -136 30 1 0 0 0 1 0 0 0 1 3005.dat +1 84 130 -136 30 1 0 0 0 1 0 0 0 1 3005.dat +1 19 100 -144 40 1 0 0 0 1 0 0 0 1 3020.dat +1 70 110 -160 180 0 0 -1 0 1 0 1 0 0 3010.dat +1 19 110 -232 180 0 0 -1 0 1 0 1 0 0 60593.dat +1 71 110 -184 150 1 0 0 0 1 0 0 0 1 3005.dat +1 14 110 -208 150 1 0 0 0 1 0 0 0 1 3005.dat +1 30 110 -232 150 1 0 0 0 1 0 0 0 1 3005.dat +1 71 110 -184 210 1 0 0 0 1 0 0 0 1 3005.dat +1 14 110 -208 210 1 0 0 0 1 0 0 0 1 3005.dat +1 30 110 -232 210 1 0 0 0 1 0 0 0 1 3005.dat +1 70 210 -160 180 0 0 -1 0 1 0 1 0 0 3010.dat +1 19 210 -232 180 0 0 -1 0 1 0 1 0 0 60593.dat +1 71 210 -184 150 1 0 0 0 1 0 0 0 1 3005.dat +1 14 210 -208 150 1 0 0 0 1 0 0 0 1 3005.dat +1 30 210 -232 150 1 0 0 0 1 0 0 0 1 3005.dat +1 71 210 -184 210 1 0 0 0 1 0 0 0 1 3005.dat +1 14 210 -208 210 1 0 0 0 1 0 0 0 1 3005.dat +1 30 210 -232 210 1 0 0 0 1 0 0 0 1 3005.dat +1 226 160 -160 230 1 0 0 0 1 0 0 0 1 3010.dat +1 226 120 -160 130 1 0 0 0 1 0 0 0 1 3004.dat +1 226 200 -160 130 1 0 0 0 1 0 0 0 1 3004.dat +1 226 160 -184 230 1 0 0 0 1 0 0 0 1 3010.dat +1 226 120 -184 130 1 0 0 0 1 0 0 0 1 3004.dat +1 226 200 -184 130 1 0 0 0 1 0 0 0 1 3004.dat +1 226 160 -208 230 1 0 0 0 1 0 0 0 1 3010.dat +1 226 120 -208 130 1 0 0 0 1 0 0 0 1 3004.dat +1 226 200 -208 130 1 0 0 0 1 0 0 0 1 3004.dat +1 226 160 -232 230 1 0 0 0 1 0 0 0 1 3010.dat +1 226 120 -232 130 1 0 0 0 1 0 0 0 1 3004.dat +1 226 200 -232 130 1 0 0 0 1 0 0 0 1 3004.dat +1 84 160 -160 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 160 -184 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 160 -208 180 1 0 0 0 1 0 0 0 1 3003.dat +1 28 160 -232 180 1 0 0 0 1 0 0 0 1 3003.dat +1 28 160 -256 180 1 0 0 0 1 0 0 0 1 3003.dat +1 28 160 -280 180 1 0 0 0 1 0 0 0 1 3003.dat +1 28 160 -304 180 1 0 0 0 1 0 0 0 1 3003.dat +1 70 170 -328 180 1 0 0 0 1 0 0 0 1 3002.dat +1 70 170 -352 180 1 0 0 0 1 0 0 0 1 3002.dat +1 322 100 -240 180 1 0 0 0 1 0 0 0 1 3020.dat +1 322 220 -240 180 1 0 0 0 1 0 0 0 1 3020.dat +1 71 160 -240 140 1 0 0 0 1 0 0 0 1 3034.dat +1 71 160 -240 220 1 0 0 0 1 0 0 0 1 3034.dat +1 26 120 -264 150 1 0 0 0 1 0 0 0 1 3037.dat +1 26 120 -264 210 -1 0 0 0 1 0 0 0 -1 3037.dat +1 26 200 -264 150 1 0 0 0 1 0 0 0 1 3037.dat +1 26 200 -264 210 -1 0 0 0 1 0 0 0 -1 3037.dat +1 0 110 -264 180 1 0 0 0 1 0 0 0 1 3002.dat +1 0 210 -264 180 1 0 0 0 1 0 0 0 1 3002.dat +1 26 100 -288 170 1 0 0 0 1 0 0 0 1 3039.dat +1 26 100 -288 190 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 220 -288 170 1 0 0 0 1 0 0 0 1 3039.dat +1 26 220 -288 190 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 130 -288 170 1 0 0 0 1 0 0 0 1 3040b.dat +1 26 130 -288 190 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 26 190 -288 170 1 0 0 0 1 0 0 0 1 3040b.dat +1 26 190 -288 190 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 10 160 -376 180 1 0 0 0 1 0 0 0 1 2456.dat +1 10 160 -384 180 1 0 0 0 1 0 0 0 1 3031.dat +1 288 120 -408 160 1 0 0 0 1 0 0 0 1 3001.dat +1 2 200 -408 160 1 0 0 0 1 0 0 0 1 3001.dat +1 288 140 -408 120 1 0 0 0 1 0 0 0 1 3001.dat +1 288 200 -408 200 1 0 0 0 1 0 0 0 1 3001.dat +1 27 180 -432 130 1 0 0 0 1 0 0 0 1 3039.dat +1 2 240 -432 190 -1 0 0 0 1 0 0 0 -1 3039.dat +1 2 130 -416 140 1 0 0 0 1 0 0 0 1 3021.dat +1 2 190 -416 180 1 0 0 0 1 0 0 0 1 3021.dat +1 27 160 -440 160 1 0 0 0 1 0 0 0 1 3003.dat +1 2 120 -440 170 1 0 0 0 1 0 0 0 1 3039.dat +1 2 200 -440 170 -1 0 0 0 1 0 0 0 -1 3039.dat +1 10 110 -464 170 1 0 0 0 1 0 0 0 1 4727.dat +1 10 210 -464 170 1 0 0 0 1 0 0 0 1 4727.dat +1 10 150 -464 150 1 0 0 0 1 0 0 0 1 4727.dat +1 15 100 -312 180 1 0 0 0 1 0 0 0 1 6215.dat +1 0 90 -344 170 1 0 0 0 1 0 0 0 1 47905.dat +1 15 90 -334 152 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 90 -334 188 1 0 0 0 0 1 0 -1 0 98138p07.dat +1 25 80 -320 170 1 0 0 0 1 0 0 0 1 3023b.dat +1 15 100 -352 170 1 0 0 0 1 0 0 0 1 3069b.dat +1 15 120 -320 170 1 0 0 0 1 0 0 0 1 3069b.dat diff --git a/brickwright/alt/alt-056/thumb-512.avif b/brickwright/alt/alt-056/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..5aef29946115747b8491ea1be942ea70db4849cc Binary files /dev/null and b/brickwright/alt/alt-056/thumb-512.avif differ diff --git a/brickwright/alt/alt-056/trace.jsonl.gz b/brickwright/alt/alt-056/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..7fd0b256883454839cb073a5d85fcef8b20dcf58 --- /dev/null +++ b/brickwright/alt/alt-056/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6080c2ab8ebc74d5d4b23cc9730cb9f85a7d51d3fe6fbe7fb3cbe8f115014899 +size 8065 diff --git a/brickwright/alt/alt-056/view-0.avif b/brickwright/alt/alt-056/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..6f6c9318386a21f5dabaf116181483e744436792 Binary files /dev/null and b/brickwright/alt/alt-056/view-0.avif differ diff --git a/brickwright/alt/alt-056/view-1.avif b/brickwright/alt/alt-056/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..87c79e40c0e644b7b8f33b8a164558bfc03ce0d4 Binary files /dev/null and b/brickwright/alt/alt-056/view-1.avif differ diff --git a/brickwright/alt/alt-056/view-2.avif b/brickwright/alt/alt-056/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..b56897661eeaa1536d7d633ec0c4763de91ed944 Binary files /dev/null and b/brickwright/alt/alt-056/view-2.avif differ diff --git a/brickwright/alt/alt-056/view-3.avif b/brickwright/alt/alt-056/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..a6428ac6460f9e3c530faf030039d946b195d56f Binary files /dev/null and b/brickwright/alt/alt-056/view-3.avif differ diff --git a/brickwright/alt/alt-056/view-4.avif b/brickwright/alt/alt-056/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..54720f5cd034a7c395b84bea07976bb9f11ffd2f Binary files /dev/null and b/brickwright/alt/alt-056/view-4.avif differ diff --git a/brickwright/alt/alt-056/view-5.avif b/brickwright/alt/alt-056/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..49fce4c4bcc4cbe5ea17980942b9e38f79ada344 Binary files /dev/null and b/brickwright/alt/alt-056/view-5.avif differ diff --git a/brickwright/alt/alt-056/view-6.avif b/brickwright/alt/alt-056/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..7a3f28240dfeaa9202cb71b8e249bcbdabc4b800 Binary files /dev/null and b/brickwright/alt/alt-056/view-6.avif differ diff --git a/brickwright/alt/alt-056/view-7.avif b/brickwright/alt/alt-056/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..f4a4eb796bf41c87425336dd02e32b455823319c Binary files /dev/null and b/brickwright/alt/alt-056/view-7.avif differ diff --git a/brickwright/alt/alt-057/build.py b/brickwright/alt/alt-057/build.py new file mode 100644 index 0000000000000000000000000000000000000000..83162a871ba3571b4e431a44e4fbed352f195ad3 --- /dev/null +++ b/brickwright/alt/alt-057/build.py @@ -0,0 +1,103 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + def add(pid,col,x,y,z,rot=bl.Rotation.DEG_0,name=None): + return b.add(bl.Element(pid,getattr(bl.Color,col)),(x,y,z),rotation=rot,name=name) + add('91405','BRIGHT_GREEN',0,0,0,name='land') + for x in (4,6): + for y in (2,4): add('3068b','DARK_TAN',x,y,1/3) + for x,y in ((1,1),(1,13)): + leaf=add('4727','BRIGHT_GREEN',x,y,1/3) + b.stack(bl.Element('98262',bl.Color.YELLOW),on=leaf) + # Thick masonry side walls and a six-brick-high working entrance. + for i,col in enumerate(['DARK_TAN','DARK_TAN','DARK_BLUISH_GRAY','LIGHT_BLUISH_GRAY','LIGHT_BLUISH_GRAY','DARK_AZURE']): + for x in (2,8): + add('3001',col,x,7,1/3+i,bl.Rotation.DEG_90) + add('3010','BRIGHT_LIGHT_YELLOW' if i<2 else 'LIGHT_BLUISH_GRAY',4,11,1/3+i) + for x in (2,8): + for i in range(3): add('3245c','LIGHT_BLUISH_GRAY',x,6,1/3+2*i) + b.add(bl.door(4,1,6,bl.DoorVariant.WINDOWED,door_color=bl.Color.YELLOW,frame_color=bl.Color.BLACK),(4,6,1/3),name='entrance') + # The two large plates bridge all the masonry and make a full wraparound deck. + add('3029','DARK_BLUISH_GRAY',0,4,19/3,name='balcony_front') + add('3028','BRIGHT_GREEN',0,8,19/3,name='balcony_rear') + for x in (0,8): add('15332','WHITE',x,4,20/3) + for x in (4,6): add('2877','WHITE',x,4,20/3) + for x in (0,11): + for y in (5,7,9,11): add('30136','DARK_ORANGE',x,y,20/3,bl.Rotation.DEG_90) + for x in (0,4,8): add('3010','REDDISH_BROWN',x,13,20/3) + # Narrow upper storey, with two latticed front windows. + for z in (20/3,23/3): + for y in (8,10): add('3001','DARK_GREEN',4,y,z) + for x in (4,6): + for y in (8,10): add('3003','DARK_TAN',x,y,26/3) + for x in (4,6): + add('60593','TAN',x,8,29/3,name='window_'+str(x)) + for i in range(3): + add('3010','BRIGHT_LIGHT_YELLOW',4,11,29/3+i) + for x in (4,7): add('3004','MEDIUM_NOUGAT',x,9,29/3+i,bl.Rotation.DEG_90) + for y in (8,10): add('3001','TAN',4,y,38/3) + mount=add('30414','TAN',4,8,41/3,name='rotor_mount') + add('3622','TAN',4,9,41/3) + add('3005','MEDIUM_NOUGAT',7,9,41/3) + add('3001','DARK_AZURE',4,10,41/3) + # Gabled cap, with a small blue finial. + for y,rot in ((8,bl.Rotation.DEG_0),(10,bl.Rotation.DEG_180)): + for x in (4,6): add('3039','BLUE',x,y,44/3,rot) + for x in (4,6): add('3004','DARK_BLUE',x,9,47/3) + add('3942c','BLUE',5,9,50/3) + # Four broad, plated sails. Built flat, then mounted vertically on the facade. + rotor=bl.LegoBuild() + def r(pid,col,x,y,z,rot=bl.Rotation.DEG_0): + return rotor.add(bl.Element(pid,getattr(bl.Color,col)),(x,y,z),rotation=rot) + hub=r('3031','BLUE',-2,-2,0) + for x in (-8,0): r('3034','LIGHT_BLUISH_GRAY',x,-1,1/3) + for y in (-7,1): r('3795','REDDISH_BROWN',-1,y,1/3,bl.Rotation.DEG_90) + for x in (-7,3): r('87079','LIGHT_BLUISH_GRAY',x,-1,2/3) + for y in (-7,3): r('87079','LIGHT_BLUISH_GRAY',-1,y,2/3,bl.Rotation.DEG_90) + r('14769','DARK_BLUISH_GRAY',-1,-1,2/3) + source=hub.find_connector('antistud',toward=(-0.5,-0.5,0)) + target=mount.find_connector('stud',facing=bl.Direction.FRONT,toward=(5.5,8,14)) + b.connect(rotor,source,to=target,target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90),name='four_sails') + + # Handcart: a stud-secured undercarriage, two working wheels and two flour sacks. + add('3002','BLACK',12,3,1/3,bl.Rotation.DEG_90,name='cart_support') + add('3021','GREEN',12,3,4/3,bl.Rotation.DEG_90) + axle=add('2926','BLACK',11,4,5/3,name='cart_axle') + for side in (bl.Direction.LEFT,bl.Direction.RIGHT): + rim=bl.Element('6014b',bl.Color.YELLOW) + wheel=b.connect(rim,'hinge_3_on',to=axle.find_connector('hinge_3_in',toward=side),name='wheel_'+side.name) + tyre=bl.Element('87697',bl.Color.BLACK) + b.connect(tyre,tyre.find_connector('fixed_13_on',facing=bl.Direction.BACK),to=wheel.find_connector('fixed_13_in',toward=side)) + add('3031','BLUE',11,3,2,name='cart_bed') + for x in (11,14): add('15207','REDDISH_BROWN',x,3,7/3,bl.Rotation.DEG_90) + for x in (11,14): add('3710','TAN',x,0,5/3,bl.Rotation.DEG_90) + for x in (3,5): + add('3003','MEDIUM_NOUGAT',12,x,7/3,name='sack_base_'+str(x)) + add('30367c','WHITE',12,x,10/3,name='sack_'+str(x)) + # A tied brown mouth on each rounded sack. + sack=b.named('sack_'+str(x)) + tie=bl.Element('6141',bl.Color.REDDISH_BROWN) + b.connect(tie,tie.find_connector('antistud'),to=sack.find_connector('stud',facing=bl.Direction.UP)) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inv=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + bad={str(k):n for k,n in used.items() if n>inv.get(k[0],{}).get(k[1],0)} + tests.check('inventory quantities',not bad,str(bad)) + tests.check('four broad sails',sum(n for (pid,c),n in used.items() if pid=='87079')==4) + tests.check('wraparound balcony',b.named('balcony_front').width>=12 and b.named('balcony_rear').depth>=6) + tests.check('two sacks in cart',used[('30367c','WHITE')]==2 and all('sack_'+str(y) in b.names for y in (3,5))) + tests.check('cart beside entrance',b.named('cart_bed').center.x>b.named('entrance').center.x and b.named('cart_bed').center.z<3) + return tests.report() diff --git a/brickwright/alt/alt-057/hero-1024.avif b/brickwright/alt/alt-057/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..8e99a88da5b15b8a0e7811c3145fb76a35547e91 Binary files /dev/null and b/brickwright/alt/alt-057/hero-1024.avif differ diff --git a/brickwright/alt/alt-057/model.mpd b/brickwright/alt/alt-057/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..0615b9407e6e13201806289e929b31aacf8090cd --- /dev/null +++ b/brickwright/alt/alt-057/model.mpd @@ -0,0 +1,123 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 28 100 -16 60 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 100 -16 100 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 140 -16 60 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 140 -16 100 1 0 0 0 1 0 0 0 1 3068b.dat +1 10 30 -32 30 1 0 0 0 1 0 0 0 1 4727.dat +1 14 30 -56 30 1 0 0 0 1 0 0 0 1 98262.dat +1 10 30 -32 270 1 0 0 0 1 0 0 0 1 4727.dat +1 14 30 -56 270 1 0 0 0 1 0 0 0 1 98262.dat +1 28 60 -32 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 28 180 -32 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 226 120 -32 230 1 0 0 0 1 0 0 0 1 3010.dat +1 28 60 -56 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 28 180 -56 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 226 120 -56 230 1 0 0 0 1 0 0 0 1 3010.dat +1 72 60 -80 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 72 180 -80 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 120 -80 230 1 0 0 0 1 0 0 0 1 3010.dat +1 71 60 -104 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 180 -104 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 120 -104 230 1 0 0 0 1 0 0 0 1 3010.dat +1 71 60 -128 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 180 -128 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 120 -128 230 1 0 0 0 1 0 0 0 1 3010.dat +1 321 60 -152 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 321 180 -152 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 120 -152 230 1 0 0 0 1 0 0 0 1 3010.dat +1 71 60 -56 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 60 -104 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 60 -152 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 180 -56 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 180 -104 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 180 -152 130 1 0 0 0 1 0 0 0 1 3245c.dat +1 16 120 -8 130 1 0 0 0 1 0 0 0 1 entrance.ldr +1 72 120 -160 120 1 0 0 0 1 0 0 0 1 3029.dat +1 10 120 -160 220 1 0 0 0 1 0 0 0 1 3028.dat +1 15 40 -208 90 1 0 0 0 1 0 0 0 1 15332.dat +1 15 200 -208 90 1 0 0 0 1 0 0 0 1 15332.dat +1 15 100 -184 90 1 0 0 0 1 0 0 0 1 2877.dat +1 15 140 -184 90 1 0 0 0 1 0 0 0 1 2877.dat +1 484 10 -184 120 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 10 -184 160 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 10 -184 200 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 10 -184 240 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 230 -184 120 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 230 -184 160 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 230 -184 200 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 230 -184 240 0 0 -1 0 1 0 1 0 0 30136.dat +1 70 40 -184 270 1 0 0 0 1 0 0 0 1 3010.dat +1 70 120 -184 270 1 0 0 0 1 0 0 0 1 3010.dat +1 70 200 -184 270 1 0 0 0 1 0 0 0 1 3010.dat +1 288 120 -184 180 1 0 0 0 1 0 0 0 1 3001.dat +1 288 120 -184 220 1 0 0 0 1 0 0 0 1 3001.dat +1 288 120 -208 180 1 0 0 0 1 0 0 0 1 3001.dat +1 288 120 -208 220 1 0 0 0 1 0 0 0 1 3001.dat +1 28 100 -232 180 1 0 0 0 1 0 0 0 1 3003.dat +1 28 100 -232 220 1 0 0 0 1 0 0 0 1 3003.dat +1 28 140 -232 180 1 0 0 0 1 0 0 0 1 3003.dat +1 28 140 -232 220 1 0 0 0 1 0 0 0 1 3003.dat +1 19 100 -304 170 1 0 0 0 1 0 0 0 1 60593.dat +1 19 140 -304 170 1 0 0 0 1 0 0 0 1 60593.dat +1 226 120 -256 230 1 0 0 0 1 0 0 0 1 3010.dat +1 84 90 -256 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 150 -256 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 120 -280 230 1 0 0 0 1 0 0 0 1 3010.dat +1 84 90 -280 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 150 -280 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 226 120 -304 230 1 0 0 0 1 0 0 0 1 3010.dat +1 84 90 -304 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 150 -304 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 120 -328 180 1 0 0 0 1 0 0 0 1 3001.dat +1 19 120 -328 220 1 0 0 0 1 0 0 0 1 3001.dat +1 19 120 -352 170 1 0 0 0 1 0 0 0 1 30414.dat +1 19 110 -352 190 1 0 0 0 1 0 0 0 1 3622.dat +1 84 150 -352 190 1 0 0 0 1 0 0 0 1 3005.dat +1 321 120 -352 220 1 0 0 0 1 0 0 0 1 3001.dat +1 1 100 -376 190 1 0 0 0 1 0 0 0 1 3039.dat +1 1 140 -376 190 1 0 0 0 1 0 0 0 1 3039.dat +1 1 100 -376 210 -1 0 0 0 1 0 0 0 -1 3039.dat +1 1 140 -376 210 -1 0 0 0 1 0 0 0 -1 3039.dat +1 272 100 -400 190 1 0 0 0 1 0 0 0 1 3004.dat +1 272 140 -400 190 1 0 0 0 1 0 0 0 1 3004.dat +1 1 120 -448 200 1 0 0 0 1 0 0 0 1 3942c.dat +1 16 120 -352 160 1 0 0 0 0 -1 0 1 0 four_sails.ldr +1 0 260 -32 90 0 0 -1 0 1 0 1 0 0 3002.dat +1 2 260 -40 90 0 0 -1 0 1 0 1 0 0 3021.dat +1 0 260 -48 90 1 0 0 0 1 0 0 0 1 2926.dat +1 14 310 -43 90 0 0 -1 1 0 0 0 -1 0 6014b.dat +1 0 316 -43 90 0 0 -1 1 0 0 0 -1 0 87697.dat +1 14 210 -43 90 0 0 1 -1 0 0 0 -1 0 6014b.dat +1 0 204 -43 90 0 0 -1 1 0 0 0 -1 0 87697.dat +1 1 260 -56 100 1 0 0 0 1 0 0 0 1 3031.dat +1 70 230 -80 100 0 0 -1 0 1 0 1 0 0 15207.dat +1 70 290 -80 100 0 0 -1 0 1 0 1 0 0 15207.dat +1 19 230 -48 40 0 0 -1 0 1 0 1 0 0 3710.dat +1 19 290 -48 40 0 0 -1 0 1 0 1 0 0 3710.dat +1 84 260 -80 80 1 0 0 0 1 0 0 0 1 3003.dat +1 15 260 -104 80 1 0 0 0 1 0 0 0 1 30367c.dat +1 70 260 -112 80 1 0 0 0 1 0 0 0 1 6141.dat +1 84 260 -80 120 1 0 0 0 1 0 0 0 1 3003.dat +1 15 260 -104 120 1 0 0 0 1 0 0 0 1 30367c.dat +1 70 260 -112 120 1 0 0 0 1 0 0 0 1 6141.dat +0 FILE entrance.ldr +0 entrance +0 Name: entrance +1 0 0 -144 0 -1 0 0 0 1 0 0 0 -1 60596.dat +1 14 -32 -144 -5 1 0 0 0 1 0 0 0 1 60623.dat +0 FILE four_sails.ldr +0 four_sails +0 Name: four_sails +1 1 0 -8 0 1 0 0 0 1 0 0 0 1 3031.dat +1 71 -80 -16 0 1 0 0 0 1 0 0 0 1 3034.dat +1 71 80 -16 0 1 0 0 0 1 0 0 0 1 3034.dat +1 70 0 -16 -80 0 0 -1 0 1 0 1 0 0 3795.dat +1 70 0 -16 80 0 0 -1 0 1 0 1 0 0 3795.dat +1 71 -100 -24 0 1 0 0 0 1 0 0 0 1 87079.dat +1 71 100 -24 0 1 0 0 0 1 0 0 0 1 87079.dat +1 71 0 -24 -100 0 0 -1 0 1 0 1 0 0 87079.dat +1 71 0 -24 100 0 0 -1 0 1 0 1 0 0 87079.dat +1 72 0 -24 0 1 0 0 0 1 0 0 0 1 14769.dat diff --git a/brickwright/alt/alt-057/thumb-512.avif b/brickwright/alt/alt-057/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..6d7d26ff04cb01a8b55ae3bcecde3ec94e3578ed Binary files /dev/null and b/brickwright/alt/alt-057/thumb-512.avif differ diff --git a/brickwright/alt/alt-057/trace.jsonl.gz b/brickwright/alt/alt-057/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..d3029c6b7c9496793e4ea4fa1156099203025e03 --- /dev/null +++ b/brickwright/alt/alt-057/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58fb5063a0de653c7ac79bdbf09da71299e2a26285d513cc07ec2fc032a9836d +size 8810 diff --git a/brickwright/alt/alt-057/view-0.avif b/brickwright/alt/alt-057/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..4d811f592d182a508976715cf2973d527fdde441 Binary files /dev/null and b/brickwright/alt/alt-057/view-0.avif differ diff --git a/brickwright/alt/alt-057/view-1.avif b/brickwright/alt/alt-057/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..686fd51651c7a447aec559bdc7db8eae57e90dbf Binary files /dev/null and b/brickwright/alt/alt-057/view-1.avif differ diff --git a/brickwright/alt/alt-057/view-2.avif b/brickwright/alt/alt-057/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..6d6b9f0e6b35bd0943f53e4831643631747f65c4 Binary files /dev/null and b/brickwright/alt/alt-057/view-2.avif differ diff --git a/brickwright/alt/alt-057/view-3.avif b/brickwright/alt/alt-057/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..3c1b1d239f6050f77aa3f0f7f488566895b1f084 Binary files /dev/null and b/brickwright/alt/alt-057/view-3.avif differ diff --git a/brickwright/alt/alt-057/view-4.avif b/brickwright/alt/alt-057/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..661fa7b00d71e69b819375d25016960fb70041be Binary files /dev/null and b/brickwright/alt/alt-057/view-4.avif differ diff --git a/brickwright/alt/alt-057/view-5.avif b/brickwright/alt/alt-057/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..c6fd9501bec4da7996fcd6ee8656f9198908fd44 Binary files /dev/null and b/brickwright/alt/alt-057/view-5.avif differ diff --git a/brickwright/alt/alt-057/view-6.avif b/brickwright/alt/alt-057/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..ae53af8ce37a38c3611b3837c836c15b0e14d38e Binary files /dev/null and b/brickwright/alt/alt-057/view-6.avif differ diff --git a/brickwright/alt/alt-057/view-7.avif b/brickwright/alt/alt-057/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..0d62358aeac238e6d50fe10fb41ad9df70e1a4ed Binary files /dev/null and b/brickwright/alt/alt-057/view-7.avif differ diff --git a/brickwright/alt/alt-058/build.py b/brickwright/alt/alt-058/build.py new file mode 100644 index 0000000000000000000000000000000000000000..446a665bb4b19d8da772f58a7cdf4d6e81710c81 --- /dev/null +++ b/brickwright/alt/alt-058/build.py @@ -0,0 +1,108 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + def put(pid,col,x,y,z,rot=0,name=None): + return b.add(bl.Element(pid,getattr(bl.Color,col)),(x,y,z),bl.Rotation(rot),name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='ground') + for x in (0,4,8): put('3031','BLUE',x,0,1/3) + for x,y in ((0,4),(4,4),(8,4),(8,6)): + put('3020','MEDIUM_AZURE',x,y,1/3) + # Cliff piers: exposed stone, earth and moss. Crosswise courses bond them. + for level in range(4): + z=1/3+level + for x,y,col in ((0,9,'DARK_TAN'),(4,9,'LIGHT_BLUISH_GRAY'),(8,8,'DARK_GREEN')): + put('3001',col,x,y,z) + for x,y,col in ((0,13,'DARK_GREEN'),(4,13,'DARK_TAN'),(8,13,'DARK_GREEN')): + if col=='DARK_TAN': col='BLACK' + put('3002' if col=='BLACK' else '3004',col,x,y,z) + # Tall narrow outcrops at the rear support the ledge. + if level in (0,2): + for x in (0,3,6,9): put('3245c','LIGHT_BLUISH_GRAY',x,11,z,1) + # Terrace and cliff-edge cantilever beams. + put('3029','DARK_BLUISH_GRAY',0,10,13/3,name='rock_ledge') + for x in (2,6): + put('3002','REDDISH_BROWN',x,6,10/3,1) + put('3004','DARK_BLUISH_GRAY',x,7,7/3,1) + put('3004','DARK_BLUISH_GRAY',x,7,4/3,1) + put('3004','LIGHT_BLUISH_GRAY',x,7,1/3,1) + put('3034','LIGHT_BLUISH_GRAY',0,8,13/3) + put('3020','TAN',8,8,13/3) + put('3028','BRIGHT_GREEN',0,8,14/3,name='house_terrace') + for y in (4,6): put('3795','REDDISH_BROWN',2,y,13/3,name='balcony_'+str(y)) + # Balcony is fastened to the terrace by longitudinal wooden side beams. + for x in (2,7): put('3010','REDDISH_BROWN',x,4,14/3,1) + for x in (2,7): put('15207','REDDISH_BROWN',x,4,17/3,1) + put('15332','WHITE',3,4,14/3,name='balcony_railing') + # Waterfall drops from the rocky ledge to the pool. + put('3022','TAN',0,6,1/3) + for z in (2/3,5/3,8/3,11/3): put('3003','MEDIUM_AZURE',0,6,z) + for x in (0,1): put('50950','MEDIUM_AZURE',x,5,14/3) + for x in (0,1): put('3040b','WHITE',x,4,2/3) + put('3069b','WHITE',0,2,2/3) + put('3069b','WHITE',2,4,2/3) + # Narrow stone stair follows the right cliff edge; each tread has solid risers. + for i in range(4): + y=2+2*i + for k in range(i+1): + put('3003','MEDIUM_NOUGAT',12,y,1/3+k) if k==0 else put('3003','DARK_TAN' if k==1 else 'MEDIUM_NOUGAT',12,y,1/3+k) + put('3068b','DARK_TAN',12,y,4/3+i,name='step_'+str(i)) + put('11212','DARK_BLUISH_GRAY',12,10,1/3) + # landing at water level, and upper bridge to the house terrace + put('11212','DARK_BLUISH_GRAY',12,-1,1/3,name='water_landing') + put('2431','LIGHT_BLUISH_GRAY',10,9,5,name='stair_bridge') + # Rounded grey boulders break up the water-facing cliff silhouette. + for k in range(3): put('3001','DARK_BLUISH_GRAY',8,6,2/3+k) + for x in (8,10): put('85080','LIGHT_BLUISH_GRAY',x,6,11/3) + put('85080','LIGHT_BLUISH_GRAY',10,4,2/3) + put('14769','DARK_BLUISH_GRAY',10,4,5/3) + # Small warm-colored cabin, with an open balcony doorway. + floor=5 + for z in (floor,floor+1,floor+2,floor+3): + put('3010','BRIGHT_LIGHT_YELLOW',2,13,z) + put('3004','BRIGHT_LIGHT_YELLOW',6,13,z) + for side in (2,7): + put('3622','TAN',side,10,floor,1) + put('60593','TAN',side,10,floor+1,1,name='side_window_'+str(side)) + for z in (floor+1,floor+2,floor+3): put('3005','MEDIUM_NOUGAT',side,12,z) + for z in (floor,floor+1,floor+2,floor+3): put('3004','MEDIUM_NOUGAT',side,8,z,1) + # Front flanking windows and center open doorway. + for x in (3,6): + for z in (floor,floor+1,floor+2): put('3005','WHITE',x,8,z) if z==floor else put('3005','LIGHT_BLUISH_GRAY',x,8,z) + put('3010','BRIGHT_LIGHT_YELLOW',3,8,floor+3) + # A pale threshold and dark interior floor emphasize the doorway. + put('3022','TAN',4,8,5) + # Gabled magenta roof, two interlocked courses with a structural core. + roof=9 + put('2456','DARK_RED',1,10,roof) + put('3003','DARK_RED',7,10,roof) + for x in (1,5): + put('3037','MAGENTA',x,8,roof) + put('3037','MAGENTA',x,12,roof,2) + for x in (1,3,5,7): + put('3039','MAGENTA',x,9,roof+1) + put('3039','MAGENTA',x,11,roof+1,2) + # Flowers on the grassy shoulder. + for x,y in ((10,12),(10,10),(0,12)): + plant=put('4727','BRIGHT_GREEN',x,y,5) + return b + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):n for k,n in used.items() if n>inventory.get(k[0],{}).get(k[1],0)} + t.check('inventory limits',not excess,str(excess)) + t.check('projecting balcony',b.named('balcony_4').bounding_box[0].y < b.named('house_terrace').bounding_box[0].y) + t.check('four descending treads',all('step_'+str(i) in b.names for i in range(4))) + t.check('water-level landing','water_landing' in b.names) + return t.report() diff --git a/brickwright/alt/alt-058/hero-1024.avif b/brickwright/alt/alt-058/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..7c2dfff7ed86050422ddc3e019ba7311d5ffe805 Binary files /dev/null and b/brickwright/alt/alt-058/hero-1024.avif differ diff --git a/brickwright/alt/alt-058/model.mpd b/brickwright/alt/alt-058/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..a29c4589f5dabf4cf6eb608ac2be9c1df1bc31cb --- /dev/null +++ b/brickwright/alt/alt-058/model.mpd @@ -0,0 +1,145 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 1 40 -16 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 120 -16 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 200 -16 40 1 0 0 0 1 0 0 0 1 3031.dat +1 322 40 -16 100 1 0 0 0 1 0 0 0 1 3020.dat +1 322 120 -16 100 1 0 0 0 1 0 0 0 1 3020.dat +1 322 200 -16 100 1 0 0 0 1 0 0 0 1 3020.dat +1 322 200 -16 140 1 0 0 0 1 0 0 0 1 3020.dat +1 28 40 -32 200 1 0 0 0 1 0 0 0 1 3001.dat +1 71 120 -32 200 1 0 0 0 1 0 0 0 1 3001.dat +1 288 200 -32 180 1 0 0 0 1 0 0 0 1 3001.dat +1 288 20 -32 270 1 0 0 0 1 0 0 0 1 3004.dat +1 0 110 -32 280 1 0 0 0 1 0 0 0 1 3002.dat +1 288 180 -32 270 1 0 0 0 1 0 0 0 1 3004.dat +1 71 10 -56 240 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 70 -56 240 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 130 -56 240 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 190 -56 240 0 0 -1 0 1 0 1 0 0 3245c.dat +1 28 40 -56 200 1 0 0 0 1 0 0 0 1 3001.dat +1 71 120 -56 200 1 0 0 0 1 0 0 0 1 3001.dat +1 288 200 -56 180 1 0 0 0 1 0 0 0 1 3001.dat +1 288 20 -56 270 1 0 0 0 1 0 0 0 1 3004.dat +1 0 110 -56 280 1 0 0 0 1 0 0 0 1 3002.dat +1 288 180 -56 270 1 0 0 0 1 0 0 0 1 3004.dat +1 28 40 -80 200 1 0 0 0 1 0 0 0 1 3001.dat +1 71 120 -80 200 1 0 0 0 1 0 0 0 1 3001.dat +1 288 200 -80 180 1 0 0 0 1 0 0 0 1 3001.dat +1 288 20 -80 270 1 0 0 0 1 0 0 0 1 3004.dat +1 0 110 -80 280 1 0 0 0 1 0 0 0 1 3002.dat +1 288 180 -80 270 1 0 0 0 1 0 0 0 1 3004.dat +1 71 10 -104 240 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 70 -104 240 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 130 -104 240 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 190 -104 240 0 0 -1 0 1 0 1 0 0 3245c.dat +1 28 40 -104 200 1 0 0 0 1 0 0 0 1 3001.dat +1 71 120 -104 200 1 0 0 0 1 0 0 0 1 3001.dat +1 288 200 -104 180 1 0 0 0 1 0 0 0 1 3001.dat +1 288 20 -104 270 1 0 0 0 1 0 0 0 1 3004.dat +1 0 110 -104 280 1 0 0 0 1 0 0 0 1 3002.dat +1 288 180 -104 270 1 0 0 0 1 0 0 0 1 3004.dat +1 72 120 -112 240 1 0 0 0 1 0 0 0 1 3029.dat +1 70 60 -104 150 0 0 -1 0 1 0 1 0 0 3002.dat +1 72 50 -80 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 72 50 -56 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 50 -32 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 70 140 -104 150 0 0 -1 0 1 0 1 0 0 3002.dat +1 72 130 -80 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 72 130 -56 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 130 -32 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 80 -112 180 1 0 0 0 1 0 0 0 1 3034.dat +1 19 200 -112 180 1 0 0 0 1 0 0 0 1 3020.dat +1 10 120 -120 220 1 0 0 0 1 0 0 0 1 3028.dat +1 70 100 -112 100 1 0 0 0 1 0 0 0 1 3795.dat +1 70 100 -112 140 1 0 0 0 1 0 0 0 1 3795.dat +1 70 50 -136 120 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 150 -136 120 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 50 -160 120 0 0 -1 0 1 0 1 0 0 15207.dat +1 70 150 -160 120 0 0 -1 0 1 0 1 0 0 15207.dat +1 15 100 -160 90 1 0 0 0 1 0 0 0 1 15332.dat +1 19 20 -16 140 1 0 0 0 1 0 0 0 1 3022.dat +1 322 20 -40 140 1 0 0 0 1 0 0 0 1 3003.dat +1 322 20 -64 140 1 0 0 0 1 0 0 0 1 3003.dat +1 322 20 -88 140 1 0 0 0 1 0 0 0 1 3003.dat +1 322 20 -112 140 1 0 0 0 1 0 0 0 1 3003.dat +1 322 10 -136 130 1 0 0 0 1 0 0 0 1 50950.dat +1 322 30 -136 130 1 0 0 0 1 0 0 0 1 50950.dat +1 15 10 -40 110 1 0 0 0 1 0 0 0 1 3040b.dat +1 15 30 -40 110 1 0 0 0 1 0 0 0 1 3040b.dat +1 15 20 -24 50 1 0 0 0 1 0 0 0 1 3069b.dat +1 15 60 -24 90 1 0 0 0 1 0 0 0 1 3069b.dat +1 84 260 -32 60 1 0 0 0 1 0 0 0 1 3003.dat +1 28 260 -40 60 1 0 0 0 1 0 0 0 1 3068b.dat +1 84 260 -32 100 1 0 0 0 1 0 0 0 1 3003.dat +1 28 260 -56 100 1 0 0 0 1 0 0 0 1 3003.dat +1 28 260 -64 100 1 0 0 0 1 0 0 0 1 3068b.dat +1 84 260 -32 140 1 0 0 0 1 0 0 0 1 3003.dat +1 28 260 -56 140 1 0 0 0 1 0 0 0 1 3003.dat +1 84 260 -80 140 1 0 0 0 1 0 0 0 1 3003.dat +1 28 260 -88 140 1 0 0 0 1 0 0 0 1 3068b.dat +1 84 260 -32 180 1 0 0 0 1 0 0 0 1 3003.dat +1 28 260 -56 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 260 -80 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 260 -104 180 1 0 0 0 1 0 0 0 1 3003.dat +1 28 260 -112 180 1 0 0 0 1 0 0 0 1 3068b.dat +1 72 270 -16 230 1 0 0 0 1 0 0 0 1 11212.dat +1 72 270 -16 10 1 0 0 0 1 0 0 0 1 11212.dat +1 71 240 -128 190 1 0 0 0 1 0 0 0 1 2431.dat +1 72 200 -40 140 1 0 0 0 1 0 0 0 1 3001.dat +1 72 200 -64 140 1 0 0 0 1 0 0 0 1 3001.dat +1 72 200 -88 140 1 0 0 0 1 0 0 0 1 3001.dat +1 71 170 -112 150 1 0 0 0 1 0 0 0 1 85080.dat +1 71 210 -112 150 1 0 0 0 1 0 0 0 1 85080.dat +1 71 210 -40 110 1 0 0 0 1 0 0 0 1 85080.dat +1 72 220 -48 100 1 0 0 0 1 0 0 0 1 14769.dat +1 226 80 -144 270 1 0 0 0 1 0 0 0 1 3010.dat +1 226 140 -144 270 1 0 0 0 1 0 0 0 1 3004.dat +1 226 80 -168 270 1 0 0 0 1 0 0 0 1 3010.dat +1 226 140 -168 270 1 0 0 0 1 0 0 0 1 3004.dat +1 226 80 -192 270 1 0 0 0 1 0 0 0 1 3010.dat +1 226 140 -192 270 1 0 0 0 1 0 0 0 1 3004.dat +1 226 80 -216 270 1 0 0 0 1 0 0 0 1 3010.dat +1 226 140 -216 270 1 0 0 0 1 0 0 0 1 3004.dat +1 19 50 -144 230 0 0 -1 0 1 0 1 0 0 3622.dat +1 19 50 -216 220 0 0 -1 0 1 0 1 0 0 60593.dat +1 84 50 -168 250 1 0 0 0 1 0 0 0 1 3005.dat +1 84 50 -192 250 1 0 0 0 1 0 0 0 1 3005.dat +1 84 50 -216 250 1 0 0 0 1 0 0 0 1 3005.dat +1 84 50 -144 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 50 -168 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 50 -192 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 50 -216 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 150 -144 230 0 0 -1 0 1 0 1 0 0 3622.dat +1 19 150 -216 220 0 0 -1 0 1 0 1 0 0 60593.dat +1 84 150 -168 250 1 0 0 0 1 0 0 0 1 3005.dat +1 84 150 -192 250 1 0 0 0 1 0 0 0 1 3005.dat +1 84 150 -216 250 1 0 0 0 1 0 0 0 1 3005.dat +1 84 150 -144 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 150 -168 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 150 -192 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 150 -216 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 15 70 -144 170 1 0 0 0 1 0 0 0 1 3005.dat +1 71 70 -168 170 1 0 0 0 1 0 0 0 1 3005.dat +1 71 70 -192 170 1 0 0 0 1 0 0 0 1 3005.dat +1 15 130 -144 170 1 0 0 0 1 0 0 0 1 3005.dat +1 71 130 -168 170 1 0 0 0 1 0 0 0 1 3005.dat +1 71 130 -192 170 1 0 0 0 1 0 0 0 1 3005.dat +1 226 100 -216 170 1 0 0 0 1 0 0 0 1 3010.dat +1 19 100 -128 180 1 0 0 0 1 0 0 0 1 3022.dat +1 320 80 -240 220 1 0 0 0 1 0 0 0 1 2456.dat +1 320 160 -240 220 1 0 0 0 1 0 0 0 1 3003.dat +1 26 60 -240 190 1 0 0 0 1 0 0 0 1 3037.dat +1 26 60 -240 250 -1 0 0 0 1 0 0 0 -1 3037.dat +1 26 140 -240 190 1 0 0 0 1 0 0 0 1 3037.dat +1 26 140 -240 250 -1 0 0 0 1 0 0 0 -1 3037.dat +1 26 40 -264 210 1 0 0 0 1 0 0 0 1 3039.dat +1 26 40 -264 230 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 80 -264 210 1 0 0 0 1 0 0 0 1 3039.dat +1 26 80 -264 230 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 120 -264 210 1 0 0 0 1 0 0 0 1 3039.dat +1 26 120 -264 230 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 160 -264 210 1 0 0 0 1 0 0 0 1 3039.dat +1 26 160 -264 230 -1 0 0 0 1 0 0 0 -1 3039.dat +1 10 210 -144 250 1 0 0 0 1 0 0 0 1 4727.dat +1 10 210 -144 210 1 0 0 0 1 0 0 0 1 4727.dat +1 10 10 -144 250 1 0 0 0 1 0 0 0 1 4727.dat diff --git a/brickwright/alt/alt-058/thumb-512.avif b/brickwright/alt/alt-058/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..a4a6d9d40c836642ab48ca49384c81ab42360e0b Binary files /dev/null and b/brickwright/alt/alt-058/thumb-512.avif differ diff --git a/brickwright/alt/alt-058/trace.jsonl.gz b/brickwright/alt/alt-058/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..0b37735eb22e43f3e79104c9f14e4be8feffaaff --- /dev/null +++ b/brickwright/alt/alt-058/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1af55be9937d3b4b691d422145b908fdc189661ccb8ebeb931f29d56b65b99ef +size 6859 diff --git a/brickwright/alt/alt-058/view-0.avif b/brickwright/alt/alt-058/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..bdf6af670ab920b727fe9c552c66129fb507cbd8 Binary files /dev/null and b/brickwright/alt/alt-058/view-0.avif differ diff --git a/brickwright/alt/alt-058/view-1.avif b/brickwright/alt/alt-058/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..87d5bf3e37f9f6753ddd5ea5aa1c150e52656a8e Binary files /dev/null and b/brickwright/alt/alt-058/view-1.avif differ diff --git a/brickwright/alt/alt-058/view-2.avif b/brickwright/alt/alt-058/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..5bc3eae026c3e9a98426ed28bf44562c86e6777c Binary files /dev/null and b/brickwright/alt/alt-058/view-2.avif differ diff --git a/brickwright/alt/alt-058/view-3.avif b/brickwright/alt/alt-058/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..c8ff05059259291a1089cf8d155c4c236df92925 Binary files /dev/null and b/brickwright/alt/alt-058/view-3.avif differ diff --git a/brickwright/alt/alt-058/view-4.avif b/brickwright/alt/alt-058/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..2ac9efc93b41e036e6bf857425e81c452a4129bb Binary files /dev/null and b/brickwright/alt/alt-058/view-4.avif differ diff --git a/brickwright/alt/alt-058/view-5.avif b/brickwright/alt/alt-058/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..b349ade559129fd852bbe3c67a7e01c636403fe4 Binary files /dev/null and b/brickwright/alt/alt-058/view-5.avif differ diff --git a/brickwright/alt/alt-058/view-6.avif b/brickwright/alt/alt-058/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..30de363ada5da8d2c6370bb7fc8793d234db9f55 Binary files /dev/null and b/brickwright/alt/alt-058/view-6.avif differ diff --git a/brickwright/alt/alt-058/view-7.avif b/brickwright/alt/alt-058/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..b26cc85d7af20fb40ab04970df0f0e2ec6f624d7 Binary files /dev/null and b/brickwright/alt/alt-058/view-7.avif differ diff --git a/brickwright/alt/alt-059/build.py b/brickwright/alt/alt-059/build.py new file mode 100644 index 0000000000000000000000000000000000000000..af4f4ae820325a1d32f0e94473b3a44a0c2c34b2 --- /dev/null +++ b/brickwright/alt/alt-059/build.py @@ -0,0 +1,102 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid, col, x,y,z, rot=0, name=None): + return b.add(bl.Element(pid,getattr(bl.Color,col)),(x,y,z),bl.Rotation(rot),name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='landscape') + for y in (0,4,8): + put('3031','BLUE',6,y,1/3,name='river_'+str(y)) + # Low masonry banks, with separate abutments carrying each end of the house. + for x in (2,10): + for y in (7,9,11): + put('3001','DARK_TAN' if y != 11 else 'GREEN',x,y,1/3) + for z in (4/3,7/3): + for y in (8,10): + put('3001','DARK_GREEN' if z == 4/3 else 'LIGHT_BLUISH_GRAY',x,y,z) + put('3010','LIGHT_BLUISH_GRAY',x,12,4/3) + put('3010','LIGHT_BLUISH_GRAY',x,12,7/3) + put('15254','LIGHT_BLUISH_GRAY',5,7,4/3,name='river_arch') + # The two jambs beside the curved opening. + for x in (2,11): + for z in (4/3,7/3): + put('3622','TAN',x,7,z) + put('60479','YELLOW',2,7,10/3,name='front_bridge_beam') + for y in (9,11): + put('3034','LIGHT_BLUISH_GRAY',4,y,10/3) + put('3028','BRIGHT_GREEN',2,7,11/3,name='house_floor') + # Three broad stone treads, rising to the front door landing. + for j,y in enumerate((1,3,5)): + for level in range(j+1): + put('3001','DARK_BLUISH_GRAY' if level==j else 'TAN' if j==1 else 'DARK_AZURE',2,y,1/3+level) + put('87079','LIGHT_BLUISH_GRAY',2,y,4/3+j,name='step_'+str(j)) + b.add(bl.door(4,1,6,bl.DoorVariant.WINDOWED,door_color=bl.Color.YELLOW,frame_color=bl.Color.BLACK),(2,7,4),name='front_door') + for x in (6,12): + for z in range(4,10): + put('3004','MEDIUM_NOUGAT' if z in (4,5,8,9) else 'TAN',x,7,z) + for x in (8,10): + for z in (4,5): put('3004','BRIGHT_LIGHT_YELLOW',x,7,z) + put('60593','TAN',x,7,6,name='front_window_'+str(x)) + put('3004','DARK_RED',x,7,9) + # Long side walls: yellow plaster framed with dark orange log courses. + for x in (2,13): + for z in range(4,10): + if z in (4,9): + for y in (8,10): put('30136','DARK_ORANGE',x,y,z,1) + else: put('3010','BRIGHT_LIGHT_YELLOW',x,8,z,1) + # Rear wall with three open white-framed windows. + for z in (4,5,8,9): + for x in (2,6,10): put('3010','REDDISH_BROWN' if z==9 else 'ORANGE' if z==4 else 'MEDIUM_AZURE' if z==5 else 'BRIGHT_PINK',x,12,z) + for x in (2,6,10): + put('60592','WHITE',x,12,6) + for z in (6,7): put('3004','DARK_BLUE',x+2,12,z) + # Two-tone pitched roof with a full structural core underneath. + for x in (2,6,10): + for y in (8,10): put('3001','BRIGHT_LIGHT_ORANGE' if x != 10 else 'ORANGE',x,y,10) + for y,rot in ((6,0),(12,2)): + for x in (2,6): put('3037','MAGENTA',x,y,10,rot) + for x in (10,12): put('3039','MAGENTA',x,y,10,rot) + for y,rot in ((8,0),(10,2)): + for x in (2,6): put('3037','YELLOW',x,y,11,rot) + for x in (10,12): put('3039','BRIGHT_LIGHT_ORANGE',x,y,11,rot) + for x in (2,8): put('3795','REDDISH_BROWN',x,9,12) + for z in (37/3,40/3): put('3003','DARK_RED',11,9,z) + put('3068b','DARK_TAN',11,9,43/3,name='chimney_cap') + # A stud-fastened little wooden skiff beneath the arch. + # The hull attaches directly to the water studs. + for y,rot in ((4,0),(6,2)): + put('3660b','REDDISH_BROWN',7,y,2/3,rot,name='boat_keel' if y==4 else 'boat_stern') + for x,rot in ((7,1),(8,3)): + put('15207','REDDISH_BROWN',x,4,5/3,rot) + # Both thin-wall panels form the open cockpit of the wooden boat. + for y in (12,14): + put('3020','MEDIUM_AZURE',6,y,1/3) + for i,(x,y) in enumerate(((12,2),(12,5),(3,14))): + plant=put('4727','BRIGHT_GREEN',x,y,1/3,name='bank_plant_'+str(i)) + flower=bl.Element('33291',bl.Color.DARK_PINK) + b.connect(flower,flower.find_connector('antistud'),to=plant.find_connector('stud',toward=bl.Direction.UP)) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + over=[f'{pid}/{col}: {n} > {inventory.get(pid,{}).get(col,0)}' for (pid,col),n in used.items() if n>inventory.get(pid,{}).get(col,0)] + tests.check('inventory limits',not over,'; '.join(over)) + tests.check('house spans river',b.named('house_floor').width>=12 and b.named('river_0').width==4) + tests.check('arched boat passage','river_arch' in b.names and 'boat_keel' in b.names) + tests.check('ascending front steps',all(b.named('step_'+str(i)).center.z < b.named('step_'+str(i+1)).center.z for i in range(2))) + boat=[p for p in b.flattened_placements if p.content.ldraw_id in ('15207','3660b')] + tests.check('boat fits between arch jambs',all(p.bounding_box[0].x>=6 and p.bounding_box[1].x<=10 for p in boat)) + tests.check('boat reaches beneath house',max(p.bounding_box[1].y for p in boat)>b.named('house_floor').bounding_box[0].y) + tests.check('door reached by staircase',abs(b.named('front_door').bounding_box[0].z-b.named('step_2').bounding_box[1].z)<=bl.PLATE+0.01) + return tests.report() diff --git a/brickwright/alt/alt-059/hero-1024.avif b/brickwright/alt/alt-059/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..2f553cefb33b6cf8b64a2617fc6b2503bf29f098 Binary files /dev/null and b/brickwright/alt/alt-059/hero-1024.avif differ diff --git a/brickwright/alt/alt-059/model.mpd b/brickwright/alt/alt-059/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..85ddd4a3bdb6698d7cec200c1e631dd7ca3a601b --- /dev/null +++ b/brickwright/alt/alt-059/model.mpd @@ -0,0 +1,145 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 1 160 -16 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 160 -16 120 1 0 0 0 1 0 0 0 1 3031.dat +1 1 160 -16 200 1 0 0 0 1 0 0 0 1 3031.dat +1 28 80 -32 160 1 0 0 0 1 0 0 0 1 3001.dat +1 28 80 -32 200 1 0 0 0 1 0 0 0 1 3001.dat +1 2 80 -32 240 1 0 0 0 1 0 0 0 1 3001.dat +1 288 80 -56 180 1 0 0 0 1 0 0 0 1 3001.dat +1 288 80 -56 220 1 0 0 0 1 0 0 0 1 3001.dat +1 71 80 -80 180 1 0 0 0 1 0 0 0 1 3001.dat +1 71 80 -80 220 1 0 0 0 1 0 0 0 1 3001.dat +1 71 80 -56 250 1 0 0 0 1 0 0 0 1 3010.dat +1 71 80 -80 250 1 0 0 0 1 0 0 0 1 3010.dat +1 28 240 -32 160 1 0 0 0 1 0 0 0 1 3001.dat +1 28 240 -32 200 1 0 0 0 1 0 0 0 1 3001.dat +1 2 240 -32 240 1 0 0 0 1 0 0 0 1 3001.dat +1 288 240 -56 180 1 0 0 0 1 0 0 0 1 3001.dat +1 288 240 -56 220 1 0 0 0 1 0 0 0 1 3001.dat +1 71 240 -80 180 1 0 0 0 1 0 0 0 1 3001.dat +1 71 240 -80 220 1 0 0 0 1 0 0 0 1 3001.dat +1 71 240 -56 250 1 0 0 0 1 0 0 0 1 3010.dat +1 71 240 -80 250 1 0 0 0 1 0 0 0 1 3010.dat +1 71 160 -80 150 1 0 0 0 1 0 0 0 1 15254.dat +1 19 70 -56 150 1 0 0 0 1 0 0 0 1 3622.dat +1 19 70 -80 150 1 0 0 0 1 0 0 0 1 3622.dat +1 19 250 -56 150 1 0 0 0 1 0 0 0 1 3622.dat +1 19 250 -80 150 1 0 0 0 1 0 0 0 1 3622.dat +1 14 160 -88 150 1 0 0 0 1 0 0 0 1 60479.dat +1 71 160 -88 200 1 0 0 0 1 0 0 0 1 3034.dat +1 71 160 -88 240 1 0 0 0 1 0 0 0 1 3034.dat +1 10 160 -96 200 1 0 0 0 1 0 0 0 1 3028.dat +1 72 80 -32 40 1 0 0 0 1 0 0 0 1 3001.dat +1 71 80 -40 40 1 0 0 0 1 0 0 0 1 87079.dat +1 19 80 -32 80 1 0 0 0 1 0 0 0 1 3001.dat +1 72 80 -56 80 1 0 0 0 1 0 0 0 1 3001.dat +1 71 80 -64 80 1 0 0 0 1 0 0 0 1 87079.dat +1 321 80 -32 120 1 0 0 0 1 0 0 0 1 3001.dat +1 321 80 -56 120 1 0 0 0 1 0 0 0 1 3001.dat +1 72 80 -80 120 1 0 0 0 1 0 0 0 1 3001.dat +1 71 80 -88 120 1 0 0 0 1 0 0 0 1 87079.dat +1 16 80 -96 150 1 0 0 0 1 0 0 0 1 front_door.ldr +1 84 140 -120 150 1 0 0 0 1 0 0 0 1 3004.dat +1 84 140 -144 150 1 0 0 0 1 0 0 0 1 3004.dat +1 19 140 -168 150 1 0 0 0 1 0 0 0 1 3004.dat +1 19 140 -192 150 1 0 0 0 1 0 0 0 1 3004.dat +1 84 140 -216 150 1 0 0 0 1 0 0 0 1 3004.dat +1 84 140 -240 150 1 0 0 0 1 0 0 0 1 3004.dat +1 84 260 -120 150 1 0 0 0 1 0 0 0 1 3004.dat +1 84 260 -144 150 1 0 0 0 1 0 0 0 1 3004.dat +1 19 260 -168 150 1 0 0 0 1 0 0 0 1 3004.dat +1 19 260 -192 150 1 0 0 0 1 0 0 0 1 3004.dat +1 84 260 -216 150 1 0 0 0 1 0 0 0 1 3004.dat +1 84 260 -240 150 1 0 0 0 1 0 0 0 1 3004.dat +1 226 180 -120 150 1 0 0 0 1 0 0 0 1 3004.dat +1 226 180 -144 150 1 0 0 0 1 0 0 0 1 3004.dat +1 19 180 -216 150 1 0 0 0 1 0 0 0 1 60593.dat +1 320 180 -240 150 1 0 0 0 1 0 0 0 1 3004.dat +1 226 220 -120 150 1 0 0 0 1 0 0 0 1 3004.dat +1 226 220 -144 150 1 0 0 0 1 0 0 0 1 3004.dat +1 19 220 -216 150 1 0 0 0 1 0 0 0 1 60593.dat +1 320 220 -240 150 1 0 0 0 1 0 0 0 1 3004.dat +1 484 50 -120 180 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 50 -120 220 0 0 -1 0 1 0 1 0 0 30136.dat +1 226 50 -144 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 50 -168 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 50 -192 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 50 -216 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 484 50 -240 180 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 50 -240 220 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 270 -120 180 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 270 -120 220 0 0 -1 0 1 0 1 0 0 30136.dat +1 226 270 -144 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 270 -168 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 270 -192 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 270 -216 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 484 270 -240 180 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 270 -240 220 0 0 -1 0 1 0 1 0 0 30136.dat +1 25 80 -120 250 1 0 0 0 1 0 0 0 1 3010.dat +1 25 160 -120 250 1 0 0 0 1 0 0 0 1 3010.dat +1 25 240 -120 250 1 0 0 0 1 0 0 0 1 3010.dat +1 322 80 -144 250 1 0 0 0 1 0 0 0 1 3010.dat +1 322 160 -144 250 1 0 0 0 1 0 0 0 1 3010.dat +1 322 240 -144 250 1 0 0 0 1 0 0 0 1 3010.dat +1 29 80 -216 250 1 0 0 0 1 0 0 0 1 3010.dat +1 29 160 -216 250 1 0 0 0 1 0 0 0 1 3010.dat +1 29 240 -216 250 1 0 0 0 1 0 0 0 1 3010.dat +1 70 80 -240 250 1 0 0 0 1 0 0 0 1 3010.dat +1 70 160 -240 250 1 0 0 0 1 0 0 0 1 3010.dat +1 70 240 -240 250 1 0 0 0 1 0 0 0 1 3010.dat +1 15 60 -192 250 1 0 0 0 1 0 0 0 1 60592.dat +1 272 100 -168 250 1 0 0 0 1 0 0 0 1 3004.dat +1 272 100 -192 250 1 0 0 0 1 0 0 0 1 3004.dat +1 15 140 -192 250 1 0 0 0 1 0 0 0 1 60592.dat +1 272 180 -168 250 1 0 0 0 1 0 0 0 1 3004.dat +1 272 180 -192 250 1 0 0 0 1 0 0 0 1 3004.dat +1 15 220 -192 250 1 0 0 0 1 0 0 0 1 60592.dat +1 272 260 -168 250 1 0 0 0 1 0 0 0 1 3004.dat +1 272 260 -192 250 1 0 0 0 1 0 0 0 1 3004.dat +1 191 80 -264 180 1 0 0 0 1 0 0 0 1 3001.dat +1 191 80 -264 220 1 0 0 0 1 0 0 0 1 3001.dat +1 191 160 -264 180 1 0 0 0 1 0 0 0 1 3001.dat +1 191 160 -264 220 1 0 0 0 1 0 0 0 1 3001.dat +1 25 240 -264 180 1 0 0 0 1 0 0 0 1 3001.dat +1 25 240 -264 220 1 0 0 0 1 0 0 0 1 3001.dat +1 26 80 -264 150 1 0 0 0 1 0 0 0 1 3037.dat +1 26 160 -264 150 1 0 0 0 1 0 0 0 1 3037.dat +1 26 220 -264 150 1 0 0 0 1 0 0 0 1 3039.dat +1 26 260 -264 150 1 0 0 0 1 0 0 0 1 3039.dat +1 26 80 -264 250 -1 0 0 0 1 0 0 0 -1 3037.dat +1 26 160 -264 250 -1 0 0 0 1 0 0 0 -1 3037.dat +1 26 220 -264 250 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 260 -264 250 -1 0 0 0 1 0 0 0 -1 3039.dat +1 14 80 -288 190 1 0 0 0 1 0 0 0 1 3037.dat +1 14 160 -288 190 1 0 0 0 1 0 0 0 1 3037.dat +1 191 220 -288 190 1 0 0 0 1 0 0 0 1 3039.dat +1 191 260 -288 190 1 0 0 0 1 0 0 0 1 3039.dat +1 14 80 -288 210 -1 0 0 0 1 0 0 0 -1 3037.dat +1 14 160 -288 210 -1 0 0 0 1 0 0 0 -1 3037.dat +1 191 220 -288 210 -1 0 0 0 1 0 0 0 -1 3039.dat +1 191 260 -288 210 -1 0 0 0 1 0 0 0 -1 3039.dat +1 70 100 -296 200 1 0 0 0 1 0 0 0 1 3795.dat +1 70 220 -296 200 1 0 0 0 1 0 0 0 1 3795.dat +1 320 240 -320 200 1 0 0 0 1 0 0 0 1 3003.dat +1 320 240 -344 200 1 0 0 0 1 0 0 0 1 3003.dat +1 28 240 -352 200 1 0 0 0 1 0 0 0 1 3068b.dat +1 70 160 -40 110 1 0 0 0 1 0 0 0 1 3660b.dat +1 70 160 -40 130 -1 0 0 0 1 0 0 0 -1 3660b.dat +1 70 150 -64 120 0 0 -1 0 1 0 1 0 0 15207.dat +1 70 170 -64 120 0 0 1 0 1 0 -1 0 0 15207.dat +1 322 160 -16 260 1 0 0 0 1 0 0 0 1 3020.dat +1 322 160 -16 300 1 0 0 0 1 0 0 0 1 3020.dat +1 10 250 -32 50 1 0 0 0 1 0 0 0 1 4727.dat +1 5 250 -40 50 1 0 0 0 1 0 0 0 1 33291.dat +1 10 250 -32 110 1 0 0 0 1 0 0 0 1 4727.dat +1 5 250 -40 110 1 0 0 0 1 0 0 0 1 33291.dat +1 10 70 -32 290 1 0 0 0 1 0 0 0 1 4727.dat +1 5 70 -40 290 1 0 0 0 1 0 0 0 1 33291.dat +0 FILE front_door.ldr +0 front_door +0 Name: front_door +1 0 0 -144 0 -1 0 0 0 1 0 0 0 -1 60596.dat +1 14 -32 -144 -5 1 0 0 0 1 0 0 0 1 60623.dat diff --git a/brickwright/alt/alt-059/thumb-512.avif b/brickwright/alt/alt-059/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..6c5bab5e37ef497f8b836f81807f1401b2767884 Binary files /dev/null and b/brickwright/alt/alt-059/thumb-512.avif differ diff --git a/brickwright/alt/alt-059/trace.jsonl.gz b/brickwright/alt/alt-059/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..106e44208054a14dc29a90158f6df2ade2c84e30 --- /dev/null +++ b/brickwright/alt/alt-059/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:893222f334921a532ed9a2fe8bb4a974af510608a567e3373db50edaded34c61 +size 8639 diff --git a/brickwright/alt/alt-059/view-0.avif b/brickwright/alt/alt-059/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..8b3cf466cb13064076ebc75c9baef99e5dcc0992 Binary files /dev/null and b/brickwright/alt/alt-059/view-0.avif differ diff --git a/brickwright/alt/alt-059/view-1.avif b/brickwright/alt/alt-059/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..76b06118fd3bd4a2724851eb9d6094444c70bfcd Binary files /dev/null and b/brickwright/alt/alt-059/view-1.avif differ diff --git a/brickwright/alt/alt-059/view-2.avif b/brickwright/alt/alt-059/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..d32485114763c972922b463516af66693d88ecc1 Binary files /dev/null and b/brickwright/alt/alt-059/view-2.avif differ diff --git a/brickwright/alt/alt-059/view-3.avif b/brickwright/alt/alt-059/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..853ec9afcb66af69458a32ac6ff9fe08d86741a3 Binary files /dev/null and b/brickwright/alt/alt-059/view-3.avif differ diff --git a/brickwright/alt/alt-059/view-4.avif b/brickwright/alt/alt-059/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..65a176449dc73db8d0a4f6f544c058ccef5e7534 Binary files /dev/null and b/brickwright/alt/alt-059/view-4.avif differ diff --git a/brickwright/alt/alt-059/view-5.avif b/brickwright/alt/alt-059/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..11cf41ac5e3d2e74963feb0c26ec3e29e48b62d6 Binary files /dev/null and b/brickwright/alt/alt-059/view-5.avif differ diff --git a/brickwright/alt/alt-059/view-6.avif b/brickwright/alt/alt-059/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..5e7a4b779838cdcfae93f6c139865c71c3412699 Binary files /dev/null and b/brickwright/alt/alt-059/view-6.avif differ diff --git a/brickwright/alt/alt-059/view-7.avif b/brickwright/alt/alt-059/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..112053d04d6460987498a92c6f519f6f5c5052b0 Binary files /dev/null and b/brickwright/alt/alt-059/view-7.avif differ diff --git a/brickwright/alt/alt-060/build.py b/brickwright/alt/alt-060/build.py new file mode 100644 index 0000000000000000000000000000000000000000..84dd8d0ff05102356661c48b5ca79af7644be377 --- /dev/null +++ b/brickwright/alt/alt-060/build.py @@ -0,0 +1,91 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid, color, x,y,z, rot=0, name=None): + return b.add(bl.Element(pid, getattr(bl.Color,color)), (x,y,z), bl.Rotation(rot), name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='garden') + # A recessed rectangular blue pool, edged with a dark blue coping wall. + for y in (1,5): put('3031','BLUE',1,y,1/3,name=f'water_{y}') + for x in (0,5): + for y in (0,2,4,6,8): put('3004','DARK_BLUE',x,y,1/3,1) + for y in (0,9): + for x in (1,3): put('3004','DARK_AZURE',x,y,1/3) + # Board cantilevers three studs beyond its end-wall pedestal. + put('3004','LIGHT_BLUISH_GRAY',2,0,4/3,name='board_pedestal') + put('3020','TAN',2,0,7/3,1,name='board_structure') + put('87079','LIGHT_BLUISH_GRAY',2,0,8/3,1,name='diving_board') + # Two raised reclining sun loungers beside the long pool edge. + for i,x in enumerate((8,12)): + for y in (1,5): put('3004','WHITE',x,y,1/3) + put('3795','REDDISH_BROWN',x,1,4/3,1,name=f'lounger_{i}') + for y in (1,3): put('3068b','DARK_TAN',x,y,5/3) + for dx in (0,1): put('60481a','WHITE',x+dx,5,5/3,name=f'backrest_{i}_{dx}') + # Lower story: warm stucco facade with deep window reveals. + for z in (1/3,4/3): + for x in (0,8): put('3010','BRIGHT_LIGHT_YELLOW',x,10,z) + for x in (0,8): put('60598','RED',x,10,7/3,name=f'ground_window_{x}') + b.add(bl.door(4,1,6,bl.DoorVariant.WINDOWED,door_color=bl.Color.YELLOW,frame_color=bl.Color.BLACK),(4,10,1/3),name='front_door') + for x in (0,8): put('3010','BRIGHT_LIGHT_YELLOW',x,10,16/3) + # Side walls leave the rear open as a dollhouse cutaway. + for level in range(6): + color = 'ORANGE' if level<3 else ('MEDIUM_NOUGAT' if level<5 else 'LIGHT_BLUISH_GRAY') + for x in (0,11): + for y in (12,14): put('3004',color,x,y,level+1/3,1) + put('3028','BRIGHT_GREEN',0,10,19/3,name='upper_floor') + put('3034','LIGHT_BLUISH_GRAY',2,8,19/3,name='balcony_floor') + u=20/3 + # White open balcony doorway, flanked by ochre window frames. + put('60599','WHITE',4,10,u,name='balcony_door') + for x in (0,10): + put('3004','BRIGHT_LIGHT_YELLOW',x,11,u) + put('60593','TAN',x,11,u+1,name=f'upper_window_{x}') + for z in (u+4,u+5): put('3004','BRIGHT_LIGHT_YELLOW',x,11,z) + for x in (2,8): + for level in range(6): put('3004','DARK_BLUE' if x==2 else 'DARK_GREEN',x,11,u+level) + for level in range(6): + for x in (0,11): + # long units in alternating colors bind the side-wall seams + put('3010','REDDISH_BROWN' if level<2 else ('LIGHT_BLUISH_GRAY' if level<4 else 'MEDIUM_AZURE'),x,12,u+level,1) + # Balcony railings and returns also stitch its cantilever to the floor. + for x in (2,6): put('15332','WHITE',x,8,u,name=f'balcony_rail_{x}') + for x in (2,9): + for level in range(2): put('3004','TAN',x,9,u+level,1) + # Roof deck; front and rear magenta eaves surround a dark purple ridge. + r=u+6 + put('3034','LIGHT_BLUISH_GRAY',0,10,r) + put('3020','MEDIUM_AZURE',8,10,r) + put('3029','DARK_BLUISH_GRAY',0,12,r) + for y,rot in ((10,0),(14,2)): + for x in (0,4): put('3037','MAGENTA',x,y,r+1/3,rot) + for x in (8,10): put('3039','MAGENTA',x,y,r+1/3,rot) + for x in (0,4,8): put('3001','DARK_PURPLE',x,12,r+1/3) + # A modest chimney anchored across the roof's center band. + put('3003','DARK_RED',8,12,r+4/3,name='chimney') + put('3003','DARK_RED',8,12,r+7/3) + put('3022','TAN',8,12,r+10/3) + return b + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + available=json.load(open('/inputs/parts.json')) + violations=[] + for e,n in b.list_elements().items(): + limit=available.get(e.ldraw_id,{}).get(e.color.name,0) + if n>limit: violations.append(f'{e.ldraw_id}/{e.color.name}: {n}>{limit}') + t.check('inventory limits',not violations,'; '.join(violations)) + t.check('two full-height stories',b.named('upper_floor').bounding_box[0].z>=6 and b.named('balcony_door').height>=6,'Two six-brick stories with an intervening floor') + t.check('rectangular swimming pool',all(f'water_{y}' in b.names for y in (1,5)),'4 x 8 stud blue water inside a 6 x 10 rim') + t.check('two reclining loungers',all(f'lounger_{i}' in b.names and f'backrest_{i}_0' in b.names for i in (0,1)),'Two 2 x 6 raised chairs with inclined backs') + t.check('projecting diving board',b.named('diving_board').bounding_box[1].y>3,'Board projects beyond the front pool wall') + t.check('upstairs pool-facing balcony',b.named('balcony_floor').bounding_box[0].y<10 and b.named('balcony_floor').bounding_box[0].z>6,'Balcony projects toward the water with a two-brick balustrade') + return t.report() diff --git a/brickwright/alt/alt-060/hero-1024.avif b/brickwright/alt/alt-060/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..c127ef78c4d745774781ccebc443e4b63824f70a Binary files /dev/null and b/brickwright/alt/alt-060/hero-1024.avif differ diff --git a/brickwright/alt/alt-060/model.mpd b/brickwright/alt/alt-060/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..5e82c530c5a63bce633aabec65c256b05f22face --- /dev/null +++ b/brickwright/alt/alt-060/model.mpd @@ -0,0 +1,133 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 1 60 -16 60 1 0 0 0 1 0 0 0 1 3031.dat +1 1 60 -16 140 1 0 0 0 1 0 0 0 1 3031.dat +1 272 10 -32 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 10 -32 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 10 -32 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 10 -32 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 10 -32 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 110 -32 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 110 -32 60 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 110 -32 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 110 -32 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 272 110 -32 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 321 40 -32 10 1 0 0 0 1 0 0 0 1 3004.dat +1 321 80 -32 10 1 0 0 0 1 0 0 0 1 3004.dat +1 321 40 -32 190 1 0 0 0 1 0 0 0 1 3004.dat +1 321 80 -32 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 60 -56 10 1 0 0 0 1 0 0 0 1 3004.dat +1 19 60 -64 40 0 0 -1 0 1 0 1 0 0 3020.dat +1 71 60 -72 40 0 0 -1 0 1 0 1 0 0 87079.dat +1 15 180 -32 30 1 0 0 0 1 0 0 0 1 3004.dat +1 15 180 -32 110 1 0 0 0 1 0 0 0 1 3004.dat +1 70 180 -40 80 0 0 -1 0 1 0 1 0 0 3795.dat +1 28 180 -48 40 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 180 -48 80 1 0 0 0 1 0 0 0 1 3068b.dat +1 15 170 -88 130 1 0 0 0 1 0 0 0 1 60481a.dat +1 15 190 -88 130 1 0 0 0 1 0 0 0 1 60481a.dat +1 15 260 -32 30 1 0 0 0 1 0 0 0 1 3004.dat +1 15 260 -32 110 1 0 0 0 1 0 0 0 1 3004.dat +1 70 260 -40 80 0 0 -1 0 1 0 1 0 0 3795.dat +1 28 260 -48 40 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 260 -48 80 1 0 0 0 1 0 0 0 1 3068b.dat +1 15 250 -88 130 1 0 0 0 1 0 0 0 1 60481a.dat +1 15 270 -88 130 1 0 0 0 1 0 0 0 1 60481a.dat +1 226 40 -32 210 1 0 0 0 1 0 0 0 1 3010.dat +1 226 200 -32 210 1 0 0 0 1 0 0 0 1 3010.dat +1 226 40 -56 210 1 0 0 0 1 0 0 0 1 3010.dat +1 226 200 -56 210 1 0 0 0 1 0 0 0 1 3010.dat +1 4 40 -128 220 1 0 0 0 1 0 0 0 1 60598.dat +1 4 200 -128 220 1 0 0 0 1 0 0 0 1 60598.dat +1 16 120 -8 210 1 0 0 0 1 0 0 0 1 front_door.ldr +1 226 40 -152 210 1 0 0 0 1 0 0 0 1 3010.dat +1 226 200 -152 210 1 0 0 0 1 0 0 0 1 3010.dat +1 25 10 -32 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 10 -32 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 230 -32 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 230 -32 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 10 -56 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 10 -56 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 230 -56 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 230 -56 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 10 -80 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 10 -80 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 230 -80 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 230 -80 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 10 -104 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 10 -104 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 230 -104 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 230 -104 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 10 -128 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 10 -128 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 230 -128 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 230 -128 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 10 -152 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 10 -152 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 230 -152 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 230 -152 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 10 120 -160 260 1 0 0 0 1 0 0 0 1 3028.dat +1 71 120 -160 180 1 0 0 0 1 0 0 0 1 3034.dat +1 15 120 -304 220 1 0 0 0 1 0 0 0 1 60599.dat +1 226 20 -184 230 1 0 0 0 1 0 0 0 1 3004.dat +1 19 20 -256 230 1 0 0 0 1 0 0 0 1 60593.dat +1 226 20 -280 230 1 0 0 0 1 0 0 0 1 3004.dat +1 226 20 -304 230 1 0 0 0 1 0 0 0 1 3004.dat +1 226 220 -184 230 1 0 0 0 1 0 0 0 1 3004.dat +1 19 220 -256 230 1 0 0 0 1 0 0 0 1 60593.dat +1 226 220 -280 230 1 0 0 0 1 0 0 0 1 3004.dat +1 226 220 -304 230 1 0 0 0 1 0 0 0 1 3004.dat +1 272 60 -184 230 1 0 0 0 1 0 0 0 1 3004.dat +1 272 60 -208 230 1 0 0 0 1 0 0 0 1 3004.dat +1 272 60 -232 230 1 0 0 0 1 0 0 0 1 3004.dat +1 272 60 -256 230 1 0 0 0 1 0 0 0 1 3004.dat +1 272 60 -280 230 1 0 0 0 1 0 0 0 1 3004.dat +1 272 60 -304 230 1 0 0 0 1 0 0 0 1 3004.dat +1 288 180 -184 230 1 0 0 0 1 0 0 0 1 3004.dat +1 288 180 -208 230 1 0 0 0 1 0 0 0 1 3004.dat +1 288 180 -232 230 1 0 0 0 1 0 0 0 1 3004.dat +1 288 180 -256 230 1 0 0 0 1 0 0 0 1 3004.dat +1 288 180 -280 230 1 0 0 0 1 0 0 0 1 3004.dat +1 288 180 -304 230 1 0 0 0 1 0 0 0 1 3004.dat +1 70 10 -184 280 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 230 -184 280 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 10 -208 280 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 230 -208 280 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 10 -232 280 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 230 -232 280 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 10 -256 280 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 230 -256 280 0 0 -1 0 1 0 1 0 0 3010.dat +1 322 10 -280 280 0 0 -1 0 1 0 1 0 0 3010.dat +1 322 230 -280 280 0 0 -1 0 1 0 1 0 0 3010.dat +1 322 10 -304 280 0 0 -1 0 1 0 1 0 0 3010.dat +1 322 230 -304 280 0 0 -1 0 1 0 1 0 0 3010.dat +1 15 80 -208 170 1 0 0 0 1 0 0 0 1 15332.dat +1 15 160 -208 170 1 0 0 0 1 0 0 0 1 15332.dat +1 19 50 -184 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 50 -208 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 190 -184 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 190 -208 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 80 -312 220 1 0 0 0 1 0 0 0 1 3034.dat +1 322 200 -312 220 1 0 0 0 1 0 0 0 1 3020.dat +1 72 120 -312 280 1 0 0 0 1 0 0 0 1 3029.dat +1 26 40 -336 230 1 0 0 0 1 0 0 0 1 3037.dat +1 26 120 -336 230 1 0 0 0 1 0 0 0 1 3037.dat +1 26 180 -336 230 1 0 0 0 1 0 0 0 1 3039.dat +1 26 220 -336 230 1 0 0 0 1 0 0 0 1 3039.dat +1 26 40 -336 290 -1 0 0 0 1 0 0 0 -1 3037.dat +1 26 120 -336 290 -1 0 0 0 1 0 0 0 -1 3037.dat +1 26 180 -336 290 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 220 -336 290 -1 0 0 0 1 0 0 0 -1 3039.dat +1 85 40 -336 260 1 0 0 0 1 0 0 0 1 3001.dat +1 85 120 -336 260 1 0 0 0 1 0 0 0 1 3001.dat +1 85 200 -336 260 1 0 0 0 1 0 0 0 1 3001.dat +1 320 180 -360 260 1 0 0 0 1 0 0 0 1 3003.dat +1 320 180 -384 260 1 0 0 0 1 0 0 0 1 3003.dat +1 19 180 -392 260 1 0 0 0 1 0 0 0 1 3022.dat +0 FILE front_door.ldr +0 front_door +0 Name: front_door +1 0 0 -144 0 -1 0 0 0 1 0 0 0 -1 60596.dat +1 14 -32 -144 -5 1 0 0 0 1 0 0 0 1 60623.dat diff --git a/brickwright/alt/alt-060/thumb-512.avif b/brickwright/alt/alt-060/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..2aa21720c2f9b56f141f7d23ed56c0d79ffde353 Binary files /dev/null and b/brickwright/alt/alt-060/thumb-512.avif differ diff --git a/brickwright/alt/alt-060/trace.jsonl.gz b/brickwright/alt/alt-060/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..5caaa5937dce899fa1f9f6825177ac37fc6f7265 --- /dev/null +++ b/brickwright/alt/alt-060/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88bb9e521a5af67a2e64ce5d8a48a8fc9b157bb9a75d2bce6f4fcd082016f142 +size 7625 diff --git a/brickwright/alt/alt-060/view-0.avif b/brickwright/alt/alt-060/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..61af66fdd107fe487285fc9099339545797f3f68 Binary files /dev/null and b/brickwright/alt/alt-060/view-0.avif differ diff --git a/brickwright/alt/alt-060/view-1.avif b/brickwright/alt/alt-060/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..6ae01da383cb9461e87812a43004bd1814ebc996 Binary files /dev/null and b/brickwright/alt/alt-060/view-1.avif differ diff --git a/brickwright/alt/alt-060/view-2.avif b/brickwright/alt/alt-060/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..5a24a7c6be473fd8257bff23d450ede2ca37ea55 Binary files /dev/null and b/brickwright/alt/alt-060/view-2.avif differ diff --git a/brickwright/alt/alt-060/view-3.avif b/brickwright/alt/alt-060/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..f11953b81ad07e58822676d04e9872ac1ffe2174 Binary files /dev/null and b/brickwright/alt/alt-060/view-3.avif differ diff --git a/brickwright/alt/alt-060/view-4.avif b/brickwright/alt/alt-060/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..f6c62abe0886a6842d68357ea1618a536cf57723 Binary files /dev/null and b/brickwright/alt/alt-060/view-4.avif differ diff --git a/brickwright/alt/alt-060/view-5.avif b/brickwright/alt/alt-060/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..132a4c1f38c1ed8266b64596c2da03ff2880ae23 Binary files /dev/null and b/brickwright/alt/alt-060/view-5.avif differ diff --git a/brickwright/alt/alt-060/view-6.avif b/brickwright/alt/alt-060/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..f68c67f2b6b9d75889592b23ffe9de5e131dadcc Binary files /dev/null and b/brickwright/alt/alt-060/view-6.avif differ diff --git a/brickwright/alt/alt-060/view-7.avif b/brickwright/alt/alt-060/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..fdcaa23b856df773572d3318cb9032457add0c4b Binary files /dev/null and b/brickwright/alt/alt-060/view-7.avif differ diff --git a/brickwright/alt/alt-061/build.py b/brickwright/alt/alt-061/build.py new file mode 100644 index 0000000000000000000000000000000000000000..4709175333b52348b99bfea3584e8dae7f1eb19a --- /dev/null +++ b/brickwright/alt/alt-061/build.py @@ -0,0 +1,104 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid, color, x,y,z, rot=0, name=None): + return b.add(bl.Element(pid,getattr(bl.Color,color)),(x,y,z),bl.Rotation(rot),name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='wide_base') + # Root collar distributes the load over a wide studded foundation. + put('3001','DARK_GREEN',6,6,1/3) + put('3001','DARK_GREEN',6,8,1/3) + put('3001','GREEN',6,7,4/3) + # Staggered two-stud stalk. + for k in range(2,16): + z=1/3+k + if k in (5,10): + continue + if k in (2,3,4,6): + put('3003','GREEN',7,7,z) + elif k in (5,7,8,9): + put('3004','DARK_GREEN',7,7,z) + put('3004','DARK_GREEN',7,8,z) + elif k in (10,11,12,13): + put('3003','LIME',7,7,z) + else: + put('3001','DARK_GREEN',6,7,z) + # Lower leaf: wide cantilever, cross-bonded by its central vein plate. + put('2456','BRIGHT_GREEN',2,7,16/3,name='lower_leaf') + put('3004','DARK_GREEN',8,7,16/3,1) + put('3001','GREEN',3,5,16/3) + put('3021','GREEN',4,6,19/3) + put('3039','GREEN',2,7,19/3,3) + put('3039','GREEN',2,5,19/3,3) + put('2431','GREEN',3,8,22/3) + # Higher leaf grows to the opposite side. + put('2456','BRIGHT_GREEN',8,7,31/3,name='upper_leaf') + put('3004','DARK_GREEN',7,7,31/3,1) + put('3001','GREEN',10,5,31/3) + put('3021','GREEN',9,6,34/3) + put('3039','GREEN',12,7,34/3,1) + put('3039','GREEN',12,5,34/3,1) + put('2431','GREEN',9,8,37/3) + # Snail: a tan creeping foot, a domed ochre shell and two raised eyes. + put('3022','TAN',4,6,20/3,name='snail_foot') + shell_mount=put('4070','GREEN',4,6,7,name='snail_shell') + for x,y in [(5,6),(4,7),(5,7)]: + put('3005','MEDIUM_NOUGAT',x,y,7) + whorl=bl.Element('3062b',bl.Color.DARK_ORANGE) + ring=b.connect(whorl,whorl.find_connector('antistud'),to=shell_mount.find_connector('stud',facing=bl.Direction.FRONT),name='shell_whorl') + dot=bl.Element('6141',bl.Color.REDDISH_BROWN) + b.connect(dot,dot.find_connector('antistud'),to=ring.find_connector('stud'),name='shell_spiral_center') + put('6091','TAN',4,6,8,0) + put('6091','TAN',5,6,8,2) + put('3023b','TAN',6,6,20/3,1,name='snail_head') + for y in (6,7): + p=put('3005','MEDIUM_NOUGAT',6,y,7) + put('98138p07','WHITE',6,y,8) + # A rigid SNOT mounting supports the upright flower face. + mount=put('30414','TAN',6,7,49/3,name='flower_mount') + f=bl.LegoBuild() + def fp(pid,col,x,y,z,r=0): + return f.add(bl.Element(pid,getattr(bl.Color,col)),(x,y,z),bl.Rotation(r)) + back=fp('3032','YELLOW',-1,0,0) + fp('3001','YELLOW',-2,-1,1/3) + fp('3001','YELLOW',2,3,1/3) + fp('3001','YELLOW',-1,1,1/3,1) + fp('3001','YELLOW',3,-1,1/3,1) + # Eight ray petals: four broad sloped rays and four diagonal tips. + fp('3037','YELLOW',0,-2,4/3) + fp('3037','YELLOW',0,4,4/3,2) + fp('3037','YELLOW',-2,0,4/3,3) + fp('3037','YELLOW',4,0,4/3,1) + for x,y in [(-1,-1),(4,-1),(-1,4),(4,4)]: + fp('3005','YELLOW',x,y,4/3) + for x,y in [(-2,-2),(4,-2),(-2,4),(4,4)]: + fp('3003','YELLOW',x,y,7/3) + fp('3002','REDDISH_BROWN',0,0,4/3,1) + fp('3002','REDDISH_BROWN',2,0,4/3,1) + fp('3010','REDDISH_BROWN',0,3,4/3) + for x,y in [(1,1),(2,2)]: + fp('6141','REDDISH_BROWN',x,y,7/3) + source=back.find_connector('antistud',toward=bl.Position(0.5,0.5,0)) + target=mount.find_connector('stud',facing=bl.Direction.FRONT,toward=bl.Direction.RIGHT) + b.connect(f,source,to=target,target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90),name='sunflower_head') + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):v for k,v in used.items() if v>inventory.get(k[0],{}).get(k[1],0)} + tests.check('Only supplied parts within quantities',not excess,str(excess)) + tests.check('Tall sunflower',b.height>18,str(b.height)) + tests.check('Two large green leaves',all(b.named(n).width>=6 for n in ('lower_leaf','upper_leaf')),'Six-stud main leaf blades with broad lobes') + tests.check('Snail faces stem',b.named('snail_shell').center.x < b.named('snail_head').center.x < 9,'Head is on the inward end of the lower leaf') + return tests.report() diff --git a/brickwright/alt/alt-061/hero-1024.avif b/brickwright/alt/alt-061/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..ea9cb4b0f3cf941eacd522303d97ef0c8995ec28 Binary files /dev/null and b/brickwright/alt/alt-061/hero-1024.avif differ diff --git a/brickwright/alt/alt-061/model.mpd b/brickwright/alt/alt-061/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..ea0d1cd613af26f9f405cc218adcfb6de699e4f8 --- /dev/null +++ b/brickwright/alt/alt-061/model.mpd @@ -0,0 +1,77 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 288 160 -32 140 1 0 0 0 1 0 0 0 1 3001.dat +1 288 160 -32 180 1 0 0 0 1 0 0 0 1 3001.dat +1 2 160 -56 160 1 0 0 0 1 0 0 0 1 3001.dat +1 2 160 -80 160 1 0 0 0 1 0 0 0 1 3003.dat +1 2 160 -104 160 1 0 0 0 1 0 0 0 1 3003.dat +1 2 160 -128 160 1 0 0 0 1 0 0 0 1 3003.dat +1 2 160 -176 160 1 0 0 0 1 0 0 0 1 3003.dat +1 288 160 -200 150 1 0 0 0 1 0 0 0 1 3004.dat +1 288 160 -200 170 1 0 0 0 1 0 0 0 1 3004.dat +1 288 160 -224 150 1 0 0 0 1 0 0 0 1 3004.dat +1 288 160 -224 170 1 0 0 0 1 0 0 0 1 3004.dat +1 288 160 -248 150 1 0 0 0 1 0 0 0 1 3004.dat +1 288 160 -248 170 1 0 0 0 1 0 0 0 1 3004.dat +1 27 160 -296 160 1 0 0 0 1 0 0 0 1 3003.dat +1 27 160 -320 160 1 0 0 0 1 0 0 0 1 3003.dat +1 27 160 -344 160 1 0 0 0 1 0 0 0 1 3003.dat +1 288 160 -368 160 1 0 0 0 1 0 0 0 1 3001.dat +1 288 160 -392 160 1 0 0 0 1 0 0 0 1 3001.dat +1 10 100 -152 160 1 0 0 0 1 0 0 0 1 2456.dat +1 288 170 -152 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 2 100 -152 120 1 0 0 0 1 0 0 0 1 3001.dat +1 2 110 -160 140 1 0 0 0 1 0 0 0 1 3021.dat +1 2 70 -176 160 0 0 1 0 1 0 -1 0 0 3039.dat +1 2 70 -176 120 0 0 1 0 1 0 -1 0 0 3039.dat +1 2 100 -184 170 1 0 0 0 1 0 0 0 1 2431.dat +1 10 220 -272 160 1 0 0 0 1 0 0 0 1 2456.dat +1 288 150 -272 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 2 240 -272 120 1 0 0 0 1 0 0 0 1 3001.dat +1 2 210 -280 140 1 0 0 0 1 0 0 0 1 3021.dat +1 2 250 -296 160 0 0 -1 0 1 0 1 0 0 3039.dat +1 2 250 -296 120 0 0 -1 0 1 0 1 0 0 3039.dat +1 2 220 -304 170 1 0 0 0 1 0 0 0 1 2431.dat +1 19 100 -168 140 1 0 0 0 1 0 0 0 1 3022.dat +1 2 90 -192 130 1 0 0 0 1 0 0 0 1 4070.dat +1 84 110 -192 130 1 0 0 0 1 0 0 0 1 3005.dat +1 84 90 -192 150 1 0 0 0 1 0 0 0 1 3005.dat +1 84 110 -192 150 1 0 0 0 1 0 0 0 1 3005.dat +1 484 90 -182 100 1 0 0 0 0 -1 0 1 0 3062b.dat +1 70 90 -182 92 1 0 0 0 0 -1 0 1 0 6141.dat +1 19 90 -224 150 1 0 0 0 1 0 0 0 1 6091.dat +1 19 110 -224 130 -1 0 0 0 1 0 0 0 -1 6091.dat +1 19 130 -168 140 0 0 -1 0 1 0 1 0 0 3023b.dat +1 84 130 -192 130 1 0 0 0 1 0 0 0 1 3005.dat +1 15 130 -200 130 1 0 0 0 1 0 0 0 1 98138p07.dat +1 84 130 -192 150 1 0 0 0 1 0 0 0 1 3005.dat +1 15 130 -200 150 1 0 0 0 1 0 0 0 1 98138p07.dat +1 19 160 -416 150 1 0 0 0 1 0 0 0 1 30414.dat +1 16 120 -396 140 1 0 0 0 0 -1 0 1 0 sunflower_head.ldr +0 FILE sunflower_head.ldr +0 sunflower_head +0 Name: sunflower_head +1 14 40 -8 40 1 0 0 0 1 0 0 0 1 3032.dat +1 14 0 -32 0 1 0 0 0 1 0 0 0 1 3001.dat +1 14 80 -32 80 1 0 0 0 1 0 0 0 1 3001.dat +1 14 0 -32 60 0 0 -1 0 1 0 1 0 0 3001.dat +1 14 80 -32 20 0 0 -1 0 1 0 1 0 0 3001.dat +1 14 40 -56 -10 1 0 0 0 1 0 0 0 1 3037.dat +1 14 40 -56 90 -1 0 0 0 1 0 0 0 -1 3037.dat +1 14 -10 -56 40 0 0 1 0 1 0 -1 0 0 3037.dat +1 14 90 -56 40 0 0 -1 0 1 0 1 0 0 3037.dat +1 14 -10 -56 -10 1 0 0 0 1 0 0 0 1 3005.dat +1 14 90 -56 -10 1 0 0 0 1 0 0 0 1 3005.dat +1 14 -10 -56 90 1 0 0 0 1 0 0 0 1 3005.dat +1 14 90 -56 90 1 0 0 0 1 0 0 0 1 3005.dat +1 14 -20 -80 -20 1 0 0 0 1 0 0 0 1 3003.dat +1 14 100 -80 -20 1 0 0 0 1 0 0 0 1 3003.dat +1 14 -20 -80 100 1 0 0 0 1 0 0 0 1 3003.dat +1 14 100 -80 100 1 0 0 0 1 0 0 0 1 3003.dat +1 70 20 -56 30 0 0 -1 0 1 0 1 0 0 3002.dat +1 70 60 -56 30 0 0 -1 0 1 0 1 0 0 3002.dat +1 70 40 -56 70 1 0 0 0 1 0 0 0 1 3010.dat +1 70 30 -64 30 1 0 0 0 1 0 0 0 1 6141.dat +1 70 50 -64 50 1 0 0 0 1 0 0 0 1 6141.dat diff --git a/brickwright/alt/alt-061/thumb-512.avif b/brickwright/alt/alt-061/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..99d946adc7ae68647c0a83eca0584865170e1a40 Binary files /dev/null and b/brickwright/alt/alt-061/thumb-512.avif differ diff --git a/brickwright/alt/alt-061/trace.jsonl.gz b/brickwright/alt/alt-061/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..50f3778455a7ffa03f5ba20ac23c1c7c964d95bb --- /dev/null +++ b/brickwright/alt/alt-061/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c3d1b42aae3583054efaf199708f8db05e52fd02bbcd0ec74f91507fda48505 +size 6701 diff --git a/brickwright/alt/alt-061/view-0.avif b/brickwright/alt/alt-061/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..dce30c1266bd30ea7fe4e47fa822e64d763cb45a Binary files /dev/null and b/brickwright/alt/alt-061/view-0.avif differ diff --git a/brickwright/alt/alt-061/view-1.avif b/brickwright/alt/alt-061/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..216a5e522735d2e2f89fff17a275e628016a4fdd Binary files /dev/null and b/brickwright/alt/alt-061/view-1.avif differ diff --git a/brickwright/alt/alt-061/view-2.avif b/brickwright/alt/alt-061/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..7ec342d78c408ce7350f0ab0b3de439442b39648 Binary files /dev/null and b/brickwright/alt/alt-061/view-2.avif differ diff --git a/brickwright/alt/alt-061/view-3.avif b/brickwright/alt/alt-061/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..7c1a21247a94371405d414209c0540405174c8ce Binary files /dev/null and b/brickwright/alt/alt-061/view-3.avif differ diff --git a/brickwright/alt/alt-061/view-4.avif b/brickwright/alt/alt-061/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..2b4e19c9bea5723e59823c7eac07d27fe87b7a9b Binary files /dev/null and b/brickwright/alt/alt-061/view-4.avif differ diff --git a/brickwright/alt/alt-061/view-5.avif b/brickwright/alt/alt-061/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..0d549efbc5aeb0aa10561a9a984f8b7c97138085 Binary files /dev/null and b/brickwright/alt/alt-061/view-5.avif differ diff --git a/brickwright/alt/alt-061/view-6.avif b/brickwright/alt/alt-061/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..6b0473335b7713bdd04c76a40efa37e2395d04e8 Binary files /dev/null and b/brickwright/alt/alt-061/view-6.avif differ diff --git a/brickwright/alt/alt-061/view-7.avif b/brickwright/alt/alt-061/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..f4c921b2f8067320bd185d64c57d2fc2206fd1c3 Binary files /dev/null and b/brickwright/alt/alt-061/view-7.avif differ diff --git a/brickwright/alt/alt-062/build.py b/brickwright/alt/alt-062/build.py new file mode 100644 index 0000000000000000000000000000000000000000..14feccd5b117e27a103d058e51927a7186fe95cd --- /dev/null +++ b/brickwright/alt/alt-062/build.py @@ -0,0 +1,103 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + +INVENTORY = json.load(open('/inputs/parts.json')) + +def create_build(): + b = bl.LegoBuild() + remaining = {(p,c): n for p, cs in INVENTORY.items() for c,n in cs.items()} + def put(p,c,x,y,z,r=0,name=None): + assert remaining.get((p,c),0)>0, (p,c) + remaining[p,c]-=1 + return b.add(bl.Element(p, getattr(bl.Color,c)), (x,y,z), rotation=bl.Rotation(r), name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='island foundation') + for x in (2,6,10): + put('3031','BLUE',x,0,1/3,name='water '+str(x)) + # Jagged footprint, narrowing toward a real hollow summit. + rows = [ + {4:(4,12),5:(2,14),6:(2,14),**{y:(2,14) for y in range(7,13)},13:(3,13),14:(4,12)}, + {6:(4,12),**{y:(3,13) for y in range(7,11)},11:(4,12),12:(4,12),13:(5,11)}, + {7:(5,11),8:(5,11),**{y:(4,12) for y in range(9,13)}}, + {y:(5,11) for y in range(8,13)}, + {y:(6,10) for y in range(8,12)}, + ] + earth = ['BLACK','DARK_BLUISH_GRAY','REDDISH_BROWN','DARK_TAN','DARK_ORANGE','MEDIUM_NOUGAT','LIGHT_BLUISH_GRAY'] + dims = {'2456':(6,2),'3001':(4,2),'3002':(3,2),'3003':(2,2),'3010':(4,1),'3009':(6,1),'3004':(2,1),'3005':(1,1),'30136':(2,1)} + # Exact-cover-style deterministic tiling, using only remaining stock. + def pave(cells, colors, level, label): + cells=set(cells) + while cells: + x,y=min(cells,key=lambda q:(q[1],q[0])) + options=[] + for pi,(p,(w,h)) in enumerate(dims.items()): + for ci,c in enumerate(colors): + if remaining.get((p,c),0)<=0: continue + for r in (0,1): + ww,hh=(w,h) if not r else (h,w) + cover={(xx,yy) for xx in range(x,x+ww) for yy in range(y,y+hh)} + if cover<=cells: + # Large bricks first; rotate layer bonds and vary strata. + score=(ww*hh, -((ci+level)%len(colors)), -pi, int(r==level%2)) + options.append((score,p,c,r,cover)) + if not options: raise ValueError(('untiled',label,level,x,y,len(cells))) + _,p,c,r,cover=max(options,key=lambda q:q[0]) + put(p,c,x,y,level+1/3,r,name=f'{label} {level} {x} {y}') + cells-=cover + for level, row in enumerate(rows): + cells={(x,y) for y,(a,z) in row.items() for x in range(a,z)} + if level>=3: + cells-={(x,y) for x in (7,8) for y in (9,10)} + if level==0: + lava={(x,y) for x in (5,6,9,10) for y in (4,5,6)} + # A tall, pale isolated boulder divides the stream. + rock={(x,y) for x in (7,8) for y in (4,5)} + cells-=rock + put('3003','DARK_TAN',7,4,1/3,name='boulder foot') + put('3004','LIGHT_BLUISH_GRAY',7,4,4/3,name='boulder core front') + put('3004','DARK_BLUISH_GRAY',7,5,4/3,name='boulder core back') + put('11212','DARK_BLUISH_GRAY',7,4,7/3,name='boulder cap') + put('14769','DARK_BLUISH_GRAY',7,4,8/3,name='boulder crown') + elif level==1: + lava={(x,y) for x in range(6,10) for y in (6,7)} + elif level==2: + lava={(x,y) for x in (7,8) for y in range(7,11)} + else: + lava={(x,8) for x in (7,8)} + lava &= cells + pave(lava,['RED','ORANGE'],level,'lava') + pave(cells-lava,earth,level,'volcanic rock') + # Small sloped outcrops break the stepped silhouette. + for x,r in ((2,3),(12,1)): + for y in (5,6): + put('3040b','BLACK',x,y,4/3,r,name=f'basalt slope {x} {y}') + for x in (5,9): + put('85984','BLACK',x,7,10/3,name=f'dark shoulder {x}') + # Orange molten flecks and sloping red tongues trace the flow. + for x,y,z in ((5,4,4/3),(10,5,4/3),(7,7,10/3)): + put('6141','TRANS_ORANGE',x,y,z,name=f'incandescent lava {x} {y}') + for x,y,z in ((6,4,4/3),(9,4,4/3),(8,7,10/3)): + put('54200','RED',x,y,z,name=f'lava slope {x} {y}') + put('6141','RED',7,9,10/3,name='crater molten pool') + put('59900','TRANS_ORANGE',8,10,10/3,name='crater orange glow') + # Hot tongues fan out over the blue sea, immediately below both forks. + put('3710','ORANGE',4,3,2/3,name='left lava sea contact') + put('3710','ORANGE',8,3,2/3,name='right lava sea contact') + put('3023b','ORANGE',5,2,2/3,name='left hot tongue') + put('3023b','ORANGE',9,2,2/3,name='right hot tongue') + return b + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + tests.check('inventory limits',all(n<=INVENTORY.get(p,{}).get(c,0) for (p,c),n in used.items()),str(dict(used))) + tests.check('red and orange lava',all(any(p.content.color==c and (b.name_of(p) or '').startswith('lava') for p in b.placements) for c in (bl.Color.RED,bl.Color.ORANGE))) + tests.check('open crater', not any(p.bounding_box[0].x < 8.99 and p.bounding_box[1].x > 7.01 and p.bounding_box[0].y < 10.99 and p.bounding_box[1].y > 9.01 and p.bounding_box[1].z > 4.5 for p in b.placements), 'A 2 by 2 stud opening remains clear through the upper rim.') + tests.check('blue water at foot',sum(n for (p,c),n in used.items() if p=='3031' and c=='BLUE')==3) + tests.check('rock divides two lava branches', all(any((b.name_of(p) or '').startswith('lava 0') and p.bounding_box[0].x<=x and p.bounding_box[1].x>=x+1 for p in b.placements) for x in (5,10))) + return tests.report() diff --git a/brickwright/alt/alt-062/hero-1024.avif b/brickwright/alt/alt-062/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..d8f5d9efdd774d4be8c6b88a77d14592548c1442 Binary files /dev/null and b/brickwright/alt/alt-062/hero-1024.avif differ diff --git a/brickwright/alt/alt-062/model.mpd b/brickwright/alt/alt-062/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..bafb275733397533655e67e29442e45412c14400 --- /dev/null +++ b/brickwright/alt/alt-062/model.mpd @@ -0,0 +1,79 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 1 80 -16 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 160 -16 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 240 -16 40 1 0 0 0 1 0 0 0 1 3031.dat +1 28 160 -32 100 1 0 0 0 1 0 0 0 1 3003.dat +1 71 160 -56 90 1 0 0 0 1 0 0 0 1 3004.dat +1 72 160 -56 110 1 0 0 0 1 0 0 0 1 3004.dat +1 72 170 -64 110 1 0 0 0 1 0 0 0 1 11212.dat +1 72 160 -72 100 1 0 0 0 1 0 0 0 1 14769.dat +1 4 120 -32 100 1 0 0 0 1 0 0 0 1 3003.dat +1 4 200 -32 100 1 0 0 0 1 0 0 0 1 3003.dat +1 4 120 -32 130 1 0 0 0 1 0 0 0 1 3004.dat +1 4 200 -32 130 1 0 0 0 1 0 0 0 1 3004.dat +1 484 90 -32 140 0 0 -1 0 1 0 1 0 0 3009.dat +1 484 230 -32 140 0 0 -1 0 1 0 1 0 0 3009.dat +1 0 60 -32 160 0 0 -1 0 1 0 1 0 0 2456.dat +1 0 260 -32 160 0 0 -1 0 1 0 1 0 0 2456.dat +1 72 160 -32 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 72 120 -32 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 72 200 -32 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 70 90 -32 240 0 0 -1 0 1 0 1 0 0 3010.dat +1 28 160 -32 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 70 230 -32 240 0 0 -1 0 1 0 1 0 0 3010.dat +1 28 60 -32 240 1 0 0 0 1 0 0 0 1 3003.dat +1 28 120 -32 260 0 0 -1 0 1 0 1 0 0 3001.dat +1 28 200 -32 260 0 0 -1 0 1 0 1 0 0 3001.dat +1 28 260 -32 240 1 0 0 0 1 0 0 0 1 3003.dat +1 84 70 -32 270 1 0 0 0 1 0 0 0 1 3005.dat +1 84 250 -32 270 1 0 0 0 1 0 0 0 1 3005.dat +1 84 90 -32 290 1 0 0 0 1 0 0 0 1 3005.dat +1 0 160 -32 290 1 0 0 0 1 0 0 0 1 3004.dat +1 84 230 -32 290 1 0 0 0 1 0 0 0 1 3005.dat +1 25 160 -56 140 1 0 0 0 1 0 0 0 1 3001.dat +1 71 100 -56 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 220 -56 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 70 -56 180 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 250 -56 180 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 140 -56 200 0 0 -1 0 1 0 1 0 0 3001.dat +1 71 180 -56 200 0 0 -1 0 1 0 1 0 0 3001.dat +1 0 100 -56 230 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 220 -56 230 0 0 -1 0 1 0 1 0 0 3002.dat +1 28 160 -56 260 1 0 0 0 1 0 0 0 1 3001.dat +1 71 110 -56 270 0 0 -1 0 1 0 1 0 0 3005.dat +1 71 210 -56 270 0 0 -1 0 1 0 1 0 0 3005.dat +1 4 160 -80 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 0 120 -80 170 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 200 -80 170 0 0 -1 0 1 0 1 0 0 3002.dat +1 71 90 -80 220 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 230 -80 220 0 0 -1 0 1 0 1 0 0 3010.dat +1 0 120 -80 230 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 200 -80 230 0 0 -1 0 1 0 1 0 0 3002.dat +1 84 160 -80 240 1 0 0 0 1 0 0 0 1 3003.dat +1 25 160 -104 170 1 0 0 0 1 0 0 0 1 3004.dat +1 0 120 -104 190 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 200 -104 190 0 0 -1 0 1 0 1 0 0 3002.dat +1 70 130 -104 240 1 0 0 0 1 0 0 0 1 3002.dat +1 70 190 -104 240 1 0 0 0 1 0 0 0 1 3002.dat +1 4 160 -128 170 1 0 0 0 1 0 0 0 1 3004.dat +1 70 130 -128 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 190 -128 200 0 0 -1 0 1 0 1 0 0 3010.dat +1 484 160 -128 230 1 0 0 0 1 0 0 0 1 30136.dat +1 0 70 -56 110 0 0 1 0 1 0 -1 0 0 3040b.dat +1 0 70 -56 130 0 0 1 0 1 0 -1 0 0 3040b.dat +1 0 250 -56 110 0 0 -1 0 1 0 1 0 0 3040b.dat +1 0 250 -56 130 0 0 -1 0 1 0 1 0 0 3040b.dat +1 0 120 -80 150 1 0 0 0 1 0 0 0 1 85984.dat +1 0 200 -80 150 1 0 0 0 1 0 0 0 1 85984.dat +1 57 110 -40 90 1 0 0 0 1 0 0 0 1 6141.dat +1 57 210 -40 110 1 0 0 0 1 0 0 0 1 6141.dat +1 57 150 -88 150 1 0 0 0 1 0 0 0 1 6141.dat +1 4 130 -32 90 1 0 0 0 1 0 0 0 1 54200.dat +1 4 190 -32 90 1 0 0 0 1 0 0 0 1 54200.dat +1 4 170 -80 150 1 0 0 0 1 0 0 0 1 54200.dat +1 4 150 -88 190 1 0 0 0 1 0 0 0 1 6141.dat +1 57 170 -104 210 1 0 0 0 1 0 0 0 1 59900.dat +1 25 120 -24 70 1 0 0 0 1 0 0 0 1 3710.dat +1 25 200 -24 70 1 0 0 0 1 0 0 0 1 3710.dat +1 25 120 -24 50 1 0 0 0 1 0 0 0 1 3023b.dat +1 25 200 -24 50 1 0 0 0 1 0 0 0 1 3023b.dat diff --git a/brickwright/alt/alt-062/thumb-512.avif b/brickwright/alt/alt-062/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..ec8d0ac52d23fb90552041c3c4195e4dd6f26714 Binary files /dev/null and b/brickwright/alt/alt-062/thumb-512.avif differ diff --git a/brickwright/alt/alt-062/trace.jsonl.gz b/brickwright/alt/alt-062/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..05b41ba1ea446e62c319b06c7646accad1cc9d0d --- /dev/null +++ b/brickwright/alt/alt-062/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bce6aa46e18f4aa1b49f4cbf702225f589bf6feb4210173029360c06690a641 +size 6977 diff --git a/brickwright/alt/alt-062/view-0.avif b/brickwright/alt/alt-062/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..ab39292ba244edacb278560bf16ff6eae7af3b58 Binary files /dev/null and b/brickwright/alt/alt-062/view-0.avif differ diff --git a/brickwright/alt/alt-062/view-1.avif b/brickwright/alt/alt-062/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..d81802daad763bce437625876b8e290e315ab5fe Binary files /dev/null and b/brickwright/alt/alt-062/view-1.avif differ diff --git a/brickwright/alt/alt-062/view-2.avif b/brickwright/alt/alt-062/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..cbe220bdd0a0a0fca760b61f4c31e96e71bef185 Binary files /dev/null and b/brickwright/alt/alt-062/view-2.avif differ diff --git a/brickwright/alt/alt-062/view-3.avif b/brickwright/alt/alt-062/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..72457105f24e0b3e5275d979a17a2d07a9d25777 Binary files /dev/null and b/brickwright/alt/alt-062/view-3.avif differ diff --git a/brickwright/alt/alt-062/view-4.avif b/brickwright/alt/alt-062/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..0636c931149d03f19b188702ff826a675f71cad1 Binary files /dev/null and b/brickwright/alt/alt-062/view-4.avif differ diff --git a/brickwright/alt/alt-062/view-5.avif b/brickwright/alt/alt-062/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..a9f081040379ab295256a0ba227380d3ddbe6056 Binary files /dev/null and b/brickwright/alt/alt-062/view-5.avif differ diff --git a/brickwright/alt/alt-062/view-6.avif b/brickwright/alt/alt-062/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..af3d3c5d338bb18c98b387b6ef14607c23b52d4b Binary files /dev/null and b/brickwright/alt/alt-062/view-6.avif differ diff --git a/brickwright/alt/alt-062/view-7.avif b/brickwright/alt/alt-062/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..e7ca8e69a6829639ab26420ba12d08ec35011fa0 Binary files /dev/null and b/brickwright/alt/alt-062/view-7.avif differ diff --git a/brickwright/alt/alt-063/build.py b/brickwright/alt/alt-063/build.py new file mode 100644 index 0000000000000000000000000000000000000000..b8c3f44246af179818af5ba56c442714d76b0cb6 --- /dev/null +++ b/brickwright/alt/alt-063/build.py @@ -0,0 +1,101 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + C=bl.Color + def put(pid,col,x,y,z,rot=0,name=None): + return b.add(bl.Element(pid,col),(x,y,z),rotation=bl.Rotation(rot),name=name) + put('91405',C.BRIGHT_GREEN,0,0,0,name='reef_base') + # Sand and water patches bind the reef to one broad, stable foundation. + put('3029',C.DARK_BLUISH_GRAY,2,7,1/3,name='rock_shelf') + for x,y in [(1,3),(6,3)]: put('3020',C.TAN,x,y,1/3) + for x,y in [(10,3),(0,11),(4,11),(10,11)]: put('3020',C.MEDIUM_AZURE,x,y,1/3) + put('3022',C.TAN,12,5,1/3) + put('3022',C.TAN,4,5,1/3) + for x,y in [(0,7),(14,7)]: put('3003',C.DARK_TAN,x,y,1/3) + # Low natural bridge, with rounded stones flanking its open passage. + for x in [3,10]: + put('11212',C.DARK_BLUISH_GRAY,x,7,2/3) + for x in [5,10]: + put('3004',C.LIGHT_BLUISH_GRAY,x,8,1,1) + for x in [3,11]: + put('85080',C.LIGHT_BLUISH_GRAY,x,8,1) + put('15254',C.LIGHT_BLUISH_GRAY,5,8,2,name='arch') + put('2431',C.LIGHT_BLUISH_GRAY,6,8,4) + # Coral: branching fork silhouettes, not solid blocks. + put('3003',C.RED,2,3,2/3,name='red_root') + put('3004',C.RED,2,3,5/3,1) + put('3001',C.RED,1,3,8/3,name='red_branch') + put('60481a',C.RED,1,3,11/3) + put('60481a',C.RED,4,3,11/3,2) + put('3004',C.RED,2,3,11/3,1) + put('30165',C.RED,2,3,14/3) + for x in [1,4]: put('6141',C.RED,x,4 if x==1 else 3,17/3) + put('3941',C.DARK_PURPLE,7,3,2/3,name='purple_root') + put('3941',C.DARK_PURPLE,7,3,5/3) + put('3001',C.DARK_PURPLE,6,3,8/3,name='purple_branch') + put('60481a',C.DARK_PURPLE,6,3,11/3) + put('60481a',C.DARK_PURPLE,9,3,11/3,2) + put('3005',C.MEDIUM_LAVENDER,7,3,11/3) + put('3005',C.MEDIUM_LAVENDER,7,3,14/3) + put('15397',C.MEDIUM_LAVENDER,6,2,17/3) + put('3005',C.MEDIUM_LAVENDER,6,3,6) + put('3005',C.MEDIUM_LAVENDER,8,3,6) + put('3003',C.YELLOW,12,3,2/3,name='yellow_root') + put('3005',C.YELLOW,12,3,5/3) + put('3001',C.YELLOW,11,3,8/3,name='yellow_branch') + for x in [11,14]: + put('3005',C.YELLOW,x,3,11/3) + put('98262',C.YELLOW,x,3,14/3) + put('3005',C.YELLOW,12,4,11/3) + # Seaweed is outside the coral belt, on the edge opposite the stone bridge. + for x,h in [(5,1),(7,2),(9,2)]: + put('3004',C.DARK_GREEN,x,0,1/3,1) + for j in range(h): put('3004',C.DARK_GREEN,x,0,4/3+j,1) + put('60481a',C.DARK_GREEN,x,0,4/3+h,name='seaweed_tip_'+str(x)) + put('4727',C.BRIGHT_GREEN,x,1,10/3+h) + # Fish are narrow, sculpted profiles on transparent round water supports. + def fish(): + f=bl.LegoBuild() + def a(pid,col,x,y,z,r=0): + return f.add(bl.Element(pid,col),(x,y,z+2),rotation=bl.Rotation(r)) + a('3665a',C.MEDIUM_AZURE,0,0,0,3) + a('3665a',C.MEDIUM_AZURE,2,0,0,1) + body=a('47905',C.BLACK,0,0,1) + a('3004',C.ORANGE,1,0,1) + a('47905',C.BLACK,3,0,1) + a('3004',C.ORANGE,4,0,1,1) + a('3710',C.ORANGE,1,0,2) + a('3040b',C.MEDIUM_AZURE,0,0,7/3,3) + a('3040b',C.MEDIUM_AZURE,2,0,7/3,1) + a('3039',C.BRIGHT_LIGHT_ORANGE,4,0,7/3) + eye=bl.Element('98138p07',C.WHITE) + for face in [bl.Direction.FRONT,bl.Direction.BACK]: + f.connect(eye,'antistud',to=body.find_connector('stud',facing=face)) + f.add(bl.Element('3941',C.TRANS_CLEAR),(1,0,0)) + f.add(bl.Element('3065',C.TRANS_CLEAR),(1,0,1)) + return f + for x,y,r,n in [(0,13,0,'fish_left'),(10,13,2,'fish_right')]: + b.add(fish(),(x,y,1/3),rotation=bl.Rotation(r),name=n) + return b + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess=[(pid,c,n,inventory.get(pid,{}).get(c,0)) for (pid,c),n in used.items() if n>inventory.get(pid,{}).get(c,0)] + t.check('Inventory limits',not excess,str(excess)) + t.check('Three branching coral colors',all(k+'_branch' in b.names for k in ['red','yellow','purple'])) + t.check('Fish on opposite sides',b.named('fish_left').center.x < b.named('arch').center.x < b.named('fish_right').center.x) + t.check('Opposite fish directions',b.named('fish_left').pose.rotation != b.named('fish_right').pose.rotation) + t.check('Seaweed beyond coral, away from arch',b.named('seaweed_tip_7').center.y < b.named('purple_root').center.y < b.named('arch').center.y) + return t.report() diff --git a/brickwright/alt/alt-063/hero-1024.avif b/brickwright/alt/alt-063/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..08047d8676dc9b3b8e67e6abd8051ca9dd992abb Binary files /dev/null and b/brickwright/alt/alt-063/hero-1024.avif differ diff --git a/brickwright/alt/alt-063/model.mpd b/brickwright/alt/alt-063/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..fcb28452efda79baca3323a51e7459a813c7cee2 --- /dev/null +++ b/brickwright/alt/alt-063/model.mpd @@ -0,0 +1,100 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 72 160 -16 180 1 0 0 0 1 0 0 0 1 3029.dat +1 19 60 -16 80 1 0 0 0 1 0 0 0 1 3020.dat +1 19 160 -16 80 1 0 0 0 1 0 0 0 1 3020.dat +1 322 240 -16 80 1 0 0 0 1 0 0 0 1 3020.dat +1 322 40 -16 240 1 0 0 0 1 0 0 0 1 3020.dat +1 322 120 -16 240 1 0 0 0 1 0 0 0 1 3020.dat +1 322 240 -16 240 1 0 0 0 1 0 0 0 1 3020.dat +1 19 260 -16 120 1 0 0 0 1 0 0 0 1 3022.dat +1 19 100 -16 120 1 0 0 0 1 0 0 0 1 3022.dat +1 28 20 -32 160 1 0 0 0 1 0 0 0 1 3003.dat +1 28 300 -32 160 1 0 0 0 1 0 0 0 1 3003.dat +1 72 90 -24 170 1 0 0 0 1 0 0 0 1 11212.dat +1 72 230 -24 170 1 0 0 0 1 0 0 0 1 11212.dat +1 71 110 -48 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 210 -48 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 71 70 -48 190 1 0 0 0 1 0 0 0 1 85080.dat +1 71 230 -48 190 1 0 0 0 1 0 0 0 1 85080.dat +1 71 160 -96 170 1 0 0 0 1 0 0 0 1 15254.dat +1 71 160 -104 170 1 0 0 0 1 0 0 0 1 2431.dat +1 4 60 -40 80 1 0 0 0 1 0 0 0 1 3003.dat +1 4 50 -64 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 60 -88 80 1 0 0 0 1 0 0 0 1 3001.dat +1 4 30 -136 90 1 0 0 0 1 0 0 0 1 60481a.dat +1 4 90 -136 70 -1 0 0 0 1 0 0 0 -1 60481a.dat +1 4 50 -112 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 60 -136 80 1 0 0 0 1 0 0 0 1 30165.dat +1 4 30 -144 90 1 0 0 0 1 0 0 0 1 6141.dat +1 4 90 -144 70 1 0 0 0 1 0 0 0 1 6141.dat +1 85 160 -40 80 1 0 0 0 1 0 0 0 1 3941.dat +1 85 160 -64 80 1 0 0 0 1 0 0 0 1 3941.dat +1 85 160 -88 80 1 0 0 0 1 0 0 0 1 3001.dat +1 85 130 -136 90 1 0 0 0 1 0 0 0 1 60481a.dat +1 85 190 -136 70 -1 0 0 0 1 0 0 0 -1 60481a.dat +1 30 150 -112 70 1 0 0 0 1 0 0 0 1 3005.dat +1 30 150 -136 70 1 0 0 0 1 0 0 0 1 3005.dat +1 30 150 -144 70 1 0 0 0 1 0 0 0 1 15397.dat +1 30 130 -168 70 1 0 0 0 1 0 0 0 1 3005.dat +1 30 170 -168 70 1 0 0 0 1 0 0 0 1 3005.dat +1 14 260 -40 80 1 0 0 0 1 0 0 0 1 3003.dat +1 14 250 -64 70 1 0 0 0 1 0 0 0 1 3005.dat +1 14 260 -88 80 1 0 0 0 1 0 0 0 1 3001.dat +1 14 230 -112 70 1 0 0 0 1 0 0 0 1 3005.dat +1 14 230 -136 70 1 0 0 0 1 0 0 0 1 98262.dat +1 14 290 -112 70 1 0 0 0 1 0 0 0 1 3005.dat +1 14 290 -136 70 1 0 0 0 1 0 0 0 1 98262.dat +1 14 250 -112 90 1 0 0 0 1 0 0 0 1 3005.dat +1 288 110 -32 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 110 -56 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 110 -104 30 1 0 0 0 1 0 0 0 1 60481a.dat +1 10 110 -128 30 1 0 0 0 1 0 0 0 1 4727.dat +1 288 150 -32 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 150 -56 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 150 -80 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 150 -128 30 1 0 0 0 1 0 0 0 1 60481a.dat +1 10 150 -152 30 1 0 0 0 1 0 0 0 1 4727.dat +1 288 190 -32 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 190 -56 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 190 -80 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 190 -128 30 1 0 0 0 1 0 0 0 1 60481a.dat +1 10 190 -152 30 1 0 0 0 1 0 0 0 1 4727.dat +1 16 0 -8 260 1 0 0 0 1 0 0 0 1 fish_left.ldr +1 16 320 -8 300 -1 0 0 0 1 0 0 0 -1 fish_right.ldr +0 FILE fish_left.ldr +0 fish_left +0 Name: fish_left +1 322 30 -72 10 0 0 1 0 1 0 -1 0 0 3665a.dat +1 322 50 -72 10 0 0 -1 0 1 0 1 0 0 3665a.dat +1 0 10 -96 10 1 0 0 0 1 0 0 0 1 47905.dat +1 25 40 -96 10 1 0 0 0 1 0 0 0 1 3004.dat +1 0 70 -96 10 1 0 0 0 1 0 0 0 1 47905.dat +1 25 90 -96 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 60 -104 10 1 0 0 0 1 0 0 0 1 3710.dat +1 322 30 -128 10 0 0 1 0 1 0 -1 0 0 3040b.dat +1 322 50 -128 10 0 0 -1 0 1 0 1 0 0 3040b.dat +1 191 100 -128 30 1 0 0 0 1 0 0 0 1 3039.dat +1 15 10 -86 -8 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 10 -86 28 1 0 0 0 0 1 0 -1 0 98138p07.dat +1 47 40 -24 20 1 0 0 0 1 0 0 0 1 3941.dat +1 47 40 -48 10 1 0 0 0 1 0 0 0 1 3065.dat +0 FILE fish_right.ldr +0 fish_right +0 Name: fish_right +1 322 30 -72 10 0 0 1 0 1 0 -1 0 0 3665a.dat +1 322 50 -72 10 0 0 -1 0 1 0 1 0 0 3665a.dat +1 0 10 -96 10 1 0 0 0 1 0 0 0 1 47905.dat +1 25 40 -96 10 1 0 0 0 1 0 0 0 1 3004.dat +1 0 70 -96 10 1 0 0 0 1 0 0 0 1 47905.dat +1 25 90 -96 20 0 0 -1 0 1 0 1 0 0 3004.dat +1 25 60 -104 10 1 0 0 0 1 0 0 0 1 3710.dat +1 322 30 -128 10 0 0 1 0 1 0 -1 0 0 3040b.dat +1 322 50 -128 10 0 0 -1 0 1 0 1 0 0 3040b.dat +1 191 100 -128 30 1 0 0 0 1 0 0 0 1 3039.dat +1 15 10 -86 -8 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 10 -86 28 1 0 0 0 0 1 0 -1 0 98138p07.dat +1 47 40 -24 20 1 0 0 0 1 0 0 0 1 3941.dat +1 47 40 -48 10 1 0 0 0 1 0 0 0 1 3065.dat diff --git a/brickwright/alt/alt-063/thumb-512.avif b/brickwright/alt/alt-063/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..dee395c172f327b407a1b66cad7ac020e735c96e Binary files /dev/null and b/brickwright/alt/alt-063/thumb-512.avif differ diff --git a/brickwright/alt/alt-063/trace.jsonl.gz b/brickwright/alt/alt-063/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..28df52030038dc375392b7d91e0d3d1bf50452fa --- /dev/null +++ b/brickwright/alt/alt-063/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38fa80be3e5cb4bd45d386793a3b3e53bdc4931eb2ad5464ebc670284a73745e +size 7128 diff --git a/brickwright/alt/alt-063/view-0.avif b/brickwright/alt/alt-063/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..168caa98d010b3ff2fbcefe203b3f649c278c288 Binary files /dev/null and b/brickwright/alt/alt-063/view-0.avif differ diff --git a/brickwright/alt/alt-063/view-1.avif b/brickwright/alt/alt-063/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..e942cbc90b985d1e808b8eb4ca1f0a0ce33e396b Binary files /dev/null and b/brickwright/alt/alt-063/view-1.avif differ diff --git a/brickwright/alt/alt-063/view-2.avif b/brickwright/alt/alt-063/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..22a30272f1405489cb0e87f343ec4f93aa9f081f Binary files /dev/null and b/brickwright/alt/alt-063/view-2.avif differ diff --git a/brickwright/alt/alt-063/view-3.avif b/brickwright/alt/alt-063/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..cd54d5bdc9a39c1d2ee4ab2af3c1f361fc61b13b Binary files /dev/null and b/brickwright/alt/alt-063/view-3.avif differ diff --git a/brickwright/alt/alt-063/view-4.avif b/brickwright/alt/alt-063/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..f9fff369b1a52e97805da1560c8d437409de179e Binary files /dev/null and b/brickwright/alt/alt-063/view-4.avif differ diff --git a/brickwright/alt/alt-063/view-5.avif b/brickwright/alt/alt-063/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..a9bd4666bf1796cb508bc8b17e98aa8eae56335e Binary files /dev/null and b/brickwright/alt/alt-063/view-5.avif differ diff --git a/brickwright/alt/alt-063/view-6.avif b/brickwright/alt/alt-063/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..938feda119d7223fde70fdb6799b3fb19d571bb4 Binary files /dev/null and b/brickwright/alt/alt-063/view-6.avif differ diff --git a/brickwright/alt/alt-063/view-7.avif b/brickwright/alt/alt-063/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..ced7ab47802410954bfc2e94c8aeecfd0926b93b Binary files /dev/null and b/brickwright/alt/alt-063/view-7.avif differ diff --git a/brickwright/alt/alt-064/build.py b/brickwright/alt/alt-064/build.py new file mode 100644 index 0000000000000000000000000000000000000000..3f3baa66228f7156868bea37653ca40843580f7e --- /dev/null +++ b/brickwright/alt/alt-064/build.py @@ -0,0 +1,70 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def part(pid, color, x, y, z, name=None, rotation=bl.Rotation.DEG_0): + return b.add(bl.Element(pid, getattr(bl.Color, color)), (x,y,z), rotation=rotation, name=name) + part('91405','BRIGHT_GREEN',0,0,0,'meadow foundation') + # Continuous studded blue water, all one plate deep. + for x,y in [(4,0),(8,0),(4,4)]: + part('3031','BLUE',x,y,1/3) + for x,y in [(8,4),(8,6),(4,8),(8,8)]: + part('3020','MEDIUM_AZURE',x,y,1/3) + for y in [10,11]: part('3460','MEDIUM_AZURE',4,y,1/3) + for y in [12,13]: + part('3666','MEDIUM_AZURE',4,y,1/3) + part('3023b','DARK_AZURE',10,y,1/3) + for x in [4,8]: + for y in [14,15]: part('3710','BLUE',x,y,1/3) + # Raised grassy banks on either side of the channel. + grass = ['GREEN','DARK_GREEN','LIME','GREEN','DARK_GREEN','LIME','LIME'] + for x in [0,12]: + for i,c in enumerate(grass): part('3001',c,x,2*i,1/3) + for dx in [0,2]: part('3003','LIME',x+dx,14,1/3) + # Reinforcement ties both halves of the wooden bridge together from below. + part('3034','LIGHT_BLUISH_GRAY',4,8,1,'bridge underside') + for x in [2,8]: part('3795','REDDISH_BROWN',x,8,4/3,'bridge deck '+str(x)) + for x in [4,6,8,10]: part('3068b','DARK_TAN',x,8,5/3,'bridge plank '+str(x)) + for x in [2,12]: part('3022','TAN',x,8,5/3,'bridge landing '+str(x)) + # Three discrete leaves floating immediately above the water surface. + part('3031','BRIGHT_GREEN',5,2,2/3,'frog lily pad') + part('3021','GREEN',8,11,2/3,'flower lily pad') + part('3021','GREEN',5,14,2/3,'empty lily pad') + # A crouching frog: broad haunches, sloping back, and two forward-facing eyes. + for x in [6,7]: + head = part('4070','GREEN',x,2,1,'frog eye socket '+str(x)) + eye = bl.Element('98138p07',bl.Color.WHITE) + b.connect(eye, eye.find_connector('antistud'), + to=head.find_connector('stud', facing=bl.Direction.FRONT), name='frog eye '+str(x)) + part('3039','GREEN',6,3,1,'frog back',bl.Rotation.DEG_180) + for x in [5,8]: part('3040b','GREEN',x,3,1,'frog haunch '+str(x),bl.Rotation.DEG_180) + # A pink blossom held on the central stalk of the lily leaf. + part('4727','BRIGHT_GREEN',9,11,1,'water lily foliage') + part('33291','DARK_PINK',9,11,2,'pink water flower') + # Sparse bank vegetation leaves the approach to the bridge clear. + for x,y in [(1,3),(14,12)]: + part('4727','BRIGHT_GREEN',x,y,4/3) + part('33291','BRIGHT_LIGHT_ORANGE',x,y,7/3) + return b + + +def run_tests(): + b = create_build() + tests = TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory = json.load(open('/inputs/parts.json')) + used = Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess = {str(k):n for k,n in used.items() if n > inventory.get(k[0],{}).get(k[1],0)} + tests.check('Uses only available inventory', not excess, str(excess)) + pads = [b.named(n) for n in ['frog lily pad','flower lily pad','empty lily pad']] + tests.check('Three distinct lily pads on water',len(pads)==3 and all(abs(p.alignment_box[0].z-2/3)<0.001 for p in pads)) + tests.check('Frog with two eyes',all('frog eye '+str(x) in b.names for x in [6,7])) + tests.check('Pink flower on another lily pad', b.named('pink water flower').content.color==bl.Color.DARK_PINK) + tests.check('Low bridge spans both banks', b.named('bridge deck 2').alignment_box[0].x==2 and b.named('bridge deck 8').alignment_box[1].x==14 and b.named('bridge deck 2').alignment_box[0].z<2) + return tests.report() diff --git a/brickwright/alt/alt-064/hero-1024.avif b/brickwright/alt/alt-064/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..96c96d131304db89782bd6142344a7d89e6267f7 Binary files /dev/null and b/brickwright/alt/alt-064/hero-1024.avif differ diff --git a/brickwright/alt/alt-064/model.mpd b/brickwright/alt/alt-064/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..13f483077b3fcf159c295d921d8506bf96e7725d --- /dev/null +++ b/brickwright/alt/alt-064/model.mpd @@ -0,0 +1,61 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 1 120 -16 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 200 -16 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 120 -16 120 1 0 0 0 1 0 0 0 1 3031.dat +1 322 200 -16 100 1 0 0 0 1 0 0 0 1 3020.dat +1 322 200 -16 140 1 0 0 0 1 0 0 0 1 3020.dat +1 322 120 -16 180 1 0 0 0 1 0 0 0 1 3020.dat +1 322 200 -16 180 1 0 0 0 1 0 0 0 1 3020.dat +1 322 160 -16 210 1 0 0 0 1 0 0 0 1 3460.dat +1 322 160 -16 230 1 0 0 0 1 0 0 0 1 3460.dat +1 322 140 -16 250 1 0 0 0 1 0 0 0 1 3666.dat +1 321 220 -16 250 1 0 0 0 1 0 0 0 1 3023b.dat +1 322 140 -16 270 1 0 0 0 1 0 0 0 1 3666.dat +1 321 220 -16 270 1 0 0 0 1 0 0 0 1 3023b.dat +1 1 120 -16 290 1 0 0 0 1 0 0 0 1 3710.dat +1 1 120 -16 310 1 0 0 0 1 0 0 0 1 3710.dat +1 1 200 -16 290 1 0 0 0 1 0 0 0 1 3710.dat +1 1 200 -16 310 1 0 0 0 1 0 0 0 1 3710.dat +1 2 40 -32 20 1 0 0 0 1 0 0 0 1 3001.dat +1 288 40 -32 60 1 0 0 0 1 0 0 0 1 3001.dat +1 27 40 -32 100 1 0 0 0 1 0 0 0 1 3001.dat +1 2 40 -32 140 1 0 0 0 1 0 0 0 1 3001.dat +1 288 40 -32 180 1 0 0 0 1 0 0 0 1 3001.dat +1 27 40 -32 220 1 0 0 0 1 0 0 0 1 3001.dat +1 27 40 -32 260 1 0 0 0 1 0 0 0 1 3001.dat +1 27 20 -32 300 1 0 0 0 1 0 0 0 1 3003.dat +1 27 60 -32 300 1 0 0 0 1 0 0 0 1 3003.dat +1 2 280 -32 20 1 0 0 0 1 0 0 0 1 3001.dat +1 288 280 -32 60 1 0 0 0 1 0 0 0 1 3001.dat +1 27 280 -32 100 1 0 0 0 1 0 0 0 1 3001.dat +1 2 280 -32 140 1 0 0 0 1 0 0 0 1 3001.dat +1 288 280 -32 180 1 0 0 0 1 0 0 0 1 3001.dat +1 27 280 -32 220 1 0 0 0 1 0 0 0 1 3001.dat +1 27 280 -32 260 1 0 0 0 1 0 0 0 1 3001.dat +1 27 260 -32 300 1 0 0 0 1 0 0 0 1 3003.dat +1 27 300 -32 300 1 0 0 0 1 0 0 0 1 3003.dat +1 71 160 -32 180 1 0 0 0 1 0 0 0 1 3034.dat +1 70 100 -40 180 1 0 0 0 1 0 0 0 1 3795.dat +1 70 220 -40 180 1 0 0 0 1 0 0 0 1 3795.dat +1 28 100 -48 180 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 140 -48 180 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 180 -48 180 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 220 -48 180 1 0 0 0 1 0 0 0 1 3068b.dat +1 19 60 -48 180 1 0 0 0 1 0 0 0 1 3022.dat +1 19 260 -48 180 1 0 0 0 1 0 0 0 1 3022.dat +1 10 140 -24 80 1 0 0 0 1 0 0 0 1 3031.dat +1 2 190 -24 240 1 0 0 0 1 0 0 0 1 3021.dat +1 2 130 -24 300 1 0 0 0 1 0 0 0 1 3021.dat +1 2 130 -48 50 1 0 0 0 1 0 0 0 1 4070.dat +1 15 130 -38 36 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 2 150 -48 50 1 0 0 0 1 0 0 0 1 4070.dat +1 15 150 -38 36 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 2 140 -48 70 -1 0 0 0 1 0 0 0 -1 3039.dat +1 2 110 -48 70 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 2 170 -48 70 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 10 190 -48 230 1 0 0 0 1 0 0 0 1 4727.dat +1 5 190 -56 230 1 0 0 0 1 0 0 0 1 33291.dat +1 10 30 -56 70 1 0 0 0 1 0 0 0 1 4727.dat +1 191 30 -64 70 1 0 0 0 1 0 0 0 1 33291.dat +1 10 290 -56 250 1 0 0 0 1 0 0 0 1 4727.dat +1 191 290 -64 250 1 0 0 0 1 0 0 0 1 33291.dat diff --git a/brickwright/alt/alt-064/thumb-512.avif b/brickwright/alt/alt-064/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..8f3bb1fd79c71bb90fafddb482146a490b9681e2 Binary files /dev/null and b/brickwright/alt/alt-064/thumb-512.avif differ diff --git a/brickwright/alt/alt-064/trace.jsonl.gz b/brickwright/alt/alt-064/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..64c4df97327df6aacc4835358f550a5e03771266 --- /dev/null +++ b/brickwright/alt/alt-064/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3a9d4b22280f741a8806c240b71b9625563abe05ebda77d8596c53617875b5a +size 4414 diff --git a/brickwright/alt/alt-064/view-0.avif b/brickwright/alt/alt-064/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..4815d1dd832bd06dc792f9c1d0c392ed6ed07e09 Binary files /dev/null and b/brickwright/alt/alt-064/view-0.avif differ diff --git a/brickwright/alt/alt-064/view-1.avif b/brickwright/alt/alt-064/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..e8be253f943c84e9a415371b4751c36088544da1 Binary files /dev/null and b/brickwright/alt/alt-064/view-1.avif differ diff --git a/brickwright/alt/alt-064/view-2.avif b/brickwright/alt/alt-064/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..9d55daf5fff31a1d59b746ad1e12e360b9834c7b Binary files /dev/null and b/brickwright/alt/alt-064/view-2.avif differ diff --git a/brickwright/alt/alt-064/view-3.avif b/brickwright/alt/alt-064/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..8f90e6a2d97a2178933616f485d5395074189937 Binary files /dev/null and b/brickwright/alt/alt-064/view-3.avif differ diff --git a/brickwright/alt/alt-064/view-4.avif b/brickwright/alt/alt-064/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..0c5a5df369d426ef31c91aa6f9dfa1372e0b406e Binary files /dev/null and b/brickwright/alt/alt-064/view-4.avif differ diff --git a/brickwright/alt/alt-064/view-5.avif b/brickwright/alt/alt-064/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..43377801ac12ec49c24698a2cd3cf552c214e26e Binary files /dev/null and b/brickwright/alt/alt-064/view-5.avif differ diff --git a/brickwright/alt/alt-064/view-6.avif b/brickwright/alt/alt-064/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..355c1a55faa7e1fe3e0816b38d84876928a7a343 Binary files /dev/null and b/brickwright/alt/alt-064/view-6.avif differ diff --git a/brickwright/alt/alt-064/view-7.avif b/brickwright/alt/alt-064/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..cdc3e1a4b1dbb6793233664e7867cf165f68c39c Binary files /dev/null and b/brickwright/alt/alt-064/view-7.avif differ diff --git a/brickwright/alt/alt-065/build.py b/brickwright/alt/alt-065/build.py new file mode 100644 index 0000000000000000000000000000000000000000..072dacb5fce5728b3fc6b2cbf8291089f42f8b14 --- /dev/null +++ b/brickwright/alt/alt-065/build.py @@ -0,0 +1,118 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + C = bl.Color + def put(pid, color, x,y,z, name=None, rot=bl.Rotation.DEG_0): + return b.add(bl.Element(pid,color),(x,y,z),rotation=rot,name=name) + put('91405',C.BRIGHT_GREEN,0,0,0,'meadow') + # An irregular azure pond, with shallow blue margins and stone banks. + for x,y in [(5,6),(7,8),(5,10),(7,4)]: + put('3020',C.MEDIUM_AZURE,x,y,1/3) + for x,y in [(5,8),(9,6),(5,5),(9,10)]: + put('3023b',C.DARK_AZURE,x,y,1/3) + put('3460',C.MEDIUM_AZURE,4,7,2/3,'water_ripple_a') + put('3666',C.MEDIUM_AZURE,5,9,2/3,'water_ripple_b') + for x,y in [(3,4),(13,8)]: + put('14769',C.DARK_BLUISH_GRAY,x,y,1/3) + for x,y in [(3,7),(11,7)]: + put('2431',C.LIGHT_BLUISH_GRAY,x,y,1/3,rot=bl.Rotation.DEG_90) + for x,y in [(6,2),(7,13),(2,11),(12,3)]: + put('3068b',C.DARK_TAN,x,y,1/3) + # Sculpted snowdrifts are confined to the winter corner. + for x,y in [(10,11),(13,11),(10,13),(13,13)]: + put('6215',C.WHITE,x,y,1/3) + for x,y in [(10,15),(12,15),(14,15)]: + put('3004',C.WHITE,x,y,1/3) + for x,y in [(10,15),(12,15),(14,15)]: + put('3069b',C.WHITE,x,y,4/3) + for x,y in [(9,11),(9,13)]: + put('3040b',C.WHITE,x,y,1/3,rot=bl.Rotation.DEG_180) + + # Spring and summer: spreading brown boughs support lobed crowns. + def leafy_tree(label,x,y,main,accent,slope_color,flower_color): + put('3002',C.REDDISH_BROWN,x+1,y+1,1/3,label+'_root') + for h in range(1,4): + put('3003',C.MEDIUM_NOUGAT,x+2,y+1,h+1/3,label+'_trunk_'+str(h)) + put('3010',C.REDDISH_BROWN,x+1,y+1,13/3,label+'_bough') + # Two projecting clusters on alternating sides of the trunk. + put('3001',main,x,y,16/3,label+'_crown_front') + put('3001',main,x+2,y+2,16/3,label+'_crown_back') + put('3003',accent,x,y+2,16/3) + put('3003',accent,x+4,y,16/3) + put('3003',main if label=='spring' else C.GREEN,x+2,y+1,19/3,label+'_crown_top') + put('3710',C.MAGENTA if label=='spring' else C.TAN,x,y+3,19/3) + put('3039',slope_color,x,y,19/3) + put('3039',slope_color,x+4,y+2,19/3,rot=bl.Rotation.DEG_180) + put('3003',accent,x+2,y+1,22/3) + for dx,dy,z in [(0,1,22/3),(5,2,22/3),(2,1,25/3)]: + put('33291',flower_color,x+dx,y+dy,z,label+'_flower_'+str(dx)) + leafy_tree('spring',0,0,C.BRIGHT_PINK,C.DARK_PINK,C.MAGENTA,C.DARK_PINK) + leafy_tree('summer',0,12,C.DARK_GREEN,C.GREEN,C.LIME,C.BRIGHT_GREEN) + + # Autumn's narrow, textured trunk and orange/gold crown. + x,y=10,0 + put('3002',C.REDDISH_BROWN,x+1,y+1,1/3,'autumn_root') + for h in range(1,5): + put('30136',C.DARK_ORANGE,x+2,y+1,h+1/3,'autumn_trunk_'+str(h)) + put('3010',C.REDDISH_BROWN,x+1,y+1,16/3,'autumn_bough') + put('3001',C.BRIGHT_LIGHT_ORANGE,x,y,19/3,'autumn_crown_front') + put('3001',C.BRIGHT_LIGHT_ORANGE,x+2,y+2,19/3,'autumn_crown_back') + put('3003',C.ORANGE,x,y+2,19/3) + put('3003',C.ORANGE,x+4,y,19/3) + put('3003',C.ORANGE,x+2,y+1,22/3,'autumn_crown_top') + put('3710',C.ORANGE,x,y+3,22/3) + put('3039',C.BRIGHT_LIGHT_ORANGE,x,y,22/3) + put('3039',C.BRIGHT_LIGHT_ORANGE,x+4,y+2,22/3,rot=bl.Rotation.DEG_180) + put('3003',C.ORANGE,x+2,y+1,25/3) + for dx,dy,z in [(0,1,25/3),(5,2,25/3),(2,1,28/3)]: + put('33291',C.BRIGHT_LIGHT_ORANGE,x+dx,y+dy,z) + + # Winter: exposed asymmetric branch structure, no foliage. + put('3002',C.REDDISH_BROWN,11,12,4/3,'winter_root') + for h in range(4): + put('30136',C.DARK_ORANGE,12,12,7/3+h,'winter_trunk_'+str(h)) + put('3009',C.DARK_ORANGE,9,12,13/3,'winter_lower_branch') + # The lower branch intersects the trunk layer, so it replaces that layer. + b.remove('winter_trunk_2') + put('3009',C.DARK_ORANGE,11,12,19/3,'winter_upper_branch') + for x,y,z in [(9,12,16/3),(14,12,16/3),(11,12,22/3),(16,12,22/3),(12,12,22/3),(12,12,25/3)]: + put('3005',C.MEDIUM_NOUGAT,x,y,z) + for x,z in [(9,19/3),(16,25/3)]: + put('3062b',C.REDDISH_BROWN,x,12,z) + # Fallen petals and leaves, and a few low summer plants. + for x,y in [(1,5),(4,2),(2,6)]: + put('3005',C.BRIGHT_PINK,x,y,1/3) + for x,y in [(12,5),(14,5)]: + put('3023b',C.ORANGE,x,y,1/3) + for x,y in [(0,8),(0,11),(6,14)]: + put('4727',C.BRIGHT_GREEN,x,y,1/3) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + allowed=json.load(open('/inputs/parts.json')) + counts=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):v for k,v in counts.items() if v>allowed.get(k[0],{}).get(k[1],0)} + tests.check('Inventory limits',not excess,str(excess)) + tests.check('Four distinct trees',all(k+'_root' in b.names for k in ['spring','summer','autumn','winter'])) + tests.check('Azure pond',sum(v for (pid,c),v in counts.items() if pid=='3020' and c=='MEDIUM_AZURE')==4) + tests.check('Snow beneath winter tree',b.named('winter_root').bounding_box[0].z>=4/3-1e-6 and counts[('6215','WHITE')]==4) + tests.check('Bare winter branches',all('winter_'+k+'_branch' in b.names for k in ['lower','upper'])) + tests.check('Seasonal canopy colors', + b.named('spring_crown_front').content.color == bl.Color.BRIGHT_PINK + and b.named('summer_crown_front').content.color == bl.Color.DARK_GREEN + and b.named('autumn_crown_top').content.color == bl.Color.ORANGE) + centers = [b.named(k+'_root').center for k in ['spring','summer','autumn','winter']] + tests.check('Trees surround the pond', + {(p.x < 8, p.y < 8) for p in centers} == {(True,True),(True,False),(False,True),(False,False)}) + return tests.report() diff --git a/brickwright/alt/alt-065/hero-1024.avif b/brickwright/alt/alt-065/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..d3c6d6a109eed1a9508971729343d3e929b696af Binary files /dev/null and b/brickwright/alt/alt-065/hero-1024.avif differ diff --git a/brickwright/alt/alt-065/model.mpd b/brickwright/alt/alt-065/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..6a87c2e4920ead82108e99a047d3b178e7d08773 --- /dev/null +++ b/brickwright/alt/alt-065/model.mpd @@ -0,0 +1,105 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 322 140 -16 140 1 0 0 0 1 0 0 0 1 3020.dat +1 322 180 -16 180 1 0 0 0 1 0 0 0 1 3020.dat +1 322 140 -16 220 1 0 0 0 1 0 0 0 1 3020.dat +1 322 180 -16 100 1 0 0 0 1 0 0 0 1 3020.dat +1 321 120 -16 170 1 0 0 0 1 0 0 0 1 3023b.dat +1 321 200 -16 130 1 0 0 0 1 0 0 0 1 3023b.dat +1 321 120 -16 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 321 200 -16 210 1 0 0 0 1 0 0 0 1 3023b.dat +1 322 160 -24 150 1 0 0 0 1 0 0 0 1 3460.dat +1 322 160 -24 190 1 0 0 0 1 0 0 0 1 3666.dat +1 72 80 -16 100 1 0 0 0 1 0 0 0 1 14769.dat +1 72 280 -16 180 1 0 0 0 1 0 0 0 1 14769.dat +1 71 70 -16 180 0 0 -1 0 1 0 1 0 0 2431.dat +1 71 230 -16 180 0 0 -1 0 1 0 1 0 0 2431.dat +1 28 140 -16 60 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 160 -16 280 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 60 -16 240 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 260 -16 80 1 0 0 0 1 0 0 0 1 3068b.dat +1 15 220 -32 240 1 0 0 0 1 0 0 0 1 6215.dat +1 15 280 -32 240 1 0 0 0 1 0 0 0 1 6215.dat +1 15 220 -32 280 1 0 0 0 1 0 0 0 1 6215.dat +1 15 280 -32 280 1 0 0 0 1 0 0 0 1 6215.dat +1 15 220 -32 310 1 0 0 0 1 0 0 0 1 3004.dat +1 15 260 -32 310 1 0 0 0 1 0 0 0 1 3004.dat +1 15 300 -32 310 1 0 0 0 1 0 0 0 1 3004.dat +1 15 220 -40 310 1 0 0 0 1 0 0 0 1 3069b.dat +1 15 260 -40 310 1 0 0 0 1 0 0 0 1 3069b.dat +1 15 300 -40 310 1 0 0 0 1 0 0 0 1 3069b.dat +1 15 190 -32 230 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 15 190 -32 270 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 70 50 -32 40 1 0 0 0 1 0 0 0 1 3002.dat +1 84 60 -56 40 1 0 0 0 1 0 0 0 1 3003.dat +1 84 60 -80 40 1 0 0 0 1 0 0 0 1 3003.dat +1 84 60 -104 40 1 0 0 0 1 0 0 0 1 3003.dat +1 70 60 -128 30 1 0 0 0 1 0 0 0 1 3010.dat +1 29 40 -152 20 1 0 0 0 1 0 0 0 1 3001.dat +1 29 80 -152 60 1 0 0 0 1 0 0 0 1 3001.dat +1 5 20 -152 60 1 0 0 0 1 0 0 0 1 3003.dat +1 5 100 -152 20 1 0 0 0 1 0 0 0 1 3003.dat +1 29 60 -176 40 1 0 0 0 1 0 0 0 1 3003.dat +1 26 40 -160 70 1 0 0 0 1 0 0 0 1 3710.dat +1 26 20 -176 30 1 0 0 0 1 0 0 0 1 3039.dat +1 26 100 -176 50 -1 0 0 0 1 0 0 0 -1 3039.dat +1 5 60 -200 40 1 0 0 0 1 0 0 0 1 3003.dat +1 5 10 -184 30 1 0 0 0 1 0 0 0 1 33291.dat +1 5 110 -184 50 1 0 0 0 1 0 0 0 1 33291.dat +1 5 50 -208 30 1 0 0 0 1 0 0 0 1 33291.dat +1 70 50 -32 280 1 0 0 0 1 0 0 0 1 3002.dat +1 84 60 -56 280 1 0 0 0 1 0 0 0 1 3003.dat +1 84 60 -80 280 1 0 0 0 1 0 0 0 1 3003.dat +1 84 60 -104 280 1 0 0 0 1 0 0 0 1 3003.dat +1 70 60 -128 270 1 0 0 0 1 0 0 0 1 3010.dat +1 288 40 -152 260 1 0 0 0 1 0 0 0 1 3001.dat +1 288 80 -152 300 1 0 0 0 1 0 0 0 1 3001.dat +1 2 20 -152 300 1 0 0 0 1 0 0 0 1 3003.dat +1 2 100 -152 260 1 0 0 0 1 0 0 0 1 3003.dat +1 2 60 -176 280 1 0 0 0 1 0 0 0 1 3003.dat +1 19 40 -160 310 1 0 0 0 1 0 0 0 1 3710.dat +1 27 20 -176 270 1 0 0 0 1 0 0 0 1 3039.dat +1 27 100 -176 290 -1 0 0 0 1 0 0 0 -1 3039.dat +1 2 60 -200 280 1 0 0 0 1 0 0 0 1 3003.dat +1 10 10 -184 270 1 0 0 0 1 0 0 0 1 33291.dat +1 10 110 -184 290 1 0 0 0 1 0 0 0 1 33291.dat +1 10 50 -208 270 1 0 0 0 1 0 0 0 1 33291.dat +1 70 250 -32 40 1 0 0 0 1 0 0 0 1 3002.dat +1 484 260 -56 30 1 0 0 0 1 0 0 0 1 30136.dat +1 484 260 -80 30 1 0 0 0 1 0 0 0 1 30136.dat +1 484 260 -104 30 1 0 0 0 1 0 0 0 1 30136.dat +1 484 260 -128 30 1 0 0 0 1 0 0 0 1 30136.dat +1 70 260 -152 30 1 0 0 0 1 0 0 0 1 3010.dat +1 191 240 -176 20 1 0 0 0 1 0 0 0 1 3001.dat +1 191 280 -176 60 1 0 0 0 1 0 0 0 1 3001.dat +1 25 220 -176 60 1 0 0 0 1 0 0 0 1 3003.dat +1 25 300 -176 20 1 0 0 0 1 0 0 0 1 3003.dat +1 25 260 -200 40 1 0 0 0 1 0 0 0 1 3003.dat +1 25 240 -184 70 1 0 0 0 1 0 0 0 1 3710.dat +1 191 220 -200 30 1 0 0 0 1 0 0 0 1 3039.dat +1 191 300 -200 50 -1 0 0 0 1 0 0 0 -1 3039.dat +1 25 260 -224 40 1 0 0 0 1 0 0 0 1 3003.dat +1 191 210 -208 30 1 0 0 0 1 0 0 0 1 33291.dat +1 191 310 -208 50 1 0 0 0 1 0 0 0 1 33291.dat +1 191 250 -232 30 1 0 0 0 1 0 0 0 1 33291.dat +1 70 250 -56 260 1 0 0 0 1 0 0 0 1 3002.dat +1 484 260 -80 250 1 0 0 0 1 0 0 0 1 30136.dat +1 484 260 -104 250 1 0 0 0 1 0 0 0 1 30136.dat +1 484 260 -152 250 1 0 0 0 1 0 0 0 1 30136.dat +1 484 240 -128 250 1 0 0 0 1 0 0 0 1 3009.dat +1 484 280 -176 250 1 0 0 0 1 0 0 0 1 3009.dat +1 84 190 -152 250 1 0 0 0 1 0 0 0 1 3005.dat +1 84 290 -152 250 1 0 0 0 1 0 0 0 1 3005.dat +1 84 230 -200 250 1 0 0 0 1 0 0 0 1 3005.dat +1 84 330 -200 250 1 0 0 0 1 0 0 0 1 3005.dat +1 84 250 -200 250 1 0 0 0 1 0 0 0 1 3005.dat +1 84 250 -224 250 1 0 0 0 1 0 0 0 1 3005.dat +1 70 190 -176 250 1 0 0 0 1 0 0 0 1 3062b.dat +1 70 330 -224 250 1 0 0 0 1 0 0 0 1 3062b.dat +1 29 30 -32 110 1 0 0 0 1 0 0 0 1 3005.dat +1 29 90 -32 50 1 0 0 0 1 0 0 0 1 3005.dat +1 29 50 -32 130 1 0 0 0 1 0 0 0 1 3005.dat +1 25 260 -16 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 25 300 -16 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 10 10 -32 170 1 0 0 0 1 0 0 0 1 4727.dat +1 10 10 -32 230 1 0 0 0 1 0 0 0 1 4727.dat +1 10 130 -32 290 1 0 0 0 1 0 0 0 1 4727.dat diff --git a/brickwright/alt/alt-065/thumb-512.avif b/brickwright/alt/alt-065/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..47f1c19c2304ed3438a7f71271ead834e391916a Binary files /dev/null and b/brickwright/alt/alt-065/thumb-512.avif differ diff --git a/brickwright/alt/alt-065/trace.jsonl.gz b/brickwright/alt/alt-065/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..09c7adc2e6e70cd3c3ec91e11f9fcc77736a906d --- /dev/null +++ b/brickwright/alt/alt-065/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86be5b6e6c461df0434891630a126b8d1b18cdb507acc42b304bee730a9d6c4f +size 6322 diff --git a/brickwright/alt/alt-065/view-0.avif b/brickwright/alt/alt-065/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..2e81017def51305efed11a40aaa02162c75ca9ea Binary files /dev/null and b/brickwright/alt/alt-065/view-0.avif differ diff --git a/brickwright/alt/alt-065/view-1.avif b/brickwright/alt/alt-065/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..5f4ff98d7d124abf7ec97740e3bedf051ed10c74 Binary files /dev/null and b/brickwright/alt/alt-065/view-1.avif differ diff --git a/brickwright/alt/alt-065/view-2.avif b/brickwright/alt/alt-065/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..f788ca0a32da43bfcebee552c24a5b6907d05e31 Binary files /dev/null and b/brickwright/alt/alt-065/view-2.avif differ diff --git a/brickwright/alt/alt-065/view-3.avif b/brickwright/alt/alt-065/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..c0cf6331593c1e4d65807729fbc98731fcd5564f Binary files /dev/null and b/brickwright/alt/alt-065/view-3.avif differ diff --git a/brickwright/alt/alt-065/view-4.avif b/brickwright/alt/alt-065/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..630fcea4aee4a495cff1b796158724ffa2a27db6 Binary files /dev/null and b/brickwright/alt/alt-065/view-4.avif differ diff --git a/brickwright/alt/alt-065/view-5.avif b/brickwright/alt/alt-065/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..c2d2e7d25498ff1b9086ba1f25ea416076b2688f Binary files /dev/null and b/brickwright/alt/alt-065/view-5.avif differ diff --git a/brickwright/alt/alt-065/view-6.avif b/brickwright/alt/alt-065/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..6c195c1edd0934ea10ca09adcccbe236093598b9 Binary files /dev/null and b/brickwright/alt/alt-065/view-6.avif differ diff --git a/brickwright/alt/alt-065/view-7.avif b/brickwright/alt/alt-065/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..df1b283d4cf3f051ce2882b6d05d0e91dacd26ca Binary files /dev/null and b/brickwright/alt/alt-065/view-7.avif differ diff --git a/brickwright/alt/alt-066/build.py b/brickwright/alt/alt-066/build.py new file mode 100644 index 0000000000000000000000000000000000000000..d8325bb25b17d4aec9464e548920df82a5e808e4 --- /dev/null +++ b/brickwright/alt/alt-066/build.py @@ -0,0 +1,82 @@ +import json +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def add(pid, color, x,y,z, rot=0, name=None): + return b.add(bl.Element(pid,getattr(bl.Color,color)),(x,y,z),rotation=bl.Rotation(rot),name=name) + add('91405','BRIGHT_GREEN',0,0,0,name='riverbank_base') + # The pool broadens above the dam, while its outlet is only four studs wide. + for x in (4,8): + add('3031','BLUE',x,12,1/3,name='pool_'+str(x)) + add('3020','MEDIUM_AZURE',x,10,1/3) + add('3031','BLUE',6,0,1/3,name='outlet') + for y in (4,6): add('3020','MEDIUM_AZURE',6,y,1/3) + for y in range(0,16,2): + add('3001','DARK_GREEN' if y>=8 else 'GREEN',0,y,1/3) + for y in (0,2,4,6): add('3001','DARK_TAN',12,y,1/3) + for y in (8,10,12,14): add('3004','DARK_GREEN',14,y,1/3,1) + # Sandy margins to the narrow channel. + for y in (0,4): add('3020','TAN',4,y,1/3,1) + for y in (0,2): add('3022','TAN',10,y,1/3) + for y in (4,5,6,7): add('3023b','TAN',10,y,1/3) + # Low bank vegetation and flat stones. + for x,y in ((0,1),(2,14),(14,13)): + add('4727','BRIGHT_GREEN',x,y,4/3 if x<4 else 4/3) + for x,y in ((12,0),(14,2),(12,3),(2,11)): + add('3068b','DARK_TAN',x,y,4/3) + # Interlocked timber barrier spanning bank to bank. + for x in (4,6,8,10): add('3003','MEDIUM_NOUGAT',x,8,1/3) + for x in range(2,14,2): add('30136','DARK_ORANGE',x,8,4/3) + for x in (2,8): add('3009','DARK_ORANGE',x,9,4/3) + for x in (2,6,10): add('3010','REDDISH_BROWN',x,8,7/3) + add('3010','REDDISH_BROWN',5,9,7/3) + for x in (3,10): add('30136','DARK_ORANGE',x,9,7/3) + add('3795','REDDISH_BROWN',5,8,10/3,name='dam_cross_binder') + # A seated beaver: broad flat tail, heavy haunches, a lighter face and incisors. + add('3795','REDDISH_BROWN',0,7,4/3,1,name='beaver_tail') + for z in (4/3,7/3): + for x in (0,2): add('3002','REDDISH_BROWN',x,4,z,1) + head=add('30414','TAN',0,4,10/3,name='beaver_muzzle') + for x in (0,2): add('3004','MEDIUM_NOUGAT',x,5,10/3) + for x in (0,3): + eye=add('47905','BLACK',x,4,13/3,name='eye_mount_'+str(x)) + tile=bl.Element('98138p07',bl.Color.WHITE) + b.connect(tile,tile.find_connector('antistud'),to=eye.find_connector('stud',facing=bl.Direction.FRONT),name='eye_'+str(x)) + add('6141','REDDISH_BROWN',x,4,16/3,name='ear_'+str(x)) + add('3004','BLACK',1,4,13/3,name='beaver_nose') + for x in (0,3): add('3040b','REDDISH_BROWN',x,6,10/3,2) + add('3004','MEDIUM_NOUGAT',1,5,13/3) + for x in (1.5,2.5): + tooth=bl.Element('3069b',bl.Color.WHITE) + b.connect(tooth,tooth.find_connector('antistud',toward=bl.Direction.RIGHT),to=head.find_connector('stud',facing=bl.Direction.FRONT,toward=(x,3,4)),mounting=bl.Mounting(angle=270),name='incisor_'+str(x)) + # Jagged, pale freshly gnawed timber on the opposite bank. + for z in (4/3,7/3): add('3003','MEDIUM_NOUGAT',12,5,z) + add('3040b','MEDIUM_NOUGAT',12,5,10/3) + add('3004','MEDIUM_NOUGAT',13,5,10/3,1) + add('3040b','TAN',13,5,13/3,name='stump_point') + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + stock=json.load(open('/inputs/parts.json')) + excess=[] + for e,n in b.list_elements().items(): + available=stock.get(e.ldraw_id,{}).get(e.color.name,0) + if n>available: excess.append((e.ldraw_id,e.color.name,n,available)) + tests.check('Uses only supplied inventory',not excess,str(excess)) + pool_width=b.named('pool_8').bounding_box[1].x-b.named('pool_4').bounding_box[0].x + outlet_width=b.named('outlet').width + tests.check('Upstream pool is twice outlet width',pool_width==2*outlet_width,f'Pool {pool_width} studs wide; downstream {outlet_width}') + tests.check('Beaver has tail, eyes, paired teeth and ears',all(n in b.names for n in ['beaver_tail','eye_0','eye_3','incisor_1.5','incisor_2.5','ear_0','ear_3'])) + tip=b.named('stump_point') + tests.check('Pointed stump stands on bank',tip.content.ldraw_id=='3040b' and tip.bounding_box[0].x>=12 and tip.bounding_box[0].z>4) + tests.check('Dam spans the channel',b.named('dam_cross_binder').bounding_box[0].x<6 and b.named('dam_cross_binder').bounding_box[1].x>10) + return tests.report() diff --git a/brickwright/alt/alt-066/hero-1024.avif b/brickwright/alt/alt-066/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..87f2d43de4c95ac397184d2bb16dfc22b38c0e46 Binary files /dev/null and b/brickwright/alt/alt-066/hero-1024.avif differ diff --git a/brickwright/alt/alt-066/model.mpd b/brickwright/alt/alt-066/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..fe85a11bacf0bb5697e4b494a3393d61e9dbea67 --- /dev/null +++ b/brickwright/alt/alt-066/model.mpd @@ -0,0 +1,83 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 1 120 -16 280 1 0 0 0 1 0 0 0 1 3031.dat +1 322 120 -16 220 1 0 0 0 1 0 0 0 1 3020.dat +1 1 200 -16 280 1 0 0 0 1 0 0 0 1 3031.dat +1 322 200 -16 220 1 0 0 0 1 0 0 0 1 3020.dat +1 1 160 -16 40 1 0 0 0 1 0 0 0 1 3031.dat +1 322 160 -16 100 1 0 0 0 1 0 0 0 1 3020.dat +1 322 160 -16 140 1 0 0 0 1 0 0 0 1 3020.dat +1 2 40 -32 20 1 0 0 0 1 0 0 0 1 3001.dat +1 2 40 -32 60 1 0 0 0 1 0 0 0 1 3001.dat +1 2 40 -32 100 1 0 0 0 1 0 0 0 1 3001.dat +1 2 40 -32 140 1 0 0 0 1 0 0 0 1 3001.dat +1 288 40 -32 180 1 0 0 0 1 0 0 0 1 3001.dat +1 288 40 -32 220 1 0 0 0 1 0 0 0 1 3001.dat +1 288 40 -32 260 1 0 0 0 1 0 0 0 1 3001.dat +1 288 40 -32 300 1 0 0 0 1 0 0 0 1 3001.dat +1 28 280 -32 20 1 0 0 0 1 0 0 0 1 3001.dat +1 28 280 -32 60 1 0 0 0 1 0 0 0 1 3001.dat +1 28 280 -32 100 1 0 0 0 1 0 0 0 1 3001.dat +1 28 280 -32 140 1 0 0 0 1 0 0 0 1 3001.dat +1 288 290 -32 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 290 -32 220 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 290 -32 260 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 290 -32 300 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 100 -16 40 0 0 -1 0 1 0 1 0 0 3020.dat +1 19 100 -16 120 0 0 -1 0 1 0 1 0 0 3020.dat +1 19 220 -16 20 1 0 0 0 1 0 0 0 1 3022.dat +1 19 220 -16 60 1 0 0 0 1 0 0 0 1 3022.dat +1 19 220 -16 90 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 220 -16 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 220 -16 130 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 220 -16 150 1 0 0 0 1 0 0 0 1 3023b.dat +1 10 10 -56 30 1 0 0 0 1 0 0 0 1 4727.dat +1 10 50 -56 290 1 0 0 0 1 0 0 0 1 4727.dat +1 10 290 -56 270 1 0 0 0 1 0 0 0 1 4727.dat +1 28 260 -40 20 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 300 -40 60 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 260 -40 80 1 0 0 0 1 0 0 0 1 3068b.dat +1 28 60 -40 240 1 0 0 0 1 0 0 0 1 3068b.dat +1 84 100 -32 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 140 -32 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 180 -32 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 220 -32 180 1 0 0 0 1 0 0 0 1 3003.dat +1 484 60 -56 170 1 0 0 0 1 0 0 0 1 30136.dat +1 484 100 -56 170 1 0 0 0 1 0 0 0 1 30136.dat +1 484 140 -56 170 1 0 0 0 1 0 0 0 1 30136.dat +1 484 180 -56 170 1 0 0 0 1 0 0 0 1 30136.dat +1 484 220 -56 170 1 0 0 0 1 0 0 0 1 30136.dat +1 484 260 -56 170 1 0 0 0 1 0 0 0 1 30136.dat +1 484 100 -56 190 1 0 0 0 1 0 0 0 1 3009.dat +1 484 220 -56 190 1 0 0 0 1 0 0 0 1 3009.dat +1 70 80 -80 170 1 0 0 0 1 0 0 0 1 3010.dat +1 70 160 -80 170 1 0 0 0 1 0 0 0 1 3010.dat +1 70 240 -80 170 1 0 0 0 1 0 0 0 1 3010.dat +1 70 140 -80 190 1 0 0 0 1 0 0 0 1 3010.dat +1 484 80 -80 190 1 0 0 0 1 0 0 0 1 30136.dat +1 484 220 -80 190 1 0 0 0 1 0 0 0 1 30136.dat +1 70 160 -88 180 1 0 0 0 1 0 0 0 1 3795.dat +1 70 20 -40 200 0 0 -1 0 1 0 1 0 0 3795.dat +1 70 20 -56 110 0 0 -1 0 1 0 1 0 0 3002.dat +1 70 60 -56 110 0 0 -1 0 1 0 1 0 0 3002.dat +1 70 20 -80 110 0 0 -1 0 1 0 1 0 0 3002.dat +1 70 60 -80 110 0 0 -1 0 1 0 1 0 0 3002.dat +1 19 40 -104 90 1 0 0 0 1 0 0 0 1 30414.dat +1 84 20 -104 110 1 0 0 0 1 0 0 0 1 3004.dat +1 84 60 -104 110 1 0 0 0 1 0 0 0 1 3004.dat +1 0 10 -128 90 1 0 0 0 1 0 0 0 1 47905.dat +1 15 10 -118 72 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 70 10 -136 90 1 0 0 0 1 0 0 0 1 6141.dat +1 0 70 -128 90 1 0 0 0 1 0 0 0 1 47905.dat +1 15 70 -118 72 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 70 70 -136 90 1 0 0 0 1 0 0 0 1 6141.dat +1 0 40 -128 90 1 0 0 0 1 0 0 0 1 3004.dat +1 70 10 -104 130 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 70 70 -104 130 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 84 40 -128 110 1 0 0 0 1 0 0 0 1 3004.dat +1 15 30 -84 72 0 0 1 1 0 0 0 1 0 3069b.dat +1 15 50 -84 72 0 0 1 1 0 0 0 1 0 3069b.dat +1 84 260 -56 120 1 0 0 0 1 0 0 0 1 3003.dat +1 84 260 -80 120 1 0 0 0 1 0 0 0 1 3003.dat +1 84 250 -104 130 1 0 0 0 1 0 0 0 1 3040b.dat +1 84 270 -104 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 270 -128 130 1 0 0 0 1 0 0 0 1 3040b.dat diff --git a/brickwright/alt/alt-066/thumb-512.avif b/brickwright/alt/alt-066/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..7a567d915b8f7f62f85d317782f2e426c0484b47 Binary files /dev/null and b/brickwright/alt/alt-066/thumb-512.avif differ diff --git a/brickwright/alt/alt-066/trace.jsonl.gz b/brickwright/alt/alt-066/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..772158d2f74970011b75cf753d2f24b21ebeca4e --- /dev/null +++ b/brickwright/alt/alt-066/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efcce45880973944bd9095ca992a3b50ece4682048dd5cb4fb9131ce39b10103 +size 6091 diff --git a/brickwright/alt/alt-066/view-0.avif b/brickwright/alt/alt-066/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..738a41da1a3494392f8453956763eec5f51e8e48 Binary files /dev/null and b/brickwright/alt/alt-066/view-0.avif differ diff --git a/brickwright/alt/alt-066/view-1.avif b/brickwright/alt/alt-066/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..9a55b5cc4f6470cd1b26620380b7d22ebe25276b Binary files /dev/null and b/brickwright/alt/alt-066/view-1.avif differ diff --git a/brickwright/alt/alt-066/view-2.avif b/brickwright/alt/alt-066/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..094b2364c135da4d6a47b270d1d3a7ed60f4e15a Binary files /dev/null and b/brickwright/alt/alt-066/view-2.avif differ diff --git a/brickwright/alt/alt-066/view-3.avif b/brickwright/alt/alt-066/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..1a73ec2db866fc27b8ff4219fd3bbba0de0c9d57 Binary files /dev/null and b/brickwright/alt/alt-066/view-3.avif differ diff --git a/brickwright/alt/alt-066/view-4.avif b/brickwright/alt/alt-066/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..3a8e2e0c392bb4464ec77f036b7e49c10388af6d Binary files /dev/null and b/brickwright/alt/alt-066/view-4.avif differ diff --git a/brickwright/alt/alt-066/view-5.avif b/brickwright/alt/alt-066/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..cfcf7c868f525057ce0397dc6d3bc5f0adc46a60 Binary files /dev/null and b/brickwright/alt/alt-066/view-5.avif differ diff --git a/brickwright/alt/alt-066/view-6.avif b/brickwright/alt/alt-066/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..9e762c0682fad6baa80e8a389af22fcb3a6093c0 Binary files /dev/null and b/brickwright/alt/alt-066/view-6.avif differ diff --git a/brickwright/alt/alt-066/view-7.avif b/brickwright/alt/alt-066/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..e0190f9430f44a5bf2f023dbb0f848090edfd11d Binary files /dev/null and b/brickwright/alt/alt-066/view-7.avif differ diff --git a/brickwright/alt/alt-067/build.py b/brickwright/alt/alt-067/build.py new file mode 100644 index 0000000000000000000000000000000000000000..8b00d01cfc53b0c1d3a208be46dba38320f4df93 --- /dev/null +++ b/brickwright/alt/alt-067/build.py @@ -0,0 +1,98 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + def add(pid,c,x,y,z,r=bl.Rotation.DEG_0,name=None): + return b.add(bl.Element(pid,getattr(bl.Color,c)),(x,y,z),rotation=r,name=name) + add('91405','BRIGHT_GREEN',0,0,0,name='land') + # Blue water winds between the two raised banks. + for y in (0,4,8): add('3031','BLUE',6,y,1/3) + for y in (12,14): add('3020','MEDIUM_AZURE',6,y,1/3) + for x,y in [(5,2),(10,7),(5,12),(10,13)]: add('3023b','DARK_AZURE',x,y,1/3,r=bl.Rotation.DEG_90) + # Stratified, asymmetrical crags; broad feet and narrower summits. + for side,x in enumerate((0,12)): + add('3001','DARK_TAN',x,8,1/3) + add('3001','DARK_TAN',x,10,1/3) + add('3001','LIGHT_BLUISH_GRAY',x,12,1/3) + add('3001','DARK_BLUISH_GRAY',x,9,4/3) + add('3001','LIGHT_BLUISH_GRAY',x,11,4/3) + for dx in (0,2): + add('85080','LIGHT_BLUISH_GRAY',x+dx,7,4/3,r=bl.Rotation.DEG_180 if dx==0 else bl.Rotation.DEG_90) + add('11212','DARK_BLUISH_GRAY',x,9,7/3) + for dx in (0,2): add('3004','LIGHT_BLUISH_GRAY',x+dx,10,8/3) + # Curved white cloud lobes form the seats for the rainbow. + add('6215','WHITE',x-1,9,11/3,r=bl.Rotation.DEG_180) + add('6215','WHITE',x+2,9,11/3) + add('30367c','WHITE',x+(2 if side==0 else 0),10,14/3) + add('3004','WHITE',x,9,14/3) + add('3004','WHITE',x+2,9,14/3) + # A brick-mosaic arch. Staggered full-width bonds cross the stepped + # colour boundaries so the rainbow is one structural assembly. + profiles=[0,1,2,3,3,2,1,0] + colors=['DARK_PURPLE','BLUE','LIME','YELLOW','ORANGE','RED'] + vox={(i,profiles[i]+k):c for i in range(8) for k,c in enumerate(colors)} + used=set() + # Bond the eight coloured stacks across their vertical seams. + # Small boundary pixels blend into the neighbouring stripe. + bonds=[(0,3),(1,5),(2,4),(3,6),(4,4),(5,5),(6,3)] + for i,h in bonds: + if (i,h) in used or (i+1,h) in used: continue + c=colors[max(h-profiles[i],h-profiles[i+1])] + add('3001',c,2*i,9,17/3+h) + used.update(((i,h),(i+1,h))) + # Select remaining 2x2 footprints from the supplied assortment. + stock=json.load(open('/inputs/parts.json')) + counts=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + for (i,h),c in sorted(vox.items(),key=lambda t:(t[0][1],t[0][0])): + if (i,h) in used: continue + x=2*i; z=17/3+h + if counts['3003',c]stock.get(p,{}).get(c,0)] + tests.check('Only supplied parts and quantities',not over,str(over)) + tests.check('Six rainbow colours',all(any(p.content.color==getattr(bl.Color,c) and p.center.z>6 for p in b.flattened_placements) for c in ['RED','ORANGE','YELLOW','LIME','BLUE','DARK_PURPLE'])) + tests.check('Two white clouds',sum(n for (p,c),n in used.items() if p=='6215' and c=='WHITE')==4) + tests.check('Stream and tree',used['3031','BLUE']==3 and used['30136','DARK_ORANGE']==6) + return tests.report() diff --git a/brickwright/alt/alt-067/hero-1024.avif b/brickwright/alt/alt-067/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..2cee1ca51cfe98b8b88b3767f9a7e501b4629c64 Binary files /dev/null and b/brickwright/alt/alt-067/hero-1024.avif differ diff --git a/brickwright/alt/alt-067/model.mpd b/brickwright/alt/alt-067/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..57208f708f2c7cfd9713e29b62d9840c7059e5d4 --- /dev/null +++ b/brickwright/alt/alt-067/model.mpd @@ -0,0 +1,112 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 1 160 -16 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 160 -16 120 1 0 0 0 1 0 0 0 1 3031.dat +1 1 160 -16 200 1 0 0 0 1 0 0 0 1 3031.dat +1 322 160 -16 260 1 0 0 0 1 0 0 0 1 3020.dat +1 322 160 -16 300 1 0 0 0 1 0 0 0 1 3020.dat +1 321 110 -16 60 0 0 -1 0 1 0 1 0 0 3023b.dat +1 321 210 -16 160 0 0 -1 0 1 0 1 0 0 3023b.dat +1 321 110 -16 260 0 0 -1 0 1 0 1 0 0 3023b.dat +1 321 210 -16 280 0 0 -1 0 1 0 1 0 0 3023b.dat +1 28 40 -32 180 1 0 0 0 1 0 0 0 1 3001.dat +1 28 40 -32 220 1 0 0 0 1 0 0 0 1 3001.dat +1 71 40 -32 260 1 0 0 0 1 0 0 0 1 3001.dat +1 72 40 -56 200 1 0 0 0 1 0 0 0 1 3001.dat +1 71 40 -56 240 1 0 0 0 1 0 0 0 1 3001.dat +1 71 30 -56 150 -1 0 0 0 1 0 0 0 -1 85080.dat +1 71 50 -56 150 0 0 -1 0 1 0 1 0 0 85080.dat +1 72 30 -64 210 1 0 0 0 1 0 0 0 1 11212.dat +1 71 20 -88 210 1 0 0 0 1 0 0 0 1 3004.dat +1 71 60 -88 210 1 0 0 0 1 0 0 0 1 3004.dat +1 15 20 -112 200 -1 0 0 0 1 0 0 0 -1 6215.dat +1 15 60 -112 200 1 0 0 0 1 0 0 0 1 6215.dat +1 15 60 -136 220 1 0 0 0 1 0 0 0 1 30367c.dat +1 15 20 -136 190 1 0 0 0 1 0 0 0 1 3004.dat +1 15 60 -136 190 1 0 0 0 1 0 0 0 1 3004.dat +1 28 280 -32 180 1 0 0 0 1 0 0 0 1 3001.dat +1 28 280 -32 220 1 0 0 0 1 0 0 0 1 3001.dat +1 71 280 -32 260 1 0 0 0 1 0 0 0 1 3001.dat +1 72 280 -56 200 1 0 0 0 1 0 0 0 1 3001.dat +1 71 280 -56 240 1 0 0 0 1 0 0 0 1 3001.dat +1 71 270 -56 150 -1 0 0 0 1 0 0 0 -1 85080.dat +1 71 290 -56 150 0 0 -1 0 1 0 1 0 0 85080.dat +1 72 270 -64 210 1 0 0 0 1 0 0 0 1 11212.dat +1 71 260 -88 210 1 0 0 0 1 0 0 0 1 3004.dat +1 71 300 -88 210 1 0 0 0 1 0 0 0 1 3004.dat +1 15 260 -112 200 -1 0 0 0 1 0 0 0 -1 6215.dat +1 15 300 -112 200 1 0 0 0 1 0 0 0 1 6215.dat +1 15 260 -136 220 1 0 0 0 1 0 0 0 1 30367c.dat +1 15 260 -136 190 1 0 0 0 1 0 0 0 1 3004.dat +1 15 300 -136 190 1 0 0 0 1 0 0 0 1 3004.dat +1 14 40 -232 200 1 0 0 0 1 0 0 0 1 3001.dat +1 25 80 -280 200 1 0 0 0 1 0 0 0 1 3001.dat +1 27 120 -256 200 1 0 0 0 1 0 0 0 1 3001.dat +1 14 160 -304 200 1 0 0 0 1 0 0 0 1 3001.dat +1 27 200 -256 200 1 0 0 0 1 0 0 0 1 3001.dat +1 25 240 -280 200 1 0 0 0 1 0 0 0 1 3001.dat +1 14 280 -232 200 1 0 0 0 1 0 0 0 1 3001.dat +1 85 20 -160 200 1 0 0 0 1 0 0 0 1 3003.dat +1 85 300 -160 200 1 0 0 0 1 0 0 0 1 3003.dat +1 1 20 -184 200 1 0 0 0 1 0 0 0 1 3003.dat +1 85 60 -184 200 1 0 0 0 1 0 0 0 1 3003.dat +1 85 260 -184 200 1 0 0 0 1 0 0 0 1 3003.dat +1 1 300 -184 200 1 0 0 0 1 0 0 0 1 3003.dat +1 27 20 -208 200 1 0 0 0 1 0 0 0 1 3003.dat +1 1 60 -208 200 1 0 0 0 1 0 0 0 1 3003.dat +1 85 100 -208 220 0 0 -1 0 1 0 1 0 0 3001.dat +1 85 220 -208 220 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 260 -208 200 1 0 0 0 1 0 0 0 1 3003.dat +1 27 300 -208 200 1 0 0 0 1 0 0 0 1 3003.dat +1 1 100 -232 210 0 0 -1 0 1 0 1 0 0 3002.dat +1 85 140 -232 220 0 0 -1 0 1 0 1 0 0 3001.dat +1 85 180 -232 220 0 0 -1 0 1 0 1 0 0 3001.dat +1 1 220 -232 210 0 0 -1 0 1 0 1 0 0 3002.dat +1 25 20 -256 200 1 0 0 0 1 0 0 0 1 3003.dat +1 14 60 -256 200 1 0 0 0 1 0 0 0 1 3003.dat +1 14 260 -256 200 1 0 0 0 1 0 0 0 1 3003.dat +1 25 300 -256 200 1 0 0 0 1 0 0 0 1 3003.dat +1 4 20 -280 200 1 0 0 0 1 0 0 0 1 3003.dat +1 27 140 -280 200 1 0 0 0 1 0 0 0 1 3003.dat +1 27 180 -280 200 1 0 0 0 1 0 0 0 1 3003.dat +1 4 300 -280 200 1 0 0 0 1 0 0 0 1 3003.dat +1 4 60 -304 200 1 0 0 0 1 0 0 0 1 3003.dat +1 25 100 -304 200 1 0 0 0 1 0 0 0 1 3003.dat +1 25 220 -304 200 1 0 0 0 1 0 0 0 1 3003.dat +1 4 260 -304 200 1 0 0 0 1 0 0 0 1 3003.dat +1 4 100 -328 190 1 0 0 0 1 0 0 0 1 3004.dat +1 4 100 -328 210 1 0 0 0 1 0 0 0 1 3004.dat +1 25 140 -328 190 1 0 0 0 1 0 0 0 1 3004.dat +1 25 140 -328 210 1 0 0 0 1 0 0 0 1 3004.dat +1 25 180 -328 190 1 0 0 0 1 0 0 0 1 3004.dat +1 25 180 -328 210 1 0 0 0 1 0 0 0 1 3004.dat +1 4 220 -328 190 1 0 0 0 1 0 0 0 1 3004.dat +1 4 220 -328 210 1 0 0 0 1 0 0 0 1 3004.dat +1 4 140 -352 190 1 0 0 0 1 0 0 0 1 3004.dat +1 4 140 -352 210 1 0 0 0 1 0 0 0 1 3004.dat +1 4 180 -352 190 1 0 0 0 1 0 0 0 1 3004.dat +1 4 180 -352 210 1 0 0 0 1 0 0 0 1 3004.dat +1 19 260 -16 80 1 0 0 0 1 0 0 0 1 3022.dat +1 484 260 -40 70 1 0 0 0 1 0 0 0 1 30136.dat +1 484 260 -40 90 1 0 0 0 1 0 0 0 1 30136.dat +1 484 260 -64 70 1 0 0 0 1 0 0 0 1 30136.dat +1 484 260 -64 90 1 0 0 0 1 0 0 0 1 30136.dat +1 484 260 -88 70 1 0 0 0 1 0 0 0 1 30136.dat +1 484 260 -88 90 1 0 0 0 1 0 0 0 1 30136.dat +1 70 260 -96 80 1 0 0 0 1 0 0 0 1 3795.dat +1 70 250 -120 80 1 0 0 0 1 0 0 0 1 3002.dat +1 288 220 -144 80 1 0 0 0 1 0 0 0 1 3001.dat +1 288 300 -144 80 1 0 0 0 1 0 0 0 1 3001.dat +1 2 210 -168 80 0 0 1 0 1 0 -1 0 0 3039.dat +1 2 260 -168 80 1 0 0 0 1 0 0 0 1 3001.dat +1 2 310 -168 80 0 0 -1 0 1 0 1 0 0 3039.dat +1 27 260 -192 80 1 0 0 0 1 0 0 0 1 3001.dat +1 27 250 -216 80 0 0 1 0 1 0 -1 0 0 3039.dat +1 27 270 -216 80 0 0 -1 0 1 0 1 0 0 3039.dat +1 10 250 -224 70 1 0 0 0 1 0 0 0 1 33291.dat +1 10 270 -224 90 1 0 0 0 1 0 0 0 1 33291.dat +1 10 70 -32 70 1 0 0 0 1 0 0 0 1 4727.dat +1 5 70 -40 70 1 0 0 0 1 0 0 0 1 33291.dat +1 10 230 -32 30 1 0 0 0 1 0 0 0 1 4727.dat +1 5 230 -40 30 1 0 0 0 1 0 0 0 1 33291.dat +1 10 50 -32 110 1 0 0 0 1 0 0 0 1 4727.dat +1 5 50 -40 110 1 0 0 0 1 0 0 0 1 33291.dat diff --git a/brickwright/alt/alt-067/thumb-512.avif b/brickwright/alt/alt-067/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..a88932e0d614a1646300fd546a7bfcb07204d0b9 Binary files /dev/null and b/brickwright/alt/alt-067/thumb-512.avif differ diff --git a/brickwright/alt/alt-067/trace.jsonl.gz b/brickwright/alt/alt-067/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..bb168b7546103fe20890def539a1c0ab07096c7a --- /dev/null +++ b/brickwright/alt/alt-067/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd819a053561351b2b46337bc65b71c671d91c0169ca15d431d9208fe13c62f8 +size 6944 diff --git a/brickwright/alt/alt-067/view-0.avif b/brickwright/alt/alt-067/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..55ca6fa38a8b21b2c5b14843231e2da22a66425a Binary files /dev/null and b/brickwright/alt/alt-067/view-0.avif differ diff --git a/brickwright/alt/alt-067/view-1.avif b/brickwright/alt/alt-067/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..0869d5f1fcfb9e4e45b7d50832d56d3d29e72d38 Binary files /dev/null and b/brickwright/alt/alt-067/view-1.avif differ diff --git a/brickwright/alt/alt-067/view-2.avif b/brickwright/alt/alt-067/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..7be11ead9ffffbfdf0ad9775a158ad7504b0a13f Binary files /dev/null and b/brickwright/alt/alt-067/view-2.avif differ diff --git a/brickwright/alt/alt-067/view-3.avif b/brickwright/alt/alt-067/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..bfaeb63783cd5c84c5da892cda1ee1f648fd0729 Binary files /dev/null and b/brickwright/alt/alt-067/view-3.avif differ diff --git a/brickwright/alt/alt-067/view-4.avif b/brickwright/alt/alt-067/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..2a58a8908bfc6b2e7fefe12b0f92e63a574756c8 Binary files /dev/null and b/brickwright/alt/alt-067/view-4.avif differ diff --git a/brickwright/alt/alt-067/view-5.avif b/brickwright/alt/alt-067/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..a4c4e881a9b7d93f7258fd397e765d89d5f3c16f Binary files /dev/null and b/brickwright/alt/alt-067/view-5.avif differ diff --git a/brickwright/alt/alt-067/view-6.avif b/brickwright/alt/alt-067/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..f1eb5aa6f7579fcb4defa533f4eef3fc2b796812 Binary files /dev/null and b/brickwright/alt/alt-067/view-6.avif differ diff --git a/brickwright/alt/alt-067/view-7.avif b/brickwright/alt/alt-067/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..5e518d6127507f46d207864830e07ed21a11f9b5 Binary files /dev/null and b/brickwright/alt/alt-067/view-7.avif differ diff --git a/brickwright/alt/alt-068/build.py b/brickwright/alt/alt-068/build.py new file mode 100644 index 0000000000000000000000000000000000000000..9d64e543be6e74995572426ef22841a5edbcd0c8 --- /dev/null +++ b/brickwright/alt/alt-068/build.py @@ -0,0 +1,102 @@ +import json +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid, color, x, y, z, rot=0, name=None): + return b.add(bl.Element(pid, getattr(bl.Color, color)), (x,y,z), bl.Rotation(rot), name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='meadow') + # Three separate upright stems, all fixed to the common meadow plate. + for k in range(8): + if k < 4: + put('3003','GREEN',7,9,1/3+k,name='tall_stem_'+str(k)) + else: + for dy in range(2): + put('3004','DARK_GREEN',7,9+dy,1/3+k,name='tall_stem_%s_%s'%(k,dy)) + for x,h in [(3,4),(11,3)]: + for k in range(h): + if k < 2: + put('3003','LIME',x,3,1/3+k,name='small_stem_%s_%s'%(x,k)) + else: + for dy in range(2): + put('3004','LIME' if k==2 else 'BRIGHT_GREEN',x,3+dy,1/3+k) + # Broad low foliage, pointing out from the three stems. + for j,(x,y,r) in enumerate([(1,7,0),(11,7,0),(4,10,1),(10,10,1)]): + put('3001','GREEN',x,y,1/3,r,name='leaf_base_'+str(j)) + # Paired sloping surfaces give each leaf a pointed, ridged silhouette. + if r==0: + put('3039','GREEN',x,y,4/3,3) + put('3039','LIME',x+2,y,4/3,1) + else: + put('3039','GREEN',x,y,4/3,0) + put('3039','LIME',x,y+2,4/3,2) + # Four narrow upright leaf tips frame the base of the taller stalk. + for x,y,r in [(6,7,0),(9,7,0),(6,12,2),(9,12,2)]: + put('60481a','DARK_GREEN',x,y,1/3,r) + # Small blooms: four petals and contrasting gold hearts. + for x,h,plate,color in [(3,4,'BRIGHT_GREEN','MEDIUM_LAVENDER'),(11,3,'BLUE','BRIGHT_LIGHT_ORANGE')]: + z=1/3+h + put('3031',plate,x-1,2,z,name='small_calyx_'+str(x)) + for dx,dy,r in [(-2,0,3),(2,0,1),(0,-2,0),(0,2,2)]: + put('3039',color,x+dx,3+dy,z+1/3,r,name='petal_%s_%s_%s'%(x,dx,dy)) + put('3003','YELLOW',x,3,z+1/3,name='small_heart_'+str(x)) + put('33291','DARK_PINK',x,3,z+4/3) + put('33291','BRIGHT_LIGHT_ORANGE',x+1,4,z+4/3) + # A much larger magenta flower above the smaller pair. + put('3028','BRIGHT_GREEN',2,7,25/3,name='large_calyx') + for x in [4,8]: + put('3037','MAGENTA',x,7,26/3) + put('3037','MAGENTA',x,11,26/3,2) + put('3001','BRIGHT_PINK',x,9,26/3) + for x,r in [(2,3),(12,1)]: + for y in [8,10]: + put('3039','MAGENTA',x,y,26/3,r) + put('3032','YELLOW',5,8,29/3,name='large_heart') + # Butterfly: a narrow dark thorax, four spread wing lobes, colorful eyespots. + put('2456','BLACK',7,7,10,1,name='butterfly_underbody') + for x in [4,8]: + put('3031','BLUE',x,6,11,name='forewing_'+str(x)) + put('3021','GREEN',5 if x==4 else 8,11,11,name='hindwing_'+str(x)) + for x,r in [(4,3),(10,1)]: + for y in [6,8]: + put('3039','BLUE',x,y,34/3,r) + for x in [6,8]: + put('3003','ORANGE',x,6,34/3) + put('3004','DARK_BLUE',x,9,34/3) + put('3003','DARK_PURPLE',x,11,34/3) + for x in [5,10]: + put('3040b','MEDIUM_AZURE',x,11,34/3,0) + for x in [6,9]: + put('6141','DARK_PURPLE',x,6,37/3,name='wing_spot_'+str(x)) + for y in [7,10]: + put('3002','BLACK',7,y,37/3,1,name='body_'+str(y)) + for x in [7,8]: + p=put('47905','BLACK',x,7,40/3,name='head_'+str(x)) + eye=bl.Element('98138p07',bl.Color.WHITE) + b.connect(eye,'antistud',to=p.find_connector('stud',facing=bl.Direction.UP),name='eye_'+str(x)) + ant=bl.Element('3957b',bl.Color.BLUE) + b.connect(ant,'antistud',to=p.find_connector('stud',facing=bl.Direction.FRONT),name='antenna_'+str(x)) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + stock=json.load(open('/inputs/parts.json')) + excess=[] + for e,n in b.list_elements().items(): + allowed=stock.get(e.ldraw_id,{}).get(e.color.name,0) + if n>allowed: excess.append((e.ldraw_id,e.color.name,n,allowed)) + tests.check('inventory limits',not excess,str(excess)) + tests.check('three flower heads', all(n in b.names for n in ['large_heart','small_heart_3','small_heart_11'])) + tests.check('four spread wings',sum(n.startswith(('forewing_','hindwing_')) for n in b.names)==4) + tests.check('broad leaves surround stems',sum(n.startswith('leaf_base_') for n in b.names)==4) + tests.check('large bloom above both small blooms', b.named('large_heart').center.z > max(b.named('small_heart_3').center.z, b.named('small_heart_11').center.z)) + tests.check('butterfly rests on large bloom', abs(b.named('butterfly_underbody').alignment_box[0].z - b.named('large_heart').alignment_box[1].z) < 1e-6) + tests.check('wide freestanding base', b.named('meadow').alignment_width == 16 and b.named('meadow').alignment_depth == 16) + return tests.report() diff --git a/brickwright/alt/alt-068/hero-1024.avif b/brickwright/alt/alt-068/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..ec5675f402c8b183da2170f6d3a634d5ecda615f Binary files /dev/null and b/brickwright/alt/alt-068/hero-1024.avif differ diff --git a/brickwright/alt/alt-068/model.mpd b/brickwright/alt/alt-068/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..2310c127e6a9e22f3215b7441cf450c5dfc10694 --- /dev/null +++ b/brickwright/alt/alt-068/model.mpd @@ -0,0 +1,94 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 2 160 -32 200 1 0 0 0 1 0 0 0 1 3003.dat +1 2 160 -56 200 1 0 0 0 1 0 0 0 1 3003.dat +1 2 160 -80 200 1 0 0 0 1 0 0 0 1 3003.dat +1 2 160 -104 200 1 0 0 0 1 0 0 0 1 3003.dat +1 288 160 -128 190 1 0 0 0 1 0 0 0 1 3004.dat +1 288 160 -128 210 1 0 0 0 1 0 0 0 1 3004.dat +1 288 160 -152 190 1 0 0 0 1 0 0 0 1 3004.dat +1 288 160 -152 210 1 0 0 0 1 0 0 0 1 3004.dat +1 288 160 -176 190 1 0 0 0 1 0 0 0 1 3004.dat +1 288 160 -176 210 1 0 0 0 1 0 0 0 1 3004.dat +1 288 160 -200 190 1 0 0 0 1 0 0 0 1 3004.dat +1 288 160 -200 210 1 0 0 0 1 0 0 0 1 3004.dat +1 27 80 -32 80 1 0 0 0 1 0 0 0 1 3003.dat +1 27 80 -56 80 1 0 0 0 1 0 0 0 1 3003.dat +1 27 80 -80 70 1 0 0 0 1 0 0 0 1 3004.dat +1 27 80 -80 90 1 0 0 0 1 0 0 0 1 3004.dat +1 10 80 -104 70 1 0 0 0 1 0 0 0 1 3004.dat +1 10 80 -104 90 1 0 0 0 1 0 0 0 1 3004.dat +1 27 240 -32 80 1 0 0 0 1 0 0 0 1 3003.dat +1 27 240 -56 80 1 0 0 0 1 0 0 0 1 3003.dat +1 27 240 -80 70 1 0 0 0 1 0 0 0 1 3004.dat +1 27 240 -80 90 1 0 0 0 1 0 0 0 1 3004.dat +1 2 60 -32 160 1 0 0 0 1 0 0 0 1 3001.dat +1 2 50 -56 160 0 0 1 0 1 0 -1 0 0 3039.dat +1 27 70 -56 160 0 0 -1 0 1 0 1 0 0 3039.dat +1 2 260 -32 160 1 0 0 0 1 0 0 0 1 3001.dat +1 2 250 -56 160 0 0 1 0 1 0 -1 0 0 3039.dat +1 27 270 -56 160 0 0 -1 0 1 0 1 0 0 3039.dat +1 2 100 -32 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 2 100 -56 230 1 0 0 0 1 0 0 0 1 3039.dat +1 27 100 -56 250 -1 0 0 0 1 0 0 0 -1 3039.dat +1 2 220 -32 240 0 0 -1 0 1 0 1 0 0 3001.dat +1 2 220 -56 230 1 0 0 0 1 0 0 0 1 3039.dat +1 27 220 -56 250 -1 0 0 0 1 0 0 0 -1 3039.dat +1 288 130 -56 170 1 0 0 0 1 0 0 0 1 60481a.dat +1 288 190 -56 170 1 0 0 0 1 0 0 0 1 60481a.dat +1 288 130 -56 250 -1 0 0 0 1 0 0 0 -1 60481a.dat +1 288 190 -56 250 -1 0 0 0 1 0 0 0 -1 60481a.dat +1 10 80 -112 80 1 0 0 0 1 0 0 0 1 3031.dat +1 30 50 -136 80 0 0 1 0 1 0 -1 0 0 3039.dat +1 30 110 -136 80 0 0 -1 0 1 0 1 0 0 3039.dat +1 30 80 -136 50 1 0 0 0 1 0 0 0 1 3039.dat +1 30 80 -136 110 -1 0 0 0 1 0 0 0 -1 3039.dat +1 14 80 -136 80 1 0 0 0 1 0 0 0 1 3003.dat +1 5 70 -144 70 1 0 0 0 1 0 0 0 1 33291.dat +1 191 90 -144 90 1 0 0 0 1 0 0 0 1 33291.dat +1 1 240 -88 80 1 0 0 0 1 0 0 0 1 3031.dat +1 191 210 -112 80 0 0 1 0 1 0 -1 0 0 3039.dat +1 191 270 -112 80 0 0 -1 0 1 0 1 0 0 3039.dat +1 191 240 -112 50 1 0 0 0 1 0 0 0 1 3039.dat +1 191 240 -112 110 -1 0 0 0 1 0 0 0 -1 3039.dat +1 14 240 -112 80 1 0 0 0 1 0 0 0 1 3003.dat +1 5 230 -120 70 1 0 0 0 1 0 0 0 1 33291.dat +1 191 250 -120 90 1 0 0 0 1 0 0 0 1 33291.dat +1 10 160 -208 200 1 0 0 0 1 0 0 0 1 3028.dat +1 26 120 -232 170 1 0 0 0 1 0 0 0 1 3037.dat +1 26 120 -232 230 -1 0 0 0 1 0 0 0 -1 3037.dat +1 29 120 -232 200 1 0 0 0 1 0 0 0 1 3001.dat +1 26 200 -232 170 1 0 0 0 1 0 0 0 1 3037.dat +1 26 200 -232 230 -1 0 0 0 1 0 0 0 -1 3037.dat +1 29 200 -232 200 1 0 0 0 1 0 0 0 1 3001.dat +1 26 70 -232 180 0 0 1 0 1 0 -1 0 0 3039.dat +1 26 70 -232 220 0 0 1 0 1 0 -1 0 0 3039.dat +1 26 250 -232 180 0 0 -1 0 1 0 1 0 0 3039.dat +1 26 250 -232 220 0 0 -1 0 1 0 1 0 0 3039.dat +1 14 160 -240 200 1 0 0 0 1 0 0 0 1 3032.dat +1 0 160 -264 200 0 0 -1 0 1 0 1 0 0 2456.dat +1 1 120 -272 160 1 0 0 0 1 0 0 0 1 3031.dat +1 2 130 -272 240 1 0 0 0 1 0 0 0 1 3021.dat +1 1 200 -272 160 1 0 0 0 1 0 0 0 1 3031.dat +1 2 190 -272 240 1 0 0 0 1 0 0 0 1 3021.dat +1 1 110 -296 140 0 0 1 0 1 0 -1 0 0 3039.dat +1 1 110 -296 180 0 0 1 0 1 0 -1 0 0 3039.dat +1 1 210 -296 140 0 0 -1 0 1 0 1 0 0 3039.dat +1 1 210 -296 180 0 0 -1 0 1 0 1 0 0 3039.dat +1 25 140 -296 140 1 0 0 0 1 0 0 0 1 3003.dat +1 272 140 -296 190 1 0 0 0 1 0 0 0 1 3004.dat +1 85 140 -296 240 1 0 0 0 1 0 0 0 1 3003.dat +1 25 180 -296 140 1 0 0 0 1 0 0 0 1 3003.dat +1 272 180 -296 190 1 0 0 0 1 0 0 0 1 3004.dat +1 85 180 -296 240 1 0 0 0 1 0 0 0 1 3003.dat +1 322 110 -296 250 1 0 0 0 1 0 0 0 1 3040b.dat +1 322 210 -296 250 1 0 0 0 1 0 0 0 1 3040b.dat +1 85 130 -304 130 1 0 0 0 1 0 0 0 1 6141.dat +1 85 190 -304 130 1 0 0 0 1 0 0 0 1 6141.dat +1 0 160 -320 170 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 160 -320 230 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 150 -344 150 1 0 0 0 1 0 0 0 1 47905.dat +1 15 150 -352 150 1 0 0 0 1 0 0 0 1 98138p07.dat +1 1 150 -334 132 1 0 0 0 0 -1 0 1 0 3957b.dat +1 0 170 -344 150 1 0 0 0 1 0 0 0 1 47905.dat +1 15 170 -352 150 1 0 0 0 1 0 0 0 1 98138p07.dat +1 1 170 -334 132 1 0 0 0 0 -1 0 1 0 3957b.dat diff --git a/brickwright/alt/alt-068/thumb-512.avif b/brickwright/alt/alt-068/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..750948aa1047b9214944127466a8bde40341f08e Binary files /dev/null and b/brickwright/alt/alt-068/thumb-512.avif differ diff --git a/brickwright/alt/alt-068/trace.jsonl.gz b/brickwright/alt/alt-068/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..7265d0714074eb4a811b31b7944f3469ca096504 --- /dev/null +++ b/brickwright/alt/alt-068/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a61d2f71aa3825d20c88e2f5503612430c57b3c5863c4a36a1ea1b076f6ef16f +size 6083 diff --git a/brickwright/alt/alt-068/view-0.avif b/brickwright/alt/alt-068/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..9df93c1bf9fed373dcb7008a816bcd787fb14366 Binary files /dev/null and b/brickwright/alt/alt-068/view-0.avif differ diff --git a/brickwright/alt/alt-068/view-1.avif b/brickwright/alt/alt-068/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..04b7213e956e9c7ae6f1d99c955e0e3dcd216e4d Binary files /dev/null and b/brickwright/alt/alt-068/view-1.avif differ diff --git a/brickwright/alt/alt-068/view-2.avif b/brickwright/alt/alt-068/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..a0992b2249a7db53ed5fbf69e3eca79cb330c134 Binary files /dev/null and b/brickwright/alt/alt-068/view-2.avif differ diff --git a/brickwright/alt/alt-068/view-3.avif b/brickwright/alt/alt-068/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..3d5848b91189397164fc9bda6e23b9a16282e315 Binary files /dev/null and b/brickwright/alt/alt-068/view-3.avif differ diff --git a/brickwright/alt/alt-068/view-4.avif b/brickwright/alt/alt-068/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..a497c633366e7364d7213c4299aa5891637a0404 Binary files /dev/null and b/brickwright/alt/alt-068/view-4.avif differ diff --git a/brickwright/alt/alt-068/view-5.avif b/brickwright/alt/alt-068/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..7401ff197ede41ed7838c9efc3f19fabf3b6dbd8 Binary files /dev/null and b/brickwright/alt/alt-068/view-5.avif differ diff --git a/brickwright/alt/alt-068/view-6.avif b/brickwright/alt/alt-068/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..6cc29e5ff01780a3de3b40cdfb9acbf9683425f9 Binary files /dev/null and b/brickwright/alt/alt-068/view-6.avif differ diff --git a/brickwright/alt/alt-068/view-7.avif b/brickwright/alt/alt-068/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..3f8421fc0476b8031a2f08260a6a87d99d45105d Binary files /dev/null and b/brickwright/alt/alt-068/view-7.avif differ diff --git a/brickwright/alt/alt-069/build.py b/brickwright/alt/alt-069/build.py new file mode 100644 index 0000000000000000000000000000000000000000..b59856bdc20154705ed0c3f266f3dd916c39d0f4 --- /dev/null +++ b/brickwright/alt/alt-069/build.py @@ -0,0 +1,110 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + def put(pid,c,x,y,z,name=None,rot=bl.Rotation.DEG_0): + return b.add(bl.Element(pid,getattr(bl.Color,c)),(x,y,z),rotation=rot,name=name) + put('91405','BRIGHT_GREEN',0,0,0,'grass') + # Broad roots and a textured, tapering trunk. + put('3795','REDDISH_BROWN',5,7,1/3,'roots') + for z in range(4): + put('3002','REDDISH_BROWN',7,7,2/3+z,'trunk_'+str(z)) + for z in range(4,8): + put('3003','MEDIUM_NOUGAT',7,7,2/3+z,'trunk_'+str(z)) + for x,y in [(6,7),(10,7)]: + put('3040b','REDDISH_BROWN',x,y,2/3) + # Forked brown branches under the leaf clusters. + put('3660b','REDDISH_BROWN',6,7,26/3,rot=bl.Rotation.DEG_270) + put('3660b','REDDISH_BROWN',8,7,26/3,rot=bl.Rotation.DEG_90) + put('3795','REDDISH_BROWN',5,7,29/3,'branch_crossbar') + put('3010','REDDISH_BROWN',7,5,10,'branch_front',bl.Rotation.DEG_90) + put('3010','REDDISH_BROWN',8,7,10,'branch_back',bl.Rotation.DEG_90) + # Asymmetric crown: interlocked green bricks and sloped leaf edges. + put('3002','LIME',4,7,10,'leaves_left') + put('3001','DARK_GREEN',9,7,10,'leaves_right') + put('3001','GREEN',6,5,11,'leaves_front') + put('3001','GREEN',6,9,11,'leaves_back') + put('3001','GREEN',6,7,11,'leaves_mid') + put('3004','DARK_GREEN',10,7,11,rot=bl.Rotation.DEG_90) + put('3002','LIME',7,7,12,'crown') + put('3039','GREEN',4,7,11,rot=bl.Rotation.DEG_270) + put('3039','GREEN',11,7,11,rot=bl.Rotation.DEG_90) + put('3039','GREEN',6,5,12) + put('3039','GREEN',8,9,12,rot=bl.Rotation.DEG_180) + put('3039','LIME',7,7,13) + put('3040b','GREEN',9,7,13,rot=bl.Rotation.DEG_180) + # Rounded red apples, with small brown stalks. + put('30165','RED',4,7,12,'apple_left') + put('30165','RED',11,7,12,'apple_right') + put('6091','RED',9,5,12,'apple_front') + for nm in ['apple_left','apple_right']: + p=b.named(nm) + e=bl.Element('6141',bl.Color.REDDISH_BROWN) + b.connect(e,e.find_connector('antistud'),to=p.find_connector('stud',toward=bl.Direction.RIGHT)) + put('6141','REDDISH_BROWN',9,6,13) + for x,y,z in [(6,6,13),(9,7,14),(7,8,14)]: + put('4727','BRIGHT_GREEN',x,y,z) + # Open crate: two panel walls and two short end walls, with loose-looking + # but stud-attached red apples in its recessed interior. + put('3020','TAN',2,9,1/3,'crate_floor_front') + put('3020','TAN',2,11,1/3,'crate_floor_back') + put('15207','REDDISH_BROWN',2,9,2/3,'crate_front') + put('15207','REDDISH_BROWN',2,12,2/3,'crate_back',bl.Rotation.DEG_180) + put('3004','MEDIUM_NOUGAT',2,10,2/3,'crate_end_a',bl.Rotation.DEG_90) + put('3004','MEDIUM_NOUGAT',5,10,2/3,'crate_end_b',bl.Rotation.DEG_90) + for x,y in [(3,10),(4,10),(3,11),(4,11)]: + put('3005','DARK_RED',x,y,2/3) + for x,y in [(3,10),(4,10),(3,11)]: + put('6141','RED',x,y,5/3,'crate_apple_'+str(x)+'_'+str(y)) + put('54200','RED',4,11,5/3,'crate_apple_four') + # Ladder on a locked hinge at its foot. The rungs bridge both rails. + ladder=bl.LegoBuild() + def lp(pid,c,x,y,z,name=None,rot=bl.Rotation.DEG_0): + return ladder.add(bl.Element(pid,getattr(bl.Color,c)),(x,y,z),rotation=rot,name=name) + hp=lp('60471','BLACK',1,0,0,'foot_hinge',bl.Rotation.DEG_180) + for i in range(4): + lp('3010','LIGHT_BLUISH_GRAY',0,0,1/3+3*i,'rung_'+str(i)) + if i<3: + for x in [0,3]: + lp('3245c','LIGHT_BLUISH_GRAY',x,0,4/3+3*i,rot=bl.Rotation.DEG_90) + # A brick-built picker, feet on the middle rung and body in front of rails. + for x in [1,2]: + lp('3004','BLACK',x,-1,13/3,'boot_'+str(x),bl.Rotation.DEG_90) + lp('3005','MEDIUM_NOUGAT',x,-1,16/3) + lp('3004','DARK_BLUE',1,-1,19/3,'trousers') + lp('3004','BRIGHT_LIGHT_YELLOW',1,-1,22/3,'shirt') + lp('3004','BRIGHT_LIGHT_YELLOW',1,-1,25/3) + lp('3004','TAN',1,-1,29/3,'face') + lp('3023b','DARK_AZURE',1,-1,32/3,'cap') + # Arms project from the shoulder, one reaching toward the branch. + lp('3710','TAN',0,-1,28/3,'arms') + # Foot hinge is fixed in the displayed leaning pose. + foot=put('92582','BLACK',7,0,1/3,'ladder_anchor',bl.Rotation.DEG_90) + b.connect(ladder,hp.find_connector('hinge_2_on'),to=foot.find_connector('hinge_2_in'), + target_rotation=bl.rotation_about(bl.Vec3(1,0,0),-19),name='ladder_and_picker') + # Present the picker and the open crate toward the display's front. + display=bl.LegoBuild() + turn=bl.Pose(bl.Rotation.DEG_180.matrix,bl.Position(16,16,0)) + for p in b.placements: + display.add_raw(p.content,turn.compose(p.pose),name=b.name_of(p)) + return display + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + stock=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):v for k,v in used.items() if v>stock.get(k[0],{}).get(k[1],0)} + t.check('Inventory limits',not excess,str(excess)) + t.check('Fruit in crown and crate',all(n in b.names for n in ['apple_left','apple_right','apple_front','crate_apple_four'])) + t.check('Open crate walls',all(n in b.names for n in ['crate_front','crate_back','crate_end_a','crate_end_b'])) + t.check('Ladder and picker', 'ladder_and_picker' in b.names) + return t.report() diff --git a/brickwright/alt/alt-069/hero-1024.avif b/brickwright/alt/alt-069/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..26b25a860de68b3839d8f6ec7e2942574d9dad14 Binary files /dev/null and b/brickwright/alt/alt-069/hero-1024.avif differ diff --git a/brickwright/alt/alt-069/model.mpd b/brickwright/alt/alt-069/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..d06f7663d8858aaa21e80ccae9ce326584ef1e88 --- /dev/null +++ b/brickwright/alt/alt-069/model.mpd @@ -0,0 +1,82 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 -1 0 0 0 1 0 0 0 -1 91405.dat +1 70 160 -16 160 -1 0 0 0 1 0 0 0 -1 3795.dat +1 70 150 -40 160 -1 0 0 0 1 0 0 0 -1 3002.dat +1 70 150 -64 160 -1 0 0 0 1 0 0 0 -1 3002.dat +1 70 150 -88 160 -1 0 0 0 1 0 0 0 -1 3002.dat +1 70 150 -112 160 -1 0 0 0 1 0 0 0 -1 3002.dat +1 84 160 -136 160 -1 0 0 0 1 0 0 0 -1 3003.dat +1 84 160 -160 160 -1 0 0 0 1 0 0 0 -1 3003.dat +1 84 160 -184 160 -1 0 0 0 1 0 0 0 -1 3003.dat +1 84 160 -208 160 -1 0 0 0 1 0 0 0 -1 3003.dat +1 70 190 -40 150 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 70 110 -40 150 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 70 170 -232 160 0 0 -1 0 1 0 1 0 0 3660b.dat +1 70 150 -232 160 0 0 1 0 1 0 -1 0 0 3660b.dat +1 70 160 -240 160 -1 0 0 0 1 0 0 0 -1 3795.dat +1 70 170 -264 180 0 0 1 0 1 0 -1 0 0 3010.dat +1 70 150 -264 140 0 0 1 0 1 0 -1 0 0 3010.dat +1 27 210 -264 160 -1 0 0 0 1 0 0 0 -1 3002.dat +1 288 100 -264 160 -1 0 0 0 1 0 0 0 -1 3001.dat +1 2 160 -288 200 -1 0 0 0 1 0 0 0 -1 3001.dat +1 2 160 -288 120 -1 0 0 0 1 0 0 0 -1 3001.dat +1 2 160 -288 160 -1 0 0 0 1 0 0 0 -1 3001.dat +1 288 110 -288 160 0 0 1 0 1 0 -1 0 0 3004.dat +1 27 150 -312 160 -1 0 0 0 1 0 0 0 -1 3002.dat +1 2 210 -288 160 0 0 -1 0 1 0 1 0 0 3039.dat +1 2 90 -288 160 0 0 1 0 1 0 -1 0 0 3039.dat +1 2 180 -312 190 -1 0 0 0 1 0 0 0 -1 3039.dat +1 2 140 -312 130 1 0 0 0 1 0 0 0 1 3039.dat +1 27 160 -336 150 -1 0 0 0 1 0 0 0 -1 3039.dat +1 2 130 -336 170 1 0 0 0 1 0 0 0 1 3040b.dat +1 4 220 -312 160 -1 0 0 0 1 0 0 0 -1 30165.dat +1 4 80 -312 160 -1 0 0 0 1 0 0 0 -1 30165.dat +1 4 130 -320 190 -1 0 0 0 1 0 0 0 -1 6091.dat +1 70 230 -320 160 -1 0 0 0 1 0 0 0 -1 6141.dat +1 70 90 -320 160 -1 0 0 0 1 0 0 0 -1 6141.dat +1 70 130 -320 190 -1 0 0 0 1 0 0 0 -1 6141.dat +1 10 190 -336 190 -1 0 0 0 1 0 0 0 -1 4727.dat +1 10 130 -360 170 -1 0 0 0 1 0 0 0 -1 4727.dat +1 10 170 -360 150 -1 0 0 0 1 0 0 0 -1 4727.dat +1 19 240 -16 120 -1 0 0 0 1 0 0 0 -1 3020.dat +1 19 240 -16 80 -1 0 0 0 1 0 0 0 -1 3020.dat +1 70 240 -40 130 -1 0 0 0 1 0 0 0 -1 15207.dat +1 70 240 -40 70 1 0 0 0 1 0 0 0 1 15207.dat +1 84 270 -40 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 84 210 -40 100 0 0 1 0 1 0 -1 0 0 3004.dat +1 320 250 -40 110 -1 0 0 0 1 0 0 0 -1 3005.dat +1 320 230 -40 110 -1 0 0 0 1 0 0 0 -1 3005.dat +1 320 250 -40 90 -1 0 0 0 1 0 0 0 -1 3005.dat +1 320 230 -40 90 -1 0 0 0 1 0 0 0 -1 3005.dat +1 4 250 -48 110 -1 0 0 0 1 0 0 0 -1 6141.dat +1 4 230 -48 110 -1 0 0 0 1 0 0 0 -1 6141.dat +1 4 250 -48 90 -1 0 0 0 1 0 0 0 -1 6141.dat +1 4 230 -40 90 -1 0 0 0 1 0 0 0 -1 54200.dat +1 0 160 -16 300 0 0 1 0 1 0 -1 0 0 92582.dat +1 16 200 -26.093933 320.318966 -1 0 0 0 0.945519 0.325568 0 0.325568 -0.945519 ladder_and_picker.ldr +0 FILE ladder_and_picker.ldr +0 ladder_and_picker +0 Name: ladder_and_picker +1 0 40 -8 10 -1 0 0 0 1 0 0 0 -1 60471.dat +1 71 40 -32 10 1 0 0 0 1 0 0 0 1 3010.dat +1 71 10 -80 20 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 70 -80 20 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 40 -104 10 1 0 0 0 1 0 0 0 1 3010.dat +1 71 10 -152 20 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 70 -152 20 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 40 -176 10 1 0 0 0 1 0 0 0 1 3010.dat +1 71 10 -224 20 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 70 -224 20 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 40 -248 10 1 0 0 0 1 0 0 0 1 3010.dat +1 0 30 -128 0 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 30 -152 -10 1 0 0 0 1 0 0 0 1 3005.dat +1 0 50 -128 0 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 50 -152 -10 1 0 0 0 1 0 0 0 1 3005.dat +1 272 40 -176 -10 1 0 0 0 1 0 0 0 1 3004.dat +1 226 40 -200 -10 1 0 0 0 1 0 0 0 1 3004.dat +1 226 40 -224 -10 1 0 0 0 1 0 0 0 1 3004.dat +1 19 40 -256 -10 1 0 0 0 1 0 0 0 1 3004.dat +1 321 40 -264 -10 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 40 -232 -10 1 0 0 0 1 0 0 0 1 3710.dat diff --git a/brickwright/alt/alt-069/thumb-512.avif b/brickwright/alt/alt-069/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..d684fd0b59f0a020b96ec7551fdcbf14afe660b9 Binary files /dev/null and b/brickwright/alt/alt-069/thumb-512.avif differ diff --git a/brickwright/alt/alt-069/trace.jsonl.gz b/brickwright/alt/alt-069/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..c5cb77a765783a4d9f1e6004c6b5d6165f7e8e29 --- /dev/null +++ b/brickwright/alt/alt-069/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3dbbc9703bb7a93ddc16cd87423f61948758cc837297025bf9365346513dcde +size 9344 diff --git a/brickwright/alt/alt-069/view-0.avif b/brickwright/alt/alt-069/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..9b28033188ba1f12fd491ee10b0c6a4d3bb4ce8d Binary files /dev/null and b/brickwright/alt/alt-069/view-0.avif differ diff --git a/brickwright/alt/alt-069/view-1.avif b/brickwright/alt/alt-069/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..d0e0dbe6ed51655a918597ea89310cff5124abfa Binary files /dev/null and b/brickwright/alt/alt-069/view-1.avif differ diff --git a/brickwright/alt/alt-069/view-2.avif b/brickwright/alt/alt-069/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..da355536a66a289668255d2684a157ba472ad5d2 Binary files /dev/null and b/brickwright/alt/alt-069/view-2.avif differ diff --git a/brickwright/alt/alt-069/view-3.avif b/brickwright/alt/alt-069/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..2fce30c0fdca7a69bc3e1fc1519926eaccdac9e0 Binary files /dev/null and b/brickwright/alt/alt-069/view-3.avif differ diff --git a/brickwright/alt/alt-069/view-4.avif b/brickwright/alt/alt-069/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..7339aff4ddc52a0482bae1aab7c985b0642c9d1f Binary files /dev/null and b/brickwright/alt/alt-069/view-4.avif differ diff --git a/brickwright/alt/alt-069/view-5.avif b/brickwright/alt/alt-069/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..b151c144c035d25c7b293708a95a2b93c3ad23d8 Binary files /dev/null and b/brickwright/alt/alt-069/view-5.avif differ diff --git a/brickwright/alt/alt-069/view-6.avif b/brickwright/alt/alt-069/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..10958fcc7230e0d78237ffad0a015d39462a0c6b Binary files /dev/null and b/brickwright/alt/alt-069/view-6.avif differ diff --git a/brickwright/alt/alt-069/view-7.avif b/brickwright/alt/alt-069/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..02283f0dfcb21e364a5f9e2e156b4cc88019cf5f Binary files /dev/null and b/brickwright/alt/alt-069/view-7.avif differ diff --git a/brickwright/alt/alt-070/build.py b/brickwright/alt/alt-070/build.py new file mode 100644 index 0000000000000000000000000000000000000000..adc4fa396e4eff7a2f374efeaea5962f74ef84ff --- /dev/null +++ b/brickwright/alt/alt-070/build.py @@ -0,0 +1,85 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def add(pid, col, x, y, z, rot=0, name=None): + return b.add(bl.Element(pid, getattr(bl.Color, col)), (x,y,z), rotation=bl.Rotation(rot), name=name) + def face(pid, col, target, direction=bl.Direction.FRONT, name=None): + e=bl.Element(pid,getattr(bl.Color,col)) + return b.connect(e,e.find_connector('antistud',toward=bl.Direction.RIGHT),to=target.find_connector('stud',facing=direction,toward=bl.Direction.RIGHT),name=name) + add('91405','BRIGHT_GREEN',0,0,0,name='grass') + # Broad interlocked root flare and contrasting bark courses. + for x in (4,8): + for y in (6,8): add('3001','DARK_TAN',x,y,1/3) + for z in (4/3,10/3): + for x in (6,8): add('3003','MEDIUM_NOUGAT',x,7,z) + for z in (7/3,13/3): + for y in (7,8): add('3010','REDDISH_BROWN',6,y,z) + for x,r in ((5,3),(9,1)): + add('3660b','REDDISH_BROWN',x,7,16/3,r,name='fork_left' if x==5 else 'fork_right') + for x in (4,9): add('3002','REDDISH_BROWN',x,7,19/3) + for x,r in ((3,3),(11,1)): + add('3660b','REDDISH_BROWN',x,7,22/3,r) + for x in (2,11): add('3002','REDDISH_BROWN',x,7,25/3) + # Nest floor bridges both limbs. Panels and tan sides leave a hollow cup. + for y in (6,8): add('3795','REDDISH_BROWN',5,y,22/3,name='nest_floor_'+str(y)) + for y in (6,9): add('15207','REDDISH_BROWN',6,y,23/3,name='nest_rim_'+str(y)) + for x in (5,10): + for y in (6,8): add('3004','TAN',x,y,23/3,1) + # Two yellow chicks: expressive printed eyes and little red bills. + for i,x in enumerate((6,8)): + add('3003','YELLOW',x,7,23/3,name='chick_'+str(i)+'_body') + eye=add('47905','BLACK',x,7,26/3) + bill=add('47905','BLACK',x+1,7,26/3) + face('98138p07','WHITE',eye,name='chick_'+str(i)+'_eye') + face('54200','RED',bill,name='chick_'+str(i)+'_beak') + add('3005','YELLOW',x,7,29/3) + add('54200','MEDIUM_AZURE',x+1,7,29/3) + # Larger blue parent, firmly studded onto the right branch. + for y in (7,8): add('3023b','ORANGE',11,y,28/3) + add('3001','BLUE',11,7,29/3,name='parent_body') + add('3039','BLUE',10,7,32/3,3,name='parent_wing_left') + add('3039','BLUE',14,7,32/3,1,name='parent_wing_right') + add('3003','BLUE',12,7,32/3) + head=add('30414','BLUE',11,7,35/3,name='parent_head') + add('3010','MEDIUM_AZURE',11,8,35/3) + studs=head.find_connectors('stud',facing=bl.Direction.FRONT) + studs=sorted(studs,key=lambda c:c.position.x) + for i in (0,3): + e=bl.Element('98138p07',bl.Color.WHITE) + b.connect(e,'antistud',to=studs[i],name='parent_eye_'+str(i)) + beak=bl.Element('3004',bl.Color.ORANGE) + b.connect(beak,beak.find_connector('antistud',toward=bl.Direction.RIGHT),to=studs[1],name='parent_beak') + for x in range(11,15): add('50950','MEDIUM_AZURE',x,7,38/3) + # Smaller leafy crown on the unoccupied limb, and ground vegetation. + add('3001','DARK_GREEN',1,7,28/3) + for x in (1,3): add('3039','GREEN',x,7,31/3) + add('3004','DARK_GREEN',2,8,34/3) + for x in (2,3): add('3040b','GREEN',x,8,37/3) + for x,y in ((3,5),(10,10),(6,11)): + add('3062b','DARK_ORANGE',x,y,1/3) + add('33291','BRIGHT_GREEN',x,y,4/3) + for x,y in ((1,3),(12,3),(3,12)): + p=add('4070','GREEN',x,y,1/3) + add('33291','DARK_PINK',x,y,4/3) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((e.ldraw_id,e.color.name) for p in b.flattened_placements for e in [p.content]) + excess=[(pid,c,n,inventory.get(pid,{}).get(c,0)) for (pid,c),n in used.items() if n>inventory.get(pid,{}).get(c,0)] + tests.check('Inventory limits',not excess,str(excess)) + tests.check('Two chicks in nest',all('chick_'+str(i)+'_body' in b.names for i in range(2))) + tests.check('Forked tree',all(n in b.names for n in ('fork_left','fork_right','nest_floor_6','nest_floor_8'))) + tests.check('Parent larger than chicks',b.named('parent_body').alignment_width>b.named('chick_0_body').alignment_width) + return tests.report() diff --git a/brickwright/alt/alt-070/hero-1024.avif b/brickwright/alt/alt-070/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..ea368cdb39a630f9defb7a1146b0c217369761eb Binary files /dev/null and b/brickwright/alt/alt-070/hero-1024.avif differ diff --git a/brickwright/alt/alt-070/model.mpd b/brickwright/alt/alt-070/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..a5c65097883443a30e6faee7194fb0db7f013553 --- /dev/null +++ b/brickwright/alt/alt-070/model.mpd @@ -0,0 +1,76 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 28 120 -32 140 1 0 0 0 1 0 0 0 1 3001.dat +1 28 120 -32 180 1 0 0 0 1 0 0 0 1 3001.dat +1 28 200 -32 140 1 0 0 0 1 0 0 0 1 3001.dat +1 28 200 -32 180 1 0 0 0 1 0 0 0 1 3001.dat +1 84 140 -56 160 1 0 0 0 1 0 0 0 1 3003.dat +1 84 180 -56 160 1 0 0 0 1 0 0 0 1 3003.dat +1 84 140 -104 160 1 0 0 0 1 0 0 0 1 3003.dat +1 84 180 -104 160 1 0 0 0 1 0 0 0 1 3003.dat +1 70 160 -80 150 1 0 0 0 1 0 0 0 1 3010.dat +1 70 160 -80 170 1 0 0 0 1 0 0 0 1 3010.dat +1 70 160 -128 150 1 0 0 0 1 0 0 0 1 3010.dat +1 70 160 -128 170 1 0 0 0 1 0 0 0 1 3010.dat +1 70 130 -152 160 0 0 1 0 1 0 -1 0 0 3660b.dat +1 70 190 -152 160 0 0 -1 0 1 0 1 0 0 3660b.dat +1 70 110 -176 160 1 0 0 0 1 0 0 0 1 3002.dat +1 70 210 -176 160 1 0 0 0 1 0 0 0 1 3002.dat +1 70 90 -200 160 0 0 1 0 1 0 -1 0 0 3660b.dat +1 70 230 -200 160 0 0 -1 0 1 0 1 0 0 3660b.dat +1 70 70 -224 160 1 0 0 0 1 0 0 0 1 3002.dat +1 70 250 -224 160 1 0 0 0 1 0 0 0 1 3002.dat +1 70 160 -184 140 1 0 0 0 1 0 0 0 1 3795.dat +1 70 160 -184 180 1 0 0 0 1 0 0 0 1 3795.dat +1 70 160 -208 130 1 0 0 0 1 0 0 0 1 15207.dat +1 70 160 -208 190 1 0 0 0 1 0 0 0 1 15207.dat +1 19 110 -208 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 110 -208 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 210 -208 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 210 -208 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 14 140 -208 160 1 0 0 0 1 0 0 0 1 3003.dat +1 0 130 -232 150 1 0 0 0 1 0 0 0 1 47905.dat +1 0 150 -232 150 1 0 0 0 1 0 0 0 1 47905.dat +1 15 130 -222 132 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 4 150 -222 140 1 0 0 0 0 -1 0 1 0 54200.dat +1 14 130 -256 150 1 0 0 0 1 0 0 0 1 3005.dat +1 322 150 -232 150 1 0 0 0 1 0 0 0 1 54200.dat +1 14 180 -208 160 1 0 0 0 1 0 0 0 1 3003.dat +1 0 170 -232 150 1 0 0 0 1 0 0 0 1 47905.dat +1 0 190 -232 150 1 0 0 0 1 0 0 0 1 47905.dat +1 15 170 -222 132 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 4 190 -222 140 1 0 0 0 0 -1 0 1 0 54200.dat +1 14 170 -256 150 1 0 0 0 1 0 0 0 1 3005.dat +1 322 190 -232 150 1 0 0 0 1 0 0 0 1 54200.dat +1 25 240 -232 150 1 0 0 0 1 0 0 0 1 3023b.dat +1 25 240 -232 170 1 0 0 0 1 0 0 0 1 3023b.dat +1 1 260 -256 160 1 0 0 0 1 0 0 0 1 3001.dat +1 1 230 -280 160 0 0 1 0 1 0 -1 0 0 3039.dat +1 1 290 -280 160 0 0 -1 0 1 0 1 0 0 3039.dat +1 1 260 -280 160 1 0 0 0 1 0 0 0 1 3003.dat +1 1 260 -304 150 1 0 0 0 1 0 0 0 1 30414.dat +1 322 260 -304 170 1 0 0 0 1 0 0 0 1 3010.dat +1 15 230 -294 132 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 290 -294 132 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 25 260 -294 116 1 0 0 0 0 -1 0 1 0 3004.dat +1 322 230 -328 170 1 0 0 0 1 0 0 0 1 50950.dat +1 322 250 -328 170 1 0 0 0 1 0 0 0 1 50950.dat +1 322 270 -328 170 1 0 0 0 1 0 0 0 1 50950.dat +1 322 290 -328 170 1 0 0 0 1 0 0 0 1 50950.dat +1 288 60 -248 160 1 0 0 0 1 0 0 0 1 3001.dat +1 2 40 -272 170 1 0 0 0 1 0 0 0 1 3039.dat +1 2 80 -272 170 1 0 0 0 1 0 0 0 1 3039.dat +1 288 60 -296 170 1 0 0 0 1 0 0 0 1 3004.dat +1 2 50 -320 190 1 0 0 0 1 0 0 0 1 3040b.dat +1 2 70 -320 190 1 0 0 0 1 0 0 0 1 3040b.dat +1 484 70 -32 110 1 0 0 0 1 0 0 0 1 3062b.dat +1 10 70 -40 110 1 0 0 0 1 0 0 0 1 33291.dat +1 484 210 -32 210 1 0 0 0 1 0 0 0 1 3062b.dat +1 10 210 -40 210 1 0 0 0 1 0 0 0 1 33291.dat +1 484 130 -32 230 1 0 0 0 1 0 0 0 1 3062b.dat +1 10 130 -40 230 1 0 0 0 1 0 0 0 1 33291.dat +1 2 30 -32 70 1 0 0 0 1 0 0 0 1 4070.dat +1 5 30 -40 70 1 0 0 0 1 0 0 0 1 33291.dat +1 2 250 -32 70 1 0 0 0 1 0 0 0 1 4070.dat +1 5 250 -40 70 1 0 0 0 1 0 0 0 1 33291.dat +1 2 70 -32 250 1 0 0 0 1 0 0 0 1 4070.dat +1 5 70 -40 250 1 0 0 0 1 0 0 0 1 33291.dat diff --git a/brickwright/alt/alt-070/thumb-512.avif b/brickwright/alt/alt-070/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..9756f7408e030e1663074cba38ee9edc02ae3434 Binary files /dev/null and b/brickwright/alt/alt-070/thumb-512.avif differ diff --git a/brickwright/alt/alt-070/trace.jsonl.gz b/brickwright/alt/alt-070/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..545af05ed9b6d391409ee4e6c72eaf1e0542051f --- /dev/null +++ b/brickwright/alt/alt-070/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fea1eee1aeb50707a60337f3336a3aa0a5a2daf7938a55f2613a52a8b517ad0 +size 5769 diff --git a/brickwright/alt/alt-070/view-0.avif b/brickwright/alt/alt-070/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..2bdf1ae699e5572f2c1f49d257a3b859f23cdf91 Binary files /dev/null and b/brickwright/alt/alt-070/view-0.avif differ diff --git a/brickwright/alt/alt-070/view-1.avif b/brickwright/alt/alt-070/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..6b0457560a82d5f9adf0851d286acde3ecf7eaa8 Binary files /dev/null and b/brickwright/alt/alt-070/view-1.avif differ diff --git a/brickwright/alt/alt-070/view-2.avif b/brickwright/alt/alt-070/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..bca88592a39bcb222c18bb0ec257cacd326ad846 Binary files /dev/null and b/brickwright/alt/alt-070/view-2.avif differ diff --git a/brickwright/alt/alt-070/view-3.avif b/brickwright/alt/alt-070/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..92117868437d886911a0cf99246d2334fbad5bbe Binary files /dev/null and b/brickwright/alt/alt-070/view-3.avif differ diff --git a/brickwright/alt/alt-070/view-4.avif b/brickwright/alt/alt-070/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..87b8b66c5c27137c53048902959999aea03115bb Binary files /dev/null and b/brickwright/alt/alt-070/view-4.avif differ diff --git a/brickwright/alt/alt-070/view-5.avif b/brickwright/alt/alt-070/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..03cb428b89c06f699acdbc4c141e85d9dc03baeb Binary files /dev/null and b/brickwright/alt/alt-070/view-5.avif differ diff --git a/brickwright/alt/alt-070/view-6.avif b/brickwright/alt/alt-070/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..4670b40c72ed8ef2cbca5238c756fa72f04abfab Binary files /dev/null and b/brickwright/alt/alt-070/view-6.avif differ diff --git a/brickwright/alt/alt-070/view-7.avif b/brickwright/alt/alt-070/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..a1c50bf6db473f5a6bf0ec5e4c7d4fff719c7d46 Binary files /dev/null and b/brickwright/alt/alt-070/view-7.avif differ diff --git a/brickwright/alt/alt-071/build.py b/brickwright/alt/alt-071/build.py new file mode 100644 index 0000000000000000000000000000000000000000..b6fa664c658ab6a97ed13c5f4962ac82a6974697 --- /dev/null +++ b/brickwright/alt/alt-071/build.py @@ -0,0 +1,96 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def add(pid, color, pos, name=None, rot=bl.Rotation.DEG_0): + return b.add(bl.Element(pid, getattr(bl.Color,color)), pos, rotation=rot, name=name) + # Compact beach platform; the tower foundations conceal the structural plate. + add('3029','DARK_BLUISH_GRAY',(0,4,0),'castle_foundation') + add('3032','YELLOW',(10,0,0),'sand') + add('3020','TAN',(4,3,1/3),'door_sand') + add('3020','TAN',(8,3,1/3),'beach_bridge') + add('3022','TAN',(2,1,1/3),'sand_under_left_legs') + add('3022','TAN',(8,1,1/3),'sand_under_right_legs') + add('3023b','TAN',(2,1,0),'left_sand_foot') + add('3023b','TAN',(8,1,0),'right_sand_foot') + for x in [0,8]: + for h in [1/3,4/3]: + add('3001','DARK_TAN',(x,5,h)) + add('3001','TAN',(x,5,7/3)) + for h in [10/3,13/3]: + add('3010','BRIGHT_LIGHT_YELLOW',(x,6,h)) + add('3622','TAN',(x if x==0 else 9,5,h)) + add('3710','TAN',(x,5,16/3)) + add('3010','BRIGHT_LIGHT_YELLOW',(x,6,16/3)) + for dx in [0,3]: + add('3005','MEDIUM_NOUGAT',(x+dx,5,17/3)) + add('3005','MEDIUM_NOUGAT',(x+dx,6,19/3)) + add('15254','LIGHT_BLUISH_GRAY',(3,5,10/3),'doorway_arch') + # Sand shoulders beside the recessed entrance. + add('3004','TAN',(0,4,1/3)) + add('60479','YELLOW',(0,7,1/3),'rear_sand') + # Brick-built crab, with arched walking legs and asymmetric pincers. + for y in [3,4]: + add('3659','RED',(4,y,2/3),'legs_'+str(y)) + add('3009','RED',(3,4,5/3),'crab_arms') + add('3004','RED',(5,3,5/3),'crab_face_base') + for x in [3,8]: + add('3659','RED',(x,1,2/3),'side_legs_'+str(x),bl.Rotation.DEG_90) + add('30165','RED',(5,4,8/3),'crab_shell') + add('3004','RED',(5,3,8/3),'eye_support') + for x in [5,6]: + eye=add('47905','RED',(x,3,11/3),'eyestalk_'+str(x)) + tile=bl.Element('98138p07',bl.Color.WHITE) + b.connect(tile,'tube',to=eye.find_connector('stud',facing=bl.Direction.FRONT),name='eye_'+str(x)) + # Raised open pincer: two fingers around a conspicuous notch. + add('3004','RED',(3,3,8/3),'raised_arm',bl.Rotation.DEG_90) + add('3001','RED',(1,3,11/3),'raised_palm') + add('60481a','RED',(1,3,14/3),'raised_finger_a') + add('60481a','RED',(4,3,14/3),'raised_finger_b',bl.Rotation.DEG_180) + add('3004','RED',(8,3,8/3),'lower_palm',bl.Rotation.DEG_90) + add('54200','RED',(8,3,11/3),'lower_finger_a',bl.Rotation.DEG_180) + add('54200','RED',(8,4,11/3),'lower_finger_b') + # Flag mounted to a real bar/clip connection. + pole=add('3957b','LIGHT_BLUISH_GRAY',(9,6,19/3),'flagpole') + clip=bl.Element('61252',bl.Color.LIGHT_BLUISH_GRAY) + fp=b.connect(clip,'clip',to=pole.find_connector('bar'),name='flag_clip') + flag=bl.Element('3004',bl.Color.RED) + b.connect(flag,flag.find_connector('antistud',toward=bl.Direction.RIGHT),to=fp.find_connector('stud',facing=None),name='flag') + # Open blue bucket, lying on its side, attached behind to a concealed mount. + add('3023b','DARK_AZURE',(12,3,1/3),'bucket_mount_foot') + mount=add('47905','BLACK',(12,3,2/3),'bucket_mount') + bucket=bl.LegoBuild() + bottom=bucket.add(bl.Element('3031',bl.Color.BLUE),name='bottom') + for y in [0,3]: + bucket.add(bl.Element('30414',bl.Color.BLUE),(0,y,1/3),rotation=bl.Rotation.DEG_180 if y==3 else bl.Rotation.DEG_0) + bucket.add(bl.Element('3710',bl.Color.BLUE),(0,y,4/3)) + for x in [0,3]: + bucket.add(bl.Element('3004',bl.Color.DARK_AZURE),(x,1,1/3),rotation=bl.Rotation.DEG_90) + source=bottom.find_connector('antistud',toward=(0.5,0.5,0)) + b.connect(bucket,source,to=mount.find_connector('stud',facing=bl.Direction.FRONT),target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90),name='tipped_bucket') + # Present the open entrance and the bucket mouth toward the display front. + front = bl.LegoBuild() + turn = bl.Pose(bl.Rotation.DEG_180.matrix, bl.Position(16,8,0)) + for p in b.placements: + front.add_raw(p.content,turn.compose(p.pose),name=b.name_of(p)) + return front + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + stock=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + over=[(pid,col,n,stock.get(pid,{}).get(col,0)) for (pid,col),n in used.items() if n>stock.get(pid,{}).get(col,0)] + tests.check('Inventory limits',not over,str(over)) + tests.check('Two crenellated towers',sum(p.content.ldraw_id=='3005' and p.content.color==bl.Color.MEDIUM_NOUGAT for p in b.flattened_placements)==8) + tests.check('Crab raises one claw',b.named('raised_finger_b').center.z>b.named('lower_finger_b').center.z+1) + tests.check('Doorway, flag and sideways blue bucket',all(n in b.names for n in ['doorway_arch','flag','tipped_bucket'])) + return tests.report() diff --git a/brickwright/alt/alt-071/hero-1024.avif b/brickwright/alt/alt-071/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..443e03d878a128f7ed8a884d44612f18542645fb Binary files /dev/null and b/brickwright/alt/alt-071/hero-1024.avif differ diff --git a/brickwright/alt/alt-071/model.mpd b/brickwright/alt/alt-071/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..a63e91828dfd554ed0b0d5dacfd5ebad859b9d66 --- /dev/null +++ b/brickwright/alt/alt-071/model.mpd @@ -0,0 +1,75 @@ +0 FILE main.ldr +0 main +0 Name: main +1 72 200 -8 40 -1 0 0 0 1 0 0 0 -1 3029.dat +1 14 60 -8 120 -1 0 0 0 1 0 0 0 -1 3032.dat +1 19 200 -16 80 -1 0 0 0 1 0 0 0 -1 3020.dat +1 19 120 -16 80 -1 0 0 0 1 0 0 0 -1 3020.dat +1 19 260 -16 120 -1 0 0 0 1 0 0 0 -1 3022.dat +1 19 140 -16 120 -1 0 0 0 1 0 0 0 -1 3022.dat +1 19 260 -8 130 -1 0 0 0 1 0 0 0 -1 3023b.dat +1 19 140 -8 130 -1 0 0 0 1 0 0 0 -1 3023b.dat +1 28 280 -32 40 -1 0 0 0 1 0 0 0 -1 3001.dat +1 28 280 -56 40 -1 0 0 0 1 0 0 0 -1 3001.dat +1 19 280 -80 40 -1 0 0 0 1 0 0 0 -1 3001.dat +1 226 280 -104 30 -1 0 0 0 1 0 0 0 -1 3010.dat +1 19 290 -104 50 -1 0 0 0 1 0 0 0 -1 3622.dat +1 226 280 -128 30 -1 0 0 0 1 0 0 0 -1 3010.dat +1 19 290 -128 50 -1 0 0 0 1 0 0 0 -1 3622.dat +1 19 280 -136 50 -1 0 0 0 1 0 0 0 -1 3710.dat +1 226 280 -152 30 -1 0 0 0 1 0 0 0 -1 3010.dat +1 84 310 -160 50 -1 0 0 0 1 0 0 0 -1 3005.dat +1 84 310 -176 30 -1 0 0 0 1 0 0 0 -1 3005.dat +1 84 250 -160 50 -1 0 0 0 1 0 0 0 -1 3005.dat +1 84 250 -176 30 -1 0 0 0 1 0 0 0 -1 3005.dat +1 28 120 -32 40 -1 0 0 0 1 0 0 0 -1 3001.dat +1 28 120 -56 40 -1 0 0 0 1 0 0 0 -1 3001.dat +1 19 120 -80 40 -1 0 0 0 1 0 0 0 -1 3001.dat +1 226 120 -104 30 -1 0 0 0 1 0 0 0 -1 3010.dat +1 19 110 -104 50 -1 0 0 0 1 0 0 0 -1 3622.dat +1 226 120 -128 30 -1 0 0 0 1 0 0 0 -1 3010.dat +1 19 110 -128 50 -1 0 0 0 1 0 0 0 -1 3622.dat +1 19 120 -136 50 -1 0 0 0 1 0 0 0 -1 3710.dat +1 226 120 -152 30 -1 0 0 0 1 0 0 0 -1 3010.dat +1 84 150 -160 50 -1 0 0 0 1 0 0 0 -1 3005.dat +1 84 150 -176 30 -1 0 0 0 1 0 0 0 -1 3005.dat +1 84 90 -160 50 -1 0 0 0 1 0 0 0 -1 3005.dat +1 84 90 -176 30 -1 0 0 0 1 0 0 0 -1 3005.dat +1 71 200 -128 50 -1 0 0 0 1 0 0 0 -1 15254.dat +1 19 300 -32 70 -1 0 0 0 1 0 0 0 -1 3004.dat +1 14 200 -16 10 -1 0 0 0 1 0 0 0 -1 60479.dat +1 4 200 -40 90 -1 0 0 0 1 0 0 0 -1 3659.dat +1 4 200 -40 70 -1 0 0 0 1 0 0 0 -1 3659.dat +1 4 200 -64 70 -1 0 0 0 1 0 0 0 -1 3009.dat +1 4 200 -64 90 -1 0 0 0 1 0 0 0 -1 3004.dat +1 4 250 -40 100 0 0 1 0 1 0 -1 0 0 3659.dat +1 4 150 -40 100 0 0 1 0 1 0 -1 0 0 3659.dat +1 4 200 -88 60 -1 0 0 0 1 0 0 0 -1 30165.dat +1 4 200 -88 90 -1 0 0 0 1 0 0 0 -1 3004.dat +1 4 210 -112 90 -1 0 0 0 1 0 0 0 -1 47905.dat +1 15 210 -102 108 -1 0 0 0 0 -1 0 -1 0 98138p07.dat +1 4 190 -112 90 -1 0 0 0 1 0 0 0 -1 47905.dat +1 15 190 -102 108 -1 0 0 0 0 -1 0 -1 0 98138p07.dat +1 4 250 -88 80 0 0 1 0 1 0 -1 0 0 3004.dat +1 4 260 -112 80 -1 0 0 0 1 0 0 0 -1 3001.dat +1 4 290 -160 70 -1 0 0 0 1 0 0 0 -1 60481a.dat +1 4 230 -160 90 1 0 0 0 1 0 0 0 1 60481a.dat +1 4 150 -88 80 0 0 1 0 1 0 -1 0 0 3004.dat +1 4 150 -88 90 1 0 0 0 1 0 0 0 1 54200.dat +1 4 150 -88 70 -1 0 0 0 1 0 0 0 -1 54200.dat +1 71 130 -160 30 -1 0 0 0 1 0 0 0 -1 3957b.dat +1 71 132 -205.5 50 0 -1 0 1 0 0 0 0 1 61252.dat +1 4 156 -195.5 50 0 -1 0 1 0 0 0 0 1 3004.dat +1 321 60 -16 90 -1 0 0 0 1 0 0 0 -1 3023b.dat +1 0 70 -40 90 -1 0 0 0 1 0 0 0 -1 47905.dat +1 16 80 -20 100 -1 0 0 0 0 -1 0 -1 0 tipped_bucket.ldr +0 FILE tipped_bucket.ldr +0 tipped_bucket +0 Name: tipped_bucket +1 1 40 -8 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 40 -32 10 1 0 0 0 1 0 0 0 1 30414.dat +1 1 40 -40 10 1 0 0 0 1 0 0 0 1 3710.dat +1 1 40 -32 70 -1 0 0 0 1 0 0 0 -1 30414.dat +1 1 40 -40 70 1 0 0 0 1 0 0 0 1 3710.dat +1 321 10 -32 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 321 70 -32 40 0 0 -1 0 1 0 1 0 0 3004.dat diff --git a/brickwright/alt/alt-071/thumb-512.avif b/brickwright/alt/alt-071/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..714626f67b513d96cb7728b6a34eabd0af30b493 Binary files /dev/null and b/brickwright/alt/alt-071/thumb-512.avif differ diff --git a/brickwright/alt/alt-071/trace.jsonl.gz b/brickwright/alt/alt-071/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..d6e46151f730ea011d0a109b684a144ebe31a562 --- /dev/null +++ b/brickwright/alt/alt-071/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8fdf3cd44ae618b891b935ecc7f8baf5dafbf1c11d7107eb0055af7c8379787d +size 8049 diff --git a/brickwright/alt/alt-071/view-0.avif b/brickwright/alt/alt-071/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..b20841e605fe1a2b75c3978437673c504f5321e6 Binary files /dev/null and b/brickwright/alt/alt-071/view-0.avif differ diff --git a/brickwright/alt/alt-071/view-1.avif b/brickwright/alt/alt-071/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..5580481a4fcf7299699933d5afd4b469d12ae3a9 Binary files /dev/null and b/brickwright/alt/alt-071/view-1.avif differ diff --git a/brickwright/alt/alt-071/view-2.avif b/brickwright/alt/alt-071/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..46fc24a37b4eaa77d8c591579167c6d866bb65e3 Binary files /dev/null and b/brickwright/alt/alt-071/view-2.avif differ diff --git a/brickwright/alt/alt-071/view-3.avif b/brickwright/alt/alt-071/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..44585881df0718f8e38b166c1dbb4a5e4d2a455f Binary files /dev/null and b/brickwright/alt/alt-071/view-3.avif differ diff --git a/brickwright/alt/alt-071/view-4.avif b/brickwright/alt/alt-071/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..c35e0e24af04c41e503b9ac8df7d7beb7a000a2e Binary files /dev/null and b/brickwright/alt/alt-071/view-4.avif differ diff --git a/brickwright/alt/alt-071/view-5.avif b/brickwright/alt/alt-071/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..926a08dc81e459fa8aac738fd94be2c12f70c730 Binary files /dev/null and b/brickwright/alt/alt-071/view-5.avif differ diff --git a/brickwright/alt/alt-071/view-6.avif b/brickwright/alt/alt-071/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..52a449428d077726ad2b094c1bcef2d1d20b446d Binary files /dev/null and b/brickwright/alt/alt-071/view-6.avif differ diff --git a/brickwright/alt/alt-071/view-7.avif b/brickwright/alt/alt-071/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..934daf32366eebcc905bebe64b5eabcb7284ca7a Binary files /dev/null and b/brickwright/alt/alt-071/view-7.avif differ diff --git a/brickwright/alt/alt-072/build.py b/brickwright/alt/alt-072/build.py new file mode 100644 index 0000000000000000000000000000000000000000..473b35a5d182d6f7b9b5a4cfda8d14f27bd0b92a --- /dev/null +++ b/brickwright/alt/alt-072/build.py @@ -0,0 +1,97 @@ +import json +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + C=bl.Color + def a(pid,c,x,y,z,r=0,name=None): + return b.add(bl.Element(pid,getattr(C,c)),(x,y,z),rotation=bl.Rotation(r),name=name) + a('91405','BRIGHT_GREEN',0,0,0,name='garden') + # Small, warm-coloured cottage with a real door and lattice windows. + b.add(bl.door(4,1,6,bl.DoorVariant.WINDOWED,door_color=C.YELLOW,frame_color=C.BLACK),(5,5,1/3),name='door') + for x in (3,9): + for h in (0,1): a('3004','MEDIUM_NOUGAT',x,5,1/3+h) + frame=a('60593','TAN',x,5,7/3) + # Open cottage windows keep the interior visible. + a('3004','BRIGHT_LIGHT_YELLOW',x,5,16/3) + for h in range(6): + z=1/3+h + for x in (3,10): + if h in (0,3): + a('3622','TAN',x,6,z,1) + a('3005','MEDIUM_NOUGAT',x,9,z) + else: a('3010','BRIGHT_LIGHT_YELLOW',x,6,z,1) + if h in (0,3): + for x in (3,7): a('3010','REDDISH_BROWN',x,10,z) + elif h in (1,4): + for x in (3,7): a('3010','LIGHT_BLUISH_GRAY',x,10,z) + else: + for x in (3,7): a('3001','TAN' if h==2 else 'DARK_TAN',x,10,z) + # Sloped magenta roof, projecting one stud beyond the walls. + for y in (4,10): a('3034','LIGHT_BLUISH_GRAY',3,y,19/3) + for x in (3,7): a('3031','BLUE',x,6,19/3) + for y,r in ((4,0),(10,2)): + for x in (3,7): a('3037','MAGENTA',x,y,20/3,r) + for y in (6,8): + a('2456','BLACK',4,y,20/3) + for x in (3,10): a('3004','BLACK',x,y,20/3,1) + for y,r in ((6,0),(8,2)): + for x in (3,5,7,9): a('3039','MAGENTA',x,y,23/3,r) + # Tall square brick chimney, bonded to both roof slopes. + for h in range(4): a('3003','DARK_RED',7,7,26/3+h,name='chimney_'+str(h)) + # Wide, shallow twig nest with an open bowl. + nz=38/3 + for y in (5,7): a('3795','REDDISH_BROWN',5,y,nz) + a('3020','TAN',6,9,nz) + for y in (5,10): a('15207','REDDISH_BROWN',6,y,nz+1/3,name='nest_rim_'+str(y)) + for x in (5,10): + for y in (6,8): a('30136','DARK_ORANGE',x,y,nz+1/3,1) + for y in (6,8): a('30367c','WHITE',8,y,nz+1/3,name='egg_'+str(y)) + # Stork: two slender red legs and a rounded white breast. + for x in (6,7): + a('6141','RED',x,7,13) + a('3004','RED',x,7,40/3,1,name='leg_'+str(x)) + for z in (43/3,46/3): a('6215','WHITE',6,6,z,1,name='body_'+str(z)) + # Black folded wings, on outward-facing white brackets. + for x,r in ((6,3),(7,1)): + p=a('44728','WHITE',x,6,49/3,r,name='wing_mount_'+str(x)) + wing=bl.Element('3040b',C.BLACK) + side=bl.Direction.RIGHT if x==6 else bl.Direction.LEFT + target=p.find_connector('stud',facing=side,toward=bl.Direction.UP) + b.connect(wing,wing.find_connector('antistud',toward=bl.Direction.RIGHT),to=target,mounting=bl.Mounting(angle=180),name='wing_'+str(x)) + # Long upright neck, head and forward-projecting tapered bill. + for z in (50/3,53/3): a('3005','WHITE',7,6,z) + head=a('47905','BLACK',7,6,56/3,1,name='head') + for side in (bl.Direction.LEFT,bl.Direction.RIGHT): + eye=bl.Element('98138p07',C.WHITE) + b.connect(eye,'antistud',to=head.find_connector('stud',facing=side),name='eye_'+side.name) + cap=a('6215','WHITE',7,4,59/3,1,name='head_cap') + # Front beak mounted below the projecting white forehead. + mount=a('47905','RED',7,4,56/3,name='beak_mount') + bill=bl.Element('60481a',C.RED) + b.connect(bill,bill.find_connector('antistud',toward=bl.Direction.BACK),to=mount.find_connector('stud',facing=bl.Direction.FRONT),name='long_red_beak') + # A short stone path and two flowers ground the cottage in its garden. + for y in (1,3): a('87079','LIGHT_BLUISH_GRAY',5,y,1/3) + for x in (2,12): + a('4727','BRIGHT_GREEN',x,3,1/3) + return b + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + stock=json.load(open('/inputs/parts.json')) + excess=[] + for e,n in b.list_elements().items(): + available=stock.get(e.ldraw_id,{}).get(e.color.name,0) + if n>available: excess.append((e.ldraw_id,e.color.name,n,available)) + t.check('Only supplied parts and quantities',not excess,str(excess)) + t.check('Two white eggs in the nest',sum(e.ldraw_id=='30367c' and e.color==bl.Color.WHITE for e in b.list_elements().elements())==2) + t.check('Nest above chimney',b.named('nest_rim_5').bounding_box[0].z>=b.named('chimney_3').bounding_box[1].z-0.2) + t.check('Stork has two black wings',all(b.named('wing_'+str(x)).content.color==bl.Color.BLACK for x in (6,7))) + return t.report() diff --git a/brickwright/alt/alt-072/hero-1024.avif b/brickwright/alt/alt-072/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..6671a96da4c32d37be23f8d64306bed3c3b28ad7 Binary files /dev/null and b/brickwright/alt/alt-072/hero-1024.avif differ diff --git a/brickwright/alt/alt-072/model.mpd b/brickwright/alt/alt-072/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..e6af30aa097b0878f2c2d90b09f3905c6c59688d --- /dev/null +++ b/brickwright/alt/alt-072/model.mpd @@ -0,0 +1,105 @@ +0 FILE main.ldr +0 main +0 Name: main +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 16 140 -8 110 1 0 0 0 1 0 0 0 1 door.ldr +1 84 80 -32 110 1 0 0 0 1 0 0 0 1 3004.dat +1 84 80 -56 110 1 0 0 0 1 0 0 0 1 3004.dat +1 19 80 -128 110 1 0 0 0 1 0 0 0 1 60593.dat +1 226 80 -152 110 1 0 0 0 1 0 0 0 1 3004.dat +1 84 200 -32 110 1 0 0 0 1 0 0 0 1 3004.dat +1 84 200 -56 110 1 0 0 0 1 0 0 0 1 3004.dat +1 19 200 -128 110 1 0 0 0 1 0 0 0 1 60593.dat +1 226 200 -152 110 1 0 0 0 1 0 0 0 1 3004.dat +1 19 70 -32 150 0 0 -1 0 1 0 1 0 0 3622.dat +1 84 70 -32 190 1 0 0 0 1 0 0 0 1 3005.dat +1 19 210 -32 150 0 0 -1 0 1 0 1 0 0 3622.dat +1 84 210 -32 190 1 0 0 0 1 0 0 0 1 3005.dat +1 70 100 -32 210 1 0 0 0 1 0 0 0 1 3010.dat +1 70 180 -32 210 1 0 0 0 1 0 0 0 1 3010.dat +1 226 70 -56 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 210 -56 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 100 -56 210 1 0 0 0 1 0 0 0 1 3010.dat +1 71 180 -56 210 1 0 0 0 1 0 0 0 1 3010.dat +1 226 70 -80 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 210 -80 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 19 100 -80 220 1 0 0 0 1 0 0 0 1 3001.dat +1 19 180 -80 220 1 0 0 0 1 0 0 0 1 3001.dat +1 19 70 -104 150 0 0 -1 0 1 0 1 0 0 3622.dat +1 84 70 -104 190 1 0 0 0 1 0 0 0 1 3005.dat +1 19 210 -104 150 0 0 -1 0 1 0 1 0 0 3622.dat +1 84 210 -104 190 1 0 0 0 1 0 0 0 1 3005.dat +1 70 100 -104 210 1 0 0 0 1 0 0 0 1 3010.dat +1 70 180 -104 210 1 0 0 0 1 0 0 0 1 3010.dat +1 226 70 -128 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 210 -128 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 100 -128 210 1 0 0 0 1 0 0 0 1 3010.dat +1 71 180 -128 210 1 0 0 0 1 0 0 0 1 3010.dat +1 226 70 -152 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 226 210 -152 160 0 0 -1 0 1 0 1 0 0 3010.dat +1 28 100 -152 220 1 0 0 0 1 0 0 0 1 3001.dat +1 28 180 -152 220 1 0 0 0 1 0 0 0 1 3001.dat +1 71 140 -160 100 1 0 0 0 1 0 0 0 1 3034.dat +1 71 140 -160 220 1 0 0 0 1 0 0 0 1 3034.dat +1 1 100 -160 160 1 0 0 0 1 0 0 0 1 3031.dat +1 1 180 -160 160 1 0 0 0 1 0 0 0 1 3031.dat +1 26 100 -184 110 1 0 0 0 1 0 0 0 1 3037.dat +1 26 180 -184 110 1 0 0 0 1 0 0 0 1 3037.dat +1 26 100 -184 210 -1 0 0 0 1 0 0 0 -1 3037.dat +1 26 180 -184 210 -1 0 0 0 1 0 0 0 -1 3037.dat +1 0 140 -184 140 1 0 0 0 1 0 0 0 1 2456.dat +1 0 70 -184 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 210 -184 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 140 -184 180 1 0 0 0 1 0 0 0 1 2456.dat +1 0 70 -184 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 210 -184 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 26 80 -208 150 1 0 0 0 1 0 0 0 1 3039.dat +1 26 120 -208 150 1 0 0 0 1 0 0 0 1 3039.dat +1 26 160 -208 150 1 0 0 0 1 0 0 0 1 3039.dat +1 26 200 -208 150 1 0 0 0 1 0 0 0 1 3039.dat +1 26 80 -208 170 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 120 -208 170 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 160 -208 170 -1 0 0 0 1 0 0 0 -1 3039.dat +1 26 200 -208 170 -1 0 0 0 1 0 0 0 -1 3039.dat +1 320 160 -232 160 1 0 0 0 1 0 0 0 1 3003.dat +1 320 160 -256 160 1 0 0 0 1 0 0 0 1 3003.dat +1 320 160 -280 160 1 0 0 0 1 0 0 0 1 3003.dat +1 320 160 -304 160 1 0 0 0 1 0 0 0 1 3003.dat +1 70 160 -312 120 1 0 0 0 1 0 0 0 1 3795.dat +1 70 160 -312 160 1 0 0 0 1 0 0 0 1 3795.dat +1 19 160 -312 200 1 0 0 0 1 0 0 0 1 3020.dat +1 70 160 -336 110 1 0 0 0 1 0 0 0 1 15207.dat +1 70 160 -336 210 1 0 0 0 1 0 0 0 1 15207.dat +1 484 110 -336 140 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 110 -336 180 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 210 -336 140 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 210 -336 180 0 0 -1 0 1 0 1 0 0 30136.dat +1 15 180 -336 140 1 0 0 0 1 0 0 0 1 30367c.dat +1 15 180 -336 180 1 0 0 0 1 0 0 0 1 30367c.dat +1 4 130 -320 150 1 0 0 0 1 0 0 0 1 6141.dat +1 4 130 -344 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 150 -320 150 1 0 0 0 1 0 0 0 1 6141.dat +1 4 150 -344 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 15 140 -368 140 0 0 -1 0 1 0 1 0 0 6215.dat +1 15 140 -392 140 0 0 -1 0 1 0 1 0 0 6215.dat +1 15 130 -400 140 0 0 1 0 1 0 -1 0 0 44728.dat +1 0 92 -370 130 0 1 0 0 0 1 1 0 0 3040b.dat +1 15 150 -400 140 0 0 -1 0 1 0 1 0 0 44728.dat +1 0 188 -370 130 0 -1 0 0 0 1 -1 0 0 3040b.dat +1 15 150 -424 130 1 0 0 0 1 0 0 0 1 3005.dat +1 15 150 -448 130 1 0 0 0 1 0 0 0 1 3005.dat +1 0 150 -472 130 0 0 -1 0 1 0 1 0 0 47905.dat +1 15 168 -462 130 0 -1 0 0 0 -1 1 0 0 98138p07.dat +1 15 132 -462 130 0 1 0 0 0 1 1 0 0 98138p07.dat +1 15 160 -496 100 0 0 -1 0 1 0 1 0 0 6215.dat +1 4 150 -472 90 1 0 0 0 1 0 0 0 1 47905.dat +1 4 150 -462 32 1 0 0 0 0 -1 0 1 0 60481a.dat +1 71 140 -16 40 1 0 0 0 1 0 0 0 1 87079.dat +1 71 140 -16 80 1 0 0 0 1 0 0 0 1 87079.dat +1 10 50 -32 70 1 0 0 0 1 0 0 0 1 4727.dat +1 10 250 -32 70 1 0 0 0 1 0 0 0 1 4727.dat +0 FILE door.ldr +0 door +0 Name: door +1 0 0 -144 0 -1 0 0 0 1 0 0 0 -1 60596.dat +1 14 -32 -144 -5 1 0 0 0 1 0 0 0 1 60623.dat diff --git a/brickwright/alt/alt-072/thumb-512.avif b/brickwright/alt/alt-072/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..c233d40fbfedbc8bf55f951c129403a572711786 Binary files /dev/null and b/brickwright/alt/alt-072/thumb-512.avif differ diff --git a/brickwright/alt/alt-072/trace.jsonl.gz b/brickwright/alt/alt-072/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..56a709a6240b8e67ff5ce8b58b31effe3ae49788 --- /dev/null +++ b/brickwright/alt/alt-072/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e87950ebdb3919b89cfe85468edae8e52a9132d5afd3d716bdafd2fb83cbeaf0 +size 8202 diff --git a/brickwright/alt/alt-072/view-0.avif b/brickwright/alt/alt-072/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..e65a991f0a6e7071bcff90b8371c40f9ea56ac05 Binary files /dev/null and b/brickwright/alt/alt-072/view-0.avif differ diff --git a/brickwright/alt/alt-072/view-1.avif b/brickwright/alt/alt-072/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..2023f62fb71af7983b8bbbb33f01057d88359ed3 Binary files /dev/null and b/brickwright/alt/alt-072/view-1.avif differ diff --git a/brickwright/alt/alt-072/view-2.avif b/brickwright/alt/alt-072/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..3f2693eac2426af0f40dc8f81ebe9b5f8d20f502 Binary files /dev/null and b/brickwright/alt/alt-072/view-2.avif differ diff --git a/brickwright/alt/alt-072/view-3.avif b/brickwright/alt/alt-072/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..b77fee8f1400c500323749c47a4334a03e3cae41 Binary files /dev/null and b/brickwright/alt/alt-072/view-3.avif differ diff --git a/brickwright/alt/alt-072/view-4.avif b/brickwright/alt/alt-072/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..1929a120cff4a4727b0ae1f87cb38a3331a96e76 Binary files /dev/null and b/brickwright/alt/alt-072/view-4.avif differ diff --git a/brickwright/alt/alt-072/view-5.avif b/brickwright/alt/alt-072/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..d60443f36d65a2d4a7da39d21705975e1d2d63fa Binary files /dev/null and b/brickwright/alt/alt-072/view-5.avif differ diff --git a/brickwright/alt/alt-072/view-6.avif b/brickwright/alt/alt-072/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..1d9751746b134bae513f3182d8a9269fed18c435 Binary files /dev/null and b/brickwright/alt/alt-072/view-6.avif differ diff --git a/brickwright/alt/alt-072/view-7.avif b/brickwright/alt/alt-072/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..11dd53500e63ab940a9b7bb9de2e95e5034eab99 Binary files /dev/null and b/brickwright/alt/alt-072/view-7.avif differ diff --git a/brickwright/alt/alt-073/build.py b/brickwright/alt/alt-073/build.py new file mode 100644 index 0000000000000000000000000000000000000000..e56183b7fab4f02254b4e719cecd0efa9af3703d --- /dev/null +++ b/brickwright/alt/alt-073/build.py @@ -0,0 +1,92 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid, color, x,y,z, name=None, rot=bl.Rotation.DEG_0): + return b.add(bl.Element(pid, getattr(bl.Color,color)), (x,y,z), rotation=rot, name=name) + put('91405','BRIGHT_GREEN',0,0,0,'grass') + put('3029','DARK_BLUISH_GRAY',3,2,1/3,'pavement') + # A hollow, horizontal rubbish bin: open front, closed back and ribbed sides. + put('3034','LIGHT_BLUISH_GRAY',5,2,2/3,'bin_floor') + for x in [5,9]: put('87079','LIGHT_BLUISH_GRAY',x,4,2/3) + for x in [5,12]: + put('3010','LIGHT_BLUISH_GRAY',x,2,1,rot=bl.Rotation.DEG_90) + for y in [2,4]: put('3245c','LIGHT_BLUISH_GRAY',x,y,2,rot=bl.Rotation.DEG_90) + for x in [6,8,10]: + put('3004','LIGHT_BLUISH_GRAY',x,5,1) + put('3245c','LIGHT_BLUISH_GRAY',x,5,2) + put('3034','LIGHT_BLUISH_GRAY',5,4,4,'bin_upper_rim') + for x in [5,9]: put('87079','LIGHT_BLUISH_GRAY',x,2,4) + # Raccoon: dark hind feet, grey back, reaching black arms. + for x in [7,9]: put('3002','BLACK',x,6,1/3,rot=bl.Rotation.DEG_90) + for z,col in [(4/3,'DARK_BLUISH_GRAY'),(7/3,'LIGHT_BLUISH_GRAY'),(10/3,'DARK_BLUISH_GRAY')]: + put('3001',col,7,7,z) + put('3001','LIGHT_BLUISH_GRAY',7,8,13/3,'shoulders') + for x,n in [(6,'right_front_paw'),(10,'left_front_paw')]: + put('3002','BLACK',x,5,13/3,n,bl.Rotation.DEG_90) + put('3660b','WHITE',8,6,13/3,'chest_support') + put('3001','LIGHT_BLUISH_GRAY',7,7,16/3,'head') + put('3004','WHITE',8,6,16/3,'muzzle') + for x in [7,10]: put('3005','WHITE',x,6,16/3) + for x in [7,10]: + eye_mount=put('47905','BLACK',x,7,19/3) + eye=bl.Element('98138p07',bl.Color.WHITE) + b.connect(eye,eye.find_connector('antistud'),to=eye_mount.find_connector('stud',facing=bl.Direction.FRONT)) + put('3004','BLACK',8,7,19/3) + put('85984','BLACK',8,6,19/3,'nose') + # Remaining grey forehead is made from narrow bricks. + # Rear-facing studs are left exposed inside the head. + put('3001','DARK_BLUISH_GRAY',7,7,22/3,'forehead') + for x in [7,10]: put('3040b','BLACK',x,7,25/3,'ear_'+str(x)) + # Broad alternating bands on the raised, curling tail. + put('3002','BLACK',4,8,1/3,'tail_root') + for x,z,col in [(4,4/3,'LIGHT_BLUISH_GRAY'),(3,10/3,'LIGHT_BLUISH_GRAY'),(2,16/3,'DARK_BLUISH_GRAY')]: + for y in [8,9]: put('3004',col,x,y,z,'tail_band_'+str(x)+'_'+str(y)) + put('3002','BLACK',3,8,7/3) + put('3002','BLACK',2,8,13/3) + for x in [2,3]: put('3040b','BLACK',x,8,19/3) + # Detached square lid with a round raised handle, beside the tipped bin. + put('11212','DARK_BLUISH_GRAY',12,8,1/3,'detached_lid') + put('14769','DARK_BLUISH_GRAY',12,8,2/3,'lid_handle') + # Blue-grey fish spilled on the grass, with a flared tail and an eye. + put('3020','MEDIUM_AZURE',0,3,1/3,'fish_underside',bl.Rotation.DEG_90) + for x in [0,1]: put('50950','MEDIUM_AZURE',x,3,2/3,'fish_body_'+str(x)) + put('3045','MEDIUM_AZURE',0,6,2/3,'fish_tail') + put('3004','MEDIUM_AZURE',0,2,1/3,'fish_head') + put('98138p07','WHITE',0,2,4/3,'fish_eye') + # Timber fence, with visible log-grain palings and two stout posts. + for x in [1,11]: + put('3004','MEDIUM_NOUGAT',x,12,1/3) + put('3004','MEDIUM_NOUGAT',x,13,1/3) + for h in range(4): put('3003','MEDIUM_NOUGAT',x,12,4/3+h) + for x in [3,7]: + put('15207','REDDISH_BROWN',x,13,1/3) + for z in [4/3,10/3]: put('3010','REDDISH_BROWN',x,13,z) + for x in [3,5,7,9]: + for z in [7/3,13/3]: put('30136','DARK_ORANGE',x,13,z) + for x in [1,7]: put('3795','REDDISH_BROWN',x,12,16/3,'fence_cap_'+str(x)) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):v for k,v in used.items() if v>inventory.get(k[0],{}).get(k[1],0)} + tests.check('Only available parts and quantities',not excess,str(excess)) + rim=b.named('bin_upper_rim').alignment_box + paws=[b.named(n) for n in ['left_front_paw','right_front_paw']] + tests.check('Both front paws rest on the overturned bin rim',all(abs(p.alignment_box[0].z-rim[1].z)<.001 and p.alignment_box[0].yb.named('head').alignment_box[1].y) + tests.check('Fish outside bin',b.named('fish_body_0').alignment_box[1].xb.named('bin_upper_rim').alignment_box[1].y) + return tests.report() diff --git a/brickwright/alt/alt-073/hero-1024.avif b/brickwright/alt/alt-073/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..9a2e389975f4b62b8ff1e97bd42e5d4242be4ba6 Binary files /dev/null and b/brickwright/alt/alt-073/hero-1024.avif differ diff --git a/brickwright/alt/alt-073/model.mpd b/brickwright/alt/alt-073/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..67139df6c8b685e718d1d22d8f7e8423a65740ba --- /dev/null +++ b/brickwright/alt/alt-073/model.mpd @@ -0,0 +1,89 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 72 180 -16 80 1 0 0 0 1 0 0 0 1 3029.dat +1 71 180 -24 60 1 0 0 0 1 0 0 0 1 3034.dat +1 71 140 -24 100 1 0 0 0 1 0 0 0 1 87079.dat +1 71 220 -24 100 1 0 0 0 1 0 0 0 1 87079.dat +1 71 110 -48 80 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 110 -96 60 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 110 -96 100 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 250 -48 80 0 0 -1 0 1 0 1 0 0 3010.dat +1 71 250 -96 60 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 250 -96 100 0 0 -1 0 1 0 1 0 0 3245c.dat +1 71 140 -48 110 1 0 0 0 1 0 0 0 1 3004.dat +1 71 140 -96 110 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 180 -48 110 1 0 0 0 1 0 0 0 1 3004.dat +1 71 180 -96 110 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 220 -48 110 1 0 0 0 1 0 0 0 1 3004.dat +1 71 220 -96 110 1 0 0 0 1 0 0 0 1 3245c.dat +1 71 180 -104 100 1 0 0 0 1 0 0 0 1 3034.dat +1 71 140 -104 60 1 0 0 0 1 0 0 0 1 87079.dat +1 71 220 -104 60 1 0 0 0 1 0 0 0 1 87079.dat +1 0 160 -32 150 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 200 -32 150 0 0 -1 0 1 0 1 0 0 3002.dat +1 72 180 -56 160 1 0 0 0 1 0 0 0 1 3001.dat +1 71 180 -80 160 1 0 0 0 1 0 0 0 1 3001.dat +1 72 180 -104 160 1 0 0 0 1 0 0 0 1 3001.dat +1 71 180 -128 180 1 0 0 0 1 0 0 0 1 3001.dat +1 0 140 -128 130 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 220 -128 130 0 0 -1 0 1 0 1 0 0 3002.dat +1 15 180 -128 150 1 0 0 0 1 0 0 0 1 3660b.dat +1 71 180 -152 160 1 0 0 0 1 0 0 0 1 3001.dat +1 15 180 -152 130 1 0 0 0 1 0 0 0 1 3004.dat +1 15 150 -152 130 1 0 0 0 1 0 0 0 1 3005.dat +1 15 210 -152 130 1 0 0 0 1 0 0 0 1 3005.dat +1 0 150 -176 150 1 0 0 0 1 0 0 0 1 47905.dat +1 15 150 -166 132 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 0 210 -176 150 1 0 0 0 1 0 0 0 1 47905.dat +1 15 210 -166 132 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 0 180 -176 150 1 0 0 0 1 0 0 0 1 3004.dat +1 0 180 -152 130 1 0 0 0 1 0 0 0 1 85984.dat +1 72 180 -200 160 1 0 0 0 1 0 0 0 1 3001.dat +1 0 150 -224 170 1 0 0 0 1 0 0 0 1 3040b.dat +1 0 210 -224 170 1 0 0 0 1 0 0 0 1 3040b.dat +1 0 110 -32 180 1 0 0 0 1 0 0 0 1 3002.dat +1 71 100 -56 170 1 0 0 0 1 0 0 0 1 3004.dat +1 71 100 -56 190 1 0 0 0 1 0 0 0 1 3004.dat +1 71 80 -104 170 1 0 0 0 1 0 0 0 1 3004.dat +1 71 80 -104 190 1 0 0 0 1 0 0 0 1 3004.dat +1 72 60 -152 170 1 0 0 0 1 0 0 0 1 3004.dat +1 72 60 -152 190 1 0 0 0 1 0 0 0 1 3004.dat +1 0 90 -80 180 1 0 0 0 1 0 0 0 1 3002.dat +1 0 70 -128 180 1 0 0 0 1 0 0 0 1 3002.dat +1 0 50 -176 190 1 0 0 0 1 0 0 0 1 3040b.dat +1 0 70 -176 190 1 0 0 0 1 0 0 0 1 3040b.dat +1 72 270 -16 190 1 0 0 0 1 0 0 0 1 11212.dat +1 72 260 -24 180 1 0 0 0 1 0 0 0 1 14769.dat +1 322 20 -16 100 0 0 -1 0 1 0 1 0 0 3020.dat +1 322 10 -40 90 1 0 0 0 1 0 0 0 1 50950.dat +1 322 30 -40 90 1 0 0 0 1 0 0 0 1 50950.dat +1 322 10 -40 150 1 0 0 0 1 0 0 0 1 3045.dat +1 322 20 -32 50 1 0 0 0 1 0 0 0 1 3004.dat +1 15 10 -40 50 1 0 0 0 1 0 0 0 1 98138p07.dat +1 84 40 -32 250 1 0 0 0 1 0 0 0 1 3004.dat +1 84 40 -32 270 1 0 0 0 1 0 0 0 1 3004.dat +1 84 40 -56 260 1 0 0 0 1 0 0 0 1 3003.dat +1 84 40 -80 260 1 0 0 0 1 0 0 0 1 3003.dat +1 84 40 -104 260 1 0 0 0 1 0 0 0 1 3003.dat +1 84 40 -128 260 1 0 0 0 1 0 0 0 1 3003.dat +1 84 240 -32 250 1 0 0 0 1 0 0 0 1 3004.dat +1 84 240 -32 270 1 0 0 0 1 0 0 0 1 3004.dat +1 84 240 -56 260 1 0 0 0 1 0 0 0 1 3003.dat +1 84 240 -80 260 1 0 0 0 1 0 0 0 1 3003.dat +1 84 240 -104 260 1 0 0 0 1 0 0 0 1 3003.dat +1 84 240 -128 260 1 0 0 0 1 0 0 0 1 3003.dat +1 70 100 -32 270 1 0 0 0 1 0 0 0 1 15207.dat +1 70 100 -56 270 1 0 0 0 1 0 0 0 1 3010.dat +1 70 100 -104 270 1 0 0 0 1 0 0 0 1 3010.dat +1 70 180 -32 270 1 0 0 0 1 0 0 0 1 15207.dat +1 70 180 -56 270 1 0 0 0 1 0 0 0 1 3010.dat +1 70 180 -104 270 1 0 0 0 1 0 0 0 1 3010.dat +1 484 80 -80 270 1 0 0 0 1 0 0 0 1 30136.dat +1 484 80 -128 270 1 0 0 0 1 0 0 0 1 30136.dat +1 484 120 -80 270 1 0 0 0 1 0 0 0 1 30136.dat +1 484 120 -128 270 1 0 0 0 1 0 0 0 1 30136.dat +1 484 160 -80 270 1 0 0 0 1 0 0 0 1 30136.dat +1 484 160 -128 270 1 0 0 0 1 0 0 0 1 30136.dat +1 484 200 -80 270 1 0 0 0 1 0 0 0 1 30136.dat +1 484 200 -128 270 1 0 0 0 1 0 0 0 1 30136.dat +1 70 80 -136 260 1 0 0 0 1 0 0 0 1 3795.dat +1 70 200 -136 260 1 0 0 0 1 0 0 0 1 3795.dat diff --git a/brickwright/alt/alt-073/thumb-512.avif b/brickwright/alt/alt-073/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..ab19e7840f09b1f4ceb31c8260eb01322c150729 Binary files /dev/null and b/brickwright/alt/alt-073/thumb-512.avif differ diff --git a/brickwright/alt/alt-073/trace.jsonl.gz b/brickwright/alt/alt-073/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..4c3451aa0fb7eded28e6d88a670837c52d638de6 --- /dev/null +++ b/brickwright/alt/alt-073/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c6e3c849889c341e65bb57ba412b051fc83125f002707acab5df225752a424d +size 7261 diff --git a/brickwright/alt/alt-073/view-0.avif b/brickwright/alt/alt-073/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..2c0a4366782778411e80a1357139671834d7dd41 Binary files /dev/null and b/brickwright/alt/alt-073/view-0.avif differ diff --git a/brickwright/alt/alt-073/view-1.avif b/brickwright/alt/alt-073/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..1b626eeec2347805b5ec4aeecf3ad153ccfb4a7d Binary files /dev/null and b/brickwright/alt/alt-073/view-1.avif differ diff --git a/brickwright/alt/alt-073/view-2.avif b/brickwright/alt/alt-073/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..f9a9e202e358016024d946ea191b813ed448906b Binary files /dev/null and b/brickwright/alt/alt-073/view-2.avif differ diff --git a/brickwright/alt/alt-073/view-3.avif b/brickwright/alt/alt-073/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..be2c1c848b6514c8f8aa9a4cf85db6c47d033b14 Binary files /dev/null and b/brickwright/alt/alt-073/view-3.avif differ diff --git a/brickwright/alt/alt-073/view-4.avif b/brickwright/alt/alt-073/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..d9b11d1ebe62ee70852cbcc8ff73a84b563cbc7b Binary files /dev/null and b/brickwright/alt/alt-073/view-4.avif differ diff --git a/brickwright/alt/alt-073/view-5.avif b/brickwright/alt/alt-073/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..1e3593e92fb54798314c9f209a697e377981709b Binary files /dev/null and b/brickwright/alt/alt-073/view-5.avif differ diff --git a/brickwright/alt/alt-073/view-6.avif b/brickwright/alt/alt-073/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..531f9a12ea48d713a40308b100bea62ab524b433 Binary files /dev/null and b/brickwright/alt/alt-073/view-6.avif differ diff --git a/brickwright/alt/alt-073/view-7.avif b/brickwright/alt/alt-073/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..ca2f67128d558084271aafdc75dd169d45fd4c3b Binary files /dev/null and b/brickwright/alt/alt-073/view-7.avif differ diff --git a/brickwright/alt/alt-074/build.py b/brickwright/alt/alt-074/build.py new file mode 100644 index 0000000000000000000000000000000000000000..4e30234c251fb71eefe52c969ffab816bc460c44 --- /dev/null +++ b/brickwright/alt/alt-074/build.py @@ -0,0 +1,84 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + C=bl.Color + def put(pid,c,x,y,z,r=0,name=None): + return b.add(bl.Element(pid,c),(x,y,z),rotation=bl.Rotation(r),name=name) + put('91405',C.BRIGHT_GREEN,0,0,0,name='bank') + # A continuous blue stream, with azure ripples along its banks. + for y in (2,6,10): put('3031',C.BLUE,6,y,1/3) + for x in (4,10): + for y in (4,8): put('3020',C.MEDIUM_AZURE,x,y,1/3,1) + for x in (6,8): put('3023b',C.DARK_AZURE,x,14,1/3) + for y in (0,1,15): put('3710',C.BLUE,6,y,1/3) + # Two substantial timber abutments, leaving the waterway open. + for x in (2,12): + for y in (6,8): + put('3003',C.DARK_TAN,x,y,1/3) + put('3003',C.MEDIUM_NOUGAT,x,y,4/3) + for x in (3,10): + for y in (6,8): put('3002',C.REDDISH_BROWN,x,y,7/3) + for y in (6,8): put('3795',C.REDDISH_BROWN,5,y,10/3,name='deck_'+str(y)) + for x in (5,10): + for y in (5,9): put('30136',C.DARK_ORANGE,x,y,11/3,1) + for x in (4,8): + for y in (5,9): put('3010',C.REDDISH_BROWN,x,y,14/3,name='rail_%s_%s'%(x,y)) + # Crocodile: open lower jaw, raised upper snout, eyes and ridged back. + put('3021',C.GREEN,7,2,2/3,1,name='lower_jaw') + put('3021',C.GREEN,7,5,2/3,1) + put('3003',C.GREEN,7,4,1,name='jaw_root') + for x in (7,8): put('4287c',C.GREEN,x,2,2,name='upper_jaw_'+str(x)) + for x in (7,8): put('2431',C.GREEN,x,1,3,1) + for y in (2,3): put('3069b',C.WHITE,7,y,1,name='teeth_'+str(y)) + for x,r in ((7,3),(8,1)): + eye=put('4070',C.GREEN,x,5,2,r) + disk=bl.Element('98138p07',C.WHITE) + b.connect(disk,'antistud',to=eye.find_connector('stud',facing=bl.Direction.RIGHT if x==7 else bl.Direction.LEFT),name='croc_eye_'+str(x)) + for y in (9,11): put('3023b',C.TAN,7,y,2/3) + put('3001',C.GREEN,7,7,1,1,name='body') + put('3003',C.GREEN,7,11,1) + put('3039',C.GREEN,7,13,1,2,name='tail_tip') + put('3003',C.GREEN,7,6,2) + for y in (8,10,12): put('3039',C.GREEN,7,y,2,2) + # Four splayed feet. + for x,r in ((5,3),(9,1)): + for y in (7,10): put('3040b',C.GREEN,x,y,2/3,r,name='foot_%s_%s'%(x,y)) + # Small white bird, black face, orange beak, perched on the near rail. + put('3023b',C.ORANGE,8,5,17/3,name='bird_feet') + put('3005',C.WHITE,8,5,6,name='bird_body') + put('3040b',C.WHITE,9,5,6,2,name='bird_tail') + put('3023b',C.ORANGE,7,5,7,name='bird_beak') + head=put('47905',C.BLACK,8,5,22/3,name='bird_head') + for direction in (bl.Direction.FRONT,bl.Direction.BACK): + e=bl.Element('98138p07',C.WHITE) + b.connect(e,'antistud',to=head.find_connector('stud',facing=direction)) + put('54200',C.RED,8,5,25/3,name='bird_crest') + # Plants on the grassy banks. + for x,y in ((2,3),(12,12),(3,13)): + put('4727',C.BRIGHT_GREEN,x,y,1/3) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess=[(pid,c,n,inventory.get(pid,{}).get(c,0)) for (pid,c),n in used.items() if n>inventory.get(pid,{}).get(c,0)] + tests.check('Uses only supplied inventory',not excess,str(excess)) + tests.check('Crocodile head protrudes beyond bridge',b.named('lower_jaw').bounding_box[0].y < b.named('deck_6').bounding_box[0].y) + tests.check('Bird perched above crocodile head',b.named('bird_feet').bounding_box[0].z>b.named('upper_jaw_7').bounding_box[1].z) + tests.check('Blue stream below bridge',sum(n for (pid,c),n in used.items() if c in ('BLUE','MEDIUM_AZURE','DARK_AZURE'))>=10) + head=b.named('croc_eye_8').center + perch=b.named('bird_feet').center + tests.check('Bird directly over head',abs(head.x-perch.x)<=1.5 and abs(head.y-perch.y)<=1.0) + tests.check('Open jaws have visible clearance',b.named('upper_jaw_7').bounding_box[0].z-b.named('teeth_2').bounding_box[1].z>=0.5) + return tests.report() diff --git a/brickwright/alt/alt-074/hero-1024.avif b/brickwright/alt/alt-074/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..de54fe4921e8d300754508d6c1173d8bba46d3ec Binary files /dev/null and b/brickwright/alt/alt-074/hero-1024.avif differ diff --git a/brickwright/alt/alt-074/model.mpd b/brickwright/alt/alt-074/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..65378edcf9d83d35893bef0d84343d6319e5e5fd --- /dev/null +++ b/brickwright/alt/alt-074/model.mpd @@ -0,0 +1,72 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 1 160 -16 80 1 0 0 0 1 0 0 0 1 3031.dat +1 1 160 -16 160 1 0 0 0 1 0 0 0 1 3031.dat +1 1 160 -16 240 1 0 0 0 1 0 0 0 1 3031.dat +1 322 100 -16 120 0 0 -1 0 1 0 1 0 0 3020.dat +1 322 100 -16 200 0 0 -1 0 1 0 1 0 0 3020.dat +1 322 220 -16 120 0 0 -1 0 1 0 1 0 0 3020.dat +1 322 220 -16 200 0 0 -1 0 1 0 1 0 0 3020.dat +1 321 140 -16 290 1 0 0 0 1 0 0 0 1 3023b.dat +1 321 180 -16 290 1 0 0 0 1 0 0 0 1 3023b.dat +1 1 160 -16 10 1 0 0 0 1 0 0 0 1 3710.dat +1 1 160 -16 30 1 0 0 0 1 0 0 0 1 3710.dat +1 1 160 -16 310 1 0 0 0 1 0 0 0 1 3710.dat +1 28 60 -32 140 1 0 0 0 1 0 0 0 1 3003.dat +1 84 60 -56 140 1 0 0 0 1 0 0 0 1 3003.dat +1 28 60 -32 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 60 -56 180 1 0 0 0 1 0 0 0 1 3003.dat +1 28 260 -32 140 1 0 0 0 1 0 0 0 1 3003.dat +1 84 260 -56 140 1 0 0 0 1 0 0 0 1 3003.dat +1 28 260 -32 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 260 -56 180 1 0 0 0 1 0 0 0 1 3003.dat +1 70 90 -80 140 1 0 0 0 1 0 0 0 1 3002.dat +1 70 90 -80 180 1 0 0 0 1 0 0 0 1 3002.dat +1 70 230 -80 140 1 0 0 0 1 0 0 0 1 3002.dat +1 70 230 -80 180 1 0 0 0 1 0 0 0 1 3002.dat +1 70 160 -88 140 1 0 0 0 1 0 0 0 1 3795.dat +1 70 160 -88 180 1 0 0 0 1 0 0 0 1 3795.dat +1 484 110 -112 120 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 110 -112 200 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 210 -112 120 0 0 -1 0 1 0 1 0 0 30136.dat +1 484 210 -112 200 0 0 -1 0 1 0 1 0 0 30136.dat +1 70 120 -136 110 1 0 0 0 1 0 0 0 1 3010.dat +1 70 120 -136 190 1 0 0 0 1 0 0 0 1 3010.dat +1 70 200 -136 110 1 0 0 0 1 0 0 0 1 3010.dat +1 70 200 -136 190 1 0 0 0 1 0 0 0 1 3010.dat +1 2 160 -24 70 0 0 -1 0 1 0 1 0 0 3021.dat +1 2 160 -24 130 0 0 -1 0 1 0 1 0 0 3021.dat +1 2 160 -48 100 1 0 0 0 1 0 0 0 1 3003.dat +1 2 150 -72 90 1 0 0 0 1 0 0 0 1 4287c.dat +1 2 170 -72 90 1 0 0 0 1 0 0 0 1 4287c.dat +1 2 150 -80 60 0 0 -1 0 1 0 1 0 0 2431.dat +1 2 170 -80 60 0 0 -1 0 1 0 1 0 0 2431.dat +1 15 160 -32 50 1 0 0 0 1 0 0 0 1 3069b.dat +1 15 160 -32 70 1 0 0 0 1 0 0 0 1 3069b.dat +1 2 150 -72 110 0 0 1 0 1 0 -1 0 0 4070.dat +1 15 136 -62 110 0 1 0 0 0 -1 -1 0 0 98138p07.dat +1 2 170 -72 110 0 0 -1 0 1 0 1 0 0 4070.dat +1 15 184 -62 110 0 -1 0 0 0 -1 1 0 0 98138p07.dat +1 19 160 -24 190 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 160 -24 230 1 0 0 0 1 0 0 0 1 3023b.dat +1 2 160 -48 180 0 0 -1 0 1 0 1 0 0 3001.dat +1 2 160 -48 240 1 0 0 0 1 0 0 0 1 3003.dat +1 2 160 -48 270 -1 0 0 0 1 0 0 0 -1 3039.dat +1 2 160 -72 140 1 0 0 0 1 0 0 0 1 3003.dat +1 2 160 -72 170 -1 0 0 0 1 0 0 0 -1 3039.dat +1 2 160 -72 210 -1 0 0 0 1 0 0 0 -1 3039.dat +1 2 160 -72 250 -1 0 0 0 1 0 0 0 -1 3039.dat +1 2 130 -40 150 0 0 1 0 1 0 -1 0 0 3040b.dat +1 2 130 -40 210 0 0 1 0 1 0 -1 0 0 3040b.dat +1 2 190 -40 150 0 0 -1 0 1 0 1 0 0 3040b.dat +1 2 190 -40 210 0 0 -1 0 1 0 1 0 0 3040b.dat +1 25 180 -144 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 15 170 -168 110 1 0 0 0 1 0 0 0 1 3005.dat +1 15 190 -168 110 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 25 160 -176 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 0 170 -200 110 1 0 0 0 1 0 0 0 1 47905.dat +1 15 170 -190 92 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 170 -190 128 1 0 0 0 0 1 0 -1 0 98138p07.dat +1 4 170 -200 110 1 0 0 0 1 0 0 0 1 54200.dat +1 10 50 -32 70 1 0 0 0 1 0 0 0 1 4727.dat +1 10 250 -32 250 1 0 0 0 1 0 0 0 1 4727.dat +1 10 70 -32 270 1 0 0 0 1 0 0 0 1 4727.dat diff --git a/brickwright/alt/alt-074/thumb-512.avif b/brickwright/alt/alt-074/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..2295775fafc7ba5797fd0381df28c6c43fa1e705 Binary files /dev/null and b/brickwright/alt/alt-074/thumb-512.avif differ diff --git a/brickwright/alt/alt-074/trace.jsonl.gz b/brickwright/alt/alt-074/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..3ef7d47ad8dd7c3a717066573ad2bb7555a0b08c --- /dev/null +++ b/brickwright/alt/alt-074/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e3ed792a638bd0cfb13ebb0acee767ebb723604c51c3360aa473099e0dc3cc7 +size 6195 diff --git a/brickwright/alt/alt-074/view-0.avif b/brickwright/alt/alt-074/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..70404edbf90d45faeb7a537e2ec4dfc59136213a Binary files /dev/null and b/brickwright/alt/alt-074/view-0.avif differ diff --git a/brickwright/alt/alt-074/view-1.avif b/brickwright/alt/alt-074/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..ddc158112d886c0ef7dd8a5199c2c0ee3314b8c1 Binary files /dev/null and b/brickwright/alt/alt-074/view-1.avif differ diff --git a/brickwright/alt/alt-074/view-2.avif b/brickwright/alt/alt-074/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..67eac60b133d674489053c4a699d338caad28b8e Binary files /dev/null and b/brickwright/alt/alt-074/view-2.avif differ diff --git a/brickwright/alt/alt-074/view-3.avif b/brickwright/alt/alt-074/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..12ebd3e498a08a6db69fa5bf64d12b98d66926b2 Binary files /dev/null and b/brickwright/alt/alt-074/view-3.avif differ diff --git a/brickwright/alt/alt-074/view-4.avif b/brickwright/alt/alt-074/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..fa7a280be8ae99943587cb22022be8b400068526 Binary files /dev/null and b/brickwright/alt/alt-074/view-4.avif differ diff --git a/brickwright/alt/alt-074/view-5.avif b/brickwright/alt/alt-074/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..7096e10100a42acd9d2bae8543f086aa380865bc Binary files /dev/null and b/brickwright/alt/alt-074/view-5.avif differ diff --git a/brickwright/alt/alt-074/view-6.avif b/brickwright/alt/alt-074/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..50f9f75389cb5c7ff338ee886f267fd05b184e9c Binary files /dev/null and b/brickwright/alt/alt-074/view-6.avif differ diff --git a/brickwright/alt/alt-074/view-7.avif b/brickwright/alt/alt-074/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..7d35bdc02f652cdfb8f6bcb66870ea341b73a532 Binary files /dev/null and b/brickwright/alt/alt-074/view-7.avif differ diff --git a/brickwright/alt/alt-075/build.py b/brickwright/alt/alt-075/build.py new file mode 100644 index 0000000000000000000000000000000000000000..1d0b810e8a6e10ae17f0d49df646bf915f4d279a --- /dev/null +++ b/brickwright/alt/alt-075/build.py @@ -0,0 +1,131 @@ +import json +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def a(pid, color, x,y,z, rot=0, name=None): + return b.add(bl.Element(pid,getattr(bl.Color,color)),(x,y,z),bl.Rotation(rot),name=name) + # Broad turf foundation; all roots and the trunk lock to this plate. + a('3028','BRIGHT_GREEN',2,2,0,name='ground') + z0=1/3 + # Four-stud trunk, alternating the seams of its heartwood and bark. + for level in range(8): + z=z0+level + if level in (0,2,4,6): + if level == 4: + a('3003','MEDIUM_NOUGAT',11,3,z) + a('3004','TAN',9,3,z) + a('3005','MEDIUM_NOUGAT',10,4,z) + a('3005','MEDIUM_NOUGAT',10,5,z) + a('3004','MEDIUM_NOUGAT',9,6,z) + else: + a('3001','DARK_TAN',9,3,z) + a('3003','MEDIUM_NOUGAT',9,5,z) + a('3003','DARK_TAN',11,5,z) + else: + a('3002','REDDISH_BROWN',9,3,z,1) + a('3003','MEDIUM_NOUGAT',11,3,z) + if level == 7: + a('3004','MEDIUM_NOUGAT',11,5,z) + else: + a('3005','MEDIUM_NOUGAT',11,5,z) + a('3005','MEDIUM_NOUGAT',12,5,z) + a('3010','REDDISH_BROWN',9,6,z) + # A genuine hollow, dark-backed feeding cavity in the side of the trunk. + # Thin upper wall: an open front between the two bark jambs. + for lev in range(3): + z=z0+8+lev + a('30136','DARK_ORANGE',9,3,z) + a('30136','DARK_ORANGE',9,6,z) + if lev == 1: + a('3005','DARK_RED',11,3,z) + else: + a('3004','MEDIUM_NOUGAT',11,3,z,1) + a('3004','TAN',11,5,z,1) + if lev == 1: + mount=a('47905','BLACK',10,4,z,1,name='worm_mount') + a('3005','DARK_RED',10,5,z) + else: + a('30136','BLACK',10,4,z,1) + a('3004','MEDIUM_NOUGAT',12,3,z,1) + a('3004','DARK_GREEN',12,5,z,1) + # A slender segmented orange worm emerges horizontally from the dark hole. + worm=bl.Element('3062b',bl.Color.DARK_ORANGE) + w=b.connect(worm,worm.find_connector('antistud'),to=mount.find_connector('stud',facing=bl.Direction.RIGHT),name='worm_body') + ring=bl.Element('6141',bl.Color.REDDISH_BROWN) + w=b.connect(ring,ring.find_connector('antistud'),to=w.find_connector('stud',facing=bl.Direction.RIGHT),name='worm_segment') + tip=bl.Element('6141',bl.Color.RED) + b.connect(tip,tip.find_connector('antistud'),to=w.find_connector('stud',facing=bl.Direction.RIGHT),name='worm_tip') + # Cap bridges the cavity jambs and carries a branch over the woodpecker. + a('3001','DARK_GREEN',9,3,z0+11) + a('3001','DARK_GREEN',9,5,z0+11) + a('3795','REDDISH_BROWN',5,4,z0+12,name='branch') + a('3795','REDDISH_BROWN',3,4,z0+12+1/3) + a('3660b','REDDISH_BROWN',7,4,z0+11,3,name='branch_crook') + # Leaf clusters, a mix of broad green slopes and botanical leaf parts. + for x,y,z in [(3,4,13),(5,4,13),(11,3,12+1/3),(11,5,12+1/3)]: + a('3039','GREEN',x,y,z,0) + for x,y,z in [(3,5,14),(5,5,14),(11,6,13+1/3)]: + p=a('4727','BRIGHT_GREEN',x,y,z) + b.stack(bl.Element('33291',bl.Color.BRIGHT_GREEN),on=p) + # Two gripping toes extend from the breast to the bark. + for y in (4,5): + a('3010','LIGHT_BLUISH_GRAY',6,y,z0+4,name='toe_'+str(y)) + # Tapered bracing tail below the rounder black body. + for y in (4,5): + a('3040b','BLACK',4,y,z0+2,1) + a('3040b','BLACK',4,y,z0+3,1) + a('3004','BLACK',4,4,z0+4,1,name='lower_body') + a('3002','BLACK',4,4,z0+5) + a('3002','BLACK',4,4,z0+6) + # The paired crosswise shoulder bricks bridge both wings. + # White throat climbs the tree-facing edge. + for lev in (5,6,7): + a('3004','WHITE',7,4,z0+lev,1) + # White feather bars at the sides, attached to lateral studs. + for y in (3,6): + a('2877','WHITE',4,y,z0+5) + a('3004','BLACK',4,y,z0+6) + # Shoulder plates tie the lateral white wing bars into the main body. + for y in (3,5): + a('3002','BLACK',4,y,z0+7) + # Head, paired printed eyes and narrow chisel beak. + a('3004','WHITE',6,4,z0+8,1) + eye=a('47905','BLACK',5,4,z0+8,name='eye_mount') + for y in (4,5): + tile=bl.Element('98138p07',bl.Color.WHITE) + face=bl.Direction.FRONT if y==4 else bl.Direction.BACK + b.connect(tile,tile.find_connector('antistud'),to=eye.find_connector('stud',facing=face),name='eye_'+str(y)) + for y in (4,5): + a('3040b','TAN',6,y,z0+9,1,name='beak_'+str(y)) + a('3004','RED',4,4,z0+8,1) + for y in (4,5): + a('60481a','RED',4,y,z0+9,1,name='crest_'+str(y)) + # Roots and low foliage visually broaden the trunk's grip on the ground. + for x,y,r in [(7,3,1),(9,1,0)]: + a('3660b','REDDISH_BROWN',x,y,z0,r) + a('3031','BRIGHT_GREEN',3,2,z0) + a('3004','DARK_GREEN',3,2,2/3) + a('3004','DARK_GREEN',5,2,2/3) + return b + + +def run_tests(): + b=create_build() + t=TestContext(b) + t.check_no_floating() + t.check_no_collisions() + t.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + errors=[] + for e,n in b.list_elements().items(): + allowed=inventory.get(e.ldraw_id,{}).get(e.color.name,0) + if n>allowed: errors.append(f'{e.ldraw_id} {e.color.name}: {n} > {allowed}') + t.check('inventory limits',not errors,'; '.join(errors)) + t.check('red crest and paired eyes', all(n in b.names for n in ('crest_4','crest_5','eye_4','eye_5'))) + t.check('worm protrudes toward bird',b.named('worm_body').bounding_box[0].x < 9) + t.check('leafy branch above bird',b.named('branch').bounding_box[0].z>b.named('crest_4').bounding_box[1].z) + t.check('two bark-gripping toes',all('toe_'+str(y) in b.names for y in (4,5))) + return t.report() diff --git a/brickwright/alt/alt-075/hero-1024.avif b/brickwright/alt/alt-075/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..b76f0114f932988e4b2545b6c2989a77ebc39855 Binary files /dev/null and b/brickwright/alt/alt-075/hero-1024.avif differ diff --git a/brickwright/alt/alt-075/model.mpd b/brickwright/alt/alt-075/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..82949c44bafaf6f2265b66b72d1541fca93c36fa --- /dev/null +++ b/brickwright/alt/alt-075/model.mpd @@ -0,0 +1,107 @@ +1 10 160 -8 100 1 0 0 0 1 0 0 0 1 3028.dat +1 28 220 -32 80 1 0 0 0 1 0 0 0 1 3001.dat +1 84 200 -32 120 1 0 0 0 1 0 0 0 1 3003.dat +1 28 240 -32 120 1 0 0 0 1 0 0 0 1 3003.dat +1 70 200 -56 90 0 0 -1 0 1 0 1 0 0 3002.dat +1 84 240 -56 80 1 0 0 0 1 0 0 0 1 3003.dat +1 84 230 -56 110 1 0 0 0 1 0 0 0 1 3005.dat +1 84 250 -56 110 1 0 0 0 1 0 0 0 1 3005.dat +1 70 220 -56 130 1 0 0 0 1 0 0 0 1 3010.dat +1 28 220 -80 80 1 0 0 0 1 0 0 0 1 3001.dat +1 84 200 -80 120 1 0 0 0 1 0 0 0 1 3003.dat +1 28 240 -80 120 1 0 0 0 1 0 0 0 1 3003.dat +1 70 200 -104 90 0 0 -1 0 1 0 1 0 0 3002.dat +1 84 240 -104 80 1 0 0 0 1 0 0 0 1 3003.dat +1 84 230 -104 110 1 0 0 0 1 0 0 0 1 3005.dat +1 84 250 -104 110 1 0 0 0 1 0 0 0 1 3005.dat +1 70 220 -104 130 1 0 0 0 1 0 0 0 1 3010.dat +1 84 240 -128 80 1 0 0 0 1 0 0 0 1 3003.dat +1 19 200 -128 70 1 0 0 0 1 0 0 0 1 3004.dat +1 84 210 -128 90 1 0 0 0 1 0 0 0 1 3005.dat +1 84 210 -128 110 1 0 0 0 1 0 0 0 1 3005.dat +1 84 200 -128 130 1 0 0 0 1 0 0 0 1 3004.dat +1 28 240 -128 120 1 0 0 0 1 0 0 0 1 3003.dat +1 70 200 -152 90 0 0 -1 0 1 0 1 0 0 3002.dat +1 84 240 -152 80 1 0 0 0 1 0 0 0 1 3003.dat +1 84 230 -152 110 1 0 0 0 1 0 0 0 1 3005.dat +1 84 250 -152 110 1 0 0 0 1 0 0 0 1 3005.dat +1 70 220 -152 130 1 0 0 0 1 0 0 0 1 3010.dat +1 28 220 -176 80 1 0 0 0 1 0 0 0 1 3001.dat +1 84 200 -176 120 1 0 0 0 1 0 0 0 1 3003.dat +1 28 240 -176 120 1 0 0 0 1 0 0 0 1 3003.dat +1 70 200 -200 90 0 0 -1 0 1 0 1 0 0 3002.dat +1 84 240 -200 80 1 0 0 0 1 0 0 0 1 3003.dat +1 84 240 -200 110 1 0 0 0 1 0 0 0 1 3004.dat +1 70 220 -200 130 1 0 0 0 1 0 0 0 1 3010.dat +1 484 200 -224 70 1 0 0 0 1 0 0 0 1 30136.dat +1 484 200 -224 130 1 0 0 0 1 0 0 0 1 30136.dat +1 84 230 -224 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 230 -224 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 210 -224 100 0 0 -1 0 1 0 1 0 0 30136.dat +1 84 250 -224 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 250 -224 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 484 200 -248 70 1 0 0 0 1 0 0 0 1 30136.dat +1 484 200 -248 130 1 0 0 0 1 0 0 0 1 30136.dat +1 320 230 -248 70 1 0 0 0 1 0 0 0 1 3005.dat +1 19 230 -248 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 210 -248 90 0 0 -1 0 1 0 1 0 0 47905.dat +1 320 210 -248 110 1 0 0 0 1 0 0 0 1 3005.dat +1 84 250 -248 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 250 -248 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 484 200 -272 70 1 0 0 0 1 0 0 0 1 30136.dat +1 484 200 -272 130 1 0 0 0 1 0 0 0 1 30136.dat +1 84 230 -272 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 230 -272 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 210 -272 100 0 0 -1 0 1 0 1 0 0 30136.dat +1 84 250 -272 80 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 250 -272 120 0 0 -1 0 1 0 1 0 0 3004.dat +1 484 176 -238 90 0 1 0 0 0 1 1 0 0 3062b.dat +1 70 168 -238 90 0 1 0 0 0 1 1 0 0 6141.dat +1 4 160 -238 90 0 1 0 0 0 1 1 0 0 6141.dat +1 288 220 -296 80 1 0 0 0 1 0 0 0 1 3001.dat +1 288 220 -296 120 1 0 0 0 1 0 0 0 1 3001.dat +1 70 160 -304 100 1 0 0 0 1 0 0 0 1 3795.dat +1 70 120 -312 100 1 0 0 0 1 0 0 0 1 3795.dat +1 70 170 -296 100 0 0 1 0 1 0 -1 0 0 3660b.dat +1 2 80 -336 110 1 0 0 0 1 0 0 0 1 3039.dat +1 2 120 -336 110 1 0 0 0 1 0 0 0 1 3039.dat +1 2 240 -320 90 1 0 0 0 1 0 0 0 1 3039.dat +1 2 240 -320 130 1 0 0 0 1 0 0 0 1 3039.dat +1 10 70 -360 110 1 0 0 0 1 0 0 0 1 4727.dat +1 10 70 -368 110 1 0 0 0 1 0 0 0 1 33291.dat +1 10 110 -360 110 1 0 0 0 1 0 0 0 1 4727.dat +1 10 110 -368 110 1 0 0 0 1 0 0 0 1 33291.dat +1 10 230 -344 130 1 0 0 0 1 0 0 0 1 4727.dat +1 10 230 -352 130 1 0 0 0 1 0 0 0 1 33291.dat +1 71 160 -128 90 1 0 0 0 1 0 0 0 1 3010.dat +1 71 160 -128 110 1 0 0 0 1 0 0 0 1 3010.dat +1 0 90 -80 90 0 0 -1 0 1 0 1 0 0 3040b.dat +1 0 90 -104 90 0 0 -1 0 1 0 1 0 0 3040b.dat +1 0 90 -80 110 0 0 -1 0 1 0 1 0 0 3040b.dat +1 0 90 -104 110 0 0 -1 0 1 0 1 0 0 3040b.dat +1 0 90 -128 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 110 -152 100 1 0 0 0 1 0 0 0 1 3002.dat +1 0 110 -176 100 1 0 0 0 1 0 0 0 1 3002.dat +1 15 150 -152 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 15 150 -176 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 15 150 -200 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 15 100 -152 70 1 0 0 0 1 0 0 0 1 2877.dat +1 0 100 -176 70 1 0 0 0 1 0 0 0 1 3004.dat +1 15 100 -152 130 1 0 0 0 1 0 0 0 1 2877.dat +1 0 100 -176 130 1 0 0 0 1 0 0 0 1 3004.dat +1 0 110 -200 80 1 0 0 0 1 0 0 0 1 3002.dat +1 0 110 -200 120 1 0 0 0 1 0 0 0 1 3002.dat +1 15 130 -224 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 0 110 -224 90 1 0 0 0 1 0 0 0 1 47905.dat +1 15 110 -214 72 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 110 -214 108 1 0 0 0 0 1 0 -1 0 98138p07.dat +1 19 130 -248 90 0 0 -1 0 1 0 1 0 0 3040b.dat +1 19 130 -248 110 0 0 -1 0 1 0 1 0 0 3040b.dat +1 4 90 -224 100 0 0 -1 0 1 0 1 0 0 3004.dat +1 4 90 -272 90 0 0 -1 0 1 0 1 0 0 60481a.dat +1 4 90 -272 110 0 0 -1 0 1 0 1 0 0 60481a.dat +1 70 150 -32 80 0 0 -1 0 1 0 1 0 0 3660b.dat +1 70 200 -32 50 1 0 0 0 1 0 0 0 1 3660b.dat +1 10 100 -16 80 1 0 0 0 1 0 0 0 1 3031.dat +1 288 80 -40 50 1 0 0 0 1 0 0 0 1 3004.dat +1 288 120 -40 50 1 0 0 0 1 0 0 0 1 3004.dat diff --git a/brickwright/alt/alt-075/thumb-512.avif b/brickwright/alt/alt-075/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..726ceeb44b8ea3450fb9cec1e173a01828c50e72 Binary files /dev/null and b/brickwright/alt/alt-075/thumb-512.avif differ diff --git a/brickwright/alt/alt-075/trace.jsonl.gz b/brickwright/alt/alt-075/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..7555a9165c6a79c787f84ef950637a6d9709047a --- /dev/null +++ b/brickwright/alt/alt-075/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:97097c6fa900262cbc44927ff213bad83adf4e776d626f317db1a8f3cd7d0552 +size 7545 diff --git a/brickwright/alt/alt-075/view-0.avif b/brickwright/alt/alt-075/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..a9cab1c582d3e4983eaa64646004b712824114b8 Binary files /dev/null and b/brickwright/alt/alt-075/view-0.avif differ diff --git a/brickwright/alt/alt-075/view-1.avif b/brickwright/alt/alt-075/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..fa4bcb11da0a66b48d7839f7a91c76fe2ba92964 Binary files /dev/null and b/brickwright/alt/alt-075/view-1.avif differ diff --git a/brickwright/alt/alt-075/view-2.avif b/brickwright/alt/alt-075/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..2c2ac3cb039f18640fb3209c73bcbaa89e8ecb2a Binary files /dev/null and b/brickwright/alt/alt-075/view-2.avif differ diff --git a/brickwright/alt/alt-075/view-3.avif b/brickwright/alt/alt-075/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..2a9918f398d9f033e9cd584335c27b6075b0d414 Binary files /dev/null and b/brickwright/alt/alt-075/view-3.avif differ diff --git a/brickwright/alt/alt-075/view-4.avif b/brickwright/alt/alt-075/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..73caa8e777d87026c601e578fff874ec152e0976 Binary files /dev/null and b/brickwright/alt/alt-075/view-4.avif differ diff --git a/brickwright/alt/alt-075/view-5.avif b/brickwright/alt/alt-075/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..b407a70a0cddccac79eea90485e356b6fdfb5abc Binary files /dev/null and b/brickwright/alt/alt-075/view-5.avif differ diff --git a/brickwright/alt/alt-075/view-6.avif b/brickwright/alt/alt-075/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..7d6e428d84d741308c80a4624f20246c47ed0e60 Binary files /dev/null and b/brickwright/alt/alt-075/view-6.avif differ diff --git a/brickwright/alt/alt-075/view-7.avif b/brickwright/alt/alt-075/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..430ae299b044045de7f022dd511e998f7e44c763 Binary files /dev/null and b/brickwright/alt/alt-075/view-7.avif differ diff --git a/brickwright/alt/alt-076/build.py b/brickwright/alt/alt-076/build.py new file mode 100644 index 0000000000000000000000000000000000000000..7ea13f5699defc3c1266ac32aa910ee96f464478 --- /dev/null +++ b/brickwright/alt/alt-076/build.py @@ -0,0 +1,92 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b=bl.LegoBuild() + def add(pid,c,x,y,z,r=0,name=None): + return b.add(bl.Element(pid,getattr(bl.Color,c)),(x,y,z),bl.Rotation(r),name=name) + # Unified water and ice foundation, cross-tied by long plates. + add('3029','DARK_BLUISH_GRAY',0,0,0,1,'ice_foundation') + for y in (0,4,8): add('3031','BLUE',4,y,0) + for y in (4,8): add('3034','LIGHT_BLUISH_GRAY',0,y,1/3) + for x in (0,4): add('3020','MEDIUM_AZURE',x,0,1/3) + add('3460','MEDIUM_AZURE',0,1,2/3) + add('3020','MEDIUM_AZURE',0,2,1/3) + # Support terraces: four-stud-wide ice chute and broad summit. + add('3001','MEDIUM_AZURE',0,6,1/3) + for z in (2/3,5/3): add('3001','LIGHT_BLUISH_GRAY',0,8,z) + for z in (1/3,4/3,7/3): add('3001','MEDIUM_AZURE',0,10,z) + for z in (1/3,4/3,7/3): add('3003','MEDIUM_AZURE',4,10,z) + # A continuous curved toe followed by two rising courses. + for x in range(4): add('50950','MEDIUM_AZURE',x,3,2/3) + for x in range(4): add('3040b','MEDIUM_AZURE',x,6,4/3) + for x in range(4): add('3040b','MEDIUM_AZURE',x,8,8/3) + # White ice buttresses beside the upper chute. + for x in (4,5): add('60481a','WHITE',x,8,2/3) + for x in (4,5): add('3040b','WHITE',x,8,8/3) + # Tall slopes support the white upper bank. + # Summit slab bridges the rear terraces. + add('3020','MEDIUM_AZURE',0,10,10/3) + add('3022','TAN',4,10,10/3) + add('6215','WHITE',4,10,11/3,1) + # Standing adult: orange feet, white chest, black back and flippers. + for y in (9,11): add('3004','ORANGE',1,y,11/3) + for x in (0,2): add('3002','BLACK',x,9,14/3,1) + chest=add('44728','WHITE',1,9,17/3,name='adult_bib') + for zdir in (bl.Direction.UP,bl.Direction.DOWN): + tile=bl.Element('3069b',bl.Color.WHITE) + b.connect(tile,tile.find_connector('antistud',toward=bl.Direction.RIGHT),to=chest.find_connector('stud',facing=bl.Direction.FRONT,toward=bl.Position(1.5,8,10 if zdir==bl.Direction.UP else 0))) + add('3004','WHITE',1,9,6) + for x in (0,3): add('3040b','BLACK',x,9,17/3) + add('3023b','ORANGE',1,9,7) + for x in (1,2): + p=add('47905','BLACK',x,9,22/3,name='adult_eye_mount_'+str(x)) + e=bl.Element('98138p07',bl.Color.WHITE) + b.connect(e,'antistud',to=p.find_connector('stud',facing=bl.Direction.FRONT)) + # Rear side studs are left clear; the head faces downhill. + # Smaller penguin lies lengthwise downhill, white belly against the ice. + add('3002','BLACK',1,5,7/3,1,'slider_body') + for x in (0,3): add('3040b','BLACK',x,6,7/3) + bib=add('44728','WHITE',1,5,10/3,name='slider_belly') + for x in (1,2): + p=add('47905','BLACK',x,5,11/3) + e=bl.Element('98138p07',bl.Color.WHITE) + b.connect(e,'antistud',to=p.find_connector('stud',facing=bl.Direction.FRONT)) + beak=bl.Element('3023b',bl.Color.ORANGE) + b.connect(beak,beak.find_connector('antistud',toward=bl.Direction.RIGHT),to=bib.find_connector('stud',facing=bl.Direction.FRONT,toward=bl.Direction.UP)) + # Snowy bank beside the blue pool, with a small brick-built fish. + add('3001','LIGHT_BLUISH_GRAY',4,2,1/3) + add('87079','LIGHT_BLUISH_GRAY',4,2,4/3) + add('3004','LIGHT_BLUISH_GRAY',6,4,2/3) + # A low fish, with tapered snout, flat tail and an upward-facing eye. + for x in (6,7): add('3710','TAN',x,2,5/3,1,name='fish_body' if x==6 else None) + fishhead=add('99206','LIGHT_BLUISH_GRAY',6,2,2,name='fish_head') + eye=bl.Element('98138p0c',bl.Color.WHITE) + b.connect(eye,'antistud',to=fishhead.find_connector('stud',facing=bl.Direction.FRONT,toward=bl.Direction.LEFT)) + add('3069b','WHITE',6,2,8/3) + for x in (6,7): add('3040b','TAN',x,4,2) + add('3023b','TAN',5,5,3,name='fish_tail') + add('3023b','TAN',7,5,3) + # White snow cap on the bank behind the fish. + add('6215','WHITE',5,6,1/3) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + allowed=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + over={str(k):n for k,n in used.items() if n>allowed.get(k[0],{}).get(k[1],0)} + tests.check('Inventory limits',not over,str(over)) + tests.check('Two penguins with paired eyes',used[('98138p07','WHITE')]==4) + tests.check('Adult higher than sliding penguin',b.named('adult_eye_mount_1').center.z>b.named('slider_body').center.z+2) + tests.check('Blue water at slope foot',used[('3031','BLUE')]==3 and used[('50950','MEDIUM_AZURE')]==4) + tests.check('Fish on bank', 'fish_body' in b.names and 'fish_tail' in b.names) + return tests.report() diff --git a/brickwright/alt/alt-076/hero-1024.avif b/brickwright/alt/alt-076/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..ba1f213f5e0c335d5f99b058f0f3d8dd11471fbf Binary files /dev/null and b/brickwright/alt/alt-076/hero-1024.avif differ diff --git a/brickwright/alt/alt-076/model.mpd b/brickwright/alt/alt-076/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..231f8e8618c31402f64bfdc7e3077f1d1e37f51e --- /dev/null +++ b/brickwright/alt/alt-076/model.mpd @@ -0,0 +1,75 @@ +1 72 40 -8 120 0 0 -1 0 1 0 1 0 0 3029.dat +1 1 120 -8 40 1 0 0 0 1 0 0 0 1 3031.dat +1 1 120 -8 120 1 0 0 0 1 0 0 0 1 3031.dat +1 1 120 -8 200 1 0 0 0 1 0 0 0 1 3031.dat +1 71 80 -16 100 1 0 0 0 1 0 0 0 1 3034.dat +1 71 80 -16 180 1 0 0 0 1 0 0 0 1 3034.dat +1 322 40 -16 20 1 0 0 0 1 0 0 0 1 3020.dat +1 322 120 -16 20 1 0 0 0 1 0 0 0 1 3020.dat +1 322 80 -24 30 1 0 0 0 1 0 0 0 1 3460.dat +1 322 40 -16 60 1 0 0 0 1 0 0 0 1 3020.dat +1 322 40 -32 140 1 0 0 0 1 0 0 0 1 3001.dat +1 71 40 -40 180 1 0 0 0 1 0 0 0 1 3001.dat +1 71 40 -64 180 1 0 0 0 1 0 0 0 1 3001.dat +1 322 40 -32 220 1 0 0 0 1 0 0 0 1 3001.dat +1 322 40 -56 220 1 0 0 0 1 0 0 0 1 3001.dat +1 322 40 -80 220 1 0 0 0 1 0 0 0 1 3001.dat +1 322 100 -32 220 1 0 0 0 1 0 0 0 1 3003.dat +1 322 100 -56 220 1 0 0 0 1 0 0 0 1 3003.dat +1 322 100 -80 220 1 0 0 0 1 0 0 0 1 3003.dat +1 322 10 -40 90 1 0 0 0 1 0 0 0 1 50950.dat +1 322 30 -40 90 1 0 0 0 1 0 0 0 1 50950.dat +1 322 50 -40 90 1 0 0 0 1 0 0 0 1 50950.dat +1 322 70 -40 90 1 0 0 0 1 0 0 0 1 50950.dat +1 322 10 -56 150 1 0 0 0 1 0 0 0 1 3040b.dat +1 322 30 -56 150 1 0 0 0 1 0 0 0 1 3040b.dat +1 322 50 -56 150 1 0 0 0 1 0 0 0 1 3040b.dat +1 322 70 -56 150 1 0 0 0 1 0 0 0 1 3040b.dat +1 322 10 -88 190 1 0 0 0 1 0 0 0 1 3040b.dat +1 322 30 -88 190 1 0 0 0 1 0 0 0 1 3040b.dat +1 322 50 -88 190 1 0 0 0 1 0 0 0 1 3040b.dat +1 322 70 -88 190 1 0 0 0 1 0 0 0 1 3040b.dat +1 15 90 -64 190 1 0 0 0 1 0 0 0 1 60481a.dat +1 15 110 -64 190 1 0 0 0 1 0 0 0 1 60481a.dat +1 15 90 -88 190 1 0 0 0 1 0 0 0 1 3040b.dat +1 15 110 -88 190 1 0 0 0 1 0 0 0 1 3040b.dat +1 322 40 -88 220 1 0 0 0 1 0 0 0 1 3020.dat +1 19 100 -88 220 1 0 0 0 1 0 0 0 1 3022.dat +1 15 100 -112 220 0 0 -1 0 1 0 1 0 0 6215.dat +1 25 40 -112 190 1 0 0 0 1 0 0 0 1 3004.dat +1 25 40 -112 230 1 0 0 0 1 0 0 0 1 3004.dat +1 0 20 -136 210 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 60 -136 210 0 0 -1 0 1 0 1 0 0 3002.dat +1 15 40 -144 190 1 0 0 0 1 0 0 0 1 44728.dat +1 15 40 -134 168 1 0 0 0 0 -1 0 1 0 3069b.dat +1 15 40 -114 168 1 0 0 0 0 -1 0 1 0 3069b.dat +1 15 40 -168 190 1 0 0 0 1 0 0 0 1 3004.dat +1 0 10 -160 210 1 0 0 0 1 0 0 0 1 3040b.dat +1 0 70 -160 210 1 0 0 0 1 0 0 0 1 3040b.dat +1 25 40 -176 190 1 0 0 0 1 0 0 0 1 3023b.dat +1 0 30 -200 190 1 0 0 0 1 0 0 0 1 47905.dat +1 15 30 -190 172 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 0 50 -200 190 1 0 0 0 1 0 0 0 1 47905.dat +1 15 50 -190 172 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 0 40 -80 130 0 0 -1 0 1 0 1 0 0 3002.dat +1 0 10 -80 150 1 0 0 0 1 0 0 0 1 3040b.dat +1 0 70 -80 150 1 0 0 0 1 0 0 0 1 3040b.dat +1 15 40 -88 110 1 0 0 0 1 0 0 0 1 44728.dat +1 0 30 -112 110 1 0 0 0 1 0 0 0 1 47905.dat +1 15 30 -102 92 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 0 50 -112 110 1 0 0 0 1 0 0 0 1 47905.dat +1 15 50 -102 92 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 25 40 -78 88 1 0 0 0 0 -1 0 1 0 3023b.dat +1 71 120 -32 60 1 0 0 0 1 0 0 0 1 3001.dat +1 71 120 -40 60 1 0 0 0 1 0 0 0 1 87079.dat +1 71 140 -40 90 1 0 0 0 1 0 0 0 1 3004.dat +1 19 130 -48 80 0 0 -1 0 1 0 1 0 0 3710.dat +1 19 150 -48 80 0 0 -1 0 1 0 1 0 0 3710.dat +1 71 140 -64 50 1 0 0 0 1 0 0 0 1 99206.dat +1 15 150 -58 32 1 0 0 0 0 -1 0 1 0 98138p0c.dat +1 15 140 -72 50 1 0 0 0 1 0 0 0 1 3069b.dat +1 19 130 -72 110 1 0 0 0 1 0 0 0 1 3040b.dat +1 19 150 -72 110 1 0 0 0 1 0 0 0 1 3040b.dat +1 19 120 -80 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 160 -80 110 1 0 0 0 1 0 0 0 1 3023b.dat +1 15 120 -32 140 1 0 0 0 1 0 0 0 1 6215.dat diff --git a/brickwright/alt/alt-076/thumb-512.avif b/brickwright/alt/alt-076/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..a1d0fd54d6451488a3c6c43f61011b59677a6037 Binary files /dev/null and b/brickwright/alt/alt-076/thumb-512.avif differ diff --git a/brickwright/alt/alt-076/trace.jsonl.gz b/brickwright/alt/alt-076/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..e2016f33fb13cc72d8bbd54fef49188020297990 --- /dev/null +++ b/brickwright/alt/alt-076/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1793455159265543fe296335e1cfc4c8269e0441247b48aaf5b3f0153ad3f8a3 +size 7392 diff --git a/brickwright/alt/alt-076/view-0.avif b/brickwright/alt/alt-076/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..95e1d38b64b22ff3f5ae6ed5542e53a060969a5e Binary files /dev/null and b/brickwright/alt/alt-076/view-0.avif differ diff --git a/brickwright/alt/alt-076/view-1.avif b/brickwright/alt/alt-076/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..11a24448910c438a480569fb807415dc0f3d8d39 Binary files /dev/null and b/brickwright/alt/alt-076/view-1.avif differ diff --git a/brickwright/alt/alt-076/view-2.avif b/brickwright/alt/alt-076/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..2e8ab6629845a61790f007b6c51a42594eff96a6 Binary files /dev/null and b/brickwright/alt/alt-076/view-2.avif differ diff --git a/brickwright/alt/alt-076/view-3.avif b/brickwright/alt/alt-076/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..803d198a902cf8228e17b695160aff31c9c2b4ea Binary files /dev/null and b/brickwright/alt/alt-076/view-3.avif differ diff --git a/brickwright/alt/alt-076/view-4.avif b/brickwright/alt/alt-076/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..9189d5fcfee56cbf15f4f22f619f37f47f52e9a5 Binary files /dev/null and b/brickwright/alt/alt-076/view-4.avif differ diff --git a/brickwright/alt/alt-076/view-5.avif b/brickwright/alt/alt-076/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..bd0813585d4bc7d566d4e93b79ef5d99a63e2336 Binary files /dev/null and b/brickwright/alt/alt-076/view-5.avif differ diff --git a/brickwright/alt/alt-076/view-6.avif b/brickwright/alt/alt-076/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..bf5f766b42b98d4eb510fc79f2ec8772c89e92dc Binary files /dev/null and b/brickwright/alt/alt-076/view-6.avif differ diff --git a/brickwright/alt/alt-076/view-7.avif b/brickwright/alt/alt-076/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..5125698cfe42b37eaab9b5293a9a642185bb2b9c Binary files /dev/null and b/brickwright/alt/alt-076/view-7.avif differ diff --git a/brickwright/alt/alt-077/build.py b/brickwright/alt/alt-077/build.py new file mode 100644 index 0000000000000000000000000000000000000000..b3f022433cd07224af11c8f5230c3e1f0b88c09d --- /dev/null +++ b/brickwright/alt/alt-077/build.py @@ -0,0 +1,117 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def add(pid, color, x, y, z, rot=0, name=None): + return b.add(bl.Element(pid, getattr(bl.Color,color)), (x,y,z), bl.Rotation(rot), name=name) + add('91405','BRIGHT_GREEN',0,0,0,name='ground') + # Broad elongated hind feet and weight-bearing haunches. + for i,x in enumerate((4,8)): + add('3795','REDDISH_BROWN',x,2,1/3,1,name=f'long_foot_{i}') + for dx in (0,1): + add('3010','REDDISH_BROWN',x+dx,2,2/3,1) + add('3002','REDDISH_BROWN',x,6,2/3,1) + add('3003','MEDIUM_NOUGAT',x,6,5/3) + # Tail lies flat on the landscape and thickens toward the rump. + add('3002','REDDISH_BROWN',6,9,1/3,1,name='tail_ground_9') + add('3003','DARK_TAN',6,12,1/3,name='tail_ground_12') + for x in (6,7): + add('3040b','TAN',x,14,1/3,2,name=f'tail_tip_{x}') + add('3023b','TAN',6,13,4/3) + add('3023b','TAN',6,14,4/3) + add('3022','TAN',6,13,5/3) + add('3003','DARK_TAN',6,9,4/3) + for x in (6,7): + add('3040b','REDDISH_BROWN',x,11,4/3,2) + add('3022','TAN',6,9,7/3) + # Staggered, wide pelvis, tapering to the chest. + for y in (6,8): + add('3001','DARK_TAN',5,y,8/3) + for x in (5,7): + add('3001','DARK_TAN',x,6,11/3,1) + add('3003','MEDIUM_NOUGAT',5,8,14/3) + add('3003','MEDIUM_NOUGAT',7,8,14/3) + add('3003','MEDIUM_NOUGAT',5,8,17/3) + add('3003','MEDIUM_NOUGAT',7,8,17/3) + for z in (20/3,23/3): + add('3003','MEDIUM_NOUGAT',6,8,z) + # Pouch projects in front of the mother's belly, with a raised rim. + add('3001','TAN',5,5,14/3,name='pouch_belly') + add('3020','TAN',5,4,17/3,name='pouch_floor') + add('3710','TAN',5,4,6,name='pouch_rim') + # Joey: head, side-facing eyes, separate ears, and two little front paws. + add('3622','TAN',5,5,6,name='joey_jaw') + for x in (5,7): + eye=add('47905','BLACK',x,5,7,0,name=f'joey_eye_mount_{x}') + direction=bl.Direction.FRONT + tile=bl.Element('98138p07',bl.Color.WHITE) + b.connect(tile,tile.find_connector('antistud'),to=eye.find_connector('stud',facing=direction),name=f'joey_eye_{x}') + add('3005','MEDIUM_NOUGAT',x,5,8,name=f'joey_ear_{x}') + add('3005','MEDIUM_NOUGAT',6,5,7) + for x in (5,8): + add('6141','REDDISH_BROWN',x,4,19/3,name=f'joey_paw_{x}') + # Mother's forearms reach forward on either side of the pouch. + for x in (5,8): + add('3622','TAN',x,7,20/3,1,name=f'forearm_{x}') + add('3040b','TAN',x,7,23/3) + # Long head and muzzle, with the eyes above the snout. + for z in (26/3,29/3): + if z==26/3: + add('3660b','TAN',6,7,z) + else: + add('3004','MEDIUM_NOUGAT',6,8,z) + add('3004','TAN',6,9,z) + head_start=len(b.placements) + add('3020','TAN',5,8,26/3,name='head_bridge') + add('30414','TAN',5,9,9,2,name='head_back') + add('3710','TAN',5,7,26/3) + for x in (5,8): + eye=add('47905','BLACK',x,7,9,1,name=f'adult_eye_mount_{x}') + tile=bl.Element('98138p07',bl.Color.WHITE) + direction=bl.Direction.RIGHT if x==5 else bl.Direction.LEFT + b.connect(tile,tile.find_connector('antistud'),to=eye.find_connector('stud',facing=direction),name=f'adult_eye_{x}') + # Leave clearance for the inward-facing eye studs. + add('3001','TAN',6,4,23/3,1,name='long_muzzle') + add('3004','BLACK',6,4,26/3,name='nose') + add('3004','TAN',6,5,26/3) + add('3023b','TAN',6,6,26/3) + # Two tall separated ears, with sloping tips. + for x in (5,8): + add('3004','MEDIUM_NOUGAT',x,8,10,1) + add('3004','MEDIUM_NOUGAT',x,8,11,1) + add('3040b','MEDIUM_NOUGAT',x,8,12,2,name=f'ear_tip_{x}') + # Lift the head above the joey on the slender neck. + for p in list(b.placements)[head_start:]: + name=b.name_of(p) + b.remove(p) + b.add_raw(p.content,bl.Pose(p.pose.rotation,p.pose.translation+bl.Position(0,0,2)),name=name) + # A patch of upright, staggered grass blades next to the animal. + add('3031','BRIGHT_GREEN',11,6,1/3,name='grass_patch') + for i,(x,y,h) in enumerate(((11,6,3),(13,7,4),(11,9,4),(13,9,2))): + for j in range(h): + add('3004','DARK_GREEN' if j<2 else 'YELLOWISH_GREEN' if i==0 else 'BRIGHT_GREEN',x,y,2/3+j,1) + add('3040b','GREEN',x,y,2/3+h,0,name=f'grass_tip_{i}') + for x,y in ((11,4),(14,4),(13,12)): + add('4727','BRIGHT_GREEN',x,y,1/3) + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + over=[(pid,c,n,inventory.get(pid,{}).get(c,0)) for (pid,c),n in used.items() if n>inventory.get(pid,{}).get(c,0)] + tests.check('Only supplied parts and quantities',not over,str(over)) + tests.check('Two long hind feet',all(b.named(f'long_foot_{i}').depth>=6 for i in (0,1))) + tests.check('Ground-resting tail',all(abs(b.named(f'tail_ground_{y}').bounding_box[0].z-1/3)<0.01 for y in (9,12))) + tests.check('Joey head and two paws',all(n in b.names for n in ('joey_jaw','joey_paw_5','joey_paw_8','joey_ear_5','joey_ear_7'))) + tests.check('Tall grass alongside',sum(n.startswith('grass_tip') for n in b.names)==4) + return tests.report() diff --git a/brickwright/alt/alt-077/hero-1024.avif b/brickwright/alt/alt-077/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..9d170f86eb47604ebd33462411f9e90cca95423b Binary files /dev/null and b/brickwright/alt/alt-077/hero-1024.avif differ diff --git a/brickwright/alt/alt-077/model.mpd b/brickwright/alt/alt-077/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..0098d2a0f77c7f1a868a9c388d24b5a13e39178c --- /dev/null +++ b/brickwright/alt/alt-077/model.mpd @@ -0,0 +1,91 @@ +1 10 160 -8 160 1 0 0 0 1 0 0 0 1 91405.dat +1 70 100 -16 100 0 0 -1 0 1 0 1 0 0 3795.dat +1 70 90 -40 80 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 110 -40 80 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 100 -40 150 0 0 -1 0 1 0 1 0 0 3002.dat +1 84 100 -64 140 1 0 0 0 1 0 0 0 1 3003.dat +1 70 180 -16 100 0 0 -1 0 1 0 1 0 0 3795.dat +1 70 170 -40 80 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 190 -40 80 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 180 -40 150 0 0 -1 0 1 0 1 0 0 3002.dat +1 84 180 -64 140 1 0 0 0 1 0 0 0 1 3003.dat +1 70 140 -32 210 0 0 -1 0 1 0 1 0 0 3002.dat +1 28 140 -32 260 1 0 0 0 1 0 0 0 1 3003.dat +1 19 130 -32 290 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 19 150 -32 290 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 19 140 -40 270 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 140 -40 290 1 0 0 0 1 0 0 0 1 3023b.dat +1 19 140 -48 280 1 0 0 0 1 0 0 0 1 3022.dat +1 28 140 -56 200 1 0 0 0 1 0 0 0 1 3003.dat +1 70 130 -56 230 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 70 150 -56 230 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 19 140 -64 200 1 0 0 0 1 0 0 0 1 3022.dat +1 28 140 -88 140 1 0 0 0 1 0 0 0 1 3001.dat +1 28 140 -88 180 1 0 0 0 1 0 0 0 1 3001.dat +1 28 120 -112 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 28 160 -112 160 0 0 -1 0 1 0 1 0 0 3001.dat +1 84 120 -136 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 160 -136 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 120 -160 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 160 -160 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 140 -184 180 1 0 0 0 1 0 0 0 1 3003.dat +1 84 140 -208 180 1 0 0 0 1 0 0 0 1 3003.dat +1 19 140 -136 120 1 0 0 0 1 0 0 0 1 3001.dat +1 19 140 -144 100 1 0 0 0 1 0 0 0 1 3020.dat +1 19 140 -152 90 1 0 0 0 1 0 0 0 1 3710.dat +1 19 130 -168 110 1 0 0 0 1 0 0 0 1 3622.dat +1 0 110 -192 110 1 0 0 0 1 0 0 0 1 47905.dat +1 15 110 -182 92 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 84 110 -216 110 1 0 0 0 1 0 0 0 1 3005.dat +1 0 150 -192 110 1 0 0 0 1 0 0 0 1 47905.dat +1 15 150 -182 92 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 84 150 -216 110 1 0 0 0 1 0 0 0 1 3005.dat +1 84 130 -192 110 1 0 0 0 1 0 0 0 1 3005.dat +1 70 110 -160 90 1 0 0 0 1 0 0 0 1 6141.dat +1 70 170 -160 90 1 0 0 0 1 0 0 0 1 6141.dat +1 19 110 -184 170 0 0 -1 0 1 0 1 0 0 3622.dat +1 19 110 -208 170 1 0 0 0 1 0 0 0 1 3040b.dat +1 19 170 -184 170 0 0 -1 0 1 0 1 0 0 3622.dat +1 19 170 -208 170 1 0 0 0 1 0 0 0 1 3040b.dat +1 19 140 -232 170 1 0 0 0 1 0 0 0 1 3660b.dat +1 19 140 -232 190 1 0 0 0 1 0 0 0 1 3004.dat +1 84 140 -256 170 1 0 0 0 1 0 0 0 1 3004.dat +1 19 140 -256 190 1 0 0 0 1 0 0 0 1 3004.dat +1 19 140 -264 180 1 0 0 0 1 0 0 0 1 3020.dat +1 19 140 -288 190 -1 0 0 0 1 0 0 0 -1 30414.dat +1 19 140 -264 150 1 0 0 0 1 0 0 0 1 3710.dat +1 0 110 -288 150 0 0 -1 0 1 0 1 0 0 47905.dat +1 15 92 -278 150 0 1 0 0 0 1 1 0 0 98138p07.dat +1 0 170 -288 150 0 0 -1 0 1 0 1 0 0 47905.dat +1 15 188 -278 150 0 -1 0 0 0 -1 1 0 0 98138p07.dat +1 19 140 -256 120 0 0 -1 0 1 0 1 0 0 3001.dat +1 0 140 -280 90 1 0 0 0 1 0 0 0 1 3004.dat +1 19 140 -280 110 1 0 0 0 1 0 0 0 1 3004.dat +1 19 140 -264 130 1 0 0 0 1 0 0 0 1 3023b.dat +1 84 110 -312 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 110 -336 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 110 -360 170 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 84 170 -312 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 170 -336 180 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 170 -360 170 -1 0 0 0 1 0 0 0 -1 3040b.dat +1 10 260 -16 160 1 0 0 0 1 0 0 0 1 3031.dat +1 288 230 -40 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 230 -64 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 326 230 -88 140 0 0 -1 0 1 0 1 0 0 3004.dat +1 2 230 -112 150 1 0 0 0 1 0 0 0 1 3040b.dat +1 288 270 -40 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 270 -64 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 10 270 -88 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 10 270 -112 160 0 0 -1 0 1 0 1 0 0 3004.dat +1 2 270 -136 170 1 0 0 0 1 0 0 0 1 3040b.dat +1 288 230 -40 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 230 -64 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 10 230 -88 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 10 230 -112 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 2 230 -136 210 1 0 0 0 1 0 0 0 1 3040b.dat +1 288 270 -40 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 288 270 -64 200 0 0 -1 0 1 0 1 0 0 3004.dat +1 2 270 -88 210 1 0 0 0 1 0 0 0 1 3040b.dat +1 10 230 -32 90 1 0 0 0 1 0 0 0 1 4727.dat +1 10 290 -32 90 1 0 0 0 1 0 0 0 1 4727.dat +1 10 270 -32 250 1 0 0 0 1 0 0 0 1 4727.dat diff --git a/brickwright/alt/alt-077/thumb-512.avif b/brickwright/alt/alt-077/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..532b70a934afee610e58ac234705d2db3be4bac2 Binary files /dev/null and b/brickwright/alt/alt-077/thumb-512.avif differ diff --git a/brickwright/alt/alt-077/trace.jsonl.gz b/brickwright/alt/alt-077/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..45b07a48225f4820dbd477cdb032c035826e41ce --- /dev/null +++ b/brickwright/alt/alt-077/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad1cfe09a79cf20f17e4d263e0862190134689d3dace2c4a8d4d2575a9bf16a9 +size 7272 diff --git a/brickwright/alt/alt-077/view-0.avif b/brickwright/alt/alt-077/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..64dcf8dc5ee2c54d7a71ee3d76e635405ff72b78 Binary files /dev/null and b/brickwright/alt/alt-077/view-0.avif differ diff --git a/brickwright/alt/alt-077/view-1.avif b/brickwright/alt/alt-077/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..3acd74794a0f94f1e4bf322e69e51d04c1d21f3d Binary files /dev/null and b/brickwright/alt/alt-077/view-1.avif differ diff --git a/brickwright/alt/alt-077/view-2.avif b/brickwright/alt/alt-077/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..3042782b1b150316ebc62de4b0f411e7098207fb Binary files /dev/null and b/brickwright/alt/alt-077/view-2.avif differ diff --git a/brickwright/alt/alt-077/view-3.avif b/brickwright/alt/alt-077/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..bb55568dd490d014211dd1193902f659ec21c98c Binary files /dev/null and b/brickwright/alt/alt-077/view-3.avif differ diff --git a/brickwright/alt/alt-077/view-4.avif b/brickwright/alt/alt-077/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..78091d85d2cb01d7647bb9f7aceb4b0be66782b0 Binary files /dev/null and b/brickwright/alt/alt-077/view-4.avif differ diff --git a/brickwright/alt/alt-077/view-5.avif b/brickwright/alt/alt-077/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..8d630d659d12034c26c0f6ab8e7ba32db3804988 Binary files /dev/null and b/brickwright/alt/alt-077/view-5.avif differ diff --git a/brickwright/alt/alt-077/view-6.avif b/brickwright/alt/alt-077/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..d85b71cfc296971aa416c5202d83dc8cc42ebe0b Binary files /dev/null and b/brickwright/alt/alt-077/view-6.avif differ diff --git a/brickwright/alt/alt-077/view-7.avif b/brickwright/alt/alt-077/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..ff5e83f9d49ab787d2bb2aab75c85be936e31b83 Binary files /dev/null and b/brickwright/alt/alt-077/view-7.avif differ diff --git a/brickwright/alt/alt-078/build.py b/brickwright/alt/alt-078/build.py new file mode 100644 index 0000000000000000000000000000000000000000..6bf9a1cbd5b079f7518edd3d7ed1b0fe88bba699 --- /dev/null +++ b/brickwright/alt/alt-078/build.py @@ -0,0 +1,82 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def add(pid, color, x,y,z, name=None, rot=bl.Rotation.DEG_0): + return b.add(bl.Element(pid,getattr(bl.Color,color)),(x,y,z),rotation=rot,name=name) + # Broad bark foundation, with overlapping courses and a shared deck. + for x in (0,3): + for y in (1,3): add('3002','REDDISH_BROWN',x,y,0) + for y in (0,5): add('3010','REDDISH_BROWN',1,y,0) + for y in (0,5): + for x in (0,2,4): add('30136','DARK_ORANGE',x,y,1) + for x in (0,5): add('3010','REDDISH_BROWN',x,1,1,rot=bl.Rotation.DEG_90) + for y in (1,3): add('3001','DARK_TAN',1,y,1) + for y in (0,4): add('3795','REDDISH_BROWN',0,y,2) + add('3020','TAN',0,2,2) + add('3022','TAN',4,2,2) + ground=7/3 + # Seated haunches, toes, cream breast and reaching forelegs. + for x in (1,4): add('3040b','TAN',x,1,ground,name='foot_'+str(x)) + for z in (ground,10/3): + for x in (1,3): add('3003','MEDIUM_NOUGAT',x,3,z) + add('3004','TAN',2,2,z) + add('3003','MEDIUM_NOUGAT',2,3,13/3) + add('3004','TAN',2,2,13/3) + for x in (1,4): add('3004','MEDIUM_NOUGAT',x,1,10/3,rot=bl.Rotation.DEG_90) + add('3710','TAN',1,1,13/3,name='palm_bridge') + add('3005','MEDIUM_NOUGAT',1,1,14/3,name='left_paw') + add('3004','MEDIUM_NOUGAT',3,1,14/3,name='right_paw') + add('3003','MEDIUM_NOUGAT',2,3,16/3) + add('3004','TAN',2,2,16/3) + # Head and printed eyes on real side-facing studs. + face=add('30414','TAN',1,2,19/3,name='face') + for x in (1,3): add('3003','MEDIUM_NOUGAT',x,3,19/3) + for x in (1,3): add('3004','MEDIUM_NOUGAT',x,2,22/3) + add('3004','MEDIUM_NOUGAT',1,3,22/3) + add('3004','MEDIUM_NOUGAT',3,3,22/3) + for x in (1,4): add('3040b','MEDIUM_NOUGAT',x,3,25/3,name='ear_'+str(x)) + for x in (1.5,4.5): + eye=bl.Element('98138p07',bl.Color.WHITE) + b.connect(eye,'antistud',to=face.find_connector('stud',facing=bl.Direction.FRONT,toward=(x,2,7)),name='eye_'+str(x)) + muzzle=bl.Element('3023b',bl.Color.TAN) + m=b.connect(muzzle,muzzle.find_connector('antistud',toward=bl.Direction.RIGHT),to=face.find_connector('stud',facing=bl.Direction.FRONT,toward=(2.5,2,7)),target_rotation=bl.rotation_about(bl.Vec3(1,0,0),90),name='muzzle') + nose=bl.Element('6141',bl.Color.DARK_BLUISH_GRAY) + b.connect(nose,'antistud',to=m.find_connector('stud',toward=(3,0,7)),name='nose') + # Broad, rising brush tail with a forward-curled cream tip. + add('3004','MEDIUM_NOUGAT',2,5,ground) + add('3660b','REDDISH_BROWN',2,5,10/3,rot=bl.Rotation.DEG_180) + for y in (5,6): add('3010','ORANGE',1,y,13/3) + for z in (16/3,22/3): + for x in (1,3): add('3003','ORANGE',x,5,z) + for z in (19/3,25/3): + for y in (5,6): + for x in (1,3): add('3004','ORANGE',x,y,z) + for y in (5,6): add('3004','ORANGE',2,y,28/3) + for x in (1,4): add('3040b','REDDISH_BROWN',x,5,28/3) + for x in (2,3): add('50950','TAN',x,4,31/3,name='tail_tip_'+str(x)) + # Three little nuts with brown cup-shaped caps. + for name,x,y,z in [('held_acorn',2,1,14/3),('front_acorn_a',1,0,ground),('front_acorn_b',4,0,ground)]: + nut=add('3062b','DARK_ORANGE',x,y,z,name=name) + b.stack(bl.Element('6141',bl.Color.REDDISH_BROWN),on=nut,name=name+'_cap') + return b + + +def run_tests(): + b=create_build() + tests=TestContext(b) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + inventory=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in b.flattened_placements) + excess={str(k):v for k,v in used.items() if v>inventory.get(k[0],{}).get(k[1],0)} + tests.check('Inventory quantities and colors',not excess,str(excess)) + tests.check('Three capped acorns',sum(n.endswith('_cap') for n in b.names)==3,'One in paws and two on stump') + tests.check('Tail rises above head',b.named('tail_tip_2').center.z>b.named('ear_1').center.z,'Tall brush tail behind the squirrel') + tests.check('Two front paws and two eyes',all(n in b.names for n in ['left_paw','right_paw','eye_1.5','eye_4.5']),'Paired paws and printed eyes') + return tests.report() diff --git a/brickwright/alt/alt-078/hero-1024.avif b/brickwright/alt/alt-078/hero-1024.avif new file mode 100644 index 0000000000000000000000000000000000000000..b805293adc19ac0aba0479e499734d2ce2a204e3 Binary files /dev/null and b/brickwright/alt/alt-078/hero-1024.avif differ diff --git a/brickwright/alt/alt-078/model.mpd b/brickwright/alt/alt-078/model.mpd new file mode 100644 index 0000000000000000000000000000000000000000..04ad4bbf151045fb7b58d5b1f27c36b44d24d852 --- /dev/null +++ b/brickwright/alt/alt-078/model.mpd @@ -0,0 +1,78 @@ +1 70 30 -24 40 1 0 0 0 1 0 0 0 1 3002.dat +1 70 30 -24 80 1 0 0 0 1 0 0 0 1 3002.dat +1 70 90 -24 40 1 0 0 0 1 0 0 0 1 3002.dat +1 70 90 -24 80 1 0 0 0 1 0 0 0 1 3002.dat +1 70 60 -24 10 1 0 0 0 1 0 0 0 1 3010.dat +1 70 60 -24 110 1 0 0 0 1 0 0 0 1 3010.dat +1 484 20 -48 10 1 0 0 0 1 0 0 0 1 30136.dat +1 484 60 -48 10 1 0 0 0 1 0 0 0 1 30136.dat +1 484 100 -48 10 1 0 0 0 1 0 0 0 1 30136.dat +1 484 20 -48 110 1 0 0 0 1 0 0 0 1 30136.dat +1 484 60 -48 110 1 0 0 0 1 0 0 0 1 30136.dat +1 484 100 -48 110 1 0 0 0 1 0 0 0 1 30136.dat +1 70 10 -48 60 0 0 -1 0 1 0 1 0 0 3010.dat +1 70 110 -48 60 0 0 -1 0 1 0 1 0 0 3010.dat +1 28 60 -48 40 1 0 0 0 1 0 0 0 1 3001.dat +1 28 60 -48 80 1 0 0 0 1 0 0 0 1 3001.dat +1 70 60 -56 20 1 0 0 0 1 0 0 0 1 3795.dat +1 70 60 -56 100 1 0 0 0 1 0 0 0 1 3795.dat +1 19 40 -56 60 1 0 0 0 1 0 0 0 1 3020.dat +1 19 100 -56 60 1 0 0 0 1 0 0 0 1 3022.dat +1 19 30 -80 50 1 0 0 0 1 0 0 0 1 3040b.dat +1 19 90 -80 50 1 0 0 0 1 0 0 0 1 3040b.dat +1 84 40 -80 80 1 0 0 0 1 0 0 0 1 3003.dat +1 84 80 -80 80 1 0 0 0 1 0 0 0 1 3003.dat +1 19 60 -80 50 1 0 0 0 1 0 0 0 1 3004.dat +1 84 40 -104 80 1 0 0 0 1 0 0 0 1 3003.dat +1 84 80 -104 80 1 0 0 0 1 0 0 0 1 3003.dat +1 19 60 -104 50 1 0 0 0 1 0 0 0 1 3004.dat +1 84 60 -128 80 1 0 0 0 1 0 0 0 1 3003.dat +1 19 60 -128 50 1 0 0 0 1 0 0 0 1 3004.dat +1 84 30 -104 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 84 90 -104 40 0 0 -1 0 1 0 1 0 0 3004.dat +1 19 60 -112 30 1 0 0 0 1 0 0 0 1 3710.dat +1 84 30 -136 30 1 0 0 0 1 0 0 0 1 3005.dat +1 84 80 -136 30 1 0 0 0 1 0 0 0 1 3004.dat +1 84 60 -152 80 1 0 0 0 1 0 0 0 1 3003.dat +1 19 60 -152 50 1 0 0 0 1 0 0 0 1 3004.dat +1 19 60 -176 50 1 0 0 0 1 0 0 0 1 30414.dat +1 84 40 -176 80 1 0 0 0 1 0 0 0 1 3003.dat +1 84 80 -176 80 1 0 0 0 1 0 0 0 1 3003.dat +1 84 40 -200 50 1 0 0 0 1 0 0 0 1 3004.dat +1 84 80 -200 50 1 0 0 0 1 0 0 0 1 3004.dat +1 84 40 -200 70 1 0 0 0 1 0 0 0 1 3004.dat +1 84 80 -200 70 1 0 0 0 1 0 0 0 1 3004.dat +1 84 30 -224 90 1 0 0 0 1 0 0 0 1 3040b.dat +1 84 90 -224 90 1 0 0 0 1 0 0 0 1 3040b.dat +1 15 30 -166 32 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 15 90 -166 32 1 0 0 0 0 -1 0 1 0 98138p07.dat +1 19 60 -166 32 1 0 0 0 0 -1 0 1 0 3023b.dat +1 72 50 -166 24 1 0 0 0 0 -1 0 1 0 6141.dat +1 84 60 -80 110 1 0 0 0 1 0 0 0 1 3004.dat +1 70 60 -104 110 -1 0 0 0 1 0 0 0 -1 3660b.dat +1 25 60 -128 110 1 0 0 0 1 0 0 0 1 3010.dat +1 25 60 -128 130 1 0 0 0 1 0 0 0 1 3010.dat +1 25 40 -152 120 1 0 0 0 1 0 0 0 1 3003.dat +1 25 80 -152 120 1 0 0 0 1 0 0 0 1 3003.dat +1 25 40 -200 120 1 0 0 0 1 0 0 0 1 3003.dat +1 25 80 -200 120 1 0 0 0 1 0 0 0 1 3003.dat +1 25 40 -176 110 1 0 0 0 1 0 0 0 1 3004.dat +1 25 80 -176 110 1 0 0 0 1 0 0 0 1 3004.dat +1 25 40 -176 130 1 0 0 0 1 0 0 0 1 3004.dat +1 25 80 -176 130 1 0 0 0 1 0 0 0 1 3004.dat +1 25 40 -224 110 1 0 0 0 1 0 0 0 1 3004.dat +1 25 80 -224 110 1 0 0 0 1 0 0 0 1 3004.dat +1 25 40 -224 130 1 0 0 0 1 0 0 0 1 3004.dat +1 25 80 -224 130 1 0 0 0 1 0 0 0 1 3004.dat +1 25 60 -248 110 1 0 0 0 1 0 0 0 1 3004.dat +1 25 60 -248 130 1 0 0 0 1 0 0 0 1 3004.dat +1 70 30 -248 130 1 0 0 0 1 0 0 0 1 3040b.dat +1 70 90 -248 130 1 0 0 0 1 0 0 0 1 3040b.dat +1 19 50 -272 110 1 0 0 0 1 0 0 0 1 50950.dat +1 19 70 -272 110 1 0 0 0 1 0 0 0 1 50950.dat +1 484 50 -136 30 1 0 0 0 1 0 0 0 1 3062b.dat +1 70 50 -144 30 1 0 0 0 1 0 0 0 1 6141.dat +1 484 30 -80 10 1 0 0 0 1 0 0 0 1 3062b.dat +1 70 30 -88 10 1 0 0 0 1 0 0 0 1 6141.dat +1 484 90 -80 10 1 0 0 0 1 0 0 0 1 3062b.dat +1 70 90 -88 10 1 0 0 0 1 0 0 0 1 6141.dat diff --git a/brickwright/alt/alt-078/thumb-512.avif b/brickwright/alt/alt-078/thumb-512.avif new file mode 100644 index 0000000000000000000000000000000000000000..c82e1d51eb89c1eef772787f812d24715234aa8f Binary files /dev/null and b/brickwright/alt/alt-078/thumb-512.avif differ diff --git a/brickwright/alt/alt-078/trace.jsonl.gz b/brickwright/alt/alt-078/trace.jsonl.gz new file mode 100644 index 0000000000000000000000000000000000000000..f8e697d35b30245bcac77bfd510ba17d34083d41 --- /dev/null +++ b/brickwright/alt/alt-078/trace.jsonl.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13420050c39858f52490b056d03b6d747ceaaf96c934659ed61a6f9565fd7a1d +size 6090 diff --git a/brickwright/alt/alt-078/view-0.avif b/brickwright/alt/alt-078/view-0.avif new file mode 100644 index 0000000000000000000000000000000000000000..ea6bee8c3f82023ce346e352eaaf7ab8262412d3 Binary files /dev/null and b/brickwright/alt/alt-078/view-0.avif differ diff --git a/brickwright/alt/alt-078/view-1.avif b/brickwright/alt/alt-078/view-1.avif new file mode 100644 index 0000000000000000000000000000000000000000..95ab2a6928f208e882fd284936094d74fb54faf3 Binary files /dev/null and b/brickwright/alt/alt-078/view-1.avif differ diff --git a/brickwright/alt/alt-078/view-2.avif b/brickwright/alt/alt-078/view-2.avif new file mode 100644 index 0000000000000000000000000000000000000000..1f2b69fcef26cb8788c5990cfbdd1788ddfddab3 Binary files /dev/null and b/brickwright/alt/alt-078/view-2.avif differ diff --git a/brickwright/alt/alt-078/view-3.avif b/brickwright/alt/alt-078/view-3.avif new file mode 100644 index 0000000000000000000000000000000000000000..c4f9252d6aee65b85b48743d9d759b03000e7198 Binary files /dev/null and b/brickwright/alt/alt-078/view-3.avif differ diff --git a/brickwright/alt/alt-078/view-4.avif b/brickwright/alt/alt-078/view-4.avif new file mode 100644 index 0000000000000000000000000000000000000000..18e49a1eedd763d0161a2b39a7a98e1cae8a5f09 Binary files /dev/null and b/brickwright/alt/alt-078/view-4.avif differ diff --git a/brickwright/alt/alt-078/view-5.avif b/brickwright/alt/alt-078/view-5.avif new file mode 100644 index 0000000000000000000000000000000000000000..423590e2050a8d357b80e072a011bcd71583f394 Binary files /dev/null and b/brickwright/alt/alt-078/view-5.avif differ diff --git a/brickwright/alt/alt-078/view-6.avif b/brickwright/alt/alt-078/view-6.avif new file mode 100644 index 0000000000000000000000000000000000000000..17771005963c733d3fa342e580db4d9a50905194 Binary files /dev/null and b/brickwright/alt/alt-078/view-6.avif differ diff --git a/brickwright/alt/alt-078/view-7.avif b/brickwright/alt/alt-078/view-7.avif new file mode 100644 index 0000000000000000000000000000000000000000..ba89a5a18c5986aa93af93d19e3731bc2380dd14 Binary files /dev/null and b/brickwright/alt/alt-078/view-7.avif differ diff --git a/brickwright/alt/alt-079/build.py b/brickwright/alt/alt-079/build.py new file mode 100644 index 0000000000000000000000000000000000000000..beb3c6d4a5238e0ec14dbc683139e54077b89729 --- /dev/null +++ b/brickwright/alt/alt-079/build.py @@ -0,0 +1,86 @@ +import json +from collections import Counter +import bricklayer as bl +from brickwright import TestContext + + +def create_build(): + b = bl.LegoBuild() + def put(pid, color, x,y,z, rot=0, name=None): + return b.add(bl.Element(pid, getattr(bl.Color,color)), (x,y,z), rotation=bl.Rotation(rot),name=name) + put('91405','BRIGHT_GREEN',0,0,0,name='pasture') + # A wooden gate with two open rails and stout log posts. + for x in (3,10): + for z in (1/3,7/3,13/3): + put('30136','DARK_ORANGE',x,8,z,1) + for z in (4/3,10/3): + for x in (3,7): + put('3010','REDDISH_BROWN',x,8,z,name=f'gate_rail_{x}_{z}') + for x in (6,7): + put('3062b','REDDISH_BROWN',x,8,7/3) + # Each sheep has four feet, a broad wool body, a projecting dark head, + # and eyes attached to genuine side studs. + for white,y in ((True,1),(False,11)): + label='white' if white else 'black' + for x in ((2,7) if white else (2,6)): + for yy in (y,y+3): + put('3005' if white else '30136', 'LIGHT_BLUISH_GRAY' if white else 'BLACK',x,yy,1/3,name=f'{label}_leg_{x}_{yy}') + for x in (2,5): + for yy in (y,y+2): + put('6215' if white else '3002','WHITE' if white else 'BLACK',x,yy,4/3,2 if x==5 and white else 0,name=f'{label}_wool_{x}_{yy}') + if white: + for x,yy in ((3,y),(3,y+2)): + put('30367c','WHITE',x,yy,7/3) + put('3004','WHITE',2,y+1,7/3,1,name='white_tail') + else: + for x in (3,5): + put('3040b','BLACK',x,y,7/3) + put('3040b','BLACK',x,y+2,7/3,2) + put('3004','BLACK',2,y+1,7/3,1,name='black_tail') + put('3002','BLACK',6,y+1,7/3,name=f'{label}_muzzle') + head=put('47905','BLACK',8,y+1,10/3,name=f'{label}_head') + for direction in (bl.Direction.FRONT,bl.Direction.BACK): + eye=bl.Element('98138p07',bl.Color.WHITE) + b.connect(eye,eye.find_connector('antistud'),to=head.find_connector('stud',facing=direction),name=f'{label}_eye_{direction.name}') + # Brick-built farmer in blue trousers, red shirt, and a wide-brimmed hat. + for x in (11,14): + for z in (1/3,4/3,7/3): + put('3004','DARK_BLUE',x,4,z,1) + put('3001','RED',10,4,13/3,name='farmer_shoulders') + for y in (4,5): + put('3004','RED',14,y,13/3) + put('3001','RED',11,4,10/3,name='farmer_torso') + for x in (10,15): + put('3004','MEDIUM_NOUGAT',x,3,10/3,1,name=f'farmer_hand_{x}') + put('3003','MEDIUM_NOUGAT',12,4,16/3) + face=put('30414','TAN',11,4,19/3,name='farmer_face') + put('3010','BRIGHT_LIGHT_YELLOW',11,5,19/3) + for xx in (11.5,14.5): + eye=bl.Element('98138p0c',bl.Color.WHITE) + b.connect(eye,eye.find_connector('antistud'),to=face.find_connector('stud',facing=bl.Direction.FRONT,toward=(xx,4,7)),name=f'farmer_eye_{xx}') + put('3020','TAN',11,4,22/3,name='hat_brim') + put('3004','TAN',12,4,23/3,name='hat_crown') + # Golden hay is held across the two hands, not balanced on the ground. + put('3001','YELLOW',10,2,13/3,name='hay_left') + put('3003','YELLOW',14,2,13/3,name='hay_right') + put('3004','BRIGHT_LIGHT_YELLOW',10,2,16/3,name='hay_strands_left') + put('3004','BRIGHT_LIGHT_YELLOW',12,2,16/3,name='hay_strands_middle') + for x in (14,15): + put('3005','YELLOW',x,2,16/3,name=f'hay_other_end_{x}') + return b + + +def run_tests(): + build=create_build() + tests=TestContext(build) + tests.check_no_floating() + tests.check_no_collisions() + tests.check_connected(expected_components=1) + stock=json.load(open('/inputs/parts.json')) + used=Counter((p.content.ldraw_id,p.content.color.name) for p in build.flattened_placements) + excess={f'{pid}/{color}':n for (pid,color),n in used.items() if n>stock.get(pid,{}).get(color,0)} + tests.check('inventory limits',not excess,str(excess)) + tests.check('sheep on opposite sides',build.named('white_tail').center.y<8