Files

1680 lines
83 KiB
Python

import bpy
import bmesh
import math
import json
import hashlib
from pathlib import Path
from mathutils import Vector, Matrix
OUT = Path(__file__).resolve().parent
DOC = OUT.parents[1] / 'HOW_ZMUEX_juicer_work.md'
bpy.ops.wm.read_factory_settings(use_empty=True)
bpy.context.preferences.filepaths.save_version = 0
scene = bpy.context.scene
scene.unit_settings.system = 'METRIC'
scene.unit_settings.length_unit = 'METERS'
scene.unit_settings.scale_length = 1
scene.frame_start = 1
scene.frame_end = 360
scene.render.fps = 24
def collection(name):
coll = bpy.data.collections.new(name)
scene.collection.children.link(coll)
return coll
exterior = collection('01_Fixed_Chassis_Base_And_Control_Pod')
hood_coll = collection('02_Removable_Transparent_Hood')
hopper_coll = collection('03_Curved_Hopper_Gate_And_Ramp')
disk_coll = collection('04_Four_Hemispherical_Pocket_Disc')
blade_coll = collection('05_External_Tangential_Blade_And_Spring_Ejector')
press_coll = collection('06_Three_Spherical_Pressing_Heads')
bin_coll = collection('07_Independent_Front_Collectors')
deck_coll = collection('07A_Removable_Open_Collection_Deck')
cover_coll = collection('07B_Removable_Lower_Service_Covers')
fruit_coll = collection('08_Whole_Fruit_Halves_And_Pressed_Residue')
juice_coll = collection('09_Juice_Flow_And_Collection')
studio = collection('STUDIO_Not_Part_Of_Product')
root = bpy.data.objects.new('Juicer_User_Spec_Root', None)
exterior.objects.link(root)
root.empty_display_size = 0.04
root['source_document'] = 'HOW_ZMUEX_juicer_work.md'
root['source_sha256'] = hashlib.sha256(DOC.read_bytes()).hexdigest()
root['mechanism'] = 'Four hemispherical pockets; external tangential blade; three spherical heads on an equilateral triangle'
root['axes'] = 'Disc and three-head pressing unit rotate around parallel Y axes. Circular faces lie in XOZ and face machine front +Y. Both rotate clockwise continuously when viewed from +Y.'
root['revision'] = 'Reference 01:59-02:06: continuous synchronized rotors, fruit carried through the rolling nip, no dwell or upward ram, squeezed hollow peels released after engagement'
root['mechanism_color_palette'] = 'Light blue-gray machinery contrasts with orange fruit and pressed peels'
root['motion_scope'] = 'Slow visualization of the supplied 01:59-02:06 reference; constant four-pocket/three-head angular speed ratio, not manufacturer RPM calibration'
root['reference_video'] = 'model_assets/reference/juicer/ZMUEX_working_video.mp4'
root['reference_segment_seconds'] = [119,126]
root['hopper_reference_segment_seconds'] = [110,112]
root['hopper_form'] = 'Open-top curved trough: circular-arc centerline, recessed U cross-section, integrated side walls and rounded lips; fruit seated on the curved floor'
root['press_motion'] = 'Disc advances -90/64 degrees per frame; press advances 4/3 times that angle. Neither rotor stops or translates. Each half follows its pocket through the rolling contact arc.'
root['collectors'] = 'Independent shallow front collectors: 172 mm residue and 134 mm juice depth; 7 mm outer-wall clearance for the two rounded rims and one shared front support surface; no separate door, divider, rails or detents'
root['collector_reference_segment_seconds'] = [243,249]
root['assembly_reference_segment_seconds'] = [233,283]
root['collector_removal_demo'] = 'Only the juice collector slides forward, matching the reference; the deck-fitted residue collector remains installed and is supplied as an independent Blender file for acceptance'
root['control_apron'] = 'Removable hollow inclined collection deck covering the residue bin except for its discharge inlet, with an open juice mouth; the display and start button belong to the fixed control pod'
root['sketchfab_reference'] = 'https://sketchfab.com/3d-models/zumex-animation-school-project-b49e8f3bb06a4a4ca71eacb4ed11ba52'
root['sketchfab_review'] = 'Front, oblique and side silhouette inspected in the official viewer; used as proportion reference only, with no extracted mesh or brand text'
root['guide_flow'] = 'Solid molded juice guide descends toward global -X above the front juice bin, supported by cleats attached to the removable collection deck'
root['control_right_side'] = 'Assembled view from +Y with +Z up: visual right is global -X'
root['lcd_states'] = ['Ready','Processing','Stopped']
root['lcd_state_schedule'] = {'Ready':[1,27],'Processing':[28,321],'Stopped':[322,360]}
root['housing_revision'] = 'Assembly 03:53 onward: fixed rear load spine, base and control pod; removable open collection deck, transparent hood, front collectors and lower side service covers'
root['backplate_connections'] = 'Disc and press shafts engage the fixed rear spine; blade and hopper mounts remain fixed; the juice guide is supported only by the removable collection deck'
root['housing_revision'] = 'Fixed rear spine and opaque rear side returns support the mechanism; clear hood covers the front; independent inclined collection deck, front bins and lower covers remain removable'
root['decorative_latches_removed'] = True
root['contact_fit_revision'] = 'The rear spine reaches from the base to the hood floor; shallow bins occupy only the front bay, with separate graphite rear lower side covers behind them and no center divider'
def empty(name, loc, coll, parent=root):
obj = bpy.data.objects.new(name, None)
coll.objects.link(obj)
obj.parent = parent
obj.location = loc
obj.empty_display_size = 0.014
return obj
def move_to(obj, coll, parent):
for old in list(obj.users_collection):
old.objects.unlink(obj)
coll.objects.link(obj)
if parent is not None:
obj.parent = parent
obj.matrix_parent_inverse = Matrix.Identity(4)
return obj
def material(name, color, metallic=0, roughness=0.4, coat=0):
mat = bpy.data.materials.new(name)
mat.use_nodes = True
mat.diffuse_color = (*color, 1)
shader = mat.node_tree.nodes.get('Principled BSDF')
shader.inputs['Base Color'].default_value = (*color, 1)
shader.inputs['Metallic'].default_value = metallic
shader.inputs['Roughness'].default_value = roughness
shader.inputs['Coat Weight'].default_value = coat
return mat
teal = material('Cabinet_Deep_Teal', (0.010, 0.095, 0.102), 0.1, 0.31, 0.18)
teal_edge = material('Cabinet_Teal_Edge', (0.017, 0.125, 0.13), 0.08, 0.34)
black = material('Black_Rubber', (0.009, 0.013, 0.015), 0, 0.5)
graphite = material('Graphite_Control_And_Frame', (0.019, 0.026, 0.029), 0.08, 0.36)
back_mat = material('Backplate_Green', (0.018, 0.145, 0.095), 0.08, 0.36)
backplate_edge = material('Backplate_Green_Edge', (0.028, 0.180, 0.120), 0.06, 0.38)
hopper_mat = material('Hopper_Matte_Black', (0.009, 0.012, 0.013), 0, 0.58)
hopper_mat.node_tree.nodes.get('Principled BSDF').inputs['Specular IOR Level'].default_value = 0.06
orange = material('Mechanism_Light_Blue_Gray_Polymer', (0.56, 0.65, 0.70), 0, 0.38, 0.04)
orange_dark = material('Mechanism_Recess_Blue_Gray', (0.20, 0.27, 0.32), 0, 0.41)
orange_edge = material('Mechanism_Light_Edge', (0.78, 0.84, 0.87), 0, 0.34)
steel = material('Brushed_Stainless', (0.52, 0.59, 0.62), 0.86, 0.26)
bin_metal = material('Collector_Brushed_Dark_Steel', (0.16, 0.19, 0.21), 0.65, 0.30)
collector_red = material('Collector_Red_Polymer', (0.36,0.020,0.058), 0, 0.32, 0.18)
residue_red = material('Residue_Deep_Red_Polymer', (0.29,0.016,0.045), 0, 0.35, 0.16)
chrome = material('Polished_Steel', (0.72, 0.79, 0.82), 0.94, 0.17)
white = material('Indicator_White', (0.80, 0.90, 0.92), 0, 0.35)
blue = material('LCD_Dark_Blue_Glass', (0.009, 0.038, 0.050), 0.05, 0.24, 0.24)
blue.node_tree.nodes.get('Principled BSDF').inputs['Emission Color'].default_value = (0.006, 0.022, 0.028, 1)
blue.node_tree.nodes.get('Principled BSDF').inputs['Emission Strength'].default_value = 0.25
lcd_text = material('LCD_Status_Letters', (0.76,0.92,0.86), 0, 0.32)
lcd_text.node_tree.nodes.get('Principled BSDF').inputs['Emission Color'].default_value = (0.63,0.88,0.77,1)
lcd_text.node_tree.nodes.get('Principled BSDF').inputs['Emission Strength'].default_value = 0.45
juice_mat = material('Fresh_Orange_Juice', (0.95, 0.31, 0.008), 0, 0.27)
juice_mat.node_tree.nodes.get('Principled BSDF').inputs['Subsurface Weight'].default_value = 0.05
pith = material('Orange_Pith', (0.96, 0.77, 0.36), 0, 0.49)
flesh = material('Orange_Flesh', (1.0, 0.43, 0.035), 0, 0.36)
flesh.node_tree.nodes.get('Principled BSDF').inputs['Subsurface Weight'].default_value = 0.08
seed_mat = material('Orange_Seeds', (0.93, 0.81, 0.51), 0, 0.4)
peel = material('Orange_Peel_Procedural', (0.8, 0.14, 0.003), 0, 0.47)
nodes = peel.node_tree.nodes
links = peel.node_tree.links
shader = nodes.get('Principled BSDF')
noise = nodes.new('ShaderNodeTexNoise')
noise.inputs['Scale'].default_value = 125
noise.inputs['Detail'].default_value = 3
ramp = nodes.new('ShaderNodeValToRGB')
ramp.color_ramp.elements[0].color = (0.36, 0.027, 0.001, 1)
ramp.color_ramp.elements[1].color = (0.80, 0.14, 0.002, 1)
links.new(noise.outputs['Fac'], ramp.inputs[0])
links.new(ramp.outputs['Color'], shader.inputs['Base Color'])
bump = nodes.new('ShaderNodeBump')
bump.inputs['Strength'].default_value = 0.25
bump.inputs['Distance'].default_value = 0.00045
links.new(noise.outputs['Fac'], bump.inputs['Height'])
links.new(bump.outputs['Normal'], shader.inputs['Normal'])
clear = bpy.data.materials.new('Clear_Tritan_Thin_Shell')
clear.use_nodes = True
clear.diffuse_color = (0.86, 0.93, 0.95, 0.18)
n = clear.node_tree.nodes
n.clear()
out = n.new('ShaderNodeOutputMaterial')
transparent = n.new('ShaderNodeBsdfTransparent')
transparent.inputs[0].default_value = (0.96, 0.985, 1, 1)
glass = n.new('ShaderNodeBsdfGlass')
glass.inputs['Color'].default_value = (0.93, 0.97, 0.985, 1)
glass.inputs['Roughness'].default_value = 0.025
glass.inputs['IOR'].default_value = 1.46
mix = n.new('ShaderNodeMixShader')
mix.inputs[0].default_value = 0.035
links = clear.node_tree.links
links.new(transparent.outputs[0], mix.inputs[1])
links.new(glass.outputs[0], mix.inputs[2])
links.new(mix.outputs[0], out.inputs['Surface'])
def assign(obj, mat):
obj.data.materials.append(mat)
return obj
def bevel(obj, width=0.001, segments=3):
if width:
mod = obj.modifiers.new('Soft_Edges', 'BEVEL')
mod.width = width
mod.segments = segments
if obj.type == 'MESH':
mod = obj.modifiers.new('Weighted_Normals', 'WEIGHTED_NORMAL')
mod.keep_sharp = True
def mesh(name, vertices, faces, mat, coll, parent=root, smooth=True):
data = bpy.data.meshes.new(name + '_Mesh')
data.from_pydata(vertices, [], faces)
data.update()
bm = bmesh.new()
bm.from_mesh(data)
bmesh.ops.recalc_face_normals(bm, faces=list(bm.faces))
if bm.calc_volume(signed=True) < 0:
bmesh.ops.reverse_faces(bm, faces=list(bm.faces))
bm.to_mesh(data)
bm.free()
obj = bpy.data.objects.new(name, data)
coll.objects.link(obj)
obj.parent = parent
assign(obj, mat)
for poly in data.polygons:
poly.use_smooth = smooth
return obj
def box(name, loc, dims, mat, coll, parent=root, edge=0.001, rot=None):
bpy.ops.mesh.primitive_cube_add(size=1, location=loc)
obj = bpy.context.object
obj.name = name
obj.dimensions = dims
bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
if rot is not None:
obj.rotation_euler = rot
move_to(obj, coll, parent)
assign(obj, mat)
bevel(obj, edge)
return obj
def cyl(name, loc, radius, depth, mat, coll, parent=root, axis='Z', edge=0.0005, vertices=96):
bpy.ops.mesh.primitive_cylinder_add(vertices=vertices, radius=radius, depth=depth, location=loc)
obj = bpy.context.object
obj.name = name
if axis == 'Y':
obj.rotation_euler.x = math.pi / 2
elif axis == 'X':
obj.rotation_euler.y = math.pi / 2
move_to(obj, coll, parent)
assign(obj, mat)
for poly in obj.data.polygons:
poly.use_smooth = len(poly.vertices) == 4
bevel(obj, edge)
return obj
def sphere(name, loc, radius, mat, coll, parent=root, scale=(1, 1, 1)):
bpy.ops.mesh.primitive_uv_sphere_add(segments=48, ring_count=32, radius=radius, location=loc)
obj = bpy.context.object
obj.name = name
obj.scale = scale
move_to(obj, coll, parent)
assign(obj, mat)
for poly in obj.data.polygons:
poly.use_smooth = True
return obj
def torus(name, loc, major, minor, mat, coll, parent=root, axis='Z'):
bpy.ops.mesh.primitive_torus_add(major_radius=major, minor_radius=minor, major_segments=96, minor_segments=16, location=loc)
obj = bpy.context.object
obj.name = name
if axis == 'Y':
obj.rotation_euler.x = math.pi / 2
move_to(obj, coll, parent)
assign(obj, mat)
for poly in obj.data.polygons:
poly.use_smooth = True
return obj
def lathe(name, profile, loc, mat, coll, parent=root, axis='Z', segments=96):
vertices = []
rings = []
for r, h in profile:
if r < 1e-8:
rings.append([len(vertices)])
vertices.append((0, 0, h))
else:
ring = []
for j in range(segments):
a = math.tau * j / segments
ring.append(len(vertices))
vertices.append((r * math.cos(a), r * math.sin(a), h))
rings.append(ring)
faces = []
for i in range(len(rings)):
first = rings[i]
second = rings[(i + 1) % len(rings)]
for j in range(segments):
k = (j + 1) % segments
if len(first) == 1 and len(second) == 1:
continue
if len(first) == 1:
faces.append((first[0], second[k], second[j]))
elif len(second) == 1:
faces.append((first[j], first[k], second[0]))
else:
faces.append((first[j], first[k], second[k], second[j]))
obj = mesh(name, vertices, faces, mat, coll, parent)
obj.location = loc
if axis == 'Y':
obj.rotation_euler.x = -math.pi / 2
elif axis == '-Y':
obj.rotation_euler.x = math.pi / 2
return obj
def line(name, points, radius, mat, coll, parent=root, closed=False):
data = bpy.data.curves.new(name + '_Curve', 'CURVE')
data.dimensions = '3D'
data.bevel_depth = radius
data.bevel_resolution = 3
data.use_fill_caps = True
spline = data.splines.new('POLY')
spline.points.add(len(points) - 1)
for point, value in zip(spline.points, points):
point.co = (*value, 1)
spline.use_cyclic_u = closed
obj = bpy.data.objects.new(name, data)
coll.objects.link(obj)
obj.parent = parent
assign(obj, mat)
return obj
def rounded_rect(w, h, r, steps=14):
points = []
corners = [(w/2-r, h/2-r, 0), (-w/2+r, h/2-r, math.pi/2), (-w/2+r, -h/2+r, math.pi), (w/2-r, -h/2+r, 3*math.pi/2)]
for cx, cy, start in corners:
for i in range(steps+1):
a = start + math.pi * i / (2*steps)
points.append((cx+r*math.cos(a), cy+r*math.sin(a)))
return points
def loft(name, profiles, mat, coll, parent=root, edge=0.001):
vertices = []
for z, w, d, r, cx, cy in profiles:
vertices.extend((x+cx, y+cy, z) for x, y in rounded_rect(w, d, r))
count = len(vertices)//len(profiles)
faces = []
for ring in range(len(profiles)-1):
for j in range(count):
k = (j+1) % count
faces.append((ring*count+j, ring*count+k, (ring+1)*count+k, (ring+1)*count+j))
faces.append(tuple(reversed(range(count))))
faces.append(tuple((len(profiles)-1)*count+j for j in range(count)))
obj = mesh(name, vertices, faces, mat, coll, parent)
if edge:
bevel(obj, edge)
return obj
def prism_xz(name, outline, y0, y1, mat, coll, parent=root, edge=0.001):
count = len(outline)
vertices = [(x, y0, z) for x,z in outline] + [(x, y1, z) for x,z in outline]
faces = [tuple(range(count)), tuple(reversed(range(count, 2*count)))]
for j in range(count):
k = (j+1) % count
faces.append((j, count+j, count+k, k))
obj = mesh(name, vertices, faces, mat, coll, parent)
if edge:
bevel(obj, edge)
return obj
def triangulate_mesh(obj):
bm = bmesh.new()
bm.from_mesh(obj.data)
bmesh.ops.triangulate(bm,faces=list(bm.faces))
bmesh.ops.recalc_face_normals(bm,faces=list(bm.faces))
bm.to_mesh(obj.data)
bm.free()
obj.data.update()
def prism_xy(name, outline, z0, z1, mat, coll, parent=root, edge=0.001):
count = len(outline)
vertices = [(x,y,z0) for x,y in outline]+[(x,y,z1) for x,y in outline]
faces = [tuple(reversed(range(count))),tuple(range(count,2*count))]
for i in range(count):
j = (i+1)%count
faces.append((i,j,count+j,count+i))
obj = mesh(name,vertices,faces,mat,coll,parent)
if edge:
bevel(obj,edge)
return obj
def prism_yz(name, outline, x0, x1, mat, coll, parent=root, edge=0):
count = len(outline)
vertices = [(x0,y,z) for y,z in outline]+[(x1,y,z) for y,z in outline]
faces = [tuple(reversed(range(count))),tuple(range(count,2*count))]
for i in range(count):
j = (i+1)%count
faces.append((i,count+i,count+j,j))
obj = mesh(name,vertices,faces,mat,coll,parent)
if edge:
bevel(obj,edge)
return obj
def collector_footprint(w,d,front_radius,back_radius,steps=12,straight_steps=6):
corners = [
(w/2-front_radius,d/2-front_radius,front_radius,0),
(-w/2+front_radius,d/2-front_radius,front_radius,math.pi/2),
(-w/2+back_radius,-d/2+back_radius,back_radius,math.pi),
(w/2-back_radius,-d/2+back_radius,back_radius,3*math.pi/2),
]
points = []
for index,(cx,cy,r,start) in enumerate(corners):
for i in range(steps+1):
angle = start+math.pi*i/(2*steps)
x,y = cx+r*math.cos(angle),cy+r*math.sin(angle)
points.append((x,y,math.atan2(y/(d/2),x/(w/2))))
end_angle = start+math.pi/2
end = (cx+r*math.cos(end_angle),cy+r*math.sin(end_angle))
next_cx,next_cy,next_r,next_start = corners[(index+1)%len(corners)]
next_point = (next_cx+next_r*math.cos(next_start),next_cy+next_r*math.sin(next_start))
for i in range(1,straight_steps):
t = i/straight_steps
x,y = end[0]+(next_point[0]-end[0])*t,end[1]+(next_point[1]-end[1])*t
points.append((x,y,math.atan2(y/(d/2),x/(w/2))))
return points
def contoured_vessel(name, center, width, depth, front_radius, back_radius, bottom_z, bottom_scale, rim_height, mat, coll, bottom_y_scale=None):
footprint = collector_footprint(width,depth,front_radius,back_radius)
count = len(footprint)
cx,cy = center
y_scale = bottom_scale if bottom_y_scale is None else bottom_y_scale
vertices = [(cx+x*bottom_scale,cy+y*y_scale,bottom_z) for x,y,theta in footprint]
vertices += [(cx+x,cy+y,rim_height(theta,cx+x,cy+y)) for x,y,theta in footprint]
faces = [tuple(reversed(range(count)))]
for i in range(count):
j = (i+1)%count
faces.append((i,j,count+j,count+i))
obj = mesh(name,vertices,faces,mat,coll,root)
solid = obj.modifiers.new('Collector_Wall_And_Floor_Thickness','SOLIDIFY')
solid.thickness = 0.003
solid.offset = -1
solid.use_even_offset = True
bpy.context.view_layer.objects.active = obj
bpy.ops.object.modifier_apply(modifier=solid.name)
obj['floor_z_m'] = bottom_z
obj['rim_min_z_m'] = min(rim_height(theta,cx+x,cy+y) for x,y,theta in footprint)
obj['rim_max_z_m'] = max(rim_height(theta,cx+x,cy+y) for x,y,theta in footprint)
obj['bottom_scale'] = bottom_scale
obj['bottom_y_scale'] = y_scale
obj['wall_thickness_m'] = 0.003
top_points = [(cx+x,cy+y,rim_height(theta,cx+x,cy+y)) for x,y,theta in footprint]
return obj,top_points
def boolean(obj, cutter):
if obj.parent is None and cutter.parent is None:
bpy.ops.object.select_all(action='DESELECT')
obj.select_set(True)
cutter.select_set(True)
bpy.context.view_layer.objects.active = obj
bpy.ops.object.transform_apply(location=False, rotation=True, scale=True)
bpy.context.view_layer.update()
bpy.context.view_layer.objects.active = obj
mod = obj.modifiers.new('Applied_Construction_Boolean', 'BOOLEAN')
mod.operation = 'DIFFERENCE'
mod.solver = 'MANIFOLD'
mod.object = cutter
bpy.context.view_layer.update()
bpy.ops.object.modifier_apply(modifier=mod.name)
bpy.data.objects.remove(cutter, do_unlink=True)
def union(obj, cutter):
bpy.context.view_layer.update()
bpy.context.view_layer.objects.active = obj
mod = obj.modifiers.new('Applied_Relief_Union', 'BOOLEAN')
mod.operation = 'UNION'
mod.solver = 'MANIFOLD'
mod.object = cutter
bpy.context.view_layer.update()
bpy.ops.object.modifier_apply(modifier=mod.name)
bpy.data.objects.remove(cutter, do_unlink=True)
def text(name, body, loc, size, mat, coll, parent=root):
data = bpy.data.curves.new(name + '_Font', 'FONT')
data.body = body
data.size = size
data.align_x = 'CENTER'
data.align_y = 'CENTER'
obj = bpy.data.objects.new(name, data)
coll.objects.link(obj)
obj.parent = parent
obj.location = loc
obj.rotation_euler = (math.pi/2, 0, math.pi)
assign(obj, mat)
return obj
def key(obj, frame, loc=None, rot=None, scale=None):
if loc is not None:
obj.location = loc
obj.keyframe_insert(data_path='location', frame=frame)
if rot is not None:
obj.rotation_euler = rot
obj.keyframe_insert(data_path='rotation_euler', frame=frame)
if scale is not None:
obj.scale = scale
obj.keyframe_insert(data_path='scale', frame=frame)
APRON_HALF_WIDTH = 0.171
REAR_COMPACT_SHIFT = 0.040
HOOD_REAR_Y = -0.178+REAR_COMPACT_SHIFT
BACKPLATE_THICKNESS = 0.022
BACKPLATE_FRONT_Y = HOOD_REAR_Y+0.005+BACKPLATE_THICKNESS
REAR_LINER_SEAT_OFFSET = 0.0009
LOWER_BACKPLATE_APRON_CLEARANCE = 0.0002
def apron_top(x):
t = (APRON_HALF_WIDTH-x)/(2*APRON_HALF_WIDTH)
return 0.360-0.062*(0.55*t+0.45*t*t)
def apron_front_y(x):
return 0.154+0.008*(1-(x/APRON_HALF_WIDTH)**2)
def apron_bottom(x):
t = (APRON_HALF_WIDTH-x)/(2*APRON_HALF_WIDTH)
return 0.208+0.006*t
def deck_height(x,y):
t = min(1,max(0,(y+0.108)/(apron_front_y(x)+0.108)))
return (apron_top(x)-0.012)*(1-t)+(apron_bottom(x)+0.001)*t
COLLECTOR_FRONT_Y = 0.154
RESIDUE_REAR_Y = -0.018
JUICE_REAR_Y = 0.020
RESIDUE_CENTER_Y = (RESIDUE_REAR_Y+COLLECTOR_FRONT_Y)/2
JUICE_CENTER_Y = (JUICE_REAR_Y+COLLECTOR_FRONT_Y)/2
RESIDUE_DEPTH = COLLECTOR_FRONT_Y-RESIDUE_REAR_Y
JUICE_DEPTH = COLLECTOR_FRONT_Y-JUICE_REAR_Y
COLLECTOR_BOTTOM_Z = 0.039
RESIDUE_FRONT_FIT_CLEARANCE = 0.0080
RESIDUE_CENTER_X = 0.0625
RESIDUE_WIDTH = 0.195
JUICE_CENTER_X = -0.101
JUICE_WIDTH = 0.118
CONTROL_POD_X_MIN = -0.166
CONTROL_POD_X_MAX = -0.041
fixed_chassis = empty('Fixed_Chassis_Assembly',(0,0,0),exterior,root)
deck_assembly = empty('Collection_Deck_Assembly',(0,0,0),deck_coll,root)
cover_assembly = empty('Lower_Service_Cover_Assembly',(0,0,0),cover_coll,root)
fixed_chassis['assembly_role'] = 'Fixed rear load spine, rear side returns, base and control pod'
deck_assembly['assembly_role'] = 'Removable open black collection deck, fascia, side rails and solid juice guide'
deck_assembly['reference_seconds'] = [233,243]
cover_assembly['assembly_role'] = 'Two independent graphite rear lower side covers behind the front collectors; they form the rear exterior, not the residue-bin side wall'
root['outer_edge_parts'] = 'Rear upper returns and rear lower covers form the rear sides; residue and juice collectors form the front and front-side lower walls; the black deck covers the residue top except for a bounded inlet'
plinth_outline = [(-0.171,-0.138),(.171,-0.138),(.177,-.126),(.177,.092),(.183,.106),(.183,.176),(.176,.188),(-.163,.188),(-.177,.180),(-.177,.115),(-.171,.101),(-.171,-.126)]
prism_xy('Cabinet_Base_Plinth',plinth_outline,0.012,0.035,graphite,exterior,fixed_chassis,0.002)
sill = prism_xy('Collector_Shared_Bay_Sill',[(-.164,-.022),(.164,-.022),(.170,.145),(.162,.170),(-.154,.170),(-.170,.145)],0.035,COLLECTOR_BOTTOM_Z,graphite,exterior,fixed_chassis,0.0006)
sill['support_surface_z_m'] = COLLECTOR_BOTTOM_Z
sill['role'] = 'Shared front support surface for both shallow collectors; no individual islands, rails, detents or center divider'
lower_backplate_outline = [(-0.1635,0.035),(0.1635,0.035)]
lower_backplate_outline += [(0.1635-0.327*i/64,apron_top(0.1635-0.327*i/64)-LOWER_BACKPLATE_APRON_CLEARANCE) for i in range(65)]
lower_backplate = prism_xz('Chamber_Lower_Backplate',lower_backplate_outline,HOOD_REAR_Y+0.005,BACKPLATE_FRONT_Y,back_mat,exterior,fixed_chassis,0.0015)
lower_backplate['role'] = 'Fixed rear load spine continuing from the base to the transparent hood floor; never a front cabinet or bin divider'
lower_backplate['thickness_m'] = BACKPLATE_THICKNESS
lower_backplate['base_contact_z_m'] = 0.035
for i in range(8):
box('Rear_Vent',(0,HOOD_REAR_Y+0.0045,0.080+i*0.011),(0.15,0.001,0.003),black,exterior,fixed_chassis,0.0005)
for x in [-0.135,0.135]:
for y in [-0.135+REAR_COMPACT_SHIFT,0.130]:
cyl('Rubber_Foot', (x,y,0.008), 0.016, 0.015, black, exterior, fixed_chassis, edge=0.002)
for side,label in [(1,'Left'),(-1,'Right')]:
x = side*0.166
top_outline = [(-0.133,0.035),(0.026,0.035)]
top_outline += [(-0.133+0.159*i/32,deck_height(x,-0.133+0.159*i/32)-0.004) for i in reversed(range(33))]
panel = prism_yz('Lower_'+label+'_Service_Cover',top_outline,-0.002,0.002,graphite,cover_coll,cover_assembly,0.0012)
panel.location.x = x
panel['removable'] = True
panel['inner_face_x_m'] = x-side*0.002
panel['role'] = 'Rear side cover only, following the descending collection deck; the front red bin remains a separate vessel'
panel['top_profile'] = 'Sloped rear side return matching the collection deck, not a horizontal cabinet ledge'
for side,label in [(1,'Left'),(-1,'Right')]:
x = side*0.1635
side_outline = [
(-0.138,deck_height(x,-0.138)-0.005),
(-0.138,0.672),
(-0.112,0.676),
(-0.074,0.666),
(-0.030,0.615),
(-0.030,deck_height(x,-0.030)-0.005),
]
cheek = prism_yz('Chamber_'+label+'_Rear_Return',side_outline,-0.0025,0.0025,graphite,exterior,fixed_chassis,0.003)
cheek.location.x = x
cheek['role'] = 'Fixed opaque rear side return visible in the Sketchfab side views; clear hood remains at the open front'
cheek['reference'] = 'Dewira Zumex school project: front, oblique and side silhouette review'
cheek['joins_rear_spine'] = True
def front_band(name,xmin,xmax,depth,mat,coll,parent):
vertices = []
faces = []
for i in range(65):
x = xmin+(xmax-xmin)*i/64
top = apron_top(x)
y = apron_front_y(x)
vertices.extend([(x,y-depth,apron_bottom(x)),(x,y-depth,top),(x,y,top),(x,y,apron_bottom(x))])
for i in range(64):
for j in range(4):
faces.append((4*i+j,4*i+(j+1)%4,4*(i+1)+(j+1)%4,4*(i+1)+j))
faces.extend([(3,2,1,0),(256,257,258,259)])
obj = mesh(name,vertices,faces,mat,coll,parent)
bevel(obj,0.0012,3)
return obj
def profiled_strip(name,y0,y1,lower_offset,upper_offset,mat,coll,parent):
vertices = []
faces = []
for i in range(65):
x = -0.1635+0.327*i/64
lower = apron_top(x)+lower_offset
upper = apron_top(x)+upper_offset
vertices.extend([(x,y0,lower),(x,y1,lower),(x,y1,upper),(x,y0,upper)])
for i in range(64):
for j in range(4):
faces.append((4*i+j,4*i+(j+1)%4,4*(i+1)+(j+1)%4,4*(i+1)+j))
faces.extend([(3,2,1,0),(256,257,258,259)])
obj = mesh(name,vertices,faces,mat,coll,parent)
bevel(obj,0.0007,3)
return obj
apron = front_band('Sloping_Black_Plastic_Apron',-APRON_HALF_WIDTH,APRON_HALF_WIDTH,0.002,graphite,deck_coll,deck_assembly)
boolean(apron,box('TEMP_Fixed_Control_Pod_Clearance',((CONTROL_POD_X_MIN+CONTROL_POD_X_MAX)/2,0.150,0.280),(CONTROL_POD_X_MAX-CONTROL_POD_X_MIN+0.004,0.100,0.180),black,deck_coll,None,0))
apron['left_top_z_m'] = apron_top(APRON_HALF_WIDTH)
apron['right_top_z_m'] = apron_top(-APRON_HALF_WIDTH)
apron['height_m'] = apron_top(0)-apron_bottom(0)
apron['assembly'] = deck_assembly.name
apron['profile'] = 'Curved hood seat above a nearly level lower edge, matching the reference front fascia; the fixed control pod occupies a real fitting opening'
apron['black_region_revision'] = 'Hollow inclined collection deck and side returns, not a full-depth solid cabinet wedge; no display mounted to this removable part'
deck_vertices = []
deck_faces = []
for i in range(65):
x = -0.1635+0.327*i/64
for y in [-0.108,apron_front_y(x)]:
deck_vertices.append((x,y,deck_height(x,y)))
for i in range(64):
deck_faces.append((2*i,2*i+2,2*i+3,2*i+1))
deck_floor = mesh('Collection_Deck_Shallow_Rear_Tray',deck_vertices,deck_faces,graphite,deck_coll,deck_assembly,False)
solid = deck_floor.modifiers.new('Hollow_Deck_3mm_Shell','SOLIDIFY')
solid.thickness = 0.003
solid.offset = -1
bpy.context.view_layer.objects.active = deck_floor
bpy.ops.object.modifier_apply(modifier=solid.name)
boolean(deck_floor,box('TEMP_Deck_Control_Pod_Clearance',((CONTROL_POD_X_MIN+CONTROL_POD_X_MAX)/2,0.146,0.265),(CONTROL_POD_X_MAX-CONTROL_POD_X_MIN+0.004,0.092,0.180),black,deck_coll,None,0))
deck_floor['role'] = 'Inclined hollow collection deck with an open juice mouth and a bounded residue inlet; its underside covers the residue wall tops'
rear_lip = profiled_strip('Collection_Deck_Rear_Lip',-0.109,-0.105,-0.014,-0.011,graphite,deck_coll,deck_assembly)
for side in [-1,1]:
x = side*0.170
outline = [(-0.108,apron_top(x)-0.039),(apron_front_y(x),apron_bottom(x)-0.005)]
outline += [(apron_front_y(x),apron_bottom(x)+0.012),(-0.108,apron_top(x)+0.001)]
rail = prism_yz('Collection_Deck_Side_Rail_'+str(side),outline,-0.001,0.001,graphite,deck_coll,deck_assembly,0.001)
rail.location.x = x
for x in [-0.135,0.135]:
mount = box('Collection_Deck_Rear_Mount',(x,-0.109,apron_top(x)-0.008),(0.018,0.004,0.016),graphite,deck_coll,deck_assembly,0.0006)
mount['contact_y_m'] = BACKPLATE_FRONT_Y
control_pod = empty('Fixed_Control_Pod_Assembly',(0,0,0),exterior,fixed_chassis)
control_pod['fixed_with_chassis'] = True
control_pod['assembly_reference'] = 'The display remains on the bare chassis while the black collection assembly is installed at 04:00-04:03'
pod_body = front_band('Fixed_Control_Pod_Housing',CONTROL_POD_X_MIN,CONTROL_POD_X_MAX,0.042,graphite,exterior,control_pod)
box('Control_Pod_Base_Standard',(-0.156,0.006,(0.035+0.282)/2),(0.012,0.018,0.282-0.035),graphite,exterior,fixed_chassis,0.001)
box('Control_Pod_Rear_Support',(-0.156,0.0595,0.282),(0.012,0.131,0.016),graphite,exterior,fixed_chassis,0.001)
LCD_X, LCD_Z = -0.086, 0.292
lcd_y = apron_front_y(LCD_X)+0.0035
lcd_bezel = box('LCD_Bezel',(LCD_X,lcd_y,LCD_Z),(0.084,0.009,0.026),black,exterior,control_pod,0.003)
boolean(lcd_bezel,box('TEMP_LCD_Recess',(LCD_X,lcd_y+0.003,LCD_Z),(0.073,0.014,0.017),black,exterior,None,0.0018))
box('LCD_Screen',(LCD_X,lcd_y-0.001,LCD_Z),(0.071,0.001,0.016),blue,exterior,control_pod,0.001)
status_text = {}
for status in root['lcd_states']:
label = text('LCD_Status_'+status,status,(LCD_X,lcd_y+0.0003,LCD_Z),0.008,lcd_text,exterior,control_pod)
label['state'] = status
status_text[status] = label
lcd_assembly = empty('LCD_Three_State_Display',(0,0,0),exterior,control_pod)
for label in status_text.values():
label.parent = lcd_assembly
lcd_assembly['allowed_states'] = 'Ready, Processing, Stopped; no fault state'
lcd_assembly['display'] = 'Fixed chassis display; one centered status word at a time, with no counters, branding or other readouts'
BUTTON_X = -0.146
BUTTON_Z = 0.286
button_y = apron_front_y(BUTTON_X)
cyl('Start_Button_Rim',(BUTTON_X,button_y+0.001,BUTTON_Z),0.0113,0.006,black,exterior,control_pod,'Y',0.001)
start_button = empty('Start_Button_Assembly',(BUTTON_X,button_y+0.005,BUTTON_Z),exterior,control_pod)
cyl('Start_Button',(0,0,0),0.0087,0.005,orange_dark,exterior,start_button,'Y',0.0008)
line('Start_Button_Power_Arc',[(0.0049*math.cos(math.radians(a)),0.0031,0.0049*math.sin(math.radians(a))) for a in range(42,319,4)],0.00040,white,exterior,start_button)
line('Start_Button_Power_Line',[(0,0.0031,0.0015),(0,0.0031,0.0060)],0.00044,white,exterior,start_button)
start_button['press_direction'] = '-Y into the machine'
start_button['travel_m'] = 0.0025
start_button['rest_y_m'] = button_y+0.005
for frame,travel in [(1,0),(21,0),(24,0.0025),(27,0),(360,0)]:
key(start_button,frame,loc=(BUTTON_X,button_y+0.005-travel,BUTTON_Z))
def bottom(x):
return apron_top(x)
def hood_top(x):
return 0.678-0.039*(abs(x)/0.165)**10
def backplate_bottom(x):
return bottom(x)+REAR_LINER_SEAT_OFFSET
backplate_outline = [(-0.1635+0.327*i/64,backplate_bottom(-0.1635+0.327*i/64)) for i in range(65)]
backplate_outline += [(0.1635-0.327*i/64,hood_top(0.1635-0.327*i/64)-0.004) for i in range(65)]
backplate = prism_xz('Chamber_Rear_Wall',backplate_outline,HOOD_REAR_Y+0.005,BACKPLATE_FRONT_Y,back_mat,exterior,fixed_chassis,0.003)
backplate['front_y_m'] = BACKPLATE_FRONT_Y
backplate['thickness_m'] = BACKPLATE_THICKNESS
backplate['compact_forward_shift_m'] = REAR_COMPACT_SHIFT
backplate['top_profile'] = 'Follows the transparent hood roof with 4 mm vertical clearance to prevent the rear liner from protruding through the curved sides'
backplate['bottom_profile'] = 'Fixed load-spine lower edge follows the hood floor with a 0.9 mm seat; the lower spine continues to the base behind the shallow front bins'
backplate['seat_offset_above_apron_m'] = REAR_LINER_SEAT_OFFSET
backplate['fixed_with_chassis'] = True
for x in [-0.125,0.125]:
rib = box('Chamber_Backplate_Rib', (x,BACKPLATE_FRONT_Y+0.005,0.510), (0.007,0.012,0.242), backplate_edge, exterior, fixed_chassis, 0.002)
rib['mount_overlap_m'] = 0.001
nx,nz = 64,18
verts = []
faces = []
for i in range(nx+1):
x = -0.165 + 0.330*i/nx
z0 = bottom(x)
z1 = hood_top(x)
for j in range(nz+1):
t = j/nz
verts.append((x,0.111+0.019*(1-(x/0.165)**2)*math.sin(math.pi*t),z0+(z1-z0)*t))
for i in range(nx):
for j in range(nz):
a = i*(nz+1)+j
faces.append((a,a+nz+1,a+nz+2,a+1))
for side in [0,nx]:
indices = []
for j in range(nz+1):
v = verts[side*(nz+1)+j]
indices.append(len(verts))
verts.append((v[0],HOOD_REAR_Y,v[2]))
for j in range(nz):
a = side*(nz+1)+j
faces.append((a,a+1,indices[j+1],indices[j]))
for j in [0,nz]:
indices = []
for i in range(nx+1):
v = verts[i*(nz+1)+j]
indices.append(len(verts))
verts.append((v[0],HOOD_REAR_Y,v[2]))
for i in range(nx):
a = i*(nz+1)+j
faces.append((a,a+nz+1,indices[i+1],indices[i]))
hood = mesh('Transparent_Hood_With_Curved_Sides', verts, faces, clear, hood_coll, root)
solid = hood.modifiers.new('Tritan_1_6mm', 'SOLIDIFY')
solid.thickness = 0.0016
solid.offset = 0
bpy.context.view_layer.objects.active = hood
bpy.ops.object.modifier_apply(modifier=solid.name)
hood['rear_y_m'] = HOOD_REAR_Y
hood['rear_extension_m'] = abs(HOOD_REAR_Y+0.120)
hood['compact_forward_shift_m'] = REAR_COMPACT_SHIFT
hood['rear_coverage'] = 'Top, side walls and bottom return now reach the machine rear; a separate transparent rear panel closes the remaining opening'
rear_vertices = []
rear_faces = []
for i in range(65):
x = -0.165+0.330*i/64
rear_vertices.extend([(x,HOOD_REAR_Y,bottom(x)),(x,HOOD_REAR_Y,hood_top(x))])
for i in range(64):
rear_faces.append((2*i,2*i+2,2*i+3,2*i+1))
rear_glazing = mesh('Transparent_Hood_Rear_Closure',rear_vertices,rear_faces,clear,hood_coll,root,False)
rear_glazing['rear_y_m'] = HOOD_REAR_Y
rear_glazing['wall_thickness_m'] = 0.0016
solid = rear_glazing.modifiers.new('Rear_Tritan_1_6mm','SOLIDIFY')
solid.thickness = 0.0016
solid.offset = 0
bpy.context.view_layer.objects.active = rear_glazing
bpy.ops.object.modifier_apply(modifier=solid.name)
HOPPER_RADIUS = 0.135
HOPPER_ROTATION = math.radians(-8)
HOPPER_OFFSET = Vector((-0.101,0.0151,0))
HOPPER_CENTER = Vector((0.045,-0.035,0))+HOPPER_OFFSET
HOPPER_WIDTH = 0.082
HOPPER_DEPTH = 0.033
HOPPER_THICKNESS = 0.004
def hopper_angle(t):
return math.pi/2*(1-t)
def hopper_base(t):
return 0.684+0.008*t
def hopper_point(t):
angle = hopper_angle(t)+HOPPER_ROTATION
return HOPPER_CENTER+Vector((HOPPER_RADIUS*math.cos(angle),HOPPER_RADIUS*math.sin(angle),hopper_base(t)))
def hopper_fruit_position(t,radius=0.029):
point = hopper_point(t)
point.z += radius
return point
def channel_shell(name,centers,across,width,depth,thickness,mat,coll,parent=root):
vertices = []
faces = []
sections = len(centers)
cross_count = 17
half = width/2
for outer in [False,True]:
for center,normal in zip(centers,across):
for j in range(cross_count):
q = -half+width*j/(cross_count-1)
spread = q*(1+thickness/half) if outer else q
z = center.z+depth*(q/half)**2-(thickness if outer else 0)
vertices.append(tuple(center+normal*spread+Vector((0,0,z-center.z))))
layer_size = sections*cross_count
for layer in [0,1]:
for i in range(sections-1):
for j in range(cross_count-1):
a = layer*layer_size+i*cross_count+j
face = (a,a+1,a+1+cross_count,a+cross_count)
faces.append(tuple(reversed(face)) if layer else face)
for i in range(sections-1):
for j in [0,cross_count-1]:
a = i*cross_count+j
b = (i+1)*cross_count+j
faces.append((a,b,layer_size+b,layer_size+a))
for i in [0,sections-1]:
for j in range(cross_count-1):
a = i*cross_count+j
faces.append((a,layer_size+a,layer_size+a+1,a+1))
obj = mesh(name,vertices,faces,mat,coll,parent)
bevel(obj,0.00065,3)
return obj
arc_parameters = [-0.12+1.60*i/96 for i in range(97)]
arc_centers = [hopper_point(t) for t in arc_parameters]
arc_across = [Vector((math.cos(hopper_angle(t)+HOPPER_ROTATION),math.sin(hopper_angle(t)+HOPPER_ROTATION),0)) for t in arc_parameters]
hopper = channel_shell('Curved_Hopper_Continuous_U_Trough',arc_centers,arc_across,HOPPER_WIDTH,HOPPER_DEPTH,HOPPER_THICKNESS,hopper_mat,hopper_coll)
hopper['reference_segment_seconds'] = [110,112]
hopper['arc_center_local_xy'] = list(HOPPER_CENTER[:2])
hopper['arc_radius_m'] = HOPPER_RADIUS
hopper['inner_width_m'] = HOPPER_WIDTH
hopper['trough_depth_m'] = HOPPER_DEPTH
hopper['wall_thickness_m'] = HOPPER_THICKNESS
hopper['construction'] = 'Watertight curved channel with a recessed U section, integrated sidewalls, open mouth and a rear stop; not a flat L-shaped rack'
hopper['placement_revision'] = 'Rotated -8 degrees around Z and lengthened to match the reference hopper silhouette; local translation (-101, +15.1, 0) mm before front-facing assembly'
hopper['local_rotation_z_degrees'] = -20
hopper['local_translation_m'] = list(HOPPER_OFFSET)
for side in [-1,1]:
lip_points = [center+normal*(side*HOPPER_WIDTH/2)+Vector((0,0,HOPPER_DEPTH)) for center,normal in zip(arc_centers,arc_across)]
line('Hopper_Continuous_Rounded_Lip',lip_points,0.0014,hopper_mat,hopper_coll,root)
end_t = arc_parameters[-1]
end_angle = hopper_angle(end_t)+HOPPER_ROTATION
box('Hopper_Backstop',hopper_point(end_t)+Vector((0,0,0.014)),(0.090,0.004,0.036),hopper_mat,hopper_coll,root,0.003,(0,0,end_angle))
hopper_support = box('Hopper_Support',hopper_point(0.45)+Vector((0,0,-0.018)),(0.056,0.052,0.037),graphite,hopper_coll,root,0.005,(0,0,hopper_angle(0.45)+HOPPER_ROTATION))
box('Hopper_Backplate_Support_Arm',((BACKPLATE_FRONT_Y+hopper_support.location.x)/2,hopper_support.location.y,0.654),(hopper_support.location.x-BACKPLATE_FRONT_Y,0.020,0.014),orange,hopper_coll,root,0.002)
box('Hopper_Backplate_Mount',(BACKPLATE_FRONT_Y+0.004,hopper_support.location.y,0.654),(0.008,0.032,0.032),orange,hopper_coll,root,0.002)
ramp_start = hopper_point(-0.12)
ramp_end = Vector((0.045,0.040,0.626))
RAMP_BEND = Vector((0.010,0.009,0.006))
def ramp_point(t):
center = ramp_start+(ramp_end-ramp_start)*t
center += RAMP_BEND*math.sin(math.pi*t)
return center
ramp_parameters = [i/40 for i in range(41)]
ramp_centers = [ramp_point(t) for t in ramp_parameters]
ramp_across = []
for t in ramp_parameters:
direction = ramp_end-ramp_start+RAMP_BEND*(math.pi*math.cos(math.pi*t))
ramp_across.append(Vector((-direction.y,direction.x,0)).normalized())
ramp = channel_shell('Fixed_Entrance_Sliding_Ramp',ramp_centers,ramp_across,0.070,0.008,0.0025,graphite,hopper_coll)
for side in [-1,1]:
line('Entrance_Ramp_Rounded_Edge',[center+normal*(side*0.035)+Vector((0,0,0.008)) for center,normal in zip(ramp_centers,ramp_across)],0.0013,graphite,hopper_coll,root)
GATE_ANGLE = hopper_angle(-0.06)+HOPPER_ROTATION
gate_location = hopper_fruit_position(-0.06)
gate_location.z += 0.005
gate = empty('Entrance_Periodic_Gate_Pivot',gate_location,hopper_coll,root)
box('Entrance_Gate_Paddle',(0,0,-0.012),(0.084,0.004,0.030),orange,hopper_coll,gate,0.002)
cyl('Entrance_Gate_Pivot_Pin',(0,0,0),0.004,0.096,steel,hopper_coll,gate,'X',0.0005,48)
entry_direction = ramp_end-ramp_start
entry_angle = math.atan2(-entry_direction.x,entry_direction.y)+math.pi/2
entry_local = ramp_point(0.5)
entry_center = Vector((-entry_local.y,entry_local.x,0.692))
entry_cutter = box('TEMP_Hopper_Entry_Through_Hood',entry_center,(0.096,0.126,0.080),hopper_mat,hood_coll,None,0.008,(0,0,entry_angle))
boolean(hood,entry_cutter)
hood['hopper_entry_opening'] = 'Rounded through-opening aligned with the recessed outlet ramp; prevents fruit from crossing the transparent roof'
hood['collection_opening'] = 'The hood floor remains continuous; collection openings belong to the removable black deck rather than the transparent shell'
DISC_X, DISC_Y, DISC_Z = 0.045, -0.008, 0.544
MALE_X, MALE_Y, MALE_Z = 0.045, -0.008, 0.416
ORBIT = 0.064
DISC_THICKNESS = 0.074
DISC_BODY_RADIUS = 0.104
CUP_X = 0.0
BLADE_RADIUS = 0.104
POCKET_MAX_RADIUS = 0.103
POCKET_ANGLES = [0, math.pi/2, math.pi, 3*math.pi/2]
BALL_ANGLES = [math.radians(90),math.radians(210),math.radians(330)]
def radial_orientation(angle):
return Matrix(((1,0,0),(0,math.sin(angle),math.cos(angle)),(0,-math.cos(angle),math.sin(angle)))).to_euler()
disc = empty('Four_Pocket_Disc_Y_Axis', (DISC_X,DISC_Y,DISC_Z), disk_coll, root)
disc['pocket_count'] = 4
disc['thickness_m'] = DISC_THICKNESS
disc['rotation_direction'] = 'Clockwise when viewed from +Y toward -Y; local negative X rotation transformed to global Y'
disc['pocket_shape'] = 'One-piece hemispherical cavities centered across the drum thickness, with radial openings in global XOZ'
disc['pocket_axial_center_y_m'] = DISC_X+CUP_X
disc['drum_axial_midplane_y_m'] = DISC_X
plate = cyl('Four_Pocket_Disc_Thick_Body', (0,0,0), DISC_BODY_RADIUS, DISC_THICKNESS, orange, disk_coll, None, 'X', 0.0035, 128)
for a in POCKET_ANGLES:
direction = Vector((0,math.cos(a),math.sin(a)))
cutter = cyl('TEMP_Radial_Pocket_Channel', (0,0,0), 0.0375, 0.080, black, disk_coll, None, edge=0, vertices=80)
cutter.rotation_euler = radial_orientation(a)
cutter.location = Vector((CUP_X,0,0))+direction*0.065
boolean(plate,cutter)
move_to(plate, disk_coll, disc)
bevel(plate, 0.0012)
cyl('Disc_Solid_Front_Cover', (0.041,0,0), DISC_BODY_RADIUS, 0.008, orange, disk_coll, disc, 'X', 0.0035, 128)
cyl('Disc_Cover_Centre_Fastener', (0.047,0,0), 0.014, 0.007, orange_dark, disk_coll, disc, 'X', 0.0008)
cyl('Disc_Cover_Centre_Knob', (0.052,0,0), 0.010, 0.006, orange, disk_coll, disc, 'X', 0.001)
box('Disc_Cover_Knob_Grip', (0.056,0,0), (0.003,0.004,0.017), orange_edge, disk_coll, disc, 0.001)
disc_shaft_front = DISC_Y+0.076
disc_shaft_rear = BACKPLATE_FRONT_Y+0.012
cyl('Disc_Drive_Shaft', ((disc_shaft_front+disc_shaft_rear)/2-DISC_X,0,0), 0.007, disc_shaft_front-disc_shaft_rear, steel, disk_coll, disc, 'X', 0.0005)
cyl('Disc_Rear_Bearing', (BACKPLATE_FRONT_Y+0.011,DISC_Y,DISC_Z), 0.013, 0.022, graphite, disk_coll, root, 'X', 0.001)
cyl('Disc_Backplate_Bearing_Mount', (BACKPLATE_FRONT_Y+0.004,DISC_Y,DISC_Z), 0.020, 0.008, graphite, disk_coll, root, 'X', 0.001)
pockets = []
for i,a in enumerate(POCKET_ANGLES):
profile = [(0.039,0.032),(0.039,0)]
for j in range(25):
theta = math.pi/2*j/24
profile.append((0.039*math.cos(theta),-0.039*math.sin(theta)))
for j in range(24,-1,-1):
theta = math.pi/2*j/24
profile.append((0.036*math.cos(theta),-0.036*math.sin(theta)))
profile.append((0.036,0.032))
pocket = lathe('Hemispherical_Pocket_'+str(i+1), profile, (0,0,0), orange, disk_coll, None, 'Z', 112)
pocket.parent = disc
pocket.location = (CUP_X,ORBIT*math.cos(a),ORBIT*math.sin(a))
pocket.rotation_euler = radial_orientation(a)
pocket['pocket_index'] = i
pocket['opening_normal'] = 'Radial in global XOZ after front-facing assembly rotation'
pocket['axial_center_offset_from_drum_midplane_m'] = CUP_X
pocket['construction'] = 'One-piece bowl with no blade slot; the cutting blade remains outside all rotating geometry'
pocket['inner_radius_m'] = 0.036
pocket['outer_radius_m'] = 0.039
pocket['depth_m'] = 0.039
pockets.append(pocket)
rim = torus('Pocket_Rim_'+str(i+1), (CUP_X,ORBIT*math.cos(a),ORBIT*math.sin(a)), 0.0375, 0.0012, orange_edge, disk_coll, disc)
rim.rotation_euler = radial_orientation(a)
pocket['radial_opening_local'] = [0,math.cos(a),math.sin(a)]
for radial_mesh in [pocket,rim]:
radial_mesh.data.transform(radial_mesh.rotation_euler.to_matrix().to_4x4())
radial_mesh.rotation_euler = (0,0,0)
plate.data.transform(plate.rotation_euler.to_matrix().to_4x4())
plate.rotation_euler = (0,0,0)
blade = box('Fixed_Tangential_Cutting_Blade', (DISC_X,DISC_Y+BLADE_RADIUS+0.0012,DISC_Z), (0.058,0.0024,0.064), steel, blade_coll, root, 0.00015)
blade['fixed_on_machine'] = True
blade['penetrates_drum'] = False
blade['cutting_edge_radius_m'] = BLADE_RADIUS
blade['cutting_plane'] = 'Radial YOZ plane at the cutting station; vertical edge follows the tangent of the front-projected XOZ disc'
for side in [-1,1]:
box('Blade_Holder_Side_Cheek_'+str(side), (DISC_X+side*0.035,DISC_Y+0.116,DISC_Z), (0.010,0.016,0.074), orange, blade_coll, root, 0.002)
for z in [DISC_Z-0.026,DISC_Z+0.026]:
box('Blade_Mounting_Tang', (DISC_X+side*0.026,DISC_Y+0.112,z), (0.006,0.016,0.006), steel, blade_coll, root, 0.0005)
box('Blade_Holder_Crossbar', (DISC_X,DISC_Y+0.116,DISC_Z-0.038), (0.080,0.016,0.010), orange, blade_coll, root, 0.002)
box('Blade_Fixed_Mount', (DISC_X,DISC_Y+0.115,DISC_Z-0.055), (0.020,0.024,0.045), orange, blade_coll, root, 0.003)
box('Blade_External_Cross_Bracket', (DISC_X-0.0175,DISC_Y+0.124,DISC_Z-0.055), (0.125,0.018,0.018), orange, blade_coll, root, 0.002)
box('Blade_Backplate_Support', ((BACKPLATE_FRONT_Y+DISC_X)/2,DISC_Y+0.115,DISC_Z-0.055), (DISC_X-BACKPLATE_FRONT_Y,0.016,0.018), orange, blade_coll, root, 0.002)
box('Blade_Backplate_Mount', (BACKPLATE_FRONT_Y+0.004,DISC_Y+0.115,DISC_Z-0.055), (0.008,0.034,0.034), orange, blade_coll, root, 0.002)
ejector = empty('Blade_Discharge_Spring_Pivot', (DISC_X,DISC_Y+0.128,DISC_Z-0.040), blade_coll, root)
box('Blade_Spring_Discharge_Plate', (0,-0.012,0.020), (0.010,0.020,0.025), chrome, blade_coll, ejector, 0.0006)
cyl('Blade_Ejector_Pivot_Pin', (0,0,0), 0.004, 0.024, steel, blade_coll, ejector, 'X', 0.0005, 48)
line('Blade_Return_Spring', [(DISC_X,DISC_Y+0.128,DISC_Z-0.055),(DISC_X,DISC_Y+0.139,DISC_Z-0.040),(DISC_X,DISC_Y+0.128,DISC_Z-0.025)], 0.0011, steel, blade_coll, root)
male = empty('Three_Ball_Press_Y_Axis', (MALE_X,MALE_Y,MALE_Z), press_coll, root)
male['head_count'] = 3
male['fixed_axis_center'] = True
male['vertical_motion'] = 'None; pressing is produced only by coordinated rotation and pocket engagement'
male['rotation_direction'] = 'Clockwise when viewed from +Y toward -Y; local negative X rotation transformed to global Y, matching the disc'
male['arrangement'] = 'Equilateral triangular carrier in global XOZ with three integrated short-neck spherical heads'
triangle = [(0.0355*math.cos(a),0.0355*math.sin(a)) for a in BALL_ANGLES]
vertices = [(x,y,z) for x in [CUP_X-0.007,CUP_X+0.005] for y,z in triangle]
faces = [(0,1,2),(5,4,3),(0,3,4,1),(1,4,5,2),(2,5,3,0)]
mesh('Press_Equilateral_Triangle_Carrier', vertices, faces, orange, press_coll, male)
balls = []
for i,a in enumerate(BALL_ANGLES):
y,z = ORBIT*math.cos(a),ORBIT*math.sin(a)
ball = sphere('Spherical_Pressing_Head_'+str(i+1), (CUP_X,y,z), 0.028, orange, press_coll, male)
ball['head_index'] = i
balls.append(ball)
neck = cyl('Press_Head_Short_Neck_'+str(i+1), (CUP_X,0.046*math.cos(a),0.046*math.sin(a)), 0.0075, 0.022, orange_dark, press_coll, male, edge=0.001)
neck.rotation_euler = radial_orientation(a)
cyl('Press_Centre_Hub', (CUP_X,0,0), 0.018, 0.014, orange_dark, press_coll, male, 'X', 0.001)
press_shaft_front = MALE_Y+0.085
press_shaft_rear = BACKPLATE_FRONT_Y+0.012
cyl('Press_Fixed_Drive_Shaft', ((press_shaft_front+press_shaft_rear)/2-MALE_X,0,0), 0.007, press_shaft_front-press_shaft_rear, steel, press_coll, male, 'X', 0.0005)
cyl('Press_Fixed_Axis_Bearing', (BACKPLATE_FRONT_Y+0.011,MALE_Y,MALE_Z), 0.013, 0.022, graphite, press_coll, root, 'X', 0.001)
cyl('Press_Backplate_Bearing_Mount', (BACKPLATE_FRONT_Y+0.004,MALE_Y,MALE_Z), 0.020, 0.008, graphite, press_coll, root, 'X', 0.001)
# The Assembly reference shows shallow front bins behind the fascia, not full-depth lower cabinet replacements.
def juice_rim_height(theta,x,y):
front_dip = 0.012*max(0,math.sin(theta))**6*math.exp(-((x-JUICE_CENTER_X)/(JUICE_WIDTH*0.30))**2)
return apron_bottom(x)-0.0035-front_dip
def residue_rim_height(theta,x,y):
t = (y-RESIDUE_REAR_Y)/RESIDUE_DEPTH
front_t = min(1,max(0,(t-0.82)/0.18))
front_fit = front_t*front_t*(3-2*front_t)
return deck_height(x,y)-0.007-(RESIDUE_FRONT_FIT_CLEARANCE-0.007)*front_fit
juice_box,juice_rim_points = contoured_vessel('Juice_Collection_Box_Contoured',(JUICE_CENTER_X,JUICE_CENTER_Y),JUICE_WIDTH,JUICE_DEPTH,0.019,0.010,COLLECTOR_BOTTOM_Z,0.97,juice_rim_height,collector_red,bin_coll,1.0)
juice_box['has_spout'] = False
juice_box['has_handle'] = True
juice_box['forms_front_exterior'] = True
juice_box['depth_m'] = JUICE_DEPTH
juice_box['role'] = 'Shallow front-right juice collector installed after the black collection deck, matching the Assembly sequence'
juice_box['handle_side'] = 'Outer negative-X wall, matching the visible right-side grip in the reference'
handle_cutter = prism_yz('TEMP_Juice_Side_Handle',rounded_rect(0.020,0.070,0.010,16),-0.006,0.006,black,bin_coll,None,0)
handle_cutter.location = (JUICE_CENTER_X-JUICE_WIDTH/2,0.060,0.128)
boolean(juice_box,handle_cutter)
bevel(juice_box,0.0006,3)
residue_box,residue_rim_points = contoured_vessel('Residue_Collection_Box',(RESIDUE_CENTER_X,RESIDUE_CENTER_Y),RESIDUE_WIDTH,RESIDUE_DEPTH,0.028,0.010,COLLECTOR_BOTTOM_Z,0.97,residue_rim_height,residue_red,bin_coll,1.0)
residue_box['contains_juice'] = False
residue_box['forms_front_exterior'] = True
residue_box['integrated_front_pull'] = True
residue_box['depth_m'] = RESIDUE_DEPTH
residue_box['rear_fit_profile'] = 'The side and rear wall tops follow the collection-deck underside with a 7 mm fitting clearance; no wall protrudes through the black deck'
residue_box['role'] = 'Front-left residue collector forming the front and left-front exterior below the deck; only the residue inlet opens above it'
residue_box['outer_edge_role'] = 'Front and left-front lower exterior; rear lower side covers and black collection deck are separate parts'
front_pull = box('TEMP_Integrated_Residue_Front_Pull',(RESIDUE_CENTER_X,COLLECTOR_FRONT_Y-0.001,0.165),(0.044,0.026,0.012),black,bin_coll,None,0.003)
boolean(residue_box,front_pull)
bevel(residue_box,0.0006,3)
line('Juice_Bin_Contoured_Rim',juice_rim_points,0.0016,collector_red,bin_coll,root,True)
line('Residue_Box_Open_Rim',residue_rim_points,0.0018,residue_red,bin_coll,root,True)
for name,cx,cy,w,d,fr,br in [
('Juice',JUICE_CENTER_X,JUICE_CENTER_Y,JUICE_WIDTH,JUICE_DEPTH,0.019,0.010),
]:
opening = [(cx+x,cy+y) for x,y,theta in collector_footprint(w+0.006,d+0.006,fr+0.003,br+0.003)]
boolean(deck_floor,prism_xy('TEMP_'+name+'_Open_Bin_Mouth',opening,0.160,0.370,graphite,deck_coll,None,0))
residue_inlet_outline = [(0.054+x,0.014+y) for x,y in rounded_rect(0.094,0.082,0.022,18)]
boolean(deck_floor,prism_xy('TEMP_Residue_Discharge_Inlet',residue_inlet_outline,0.160,0.370,graphite,deck_coll,None,0))
deck_floor['residue_coverage'] = 'Solid cover over the residue collector except for a bounded discharge inlet; no full-bin open mouth'
boolean(deck_floor,box('TEMP_Control_Standard_Fitting_Slot',(-0.156,0.006,0.275),(0.016,0.022,0.120),graphite,deck_coll,None,0))
bevel(deck_floor,0.0006)
tray = mesh('Juice_Guide_Solid_Tray_No_Mesh', [
(0.035,0.020,0.352),(0.035,0.100,0.352),
(-0.100,0.100,0.245),(-0.100,0.020,0.245),
], [(0,1,2,3)], graphite, bin_coll, root)
solid = tray.modifiers.new('Solid_Tray_Thickness', 'SOLIDIFY')
solid.thickness = 0.002
solid.offset = 0
bevel(tray,0.0006)
tray['flow_direction'] = 'From the pressing nip toward global -X and the front juice collector; fixed to the collection deck, not the rotating mechanism'
for x,z in [(0.035,0.358),(-0.100,0.251)]:
line('Juice_Guide_Raised_Side', [(x,0.020,z),(x,0.100,z)], 0.0018, graphite, bin_coll, root)
line('Juice_Guide_High_Stop', [(0.035,0.020,0.358),(0.035,0.100,0.358)], 0.0018, graphite, bin_coll, root)
for y in [0.043,0.091]:
bottom = deck_height(-0.166,y)-0.0003
box('Juice_Guide_Deck_Cleat', (-0.166,y,(bottom+0.245)/2), (0.006,0.012,0.245-bottom), graphite, bin_coll, root, 0.0006)
box('Juice_Guide_Outlet_Cantilever',(-0.133,0.067,0.244),(0.074,0.058,0.004),graphite,bin_coll,root,0.0006)
for obj in list(bin_coll.objects):
if obj.name.startswith('Juice_Guide_') and obj.parent == root:
obj.parent = deck_assembly
juice_level = loft('Juice_Level_Inside_Collection_Box', [
(0.044,0.094,0.104,0.010,JUICE_CENTER_X,JUICE_CENTER_Y),
(0.165,0.094,0.104,0.010,JUICE_CENTER_X,JUICE_CENTER_Y),
], juice_mat, juice_coll, root, 0)
for vertex in juice_level.data.vertices:
vertex.co.z -= 0.044
juice_level.location.z = 0.044
juice_slide = empty('Juice_Collection_Box_Slide', (0,0,0), bin_coll, root)
residue_slide = empty('Residue_Animation_Slide', (0,0,0), bin_coll, root)
residue_box_slide = empty('Residue_Collection_Box_Slide', (0,0,0), bin_coll, root)
for obj in [juice_box,bpy.data.objects['Juice_Bin_Contoured_Rim'],juice_level]:
obj.parent = juice_slide
for obj in [residue_box,bpy.data.objects['Residue_Box_Open_Rim']]:
obj.parent = residue_box_slide
COLLECTOR_SLIDE = [(1,0,0),(322,0,0),(350,0.100,0),(360,0.100,0)]
for frame,juice_offset,residue_offset in COLLECTOR_SLIDE:
key(juice_slide,frame,loc=(0,juice_offset,0))
key(residue_box_slide,frame,loc=(0,residue_offset,0))
key(residue_slide,frame,loc=(residue_offset,0,0))
def smooth01(value):
t = min(1,max(0,value))
return t*t*(3-2*t)
def orange_shell(name, parent, mat):
profile = []
for i in range(33):
a = math.pi/2*i/32
profile.append((max(0.00001,0.031*math.cos(a)),0.031*math.sin(a)))
for i in range(32,-1,-1):
a = math.pi/2*i/32
profile.append((max(0.00001,0.0282*math.cos(a)),0.0282*math.sin(a)))
return lathe(name,profile,(0,0,0),mat,fruit_coll,parent,segments=96)
def flesh_surface(name, parent, mat):
radius = 0.0282
segments = 96
rings = 12
vertices = [(0,0,0.0007)]
for ring in range(1,rings+1):
r = radius*ring/rings
for j in range(segments):
a = math.tau*j/segments
vertices.append((r*math.cos(a),r*math.sin(a),0.0007))
faces = []
for j in range(segments):
faces.append((0,1+(j+1)%segments,1+j))
for ring in range(rings-1):
first = 1+ring*segments
second = first+segments
for j in range(segments):
k = (j+1)%segments
faces.append((first+j,first+k,second+k,second+j))
obj = mesh(name,vertices,faces,mat,fruit_coll,parent)
obj.shape_key_add(name='Basis')
pressed = obj.shape_key_add(name='Pressed_Around_Spherical_Head')
for i,vertex in enumerate(vertices):
x,y,z = vertex
pressed.data[i].co = (x,y,z+math.sqrt(max(0,radius*radius-x*x-y*y)))
solid = obj.modifiers.new('Thin_Flesh_And_Pith_Layer','SOLIDIFY')
solid.thickness = 0.0006
solid.offset = 0
return obj
def half_fruit(name):
assembly = empty(name, (0,0,0), fruit_coll, root)
assembly['local_axes'] = 'Local +Z is the peel dome; cut face looks along local -Z'
assembly['press_deformation'] = 'The cut flesh becomes a concave layer around the entering ball while the peel stays seated in its rotating pocket; no upward ram displacement'
orange_shell(name+'_Peel',assembly,peel)
lathe(name+'_Pith_Ring', [(0.0282,0),(0.031,0),(0.031,0.0013),(0.0282,0.0013)], (0,0,0), pith, fruit_coll, assembly, segments=96)
flesh_surface(name+'_Cut_Flesh',assembly,flesh)
for i in range(10):
a = math.tau*i/10
obj = line(name+'_Segment', [(0.001*math.cos(a),0.001*math.sin(a),0.0015),(0.027*math.cos(a),0.027*math.sin(a),0.0015)], 0.00025, pith, fruit_coll, assembly)
obj['press_detail'] = True
for x,y in [(0.006,0.005),(-0.008,0.003)]:
obj = sphere(name+'_Seed', (x,y,0.0018), 0.0016, seed_mat, fruit_coll, assembly, (0.65,1.1,0.25))
obj['press_detail'] = True
return assembly
def residue(name):
assembly = empty(name, (0,0,0), fruit_coll, residue_slide)
assembly['description'] = 'A hollow squeezed half-orange peel released after the rolling nip and directed into the residue box by the release animation; never carried by a pressing ball or auxiliary rails'
orange_shell(name+'_Empty_Peel',assembly,peel)
lathe(name+'_Dry_Pith', [(0.0282,0),(0.031,0),(0.031,0.0013),(0.0282,0.0013)], (0,0,0), pith, fruit_coll, assembly, segments=96)
pressed_flesh = flesh_surface(name+'_Pressed_Inner_Pith',assembly,pith)
pressed_flesh.data.shape_keys.key_blocks['Pressed_Around_Spherical_Head'].value = 1
for i in range(8):
a = math.tau*i/8
sphere(name+'_Pulp_Remnant', (0.021*math.cos(a),0.021*math.sin(a),0.009), 0.0014, flesh, fruit_coll, assembly, (1.1,0.8,0.35))
return assembly
whole = empty('Process_Whole_Orange', (0,0,0), fruit_coll, root)
sphere('Process_Whole_Orange_Peel', (0,0,0), 0.030, peel, fruit_coll, whole, (1,0.98,0.99))
half_a = half_fruit('Process_Retained_Half')
half_b = half_fruit('Process_Blade_Half')
residue_a = residue('Residue_A_Pressed_Half_Peel')
residue_b = residue('Residue_B_Pressed_Half_Peel')
queued = []
for i,t in enumerate([0.46,0.92,1.38]):
obj = empty('Hopper_Queued_Orange_'+str(i+1), (0,0,0), fruit_coll, root)
sphere('Hopper_Queued_Peel_'+str(i+1), (0,0,0), 0.029, peel, fruit_coll, obj, (1,0.98,0.99))
queued.append((obj,t))
for f,advance in [(1,0),(54,0),(72,-0.31),(360,-0.31)]:
key(obj,f,hopper_fruit_position(t+advance))
for f,a in [(1,0),(28,0),(38,math.radians(58)),(48,math.radians(58)),(64,0),(360,0)]:
key(gate,f,rot=(a,0,GATE_ANGLE))
for f,a in [(1,0),(174,0),(182,math.radians(-38)),(188,math.radians(-12)),(196,0),(360,0)]:
key(ejector,f,rot=(a,0,0))
CUT_FRAME = 128
PRESSES = [
{'half':half_a,'residue':residue_a,'pocket':1,'ball':1,'contact':192,'release':214,'floor':0.066},
{'half':half_b,'residue':residue_b,'pocket':2,'ball':2,'contact':256,'release':278,'floor':0.078},
]
def rotor_angles(frame):
disc_angle = math.radians((64-frame)*90/64)
press_angle = math.radians(120)+disc_angle*4/3
return disc_angle,press_angle
def interpolate(keys, frame):
if frame <= keys[0][0]:
return keys[0][1]
for (a,va),(b,vb) in zip(keys,keys[1:]):
if a <= frame <= b:
t = (frame-a)/(b-a)
t = t*t*(3-2*t)
if isinstance(va,(tuple,list,Vector)):
return Vector(va)+(Vector(vb)-Vector(va))*t
return va+(vb-va)*t
return keys[-1][1]
def rx(angle):
return Matrix.Rotation(angle,3,'X')
def pocket_normal(index, angle):
theta = POCKET_ANGLES[index]+angle
return Vector((0,math.cos(theta),math.sin(theta)))
def pocket_position(index, angle, inward=0):
theta = POCKET_ANGLES[index]+angle
return Vector((DISC_X+CUP_X,DISC_Y,DISC_Z)) + Vector((0,ORBIT*math.cos(theta),ORBIT*math.sin(theta))) - pocket_normal(index,angle)*inward
def fruit_orientation(index, angle):
return radial_orientation(POCKET_ANGLES[index]+angle+math.pi)
def ball_position(index, angle):
theta = BALL_ANGLES[index]+angle
return Vector((MALE_X+CUP_X,MALE_Y,MALE_Z)) + Vector((0,ORBIT*math.cos(theta),ORBIT*math.sin(theta)))
def ball_normal(index, angle):
theta = BALL_ANGLES[index]+angle
return Vector((0,math.cos(theta),math.sin(theta)))
def lerp(a,b,t):
return a+(b-a)*t
def lerp_rot(a,b,t):
return tuple(lerp(a[i],b[i],t) for i in range(3))
def hide_at(obj, frame):
for child in [obj,*obj.children_recursive]:
child.hide_render = True
child.hide_viewport = True
child.keyframe_insert(data_path='hide_render',frame=frame)
child.keyframe_insert(data_path='hide_viewport',frame=frame)
def show_at(obj, frame):
for child in [obj,*obj.children_recursive]:
child.hide_render = False
child.hide_viewport = False
child.keyframe_insert(data_path='hide_render',frame=frame)
child.keyframe_insert(data_path='hide_viewport',frame=frame)
for obj in [half_a,half_b,residue_a,residue_b]:
hide_at(obj,1)
for half in [half_a,half_b]:
show_at(half,CUT_FRAME)
for status,label in status_text.items():
for frame,hidden in [(1,status!='Ready'),(28,status!='Processing'),(322,status!='Stopped')]:
if hidden:
hide_at(label,frame)
else:
show_at(label,frame)
for press in PRESSES:
hide_at(press['half'],press['release'])
show_at(press['residue'],press['release'])
show_at(whole,1)
hide_at(whole,CUT_FRAME)
hide_at(juice_level,1)
show_at(juice_level,176)
def apply_press_deformation(assembly,frame,da,ma,pocket_index,ball_index,contact):
amount = 0
if frame >= contact-28:
separation = (pocket_position(pocket_index,da)-ball_position(ball_index,ma)).length
amount = smooth01((0.062-separation)/0.062)
flesh_obj = bpy.data.objects[assembly.name+'_Cut_Flesh']
shape = flesh_obj.data.shape_keys.key_blocks['Pressed_Around_Spherical_Head']
shape.value = amount
shape.keyframe_insert(data_path='value',frame=frame)
detail_scale = max(0.001,1-amount)
for child in assembly.children:
if child.get('press_detail'):
key(child,frame,scale=(detail_scale,detail_scale,detail_scale))
return amount
def released_peel_transform(press,frame):
pocket_index = press['pocket']
release = press['release']
release_da,_ = rotor_angles(release)
p0 = pocket_position(pocket_index,release_da)
rotation = fruit_orientation(pocket_index,release_da)
if frame <= release:
return p0,rotation
next_da,_ = rotor_angles(release+1)
velocity = (pocket_position(pocket_index,next_da)-p0)*24
release_time = min((frame-release)/24,0.34)
release_fraction = smooth01(release_time/0.24)
p = p0+velocity*release_time
p.x *= 1-release_fraction
p.z -= 0.5*9.81*release_time*release_time
if frame-release > 0.34*24:
fall_time = (frame-release)/24-0.34
p.z += (velocity.z-9.81*0.34)*fall_time-0.5*9.81*fall_time*fall_time
p.z = max(press['floor'],p.z)
return p,rotation
def feeding_position(frame):
if frame <= 28:
return hopper_fruit_position(0.06,0.030)
if frame <= 40:
t = smooth01((frame-28)/12)
return hopper_fruit_position(lerp(0.06,-0.12,t),0.030)
if frame <= 56:
t = smooth01((frame-40)/16)
point = ramp_point(t)
point.z += 0.030
return point
t = smooth01((frame-56)/8)
point = ramp_point(1)+Vector((0,0,0.030))
return lerp(point,pocket_position(1,0),t)
for f in range(1,361):
da,ma = rotor_angles(f)
key(disc,f,rot=(da,0,0))
key(male,f,rot=(ma,0,0))
if f < 64:
pos = feeding_position(f)
whole_rotation = (0.08*f,0,0)
elif f < 70:
pos = pocket_position(1,da,inward=lerp(0,-0.040,(f-64)/6))
whole_rotation = fruit_orientation(1,da)
else:
pos = pocket_position(1,da,inward=-0.040)
whole_rotation = fruit_orientation(1,da)
key(whole,f,loc=pos,rot=whole_rotation)
if f < CUT_FRAME:
pa = pos
else:
pa = pocket_position(1,da,inward=lerp(-0.040,0,smooth01((f-CUT_FRAME)/20)))
key(half_a,f,loc=pa,rot=fruit_orientation(1,da))
if f <= 178:
pb = Vector((DISC_X,DISC_Y+BLADE_RADIUS,DISC_Z))
rb = radial_orientation(0)
elif f <= 192:
t = smooth01((f-178)/14)
pb = lerp(Vector((DISC_X,DISC_Y+BLADE_RADIUS,DISC_Z)),pocket_position(2,da),t)
rb = lerp_rot(radial_orientation(0),fruit_orientation(2,da),t)
else:
pb = pocket_position(2,da)
rb = fruit_orientation(2,da)
key(half_b,f,loc=pb,rot=rb)
for press in PRESSES:
apply_press_deformation(press['half'],f,da,ma,press['pocket'],press['ball'],press['contact'])
p,r = released_peel_transform(press,f)
key(press['residue'],f,loc=p,rot=r)
key(juice_level,f,scale=(1,1,max(0.001,min(1,(f-176)/100))))
for modifier in list(plate.modifiers):
plate.modifiers.remove(modifier)
relief_radius = 0.0345
relief_tracks = []
for ball_index in range(3):
ball = bpy.data.objects['Spherical_Pressing_Head_'+str(ball_index+1)]
active = []
for frame in range(1,361):
scene.frame_set(frame)
bpy.context.view_layer.update()
relative = disc.matrix_world.inverted() @ ball.matrix_world.translation
if math.hypot(relative.y,relative.z) < DISC_BODY_RADIUS+relief_radius+0.001:
active.append((frame,relative.copy()))
groups = []
for frame,relative in active:
if not groups or frame > groups[-1][-1][0]+1:
groups.append([])
groups[-1].append((frame,relative))
for group in groups:
target_names = ['Four_Pocket_Disc_Thick_Body']
for pocket_index,angle in enumerate(POCKET_ANGLES):
center = Vector((CUP_X,ORBIT*math.cos(angle),ORBIT*math.sin(angle)))
if any((relative-center).length < 0.039+relief_radius+0.002 for _,relative in group):
target_names.extend(['Hemispherical_Pocket_'+str(pocket_index+1),'Pocket_Rim_'+str(pocket_index+1)])
relief_tracks.append((ball_index,group,target_names))
for track_index,(ball_index,group,target_names) in enumerate(relief_tracks,1):
print(f'RELIEF track={track_index} ball={ball_index+1} frames={group[0][0]}-{group[-1][0]} targets={target_names}',flush=True)
parts = []
for frame,relative in group:
bpy.ops.mesh.primitive_uv_sphere_add(segments=32,ring_count=20,radius=relief_radius,location=relative)
part = bpy.context.object
part.name = 'TEMP_Continuous_Rotor_Relief_Point'
move_to(part,disk_coll,disc)
parts.append(part)
bpy.ops.object.select_all(action='DESELECT')
for part in parts:
part.select_set(True)
bpy.context.view_layer.objects.active = parts[0]
bpy.ops.object.join()
cutter = bpy.context.object
cutter.name = 'TEMP_Continuous_Rotor_Relief_'+str(track_index)
remesh = cutter.modifiers.new('Watertight_Continuous_Relief_Sweep','REMESH')
remesh.mode = 'VOXEL'
remesh.voxel_size = 0.00085
remesh.use_smooth_shade = True
bpy.ops.object.modifier_apply(modifier=remesh.name)
cutter.data.transform(cutter.matrix_basis)
cutter.matrix_basis = Matrix.Identity(4)
for target_name in target_names:
target = bpy.data.objects[target_name]
duplicate = cutter.copy()
duplicate.data = cutter.data.copy()
disk_coll.objects.link(duplicate)
duplicate.parent = disc
duplicate.matrix_basis = cutter.matrix_basis.copy()
boolean(target,duplicate)
target['rotational_relief_grooves'] = target.get('rotational_relief_grooves',0)+1
bpy.data.objects.remove(cutter,do_unlink=True)
disc['rotational_relief_track_count'] = len(relief_tracks)
disc['rotational_relief_radius_m'] = relief_radius
disc['relief_description'] = 'Continuous evaluated ball trajectories; 34.5 mm relief envelopes also clear the short necks; regenerated for the nonstop four-pocket/three-head speed ratio'
bevel(plate,0.0008)
scene.frame_set(1)
for i in range(24):
drop = sphere('Juice_Guide_Droplet_'+str(i), (0,0,0), 0.0017, juice_mat, juice_coll, root, (0.85,0.85,1.65))
first = 172 + (i%12)*2 if i < 12 else 242+(i%12)*2
for f,s,z in [(1,0.001,0.46),(first-1,0.001,0.46),(first,1,0.46),(first+6,1,0.382),(first+11,0.8,0.339),(first+12,0.001,0.336),(360,0.001,0.336)]:
x = DISC_X + 0.014*math.sin(i*2.1)
y = -0.002 + 0.011*math.cos(i*1.3)
key(drop,f,loc=(x,y,z),scale=(s,s,s))
for i in range(8):
drop = sphere('Juice_Box_Droplet_'+str(i), (-0.100,0.032,0.24), 0.0016, juice_mat, juice_coll, root, (1,1,1.3))
start = 190+i*11
for f,s,z in [(1,0.001,0.24),(start-1,0.001,0.24),(start,1,0.255),(start+7,0.8,0.205),(start+8,0.001,0.094),(360,0.001,0.094)]:
key(drop,f,loc=(-0.100,0.032,z),scale=(s,s,s))
hood_assembly = empty('Removable_Transparent_Hood_Assembly',(0,0,0),hood_coll,root)
hood_assembly['removable'] = True
for obj in list(hood_coll.objects):
if obj != hood_assembly and obj.parent == root:
obj.parent = hood_assembly
for obj in hood_coll.objects:
for f,hidden in [(1,False),(55,False),(56,True),(285,True),(286,False),(360,False)]:
if hidden:
hide_at(obj,f)
else:
show_at(obj,f)
mechanism_frame = empty('Front_Facing_Mechanism_Y_Axes', (0,0,0), exterior, root)
for coll in [hopper_coll,disk_coll,blade_coll,press_coll,fruit_coll,juice_coll]:
for obj in list(coll.objects):
if obj.parent == root:
obj.parent = mechanism_frame
residue_slide.parent = mechanism_frame
mechanism_frame.rotation_euler.z = math.pi/2
mechanism_frame['front_plane'] = 'XOZ'
mechanism_frame['front_normal'] = '+Y'
mechanism_frame['purpose'] = 'Turn all rotating circular faces and the external blade toward the machine front without rotating the cabinet or collectors'
for name,frame in [('READY',1),('PRESS START / PROCESSING',24),('FEED / CONTINUOUS ROTORS',28),('POCKET RECEIVES ORANGE',64),('TANGENTIAL CUT',128),('FIRST ROLLING CONTACT',172),('BLADE HALF TO EMPTY POCKET',178),('FIRST DEEPEST ENGAGEMENT',192),('FIRST PEEL RELEASE',214),('SECOND ROLLING CONTACT',236),('SECOND DEEPEST ENGAGEMENT',256),('SECOND PEEL RELEASE',278),('STOPPED / SEPARATE COLLECTORS',322)]:
scene.timeline_markers.new(name,frame=frame)
floor_mat = material('Studio_Backdrop', (0.12,0.15,0.17), 0, 0.73)
box('Studio_Ground', (0,0,-0.010), (200,200,0.01), floor_mat, studio, None, 0)
world = bpy.data.worlds.new('Studio_World')
world.use_nodes = True
world.node_tree.nodes['Background'].inputs['Color'].default_value = (0.29,0.33,0.36,1)
world.node_tree.nodes['Background'].inputs['Strength'].default_value = 0.34
scene.world = world
def aim(obj,target):
obj.rotation_euler = (Vector(target)-obj.location).to_track_quat('-Z','Y').to_euler()
def area(name,loc,power,color,size,target):
data = bpy.data.lights.new(name,'AREA')
data.energy = power
data.color = color
data.shape = 'RECTANGLE'
data.size = size
data.size_y = size*1.2
obj = bpy.data.objects.new(name,data)
studio.objects.link(obj)
obj.location = loc
aim(obj,target)
area('Studio_Key',(-0.70,0.64,1.26),32,(1,0.91,0.82),0.72,(0,0,0.40))
area('Studio_Fill',(0.80,0.36,0.92),28,(0.85,0.92,1),0.60,(0,0,0.43))
area('Studio_Rim',(-0.20,-0.62,1.10),38,(0.91,0.95,1),0.60,(0,0,0.48))
area('Studio_Interior',(0.10,0.35,0.67),2,(1,0.92,0.80),0.18,(0.045,0,0.50))
def camera(name,loc,target,scale):
data = bpy.data.cameras.new(name)
obj = bpy.data.objects.new(name,data)
studio.objects.link(obj)
obj.location = loc
aim(obj,target)
data.type = 'ORTHO'
data.ortho_scale = scale
data.clip_start = 0.002
data.clip_end = 100
return obj
cam_hero = camera('CAM_01_Assembled',(0.95,1.72,0.98),(0,0.01,0.381),0.865)
cam_mechanism = camera('CAM_02_Four_Pocket_And_Blade',(0.58,1.15,0.74),(0.008,-0.005,0.505),0.420)
cam_bins = camera('CAM_03_Separate_Collectors',(0.15,0.30,1.24),(0.0,0.100,0.120),0.425)
cam_side = camera('CAM_04_Structure_Side',(-0.60,0.95,0.70),(0.008,-0.008,0.510),0.380)
cam_x_rotation = camera('CAM_05_Front_XOZ_Rotation_Check',(0.008,1.05,0.55),(0.008,0.008,0.505),0.360)
cam_pocket = camera('CAM_06_Pocket_Thickness_Midplane',(-0.85,0.045,0.63),(-0.055,0.045,0.545),0.260)
cam_press = camera('CAM_07_Pressing_Contact',(-0.50,0.42,0.33),(0.008,0.045,0.465),0.295)
cam_press_side = camera('CAM_08_Continuous_Press_Side',(-0.48,0.24,0.37),(0.008,0.045,0.463),0.270)
cam_hopper = camera('CAM_09_Curved_Hopper',(0.46,0.64,1.02),(-0.020,0.040,0.708),0.380)
cam_hopper_top = camera('CAM_10_Hopper_Top',(0,-0.004,1.34),(0,-0.004,0.705),0.405)
cam_control = camera('CAM_11_Control_Apron',(-0.22,1.30,0.51),(-0.015,0.035,0.285),0.405)
cam_display = camera('CAM_12_LCD_Status',(-0.13,1.0,0.381),(-0.086,0.154,0.292),0.195)
cam_rear = camera('CAM_13_Rear_Assembly',(-0.92,-1.38,1.02),(0,-0.005,0.405),0.880)
cam_rear_clearance = camera('CAM_14_Rear_Clearance',(-0.70,-0.88,0.46),(0,-0.113,0.323),0.380)
cam_contact_opposite = camera('CAM_15_Rear_Contact_Opposite',(0.70,-0.88,0.46),(0,-0.113,0.323),0.380)
cam_compact = camera('CAM_16_Compact_YOZ',(-1.10,-0.004,0.46),(0,-0.004,0.390),0.875)
cam_connections = camera('CAM_17_Backplate_Connections',(-0.72,0.90,0.66),(0,-0.035,0.515),0.440)
cam_collector_detail = camera('CAM_18_Collectors_Detail',(-0.42,0.90,0.48),(-0.035,0.085,0.145),0.430)
cam_collector_installed = camera('CAM_19_Collectors_Installed',(-0.32,0.85,0.43),(-0.030,0.020,0.130),0.420)
cam_collector_top = camera('CAM_20_Collectors_Top',(-0.033,0.320,0.580),(-0.033,0.030,0.130),0.360)
cam_lower_empty = camera('CAM_21_Lower_Empty',(-0.32,0.85,0.43),(-0.020,0.030,0.150),0.430)
cam_residue_side = camera('CAM_22_Residue_Side_Fit',(0.95,0.029,0.285),(0,0.029,0.180),0.390)
cam_juice_side = camera('CAM_23_Juice_Side_Fit',(-0.95,0.029,0.285),(0,0.029,0.180),0.390)
cam_lower_rear = camera('CAM_24_Lower_Rear_Fit',(-0.65,-0.90,0.46),(0,-0.070,0.175),0.490)
cam_fixed_chassis = camera('CAM_25_Fixed_Chassis',(0.76,1.30,0.78),(0,0.005,0.365),0.830)
cam_deck = camera('CAM_26_Collection_Deck',(0.46,0.72,0.66),(0,0.010,0.325),0.515)
cam_covers = camera('CAM_27_Lower_Service_Covers',(0.50,0.72,0.43),(0,-0.045,0.170),0.460)
cam_lower_exploded = camera('CAM_28_Lower_Exploded',(0.72,1.20,0.74),(0.070,0.055,0.340),0.900)
cam_residue_exterior = camera('CAM_29_Residue_Exterior_Match',(1.05,1.00,0.72),(0.020,0.025,0.290),0.680)
cam_residue_deck = camera('CAM_30_Residue_Deck_Coverage',(0.48,0.70,0.84),(0.020,0.040,0.300),0.400)
scene.camera = cam_hero
scene.render.engine = 'CYCLES'
scene.cycles.samples = 64
scene.cycles.use_denoising = True
scene.cycles.adaptive_threshold = 0.035
scene.cycles.max_bounces = 10
scene.cycles.transmission_bounces = 8
scene.cycles.transparent_max_bounces = 12
scene.render.resolution_x = 1500
scene.render.resolution_y = 1700
scene.render.resolution_percentage = 100
scene.render.image_settings.file_format = 'PNG'
scene.render.image_settings.color_mode = 'RGB'
scene.render.filepath = '//preview_assembled.png'
scene.view_settings.view_transform = 'AgX'
scene.view_settings.look = 'AgX - Medium High Contrast'
for screen in bpy.data.screens:
for area_ in screen.areas:
if area_.type == 'VIEW_3D':
space = area_.spaces.active
space.clip_start = 0.001
space.clip_end = 100
space.region_3d.view_perspective = 'CAMERA'
space.region_3d.view_location = (0,0,0.40)
space.region_3d.view_distance = 1.15
space.region_3d.view_rotation = cam_hero.rotation_euler.to_quaternion()
space.shading.type = 'MATERIAL'
space.shading.use_scene_lights = True
space.shading.use_scene_world = False
space.overlay.show_extras = False
scene.frame_set(2)
scene.frame_set(1)
bpy.context.view_layer.update()
bpy.ops.object.select_all(action='DESELECT')
root.select_set(True)
bpy.context.view_layer.objects.active = root
about = bpy.data.texts.new('ABOUT_User_Spec_Mechanism')
about.write('Source of truth: HOW_ZMUEX_juicer_work.md.\n')
about.write('All rotating circular faces lie in global XOZ and face machine front +Y. Disc and press rotate continuously around parallel Y axes, clockwise when viewed from +Y. Fruit follows its pocket through the rolling nip rather than staying at a fixed pressing station or turning with a ball.\n')
about.write('The drum is 74 mm thick along Y. Four one-piece hemispherical cavities are centered across its thickness and open radially in XOZ.\n')
about.write('The external blade and holder lie outside the drum and all pocket rims. The 104 mm cutting-edge position meets fruit at the projected tangent without entering the mechanism; the cutting plane matches the two half-orange separation directions.\n')
about.write('Fruit is lifted slightly outward at the cutting station. The inner half follows the disc; the outer half is transferred from the blade into an empty pocket. The three spherical heads use an equilateral carrier and short radial necks.\n')
about.write('The pressing carrier has a fixed axis and no Z translation. Its rotating balls engage the orange cavities through local spherical relief grooves regenerated from the continuous four-pocket/three-head trajectories.\n')
about.write('Reference: supplied ZMUEX_working_video.mp4, 01:59-02:06. Both rotors turn continuously throughout the animation. Each orange half follows its pocket through the rolling contact arc; the cut flesh forms a concave layer around the ball at deepest engagement. No rotor dwell, upward ram or stationary pressing-station animation remains.\n')
about.write('After the rolling nip, each hollow squeezed peel is released with tangential motion, guided away from the juice path, then falls into the residue box. It is not attached to a pressing ball.\n')
about.write('Whole fruit, halves and residue use recursive visibility keys on every child mesh, so a hidden whole orange cannot remain visible after cutting.\n')
about.write('The orange storage hopper follows the supplied 01:50-01:52 reference: a circular-arc open-top trough with a recessed U cross-section, integrated sidewalls, rounded lips and a rear stop. Four oranges sit on the curved floor and feed through a matching recessed ramp and periodic gate. The former flat L-shaped rack is removed.\n')
about.write('The curved trough is rotated -8 degrees around Z and lengthened to follow the Sketchfab reference silhouette. Its recessed outlet ramp curves into the machine, with the gate reoriented to match. A rounded through-opening in the transparent roof admits the fruit without crossing the hood surface. The assembly remains editable in the generation script.\n')
about.write('Assembly reference 03:53 onward separates the fixed control pod from the removable black collection deck. Multi-angle review of the supplied Sketchfab model guides the inclined hollow deck, nearly level fascia bottom, rear side returns, longer curved hopper and circular rotor silhouette. The fixed pod retains the recessed LCD and round start button on the right half, facing +Y. No brand text or source mesh is used.\n')
about.write('The juice guide slopes toward global -X above the front juice bin and is supported by two deck-mounted cleats. The juice mouth and bounded residue inlet are actual openings; the rest of the residue collector is covered by the inclined deck. Residue wall tops follow the deck underside with a 7 mm fitting clearance instead of protruding through it. Rear lower graphite covers are separate from the front collector side walls.\n')
about.write('The LCD shows exactly one of Ready, Processing or Stopped. The state changes are keyed to frames 1, 28 and 322. The start button visibly presses 2.5 mm inward at frame 24 and returns at frame 27. No fault readout, counter or branding is present. The rotors remain a continuous mechanism demonstration throughout the preview rather than a simulated electrical interlock.\n')
about.write('The fixed chassis comprises the base, continuous 22 mm rear load spine and independently supported control pod. Disc, press, blade and hopper mounts connect to that spine. The transparent hood, collection deck and juice guide, front collectors and lower side service covers are separate removable assemblies. No center divider or decorative latch is present. The unsupported twin residue-guide rods and their dedicated backplate supports have been removed; pressed peels follow the release animation directly into the residue collector.\n')
about.write('The rear spine reaches from the base to the hood floor with a 0.2 mm fitting allowance. The lower side covers sit behind the shallow bins and are not merged into the fixed spine or either collector.\n')
about.write(f'Assembly 04:03-04:09 guides the two shallow front collectors: residue depth {RESIDUE_DEPTH*1000:.0f} mm from Y={RESIDUE_REAR_Y*1000:.0f} mm, juice depth {JUICE_DEPTH*1000:.0f} mm from Y={JUICE_REAR_Y*1000:.0f} mm; both end at Y=154 mm. Their outer-wall gap is approximately 7 mm to clear both rounded rim tubes, and both bottoms sit on the shared front sill at Z=39 mm. The residue collector keeps fitted side/rear walls below the deck and an integrated horizontal pull; the juice collector keeps its contoured rim and vertical side grip. These are visual fitting dimensions, not manufacturer measurements.\n')
about.write('Whole fruit, retained half, blade half and two separate pressed residue meshes are independently modeled.\n')
about.write('All fruit and residue animation is baked into ordinary transform keys. No runtime reparenting or constraints.\n')
about.write('Transparent hood visibility is keyed for the mechanism shot. Only the juice collector slides forward, matching the reference; the deck-fitted residue collector stays installed and has an independent acceptance file. There is no separate residue door.\n')
about.write('The four-pocket/three-head phase relationship is an illustrative interpretation of the supplied description, not a claimed factory RPM or gear ratio.\n')
about.write('No external assets or linked libraries are required.\n')
triangles = 0
for obj in scene.objects:
if obj.type == 'MESH' and not any(coll == studio for coll in obj.users_collection):
ev = obj.evaluated_get(bpy.context.evaluated_depsgraph_get())
data = ev.to_mesh()
data.calc_loop_triangles()
triangles += len(data.loop_triangles)
ev.to_mesh_clear()
report = {
'source_document': 'HOW_ZMUEX_juicer_work.md',
'source_sha256': root['source_sha256'],
'blend': 'PerfectCoffee_Minex_Mechanism.blend',
'frames': [1,360],
'fps': 24,
'pocket_count': 4,
'pocket_axial_center_y_m': DISC_X+CUP_X,
'drum_axial_midplane_y_m': DISC_X,
'pocket_axial_center_error_m': abs(CUP_X),
'spherical_pressing_head_count': 3,
'external_tangential_blade': True,
'blade_clearance_beyond_pocket_rims_m': BLADE_RADIUS-POCKET_MAX_RADIUS,
'filter_mesh_present': False,
'separate_residue_meshes': 2,
'juice_box_has_spout': False,
'juice_box_has_handle': True,
'lower_cabinet_shell_present': False,
'separate_residue_door_present': False,
'collector_wall_gap_m': 0.007,
'collector_depths_m': {'residue':RESIDUE_DEPTH,'juice':JUICE_DEPTH},
'collector_bottom_z_m': COLLECTOR_BOTTOM_Z,
'collector_reference_segment_seconds': [243,249],
'assembly_reference_segment_seconds': [233,283],
'collection_deck_removable': True,
'control_pod_fixed': True,
'lower_service_covers_removable': True,
'evaluated_triangles': triangles,
'motion_scope': root['motion_scope'],
'validation_status': 'Structural and rendered checks are run by validate_minex_mechanism.py',
}
(OUT/'mechanism_validation.json').write_text(json.dumps(report,ensure_ascii=False,indent=2)+'\n',encoding='utf-8')
bpy.ops.wm.save_as_mainfile(filepath=str(OUT/'PerfectCoffee_Minex_Mechanism.blend'),compress=True)
print('USER_SPEC_BUILD_COMPLETE '+json.dumps(report),flush=True)