import type { MachineDefinition } from '../types'; import { groupNode, hierarchy, makeMachine, makePart, primitive, standardCameraPresets, thumbnail, tourStep, } from './catalogueHelpers'; const planetaryParts = [ makePart({ id: 'sun-gear', name: 'Sun gear', group: 'Gear train', description: 'Central gear that meshes with all planet gears and is often used as an input or reaction member.', primitive: primitive('gear', { radius: 0.34, thickness: 0.22, teeth: 24, boreRadius: 0.09, axis: 'y' }), position: [0, 0, 0], material: 'warm-highlight', explodedDirection: [0, 0.8, 0], }), makePart({ id: 'planet-gears', name: 'Planet gears', group: 'Gear train', description: 'Three equally spaced gears orbit the sun while spinning on pins carried by the planet carrier.', primitive: primitive('gear', { radius: 0.24, thickness: 0.2, teeth: 18, count: 3, orbitRadius: 0.62, axis: 'y' }), position: [0, 0, 0], material: 'machined-steel', explodedDirection: [0.35, 0.65, 0.35], }), makePart({ id: 'planet-carrier', name: 'Planet carrier', group: 'Carrier', description: 'Rotating armature holding planet pins; it can be input, output, or grounded depending on ratio selection.', primitive: primitive('custom', { profile: 'tri-spoke-carrier', radius: 0.72, hubRadius: 0.16, pinRadius: 0.045 }), position: [0, -0.02, 0], material: 'brushed-steel', explodedDirection: [0, -0.8, 0], }), makePart({ id: 'ring-gear', name: 'Internal ring gear', group: 'Gear train', description: 'Outer internally toothed gear that encloses the planets and sets the fundamental tooth count ratio.', primitive: primitive('gear', { radius: 0.9, thickness: 0.24, teeth: 72, internal: true, axis: 'y' }), position: [0, 0, 0], material: 'dark-anodized', explodedDirection: [0, 0.35, 0.85], }), makePart({ id: 'input-shaft', name: 'Input shaft', group: 'Shafting', description: 'Selectable drive shaft connected to sun, carrier, or ring depending on demonstration mode.', primitive: primitive('cylinder', { radius: 0.08, depth: 1.0, axis: 'y' }), position: [0, 0.64, 0], material: 'machined-steel', explodedDirection: [0, 1.2, 0], }), makePart({ id: 'output-shaft', name: 'Output shaft', group: 'Shafting', description: 'Selectable output member; relative motion depends on which component is held.', primitive: primitive('cylinder', { radius: 0.1, depth: 1.0, axis: 'y' }), position: [0, -0.64, 0], material: 'brushed-steel', explodedDirection: [0, -1.2, 0], }), makePart({ id: 'brake-band', name: 'Reaction brake band', group: 'Controls', description: 'Band marker showing how an automatic transmission can hold the ring gear for reduction.', primitive: primitive('torus', { majorRadius: 0.98, tubeRadius: 0.035, arc: 5.4, axis: 'y' }), position: [0, 0.02, 0], material: 'paint-red', explodedDirection: [0.65, 0.45, 0], }), makePart({ id: 'clutch-pack', name: 'Clutch pack', group: 'Controls', description: 'Stack of friction plates representing selectable couplings between input and planetary members.', primitive: primitive('custom', { profile: 'friction-clutch-stack', plates: 6, radius: 0.42 }), position: [0, 0.92, 0], material: 'brass', explodedDirection: [0, 1.35, 0], }), makePart({ id: 'housing', name: 'Transparent housing', group: 'Structure', description: 'Cutaway transmission drum keeping the gearset visually located while exposing tooth motion.', primitive: primitive('housing', { profile: 'cylindrical-case', radius: 1.08, length: 0.62, cutaway: true }), position: [0, 0, 0], material: 'transparent-shell', explodedDirection: [0, 0, -1.0], crossSectionBehavior: 'shell', }), makePart({ id: 'lubrication-flow', name: 'Lubrication flow', group: 'Lubrication', description: 'Oil spray path indicating that high sliding contact and bearings require active lubrication.', primitive: primitive('flow-path', { path: 'planetary-oil-spray', arrowCount: 12 }), position: [0, 0.08, 0], material: 'oil-green', explodedDirection: [0, 0.55, 0.55], crossSectionBehavior: 'fluid', }), ]; const differentialParts = [ makePart({ id: 'ring-gear', name: 'Ring gear', group: 'Final drive', description: 'Large gear bolted to the differential case; driven by the pinion for final drive reduction.', primitive: primitive('gear', { radius: 0.76, thickness: 0.18, teeth: 44, boreRadius: 0.36, axis: 'x' }), position: [0, 0, 0], rotation: [0, 1.5708, 0], material: 'machined-steel', explodedDirection: [0, 0.75, 0], }), makePart({ id: 'drive-pinion', name: 'Drive pinion', group: 'Final drive', description: 'Small bevel pinion from the driveshaft turns the ring gear at a reduction ratio.', primitive: primitive('bevel-gear', { radius: 0.26, thickness: 0.22, teeth: 13, coneAngle: 35, axis: 'z' }), position: [0, 0, 0.78], material: 'warm-highlight', explodedDirection: [0, 0, 1], }), makePart({ id: 'differential-case', name: 'Differential case', group: 'Carrier', description: 'Rotating cage carrying the spider gears and transmitting ring gear torque inward.', primitive: primitive('housing', { profile: 'open-differential-case', radius: 0.5, width: 0.72, windows: 4 }), position: [0, 0, 0], material: 'dark-anodized', explodedDirection: [0, -0.65, 0], }), makePart({ id: 'spider-gears', name: 'Spider gears', group: 'Differential gears', description: 'Small bevel gears that allow left and right axle shafts to rotate at different speeds when cornering.', primitive: primitive('bevel-gear', { radius: 0.2, thickness: 0.14, teeth: 12, count: 2, axis: 'y' }), position: [0, 0, 0], material: 'brushed-steel', explodedDirection: [0, 0.3, 0.55], }), makePart({ id: 'side-gear-left', name: 'Left side gear', group: 'Differential gears', description: 'Bevel gear splined to the left axle shaft and meshed with the spider gears.', primitive: primitive('bevel-gear', { radius: 0.26, thickness: 0.16, teeth: 16, axis: 'x' }), position: [-0.4, 0, 0], rotation: [0, 1.5708, 0], material: 'machined-steel', explodedDirection: [-0.8, 0, 0], }), makePart({ id: 'side-gear-right', name: 'Right side gear', group: 'Differential gears', description: 'Bevel gear splined to the right axle shaft and free to rotate at a different speed from the left.', primitive: primitive('bevel-gear', { radius: 0.26, thickness: 0.16, teeth: 16, axis: 'x' }), position: [0.4, 0, 0], rotation: [0, -1.5708, 0], material: 'machined-steel', explodedDirection: [0.8, 0, 0], }), makePart({ id: 'left-axle-shaft', name: 'Left axle shaft', group: 'Axles', description: 'Output shaft to the left wheel; speeds up or slows down depending on turn radius.', primitive: primitive('cylinder', { radius: 0.08, depth: 1.4, axis: 'x' }), position: [-0.96, 0, 0], rotation: [0, 1.5708, 0], material: 'brushed-steel', explodedDirection: [-1.2, 0, 0], }), makePart({ id: 'right-axle-shaft', name: 'Right axle shaft', group: 'Axles', description: 'Output shaft to the right wheel; counter-speed relative to the left during the cornering animation.', primitive: primitive('cylinder', { radius: 0.08, depth: 1.4, axis: 'x' }), position: [0.96, 0, 0], rotation: [0, 1.5708, 0], material: 'brushed-steel', explodedDirection: [1.2, 0, 0], }), makePart({ id: 'housing', name: 'Axle housing cutaway', group: 'Structure', description: 'Transparent axle carrier showing how the final drive and differential sit inside an oil-filled housing.', primitive: primitive('housing', { profile: 'differential-pumpkin', width: 2.35, height: 1.25, depth: 1.35, cutaway: true }), position: [0, 0, 0], material: 'transparent-shell', explodedDirection: [0, 0, -1], crossSectionBehavior: 'shell', }), makePart({ id: 'torque-flow', name: 'Torque flow overlay', group: 'Learning overlays', description: 'Animated arrows trace torque from driveshaft through ring gear and out to both axle shafts.', primitive: primitive('flow-path', { path: 'differential-torque', arrowCount: 18 }), position: [0, 0.05, 0], material: 'fluid-amber', explodedDirection: [0, 0.8, 0.6], crossSectionBehavior: 'fluid', }), ]; const manualGearboxParts = [ makePart({ id: 'input-shaft', name: 'Input shaft', group: 'Shafting', description: 'Receives torque from the clutch and carries the input gear that drives the layshaft.', primitive: primitive('cylinder', { radius: 0.08, depth: 1.25, axis: 'z' }), position: [-0.78, 0.25, 0], material: 'machined-steel', explodedDirection: [-0.75, 0.25, 0], }), makePart({ id: 'clutch-gear', name: 'Clutch/input gear', group: 'Input', description: 'Constant-mesh gear transferring engine torque from input shaft to layshaft.', primitive: primitive('gear', { radius: 0.28, thickness: 0.18, teeth: 22, axis: 'z' }), position: [-0.78, 0.25, -0.34], material: 'warm-highlight', explodedDirection: [-0.75, 0.4, -0.25], }), makePart({ id: 'layshaft', name: 'Layshaft', group: 'Shafting', description: 'Countershaft carrying fixed gears that mesh continuously with gears on the output shaft.', primitive: primitive('cylinder', { radius: 0.07, depth: 2.4, axis: 'z' }), position: [0, -0.38, 0], material: 'brushed-steel', explodedDirection: [0, -0.75, 0], }), makePart({ id: 'output-shaft', name: 'Output shaft', group: 'Shafting', description: 'Coaxial shaft to the driveline; selected gears lock to it through synchronizer hubs.', primitive: primitive('cylinder', { radius: 0.08, depth: 2.55, axis: 'z' }), position: [0, 0.38, 0], material: 'machined-steel', explodedDirection: [0, 0.75, 0], }), makePart({ id: 'first-gear-pair', name: '1st gear pair', group: 'Gear pairs', description: 'Largest reduction pair for high launch torque and low vehicle speed.', primitive: primitive('gear', { paired: true, radii: [0.46, 0.24], thickness: 0.16, teeth: [42, 20], axis: 'z' }), position: [-0.42, 0, -0.74], material: 'machined-steel', explodedDirection: [-0.35, 0, -0.65], }), makePart({ id: 'second-gear-pair', name: '2nd gear pair', group: 'Gear pairs', description: 'Intermediate reduction for acceleration after launch.', primitive: primitive('gear', { paired: true, radii: [0.38, 0.28], thickness: 0.16, teeth: [36, 25], axis: 'z' }), position: [-0.1, 0, -0.35], material: 'machined-steel', explodedDirection: [-0.15, 0, -0.45], }), makePart({ id: 'third-gear-pair', name: '3rd gear pair', group: 'Gear pairs', description: 'Mid-range ratio bridging acceleration and cruising gears.', primitive: primitive('gear', { paired: true, radii: [0.33, 0.31], thickness: 0.16, teeth: [31, 29], axis: 'z' }), position: [0.18, 0, 0.04], material: 'machined-steel', explodedDirection: [0.2, 0, 0.1], }), makePart({ id: 'fourth-gear-pair', name: '4th gear pair', group: 'Gear pairs', description: 'Near-direct ratio used for efficient cruising in many 5-speed layouts.', primitive: primitive('gear', { paired: true, radii: [0.28, 0.36], thickness: 0.16, teeth: [27, 34], axis: 'z' }), position: [0.46, 0, 0.42], material: 'machined-steel', explodedDirection: [0.4, 0, 0.45], }), makePart({ id: 'fifth-gear-pair', name: '5th gear pair', group: 'Gear pairs', description: 'Overdrive pair that lets the output shaft turn faster than the input for lower engine speed.', primitive: primitive('gear', { paired: true, radii: [0.24, 0.42], thickness: 0.16, teeth: [22, 39], axis: 'z' }), position: [0.74, 0, 0.78], material: 'machined-steel', explodedDirection: [0.7, 0, 0.7], }), makePart({ id: 'reverse-idler', name: 'Reverse idler', group: 'Gear pairs', description: 'Sliding idler adds an extra mesh to reverse output rotation.', primitive: primitive('gear', { radius: 0.22, thickness: 0.14, teeth: 18, axis: 'y' }), position: [0.86, -0.04, -0.28], rotation: [1.5708, 0, 0], material: 'paint-yellow', explodedDirection: [0.9, -0.35, -0.25], }), makePart({ id: 'synchronizer-hubs', name: 'Synchronizer hubs', group: 'Shift system', description: 'Dog sleeve and cone clutch assemblies match speeds before locking a selected gear to the shaft.', primitive: primitive('custom', { profile: 'synchro-hub-array', hubs: 3, coneAngle: 9 }), position: [0.24, 0.42, 0.08], material: 'brass', explodedDirection: [0, 0.95, 0.1], }), makePart({ id: 'selector-forks', name: 'Selector forks', group: 'Shift system', description: 'Forks slide synchronizer sleeves along the output shaft according to driver gear selection.', primitive: primitive('custom', { profile: 'selector-forks', forks: 3, travel: 0.26 }), position: [0.24, 0.78, 0.08], material: 'brushed-steel', explodedDirection: [0, 1.1, 0.2], }), makePart({ id: 'shift-rail', name: 'Shift rail', group: 'Shift system', description: 'Rail constrains fork movement and supports the step-through gear selection demonstration.', primitive: primitive('cylinder', { radius: 0.045, depth: 1.7, axis: 'z' }), position: [0.24, 0.98, 0.08], material: 'machined-steel', explodedDirection: [0, 1.25, 0.25], }), makePart({ id: 'gearbox-case', name: 'Gearbox case cutaway', group: 'Structure', description: 'Transparent case preserving shaft spacing and bearing locations while exposing the gear train.', primitive: primitive('housing', { profile: 'manual-gearbox-case', width: 2.35, height: 1.75, depth: 2.85, cutaway: true }), position: [0, 0.18, 0], material: 'transparent-shell', explodedDirection: [0, 0, -1], crossSectionBehavior: 'shell', }), ]; const cvtParts = [ makePart({ id: 'drive-pulley-fixed-sheave', name: 'Drive pulley fixed sheave', group: 'Drive pulley', description: 'Stationary half of the input pulley; belt radius changes as the opposing moving sheave shifts.', primitive: primitive('pulley', { radius: 0.42, coneAngle: 11, half: 'fixed', axis: 'z' }), position: [-0.75, 0, 0.1], material: 'machined-steel', explodedDirection: [-0.65, 0.2, 0.25], }), makePart({ id: 'drive-pulley-moving-sheave', name: 'Drive pulley moving sheave', group: 'Drive pulley', description: 'Actuated sheave that closes or opens the V-groove to vary effective drive radius.', primitive: primitive('pulley', { radius: 0.42, coneAngle: -11, half: 'moving', axis: 'z' }), position: [-0.75, 0, -0.1], material: 'brushed-steel', explodedDirection: [-0.65, -0.2, -0.25], }), makePart({ id: 'driven-pulley-fixed-sheave', name: 'Driven pulley fixed sheave', group: 'Driven pulley', description: 'Fixed half of the output pulley, paired with a spring or actuator on the moving sheave.', primitive: primitive('pulley', { radius: 0.5, coneAngle: 11, half: 'fixed', axis: 'z' }), position: [0.75, 0, 0.1], material: 'machined-steel', explodedDirection: [0.65, 0.2, 0.25], }), makePart({ id: 'driven-pulley-moving-sheave', name: 'Driven pulley moving sheave', group: 'Driven pulley', description: 'Moves opposite to the drive sheave so belt length remains effectively constant.', primitive: primitive('pulley', { radius: 0.5, coneAngle: -11, half: 'moving', axis: 'z' }), position: [0.75, 0, -0.1], material: 'brushed-steel', explodedDirection: [0.65, -0.2, -0.25], }), makePart({ id: 'steel-belt', name: 'Steel push belt', group: 'Belt', description: 'Segmented belt transmits torque by compression between variable-radius pulley cones.', primitive: primitive('belt', { path: 'two-pulley-cvt', width: 0.16, segmentCount: 54, adjustableRadius: true }), position: [0, 0, 0], material: 'bearing-steel', explodedDirection: [0, 0.65, 0], }), makePart({ id: 'input-shaft', name: 'Input shaft', group: 'Shafting', description: 'Engine-side shaft driving the primary pulley.', primitive: primitive('cylinder', { radius: 0.07, depth: 0.8, axis: 'z' }), position: [-0.75, 0, 0], material: 'machined-steel', explodedDirection: [-0.8, 0, 0], }), makePart({ id: 'output-shaft', name: 'Output shaft', group: 'Shafting', description: 'Driven shaft receiving torque from the secondary pulley.', primitive: primitive('cylinder', { radius: 0.07, depth: 0.8, axis: 'z' }), position: [0.75, 0, 0], material: 'machined-steel', explodedDirection: [0.8, 0, 0], }), makePart({ id: 'ratio-actuator', name: 'Ratio actuator', group: 'Controls', description: 'Hydraulic or electric actuator marker showing commanded sheave movement.', primitive: primitive('cylinder', { radius: 0.06, depth: 0.82, axis: 'x' }), position: [-0.75, 0.68, 0], material: 'blue-accent', explodedDirection: [-0.25, 0.95, 0], }), makePart({ id: 'hydraulic-valve-body', name: 'Hydraulic valve body', group: 'Controls', description: 'Control block regulating pressure to maintain belt clamping force and target ratio.', primitive: primitive('box', { width: 0.8, height: 0.22, depth: 0.34, bevel: 0.04 }), position: [0, -0.72, 0], material: 'dark-anodized', explodedDirection: [0, -0.95, 0], }), makePart({ id: 'housing', name: 'CVT housing cutaway', group: 'Structure', description: 'Transparent transmission case exposing pulley spacing and belt path.', primitive: primitive('housing', { profile: 'cvt-case', width: 2.25, height: 1.7, depth: 0.92, cutaway: true }), position: [0, 0, 0], material: 'transparent-shell', explodedDirection: [0, 0, -0.8], crossSectionBehavior: 'shell', }), ]; const wormParts = [ makePart({ id: 'worm-shaft', name: 'Worm shaft', group: 'Input', description: 'Input shaft carrying a screw-like worm that drives the wheel at high reduction.', primitive: primitive('cylinder', { radius: 0.08, depth: 1.65, axis: 'x' }), position: [0, 0.34, 0], rotation: [0, 0, 1.5708], material: 'machined-steel', explodedDirection: [0, 0.75, 0], }), makePart({ id: 'worm-thread', name: 'Worm thread', group: 'Input', description: 'Helical tooth form whose lead angle determines ratio, efficiency, and self-locking tendency.', primitive: primitive('worm', { radius: 0.18, length: 1.05, starts: 1, leadAngleDegrees: 5, axis: 'x' }), position: [0, 0.34, 0], rotation: [0, 0, 1.5708], material: 'warm-highlight', explodedDirection: [0, 0.85, 0.25], }), makePart({ id: 'worm-wheel', name: 'Worm wheel', group: 'Output', description: 'Toothed wheel meshed with the worm; rotates slowly with high torque multiplication.', primitive: primitive('gear', { radius: 0.52, thickness: 0.18, teeth: 40, axis: 'z', wormCompatible: true }), position: [0, -0.12, 0], material: 'bronze', explodedDirection: [0, -0.65, 0], }), makePart({ id: 'output-shaft', name: 'Output shaft', group: 'Output', description: 'Shaft driven by the worm wheel, typically perpendicular to the input shaft.', primitive: primitive('cylinder', { radius: 0.08, depth: 1.1, axis: 'z' }), position: [0, -0.12, 0], material: 'brushed-steel', explodedDirection: [0, -0.25, 0.85], }), makePart({ id: 'thrust-bearing', name: 'Thrust bearing', group: 'Support', description: 'Bearing pair resisting axial force generated by sliding helical worm contact.', primitive: primitive('torus', { majorRadius: 0.18, tubeRadius: 0.035, count: 2, axis: 'x' }), position: [-0.68, 0.34, 0], rotation: [0, 0, 1.5708], material: 'bearing-steel', explodedDirection: [-0.75, 0.35, 0], }), makePart({ id: 'housing', name: 'Gear housing', group: 'Structure', description: 'Oil-retaining housing supporting the worm and wheel centre distance.', primitive: primitive('housing', { profile: 'worm-gear-case', width: 1.65, height: 1.35, depth: 1.25, cutaway: true }), position: [0, 0, 0], material: 'transparent-shell', explodedDirection: [0, 0, -0.9], crossSectionBehavior: 'shell', }), makePart({ id: 'lubrication-bath', name: 'Lubrication bath', group: 'Lubrication', description: 'Oil level overlay showing why sliding worm contact needs strong lubrication and cooling.', primitive: primitive('flow-path', { path: 'worm-oil-bath', fillHeight: 0.28, slosh: true }), position: [0, -0.45, 0], material: 'oil-green', explodedDirection: [0, -0.55, 0.35], crossSectionBehavior: 'fluid', }), makePart({ id: 'self-locking-brake-arm', name: 'Self-locking demonstration arm', group: 'Learning overlays', description: 'Load arm attempts to back-drive the worm wheel; low lead angle resists reverse motion.', primitive: primitive('box', { width: 0.08, height: 0.62, depth: 0.08, rounded: true }), position: [0.52, -0.12, 0], rotation: [0, 0, 0.7], material: 'paint-red', explodedDirection: [0.75, 0, 0], }), makePart({ id: 'load-indicator', name: 'Load indicator', group: 'Learning overlays', description: 'Arrow overlay visualising holding torque and back-drive direction.', primitive: primitive('annotation-plane', { width: 0.58, height: 0.22, text: 'back-drive load' }), position: [0.82, -0.48, 0], material: 'warm-highlight', explodedDirection: [0.95, -0.25, 0], crossSectionBehavior: 'hidden-when-clipped', }), ]; const bevelParts = [ makePart({ id: 'input-bevel-pinion', name: 'Input bevel pinion', group: 'Gear mesh', description: 'Small bevel gear on the input shaft transmitting rotation through a right angle.', primitive: primitive('bevel-gear', { radius: 0.32, thickness: 0.24, teeth: 18, coneAngle: 45, spiral: true, axis: 'x' }), position: [-0.36, 0, 0], rotation: [0, 1.5708, 0], material: 'warm-highlight', explodedDirection: [-0.75, 0, 0], }), makePart({ id: 'output-bevel-gear', name: 'Output bevel gear', group: 'Gear mesh', description: 'Larger mating bevel gear on the perpendicular output shaft.', primitive: primitive('bevel-gear', { radius: 0.54, thickness: 0.26, teeth: 32, coneAngle: 45, spiral: true, axis: 'z' }), position: [0.08, 0, 0.36], material: 'machined-steel', explodedDirection: [0, 0, 0.75], }), makePart({ id: 'input-shaft', name: 'Input shaft', group: 'Shafting', description: 'Shaft aligned with the pinion axis.', primitive: primitive('cylinder', { radius: 0.07, depth: 1.2, axis: 'x' }), position: [-0.82, 0, 0], rotation: [0, 1.5708, 0], material: 'brushed-steel', explodedDirection: [-1, 0, 0], }), makePart({ id: 'output-shaft', name: 'Output shaft', group: 'Shafting', description: 'Perpendicular output shaft carrying the driven bevel gear.', primitive: primitive('cylinder', { radius: 0.08, depth: 1.25, axis: 'z' }), position: [0.08, 0, 0.86], material: 'brushed-steel', explodedDirection: [0, 0, 1], }), makePart({ id: 'bearing-set', name: 'Bearing set', group: 'Support', description: 'Conical and radial bearings maintain gear alignment under separating loads.', primitive: primitive('torus', { majorRadius: 0.16, tubeRadius: 0.035, count: 4, axis: 'mixed' }), position: [-0.38, 0, 0.42], material: 'bearing-steel', explodedDirection: [-0.25, 0.65, 0.25], }), makePart({ id: 'backlash-adjuster', name: 'Backlash adjuster', group: 'Adjustment', description: 'Shim/adjuster marker showing where mesh depth and backlash are set.', primitive: primitive('box', { width: 0.22, height: 0.06, depth: 0.42, bevel: 0.02 }), position: [0.24, -0.42, 0.24], material: 'brass', explodedDirection: [0.35, -0.65, 0.35], }), makePart({ id: 'housing', name: 'Right-angle housing', group: 'Structure', description: 'Cutaway casing that establishes the 90-degree shaft axes and holds lubricant.', primitive: primitive('housing', { profile: 'right-angle-gearcase', width: 1.55, height: 1.2, depth: 1.55, cutaway: true }), position: [-0.12, 0, 0.32], material: 'transparent-shell', explodedDirection: [0, 0, -0.85], crossSectionBehavior: 'shell', }), makePart({ id: 'oil-slinger', name: 'Oil slinger', group: 'Lubrication', description: 'Rotating disk splashes lubricant across spiral bevel teeth.', primitive: primitive('torus', { majorRadius: 0.22, tubeRadius: 0.025, axis: 'x' }), position: [-0.62, 0, 0], rotation: [0, 1.5708, 0], material: 'oil-green', explodedDirection: [-0.65, 0.35, 0], }), makePart({ id: 'spiral-tooth-guide', name: 'Spiral tooth guide', group: 'Learning overlays', description: 'Overlay curves indicate gradual spiral bevel tooth engagement compared with straight bevel gears.', primitive: primitive('annotation-plane', { width: 0.62, height: 0.24, text: 'spiral engagement' }), position: [0.48, 0.42, 0.48], material: 'blue-accent', explodedDirection: [0.65, 0.65, 0.65], crossSectionBehavior: 'hidden-when-clipped', }), ]; export const GEARBOX_AND_DRIVE_MACHINES: readonly MachineDefinition[] = [ makeMachine({ id: 'planetary-gearbox', slug: 'planetary-gearbox', title: 'Planetary Gearbox', category: 'gearboxes-drives', difficulty: 'Intermediate', complexityScore: 62, sortOrder: 9, releasedAt: '2025-02-01', summary: 'Sun, planet, carrier, and ring gear train with selectable input/output behaviour.', description: 'A compact epicyclic gearset displaying the relationship between sun gear, planet gears, carrier, ring gear, clutches, and a reaction brake. The procedural module supports selectable input/output semantics through animation metadata while the registry keeps geometry and educational content data-driven.', keywords: ['planetary', 'epicyclic', 'sun gear', 'ring gear', 'carrier', 'automatic transmission'], facts: [ { label: 'Fundamental members', value: 'Sun, planet carrier, ring', kind: 'note' }, { label: 'Typical ratio range', value: '3:1 to 10:1 per simple set', kind: 'ratio' }, { label: 'Typical efficiency', value: '94-98', unit: '% when well lubricated', kind: 'efficiency' }, { label: 'Invention milestone', value: '19th century epicyclic trains; 20th century automatics', kind: 'date' }, { label: 'Common applications', value: 'Automatic transmissions, robotics, wind turbines', kind: 'application' }, ], relatedMachineIds: ['manual-gearbox-5-speed', 'differential-gear', 'worm-gear-drive'], thumbnail: thumbnail('Planetary Gearbox', ['sun-gear', 'planet-gears', 'ring-gear'], 'brake-band'), parts: planetaryParts, hierarchy: hierarchy([ groupNode('gear-train', 'Gear train', ['sun-gear', 'planet-gears', 'ring-gear']), groupNode('carrier-shafts', 'Carrier and shafts', ['planet-carrier', 'input-shaft', 'output-shaft']), groupNode('controls', 'Controls', ['brake-band', 'clutch-pack']), groupNode('support', 'Support and lubrication', ['housing', 'lubrication-flow']), ]), cameraPresets: standardCameraPresets(4.8), guidedTour: [ tourStep('overview', 'Epicyclic layout', 'Planets mesh with the sun and ring simultaneously, letting several ratio paths share one compact axis.', 'isometric', ['sun-gear', 'planet-gears', 'ring-gear']), tourStep('carrier', 'Orbit and spin', 'Planet gears spin on their own pins while the carrier can rotate as an input or output member.', 'top', ['planet-gears', 'planet-carrier'], { playback: 'play', rpm: 120 }), tourStep('reaction', 'Holding a member', 'The brake band marker shows how holding the ring gear produces reduction.', 'front', ['ring-gear', 'brake-band', 'sun-gear'], { playback: 'play', rpm: 120 }), tourStep('replacement', 'Asset-ready nodes', 'Each gear and control member has a stable part id so a detailed GLB can replace the schematic train.', 'isometric', ['housing', 'lubrication-flow'], { explodeDistance: 0.35 }), ], animationModuleId: 'anim-planetary-gearbox', labelsEnabledByDefault: true, }), makeMachine({ id: 'differential-gear', slug: 'differential-gear', title: 'Differential Gear', category: 'gearboxes-drives', difficulty: 'Intermediate', complexityScore: 58, sortOrder: 10, releasedAt: '2025-02-01', summary: 'Open differential demonstrating torque split and different wheel speeds during cornering.', description: 'A cutaway automotive differential with ring gear, pinion, differential case, spider gears, side gears, axle shafts, and torque-flow overlays. The animation can switch between straight-line equal wheel speeds and a cornering state with spider gear motion.', keywords: ['differential', 'final drive', 'ring gear', 'pinion', 'spider gears', 'torque split'], facts: [ { label: 'Torque split', value: 'Equal torque to both side gears in an open differential', kind: 'note' }, { label: 'Typical final drive ratio', value: '2.7:1 to 4.5:1', kind: 'ratio' }, { label: 'Typical efficiency', value: '94-98', unit: '% hypoid final drive', kind: 'efficiency' }, { label: 'Invention milestone', value: '19th century road vehicle differentials', kind: 'date' }, { label: 'Common applications', value: 'Cars, trucks, off-road axles, driveline test rigs', kind: 'application' }, ], relatedMachineIds: ['bevel-gear-set', 'manual-gearbox-5-speed', 'planetary-gearbox'], thumbnail: thumbnail('Differential Gear', ['ring-gear', 'spider-gears', 'left-axle-shaft'], 'torque-flow'), parts: differentialParts, hierarchy: hierarchy([ groupNode('final-drive', 'Final drive', ['drive-pinion', 'ring-gear']), groupNode('case-gears', 'Differential case and gears', ['differential-case', 'spider-gears', 'side-gear-left', 'side-gear-right']), groupNode('outputs', 'Output axles', ['left-axle-shaft', 'right-axle-shaft']), groupNode('support', 'Housing and overlays', ['housing', 'torque-flow']), ]), cameraPresets: standardCameraPresets(5.4), guidedTour: [ tourStep('overview', 'Torque enters at a right angle', 'The pinion drives the ring gear and rotates the differential case.', 'isometric', ['drive-pinion', 'ring-gear', 'differential-case']), tourStep('straight', 'Straight-line driving', 'Both side gears rotate together and spider gears do not spin significantly on their own axes.', 'front', ['side-gear-left', 'side-gear-right', 'spider-gears'], { playback: 'play', rpm: 180 }), tourStep('cornering', 'Cornering speed difference', 'Spider gears rotate to let the outside axle turn faster while torque remains split.', 'top', ['spider-gears', 'left-axle-shaft', 'right-axle-shaft'], { playback: 'play', rpm: 180 }), tourStep('flow', 'Torque path', 'The overlay traces torque from the driveshaft through the final drive and out to each axle shaft.', 'back', ['torque-flow'], { explodeDistance: 0.2 }), ], animationModuleId: 'anim-differential-gear', labelsEnabledByDefault: true, }), makeMachine({ id: 'manual-gearbox-5-speed', slug: 'manual-gearbox-5-speed', title: 'Manual Gearbox (5-speed)', shortTitle: '5-speed Manual Gearbox', category: 'gearboxes-drives', difficulty: 'Advanced', complexityScore: 84, sortOrder: 11, releasedAt: '2025-02-01', summary: 'Constant-mesh five-speed gearbox with synchromesh, selector forks, layshaft, and reverse idler.', description: 'A performant procedural manual transmission layout with separate shafting, gear pairs, synchronizer hubs, selector forks, shift rail, reverse idler, and cutaway case. The animation is indexed by selected gear so the core player can step through 1st to 5th and reverse without machine-specific UI logic.', keywords: ['manual gearbox', 'synchromesh', 'selector forks', 'layshaft', 'overdrive', 'reverse idler'], facts: [ { label: 'Gear count', value: '5 forward speeds plus reverse', kind: 'note' }, { label: 'Typical ratio range', value: '3.8:1 first to 0.8:1 overdrive', kind: 'ratio' }, { label: 'Typical efficiency', value: '94-98', unit: '% in direct gears', kind: 'efficiency' }, { label: 'Invention milestone', value: 'Early 20th century sliding and constant-mesh transmissions', kind: 'date' }, { label: 'Common applications', value: 'Passenger cars, light trucks, motorsport training', kind: 'application' }, ], relatedMachineIds: ['planetary-gearbox', 'differential-gear', 'cvt-transmission', 'v8-engine'], thumbnail: thumbnail('Manual Gearbox (5-speed)', ['first-gear-pair', 'synchronizer-hubs', 'selector-forks'], 'reverse-idler'), parts: manualGearboxParts, hierarchy: hierarchy([ groupNode('shafts', 'Shafting', ['input-shaft', 'layshaft', 'output-shaft']), groupNode('gears', 'Forward gear pairs', ['clutch-gear', 'first-gear-pair', 'second-gear-pair', 'third-gear-pair', 'fourth-gear-pair', 'fifth-gear-pair']), groupNode('reverse', 'Reverse', ['reverse-idler']), groupNode('shift', 'Synchromesh and shift system', ['synchronizer-hubs', 'selector-forks', 'shift-rail']), groupNode('case', 'Case', ['gearbox-case']), ]), cameraPresets: standardCameraPresets(6.2), guidedTour: [ tourStep('overview', 'Constant mesh', 'All forward gears remain meshed; synchronizers decide which gear locks to the output shaft.', 'isometric', ['layshaft', 'output-shaft', 'first-gear-pair', 'fifth-gear-pair']), tourStep('low-gear', 'Low gear torque multiplication', 'Large output gear and small layshaft gear create high reduction for launch.', 'front', ['first-gear-pair', 'synchronizer-hubs'], { playback: 'step' }), tourStep('shift-system', 'Synchronizer selection', 'Forks slide sleeves to match speed and lock a gear to the output shaft.', 'top', ['selector-forks', 'synchronizer-hubs', 'shift-rail'], { explodeDistance: 0.25 }), tourStep('reverse', 'Reverse idler', 'An extra gear mesh reverses output direction.', 'right', ['reverse-idler', 'layshaft', 'output-shaft'], { playback: 'step' }), ], animationModuleId: 'anim-manual-gearbox-5-speed', labelsEnabledByDefault: true, }), makeMachine({ id: 'cvt-transmission', slug: 'cvt-transmission', title: 'CVT (Continuously Variable Transmission)', shortTitle: 'CVT Transmission', category: 'gearboxes-drives', difficulty: 'Intermediate', complexityScore: 64, sortOrder: 12, releasedAt: '2025-02-01', summary: 'Variable pulley and steel belt drive showing continuous ratio change.', description: 'A schematic push-belt CVT with primary and secondary pulley sheaves, segmented steel belt, shafts, hydraulic valve body, ratio actuator, and housing. The ratio morph track moves sheaves in opposite directions and adjusts effective belt pitch radius.', keywords: ['cvt', 'variable pulley', 'steel belt', 'ratio control', 'transmission'], facts: [ { label: 'Ratio behaviour', value: 'Continuous between mechanical limits', kind: 'ratio' }, { label: 'Typical ratio spread', value: '5:1 to 7:1', kind: 'ratio' }, { label: 'Typical efficiency', value: '88-95', unit: '% depending on clamping losses', kind: 'efficiency' }, { label: 'Invention milestone', value: 'Late 19th century variable belt drives; modern automotive CVTs late 20th century', kind: 'date' }, { label: 'Common applications', value: 'Scooters, small cars, ATVs, industrial drives', kind: 'application' }, ], relatedMachineIds: ['manual-gearbox-5-speed', 'planetary-gearbox', 'worm-gear-drive'], thumbnail: thumbnail('CVT Transmission', ['steel-belt', 'drive-pulley-moving-sheave', 'driven-pulley-moving-sheave'], 'ratio-actuator'), parts: cvtParts, hierarchy: hierarchy([ groupNode('drive', 'Drive pulley', ['drive-pulley-fixed-sheave', 'drive-pulley-moving-sheave', 'input-shaft']), groupNode('driven', 'Driven pulley', ['driven-pulley-fixed-sheave', 'driven-pulley-moving-sheave', 'output-shaft']), groupNode('belt', 'Belt', ['steel-belt']), groupNode('controls', 'Controls and housing', ['ratio-actuator', 'hydraulic-valve-body', 'housing']), ]), cameraPresets: standardCameraPresets(5.3), guidedTour: [ tourStep('overview', 'Variable pitch radii', 'Pulley sheaves move to change where the belt rides, continuously changing ratio.', 'isometric', ['steel-belt', 'drive-pulley-moving-sheave', 'driven-pulley-moving-sheave']), tourStep('low-ratio', 'Low ratio', 'The drive belt rides low on the input pulley and high on the output pulley for launch torque.', 'front', ['drive-pulley-fixed-sheave', 'driven-pulley-moving-sheave', 'steel-belt'], { playback: 'step' }), tourStep('ratio-sweep', 'Continuous ratio sweep', 'The actuator moves sheaves opposite each other while belt length remains constrained.', 'top', ['ratio-actuator', 'steel-belt'], { playback: 'play', rpm: 900 }), tourStep('control', 'Hydraulic clamping force', 'The valve body represents pressure control that prevents belt slip.', 'right', ['hydraulic-valve-body', 'ratio-actuator'], { explodeDistance: 0.25 }), ], animationModuleId: 'anim-cvt-transmission', labelsEnabledByDefault: true, }), makeMachine({ id: 'worm-gear-drive', slug: 'worm-gear-drive', title: 'Worm Gear Drive', category: 'gearboxes-drives', difficulty: 'Intermediate', complexityScore: 54, sortOrder: 13, releasedAt: '2025-02-01', summary: 'High-reduction right-angle drive with self-locking demonstration.', description: 'A worm gear drive with screw-like worm, bronze worm wheel, thrust bearing, output shaft, oil bath, housing, and a back-drive load overlay. The animation emphasises high ratio, sliding contact, axial thrust, and the low-lead-angle self-locking condition.', keywords: ['worm gear', 'self locking', 'high reduction', 'right angle drive', 'lead angle'], facts: [ { label: 'Typical ratio range', value: '10:1 to 80:1 in one stage', kind: 'ratio' }, { label: 'Typical efficiency', value: '40-90', unit: '% depending on lead angle and lubrication', kind: 'efficiency' }, { label: 'Self-locking', value: 'Possible when friction angle exceeds lead angle', kind: 'note' }, { label: 'Invention milestone', value: 'Ancient screw mechanisms; modern industrial gearboxes', kind: 'date' }, { label: 'Common applications', value: 'Hoists, adjusters, conveyors, tuning mechanisms', kind: 'application' }, ], relatedMachineIds: ['bevel-gear-set', 'planetary-gearbox', 'toggle-clamp'], thumbnail: thumbnail('Worm Gear Drive', ['worm-thread', 'worm-wheel'], 'self-locking-brake-arm'), parts: wormParts, hierarchy: hierarchy([ groupNode('input', 'Input worm', ['worm-shaft', 'worm-thread', 'thrust-bearing']), groupNode('output', 'Output wheel', ['worm-wheel', 'output-shaft']), groupNode('support', 'Housing and lubrication', ['housing', 'lubrication-bath']), groupNode('learning', 'Self-locking demonstration', ['self-locking-brake-arm', 'load-indicator']), ]), cameraPresets: standardCameraPresets(4.9), guidedTour: [ tourStep('overview', 'Screw drives gear teeth', 'A rotating worm advances tooth contact around the wheel like a screw thread.', 'isometric', ['worm-thread', 'worm-wheel']), tourStep('reduction', 'High reduction', 'Many worm turns may produce only one wheel revolution, multiplying torque.', 'front', ['worm-shaft', 'worm-thread', 'worm-wheel'], { playback: 'play', rpm: 300 }), tourStep('sliding', 'Sliding contact and thrust', 'The helical mesh creates axial thrust and heat, so bearings and lubrication matter.', 'left', ['thrust-bearing', 'lubrication-bath'], { explodeDistance: 0.22 }), tourStep('self-locking', 'Self-locking load', 'The red arm attempts reverse drive; the overlay shows why low lead angle can prevent it.', 'right', ['self-locking-brake-arm', 'load-indicator'], { playback: 'pause' }), ], animationModuleId: 'anim-worm-gear-drive', labelsEnabledByDefault: true, }), makeMachine({ id: 'bevel-gear-set', slug: 'bevel-gear-set', title: 'Bevel Gear Set', category: 'gearboxes-drives', difficulty: 'Beginner', complexityScore: 44, sortOrder: 14, releasedAt: '2025-02-01', summary: 'Right-angle gear mesh with spiral bevel engagement and backlash adjustment.', description: 'A compact bevel gear assembly showing pinion, driven gear, perpendicular shafts, bearing support, backlash adjuster, oil slinger, housing, and spiral-tooth learning overlay. It acts as a clear bridge between simple gear trains and automotive final drives.', keywords: ['bevel gear', 'right angle drive', 'spiral bevel', 'backlash', 'gear mesh'], facts: [ { label: 'Shaft angle', value: 'Typically 90° but not limited to 90°', kind: 'note' }, { label: 'Typical ratio range', value: '1:1 to 6:1', kind: 'ratio' }, { label: 'Typical efficiency', value: '95-99', unit: '% for well-cut gears', kind: 'efficiency' }, { label: 'Invention milestone', value: 'Industrial gear cutting matured in the 19th century', kind: 'date' }, { label: 'Common applications', value: 'Differentials, gearboxes, hand tools, machine tools', kind: 'application' }, ], relatedMachineIds: ['differential-gear', 'worm-gear-drive', 'manual-gearbox-5-speed'], thumbnail: thumbnail('Bevel Gear Set', ['input-bevel-pinion', 'output-bevel-gear'], 'spiral-tooth-guide'), parts: bevelParts, hierarchy: hierarchy([ groupNode('gear-mesh', 'Gear mesh', ['input-bevel-pinion', 'output-bevel-gear', 'spiral-tooth-guide']), groupNode('shafts', 'Shafts and bearings', ['input-shaft', 'output-shaft', 'bearing-set']), groupNode('support', 'Adjustment and housing', ['backlash-adjuster', 'housing', 'oil-slinger']), ]), cameraPresets: standardCameraPresets(4.7), guidedTour: [ tourStep('overview', 'Changing direction', 'Bevel gears transmit rotation between intersecting shafts, usually at a right angle.', 'isometric', ['input-bevel-pinion', 'output-bevel-gear']), tourStep('spiral', 'Spiral tooth engagement', 'Curved teeth engage gradually, lowering noise and increasing load capacity compared with straight teeth.', 'front', ['spiral-tooth-guide', 'input-bevel-pinion', 'output-bevel-gear'], { playback: 'play', rpm: 240 }), tourStep('support', 'Bearing support', 'Gear mesh forces try to separate the shafts, so bearings and backlash adjustment are essential.', 'top', ['bearing-set', 'backlash-adjuster'], { explodeDistance: 0.25 }), ], animationModuleId: 'anim-bevel-gear-set', labelsEnabledByDefault: true, }), ];