Enclose rainwater tanks in a shipping-container module

This commit is contained in:
2026-09-10 21:15:34 +10:00
parent 62713b9e38
commit 79c5eeddbb
18 changed files with 5865 additions and 20 deletions

View File

@@ -0,0 +1,19 @@
import bpy,json,os
from mathutils import Matrix,Vector
O=os.path.dirname(__file__);s=bpy.context.scene
chapters=json.load(open(O+'/tour-chapters-container-water.json'));fonts=[o for o in bpy.data.collections['22 PLAY - guided camera tour'].objects if o.type=='FONT'];issues=[]
for c in chapters:
s.frame_set(c['start']+30);shown=[o.data.body for o in fonts if o.scale.length>.5]
if shown!=[c['title']]:issues.append([c['title'],shown])
names=[o.name for o in s.objects]
report={'internal_tanks':sum(n.startswith('INTERNAL RAINWATER TANK') for n in names),'old_exposed_tanks_removed':not any(n.startswith('2000 mm dark green poly rainwater tank') for n in names),'container':all(n in names for n in ['CONTAINER WATER - steel base frame','Container corrugated north steel wall','CONTAINER - west inspection cutaway']),'tour_chapters':len(chapters),'caption_issues':issues,'render_size':[s.render.resolution_x,s.render.resolution_y,s.render.resolution_percentage],'kitchen_preserved':'ISLAND - honed marble countertop' in names,'no_table_tennis':not any('table tennis' in n.lower() for n in names)}
assert report['internal_tanks']==2 and report['old_exposed_tanks_removed'] and report['container'] and not issues and report['kitchen_preserved'] and report['no_table_tennis']
assert report['render_size']==[2560,1440,100] and s.frame_end==3600
# Internal tank bounding boxes fit within the structural enclosure.
for o in s.objects:
if o.name.startswith('INTERNAL RAINWATER TANK'):
m=Matrix.LocRotScale(o.location,o.rotation_euler.to_quaternion(),o.scale)
for b in o.bound_box:
v=m@Vector(b);assert -27.98<v.x<-22.02 and -9.17<v.y<-6.83 and .58<v.z<2.9
s.frame_set(1441);bpy.ops.wm.save_as_mainfile(filepath=O+'/samford-solarpunk-container-water-tour.blend')
json.dump(report,open(O+'/container-water-verification.json','w'),indent=2);print('VERIFIED '+json.dumps(report),flush=True)