feat(juicer): revise housing, curved hopper and independent collectors

Rework the Minex mechanism to the 2026-11-19 housing revision:

- split the exterior into a fixed rear spine / base / control pod plus a
  removable open collection deck, transparent hood and lower side covers
- replace the flat L-shaped feeder with an open-top curved trough hopper
  (circular-arc centreline, recessed U section) per the 01:50-01:52 frames
- rebuild the bins as independent shallow front collectors with 172 mm
  residue and 134 mm juice depth, no divider, rails or detents
- drive the LCD through Ready / Processing / Stopped states on the shot
  timeline (frames 1-27 / 28-321 / 322-360)
- drop the decorative latches and keep the juice guide supported only by
  the removable deck; record contact-fit and backplate-connection notes
- regenerate mechanism/video validation records and update the Minex
  reference README, manifest and mechanism review to match
This commit is contained in:
Yanchen
2026-11-22 11:02:39 +08:00
parent 9d39434a76
commit 94bdea5506
9 changed files with 5627 additions and 270 deletions
+274 -23
View File
@@ -5,13 +5,15 @@ from pathlib import Path
args = sys.argv[sys.argv.index('--')+1:] if '--' in sys.argv else []
parser = argparse.ArgumentParser()
parser.add_argument('--mode', choices=['proof','stills','video'], default='proof')
parser.add_argument('--mode', choices=['hopper','apron','housing','supports','collectors','assembly','proof','stills','exterior','video'], default='proof')
parser.add_argument('--samples', type=int, default=20)
parser.add_argument('--width', type=int, default=720)
parser.add_argument('--height', type=int, default=840)
parser.add_argument('--start', type=int, default=1)
parser.add_argument('--end', type=int, default=360)
parser.add_argument('--step', type=int, default=2)
parser.add_argument('--camera', default=None)
parser.add_argument('--skip-existing', action='store_true')
opt = parser.parse_args(args)
OUT = Path(__file__).resolve().parent
scene = bpy.context.scene
@@ -29,18 +31,186 @@ scene.render.image_settings.color_mode = 'RGB'
scene.render.use_persistent_data = True
ASSEMBLY_VISIBILITY = None
def prepare_frame(frame):
global ASSEMBLY_VISIBILITY
if opt.mode != 'assembly':
scene.frame_set(frame)
return
if ASSEMBLY_VISIBILITY is None:
scene.frame_set(2)
scene.frame_set(1)
bpy.context.view_layer.update()
ASSEMBLY_VISIBILITY = {obj.name: obj.hide_render for obj in scene.objects}
for obj in scene.objects:
obj.animation_data_clear()
for name, hidden in ASSEMBLY_VISIBILITY.items():
bpy.data.objects[name].hide_render = hidden
for name in ['Collection_Deck_Assembly', 'Lower_Service_Cover_Assembly', 'Juice_Collection_Box_Slide', 'Residue_Collection_Box_Slide']:
bpy.data.objects[name].location = (0, 0, 0)
def set_tree_hidden(name, hidden):
root = bpy.data.objects[name]
for obj in [root, *root.children_recursive]:
obj.hide_render = hidden
def isolate_tree(name):
root = bpy.data.objects[name]
keep = {root, *root.children_recursive}
for obj in keep:
obj.hide_render = False
studio = bpy.data.collections['STUDIO_Not_Part_Of_Product']
for obj in scene.objects:
if obj.type in {'MESH', 'CURVE', 'FONT'} and obj not in keep and studio not in obj.users_collection:
obj.hide_render = True
def assembly_setup(camera):
if opt.mode != 'assembly':
return
if camera == 'CAM_26_Collection_Deck':
isolate_tree('Collection_Deck_Assembly')
return
if camera == 'CAM_27_Lower_Service_Covers':
isolate_tree('Lower_Service_Cover_Assembly')
return
if camera not in ['CAM_25_Fixed_Chassis', 'CAM_28_Lower_Exploded']:
return
set_tree_hidden('Removable_Transparent_Hood_Assembly', True)
set_tree_hidden('Front_Facing_Mechanism_Y_Axes', True)
if camera == 'CAM_25_Fixed_Chassis':
for name in ['Collection_Deck_Assembly', 'Lower_Service_Cover_Assembly', 'Juice_Collection_Box_Slide', 'Residue_Collection_Box_Slide']:
set_tree_hidden(name, True)
elif camera == 'CAM_28_Lower_Exploded':
bpy.data.objects['Juice_Level_Inside_Collection_Box'].hide_render = True
bpy.data.objects['Collection_Deck_Assembly'].location.z += 0.090
bpy.data.objects['Lower_Service_Cover_Assembly'].location.x += 0.220
bpy.data.objects['Juice_Collection_Box_Slide'].location.y += 0.170
bpy.data.objects['Residue_Collection_Box_Slide'].location.y += 0.130
def render(frame, camera, path):
scene.frame_set(frame)
inspection = 56 <= frame < 322 and camera not in ['CAM_01_Assembled','CAM_03_Separate_Collectors']
if opt.camera and camera != opt.camera:
return
if opt.skip_existing and path.is_file():
print(f'SKIP_EXISTING frame={frame} camera={camera} file={path.name}',flush=True)
return
prepare_frame(frame)
connection_inspection = camera == 'CAM_17_Backplate_Connections'
inspection = connection_inspection or (56 <= frame < 322 and camera not in ['CAM_01_Assembled','CAM_03_Separate_Collectors'])
bpy.data.objects['Chamber_Rear_Wall'].hide_render = connection_inspection or (56 <= frame < 322)
for name in ['Chamber_Left_Rear_Return','Chamber_Right_Rear_Return']:
bpy.data.objects[name].hide_render = inspection
empty_base = camera == 'CAM_21_Lower_Empty'
animated_visibility = []
if empty_base:
for name in ['Juice_Collection_Box_Contoured','Juice_Bin_Contoured_Rim','Residue_Collection_Box','Residue_Box_Open_Rim','Juice_Level_Inside_Collection_Box']:
obj = bpy.data.objects[name]
if obj.animation_data:
animated_visibility.append((obj,obj.hide_render))
empty_bin_visibility = []
if empty_base:
for name in ['Juice_Collection_Box_Contoured','Juice_Bin_Contoured_Rim','Residue_Collection_Box','Residue_Box_Open_Rim']:
obj = bpy.data.objects[name]
empty_bin_visibility.append((obj,obj.hide_render))
for name in ['Juice_Collection_Box_Contoured','Juice_Bin_Contoured_Rim','Residue_Collection_Box','Residue_Box_Open_Rim','Juice_Level_Inside_Collection_Box']:
bpy.data.objects[name].hide_render = empty_base
empty_liquid_visibility = []
if empty_base:
liquid = bpy.data.objects['Juice_Level_Inside_Collection_Box']
empty_liquid_visibility.append((liquid,liquid.hide_viewport,liquid.visible_camera,liquid.visible_shadow))
liquid.hide_viewport = True
liquid.keyframe_insert(data_path='hide_viewport',frame=scene.frame_current)
liquid.visible_camera = False
liquid.visible_shadow = False
if empty_base:
for obj in bpy.data.objects:
if obj.name.startswith(('Residue_A_','Residue_B_','Process_','Hopper_Queued_','Juice_Box_Droplet_','Juice_Guide_Droplet_')):
animated_visibility.append((obj,obj.hide_render))
obj.hide_render = True
obj.keyframe_insert(data_path='hide_render',frame=scene.frame_current)
for name in ['Disc_Solid_Front_Cover','Disc_Cover_Centre_Fastener','Disc_Cover_Centre_Knob','Disc_Cover_Knob_Grip']:
bpy.data.objects[name].hide_render = inspection
assembly_setup(camera)
scene.camera = bpy.data.objects[camera]
scene.render.filepath = str(path)
bpy.ops.render.render(write_still=True)
try:
bpy.ops.render.render(write_still=True)
finally:
for obj,was_hidden in empty_bin_visibility:
obj.hide_render = was_hidden
for obj,was_viewport,was_camera,was_shadow in empty_liquid_visibility:
obj.hide_viewport = was_viewport
obj.keyframe_insert(data_path='hide_viewport',frame=scene.frame_current)
obj.visible_camera = was_camera
obj.visible_shadow = was_shadow
for obj,was_hidden in animated_visibility:
obj.hide_render = was_hidden
obj.keyframe_insert(data_path='hide_render',frame=scene.frame_current)
print(f'RENDERED frame={frame} camera={camera} file={path.name}',flush=True)
if opt.mode == 'proof':
if opt.mode == 'assembly':
for frame,cam,name,size in [
(1,'CAM_25_Fixed_Chassis','preview_fixed_chassis.png',(1200,1400)),
(1,'CAM_26_Collection_Deck','preview_collection_deck.png',(1400,1000)),
(1,'CAM_27_Lower_Service_Covers','preview_lower_service_covers.png',(1200,1000)),
(1,'CAM_28_Lower_Exploded','preview_lower_exploded.png',(1400,1400)),
(1,'CAM_01_Assembled','preview_assembled.png',(1500,1700)),
(1,'CAM_21_Lower_Empty','preview_collector_empty_base.png',(1500,1300)),
]:
scene.render.resolution_x,scene.render.resolution_y = size
render(frame,cam,OUT/name)
elif opt.mode == 'hopper':
for frame,cam,name in [
(1,'CAM_09_Curved_Hopper','proof_hopper.png'),
(1,'CAM_10_Hopper_Top','proof_hopper_top.png'),
(40,'CAM_09_Curved_Hopper','proof_hopper_outlet.png'),
]:
render(frame,cam,OUT/name)
elif opt.mode == 'housing':
for frame,cam,name in [
(1,'CAM_10_Hopper_Top','proof_housing_top.png'),
(1,'CAM_13_Rear_Assembly','proof_rear_assembly.png'),
(1,'CAM_14_Rear_Clearance','proof_rear_clearance.png'),
(1,'CAM_15_Rear_Contact_Opposite','proof_rear_contact_opposite.png'),
(1,'CAM_01_Assembled','proof_assembled.png'),
]:
render(frame,cam,OUT/name)
elif opt.mode == 'supports':
for frame,cam,name in [
(1,'CAM_16_Compact_YOZ','proof_compact_side.png'),
(1,'CAM_17_Backplate_Connections','proof_backplate_connections.png'),
(1,'CAM_13_Rear_Assembly','proof_rear_assembly.png'),
(1,'CAM_01_Assembled','proof_assembled.png'),
]:
render(frame,cam,OUT/name)
elif opt.mode == 'collectors':
for frame,cam,name in [
(1,'CAM_19_Collectors_Installed','proof_collector_installed.png'),
(1,'CAM_20_Collectors_Top','proof_collector_top.png'),
(350,'CAM_18_Collectors_Detail','proof_collector_detail.png'),
(1,'CAM_21_Lower_Empty','proof_collector_empty_base.png'),
(1,'CAM_22_Residue_Side_Fit','proof_residue_side_fit.png'),
(1,'CAM_23_Juice_Side_Fit','proof_juice_side_fit.png'),
(1,'CAM_24_Lower_Rear_Fit','proof_lower_rear_fit.png'),
(350,'CAM_03_Separate_Collectors','proof_bins.png'),
]:
render(frame,cam,OUT/name)
elif opt.mode == 'apron':
for frame,cam,name in [
(1,'CAM_11_Control_Apron','proof_apron_ready.png'),
(24,'CAM_12_LCD_Status','proof_button_pressed.png'),
(192,'CAM_11_Control_Apron','proof_apron_processing.png'),
(192,'CAM_12_LCD_Status','proof_lcd_processing.png'),
(350,'CAM_11_Control_Apron','proof_apron_stopped.png'),
]:
render(frame,cam,OUT/name)
elif opt.mode == 'proof':
for frame,cam,name in [
(1,'CAM_01_Assembled','proof_assembled.png'),
(129,'CAM_02_Four_Pocket_And_Blade','proof_cutting.png'),
@@ -58,6 +228,24 @@ if opt.mode == 'proof':
elif opt.mode == 'stills':
for frame,cam,name,size in [
(1,'CAM_01_Assembled','preview_assembled.png',(1500,1700)),
(1,'CAM_09_Curved_Hopper','preview_hopper.png',(1500,1400)),
(1,'CAM_10_Hopper_Top','preview_hopper_top.png',(1500,1400)),
(1,'CAM_13_Rear_Assembly','preview_rear_assembly.png',(1500,1700)),
(1,'CAM_14_Rear_Clearance','preview_rear_clearance.png',(1500,1400)),
(1,'CAM_15_Rear_Contact_Opposite','preview_rear_contact_opposite.png',(1500,1400)),
(1,'CAM_16_Compact_YOZ','preview_compact_side.png',(1400,1600)),
(1,'CAM_17_Backplate_Connections','preview_backplate_connections.png',(1500,1400)),
(350,'CAM_18_Collectors_Detail','preview_collector_detail.png',(1500,1300)),
(1,'CAM_19_Collectors_Installed','preview_collector_installed.png',(1500,1300)),
(1,'CAM_20_Collectors_Top','preview_collector_top.png',(1500,1300)),
(1,'CAM_21_Lower_Empty','preview_collector_empty_base.png',(1500,1300)),
(1,'CAM_22_Residue_Side_Fit','preview_residue_side_fit.png',(1400,1200)),
(1,'CAM_23_Juice_Side_Fit','preview_juice_side_fit.png',(1400,1200)),
(1,'CAM_24_Lower_Rear_Fit','preview_lower_rear_fit.png',(1400,1200)),
(1,'CAM_11_Control_Apron','preview_control_apron.png',(1500,1050)),
(1,'CAM_12_LCD_Status','preview_lcd_ready.png',(1400,800)),
(192,'CAM_12_LCD_Status','preview_lcd_processing.png',(1400,800)),
(350,'CAM_12_LCD_Status','preview_lcd_stopped.png',(1400,800)),
(129,'CAM_02_Four_Pocket_And_Blade','preview_cutting.png',(1500,1400)),
(150,'CAM_04_Structure_Side','preview_split_halves.png',(1500,1400)),
(186,'CAM_02_Four_Pocket_And_Blade','preview_blade_transfer.png',(1500,1400)),
@@ -71,11 +259,20 @@ elif opt.mode == 'stills':
]:
scene.render.resolution_x,scene.render.resolution_y = size
render(frame,cam,OUT/name)
elif opt.mode == 'exterior':
for frame,cam,name,size in [
(1,'CAM_29_Residue_Exterior_Match','preview_residue_exterior.png',(1400,1400)),
(1,'CAM_30_Residue_Deck_Coverage','preview_residue_deck_coverage.png',(1400,1100)),
(1,'CAM_16_Compact_YOZ','preview_compact_side.png',(1400,1600)),
]:
scene.render.resolution_x,scene.render.resolution_y = size
render(frame,cam,OUT/name)
else:
folder = OUT/'render_frames'
folder.mkdir(exist_ok=True)
for old_frame in folder.glob('*.png'):
old_frame.unlink()
if opt.start==1 and opt.end==360 and opt.step==2 and not opt.skip_existing:
for old_frame in folder.glob('*.png'):
old_frame.unlink()
def emission(name,color):
mat = bpy.data.materials.new(name)
@@ -92,7 +289,7 @@ else:
grey = emission('Video_Text_Grey',(0.68,0.77,0.81))
dark = emission('Video_Text_Background',(0.014,0.024,0.030))
labels = {}
for cam_name in ['CAM_01_Assembled','CAM_02_Four_Pocket_And_Blade','CAM_03_Separate_Collectors','CAM_06_Pocket_Thickness_Midplane','CAM_07_Pressing_Contact','CAM_08_Continuous_Press_Side']:
for cam_name in ['CAM_01_Assembled','CAM_02_Four_Pocket_And_Blade','CAM_03_Separate_Collectors','CAM_06_Pocket_Thickness_Midplane','CAM_07_Pressing_Contact','CAM_08_Continuous_Press_Side','CAM_09_Curved_Hopper','CAM_11_Control_Apron','CAM_12_LCD_Status','CAM_13_Rear_Assembly','CAM_14_Rear_Clearance','CAM_16_Compact_YOZ','CAM_17_Backplate_Connections','CAM_18_Collectors_Detail','CAM_19_Collectors_Installed','CAM_20_Collectors_Top','CAM_21_Lower_Empty','CAM_22_Residue_Side_Fit','CAM_23_Juice_Side_Fit','CAM_24_Lower_Rear_Fit']:
cam = bpy.data.objects[cam_name]
frame = cam.data.view_frame(scene=scene)
left,right = min(v.x for v in frame),max(v.x for v in frame)
@@ -126,33 +323,87 @@ else:
labels[(cam_name,kind)] = obj
for f in range(opt.start,opt.end+1,opt.step):
cam = 'CAM_01_Assembled' if f<=55 else 'CAM_03_Separate_Collectors' if f>=322 else 'CAM_06_Pocket_Thickness_Midplane' if 120<=f<=141 else 'CAM_07_Pressing_Contact' if 166<=f<=223 else 'CAM_08_Continuous_Press_Side' if 230<=f<=307 else 'CAM_02_Four_Pocket_And_Blade'
if f<64:
title = '01 / FEED WITH BOTH ROTORS TURNING'
cam = 'CAM_09_Curved_Hopper' if f<=28 else 'CAM_03_Separate_Collectors' if f>=322 else 'CAM_06_Pocket_Thickness_Midplane' if 120<=f<=141 else 'CAM_07_Pressing_Contact' if 166<=f<=223 else 'CAM_08_Continuous_Press_Side' if 230<=f<=307 else 'CAM_02_Four_Pocket_And_Blade'
if f<28:
title = '01 / CURVED ORANGE STORAGE TROUGH'
elif f<64:
title = '02 / CURVED FEED TO ROTATING POCKET'
elif f<120:
title = '02 / CONTINUOUS INDEX TO EXTERNAL BLADE'
title = '03 / CONTINUOUS INDEX TO EXTERNAL BLADE'
elif f<148:
title = '03 / EXTERNAL TANGENTIAL CUT'
title = '04 / EXTERNAL TANGENTIAL CUT'
elif f<166:
title = '04 / HALF FOLLOWS ROTATING POCKET'
title = '05 / HALF FOLLOWS ROTATING POCKET'
elif f<178:
title = '05 / BALL ENTERS WITHOUT LIFTING'
title = '06 / BALL ENTERS WITHOUT LIFTING'
elif f<192:
title = '06 / BOTH ROTORS KEEP TURNING'
title = '07 / BOTH ROTORS KEEP TURNING'
elif f<214:
title = '07 / ROLLING NIP / DEEPEST AT 08s'
title = '08 / ROLLING NIP / DEEPEST AT 08s'
elif f<230:
title = '08 / SQUEEZED PEEL RELEASES'
title = '09 / SQUEEZED PEEL RELEASES'
elif f<256:
title = '09 / SECOND ROLLING NIP / SIDE VIEW'
title = '10 / SECOND ROLLING NIP / SIDE VIEW'
elif f<278:
title = '10 / CONTINUOUS ROTARY EXTRACTION'
title = '11 / CONTINUOUS ROTARY EXTRACTION'
elif f<322:
title = '11 / PEEL DISCHARGE / NO ROTOR STOP'
title = '12 / PEEL DISCHARGE / NO ROTOR STOP'
else:
title = '12 / SEPARATE COLLECTION BOXES'
title = '13 / SEPARATE COLLECTION BOXES'
if f<=27:
cam = 'CAM_11_Control_Apron'
title = 'READY / PRESS START'
elif f<=36:
cam = 'CAM_11_Control_Apron'
title = 'PROCESSING / RIGHT-SIDE CONTROLS'
elif 322<=f<=324:
cam = 'CAM_19_Collectors_Installed'
title = 'SHALLOW BINS / FRONT COLLECTION BAY'
elif 325<=f<=327:
cam = 'CAM_22_Residue_Side_Fit'
title = 'RESIDUE BIN / LEFT SIDE FIT'
elif 328<=f<=330:
cam = 'CAM_23_Juice_Side_Fit'
title = 'JUICE BIN / RIGHT SIDE FIT'
elif 331<=f<=334:
cam = 'CAM_21_Lower_Empty'
title = 'FIXED CHASSIS / SHARED FRONT SILL'
elif 335<=f<=338:
cam = 'CAM_24_Lower_Rear_Fit'
title = 'FIXED SPINE / REMOVABLE SIDE COVERS'
elif 339<=f<=346:
cam = 'CAM_18_Collectors_Detail'
title = 'JUICE SLIDES / RESIDUE STAYS SEATED'
elif 347<=f<=350:
cam = 'CAM_03_Separate_Collectors'
title = 'ONE-PIECE INDEPENDENT COLLECTORS'
elif f>=351:
cam = 'CAM_11_Control_Apron'
title = 'STOPPED / CYCLE COMPLETE'
for (name,kind),obj in labels.items():
obj.hide_render = name != cam
labels[(cam,'title')].data.body = title
labels[(cam,'footer')].data.body = 'CONTINUOUS ROTORS / NO VERTICAL RAM' if cam in ['CAM_01_Assembled','CAM_03_Separate_Collectors'] else 'INSPECTION: COVER OFF / NONSTOP ROTORS / NO RAM'
if cam in ['CAM_18_Collectors_Detail','CAM_19_Collectors_Installed']:
footer = 'SHALLOW FRONT BINS / 7 MM RIM CLEARANCE / SHARED SILL'
elif cam == 'CAM_22_Residue_Side_Fit':
footer = '172 MM RESIDUE BIN / LEFT FRONT BAY'
elif cam == 'CAM_23_Juice_Side_Fit':
footer = '134 MM JUICE BIN / RIGHT FRONT BAY'
elif cam == 'CAM_21_Lower_Empty':
footer = 'FIXED CONTROL POD / REMOVABLE SIDE COVERS'
elif cam == 'CAM_24_Lower_Rear_Fit':
footer = '22 MM FIXED SPINE / NO CENTER DIVIDER'
elif cam == 'CAM_17_Backplate_Connections':
footer = 'FIXED SPINE HIDDEN FOR INSPECTION / MOUNTED SUPPORTS'
elif cam == 'CAM_16_Compact_YOZ':
footer = 'Y DEPTH -40 MM / ALL GROUPS SUPPORTED'
elif cam == 'CAM_14_Rear_Clearance':
footer = 'SLOPED SEAT / NO PENETRATION / 0.2 MM BACKPLATE FIT'
elif cam == 'CAM_13_Rear_Assembly':
footer = 'HOOD EXTENDED 58 MM / BACKPLATE SHIFTED 40 MM'
elif cam == 'CAM_11_Control_Apron':
footer = 'INCLINED HOLLOW DECK / FIXED CONTROL POD / THREE STATES'
else:
footer = 'CONTINUOUS ROTORS / NO VERTICAL RAM' if cam in ['CAM_01_Assembled','CAM_03_Separate_Collectors'] or f<56 or f>=322 else 'INSPECTION: COVER OFF / NONSTOP ROTORS / NO RAM'
labels[(cam,'footer')].data.body = footer
render(f,cam,folder/f'{f:04d}.png')