A mech game prototype, pushed by Gemini 4 Argon
agent
+48:06reasoning
Initial assessment: examining the available functions in lib.py for potential utility. The presence of functions like panels, halves, transform, and solid suggests a focus on geometric operations and possibly object manipulation. The next step is to determine how these functions can be leveraged for the current task.
Examining the function calls to determine how to construct the desired aero-chine hull, panel cuts, and mechanical detailing. The aim is to integrate the 3D lofting of the chine hull with panel-seam cuts and joint under-detailing to achieve the target architectural complexity. Initially planning to use the panels function to create the armor shell.
Initial design breakdown: visualizing a structural frame core with visible reactors. Exploring a forward-swept cockpit module with armored hatch and panoramic visor. Considering twin intake nacelles flanking the cockpit and multi-plate abdomen armor. Evaluating high swept collar guards and dorsal spine armor.
Initial breakdown of the pelvis and flight skirts indicates a multi-part design incorporating forward sensors, chevron skirts, hinged vernier pods, and two-stage tail skirts, each requiring distinct function calls. The shoulder assembly is also complex, incorporating variable-geometry aero-chine pauldrons with structural trunnions, hydraulic rams, and segmented carapaces that likely need to use similar functions.
Analyzing the bicep armor design: bicep_front, bicep_outer from main, and bicep_band from accent define the multi-piece chine construction, focusing on inner frame channel reveal. The forearm's double-barrel titanium elbow joint (joint) requires specific function calls for the hydraulic actuator (piston) and swept elbow guard (couter).
The integrated twin-barrel forearm rail-carbine/plasma blade (arm_gun_housing, twin barrels, muzzle glow) will also need function calls to construct that detail. Determining how to integrate the articulated armored gauntlet with the Long-Barrel Orbital Beam/Rail Rifle (kestrel_rifle) is the final step for this section.
Analyzing leg construction: thigh components suggest split aero-chine shells joined by diagonal seams, incorporating hydraulic rams and radiator louvers. The shin design incorporates a double-jointed knee, optical sensor, and sculpted fairings with a vectored thruster nacelle. The foot assembly appears articulated with a swept ankle spat and shock pistons.
Examining the backpack and wing binders for construction; the central reactor housing with propellant tanks and gimballed main thrusters necessitates calls to create complex geometric forms. Articulated binders, each incorporating a compound-swept wing, structural spars, and plasma-capacitor fins, will require specific function calls for surface generation and assembly. The high-visibility leading-edge dogtooth design and under-slung thrusters will integrate with the binder's construction.
write_file{"Content":"\"\"\"YF-09 Kestrel: high-agility orbital interceptor built on the shared 17.6 m 22-joint striker rig.\n\nReplaces the placeholder box mannequin in block_dummy with a full hard-surface design at and beyond\nthe control striker's refinement level:\n - Multi-station 3D aero-chine cross-section lofts (crowned dorsal/ventral keels + angled stealth\n chines) rather than flat 2D orthographic two_view block intersections.\n - Real 3D geometric panel seams cut with bmesh bisect planes (4 cm physical gaps over a dark\n mechanical under-frame) plus recessed border insets, rather than random BSP normal tilt.\n - Panoramic orbital cockpit capsule on the `cockpit` joint with tinted visor glass, internal HUD\n core glow, ejection frame trim, and flanking compressor intake nacelles.\n - Articulated spinal waist with twin hydraulic rams, split chevron skirts, aero-chine pauldrons\n with outboard delta vernier wings, forearm rail-carbines, a long-barrel orbital beam rifle on\n `grip.R`, sculpted chine legs with knee sensors and rear calf thruster pods, talon sabatons, and\n a twin-boom vector backpack with variable-sweep wing binders and full main/binder/calf nozzles.\n\"\"\"\nimport math\n\nimport bmesh\nfrom mathutils import Matrix, Vector\n\nfrom lib import (\n circle, cylinder, empty, halves, loft, merge, mirror_x, nozzle, octo,\n panels, piston, prism, rot, slats, solid, subd, transform,\n)\nfrom mech import gltf_dir, joints as striker_joints, lr, nozzle_pair, pair, place\n\n\ndef chine_ring(w, d, cx=0.0, cy=0.0, keel_f=0.18, keel_b=0.14, crown=0.12, pinch=0.72):\n \"\"\"A 12-point aero-chine cross-section (CCW seen from above): a sharp forward keel at -Y, angled\n stealth chines, flared side cheeks, and a crowned rear spine at +Y.\"\"\"\n hw, hd = w * 0.5, d * 0.5\n return [\n (cx, cy - hd - keel_f),\n (cx + hw * 0.46, cy - hd),\n (cx + hw * 0.88, cy - hd * 0.52),\n (cx + hw, cy - hd * 0.08),\n (cx + hw * 0.92, cy + hd * 0.48),\n (cx + hw * pinch, cy + hd * (1.0 - crown)),\n (cx, cy + hd + keel_b),\n (cx - hw * pinch, cy + hd * (1.0 - crown)),\n (cx - hw * 0.92, cy + hd * 0.48),\n (cx - hw, cy - hd * 0.08),\n (cx - hw * 0.88, cy - hd * 0.52),\n (cx - hw * 0.46, cy - hd),\n ]\n\n\ndef asym_ring(w_in, w_out, d_f, d_b, cx=0.0, cy=0.0, keel=0.14, flare=0.12):\n \"\"\"A 10-point asymmetric limb/pauldron chine section on the left (+X) side: narrower inboard\n (-X from cx), flared and keeled outboard (+X from cx).\"\"\"\n return [\n (cx, cy - d_f - keel),\n (cx + w_out * 0.55, cy - d_f),\n (cx + w_out, cy - d_f * 0.25),\n (cx + w_out * (1.0 + flare), cy + d_b * 0.22),\n (cx + w_out * 0.62, cy + d_b),\n (cx, cy + d_b + keel * 0.7),\n (cx - w_in * 0.65, cy + d_b * 0.88),\n (cx - w_in, cy + d_b * 0.2),\n (cx - w_in, cy - d_f * 0.35),\n (cx - w_in * 0.58, cy - d_f * 0.92),\n ]\n\n\ndef pair_split(name, bm, cuts, roles, jl, jr, gap=0.035, bevel=0.018, panels_on=True):\n \"\"\"Split a left-side bmesh by 3D seam planes [(co, no), ...] into real separated armor plates\n with physical gaps, assigning roles cyclically or by list.\"\"\"\n pieces = panels(bm, cuts, gap=gap)\n for i, p in enumerate(pieces):\n r = roles[i % len(roles)] if isinstance(roles, (list, tuple)) else roles\n pair(f\"{name}_{i}\", p, r, jl, jr, bevel=bevel, panels=panels_on and r in (\"main\", \"accent\"))\n\n\ndef build_pelvis(J):\n P = J[\"pelvis\"]\n # Deep mechanical hip cradle with exposed lateral trunnion drums and hydraulic cylinders\n solid(\"pelvis_core\", loft([\n (9.75, octo(1.05, 1.25, .24)),\n (10.25, octo(2.15, 1.55, .36)),\n (10.95, octo(2.05, 1.5, .34)),\n ]), \"frame\", P, bevel=.025, panels=False)\n pair(\"hip_trunnion\", cylinder(.42, .45, 1.78, 14, axis=\"x\", at=(0, 10.48)), \"joint\", P, P, smooth=True)\n pair(\"hip_collar\", cylinder(.48, 1.42, 1.62, 14, axis=\"x\", at=(0, 10.48)), \"metal\", P, P, smooth=True)\n\n # Sculpted aero-chine belt girdle\n belt = loft([\n (10.52, chine_ring(2.95, 1.88, keel_f=.22, keel_b=.16)),\n (10.82, chine_ring(2.65, 1.76, keel_f=.26, keel_b=.14)),\n (11.04, chine_ring(2.15, 1.58, keel_f=.18, keel_b=.12)),\n ])\n solid(\"belt_girdle\", belt, \"main\", P, bevel=.02)\n\n # Forward sensor & vernier codpiece prow\n cod = loft([\n (9.42, chine_ring(.46, .72, cy=-.62, keel_f=.16, keel_b=.04)),\n (9.95, chine_ring(.72, 1.02, cy=-.68, keel_f=.28, keel_b=.06)),\n (10.58, chine_ring(.68, .96, cy=-.64, keel_f=.22, keel_b=.06)),\n (10.98, chine_ring(.52, .78, cy=-.58, keel_f=.14, keel_b=.04)),\n ])\n cod_lo, cod_hi = halves(cod, (0, -.8, 10.18), (0, -.25, 1), gap=.03)\n solid(\"codpiece_lo\", cod_lo, \"accent\", P, bevel=.018)\n solid(\"codpiece_hi\", cod_hi, \"main\", P, bevel=.018)\n solid(\"codpiece_crest\", prism([(-.12, 9.58), (.12, 9.58), (.08, 10.88), (-.08, 10.88)], -1.16, -.92, \"xz\"),\n \"trim\", P, bevel=.012, panels=False)\n\n # Swept two-piece chevron front flight skirts with physical seam channel\n sf = loft([\n (9.38, [(0.42, -1.22), (1.15, -1.14), (1.72, -.88), (1.62, -.72), (0.38, -.98)]),\n (10.05, [(0.38, -1.28), (1.28, -1.18), (1.96, -.84), (1.84, -.66), (0.34, -1.02)]),\n (10.68, [(0.36, -1.16), (1.22, -1.08), (1.82, -.78), (1.72, -.60), (0.32, -.94)]),\n ])\n pair_split(\"skirt_front\", sf, [((1.12, -1.0, 10.0), (.85, -.15, .48))], (\"main\", \"accent\"), P, P, gap=.035, bevel=.02)\n pair(\"skirt_front_lip\", loft([\n (9.26, [(0.48, -1.20), (1.58, -.92), (1.50, -.78), (0.44, -1.04)]),\n (9.44, [(0.44, -1.24), (1.66, -.90), (1.58, -.76), (0.40, -1.06)]),\n ]), \"trim\", P, P, bevel=.012, panels=False)\n\n # Side hip vernier fairings\n ss = loft([\n (9.35, asym_ring(.18, .42, .82, .92, cx=2.02, cy=.06, keel=.12)),\n (10.12, asym_ring(.22, .52, .96, 1.08, cx=2.08, cy=.04, keel=.16)),\n (10.74, asym_ring(.20, .38, .84, .94, cx=1.96, cy=.04, keel=.12)),\n ])\n pair_split(\"skirt_side\", ss, [((2.1, 0, 10.32), (0, .1, 1))], (\"main\", \"accent\"), P, P, gap=.03, bevel=.02)\n pair(\"skirt_side_vane\", prism([(-.68, 9.52), (.74, 9.52), (.66, 10.22), (-.60, 10.22)], 2.28, 2.42, \"yz\"),\n \"trim\", P, P, bevel=.01, panels=False)\n\n # Two-stage rear vernier tail skirts\n sr = loft([\n (9.22, [(0.18, .88), (0.88, 1.24), (1.56, 1.02), (1.48, .76), (0.16, .68)]),\n (9.98, [(0.16, .96), (0.96, 1.38), (1.72, 1.12), (1.60, .82), (0.14, .74)]),\n (10.68, [(0.16, .88), (0.88, 1.22), (1.52, .98), (1.42, .74), (0.14, .68)]),\n ])\n pair_split(\"skirt_rear\", sr, [((0.9, 1.1, 9.95), (.25, -.1, 1))], (\"accent\", \"main\"), P, P, gap=.035, bevel=.02)\n\n\ndef build_waist(J):\n W = J[\"waist\"]\n # Central spinal column with three articulated titanium rings and twin exposed hydraulic rams\n solid(\"spine_core\", cylinder(.52, 10.88, 12.05, 14), \"joint\", W, smooth=True)\n for i, z in enumerate((11.08, 11.44, 11.80)):\n solid(f\"spine_ring_{i}\", loft([\n (z - .11, chine_ring(1.56 + i * .1, 1.36 + i * .08, keel_f=.14, keel_b=.12)),\n (z + .11, chine_ring(1.62 + i * .1, 1.40 + i * .08, keel_f=.16, keel_b=.12)),\n ]), \"frame\", W, bevel=.018, panels=False)\n\n # Forward tiered cockpit-rib abdominal plates\n for i, (z0, z1, w, y) in enumerate(((10.98, 11.32, 1.18, -.78), (11.30, 11.64, 1.32, -.84), (11.62, 11.98, 1.48, -.90))):\n ab = loft([\n (z0, chine_ring(w, .56, cy=y, keel_f=.18, keel_b=.02)),\n (z1, chine_ring(w + .1, .62, cy=y - .03, keel_f=.22, keel_b=.02)),\n ])\n solid(f\"abs_plate_{i}\", ab, \"main\" if i == 2 else \"frame\", W, bevel=.015, panels=False)\n\n # Twin lateral hydraulic waist actuators (chrome cylinder + dark housing)\n pair(\"waist_piston\", piston((.78, -.18, 10.92), (.88, -.22, 11.98), r=.12, n=10), \"metal\", W, W, smooth=True)\n pair(\"waist_piston_b\", piston((.72, .48, 10.94), (.82, .52, 11.96), r=.11, n=10), \"joint\", W, W, smooth=True)\n\n\ndef build_torso(J):\n T, C = J[\"torso\"], J[\"cockpit\"]\n # Structural dark torso frame and exposed lateral Tokamak reactor drums\n solid(\"torso_core\", loft([\n (11.88, octo(1.85, 1.52, .36)),\n (12.65, octo(2.65, 2.02, .48)),\n (13.95, octo(3.05, 2.28, .54)),\n (14.95, octo(2.75, 2.05, .48)),\n (15.36, octo(1.75, 1.45, .36)),\n ]), \"frame\", T, bevel=.025, panels=False)\n pair(\"reactor_drum\", cylinder(.58, 1.15, 1.68, 16, axis=\"x\", at=(.18, 13.45)), \"joint\", T, T, smooth=True)\n pair(\"reactor_coil\", cylinder(.62, 1.32, 1.52, 16, axis=\"x\", at=(.18, 13.45)), \"metal\", T, T, smooth=True)\n pair(\"reactor_glow\", cylinder(.38, 1.66, 1.72, 14, axis=\"x\", at=(.18, 13.45)), \"glow_core\", T, T, outline=False)\n\n # Orbital cockpit prow module on J[\"cockpit\"]: clamshell hatch, panoramic visor canopy, HUD glow, rescue trim\n prow = loft([\n (12.15, chine_ring(1.12, .85, cy=-.95, keel_f=.22, keel_b=.04)),\n (12.85, chine_ring(1.42, 1.28, cy=-1.18, keel_f=.38, keel_b=.06)),\n (13.82, chine_ring(1.48, 1.42, cy=-1.26, keel_f=.44, keel_b=.06)),\n (14.68, chine_ring(1.18, 1.12, cy=-1.08, keel_f=.28, keel_b=.04)),\n (15.08, chine_ring(.82, .78, cy=-.88, keel_f=.16, keel_b=.04)),\n ])\n prow_lo, prow_hi = halves(prow, (0, -1.35, 13.55), (0, -.32, 1), gap=.035)\n solid(\"cockpit_prow_lo\", prow_lo, \"main\", C, bevel=.02)\n solid(\"cockpit_prow_hi\", prow_hi, \"accent\", C, bevel=.02)\n\n # Panoramic armored glass canopy & internal glowing HUD core on the cockpit prow\n canopy = loft([\n (13.42, chine_ring(1.06, .68, cy=-1.46, keel_f=.26, keel_b=.02)),\n (13.96, chine_ring(1.12, .74, cy=-1.50, keel_f=.30, keel_b=.02)),\n (14.52, chine_ring(.88, .58, cy=-1.32, keel_f=.20, keel_b=.02)),\n ])\n solid(\"cockpit_canopy\", canopy, \"visor\", C, bevel=.012, panels=False)\n solid(\"cockpit_hud_slit\", loft([\n (13.68, chine_ring(.92, .42, cy=-1.64, keel_f=.22, keel_b=.01)),\n (13.84, chine_ring(.94, .44, cy=-1.65, keel_f=.22, keel_b=.01)),\n ]), \"glow_core\", C, outline=False, panels=False)\n solid(\"cockpit_frame_trim\", loft([\n (13.32, chine_ring(1.18, .72, cy=-1.42, keel_f=.28, keel_b=.02)),\n (13.44, chine_ring(1.20, .74, cy=-1.44, keel_f=.28, keel_b=.02)),\n ]), \"trim\", C, bevel=.01, panels=False)\n\n # Twin forward-swept compressor intake nacelles flanking the cockpit prow\n nacelle = loft([\n (12.42, asym_ring(.24, .68, .78, .82, cx=1.08, cy=-.72, keel=.16, flare=.12)),\n (13.38, asym_ring(.32, .94, 1.06, .95, cx=1.22, cy=-.82, keel=.24, flare=.16)),\n (14.36, asym_ring(.34, 1.02, 1.12, .98, cx=1.28, cy=-.78, keel=.26, flare=.18)),\n (14.96, asym_ring(.26, .76, .84, .82, cx=1.12, cy=-.62, keel=.16, flare=.10)),\n ])\n pair_split(\"chest_nacelle\", nacelle, [\n ((1.35, -.8, 13.68), (.18, -.22, 1)),\n ((1.35, -.8, 14.32), (-.15, .18, 1)),\n ], (\"main\", \"accent\", \"main\"), T, T, gap=.035, bevel=.022)\n\n # Intake lip cowls and recessed dark compressor vanes\n pair(\"intake_lip\", loft([\n (13.52, [(0.82, -1.78), (1.68, -1.62), (1.76, -1.32), (0.86, -1.48)]),\n (14.42, [(0.86, -1.82), (1.74, -1.64), (1.82, -1.34), (0.90, -1.52)]),\n ]), \"trim\", T, T, bevel=.012, panels=False)\n pair(\"intake_vanes\", slats(.92, 1.64, 13.58, 14.34, -1.68, 5, depth=.14, gap=.32), \"frame\", T, T, panels=False)\n\n # High swept interceptor collar guards & sensor pods\n collar = loft([\n (14.72, [(0.54, -1.06), (1.52, -.92), (1.64, .58), (0.58, .74)]),\n (15.32, [(0.58, -.94), (1.44, -.78), (1.52, .48), (0.56, .66)]),\n (15.68, [(0.52, -.72), (1.16, -.54), (1.22, .32), (0.48, .52)]),\n ])\n pair_split(\"collar_shroud\", collar, [((1.0, 0, 15.22), (0, -.25, 1))], (\"main\", \"accent\"), T, T, gap=.03, bevel=.018)\n pair(\"collar_trim\", prism([(-.68, 15.34), (.28, 15.34), (.18, 15.68), (-.52, 15.68)], 1.12, 1.26, \"yz\"),\n \"trim\", T, T, bevel=.01, panels=False)\n\n # Dorsal carapace over the upper back\n back_shell = loft([\n (12.28, chine_ring(1.92, .72, cy=.98, keel_f=.04, keel_b=.22)),\n (13.65, chine_ring(2.78, .92, cy=1.08, keel_f=.04, keel_b=.28)),\n (14.95, chine_ring(2.42, .84, cy=1.02, keel_f=.04, keel_b=.24)),\n ])\n pair_split(\"back_carapace\", clip_half(back_shell), [((1.0, 1.1, 13.7), (.2, 0, 1))], (\"accent\", \"main\"), T, T, gap=.035, bevel=.02)\n\n\ndef clip_half(bm):\n \"\"\"Keep the left (+X > 0.04) half of a symmetric bmesh so pair_split can mirror it cleanly.\"\"\"\n _, left = halves(bm, (0.02, 0, 0), (-1, 0, 0), gap=0.04)\n return left\n\n\ndef build_head(J):\n N, H = J[\"neck\"], J[\"head\"]\n # Armored neck column with twin front throat pistons\n solid(\"neck_column\", cylinder(.34, 15.18, 16.02, 12), \"joint\", N, smooth=True)\n solid(\"neck_collar\", loft([\n (15.38, octo(.92, .88, .22)),\n (15.66, octo(.82, .78, .18)),\n ]), \"frame\", N, bevel=.015, panels=False)\n pair(\"neck_piston\", piston((.28, -.28, 15.22), (.24, -.24, 15.96), r=.065, n=8), \"metal\", N, N, smooth=True)\n\n # Raptor stealth prow helmet: sculpted multi-station chine hull with subdivisions on the crown\n helm = loft([\n (15.86, chine_ring(.88, 1.18, cy=-.06, keel_f=.26, keel_b=.14)),\n (16.24, chine_ring(1.16, 1.56, cy=-.12, keel_f=.38, keel_b=.22)),\n (16.64, chine_ring(1.24, 1.72, cy=-.08, keel_f=.42, keel_b=.28)),\n (17.02, chine_ring(.96, 1.48, cy=.06, keel_f=.28, keel_b=.32)),\n (17.28, chine_ring(.52, 1.08, cy=.18, keel_f=.14, keel_b=.24)),\n ])\n helm_lo, helm_hi = halves(helm, (0, -.2, 16.52), (0, -.18, 1), gap=.03)\n solid(\"head_jaw\", helm_lo, \"main\", H, bevel=.018)\n solid(\"head_cranium\", helm_hi, \"main\", H, bevel=.02)\n\n # Wrap-around compound dark optical visor & twin recessed cyan optical arrays (no Gundam face vents)\n visor = loft([\n (16.32, chine_ring(1.18, 1.12, cy=-.36, keel_f=.38, keel_b=.02)),\n (16.56, chine_ring(1.22, 1.16, cy=-.38, keel_f=.40, keel_b=.02)),\n ])\n solid(\"head_visor\", visor, \"visor\", H, bevel=.01, panels=False)\n eye_slit = loft([\n (16.41, [(0.06, -1.12), (0.48, -.92), (0.58, -.68), (0.44, -.62), (0.05, -.94)]),\n (16.48, [(0.06, -1.13), (0.50, -.93), (0.60, -.68), (0.46, -.62), (0.05, -.95)]),\n ])\n pair(\"head_eye\", eye_slit, \"glow_eye\", H, H, outline=False, panels=False)\n\n # Cheek sensor pods & optical rangefinder lenses\n pair(\"head_cheek\", loft([\n (16.02, asym_ring(.08, .26, .48, .58, cx=.56, cy=.04, keel=.10)),\n (16.68, asym_ring(.08, .30, .54, .66, cx=.60, cy=.08, keel=.12)),\n ]), \"accent\", H, H, bevel=.015)\n pair(\"head_ear_lens\", cylinder(.11, .84, .92, 12, axis=\"x\", at=(.02, 16.42)), \"sensor\", H, H, smooth=True)\n\n # Central dorsal reconnaissance sensor mast & twin swept rearward telemetry blades (not a forehead V-fin)\n mast = prism([\n (-.58, 16.92), (-.18, 17.48), (.68, 17.64), (.96, 17.36), (.64, 16.88),\n ], -.11, .11, \"yz\")\n solid(\"head_mast\", mast, \"accent\", H, bevel=.015, panels=False)\n solid(\"head_mast_sensor\", prism([\n (-.44, 17.08), (-.16, 17.42), (-.04, 17.42), (-.32, 17.08),\n ], -.08, .08, \"yz\"), \"glow_core\", H, outline=False, panels=False)\n\n ant = loft([\n (16.62, [(0.52, .18), (0.64, .18), (0.62, .58), (0.50, .58)]),\n (17.18, [(0.68, .52), (0.78, .52), (0.76, .92), (0.66, .92)]),\n (17.66, [(0.82, .96), (0.88, .96), (0.86, 1.24), (0.80, 1.24)]),\n ])\n pair(\"head_antenna\", ant, \"trim\", H, H, bevel=.008, panels=False)\n\n\ndef build_arms(J):\n S, UA, FA, HA, GR = lr(J, \"shoulder\"), lr(J, \"upperarm\"), lr(J, \"forearm\"), lr(J, \"hand\"), lr(J, \"grip\")\n\n # Shoulder internal trunnion drum & twin hydraulic elevation rams\n pair(\"shoulder_trunnion\", cylinder(.42, 1.48, 2.72, 14, axis=\"x\", at=(0, 14.58)), \"joint\", *S, smooth=True)\n pair(\"shoulder_block\", loft([\n (14.12, octo(.95, 1.12, .22, x=2.36)),\n (15.08, octo(1.05, 1.18, .24, x=2.36)),\n ]), \"frame\", *S, bevel=.02, panels=False)\n for k, y in ((\"f\", -.52), (\"b\", .52)):\n pair(f\"shoulder_ram_{k}\", piston((1.52, y, 13.68), (2.24, y * .85, 14.48), r=.095, n=8), \"metal\", *S, smooth=True)\n\n # Variable-geometry aero-chine pauldron carapace split into 3 interlocking plates\n pauldron = loft([\n (14.18, asym_ring(.42, 1.12, .92, 1.02, cx=2.42, cy=.04, keel=.18, flare=.16)),\n (14.88, asym_ring(.56, 1.58, 1.16, 1.28, cx=2.56, cy=.06, keel=.26, flare=.22)),\n (15.52, asym_ring(.48, 1.42, 1.02, 1.14, cx=2.48, cy=.08, keel=.24, flare=.18)),\n (15.96, asym_ring(.28, .82, .68, .82, cx=2.32, cy=.12, keel=.16, flare=.10)),\n ])\n pair_split(\"pauldron_shell\", pauldron, [\n ((2.6, 0, 15.05), (.35, -.15, 1)),\n ((2.6, .15, 14.95), (-.2, 1, .2)),\n ], (\"main\", \"accent\", \"main\"), *S, gap=.038, bevel=.022)\n\n # Swept outboard delta wing-blade & leading-edge RCS trim on the shoulder\n wing = loft([\n (14.32, [(3.32, -.68), (3.88, -.48), (4.12, .42), (3.42, .68)]),\n (15.28, [(3.56, -.82), (4.38, -.52), (4.62, .58), (3.64, .84)]),\n (16.12, [(3.24, -.42), (3.86, -.18), (4.08, .72), (3.32, .88)]),\n ])\n pair(\"pauldron_wing\", wing, \"accent\", *S, bevel=.02)\n pair(\"pauldron_wing_trim\", loft([\n (14.36, [(3.82, -.52), (4.06, -.42), (4.26, .38), (4.02, .42)]),\n (15.32, [(4.32, -.56), (4.54, -.46), (4.76, .54), (4.54, .58)]),\n ]), \"trim\", *S, bevel=.01, panels=False)\n pair(\"pauldron_under_thruster\", slats(3.2, 3.85, 14.35, 14.72, -.58, 3, depth=.1, gap=.35), \"frame\", *S, panels=False)\n\n # Upper arm swivel drum, chine bicep shells, and inner frame channel\n pair(\"upperarm_swivel\", cylinder(.42, 13.86, 14.34, 14, at=(2.48, 0)), \"joint\", *UA, smooth=True)\n pair(\"upperarm_core\", loft([\n (12.18, octo(.68, .74, .18, x=2.48)),\n (13.92, octo(.74, .80, .18, x=2.48)),\n ]), \"frame\", *UA, bevel=.02, panels=False)\n bicep = loft([\n (12.38, asym_ring(.38, .58, .54, .58, cx=2.50, cy=0, keel=.12)),\n (13.18, asym_ring(.44, .68, .62, .66, cx=2.52, cy=0, keel=.16)),\n (13.82, asym_ring(.42, .64, .58, .62, cx=2.50, cy=0, keel=.14)),\n ])\n pair_split(\"bicep_shell\", bicep, [((2.5, 0, 13.42), (0, 0, 1))], (\"main\", \"accent\"), *UA, gap=.03, bevel=.018)\n\n # Double-barrel elbow joint, hydraulic actuator, and sculpted forearm vambrace\n pair(\"elbow_drum\", cylinder(.44, 1.98, 2.98, 14, axis=\"x\", at=(0, 11.95)), \"joint\", *FA, smooth=True)\n pair(\"elbow_collar\", cylinder(.48, 2.82, 2.96, 14, axis=\"x\", at=(0, 11.95)), \"metal\", *FA, smooth=True)\n pair(\"elbow_piston\", piston((2.5, .58, 12.48), (2.5, .48, 11.12), r=.095, n=8), \"metal\", *FA, smooth=True)\n pair(\"forearm_core\", loft([\n (9.58, octo(.56, .66, .14, x=2.50)),\n (11.88, octo(.72, .84, .18, x=2.50)),\n ]), \"frame\", *FA, bevel=.018, panels=False)\n\n vambrace = loft([\n (9.66, asym_ring(.38, .58, .54, .62, cx=2.52, cy=0, keel=.12, flare=.10)),\n (10.68, asym_ring(.44, .76, .66, .78, cx=2.56, cy=.02, keel=.18, flare=.16)),\n (11.68, asym_ring(.46, .82, .70, .86, cx=2.58, cy=.06, keel=.20, flare=.18)),\n (12.24, asym_ring(.32, .58, .48, .72, cx=2.54, cy=.18, keel=.12, flare=.10)),\n ])\n pair_split(\"vambrace\", vambrace, [\n ((2.55, 0, 10.22), (0, -.15, 1)),\n ((2.55, 0, 11.28), (.45, .15, 1)),\n ], (\"accent\", \"main\", \"main\"), *FA, gap=.032, bevel=.02)\n\n # Outboard forearm twin-barrel pulse carbine & energy cell\n pod = loft([\n (9.82, [(3.12, -.48), (3.48, -.42), (3.54, .38), (3.16, .46)]),\n (11.48, [(3.18, -.54), (3.58, -.46), (3.64, .46), (3.22, .54)]),\n ])\n pair(\"forearm_carbine_pod\", pod, \"accent\", *FA, bevel=.016)\n pair(\"forearm_carbine_cell\", loft([\n (10.85, [(3.44, -.18), (3.66, -.16), (3.66, .36), (3.44, .38)]),\n (11.42, [(3.44, -.18), (3.66, -.16), (3.66, .36), (3.44, .38)]),\n ]), \"trim\", *FA, bevel=.01, panels=False)\n for dy in (-.22, .12):\n pair(f\"forearm_barrel_{dy:+.2f}\", cylinder(.075, 9.18, 9.88, 10, at=(3.34, dy)), \"metal\", *FA, smooth=True)\n pair(f\"forearm_muzzle_{dy:+.2f}\", cylinder(.048, 9.14, 9.19, 8, at=(3.34, dy)), \"glow_core\", *FA, outline=False)\n\n # Articulated gauntlet hand\n pair(\"wrist_ball\", cylinder(.28, 9.38, 9.72, 12, at=(2.5, 0)), \"joint\", *HA, smooth=True)\n pair(\"palm_block\", loft([(8.88, octo(.48, .78, .1, x=2.50)), (9.46, octo(.46, .76, .1, x=2.50))]),\n \"joint\", *HA, bevel=.018, panels=False)\n pair(\"hand_carapace\", loft([\n (8.92, [(2.66, -.40), (2.88, -.34), (2.88, .34), (2.66, .40)]),\n (9.52, [(2.64, -.42), (2.90, -.36), (2.90, .36), (2.64, .42)]),\n ]), \"main\", *HA, bevel=.015, panels=False)\n pair(\"fingers_block\", loft([(8.72, octo(.40, .78, .12, x=2.26)), (9.32, octo(.42, .78, .12, x=2.26))]),\n \"frame\", *HA, bevel=.02, panels=False)\n pair(\"thumb_block\", loft([(8.98, octo(.24, .24, .06, x=2.32, y=-.48)), (9.38, octo(.26, .26, .06, x=2.36, y=-.44))]),\n \"frame\", *HA, bevel=.018, panels=False)\n\n # Signature Long-Barrel Orbital Rail-Rifle mounted on the right hand (HA[1]) along the forearm axis\n build_orbital_rifle(HA[1])\n\n\ndef build_orbital_rifle(hand_r):\n \"\"\"A sleek 6.8 m twin-rail orbital rifle held in the right hand, aligned with the forearm so\n flight, guard, and stand poses carry it naturally.\"\"\"\n x = -2.38\n # Main receiver body\n rec = loft([\n (5.65, chine_ring(.34, .82, cx=x, cy=-.18, keel_f=.14, keel_b=.08)),\n (8.45, chine_ring(.42, .96, cx=x, cy=-.16, keel_f=.18, keel_b=.10)),\n (9.85, chine_ring(.38, .88, cx=x, cy=-.08, keel_f=.14, keel_b=.12)),\n (10.65, chine_ring(.28, .66, cx=x, cy=.04, keel_f=.08, keel_b=.10)),\n ])\n rec_lo, rec_hi = halves(rec, (x, -.18, 7.2), (0, -.15, 1), gap=.03)\n solid(\"rifle_shroud_lo\", rec_lo, \"accent\", hand_r, bevel=.016)\n solid(\"rifle_shroud_hi\", rec_hi, \"main\", hand_r, bevel=.016)\n\n # Twin long electromagnetic accelerator rails & glowing plasma core channel\n for dy in (-.44, -.12):\n solid(f\"rifle_rail_{dy:+.2f}\", loft([\n (3.45, octo(.12, .18, .03, x=x, y=dy)),\n (5.75, octo(.16, .22, .04, x=x, y=dy)),\n ]), \"metal\", hand_r, bevel=.01, panels=False)\n solid(\"rifle_core_strip\", loft([\n (3.85, octo(.07, .12, .01, x=x, y=-.28)),\n (8.25, octo(.09, .14, .01, x=x, y=-.28)),\n ]), \"glow_core\", hand_r, outline=False, panels=False)\n solid(\"rifle_sensor_scope\", loft([\n (6.85, octo(.18, .28, .04, x=x, y=-.68)),\n (8.35, octo(.20, .32, .04, x=x, y=-.68)),\n ]), \"trim\", hand_r, bevel=.01, panels=False)\n solid(\"rifle_scope_lens\", cylinder(.065, 6.78, 6.86, 10, at=(x, -.68)), \"sensor\", hand_r, smooth=True)\n\n\ndef build_legs(J):\n TH, SH, FT = lr(J, \"thigh\"), lr(J, \"shin\"), lr(J, \"foot\")\n\n # Thigh structural core, hip ball, and front/rear hydraulic cylinders\n pair(\"hip_ball_joint\", cylinder(.48, .58, 1.58, 14, axis=\"x\", at=(0, 10.52)), \"joint\", *TH, smooth=True)\n pair(\"thigh_core\", loft([\n (6.58, octo(.78, .92, .20, x=1.18)),\n (8.85, octo(1.18, 1.34, .28, x=1.18)),\n (10.22, octo(1.06, 1.22, .26, x=1.16)),\n ]), \"frame\", *TH, bevel=.025, panels=False)\n pair(\"thigh_ram_f\", piston((.88, -.68, 10.32), (.96, -.64, 8.85), r=.10, n=8), \"metal\", *TH, smooth=True)\n pair(\"thigh_ram_b\", piston((1.18, .72, 10.38), (1.18, .68, 7.65), r=.12, n=8), \"joint\", *TH, smooth=True)\n\n # Sculpted aero-chine thigh carapace physically split into 3 interlocking plates\n thigh_shell = loft([\n (6.82, asym_ring(.52, .68, .74, .76, cx=1.20, cy=-.04, keel=.18, flare=.10)),\n (8.15, asym_ring(.66, .92, .92, .94, cx=1.22, cy=-.06, keel=.24, flare=.18)),\n (9.35, asym_ring(.68, .98, .96, .98, cx=1.22, cy=-.04, keel=.24, flare=.20)),\n (10.05, asym_ring(.54, .78, .78, .82, cx=1.18, cy=0, keel=.16, flare=.12)),\n ])\n pair_split(\"thigh_shell\", thigh_shell, [\n ((1.2, 0, 8.45), (.32, -.18, 1)),\n ((1.55, 0, 8.5), (1, .12, -.15)),\n ], (\"main\", \"main\", \"accent\"), *TH, gap=.036, bevel=.022)\n pair(\"thigh_louver_trim\", loft([\n (7.55, [(1.88, -.32), (2.06, -.28), (2.08, .28), (1.90, .32)]),\n (9.15, [(1.98, -.36), (2.18, -.32), (2.20, .32), (2.00, .36)]),\n ]), \"trim\", *TH, bevel=.01, panels=False)\n\n # Double-jointed knee drum, outboard sensor disc, and keeled knee-guard prow\n pair(\"knee_drum\", cylinder(.50, .66, 1.76, 14, axis=\"x\", at=(0, 6.10)), \"joint\", *SH, smooth=True)\n pair(\"knee_disc\", cylinder(.46, 1.76, 1.96, 16, axis=\"x\", at=(.08, 6.14)), \"accent\", *SH, smooth=True)\n pair(\"knee_ring\", cylinder(.34, 1.94, 2.02, 16, axis=\"x\", at=(.08, 6.14)), \"metal\", *SH, smooth=True)\n pair(\"knee_sensor\", cylinder(.22, 2.00, 2.06, 14, axis=\"x\", at=(.08, 6.14)), \"sensor\", *SH, smooth=True)\n\n kneecap = loft([\n (5.32, chine_ring(.82, .72, cx=1.20, cy=-.72, keel_f=.22, keel_b=.02)),\n (6.18, chine_ring(1.06, .96, cx=1.20, cy=-.86, keel_f=.34, keel_b=.04)),\n (6.88, chine_ring(.88, .82, cx=1.20, cy=-.78, keel_f=.28, keel_b=.04)),\n (7.32, chine_ring(.48, .54, cx=1.20, cy=-.62, keel_f=.16, keel_b=.02)),\n ])\n k_lo, k_hi = halves(kneecap, (1.2, -.85, 6.32), (0, -.25, 1), gap=.03)\n pair(\"kneecap_lo\", k_lo, \"main\", *SH, bevel=.02)\n pair(\"kneecap_hi\", k_hi, \"accent\", *SH, bevel=.02)\n pair(\"kneecap_spike\", prism([(-1.22, 5.95), (-1.02, 5.95), (-.88, 7.18), (-1.12, 7.05)], 1.12, 1.28, \"yz\"),\n \"trim\", *SH, bevel=.01, panels=False)\n\n # Shin core, knee & Achilles hydraulic rams, and sculpted aero-chine greave shells\n pair(\"shin_core\", loft([\n (1.72, octo(.82, .96, .20, x=1.20, y=.08)),\n (5.76, octo(.96, 1.12, .24, x=1.20)),\n ]), \"frame\", *SH, bevel=.025, panels=False)\n pair(\"knee_piston\", piston((1.20, .68, 7.22), (1.20, .78, 5.38), r=.105, n=8), \"metal\", *SH, smooth=True)\n pair(\"achilles_piston\", piston((1.20, .74, 2.62), (1.20, .88, 1.72), r=.085, n=8), \"metal\", *SH, smooth=True)\n\n greave = loft([\n (1.88, asym_ring(.56, .74, .78, .86, cx=1.20, cy=.04, keel=.20, flare=.12)),\n (2.85, asym_ring(.68, .96, .92, 1.12, cx=1.22, cy=.08, keel=.26, flare=.18)),\n (4.18, asym_ring(.74, 1.12, .96, 1.38, cx=1.24, cy=.18, keel=.28, flare=.22)),\n (5.42, asym_ring(.58, .82, .78, 1.02, cx=1.20, cy=.08, keel=.18, flare=.12)),\n ])\n pair_split(\"greave_shell\", greave, [\n ((1.2, 0, 3.35), (.28, -.22, 1)),\n ((1.2, .25, 3.8), (-.15, 1, .18)),\n ], (\"accent\", \"main\", \"main\"), *SH, gap=.038, bevel=.022)\n\n # Rear calf vector-thruster nacelle & twin calf nozzles (fires the game's calf plumes!)\n calf_pod = loft([\n (3.45, chine_ring(.92, .76, cx=1.20, cy=1.18, keel_f=.04, keel_b=.24)),\n (4.52, chine_ring(1.12, .98, cx=1.20, cy=1.34, keel_f=.04, keel_b=.32)),\n (5.28, chine_ring(.84, .72, cx=1.20, cy=1.12, keel_f=.04, keel_b=.18)),\n ])\n pair(\"calf_thruster_pod\", calf_pod, \"accent\", *SH, bevel=.02)\n pair(\"calf_thruster_trim\", prism([(1.12, 3.65), (1.72, 3.92), (1.66, 4.98), (1.12, 4.98)], 1.12, 1.28, \"yz\"),\n \"trim\", *SH, bevel=.01, panels=False)\n pair(\"calf_vents\", slats(.92, 1.48, 2.28, 3.12, 1.04, 4, depth=.1, gap=.32), \"frame\", *SH, panels=False)\n nozzle_pair(\"calf\", (1.20, 1.42, 4.18), (0, .52, -.85), .32, .54, *SH, housing=False)\n\n # Articulated ankle ball, shock absorbers, ankle spat, and raptor talon sabaton\n pair(\"ankle_ball\", cylinder(.42, .74, 1.66, 14, axis=\"x\", at=(.10, 1.55)), \"joint\", *FT, smooth=True)\n pair(\"ankle_collar\", cylinder(.46, 1.52, 1.68, 14, axis=\"x\", at=(.10, 1.55)), \"metal\", *FT, smooth=True)\n\n spat = loft([\n (1.02, chine_ring(.98, .72, cx=1.20, cy=-.62, keel_f=.22, keel_b=.04)),\n (1.78, chine_ring(1.08, .82, cx=1.20, cy=-.68, keel_f=.28, keel_b=.04)),\n (2.26, chine_ring(.68, .56, cx=1.20, cy=-.56, keel_f=.18, keel_b=.02)),\n ])\n pair(\"ankle_spat\", spat, \"main\", *FT, bevel=.02)\n pair(\"ankle_spat_trim\", prism([(-.96, 1.18), (-.68, 1.18), (-.58, 2.12), (-.88, 2.02)], 1.12, 1.28, \"yz\"),\n \"trim\", *FT, bevel=.01, panels=False)\n\n # Forward high-arch talon sabaton (split into instep carapace and armored toe claw)\n sabaton = loft([\n (0.12, chine_ring(1.22, 2.42, cx=1.20, cy=-1.02, keel_f=.34, keel_b=.08)),\n (0.58, chine_ring(1.16, 2.28, cx=1.20, cy=-.96, keel_f=.30, keel_b=.08)),\n (1.08, chine_ring(.88, 1.42, cx=1.20, cy=-.48, keel_f=.20, keel_b=.06)),\n ])\n sab_toe, sab_instep = halves(sabaton, (1.20, -1.42, 0.5), (0, 1, .18), gap=.035)\n pair(\"sabaton_instep\", sab_instep, \"main\", *FT, bevel=.022)\n pair(\"sabaton_toe\", sab_toe, \"accent\", *FT, bevel=.022)\n pair(\"sabaton_toe_claw\", loft([\n (0.08, chine_ring(.68, .78, cx=1.20, cy=-2.08, keel_f=.28, keel_b=.02)),\n (0.52, chine_ring(.56, .66, cx=1.20, cy=-1.98, keel_f=.24, keel_b=.02)),\n ]), \"trim\", *FT, bevel=.016, panels=False)\n\n # Rear heel stabilizer claw & dark landing sole pads\n heel = loft([\n (0.10, chine_ring(1.08, 1.12, cx=1.20, cy=1.08, keel_f=.04, keel_b=.24)),\n (0.68, chine_ring(.96, .98, cx=1.20, cy=1.02, keel_f=.04, keel_b=.20)),\n (1.06, chine_ring(.72, .72, cx=1.20, cy=.82, keel_f=.04, keel_b=.12)),\n ])\n pair(\"sabaton_heel\", heel, \"accent\", *FT, bevel=.02)\n pair(\"sole_front\", loft([\n (0.0, octo(1.14, 1.56, .22, x=1.20, y=-1.38)),\n (0.12, octo(1.18, 1.62, .22, x=1.20, y=-1.38)),\n ]), \"joint\", *FT, bevel=.015, panels=False)\n pair(\"sole_heel\", loft([\n (0.0, octo(1.04, 1.06, .20, x=1.20, y=1.06)),\n (0.12, octo(1.08, 1.10, .20, x=1.20, y=1.06)),\n ]), \"joint\", *FT, bevel=.015, panels=False)\n\n\ndef build_backpack(J):\n B = J[\"backpack\"]\n # Sculpted dorsal orbital thrust pack with central Tokamak core and twin propellant tanks\n pack = loft([\n (12.35, chine_ring(1.88, 1.18, cy=1.68, keel_f=.04, keel_b=.24)),\n (13.35, chine_ring(2.26, 1.48, cy=1.84, keel_f=.04, keel_b=.34)),\n (14.42, chine_ring(2.18, 1.42, cy=1.82, keel_f=.04, keel_b=.32)),\n (15.08, chine_ring(1.52, 1.02, cy=1.58, keel_f=.04, keel_b=.20)),\n ])\n pack_lo, pack_hi = halves(pack, (0, 1.8, 13.88), (0, .22, 1), gap=.035)\n solid(\"pack_hull_lo\", pack_lo, \"main\", B, bevel=.022)\n solid(\"pack_hull_hi\", pack_hi, \"accent\", B, bevel=.022)\n solid(\"pack_spine_fin\", prism([\n (1.62, 12.68), (2.78, 13.18), (2.92, 14.62), (2.12, 15.12), (1.58, 14.88),\n ], -.12, .12, \"yz\"), \"trim\", B, bevel=.012, panels=False)\n\n # Central dorsal fusion turbine & glowing core ring\n solid(\"pack_turbine\", loft([(2.15, circle(.78, 16, 0, 13.85)), (2.98, circle(.48, 16, 0, 13.85))], axis=\"y\"),\n \"frame\", B, smooth=True)\n solid(\"pack_turbine_collar\", loft([(2.28, circle(.86, 16, 0, 13.85)), (2.52, circle(.86, 16, 0, 13.85))], axis=\"y\"),\n \"metal\", B, smooth=True)\n solid(\"pack_turbine_glow\", loft([(2.94, circle(.28, 14, 0, 13.85)), (3.02, circle(.28, 14, 0, 13.85))], axis=\"y\"),\n \"glow_core\", B, outline=False)\n\n # Twin lateral cryo-propellant tanks\n pair(\"pack_tank\", cylinder(.34, 12.18, 14.48, 14, at=(.96, 1.92)), \"metal\", B, B, smooth=True)\n pair(\"pack_tank_band\", cylinder(.37, 13.15, 13.45, 14, at=(.96, 1.92)), \"trim\", B, B, smooth=True)\n\n # Twin heavy gimballed main thruster bells + armored thrust-vectoring shrouds\n pair(\"main_shroud\", loft([\n (12.08, asym_ring(.28, .46, .48, .56, cx=.56, cy=2.08, keel=.12)),\n (12.78, asym_ring(.36, .58, .58, .66, cx=.56, cy=2.02, keel=.14)),\n ]), \"accent\", B, B, bevel=.018)\n nozzle_pair(\"main\", (.56, 2.08, 12.52), (0, .46, -.89), .46, .88, B, B)\n\n # Twin variable-sweep aero-binders on J[\"binder\", \"L/R\"] with wing blades, capacitor fins, and binder bells\n for s, sx in ((\"L\", 1), (\"R\", -1)):\n j = J[\"binder\", s]\n pivot = Vector((.9 * sx, 2.25, 14.7))\n m = Matrix.Translation(pivot) @ rot(\"Y\", 34 * sx) @ rot(\"X\", -26)\n solid(f\"binder_hinge.{s}\", cylinder(.24, pivot.x - .28, pivot.x + .28, 14, axis=\"x\", at=(pivot.y, pivot.z)),\n \"joint\", j, smooth=True)\n solid(f\"binder_collar.{s}\", cylinder(.28, pivot.x - .12, pivot.x + .12, 14, axis=\"x\", at=(pivot.y, pivot.z)),\n \"metal\", j, smooth=True)\n\n # Structural binder boom & thruster nacelle\n boom = loft([\n (-.88, octo(.36, .54, .08)),\n (0.45, octo(.44, .68, .10)),\n (2.15, octo(.28, .46, .06)),\n ])\n solid(f\"binder_boom.{s}\", transform(boom, m), \"frame\", j, bevel=.016, panels=False)\n\n # Swept forward-and-upward aero-wing split into main and accent blades with gold dogtooth trim\n wing_lo = prism([(-.72, -.78), (.52, -.62), (.68, 1.18), (-.46, 0.92)], .08 * sx - .09, .08 * sx + .09, \"yz\")\n wing_hi = prism([(-.44, 0.98), (.66, 1.24), (.38, 2.95), (-.22, 3.18), (-.58, 2.15)], .08 * sx - .08, .08 * sx + .08, \"yz\")\n trim_le = prism([(.48, -.58), (.66, -.52), (.82, 1.22), (.52, 2.92), (.36, 2.92), (.66, 1.20)], .08 * sx - .05, .08 * sx + .05, \"yz\")\n glow_fin = prism([(-.54, 1.15), (-.38, 1.15), (-.18, 2.65), (-.34, 2.65)], .08 * sx - .04, .08 * sx + .04, \"yz\")\n solid(f\"binder_wing_lo.{s}\", transform(wing_lo, m), \"main\", j, bevel=.018)\n solid(f\"binder_wing_hi.{s}\", transform(wing_hi, m), \"accent\", j, bevel=.018)\n solid(f\"binder_wing_trim.{s}\", transform(trim_le, m), \"trim\", j, bevel=.008, panels=False)\n solid(f\"binder_capacitor.{s}\", transform(glow_fin, m), \"glow_core\", j, outline=False, panels=False)\n\n # Under-slung binder vector nozzle (fires the game's binder plumes!)\n bell, glow = nozzle(.34, .62)\n down = m.to_3x3() @ Vector((0, 0, -1))\n at = m @ Vector((0, 0, -.82))\n solid(f\"binder_nozzle.{s}\", place(bell, at, down), \"frame\", j, smooth=True)\n solid(f\"binder_nozzle.{s}.glow\", place(glow, at, down), \"glow_thruster\", j, outline=False)\n empty(f\"nozzle.binder.{s}\", at + down * .62, j, dir=gltf_dir(down), radius=.34)\n\n\ndef build_kestrel():\n J = striker_joints()\n J[\"frame\"][\"frame\"] = \"block_dummy\"\n J[\"frame\"][\"height\"] = 17.6\n build_pelvis(J)\n build_waist(J)\n build_torso(J)\n build_head(J)\n J[\"neck\"].location.z -= .22 # seat the raptor sensor prow low between the high collar shrouds\n build_arms(J)\n build_legs(J)\n build_backpack(J)\n return J[\"frame\"]\n\n\ndef build(Blocks):\n return build_kestrel()\n","Overwrite":true,"Path":"~/work/sortie/kit/blocks/dummy.py"}
input
{ "Content": "\"\"\"YF-09 Kestrel: high-agility orbital interceptor built on the shared 17.6 m 22-joint striker rig.\n\nReplaces the placeholder box mannequin in block_dummy with a full hard-surface design at and beyond\nthe control striker's refinement level:\n - Multi-station 3D aero-chine cross-section lofts (crowned dorsal/ventral keels + angled stealth\n chines) rather than flat 2D orthographic two_view block intersections.\n - Real 3D geometric panel seams cut with bmesh bisect planes (4 cm physical gaps over a dark\n mechanical under-frame) plus recessed border insets, rather than random BSP normal tilt.\n - Panoramic orbital cockpit capsule on the `cockpit` joint with tinted visor glass, internal HUD\n core glow, ejection frame trim, and flanking compressor intake nacelles.\n - Articulated spinal waist with twin hydraulic rams, split chevron skirts, aero-chine pauldrons\n with outboard delta vernier wings, forearm rail-carbines, a long-barrel orbital beam rifle on\n `grip.R`, sculpted chine legs with knee sensors and rear calf thruster pods, talon sabatons, and\n a twin-boom vector backpack with variable-sweep wing binders and full main/binder/calf nozzles.\n\"\"\"\nimport math\n\nimport bmesh\nfrom mathutils import Matrix, Vector\n\nfrom lib import (\n circle, cylinder, empty, halves, loft, merge, mirror_x, nozzle, octo,\n panels, piston, prism, rot, slats, solid, subd, transform,\n)\nfrom mech import gltf_dir, joints as striker_joints, lr, nozzle_pair, pair, place\n\n\ndef chine_ring(w, d, cx=0.0, cy=0.0, keel_f=0.18, keel_b=0.14, crown=0.12, pinch=0.72):\n \"\"\"A 12-point aero-chine cross-section (CCW seen from above): a sharp forward keel at -Y, angled\n stealth chines, flared side cheeks, and a crowned rear spine at +Y.\"\"\"\n hw, hd = w * 0.5, d * 0.5\n return [\n (cx, cy - hd - keel_f),\n (cx + hw * 0.46, cy - hd),\n (cx + hw * 0.88, cy - hd * 0.52),\n (cx + hw, cy - hd * 0.08),\n (cx + hw * 0.92, cy + hd * 0.48),\n (cx + hw * pinch, cy + hd * (1.0 - crown)),\n (cx, cy + hd + keel_b),\n (cx - hw * pinch, cy + hd * (1.0 - crown)),\n (cx - hw * 0.92, cy + hd * 0.48),\n (cx - hw, cy - hd * 0.08),\n (cx - hw * 0.88, cy - hd * 0.52),\n (cx - hw * 0.46, cy - hd),\n ]\n\n\ndef asym_ring(w_in, w_out, d_f, d_b, cx=0.0, cy=0.0, keel=0.14, flare=0.12):\n \"\"\"A 10-point asymmetric limb/pauldron chine section on the left (+X) side: narrower inboard\n (-X from cx), flared and keeled outboard (+X from cx).\"\"\"\n return [\n (cx, cy - d_f - keel),\n (cx + w_out * 0.55, cy - d_f),\n (cx + w_out, cy - d_f * 0.25),\n (cx + w_out * (1.0 + flare), cy + d_b * 0.22),\n (cx + w_out * 0.62, cy + d_b),\n (cx, cy + d_b + keel * 0.7),\n (cx - w_in * 0.65, cy + d_b * 0.88),\n (cx - w_in, cy + d_b * 0.2),\n (cx - w_in, cy - d_f * 0.35),\n (cx - w_in * 0.58, cy - d_f * 0.92),\n ]\n\n\ndef pair_split(name, bm, cuts, roles, jl, jr, gap=0.035, bevel=0.018, panels_on=True):\n \"\"\"Split a left-side bmesh by 3D seam planes [(co, no), ...] into real separated armor plates\n with physical gaps, assigning roles cyclically or by list.\"\"\"\n pieces = panels(bm, cuts, gap=gap)\n for i, p in enumerate(pieces):\n r = roles[i % len(roles)] if isinstance(roles, (list, tuple)) else roles\n pair(f\"{name}_{i}\", p, r, jl, jr, bevel=bevel, panels=panels_on and r in (\"main\", \"accent\"))\n\n\ndef build_pelvis(J):\n P = J[\"pelvis\"]\n # Deep mechanical hip cradle with exposed lateral trunnion drums and hydraulic cylinders\n solid(\"pelvis_core\", loft([\n (9.75, octo(1.05, 1.25, .24)),\n (10.25, octo(2.15, 1.55, .36)),\n (10.95, octo(2.05, 1.5, .34)),\n ]), \"frame\", P, bevel=.025, panels=False)\n pair(\"hip_trunnion\", cylinder(.42, .45, 1.78, 14, axis=\"x\", at=(0, 10.48)), \"joint\", P, P, smooth=True)\n pair(\"hip_collar\", cylinder(.48, 1.42, 1.62, 14, axis=\"x\", at=(0, 10.48)), \"metal\", P, P, smooth=True)\n\n # Sculpted aero-chine belt girdle\n belt = loft([\n (10.52, chine_ring(2.95, 1.88, keel_f=.22, keel_b=.16)),\n (10.82, chine_ring(2.65, 1.76, keel_f=.26, keel_b=.14)),\n (11.04, chine_ring(2.15, 1.58, keel_f=.18, keel_b=.12)),\n ])\n solid(\"belt_girdle\", belt, \"main\", P, bevel=.02)\n\n # Forward sensor & vernier codpiece prow\n cod = loft([\n (9.42, chine_ring(.46, .72, cy=-.62, keel_f=.16, keel_b=.04)),\n (9.95, chine_ring(.72, 1.02, cy=-.68, keel_f=.28, keel_b=.06)),\n (10.58, chine_ring(.68, .96, cy=-.64, keel_f=.22, keel_b=.06)),\n (10.98, chine_ring(.52, .78, cy=-.58, keel_f=.14, keel_b=.04)),\n ])\n cod_lo, cod_hi = halves(cod, (0, -.8, 10.18), (0, -.25, 1), gap=.03)\n solid(\"codpiece_lo\", cod_lo, \"accent\", P, bevel=.018)\n solid(\"codpiece_hi\", cod_hi, \"main\", P, bevel=.018)\n solid(\"codpiece_crest\", prism([(-.12, 9.58), (.12, 9.58), (.08, 10.88), (-.08, 10.88)], -1.16, -.92, \"xz\"),\n \"trim\", P, bevel=.012, panels=False)\n\n # Swept two-piece chevron front flight skirts with physical seam channel\n sf = loft([\n (9.38, [(0.42, -1.22), (1.15, -1.14), (1.72, -.88), (1.62, -.72), (0.38, -.98)]),\n (10.05, [(0.38, -1.28), (1.28, -1.18), (1.96, -.84), (1.84, -.66), (0.34, -1.02)]),\n (10.68, [(0.36, -1.16), (1.22, -1.08), (1.82, -.78), (1.72, -.60), (0.32, -.94)]),\n ])\n pair_split(\"skirt_front\", sf, [((1.12, -1.0, 10.0), (.85, -.15, .48))], (\"main\", \"accent\"), P, P, gap=.035, bevel=.02)\n pair(\"skirt_front_lip\", loft([\n (9.26, [(0.48, -1.20), (1.58, -.92), (1.50, -.78), (0.44, -1.04)]),\n (9.44, [(0.44, -1.24), (1.66, -.90), (1.58, -.76), (0.40, -1.06)]),\n ]), \"trim\", P, P, bevel=.012, panels=False)\n\n # Side hip vernier fairings\n ss = loft([\n (9.35, asym_ring(.18, .42, .82, .92, cx=2.02, cy=.06, keel=.12)),\n (10.12, asym_ring(.22, .52, .96, 1.08, cx=2.08, cy=.04, keel=.16)),\n (10.74, asym_ring(.20, .38, .84, .94, cx=1.96, cy=.04, keel=.12)),\n ])\n pair_split(\"skirt_side\", ss, [((2.1, 0, 10.32), (0, .1, 1))], (\"main\", \"accent\"), P, P, gap=.03, bevel=.02)\n pair(\"skirt_side_vane\", prism([(-.68, 9.52), (.74, 9.52), (.66, 10.22), (-.60, 10.22)], 2.28, 2.42, \"yz\"),\n \"trim\", P, P, bevel=.01, panels=False)\n\n # Two-stage rear vernier tail skirts\n sr = loft([\n (9.22, [(0.18, .88), (0.88, 1.24), (1.56, 1.02), (1.48, .76), (0.16, .68)]),\n (9.98, [(0.16, .96), (0.96, 1.38), (1.72, 1.12), (1.60, .82), (0.14, .74)]),\n (10.68, [(0.16, .88), (0.88, 1.22), (1.52, .98), (1.42, .74), (0.14, .68)]),\n ])\n pair_split(\"skirt_rear\", sr, [((0.9, 1.1, 9.95), (.25, -.1, 1))], (\"accent\", \"main\"), P, P, gap=.035, bevel=.02)\n\n\ndef build_waist(J):\n W = J[\"waist\"]\n # Central spinal column with three articulated titanium rings and twin exposed hydraulic rams\n solid(\"spine_core\", cylinder(.52, 10.88, 12.05, 14), \"joint\", W, smooth=True)\n for i, z in enumerate((11.08, 11.44, 11.80)):\n solid(f\"spine_ring_{i}\", loft([\n (z - .11, chine_ring(1.56 + i * .1, 1.36 + i * .08, keel_f=.14, keel_b=.12)),\n (z + .11, chine_ring(1.62 + i * .1, 1.40 + i * .08, keel_f=.16, keel_b=.12)),\n ]), \"frame\", W, bevel=.018, panels=False)\n\n # Forward tiered cockpit-rib abdominal plates\n for i, (z0, z1, w, y) in enumerate(((10.98, 11.32, 1.18, -.78), (11.30, 11.64, 1.32, -.84), (11.62, 11.98, 1.48, -.90))):\n ab = loft([\n (z0, chine_ring(w, .56, cy=y, keel_f=.18, keel_b=.02)),\n (z1, chine_ring(w + .1, .62, cy=y - .03, keel_f=.22, keel_b=.02)),\n ])\n solid(f\"abs_plate_{i}\", ab, \"main\" if i == 2 else \"frame\", W, bevel=.015, panels=False)\n\n # Twin lateral hydraulic waist actuators (chrome cylinder + dark housing)\n pair(\"waist_piston\", piston((.78, -.18, 10.92), (.88, -.22, 11.98), r=.12, n=10), \"metal\", W, W, smooth=True)\n pair(\"waist_piston_b\", piston((.72, .48, 10.94), (.82, .52, 11.96), r=.11, n=10), \"joint\", W, W, smooth=True)\n\n\ndef build_torso(J):\n T, C = J[\"torso\"], J[\"cockpit\"]\n # Structural dark torso frame and exposed lateral Tokamak reactor drums\n solid(\"torso_core\", loft([\n (11.88, octo(1.85, 1.52, .36)),\n (12.65, octo(2.65, 2.02, .48)),\n (13.95, octo(3.05, 2.28, .54)),\n (14.95, octo(2.75, 2.05, .48)),\n (15.36, octo(1.75, 1.45, .36)),\n ]), \"frame\", T, bevel=.025, panels=False)\n pair(\"reactor_drum\", cylinder(.58, 1.15, 1.68, 16, axis=\"x\", at=(.18, 13.45)), \"joint\", T, T, smooth=True)\n pair(\"reactor_coil\", cylinder(.62, 1.32, 1.52, 16, axis=\"x\", at=(.18, 13.45)), \"metal\", T, T, smooth=True)\n pair(\"reactor_glow\", cylinder(.38, 1.66, 1.72, 14, axis=\"x\", at=(.18, 13.45)), \"glow_core\", T, T, outline=False)\n\n # Orbital cockpit prow module on J[\"cockpit\"]: clamshell hatch, panoramic visor canopy, HUD glow, rescue trim\n prow = loft([\n (12.15, chine_ring(1.12, .85, cy=-.95, keel_f=.22, keel_b=.04)),\n (12.85, chine_ring(1.42, 1.28, cy=-1.18, keel_f=.38, keel_b=.06)),\n (13.82, chine_ring(1.48, 1.42, cy=-1.26, keel_f=.44, keel_b=.06)),\n (14.68, chine_ring(1.18, 1.12, cy=-1.08, keel_f=.28, keel_b=.04)),\n (15.08, chine_ring(.82, .78, cy=-.88, keel_f=.16, keel_b=.04)),\n ])\n prow_lo, prow_hi = halves(prow, (0, -1.35, 13.55), (0, -.32, 1), gap=.035)\n solid(\"cockpit_prow_lo\", prow_lo, \"main\", C, bevel=.02)\n solid(\"cockpit_prow_hi\", prow_hi, \"accent\", C, bevel=.02)\n\n # Panoramic armored glass canopy & internal glowing HUD core on the cockpit prow\n canopy = loft([\n (13.42, chine_ring(1.06, .68, cy=-1.46, keel_f=.26, keel_b=.02)),\n (13.96, chine_ring(1.12, .74, cy=-1.50, keel_f=.30, keel_b=.02)),\n (14.52, chine_ring(.88, .58, cy=-1.32, keel_f=.20, keel_b=.02)),\n ])\n solid(\"cockpit_canopy\", canopy, \"visor\", C, bevel=.012, panels=False)\n solid(\"cockpit_hud_slit\", loft([\n (13.68, chine_ring(.92, .42, cy=-1.64, keel_f=.22, keel_b=.01)),\n (13.84, chine_ring(.94, .44, cy=-1.65, keel_f=.22, keel_b=.01)),\n ]), \"glow_core\", C, outline=False, panels=False)\n solid(\"cockpit_frame_trim\", loft([\n (13.32, chine_ring(1.18, .72, cy=-1.42, keel_f=.28, keel_b=.02)),\n (13.44, chine_ring(1.20, .74, cy=-1.44, keel_f=.28, keel_b=.02)),\n ]), \"trim\", C, bevel=.01, panels=False)\n\n # Twin forward-swept compressor intake nacelles flanking the cockpit prow\n nacelle = loft([\n (12.42, asym_ring(.24, .68, .78, .82, cx=1.08, cy=-.72, keel=.16, flare=.12)),\n (13.38, asym_ring(.32, .94, 1.06, .95, cx=1.22, cy=-.82, keel=.24, flare=.16)),\n (14.36, asym_ring(.34, 1.02, 1.12, .98, cx=1.28, cy=-.78, keel=.26, flare=.18)),\n (14.96, asym_ring(.26, .76, .84, .82, cx=1.12, cy=-.62, keel=.16, flare=.10)),\n ])\n pair_split(\"chest_nacelle\", nacelle, [\n ((1.35, -.8, 13.68), (.18, -.22, 1)),\n ((1.35, -.8, 14.32), (-.15, .18, 1)),\n ], (\"main\", \"accent\", \"main\"), T, T, gap=.035, bevel=.022)\n\n # Intake lip cowls and recessed dark compressor vanes\n pair(\"intake_lip\", loft([\n (13.52, [(0.82, -1.78), (1.68, -1.62), (1.76, -1.32), (0.86, -1.48)]),\n (14.42, [(0.86, -1.82), (1.74, -1.64), (1.82, -1.34), (0.90, -1.52)]),\n ]), \"trim\", T, T, bevel=.012, panels=False)\n pair(\"intake_vanes\", slats(.92, 1.64, 13.58, 14.34, -1.68, 5, depth=.14, gap=.32), \"frame\", T, T, panels=False)\n\n # High swept interceptor collar guards & sensor pods\n collar = loft([\n (14.72, [(0.54, -1.06), (1.52, -.92), (1.64, .58), (0.58, .74)]),\n (15.32, [(0.58, -.94), (1.44, -.78), (1.52, .48), (0.56, .66)]),\n (15.68, [(0.52, -.72), (1.16, -.54), (1.22, .32), (0.48, .52)]),\n ])\n pair_split(\"collar_shroud\", collar, [((1.0, 0, 15.22), (0, -.25, 1))], (\"main\", \"accent\"), T, T, gap=.03, bevel=.018)\n pair(\"collar_trim\", prism([(-.68, 15.34), (.28, 15.34), (.18, 15.68), (-.52, 15.68)], 1.12, 1.26, \"yz\"),\n \"trim\", T, T, bevel=.01, panels=False)\n\n # Dorsal carapace over the upper back\n back_shell = loft([\n (12.28, chine_ring(1.92, .72, cy=.98, keel_f=.04, keel_b=.22)),\n (13.65, chine_ring(2.78, .92, cy=1.08, keel_f=.04, keel_b=.28)),\n (14.95, chine_ring(2.42, .84, cy=1.02, keel_f=.04, keel_b=.24)),\n ])\n pair_split(\"back_carapace\", clip_half(back_shell), [((1.0, 1.1, 13.7), (.2, 0, 1))], (\"accent\", \"main\"), T, T, gap=.035, bevel=.02)\n\n\ndef clip_half(bm):\n \"\"\"Keep the left (+X > 0.04) half of a symmetric bmesh so pair_split can mirror it cleanly.\"\"\"\n _, left = halves(bm, (0.02, 0, 0), (-1, 0, 0), gap=0.04)\n return left\n\n\ndef build_head(J):\n N, H = J[\"neck\"], J[\"head\"]\n # Armored neck column with twin front throat pistons\n solid(\"neck_column\", cylinder(.34, 15.18, 16.02, 12), \"joint\", N, smooth=True)\n solid(\"neck_collar\", loft([\n (15.38, octo(.92, .88, .22)),\n (15.66, octo(.82, .78, .18)),\n ]), \"frame\", N, bevel=.015, panels=False)\n pair(\"neck_piston\", piston((.28, -.28, 15.22), (.24, -.24, 15.96), r=.065, n=8), \"metal\", N, N, smooth=True)\n\n # Raptor stealth prow helmet: sculpted multi-station chine hull with subdivisions on the crown\n helm = loft([\n (15.86, chine_ring(.88, 1.18, cy=-.06, keel_f=.26, keel_b=.14)),\n (16.24, chine_ring(1.16, 1.56, cy=-.12, keel_f=.38, keel_b=.22)),\n (16.64, chine_ring(1.24, 1.72, cy=-.08, keel_f=.42, keel_b=.28)),\n (17.02, chine_ring(.96, 1.48, cy=.06, keel_f=.28, keel_b=.32)),\n (17.28, chine_ring(.52, 1.08, cy=.18, keel_f=.14, keel_b=.24)),\n ])\n helm_lo, helm_hi = halves(helm, (0, -.2, 16.52), (0, -.18, 1), gap=.03)\n solid(\"head_jaw\", helm_lo, \"main\", H, bevel=.018)\n solid(\"head_cranium\", helm_hi, \"main\", H, bevel=.02)\n\n # Wrap-around compound dark optical visor & twin recessed cyan optical arrays (no Gundam face vents)\n visor = loft([\n (16.32, chine_ring(1.18, 1.12, cy=-.36, keel_f=.38, keel_b=.02)),\n (16.56, chine_ring(1.22, 1.16, cy=-.38, keel_f=.40, keel_b=.02)),\n ])\n solid(\"head_visor\", visor, \"visor\", H, bevel=.01, panels=False)\n eye_slit = loft([\n (16.41, [(0.06, -1.12), (0.48, -.92), (0.58, -.68), (0.44, -.62), (0.05, -.94)]),\n (16.48, [(0.06, -1.13), (0.50, -.93), (0.60, -.68), (0.46, -.62), (0.05, -.95)]),\n ])\n pair(\"head_eye\", eye_slit, \"glow_eye\", H, H, outline=False, panels=False)\n\n # Cheek sensor pods & optical rangefinder lenses\n pair(\"head_cheek\", loft([\n (16.02, asym_ring(.08, .26, .48, .58, cx=.56, cy=.04, keel=.10)),\n (16.68, asym_ring(.08, .30, .54, .66, cx=.60, cy=.08, keel=.12)),\n ]), \"accent\", H, H, bevel=.015)\n pair(\"head_ear_lens\", cylinder(.11, .84, .92, 12, axis=\"x\", at=(.02, 16.42)), \"sensor\", H, H, smooth=True)\n\n # Central dorsal reconnaissance sensor mast & twin swept rearward telemetry blades (not a forehead V-fin)\n mast = prism([\n (-.58, 16.92), (-.18, 17.48), (.68, 17.64), (.96, 17.36), (.64, 16.88),\n ], -.11, .11, \"yz\")\n solid(\"head_mast\", mast, \"accent\", H, bevel=.015, panels=False)\n solid(\"head_mast_sensor\", prism([\n (-.44, 17.08), (-.16, 17.42), (-.04, 17.42), (-.32, 17.08),\n ], -.08, .08, \"yz\"), \"glow_core\", H, outline=False, panels=False)\n\n ant = loft([\n (16.62, [(0.52, .18), (0.64, .18), (0.62, .58), (0.50, .58)]),\n (17.18, [(0.68, .52), (0.78, .52), (0.76, .92), (0.66, .92)]),\n (17.66, [(0.82, .96), (0.88, .96), (0.86, 1.24), (0.80, 1.24)]),\n ])\n pair(\"head_antenna\", ant, \"trim\", H, H, bevel=.008, panels=False)\n\n\ndef build_arms(J):\n S, UA, FA, HA, GR = lr(J, \"shoulder\"), lr(J, \"upperarm\"), lr(J, \"forearm\"), lr(J, \"hand\"), lr(J, \"grip\")\n\n # Shoulder internal trunnion drum & twin hydraulic elevation rams\n pair(\"shoulder_trunnion\", cylinder(.42, 1.48, 2.72, 14, axis=\"x\", at=(0, 14.58)), \"joint\", *S, smooth=True)\n pair(\"shoulder_block\", loft([\n (14.12, octo(.95, 1.12, .22, x=2.36)),\n (15.08, octo(1.05, 1.18, .24, x=2.36)),\n ]), \"frame\", *S, bevel=.02, panels=False)\n for k, y in ((\"f\", -.52), (\"b\", .52)):\n pair(f\"shoulder_ram_{k}\", piston((1.52, y, 13.68), (2.24, y * .85, 14.48), r=.095, n=8), \"metal\", *S, smooth=True)\n\n # Variable-geometry aero-chine pauldron carapace split into 3 interlocking plates\n pauldron = loft([\n (14.18, asym_ring(.42, 1.12, .92, 1.02, cx=2.42, cy=.04, keel=.18, flare=.16)),\n (14.88, asym_ring(.56, 1.58, 1.16, 1.28, cx=2.56, cy=.06, keel=.26, flare=.22)),\n (15.52, asym_ring(.48, 1.42, 1.02, 1.14, cx=2.48, cy=.08, keel=.24, flare=.18)),\n (15.96, asym_ring(.28, .82, .68, .82, cx=2.32, cy=.12, keel=.16, flare=.10)),\n ])\n pair_split(\"pauldron_shell\", pauldron, [\n ((2.6, 0, 15.05), (.35, -.15, 1)),\n ((2.6, .15, 14.95), (-.2, 1, .2)),\n ], (\"main\", \"accent\", \"main\"), *S, gap=.038, bevel=.022)\n\n # Swept outboard delta wing-blade & leading-edge RCS trim on the shoulder\n wing = loft([\n (14.32, [(3.32, -.68), (3.88, -.48), (4.12, .42), (3.42, .68)]),\n (15.28, [(3.56, -.82), (4.38, -.52), (4.62, .58), (3.64, .84)]),\n (16.12, [(3.24, -.42), (3.86, -.18), (4.08, .72), (3.32, .88)]),\n ])\n pair(\"pauldron_wing\", wing, \"accent\", *S, bevel=.02)\n pair(\"pauldron_wing_trim\", loft([\n (14.36, [(3.82, -.52), (4.06, -.42), (4.26, .38), (4.02, .42)]),\n (15.32, [(4.32, -.56), (4.54, -.46), (4.76, .54), (4.54, .58)]),\n ]), \"trim\", *S, bevel=.01, panels=False)\n pair(\"pauldron_under_thruster\", slats(3.2, 3.85, 14.35, 14.72, -.58, 3, depth=.1, gap=.35), \"frame\", *S, panels=False)\n\n # Upper arm swivel drum, chine bicep shells, and inner frame channel\n pair(\"upperarm_swivel\", cylinder(.42, 13.86, 14.34, 14, at=(2.48, 0)), \"joint\", *UA, smooth=True)\n pair(\"upperarm_core\", loft([\n (12.18, octo(.68, .74, .18, x=2.48)),\n (13.92, octo(.74, .80, .18, x=2.48)),\n ]), \"frame\", *UA, bevel=.02, panels=False)\n bicep = loft([\n (12.38, asym_ring(.38, .58, .54, .58, cx=2.50, cy=0, keel=.12)),\n (13.18, asym_ring(.44, .68, .62, .66, cx=2.52, cy=0, keel=.16)),\n (13.82, asym_ring(.42, .64, .58, .62, cx=2.50, cy=0, keel=.14)),\n ])\n pair_split(\"bicep_shell\", bicep, [((2.5, 0, 13.42), (0, 0, 1))], (\"main\", \"accent\"), *UA, gap=.03, bevel=.018)\n\n # Double-barrel elbow joint, hydraulic actuator, and sculpted forearm vambrace\n pair(\"elbow_drum\", cylinder(.44, 1.98, 2.98, 14, axis=\"x\", at=(0, 11.95)), \"joint\", *FA, smooth=True)\n pair(\"elbow_collar\", cylinder(.48, 2.82, 2.96, 14, axis=\"x\", at=(0, 11.95)), \"metal\", *FA, smooth=True)\n pair(\"elbow_piston\", piston((2.5, .58, 12.48), (2.5, .48, 11.12), r=.095, n=8), \"metal\", *FA, smooth=True)\n pair(\"forearm_core\", loft([\n (9.58, octo(.56, .66, .14, x=2.50)),\n (11.88, octo(.72, .84, .18, x=2.50)),\n ]), \"frame\", *FA, bevel=.018, panels=False)\n\n vambrace = loft([\n (9.66, asym_ring(.38, .58, .54, .62, cx=2.52, cy=0, keel=.12, flare=.10)),\n (10.68, asym_ring(.44, .76, .66, .78, cx=2.56, cy=.02, keel=.18, flare=.16)),\n (11.68, asym_ring(.46, .82, .70, .86, cx=2.58, cy=.06, keel=.20, flare=.18)),\n (12.24, asym_ring(.32, .58, .48, .72, cx=2.54, cy=.18, keel=.12, flare=.10)),\n ])\n pair_split(\"vambrace\", vambrace, [\n ((2.55, 0, 10.22), (0, -.15, 1)),\n ((2.55, 0, 11.28), (.45, .15, 1)),\n ], (\"accent\", \"main\", \"main\"), *FA, gap=.032, bevel=.02)\n\n # Outboard forearm twin-barrel pulse carbine & energy cell\n pod = loft([\n (9.82, [(3.12, -.48), (3.48, -.42), (3.54, .38), (3.16, .46)]),\n (11.48, [(3.18, -.54), (3.58, -.46), (3.64, .46), (3.22, .54)]),\n ])\n pair(\"forearm_carbine_pod\", pod, \"accent\", *FA, bevel=.016)\n pair(\"forearm_carbine_cell\", loft([\n (10.85, [(3.44, -.18), (3.66, -.16), (3.66, .36), (3.44, .38)]),\n (11.42, [(3.44, -.18), (3.66, -.16), (3.66, .36), (3.44, .38)]),\n ]), \"trim\", *FA, bevel=.01, panels=False)\n for dy in (-.22, .12):\n pair(f\"forearm_barrel_{dy:+.2f}\", cylinder(.075, 9.18, 9.88, 10, at=(3.34, dy)), \"metal\", *FA, smooth=True)\n pair(f\"forearm_muzzle_{dy:+.2f}\", cylinder(.048, 9.14, 9.19, 8, at=(3.34, dy)), \"glow_core\", *FA, outline=False)\n\n # Articulated gauntlet hand\n pair(\"wrist_ball\", cylinder(.28, 9.38, 9.72, 12, at=(2.5, 0)), \"joint\", *HA, smooth=True)\n pair(\"palm_block\", loft([(8.88, octo(.48, .78, .1, x=2.50)), (9.46, octo(.46, .76, .1, x=2.50))]),\n \"joint\", *HA, bevel=.018, panels=False)\n pair(\"hand_carapace\", loft([\n (8.92, [(2.66, -.40), (2.88, -.34), (2.88, .34), (2.66, .40)]),\n (9.52, [(2.64, -.42), (2.90, -.36), (2.90, .36), (2.64, .42)]),\n ]), \"main\", *HA, bevel=.015, panels=False)\n pair(\"fingers_block\", loft([(8.72, octo(.40, .78, .12, x=2.26)), (9.32, octo(.42, .78, .12, x=2.26))]),\n \"frame\", *HA, bevel=.02, panels=False)\n pair(\"thumb_block\", loft([(8.98, octo(.24, .24, .06, x=2.32, y=-.48)), (9.38, octo(.26, .26, .06, x=2.36, y=-.44))]),\n \"frame\", *HA, bevel=.018, panels=False)\n\n # Signature Long-Barrel Orbital Rail-Rifle mounted on the right hand (HA[1]) along the forearm axis\n build_orbital_rifle(HA[1])\n\n\ndef build_orbital_rifle(hand_r):\n \"\"\"A sleek 6.8 m twin-rail orbital rifle held in the right hand, aligned with the forearm so\n flight, guard, and stand poses carry it naturally.\"\"\"\n x = -2.38\n # Main receiver body\n rec = loft([\n (5.65, chine_ring(.34, .82, cx=x, cy=-.18, keel_f=.14, keel_b=.08)),\n (8.45, chine_ring(.42, .96, cx=x, cy=-.16, keel_f=.18, keel_b=.10)),\n (9.85, chine_ring(.38, .88, cx=x, cy=-.08, keel_f=.14, keel_b=.12)),\n (10.65, chine_ring(.28, .66, cx=x, cy=.04, keel_f=.08, keel_b=.10)),\n ])\n rec_lo, rec_hi = halves(rec, (x, -.18, 7.2), (0, -.15, 1), gap=.03)\n solid(\"rifle_shroud_lo\", rec_lo, \"accent\", hand_r, bevel=.016)\n solid(\"rifle_shroud_hi\", rec_hi, \"main\", hand_r, bevel=.016)\n\n # Twin long electromagnetic accelerator rails & glowing plasma core channel\n for dy in (-.44, -.12):\n solid(f\"rifle_rail_{dy:+.2f}\", loft([\n (3.45, octo(.12, .18, .03, x=x, y=dy)),\n (5.75, octo(.16, .22, .04, x=x, y=dy)),\n ]), \"metal\", hand_r, bevel=.01, panels=False)\n solid(\"rifle_core_strip\", loft([\n (3.85, octo(.07, .12, .01, x=x, y=-.28)),\n (8.25, octo(.09, .14, .01, x=x, y=-.28)),\n ]), \"glow_core\", hand_r, outline=False, panels=False)\n solid(\"rifle_sensor_scope\", loft([\n (6.85, octo(.18, .28, .04, x=x, y=-.68)),\n (8.35, octo(.20, .32, .04, x=x, y=-.68)),\n ]), \"trim\", hand_r, bevel=.01, panels=False)\n solid(\"rifle_scope_lens\", cylinder(.065, 6.78, 6.86, 10, at=(x, -.68)), \"sensor\", hand_r, smooth=True)\n\n\ndef build_legs(J):\n TH, SH, FT = lr(J, \"thigh\"), lr(J, \"shin\"), lr(J, \"foot\")\n\n # Thigh structural core, hip ball, and front/rear hydraulic cylinders\n pair(\"hip_ball_joint\", cylinder(.48, .58, 1.58, 14, axis=\"x\", at=(0, 10.52)), \"joint\", *TH, smooth=True)\n pair(\"thigh_core\", loft([\n (6.58, octo(.78, .92, .20, x=1.18)),\n (8.85, octo(1.18, 1.34, .28, x=1.18)),\n (10.22, octo(1.06, 1.22, .26, x=1.16)),\n ]), \"frame\", *TH, bevel=.025, panels=False)\n pair(\"thigh_ram_f\", piston((.88, -.68, 10.32), (.96, -.64, 8.85), r=.10, n=8), \"metal\", *TH, smooth=True)\n pair(\"thigh_ram_b\", piston((1.18, .72, 10.38), (1.18, .68, 7.65), r=.12, n=8), \"joint\", *TH, smooth=True)\n\n # Sculpted aero-chine thigh carapace physically split into 3 interlocking plates\n thigh_shell = loft([\n (6.82, asym_ring(.52, .68, .74, .76, cx=1.20, cy=-.04, keel=.18, flare=.10)),\n (8.15, asym_ring(.66, .92, .92, .94, cx=1.22, cy=-.06, keel=.24, flare=.18)),\n (9.35, asym_ring(.68, .98, .96, .98, cx=1.22, cy=-.04, keel=.24, flare=.20)),\n (10.05, asym_ring(.54, .78, .78, .82, cx=1.18, cy=0, keel=.16, flare=.12)),\n ])\n pair_split(\"thigh_shell\", thigh_shell, [\n ((1.2, 0, 8.45), (.32, -.18, 1)),\n ((1.55, 0, 8.5), (1, .12, -.15)),\n ], (\"main\", \"main\", \"accent\"), *TH, gap=.036, bevel=.022)\n pair(\"thigh_louver_trim\", loft([\n (7.55, [(1.88, -.32), (2.06, -.28), (2.08, .28), (1.90, .32)]),\n (9.15, [(1.98, -.36), (2.18, -.32), (2.20, .32), (2.00, .36)]),\n ]), \"trim\", *TH, bevel=.01, panels=False)\n\n # Double-jointed knee drum, outboard sensor disc, and keeled knee-guard prow\n pair(\"knee_drum\", cylinder(.50, .66, 1.76, 14, axis=\"x\", at=(0, 6.10)), \"joint\", *SH, smooth=True)\n pair(\"knee_disc\", cylinder(.46, 1.76, 1.96, 16, axis=\"x\", at=(.08, 6.14)), \"accent\", *SH, smooth=True)\n pair(\"knee_ring\", cylinder(.34, 1.94, 2.02, 16, axis=\"x\", at=(.08, 6.14)), \"metal\", *SH, smooth=True)\n pair(\"knee_sensor\", cylinder(.22, 2.00, 2.06, 14, axis=\"x\", at=(.08, 6.14)), \"sensor\", *SH, smooth=True)\n\n kneecap = loft([\n (5.32, chine_ring(.82, .72, cx=1.20, cy=-.72, keel_f=.22, keel_b=.02)),\n (6.18, chine_ring(1.06, .96, cx=1.20, cy=-.86, keel_f=.34, keel_b=.04)),\n (6.88, chine_ring(.88, .82, cx=1.20, cy=-.78, keel_f=.28, keel_b=.04)),\n (7.32, chine_ring(.48, .54, cx=1.20, cy=-.62, keel_f=.16, keel_b=.02)),\n ])\n k_lo, k_hi = halves(kneecap, (1.2, -.85, 6.32), (0, -.25, 1), gap=.03)\n pair(\"kneecap_lo\", k_lo, \"main\", *SH, bevel=.02)\n pair(\"kneecap_hi\", k_hi, \"accent\", *SH, bevel=.02)\n pair(\"kneecap_spike\", prism([(-1.22, 5.95), (-1.02, 5.95), (-.88, 7.18), (-1.12, 7.05)], 1.12, 1.28, \"yz\"),\n \"trim\", *SH, bevel=.01, panels=False)\n\n # Shin core, knee & Achilles hydraulic rams, and sculpted aero-chine greave shells\n pair(\"shin_core\", loft([\n (1.72, octo(.82, .96, .20, x=1.20, y=.08)),\n (5.76, octo(.96, 1.12, .24, x=1.20)),\n ]), \"frame\", *SH, bevel=.025, panels=False)\n pair(\"knee_piston\", piston((1.20, .68, 7.22), (1.20, .78, 5.38), r=.105, n=8), \"metal\", *SH, smooth=True)\n pair(\"achilles_piston\", piston((1.20, .74, 2.62), (1.20, .88, 1.72), r=.085, n=8), \"metal\", *SH, smooth=True)\n\n greave = loft([\n (1.88, asym_ring(.56, .74, .78, .86, cx=1.20, cy=.04, keel=.20, flare=.12)),\n (2.85, asym_ring(.68, .96, .92, 1.12, cx=1.22, cy=.08, keel=.26, flare=.18)),\n (4.18, asym_ring(.74, 1.12, .96, 1.38, cx=1.24, cy=.18, keel=.28, flare=.22)),\n (5.42, asym_ring(.58, .82, .78, 1.02, cx=1.20, cy=.08, keel=.18, flare=.12)),\n ])\n pair_split(\"greave_shell\", greave, [\n ((1.2, 0, 3.35), (.28, -.22, 1)),\n ((1.2, .25, 3.8), (-.15, 1, .18)),\n ], (\"accent\", \"main\", \"main\"), *SH, gap=.038, bevel=.022)\n\n # Rear calf vector-thruster nacelle & twin calf nozzles (fires the game's calf plumes!)\n calf_pod = loft([\n (3.45, chine_ring(.92, .76, cx=1.20, cy=1.18, keel_f=.04, keel_b=.24)),\n (4.52, chine_ring(1.12, .98, cx=1.20, cy=1.34, keel_f=.04, keel_b=.32)),\n (5.28, chine_ring(.84, .72, cx=1.20, cy=1.12, keel_f=.04, keel_b=.18)),\n ])\n pair(\"calf_thruster_pod\", calf_pod, \"accent\", *SH, bevel=.02)\n pair(\"calf_thruster_trim\", prism([(1.12, 3.65), (1.72, 3.92), (1.66, 4.98), (1.12, 4.98)], 1.12, 1.28, \"yz\"),\n \"trim\", *SH, bevel=.01, panels=False)\n pair(\"calf_vents\", slats(.92, 1.48, 2.28, 3.12, 1.04, 4, depth=.1, gap=.32), \"frame\", *SH, panels=False)\n nozzle_pair(\"calf\", (1.20, 1.42, 4.18), (0, .52, -.85), .32, .54, *SH, housing=False)\n\n # Articulated ankle ball, shock absorbers, ankle spat, and raptor talon sabaton\n pair(\"ankle_ball\", cylinder(.42, .74, 1.66, 14, axis=\"x\", at=(.10, 1.55)), \"joint\", *FT, smooth=True)\n pair(\"ankle_collar\", cylinder(.46, 1.52, 1.68, 14, axis=\"x\", at=(.10, 1.55)), \"metal\", *FT, smooth=True)\n\n spat = loft([\n (1.02, chine_ring(.98, .72, cx=1.20, cy=-.62, keel_f=.22, keel_b=.04)),\n (1.78, chine_ring(1.08, .82, cx=1.20, cy=-.68, keel_f=.28, keel_b=.04)),\n (2.26, chine_ring(.68, .56, cx=1.20, cy=-.56, keel_f=.18, keel_b=.02)),\n ])\n pair(\"ankle_spat\", spat, \"main\", *FT, bevel=.02)\n pair(\"ankle_spat_trim\", prism([(-.96, 1.18), (-.68, 1.18), (-.58, 2.12), (-.88, 2.02)], 1.12, 1.28, \"yz\"),\n \"trim\", *FT, bevel=.01, panels=False)\n\n # Forward high-arch talon sabaton (split into instep carapace and armored toe claw)\n sabaton = loft([\n (0.12, chine_ring(1.22, 2.42, cx=1.20, cy=-1.02, keel_f=.34, keel_b=.08)),\n (0.58, chine_ring(1.16, 2.28, cx=1.20, cy=-.96, keel_f=.30, keel_b=.08)),\n (1.08, chine_ring(.88, 1.42, cx=1.20, cy=-.48, keel_f=.20, keel_b=.06)),\n ])\n sab_toe, sab_instep = halves(sabaton, (1.20, -1.42, 0.5), (0, 1, .18), gap=.035)\n pair(\"sabaton_instep\", sab_instep, \"main\", *FT, bevel=.022)\n pair(\"sabaton_toe\", sab_toe, \"accent\", *FT, bevel=.022)\n pair(\"sabaton_toe_claw\", loft([\n (0.08, chine_ring(.68, .78, cx=1.20, cy=-2.08, keel_f=.28, keel_b=.02)),\n (0.52, chine_ring(.56, .66, cx=1.20, cy=-1.98, keel_f=.24, keel_b=.02)),\n ]), \"trim\", *FT, bevel=.016, panels=False)\n\n # Rear heel stabilizer claw & dark landing sole pads\n heel = loft([\n (0.10, chine_ring(1.08, 1.12, cx=1.20, cy=1.08, keel_f=.04, keel_b=.24)),\n (0.68, chine_ring(.96, .98, cx=1.20, cy=1.02, keel_f=.04, keel_b=.20)),\n (1.06, chine_ring(.72, .72, cx=1.20, cy=.82, keel_f=.04, keel_b=.12)),\n ])\n pair(\"sabaton_heel\", heel, \"accent\", *FT, bevel=.02)\n pair(\"sole_front\", loft([\n (0.0, octo(1.14, 1.56, .22, x=1.20, y=-1.38)),\n (0.12, octo(1.18, 1.62, .22, x=1.20, y=-1.38)),\n ]), \"joint\", *FT, bevel=.015, panels=False)\n pair(\"sole_heel\", loft([\n (0.0, octo(1.04, 1.06, .20, x=1.20, y=1.06)),\n (0.12, octo(1.08, 1.10, .20, x=1.20, y=1.06)),\n ]), \"joint\", *FT, bevel=.015, panels=False)\n\n\ndef build_backpack(J):\n B = J[\"backpack\"]\n # Sculpted dorsal orbital thrust pack with central Tokamak core and twin propellant tanks\n pack = loft([\n (12.35, chine_ring(1.88, 1.18, cy=1.68, keel_f=.04, keel_b=.24)),\n (13.35, chine_ring(2.26, 1.48, cy=1.84, keel_f=.04, keel_b=.34)),\n (14.42, chine_ring(2.18, 1.42, cy=1.82, keel_f=.04, keel_b=.32)),\n (15.08, chine_ring(1.52, 1.02, cy=1.58, keel_f=.04, keel_b=.20)),\n ])\n pack_lo, pack_hi = halves(pack, (0, 1.8, 13.88), (0, .22, 1), gap=.035)\n solid(\"pack_hull_lo\", pack_lo, \"main\", B, bevel=.022)\n solid(\"pack_hull_hi\", pack_hi, \"accent\", B, bevel=.022)\n solid(\"pack_spine_fin\", prism([\n (1.62, 12.68), (2.78, 13.18), (2.92, 14.62), (2.12, 15.12), (1.58, 14.88),\n ], -.12, .12, \"yz\"), \"trim\", B, bevel=.012, panels=False)\n\n # Central dorsal fusion turbine & glowing core ring\n solid(\"pack_turbine\", loft([(2.15, circle(.78, 16, 0, 13.85)), (2.98, circle(.48, 16, 0, 13.85))], axis=\"y\"),\n \"frame\", B, smooth=True)\n solid(\"pack_turbine_collar\", loft([(2.28, circle(.86, 16, 0, 13.85)), (2.52, circle(.86, 16, 0, 13.85))], axis=\"y\"),\n \"metal\", B, smooth=True)\n solid(\"pack_turbine_glow\", loft([(2.94, circle(.28, 14, 0, 13.85)), (3.02, circle(.28, 14, 0, 13.85))], axis=\"y\"),\n \"glow_core\", B, outline=False)\n\n # Twin lateral cryo-propellant tanks\n pair(\"pack_tank\", cylinder(.34, 12.18, 14.48, 14, at=(.96, 1.92)), \"metal\", B, B, smooth=True)\n pair(\"pack_tank_band\", cylinder(.37, 13.15, 13.45, 14, at=(.96, 1.92)), \"trim\", B, B, smooth=True)\n\n # Twin heavy gimballed main thruster bells + armored thrust-vectoring shrouds\n pair(\"main_shroud\", loft([\n (12.08, asym_ring(.28, .46, .48, .56, cx=.56, cy=2.08, keel=.12)),\n (12.78, asym_ring(.36, .58, .58, .66, cx=.56, cy=2.02, keel=.14)),\n ]), \"accent\", B, B, bevel=.018)\n nozzle_pair(\"main\", (.56, 2.08, 12.52), (0, .46, -.89), .46, .88, B, B)\n\n # Twin variable-sweep aero-binders on J[\"binder\", \"L/R\"] with wing blades, capacitor fins, and binder bells\n for s, sx in ((\"L\", 1), (\"R\", -1)):\n j = J[\"binder\", s]\n pivot = Vector((.9 * sx, 2.25, 14.7))\n m = Matrix.Translation(pivot) @ rot(\"Y\", 34 * sx) @ rot(\"X\", -26)\n solid(f\"binder_hinge.{s}\", cylinder(.24, pivot.x - .28, pivot.x + .28, 14, axis=\"x\", at=(pivot.y, pivot.z)),\n \"joint\", j, smooth=True)\n solid(f\"binder_collar.{s}\", cylinder(.28, pivot.x - .12, pivot.x + .12, 14, axis=\"x\", at=(pivot.y, pivot.z)),\n \"metal\", j, smooth=True)\n\n # Structural binder boom & thruster nacelle\n boom = loft([\n (-.88, octo(.36, .54, .08)),\n (0.45, octo(.44, .68, .10)),\n (2.15, octo(.28, .46, .06)),\n ])\n solid(f\"binder_boom.{s}\", transform(boom, m), \"frame\", j, bevel=.016, panels=False)\n\n # Swept forward-and-upward aero-wing split into main and accent blades with gold dogtooth trim\n wing_lo = prism([(-.72, -.78), (.52, -.62), (.68, 1.18), (-.46, 0.92)], .08 * sx - .09, .08 * sx + .09, \"yz\")\n wing_hi = prism([(-.44, 0.98), (.66, 1.24), (.38, 2.95), (-.22, 3.18), (-.58, 2.15)], .08 * sx - .08, .08 * sx + .08, \"yz\")\n trim_le = prism([(.48, -.58), (.66, -.52), (.82, 1.22), (.52, 2.92), (.36, 2.92), (.66, 1.20)], .08 * sx - .05, .08 * sx + .05, \"yz\")\n glow_fin = prism([(-.54, 1.15), (-.38, 1.15), (-.18, 2.65), (-.34, 2.65)], .08 * sx - .04, .08 * sx + .04, \"yz\")\n solid(f\"binder_wing_lo.{s}\", transform(wing_lo, m), \"main\", j, bevel=.018)\n solid(f\"binder_wing_hi.{s}\", transform(wing_hi, m), \"accent\", j, bevel=.018)\n solid(f\"binder_wing_trim.{s}\", transform(trim_le, m), \"trim\", j, bevel=.008, panels=False)\n solid(f\"binder_capacitor.{s}\", transform(glow_fin, m), \"glow_core\", j, outline=False, panels=False)\n\n # Under-slung binder vector nozzle (fires the game's binder plumes!)\n bell, glow = nozzle(.34, .62)\n down = m.to_3x3() @ Vector((0, 0, -1))\n at = m @ Vector((0, 0, -.82))\n solid(f\"binder_nozzle.{s}\", place(bell, at, down), \"frame\", j, smooth=True)\n solid(f\"binder_nozzle.{s}.glow\", place(glow, at, down), \"glow_thruster\", j, outline=False)\n empty(f\"nozzle.binder.{s}\", at + down * .62, j, dir=gltf_dir(down), radius=.34)\n\n\ndef build_kestrel():\n J = striker_joints()\n J[\"frame\"][\"frame\"] = \"block_dummy\"\n J[\"frame\"][\"height\"] = 17.6\n build_pelvis(J)\n build_waist(J)\n build_torso(J)\n build_head(J)\n J[\"neck\"].location.z -= .22 # seat the raptor sensor prow low between the high collar shrouds\n build_arms(J)\n build_legs(J)\n build_backpack(J)\n return J[\"frame\"]\n\n\ndef build(Blocks):\n return build_kestrel()\n", "Overwrite": true, "Path": "~/work/sortie/kit/blocks/dummy.py" }result, 1 line
Created file.