A mech game prototype, pushed by Gemini 4 Argon
agent (cont.)
+59:34write_file{"Content":"\"\"\"XF-00 Kestrel: high-agility orbital interceptor on the shared 17.6 m 22-joint striker skeleton.\n\nBuilt to surpass the control `striker` on its own renderer rules (`DetailShader` normal/depth/role\nink + toon cel shading + volumetric thruster plumes):\n 1. Multi-station 3D aero-chine cross-section lofts (`chine_ring`, `asym_ring`) physically sliced\n by 3D bisect planes (`pair_split` -> `lib.panels` with 3.5 cm real gaps over a dark `frame`\n skeleton) and beveled + inset with `lib.panel_lines()`, so `DetailShader` draws crisp mechanical\n ink lines and panel seams on every plate with zero smooth-surface z-fighting.\n 2. Planted heroic A-stance baked into the 22-joint rest skeleton: shoulders sit wider and higher,\n legs splay from hip (x=1.20) through knee (x=1.44, y=-0.22) to ankle (x=1.68, y=0.06), so in\n `POSES.stand` during a 360° turntable the Kestrel stands in a wide athletic stance beside the\n control `striker`.\n 3. Full interceptor architecture: armored orbital cockpit prow (`cockpit` joint) with panoramic\n tinted visor canopy + glowing HUD slit, recessed central Tokamak harmonic chest lens, canted\n compressor intake nacelles with turbine slats, exposed chrome hydraulic waist/knee/ankle rams,\n a 7.2 m Twin-Rail Hyper-Velocity Lance-Rifle poised at 32° on `hand.R`, a faceted active-defense\n Aero-Shield on `forearm.L`, and an 8-nozzle propulsion suite (quad main pack + twin wing-binders\n + twin calf nacelles).\n\"\"\"\nimport bpy\nfrom mathutils import Matrix, Vector\n\nfrom lib import (\n circle, cylinder, empty, halves, loft, nozzle, octo,\n panels, piston, prism, rot, slats, solid, 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.02, panels_on=True):\n \"\"\"Split a left-side bmesh by 3D seam planes [(co, no), ...] into separated armor plates with\n real physical gaps, bevels, and recessed panel-line borders.\"\"\"\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 clip_half(bm):\n \"\"\"Keep the left (+X > 0.03) half of a symmetric bmesh so pair_split mirrors it cleanly.\"\"\"\n _, left = halves(bm, (0.02, 0, 0), (-1, 0, 0), gap=0.04)\n return left\n\n\ndef kestrel_joints():\n \"\"\"The shared 22-joint striker skeleton adjusted into a planted, wide-shouldered heroic A-stance.\"\"\"\n J = striker_joints()\n J[\"frame\"][\"frame\"] = \"block_dummy\"\n J[\"frame\"][\"height\"] = 17.6\n place_map = {o.name: o.matrix_world.translation.copy() for o in J.values()}\n overrides = {\n \"pelvis\": (0, 0, 10.48),\n \"waist\": (0, 0, 11.04),\n \"torso\": (0, 0, 11.90),\n \"neck\": (0, -.04, 15.26),\n \"head\": (0, -.08, 15.84),\n \"shoulder\": (2.14, .02, 14.70),\n \"upperarm\": (2.58, .02, 14.40),\n \"forearm\": (2.70, -.06, 11.92),\n \"hand\": (2.78, -.20, 9.56),\n \"grip\": (2.64, -.26, 9.08),\n \"thigh\": (1.20, -.02, 10.45),\n \"shin\": (1.44, -.22, 6.02),\n \"foot\": (1.68, .06, 1.52),\n \"binder\": (.94, 2.26, 14.74),\n }\n for k, at in overrides.items():\n if f\"{k}.L\" in place_map:\n place_map[f\"{k}.L\"] = Vector(at)\n place_map[f\"{k}.R\"] = Vector((-at[0], at[1], at[2]))\n else:\n place_map[k] = Vector(at)\n for o in J.values():\n if o.parent is not None:\n o.location = o.parent.matrix_world.inverted() @ place_map[o.name]\n bpy.context.view_layer.update()\n return J\n\n\ndef build_pelvis(J):\n P = J[\"pelvis\"]\n solid(\"pelvis_core\", loft([\n (9.68, octo(1.08, 1.25, .24)),\n (10.22, octo(2.22, 1.58, .36)),\n (10.92, octo(2.08, 1.50, .34)),\n ]), \"frame\", P, bevel=.025, panels=False)\n pair(\"hip_trunnion\", cylinder(.42, .45, 1.82, 14, axis=\"x\", at=(-.02, 10.45)), \"joint\", P, P, smooth=True)\n pair(\"hip_collar\", cylinder(.48, 1.46, 1.66, 14, axis=\"x\", at=(-.02, 10.45)), \"metal\", P, P, smooth=True)\n\n # Sculpted aero-chine belt girdle\n belt = loft([\n (10.50, chine_ring(2.98, 1.88, keel_f=.22, keel_b=.16)),\n (10.82, chine_ring(2.68, 1.76, keel_f=.26, keel_b=.14)),\n (11.04, chine_ring(2.14, 1.58, keel_f=.18, keel_b=.12)),\n ])\n solid(\"belt_girdle\", belt, \"main\", P, bevel=.022)\n\n # Forward sensor & vernier codpiece prow\n cod = loft([\n (9.38, chine_ring(.46, .74, cy=-.64, keel_f=.18, keel_b=.04)),\n (9.95, chine_ring(.72, 1.06, cy=-.72, keel_f=.30, keel_b=.06)),\n (10.58, chine_ring(.68, .98, cy=-.66, keel_f=.24, keel_b=.06)),\n (10.98, chine_ring(.52, .80, cy=-.60, keel_f=.14, keel_b=.04)),\n ])\n cod_lo, cod_hi = halves(cod, (0, -.8, 10.18), (0, -.25, 1), gap=.032)\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([(-.11, 9.52), (.11, 9.52), (.08, 10.88), (-.08, 10.88)], -1.22, -.94, \"xz\"),\n \"trim\", P, bevel=.012, panels=False)\n\n # Swept two-piece chevron front flight skirts angled over the splayed thighs\n sf = loft([\n (9.28, [(0.44, -1.24), (1.22, -1.16), (1.84, -.88), (1.72, -.70), (0.40, -.98)]),\n (10.02, [(0.38, -1.30), (1.34, -1.20), (2.06, -.84), (1.94, -.64), (0.34, -1.02)]),\n (10.68, [(0.36, -1.18), (1.26, -1.08), (1.90, -.78), (1.78, -.58), (0.32, -.94)]),\n ])\n pair_split(\"skirt_front\", sf, [((1.18, -1.0, 9.98), (.84, -.15, .50))], (\"main\", \"accent\"), P, P, gap=.036, bevel=.022)\n pair(\"skirt_front_lip\", loft([\n (9.14, [(0.48, -1.22), (1.68, -.92), (1.58, -.76), (0.44, -1.04)]),\n (9.32, [(0.44, -1.26), (1.76, -.90), (1.66, -.74), (0.40, -1.06)]),\n ]), \"trim\", P, P, bevel=.012, panels=False)\n\n # Side hip vernier fairings\n ss = loft([\n (9.28, asym_ring(.18, .44, .84, .94, cx=2.08, cy=.04, keel=.14)),\n (10.10, asym_ring(.22, .54, .98, 1.10, cx=2.14, cy=.02, keel=.18)),\n (10.72, asym_ring(.20, .40, .86, .96, cx=2.02, cy=.02, keel=.12)),\n ])\n pair_split(\"skirt_side\", ss, [((2.15, 0, 10.28), (0, .1, 1))], (\"main\", \"accent\"), P, P, gap=.032, bevel=.02)\n pair(\"skirt_side_vane\", prism([(-.68, 9.48), (.74, 9.48), (.66, 10.22), (-.60, 10.22)], 2.34, 2.48, \"yz\"),\n \"trim\", P, P, bevel=.01, panels=False)\n\n # Two-stage rear vernier tail skirts & central dorsal tail stabilizer boom\n sr = loft([\n (9.18, [(0.22, .88), (0.94, 1.26), (1.66, 1.02), (1.56, .76), (0.20, .68)]),\n (9.96, [(0.20, .96), (1.02, 1.40), (1.80, 1.12), (1.68, .82), (0.18, .74)]),\n (10.68, [(0.20, .88), (0.92, 1.24), (1.58, .98), (1.48, .74), (0.18, .68)]),\n ])\n pair_split(\"skirt_rear\", sr, [((0.95, 1.1, 9.92), (.25, -.1, 1))], (\"accent\", \"main\"), P, P, gap=.035, bevel=.022)\n tail = loft([\n (8.62, chine_ring(.32, .58, cy=1.78, keel_f=.04, keel_b=.18)),\n (9.62, chine_ring(.52, .92, cy=1.46, keel_f=.04, keel_b=.24)),\n (10.58, chine_ring(.64, .98, cy=1.12, keel_f=.04, keel_b=.20)),\n ])\n solid(\"tail_stabilizer\", tail, \"accent\", P, bevel=.02)\n solid(\"tail_fin\", prism([(1.18, 9.12), (2.04, 8.58), (2.18, 9.28), (1.46, 10.52)], -.07, .07, \"yz\"),\n \"trim\", P, bevel=.01, panels=False)\n\n\ndef build_waist(J):\n W = J[\"waist\"]\n solid(\"spine_core\", cylinder(.50, 10.86, 12.06, 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 - .10, chine_ring(1.52 + i * .10, 1.34 + i * .08, keel_f=.14, keel_b=.12)),\n (z + .10, chine_ring(1.58 + i * .10, 1.38 + i * .08, keel_f=.16, keel_b=.12)),\n ]), \"frame\", W, bevel=.018, panels=False)\n\n # Tiered forward abdominal armor plates (accent middle rib between main upper and frame lower)\n for i, (z0, z1, w, y, role) in enumerate((\n (10.98, 11.32, 1.16, -.78, \"frame\"),\n (11.30, 11.64, 1.30, -.84, \"accent\"),\n (11.62, 11.98, 1.46, -.90, \"main\"),\n )):\n ab = loft([\n (z0, chine_ring(w, .56, cy=y, keel_f=.18, keel_b=.02)),\n (z1, chine_ring(w + .10, .62, cy=y - .03, keel_f=.22, keel_b=.02)),\n ])\n solid(f\"abs_plate_{i}\", ab, role, W, bevel=.016, panels=False)\n\n pair(\"waist_piston_f\", piston((.78, -.20, 10.90), (.90, -.26, 12.00), r=.115, n=10), \"metal\", W, W, smooth=True)\n pair(\"waist_piston_b\", piston((.72, .48, 10.92), (.84, .54, 11.98), r=.105, n=10), \"joint\", W, W, smooth=True)\n\n\ndef build_torso(J):\n T, C = J[\"torso\"], J[\"cockpit\"]\n # Recessed dark structural core & lateral Tokamak reactor drums visible between chest plates\n solid(\"torso_core\", loft([\n (11.88, octo(1.82, 1.50, .36)),\n (12.65, octo(2.62, 1.98, .48)),\n (13.95, octo(3.02, 2.24, .54)),\n (14.95, octo(2.72, 2.02, .48)),\n (15.36, octo(1.72, 1.42, .36)),\n ]), \"frame\", T, bevel=.025, panels=False)\n pair(\"reactor_drum\", cylinder(.58, 1.18, 1.72, 16, axis=\"x\", at=(.18, 13.46)), \"joint\", T, T, smooth=True)\n pair(\"reactor_coil\", cylinder(.62, 1.34, 1.54, 16, axis=\"x\", at=(.18, 13.46)), \"metal\", T, T, smooth=True)\n pair(\"reactor_glow\", cylinder(.38, 1.70, 1.76, 14, axis=\"x\", at=(.18, 13.46)), \"glow_core\", T, T, outline=False)\n\n # Central Fighter-Nose Orbital Cockpit Module on J[\"cockpit\"]\n prow = loft([\n (12.12, chine_ring(1.06, .82, cy=-.94, keel_f=.20, keel_b=.04)),\n (12.82, chine_ring(1.32, 1.22, cy=-1.14, keel_f=.34, keel_b=.06)),\n (13.84, chine_ring(1.36, 1.34, cy=-1.20, keel_f=.38, keel_b=.06)),\n (14.68, chine_ring(1.12, 1.08, cy=-1.04, keel_f=.26, keel_b=.04)),\n (15.08, chine_ring(.78, .76, cy=-.86, keel_f=.14, keel_b=.04)),\n ])\n prow_lo, prow_hi = halves(prow, (0, -1.3, 13.68), (0, -.28, 1), gap=.035)\n solid(\"cockpit_prow_lo\", prow_lo, \"main\", C, bevel=.022)\n solid(\"cockpit_prow_hi\", prow_hi, \"accent\", C, bevel=.022)\n\n # Panoramic armored glass canopy & internal glowing HUD slit on the upper cockpit prow\n canopy = loft([\n (13.82, chine_ring(1.04, .66, cy=-1.42, keel_f=.26, keel_b=.02)),\n (14.24, chine_ring(1.08, .70, cy=-1.45, keel_f=.28, keel_b=.02)),\n (14.64, chine_ring(.84, .56, cy=-1.28, keel_f=.18, keel_b=.02)),\n ])\n solid(\"cockpit_canopy\", canopy, \"visor\", C, bevel=.012, panels=False)\n solid(\"cockpit_hud_slit\", loft([\n (14.02, chine_ring(.92, .42, cy=-1.58, keel_f=.22, keel_b=.01)),\n (14.16, chine_ring(.94, .44, cy=-1.59, keel_f=.22, keel_b=.01)),\n ]), \"glow_core\", C, outline=False, panels=False)\n solid(\"cockpit_rescue_trim\", loft([\n (13.72, chine_ring(1.14, .68, cy=-1.40, keel_f=.28, keel_b=.02)),\n (13.82, chine_ring(1.16, .70, cy=-1.42, keel_f=.28, keel_b=.02)),\n ]), \"trim\", C, bevel=.01, panels=False)\n\n # Central Recessed Tokamak Harmonic Lens in the chest keel (proud of cockpit_prow_lo at y=-1.92..-2.18)\n solid(\"chest_lens_socket\", prism(circle(.46, 12, 0, 13.15), -2.08, -1.55, \"xz\"), \"frame\", C, bevel=.025, panels=False)\n solid(\"chest_lens_ring\", prism(circle(.38, 12, 0, 13.15), -2.14, -2.04, \"xz\"), \"trim\", C, bevel=.012, panels=False)\n solid(\"chest_lens_glass\", cylinder(.29, -2.17, -2.10, 16, axis=\"y\", at=(0, 13.15)), \"sensor\", C, smooth=True)\n solid(\"chest_lens_core\", cylinder(.14, -2.19, -2.14, 12, axis=\"y\", at=(0, 13.15)), \"glow_core\", C, outline=False)\n\n # Ventral belly radiator slats below the cockpit prow\n solid(\"belly_vent_housing\", loft([\n (11.94, chine_ring(1.52, .68, cy=-.92, keel_f=.16, keel_b=.02)),\n (12.48, chine_ring(1.76, .78, cy=-.98, keel_f=.18, keel_b=.02)),\n ]), \"main\", T, bevel=.02)\n solid(\"belly_slats\", slats(-.52, .52, 12.04, 12.42, -1.32, 3, depth=.10, gap=.34), \"frame\", T, panels=False)\n\n # Twin Canted Compressor Intake Nacelles flanking the cockpit prow (separated by dark frame channel)\n nacelle = loft([\n (12.48, asym_ring(.20, .72, .78, .82, cx=1.14, cy=-.72, keel=.18, flare=.14)),\n (13.42, asym_ring(.26, .98, 1.08, .96, cx=1.28, cy=-.82, keel=.26, flare=.18)),\n (14.38, asym_ring(.28, 1.06, 1.14, .98, cx=1.34, cy=-.78, keel=.28, flare=.20)),\n (14.96, asym_ring(.22, .78, .86, .82, cx=1.16, cy=-.62, keel=.18, flare=.12)),\n ])\n pair_split(\"chest_nacelle\", nacelle, [\n ((1.35, -.8, 13.62), (.22, -.22, 1)),\n ((1.35, -.8, 14.32), (-.18, .18, 1)),\n ], (\"accent\", \"main\", \"accent\"), T, T, gap=.038, bevel=.024)\n\n # Intake lip cowls and recessed dark compressor turbine vanes\n pair(\"intake_lip\", loft([\n (13.48, [(0.88, -1.80), (1.74, -1.62), (1.82, -1.32), (0.92, -1.50)]),\n (14.42, [(0.92, -1.84), (1.80, -1.64), (1.88, -1.34), (0.96, -1.54)]),\n ]), \"trim\", T, T, bevel=.012, panels=False)\n pair(\"intake_vanes\", slats(.98, 1.70, 13.54, 14.36, -1.70, 5, depth=.14, gap=.32), \"frame\", T, T, panels=False)\n\n # High Swept Interceptor Collar Guards & Dorsal Carapace\n collar = loft([\n (14.74, [(0.54, -1.06), (1.54, -.92), (1.66, .58), (0.58, .74)]),\n (15.34, [(0.58, -.94), (1.46, -.78), (1.54, .48), (0.56, .66)]),\n (15.72, [(0.52, -.72), (1.18, -.54), (1.24, .32), (0.48, .52)]),\n ])\n pair_split(\"collar_shroud\", collar, [((1.0, 0, 15.24), (0, -.25, 1))], (\"main\", \"accent\"), T, T, gap=.03, bevel=.018)\n pair(\"collar_trim\", prism([(-.68, 15.36), (.28, 15.36), (.18, 15.72), (-.52, 15.72)], 1.14, 1.28, \"yz\"),\n \"trim\", T, T, bevel=.01, panels=False)\n\n back_shell = loft([\n (12.28, chine_ring(1.94, .74, cy=.98, keel_f=.04, keel_b=.22)),\n (13.65, chine_ring(2.82, .94, cy=1.08, keel_f=.04, keel_b=.28)),\n (14.95, chine_ring(2.44, .86, 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=.022)\n\n\ndef build_head(J):\n N, H = J[\"neck\"], J[\"head\"]\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 split into jaw guard and swept cranium hood\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=.032)\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\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\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.68, [(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 = lr(J, \"shoulder\"), lr(J, \"upperarm\"), lr(J, \"forearm\"), lr(J, \"hand\")\n\n # Shoulder internal trunnion drum & twin hydraulic elevation rams\n pair(\"shoulder_trunnion\", cylinder(.42, 1.52, 2.82, 14, axis=\"x\", at=(.02, 14.70)), \"joint\", *S, smooth=True)\n pair(\"shoulder_block\", loft([\n (14.18, octo(.95, 1.12, .22, x=2.48, y=.02)),\n (15.12, octo(1.05, 1.18, .24, x=2.48, y=.02)),\n ]), \"frame\", *S, bevel=.02, panels=False)\n for k, y in ((\"f\", -.52), (\"b\", .52)):\n pair(f\"shoulder_ram_{k}\", piston((1.56, y, 13.72), (2.32, y * .85, 14.56), r=.095, n=8), \"metal\", *S, smooth=True)\n\n # Canted Aero-Chine Pauldron Carapace split into 3 interlocking plates + outboard delta wing-blade\n cant = rot(\"Y\", -12, about=(2.56, 0, 14.8))\n pauldron = transform(loft([\n (14.22, asym_ring(.44, 1.16, .94, 1.04, cx=2.52, cy=.04, keel=.20, flare=.18)),\n (14.92, asym_ring(.58, 1.64, 1.18, 1.30, cx=2.66, cy=.06, keel=.28, flare=.24)),\n (15.58, asym_ring(.50, 1.48, 1.04, 1.16, cx=2.58, cy=.08, keel=.24, flare=.20)),\n (16.02, asym_ring(.28, .86, .68, .82, cx=2.40, cy=.12, keel=.16, flare=.10)),\n ]), cant)\n pair_split(\"pauldron_shell\", pauldron, [\n ((2.7, 0, 15.10), (.35, -.15, 1)),\n ((2.7, .15, 15.00), (-.2, 1, .2)),\n ], (\"main\", \"accent\", \"main\"), *S, gap=.038, bevel=.022)\n\n wing = transform(loft([\n (14.38, [(3.42, -.70), (4.02, -.48), (4.26, .44), (3.52, .70)]),\n (15.36, [(3.68, -.84), (4.56, -.52), (4.82, .60), (3.76, .86)]),\n (16.22, [(3.36, -.42), (4.02, -.18), (4.24, .74), (3.44, .90)]),\n ]), cant)\n pair(\"pauldron_wing\", wing, \"accent\", *S, bevel=.022)\n pair(\"pauldron_wing_trim\", transform(loft([\n (14.42, [(3.96, -.52), (4.20, -.42), (4.42, .40), (4.18, .44)]),\n (15.40, [(4.48, -.56), (4.72, -.46), (4.96, .56), (4.72, .60)]),\n ]), cant), \"trim\", *S, bevel=.01, panels=False)\n pair(\"pauldron_fin\", prism([(-.56, 15.45), (.88, 15.55), (1.16, 16.42), (-.12, 16.12)], 2.96, 3.12, \"yz\"),\n \"main\", *S, bevel=.016, panels=False)\n pair(\"pauldron_under_slats\", slats(3.3, 3.98, 14.42, 14.78, -.60, 3, depth=.1, gap=.35), \"frame\", *S, panels=False)\n\n # Upper arm swivel drum & split chine bicep shells\n pair(\"upperarm_swivel\", cylinder(.42, 13.86, 14.36, 14, at=(2.58, .02)), \"joint\", *UA, smooth=True)\n pair(\"upperarm_core\", loft([\n (12.18, octo(.68, .74, .18, x=2.62, y=-.02)),\n (13.92, octo(.74, .80, .18, x=2.58, y=.02)),\n ]), \"frame\", *UA, bevel=.02, panels=False)\n bicep = loft([\n (12.36, asym_ring(.38, .60, .54, .58, cx=2.62, cy=-.02, keel=.14)),\n (13.18, asym_ring(.44, .70, .62, .66, cx=2.62, cy=0, keel=.18)),\n (13.84, asym_ring(.42, .66, .58, .62, cx=2.60, cy=.02, keel=.14)),\n ])\n pair_split(\"bicep_shell\", bicep, [((2.6, 0, 13.42), (0, 0, 1))], (\"main\", \"accent\"), *UA, gap=.032, bevel=.018)\n\n # Double-barrel elbow joint, hydraulic actuator, and sculpted forearm vambrace\n pair(\"elbow_drum\", cylinder(.44, 2.16, 3.18, 14, axis=\"x\", at=(-.06, 11.92)), \"joint\", *FA, smooth=True)\n pair(\"elbow_collar\", cylinder(.48, 3.02, 3.16, 14, axis=\"x\", at=(-.06, 11.92)), \"metal\", *FA, smooth=True)\n pair(\"elbow_piston\", piston((2.70, .52, 12.48), (2.74, .42, 11.12), r=.095, n=8), \"metal\", *FA, smooth=True)\n pair(\"forearm_core\", loft([\n (9.58, octo(.56, .66, .14, x=2.76, y=-.18)),\n (11.88, octo(.72, .84, .18, x=2.70, y=-.06)),\n ]), \"frame\", *FA, bevel=.018, panels=False)\n\n vambrace = loft([\n (9.66, asym_ring(.38, .60, .54, .62, cx=2.76, cy=-.18, keel=.14, flare=.10)),\n (10.68, asym_ring(.44, .78, .66, .78, cx=2.74, cy=-.12, keel=.20, flare=.16)),\n (11.68, asym_ring(.46, .84, .70, .86, cx=2.72, cy=-.06, keel=.22, flare=.18)),\n (12.24, asym_ring(.32, .60, .48, .72, cx=2.70, cy=.08, keel=.12, flare=.10)),\n ])\n pair_split(\"vambrace\", vambrace, [\n ((2.74, -.1, 10.22), (0, -.15, 1)),\n ((2.74, -.1, 11.28), (.45, .15, 1)),\n ], (\"accent\", \"main\", \"main\"), *FA, gap=.034, bevel=.02)\n\n # Articulated gauntlet hands\n pair(\"wrist_ball\", cylinder(.28, 9.34, 9.68, 12, at=(2.78, -.20)), \"joint\", *HA, smooth=True)\n pair(\"palm_block\", loft([(8.86, octo(.46, .76, .1, x=2.78, y=-.20)), (9.44, octo(.44, .74, .1, x=2.78, y=-.20))]),\n \"joint\", *HA, bevel=.018, panels=False)\n pair(\"hand_carapace\", loft([\n (8.90, [(2.94, -.60), (3.16, -.54), (3.16, .14), (2.94, .20)]),\n (9.50, [(2.92, -.62), (3.18, -.56), (3.18, .16), (2.92, .22)]),\n ]), \"main\", *HA, bevel=.015, panels=False)\n pair(\"fingers_block\", loft([(8.70, octo(.40, .76, .12, x=2.56, y=-.20)), (9.30, octo(.42, .76, .12, x=2.56, y=-.20))]),\n \"frame\", *HA, bevel=.02, panels=False)\n pair(\"thumb_block\", loft([(8.96, octo(.24, .24, .06, x=2.62, y=-.68)), (9.36, octo(.26, .26, .06, x=2.66, y=-.64))]),\n \"frame\", *HA, bevel=.018, panels=False)\n\n # Left Forearm Faceted Active-Defense Stealth Shield + Right Hand Twin-Rail Hyper-Velocity Lance-Rifle\n build_left_stealth_shield(FA[0])\n build_right_lance_rifle(HA[1])\n\n\ndef build_left_stealth_shield(fa_l):\n \"\"\"A faceted aero-chine active-defense stealth shield on the left forearm with physical seam cuts,\n color blocking, and glowing plasma field emitter.\"\"\"\n sh = loft([\n (8.38, [(3.32, -.62), (3.68, -.32), (3.58, .38), (3.28, .22)]),\n (9.65, [(3.38, -1.18), (3.92, -.42), (3.78, .92), (3.32, .58)]),\n (11.35, [(3.42, -1.36), (4.04, -.38), (3.88, 1.12), (3.36, .72)]),\n (12.78, [(3.36, -.96), (3.86, -.24), (3.74, .78), (3.30, .48)]),\n ])\n sh_lo, sh_hi = halves(sh, (3.65, 0, 10.85), (0, -.22, 1), gap=.038)\n solid(\"shield_hull_lo\", sh_lo, \"main\", fa_l, bevel=.022)\n solid(\"shield_hull_hi\", sh_hi, \"accent\", fa_l, bevel=.022)\n\n trim_bar = loft([\n (10.62, [(3.44, -1.32), (4.06, -.36), (3.90, 1.08), (3.38, .68)]),\n (10.82, [(3.44, -1.34), (4.08, -.36), (3.92, 1.10), (3.38, .70)]),\n ])\n solid(\"shield_chevron_trim\", trim_bar, \"trim\", fa_l, bevel=.01, panels=False)\n\n emitter = loft([\n (9.45, [(3.88, -.52), (4.04, -.38), (3.98, .12), (3.84, .04)]),\n (10.48, [(3.92, -.56), (4.08, -.40), (4.02, .16), (3.88, .08)]),\n ])\n solid(\"shield_emitter_core\", emitter, \"glow_core\", fa_l, outline=False, panels=False)\n\n\ndef build_right_lance_rifle(hand_r):\n \"\"\"A 7.4 m Twin-Rail Hyper-Velocity Lance-Rifle held in the right hand at a 30° forward-ready\n angle so `POSES.stand` and `POSES.flight` display its full profile.\"\"\"\n p0 = Vector((-2.68, -.26, 9.08))\n m = Matrix.Translation(p0) @ rot(\"X\", 30) @ rot(\"Y\", -4)\n\n rec = loft([\n (-1.65, chine_ring(.36, .72, keel_f=.14, keel_b=.08)),\n (0.45, chine_ring(.48, .96, keel_f=.18, keel_b=.10)),\n (1.65, chine_ring(.38, .78, keel_f=.14, keel_b=.10)),\n ])\n solid(\"rifle_receiver\", transform(rec, m), \"main\", hand_r, bevel=.018)\n\n cowl = loft([\n (-2.95, chine_ring(.40, .80, cy=-.06, keel_f=.16, keel_b=.08)),\n (-0.55, chine_ring(.52, .90, cy=-.06, keel_f=.18, keel_b=.10)),\n ])\n solid(\"rifle_cowl\", transform(cowl, m), \"accent\", hand_r, bevel=.018)\n\n for dy in (-.28, .14):\n rail = loft([\n (-6.05, octo(.11, .16, .03, y=dy)),\n (-1.55, octo(.16, .22, .04, y=dy)),\n ])\n solid(f\"rifle_rail_{dy:+.2f}\", transform(rail, m), \"metal\", hand_r, bevel=.01, panels=False)\n\n core = loft([\n (-5.65, octo(.07, .12, .01, y=-.07)),\n (-0.65, octo(.09, .14, .01, y=-.07)),\n ])\n solid(\"rifle_plasma_core\", transform(core, m), \"glow_core\", hand_r, outline=False, panels=False)\n\n scope = loft([\n (-2.55, octo(.18, .28, .04, y=-.56)),\n (-0.75, octo(.20, .32, .04, y=-.56)),\n ])\n solid(\"rifle_scope\", transform(scope, m), \"trim\", hand_r, bevel=.01, panels=False)\n lens = cylinder(.075, -2.62, -2.54, 12, at=(0, -.56))\n solid(\"rifle_scope_lens\", transform(lens, m), \"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 # Splayed Heroic A-Stance Thighs: from hip (1.20, -.02, 10.45) to knee (1.44, -.22, 6.02)\n pair(\"hip_ball_joint\", cylinder(.48, .58, 1.62, 14, axis=\"x\", at=(-.02, 10.45)), \"joint\", *TH, smooth=True)\n pair(\"thigh_core\", loft([\n (6.48, octo(.78, .92, .20, x=1.42, y=-.20)),\n (8.65, octo(1.16, 1.34, .28, x=1.30, y=-.10)),\n (10.22, octo(1.06, 1.22, .26, x=1.20, y=-.02)),\n ]), \"frame\", *TH, bevel=.025, panels=False)\n pair(\"thigh_ram_f\", piston((.92, -.68, 10.25), (1.10, -.76, 8.65), r=.10, n=8), \"metal\", *TH, smooth=True)\n pair(\"thigh_ram_b\", piston((1.22, .68, 10.30), (1.36, .52, 7.45), r=.12, n=8), \"joint\", *TH, smooth=True)\n\n thigh_shell = loft([\n (6.68, asym_ring(.52, .70, .74, .76, cx=1.42, cy=-.20, keel=.20, flare=.12)),\n (8.08, asym_ring(.66, .94, .92, .94, cx=1.34, cy=-.14, keel=.26, flare=.18)),\n (9.32, asym_ring(.68, 1.00, .96, .98, cx=1.26, cy=-.06, keel=.26, flare=.20)),\n (10.05, asym_ring(.54, .80, .78, .82, cx=1.20, cy=-.02, keel=.16, flare=.12)),\n ])\n pair_split(\"thigh_shell\", thigh_shell, [\n ((1.32, -.1, 8.38), (.32, -.18, 1)),\n ((1.66, -.1, 8.45), (1, .12, -.15)),\n ], (\"main\", \"main\", \"accent\"), *TH, gap=.038, bevel=.022)\n pair(\"thigh_louver_trim\", loft([\n (7.45, [(1.98, -.44), (2.18, -.40), (2.20, .16), (2.00, .20)]),\n (9.08, [(2.04, -.38), (2.24, -.34), (2.26, .24), (2.06, .28)]),\n ]), \"trim\", *TH, bevel=.01, panels=False)\n\n # Double-jointed knee drum, outboard sensor disc, and high-peaked keeled knee-guard prow\n pair(\"knee_drum\", cylinder(.50, .88, 2.00, 14, axis=\"x\", at=(-.22, 6.02)), \"joint\", *SH, smooth=True)\n pair(\"knee_disc\", cylinder(.46, 1.98, 2.18, 16, axis=\"x\", at=(-.14, 6.06)), \"accent\", *SH, smooth=True)\n pair(\"knee_ring\", cylinder(.34, 2.16, 2.24, 16, axis=\"x\", at=(-.14, 6.06)), \"metal\", *SH, smooth=True)\n pair(\"knee_sensor\", cylinder(.22, 2.22, 2.28, 14, axis=\"x\", at=(-.14, 6.06)), \"sensor\", *SH, smooth=True)\n\n kneecap = loft([\n (5.28, chine_ring(.84, .74, cx=1.46, cy=-.88, keel_f=.24, keel_b=.02)),\n (6.16, chine_ring(1.08, .98, cx=1.44, cy=-1.02, keel_f=.36, keel_b=.04)),\n (6.88, chine_ring(.90, .84, cx=1.42, cy=-.94, keel_f=.30, keel_b=.04)),\n (7.38, chine_ring(.48, .54, cx=1.40, cy=-.76, keel_f=.18, keel_b=.02)),\n ])\n k_lo, k_hi = halves(kneecap, (1.44, -1.0, 6.32), (0, -.25, 1), gap=.032)\n pair(\"kneecap_lo\", k_lo, \"main\", *SH, bevel=.022)\n pair(\"kneecap_hi\", k_hi, \"accent\", *SH, bevel=.022)\n pair(\"kneecap_spike\", prism([(-1.38, 5.92), (-1.16, 5.92), (-1.02, 7.22), (-1.26, 7.08)], 1.36, 1.52, \"yz\"),\n \"trim\", *SH, bevel=.01, panels=False)\n\n # Splayed Shin Core, Knee & Achilles Pistons, and Sculpted Aero-Chine Greaves (knee x=1.44 -> ankle x=1.68)\n pair(\"shin_core\", loft([\n (1.68, octo(.82, .96, .20, x=1.66, y=.04)),\n (5.72, octo(.96, 1.12, .24, x=1.46, y=-.18)),\n ]), \"frame\", *SH, bevel=.025, panels=False)\n pair(\"knee_piston\", piston((1.44, .48, 7.18), (1.50, .62, 5.32), r=.105, n=8), \"metal\", *SH, smooth=True)\n pair(\"achilles_piston\", piston((1.62, .72, 2.62), (1.66, .86, 1.68), r=.085, n=8), \"metal\", *SH, smooth=True)\n\n greave = loft([\n (1.82, asym_ring(.58, .78, .82, .88, cx=1.66, cy=.02, keel=.22, flare=.14)),\n (2.85, asym_ring(.70, 1.00, .96, 1.14, cx=1.60, cy=-.04, keel=.28, flare=.20)),\n (4.18, asym_ring(.74, 1.14, .98, 1.38, cx=1.52, cy=-.06, keel=.30, flare=.24)),\n (5.40, asym_ring(.58, .84, .80, 1.02, cx=1.46, cy=-.14, keel=.20, flare=.14)),\n ])\n pair_split(\"greave_shell\", greave, [\n ((1.58, 0, 3.32), (.28, -.22, 1)),\n ((1.58, .20, 3.80), (-.15, 1, .18)),\n ], (\"accent\", \"main\", \"main\"), *SH, gap=.038, bevel=.022)\n\n # Swept Rear Calf Vector-Thruster Nacelle & Twin Calf Nozzles\n calf_pod = loft([\n (3.38, chine_ring(.94, .78, cx=1.56, cy=1.12, keel_f=.04, keel_b=.26)),\n (4.48, chine_ring(1.14, 1.02, cx=1.52, cy=1.28, keel_f=.04, keel_b=.34)),\n (5.26, chine_ring(.86, .74, cx=1.48, cy=1.06, keel_f=.04, keel_b=.20)),\n ])\n pair(\"calf_thruster_pod\", calf_pod, \"accent\", *SH, bevel=.022)\n pair(\"calf_thruster_trim\", prism([(1.06, 3.58), (1.68, 3.86), (1.62, 4.94), (1.06, 4.94)], 1.44, 1.60, \"yz\"),\n \"trim\", *SH, bevel=.01, panels=False)\n pair(\"calf_vents\", slats(1.30, 1.84, 2.24, 3.08, 1.00, 4, depth=.1, gap=.32), \"frame\", *SH, panels=False)\n nozzle_pair(\"calf\", (1.54, 1.36, 4.12), (0, .52, -.85), .32, .56, *SH, housing=False)\n\n # Wide-Stance Articulated Raptor Talon Sabatons at x=1.68\n pair(\"ankle_ball\", cylinder(.42, 1.22, 2.14, 14, axis=\"x\", at=(.06, 1.52)), \"joint\", *FT, smooth=True)\n pair(\"ankle_collar\", cylinder(.46, 2.00, 2.16, 14, axis=\"x\", at=(.06, 1.52)), \"metal\", *FT, smooth=True)\n\n spat = loft([\n (1.02, chine_ring(.98, .72, cx=1.68, cy=-.62, keel_f=.22, keel_b=.04)),\n (1.78, chine_ring(1.08, .82, cx=1.66, cy=-.68, keel_f=.28, keel_b=.04)),\n (2.26, chine_ring(.68, .56, cx=1.64, 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.58, 1.74, \"yz\"),\n \"trim\", *FT, bevel=.01, panels=False)\n\n sabaton = loft([\n (0.12, chine_ring(1.24, 2.46, cx=1.68, cy=-1.04, keel_f=.36, keel_b=.08)),\n (0.58, chine_ring(1.18, 2.30, cx=1.68, cy=-.98, keel_f=.32, keel_b=.08)),\n (1.08, chine_ring(.88, 1.44, cx=1.68, cy=-.48, keel_f=.20, keel_b=.06)),\n ])\n sab_toe, sab_instep = halves(sabaton, (1.68, -1.44, 0.5), (0, 1, .18), gap=.036)\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, .80, cx=1.68, cy=-2.12, keel_f=.30, keel_b=.02)),\n (0.52, chine_ring(.56, .68, cx=1.68, cy=-2.02, keel_f=.24, keel_b=.02)),\n ]), \"trim\", *FT, bevel=.016, panels=False)\n\n heel = loft([\n (0.10, chine_ring(1.08, 1.12, cx=1.68, cy=1.08, keel_f=.04, keel_b=.24)),\n (0.68, chine_ring(.96, .98, cx=1.68, cy=1.02, keel_f=.04, keel_b=.20)),\n (1.06, chine_ring(.72, .72, cx=1.68, 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.16, 1.60, .22, x=1.68, y=-1.40)),\n (0.12, octo(1.20, 1.66, .22, x=1.68, y=-1.40)),\n ]), \"joint\", *FT, bevel=.015, panels=False)\n pair(\"sole_heel\", loft([\n (0.0, octo(1.04, 1.06, .20, x=1.68, y=1.06)),\n (0.12, octo(1.08, 1.10, .20, x=1.68, 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, Propellant Tanks, and Quad Main Nozzles\n pack = loft([\n (12.32, chine_ring(1.92, 1.18, cy=1.68, keel_f=.04, keel_b=.24)),\n (13.35, chine_ring(2.32, 1.48, cy=1.84, keel_f=.04, keel_b=.34)),\n (14.42, chine_ring(2.24, 1.42, cy=1.82, keel_f=.04, keel_b=.32)),\n (15.08, chine_ring(1.56, 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=.036)\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 ], -.11, .11, \"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)), (3.04, circle(.48, 16, 0, 13.85))], axis=\"y\"),\n \"frame\", B, smooth=True)\n solid(\"pack_turbine_collar\", loft([(2.30, circle(.86, 16, 0, 13.85)), (2.56, circle(.86, 16, 0, 13.85))], axis=\"y\"),\n \"metal\", B, smooth=True)\n solid(\"pack_turbine_glow\", loft([(2.98, circle(.28, 14, 0, 13.85)), (3.08, 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=(.98, 1.92)), \"metal\", B, B, smooth=True)\n pair(\"pack_tank_band\", cylinder(.37, 13.15, 13.45, 14, at=(.98, 1.92)), \"trim\", B, B, smooth=True)\n\n # Quad Main Thruster Array: Twin Primary Vector Bells + Twin Outboard Booster Bells\n pair(\"main_shroud\", loft([\n (12.08, asym_ring(.28, .48, .48, .56, cx=.56, cy=2.08, keel=.12)),\n (12.78, asym_ring(.36, .60, .58, .66, cx=.56, cy=2.02, keel=.14)),\n ]), \"accent\", B, B, bevel=.018)\n nozzle_pair(\"main\", (.56, 2.08, 12.50), (0, .46, -.89), .46, .88, B, B)\n nozzle_pair(\"main_aux\", (1.14, 1.96, 12.62), (.12, .52, -.84), .30, .58, B, B, housing=False)\n\n # Twin Variable-Sweep Aero-Binders on J[\"binder\", \"L/R\"]\n for s, sx in ((\"L\", 1), (\"R\", -1)):\n j = J[\"binder\", s]\n pivot = Vector((.94 * sx, 2.26, 14.74))\n m = Matrix.Translation(pivot) @ rot(\"Y\", 36 * 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 boom = loft([\n (-.92, octo(.38, .56, .08)),\n (0.48, octo(.46, .70, .10)),\n (2.35, octo(.28, .46, .06)),\n ])\n solid(f\"binder_boom.{s}\", transform(boom, m), \"frame\", j, bevel=.016, panels=False)\n\n wing_lo = prism([(-.76, -.82), (.54, -.64), (.72, 1.24), (-.48, 0.96)], .09 * sx - .09, .09 * sx + .09, \"yz\")\n wing_hi = prism([(-.46, 1.02), (.70, 1.30), (.42, 3.25), (-.24, 3.48), (-.62, 2.35)], .09 * sx - .08, .09 * sx + .08, \"yz\")\n trim_le = prism([(.50, -.60), (.68, -.54), (.86, 1.28), (.56, 3.22), (.40, 3.22), (.70, 1.26)], .09 * sx - .05, .09 * sx + .05, \"yz\")\n glow_fin = prism([(-.58, 1.18), (-.40, 1.18), (-.20, 2.85), (-.38, 2.85)], .09 * sx - .04, .09 * 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 bell, glow = nozzle(.34, .64)\n down = m.to_3x3() @ Vector((0, 0, -1))\n at = m @ Vector((0, 0, -.86))\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 * .64, j, dir=gltf_dir(down), radius=.34)\n\n\ndef build_kestrel():\n J = kestrel_joints()\n build_pelvis(J)\n build_waist(J)\n build_torso(J)\n build_head(J)\n J[\"neck\"].location.z -= .22\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": "\"\"\"XF-00 Kestrel: high-agility orbital interceptor on the shared 17.6 m 22-joint striker skeleton.\n\nBuilt to surpass the control `striker` on its own renderer rules (`DetailShader` normal/depth/role\nink + toon cel shading + volumetric thruster plumes):\n 1. Multi-station 3D aero-chine cross-section lofts (`chine_ring`, `asym_ring`) physically sliced\n by 3D bisect planes (`pair_split` -> `lib.panels` with 3.5 cm real gaps over a dark `frame`\n skeleton) and beveled + inset with `lib.panel_lines()`, so `DetailShader` draws crisp mechanical\n ink lines and panel seams on every plate with zero smooth-surface z-fighting.\n 2. Planted heroic A-stance baked into the 22-joint rest skeleton: shoulders sit wider and higher,\n legs splay from hip (x=1.20) through knee (x=1.44, y=-0.22) to ankle (x=1.68, y=0.06), so in\n `POSES.stand` during a 360° turntable the Kestrel stands in a wide athletic stance beside the\n control `striker`.\n 3. Full interceptor architecture: armored orbital cockpit prow (`cockpit` joint) with panoramic\n tinted visor canopy + glowing HUD slit, recessed central Tokamak harmonic chest lens, canted\n compressor intake nacelles with turbine slats, exposed chrome hydraulic waist/knee/ankle rams,\n a 7.2 m Twin-Rail Hyper-Velocity Lance-Rifle poised at 32° on `hand.R`, a faceted active-defense\n Aero-Shield on `forearm.L`, and an 8-nozzle propulsion suite (quad main pack + twin wing-binders\n + twin calf nacelles).\n\"\"\"\nimport bpy\nfrom mathutils import Matrix, Vector\n\nfrom lib import (\n circle, cylinder, empty, halves, loft, nozzle, octo,\n panels, piston, prism, rot, slats, solid, 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.02, panels_on=True):\n \"\"\"Split a left-side bmesh by 3D seam planes [(co, no), ...] into separated armor plates with\n real physical gaps, bevels, and recessed panel-line borders.\"\"\"\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 clip_half(bm):\n \"\"\"Keep the left (+X > 0.03) half of a symmetric bmesh so pair_split mirrors it cleanly.\"\"\"\n _, left = halves(bm, (0.02, 0, 0), (-1, 0, 0), gap=0.04)\n return left\n\n\ndef kestrel_joints():\n \"\"\"The shared 22-joint striker skeleton adjusted into a planted, wide-shouldered heroic A-stance.\"\"\"\n J = striker_joints()\n J[\"frame\"][\"frame\"] = \"block_dummy\"\n J[\"frame\"][\"height\"] = 17.6\n place_map = {o.name: o.matrix_world.translation.copy() for o in J.values()}\n overrides = {\n \"pelvis\": (0, 0, 10.48),\n \"waist\": (0, 0, 11.04),\n \"torso\": (0, 0, 11.90),\n \"neck\": (0, -.04, 15.26),\n \"head\": (0, -.08, 15.84),\n \"shoulder\": (2.14, .02, 14.70),\n \"upperarm\": (2.58, .02, 14.40),\n \"forearm\": (2.70, -.06, 11.92),\n \"hand\": (2.78, -.20, 9.56),\n \"grip\": (2.64, -.26, 9.08),\n \"thigh\": (1.20, -.02, 10.45),\n \"shin\": (1.44, -.22, 6.02),\n \"foot\": (1.68, .06, 1.52),\n \"binder\": (.94, 2.26, 14.74),\n }\n for k, at in overrides.items():\n if f\"{k}.L\" in place_map:\n place_map[f\"{k}.L\"] = Vector(at)\n place_map[f\"{k}.R\"] = Vector((-at[0], at[1], at[2]))\n else:\n place_map[k] = Vector(at)\n for o in J.values():\n if o.parent is not None:\n o.location = o.parent.matrix_world.inverted() @ place_map[o.name]\n bpy.context.view_layer.update()\n return J\n\n\ndef build_pelvis(J):\n P = J[\"pelvis\"]\n solid(\"pelvis_core\", loft([\n (9.68, octo(1.08, 1.25, .24)),\n (10.22, octo(2.22, 1.58, .36)),\n (10.92, octo(2.08, 1.50, .34)),\n ]), \"frame\", P, bevel=.025, panels=False)\n pair(\"hip_trunnion\", cylinder(.42, .45, 1.82, 14, axis=\"x\", at=(-.02, 10.45)), \"joint\", P, P, smooth=True)\n pair(\"hip_collar\", cylinder(.48, 1.46, 1.66, 14, axis=\"x\", at=(-.02, 10.45)), \"metal\", P, P, smooth=True)\n\n # Sculpted aero-chine belt girdle\n belt = loft([\n (10.50, chine_ring(2.98, 1.88, keel_f=.22, keel_b=.16)),\n (10.82, chine_ring(2.68, 1.76, keel_f=.26, keel_b=.14)),\n (11.04, chine_ring(2.14, 1.58, keel_f=.18, keel_b=.12)),\n ])\n solid(\"belt_girdle\", belt, \"main\", P, bevel=.022)\n\n # Forward sensor & vernier codpiece prow\n cod = loft([\n (9.38, chine_ring(.46, .74, cy=-.64, keel_f=.18, keel_b=.04)),\n (9.95, chine_ring(.72, 1.06, cy=-.72, keel_f=.30, keel_b=.06)),\n (10.58, chine_ring(.68, .98, cy=-.66, keel_f=.24, keel_b=.06)),\n (10.98, chine_ring(.52, .80, cy=-.60, keel_f=.14, keel_b=.04)),\n ])\n cod_lo, cod_hi = halves(cod, (0, -.8, 10.18), (0, -.25, 1), gap=.032)\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([(-.11, 9.52), (.11, 9.52), (.08, 10.88), (-.08, 10.88)], -1.22, -.94, \"xz\"),\n \"trim\", P, bevel=.012, panels=False)\n\n # Swept two-piece chevron front flight skirts angled over the splayed thighs\n sf = loft([\n (9.28, [(0.44, -1.24), (1.22, -1.16), (1.84, -.88), (1.72, -.70), (0.40, -.98)]),\n (10.02, [(0.38, -1.30), (1.34, -1.20), (2.06, -.84), (1.94, -.64), (0.34, -1.02)]),\n (10.68, [(0.36, -1.18), (1.26, -1.08), (1.90, -.78), (1.78, -.58), (0.32, -.94)]),\n ])\n pair_split(\"skirt_front\", sf, [((1.18, -1.0, 9.98), (.84, -.15, .50))], (\"main\", \"accent\"), P, P, gap=.036, bevel=.022)\n pair(\"skirt_front_lip\", loft([\n (9.14, [(0.48, -1.22), (1.68, -.92), (1.58, -.76), (0.44, -1.04)]),\n (9.32, [(0.44, -1.26), (1.76, -.90), (1.66, -.74), (0.40, -1.06)]),\n ]), \"trim\", P, P, bevel=.012, panels=False)\n\n # Side hip vernier fairings\n ss = loft([\n (9.28, asym_ring(.18, .44, .84, .94, cx=2.08, cy=.04, keel=.14)),\n (10.10, asym_ring(.22, .54, .98, 1.10, cx=2.14, cy=.02, keel=.18)),\n (10.72, asym_ring(.20, .40, .86, .96, cx=2.02, cy=.02, keel=.12)),\n ])\n pair_split(\"skirt_side\", ss, [((2.15, 0, 10.28), (0, .1, 1))], (\"main\", \"accent\"), P, P, gap=.032, bevel=.02)\n pair(\"skirt_side_vane\", prism([(-.68, 9.48), (.74, 9.48), (.66, 10.22), (-.60, 10.22)], 2.34, 2.48, \"yz\"),\n \"trim\", P, P, bevel=.01, panels=False)\n\n # Two-stage rear vernier tail skirts & central dorsal tail stabilizer boom\n sr = loft([\n (9.18, [(0.22, .88), (0.94, 1.26), (1.66, 1.02), (1.56, .76), (0.20, .68)]),\n (9.96, [(0.20, .96), (1.02, 1.40), (1.80, 1.12), (1.68, .82), (0.18, .74)]),\n (10.68, [(0.20, .88), (0.92, 1.24), (1.58, .98), (1.48, .74), (0.18, .68)]),\n ])\n pair_split(\"skirt_rear\", sr, [((0.95, 1.1, 9.92), (.25, -.1, 1))], (\"accent\", \"main\"), P, P, gap=.035, bevel=.022)\n tail = loft([\n (8.62, chine_ring(.32, .58, cy=1.78, keel_f=.04, keel_b=.18)),\n (9.62, chine_ring(.52, .92, cy=1.46, keel_f=.04, keel_b=.24)),\n (10.58, chine_ring(.64, .98, cy=1.12, keel_f=.04, keel_b=.20)),\n ])\n solid(\"tail_stabilizer\", tail, \"accent\", P, bevel=.02)\n solid(\"tail_fin\", prism([(1.18, 9.12), (2.04, 8.58), (2.18, 9.28), (1.46, 10.52)], -.07, .07, \"yz\"),\n \"trim\", P, bevel=.01, panels=False)\n\n\ndef build_waist(J):\n W = J[\"waist\"]\n solid(\"spine_core\", cylinder(.50, 10.86, 12.06, 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 - .10, chine_ring(1.52 + i * .10, 1.34 + i * .08, keel_f=.14, keel_b=.12)),\n (z + .10, chine_ring(1.58 + i * .10, 1.38 + i * .08, keel_f=.16, keel_b=.12)),\n ]), \"frame\", W, bevel=.018, panels=False)\n\n # Tiered forward abdominal armor plates (accent middle rib between main upper and frame lower)\n for i, (z0, z1, w, y, role) in enumerate((\n (10.98, 11.32, 1.16, -.78, \"frame\"),\n (11.30, 11.64, 1.30, -.84, \"accent\"),\n (11.62, 11.98, 1.46, -.90, \"main\"),\n )):\n ab = loft([\n (z0, chine_ring(w, .56, cy=y, keel_f=.18, keel_b=.02)),\n (z1, chine_ring(w + .10, .62, cy=y - .03, keel_f=.22, keel_b=.02)),\n ])\n solid(f\"abs_plate_{i}\", ab, role, W, bevel=.016, panels=False)\n\n pair(\"waist_piston_f\", piston((.78, -.20, 10.90), (.90, -.26, 12.00), r=.115, n=10), \"metal\", W, W, smooth=True)\n pair(\"waist_piston_b\", piston((.72, .48, 10.92), (.84, .54, 11.98), r=.105, n=10), \"joint\", W, W, smooth=True)\n\n\ndef build_torso(J):\n T, C = J[\"torso\"], J[\"cockpit\"]\n # Recessed dark structural core & lateral Tokamak reactor drums visible between chest plates\n solid(\"torso_core\", loft([\n (11.88, octo(1.82, 1.50, .36)),\n (12.65, octo(2.62, 1.98, .48)),\n (13.95, octo(3.02, 2.24, .54)),\n (14.95, octo(2.72, 2.02, .48)),\n (15.36, octo(1.72, 1.42, .36)),\n ]), \"frame\", T, bevel=.025, panels=False)\n pair(\"reactor_drum\", cylinder(.58, 1.18, 1.72, 16, axis=\"x\", at=(.18, 13.46)), \"joint\", T, T, smooth=True)\n pair(\"reactor_coil\", cylinder(.62, 1.34, 1.54, 16, axis=\"x\", at=(.18, 13.46)), \"metal\", T, T, smooth=True)\n pair(\"reactor_glow\", cylinder(.38, 1.70, 1.76, 14, axis=\"x\", at=(.18, 13.46)), \"glow_core\", T, T, outline=False)\n\n # Central Fighter-Nose Orbital Cockpit Module on J[\"cockpit\"]\n prow = loft([\n (12.12, chine_ring(1.06, .82, cy=-.94, keel_f=.20, keel_b=.04)),\n (12.82, chine_ring(1.32, 1.22, cy=-1.14, keel_f=.34, keel_b=.06)),\n (13.84, chine_ring(1.36, 1.34, cy=-1.20, keel_f=.38, keel_b=.06)),\n (14.68, chine_ring(1.12, 1.08, cy=-1.04, keel_f=.26, keel_b=.04)),\n (15.08, chine_ring(.78, .76, cy=-.86, keel_f=.14, keel_b=.04)),\n ])\n prow_lo, prow_hi = halves(prow, (0, -1.3, 13.68), (0, -.28, 1), gap=.035)\n solid(\"cockpit_prow_lo\", prow_lo, \"main\", C, bevel=.022)\n solid(\"cockpit_prow_hi\", prow_hi, \"accent\", C, bevel=.022)\n\n # Panoramic armored glass canopy & internal glowing HUD slit on the upper cockpit prow\n canopy = loft([\n (13.82, chine_ring(1.04, .66, cy=-1.42, keel_f=.26, keel_b=.02)),\n (14.24, chine_ring(1.08, .70, cy=-1.45, keel_f=.28, keel_b=.02)),\n (14.64, chine_ring(.84, .56, cy=-1.28, keel_f=.18, keel_b=.02)),\n ])\n solid(\"cockpit_canopy\", canopy, \"visor\", C, bevel=.012, panels=False)\n solid(\"cockpit_hud_slit\", loft([\n (14.02, chine_ring(.92, .42, cy=-1.58, keel_f=.22, keel_b=.01)),\n (14.16, chine_ring(.94, .44, cy=-1.59, keel_f=.22, keel_b=.01)),\n ]), \"glow_core\", C, outline=False, panels=False)\n solid(\"cockpit_rescue_trim\", loft([\n (13.72, chine_ring(1.14, .68, cy=-1.40, keel_f=.28, keel_b=.02)),\n (13.82, chine_ring(1.16, .70, cy=-1.42, keel_f=.28, keel_b=.02)),\n ]), \"trim\", C, bevel=.01, panels=False)\n\n # Central Recessed Tokamak Harmonic Lens in the chest keel (proud of cockpit_prow_lo at y=-1.92..-2.18)\n solid(\"chest_lens_socket\", prism(circle(.46, 12, 0, 13.15), -2.08, -1.55, \"xz\"), \"frame\", C, bevel=.025, panels=False)\n solid(\"chest_lens_ring\", prism(circle(.38, 12, 0, 13.15), -2.14, -2.04, \"xz\"), \"trim\", C, bevel=.012, panels=False)\n solid(\"chest_lens_glass\", cylinder(.29, -2.17, -2.10, 16, axis=\"y\", at=(0, 13.15)), \"sensor\", C, smooth=True)\n solid(\"chest_lens_core\", cylinder(.14, -2.19, -2.14, 12, axis=\"y\", at=(0, 13.15)), \"glow_core\", C, outline=False)\n\n # Ventral belly radiator slats below the cockpit prow\n solid(\"belly_vent_housing\", loft([\n (11.94, chine_ring(1.52, .68, cy=-.92, keel_f=.16, keel_b=.02)),\n (12.48, chine_ring(1.76, .78, cy=-.98, keel_f=.18, keel_b=.02)),\n ]), \"main\", T, bevel=.02)\n solid(\"belly_slats\", slats(-.52, .52, 12.04, 12.42, -1.32, 3, depth=.10, gap=.34), \"frame\", T, panels=False)\n\n # Twin Canted Compressor Intake Nacelles flanking the cockpit prow (separated by dark frame channel)\n nacelle = loft([\n (12.48, asym_ring(.20, .72, .78, .82, cx=1.14, cy=-.72, keel=.18, flare=.14)),\n (13.42, asym_ring(.26, .98, 1.08, .96, cx=1.28, cy=-.82, keel=.26, flare=.18)),\n (14.38, asym_ring(.28, 1.06, 1.14, .98, cx=1.34, cy=-.78, keel=.28, flare=.20)),\n (14.96, asym_ring(.22, .78, .86, .82, cx=1.16, cy=-.62, keel=.18, flare=.12)),\n ])\n pair_split(\"chest_nacelle\", nacelle, [\n ((1.35, -.8, 13.62), (.22, -.22, 1)),\n ((1.35, -.8, 14.32), (-.18, .18, 1)),\n ], (\"accent\", \"main\", \"accent\"), T, T, gap=.038, bevel=.024)\n\n # Intake lip cowls and recessed dark compressor turbine vanes\n pair(\"intake_lip\", loft([\n (13.48, [(0.88, -1.80), (1.74, -1.62), (1.82, -1.32), (0.92, -1.50)]),\n (14.42, [(0.92, -1.84), (1.80, -1.64), (1.88, -1.34), (0.96, -1.54)]),\n ]), \"trim\", T, T, bevel=.012, panels=False)\n pair(\"intake_vanes\", slats(.98, 1.70, 13.54, 14.36, -1.70, 5, depth=.14, gap=.32), \"frame\", T, T, panels=False)\n\n # High Swept Interceptor Collar Guards & Dorsal Carapace\n collar = loft([\n (14.74, [(0.54, -1.06), (1.54, -.92), (1.66, .58), (0.58, .74)]),\n (15.34, [(0.58, -.94), (1.46, -.78), (1.54, .48), (0.56, .66)]),\n (15.72, [(0.52, -.72), (1.18, -.54), (1.24, .32), (0.48, .52)]),\n ])\n pair_split(\"collar_shroud\", collar, [((1.0, 0, 15.24), (0, -.25, 1))], (\"main\", \"accent\"), T, T, gap=.03, bevel=.018)\n pair(\"collar_trim\", prism([(-.68, 15.36), (.28, 15.36), (.18, 15.72), (-.52, 15.72)], 1.14, 1.28, \"yz\"),\n \"trim\", T, T, bevel=.01, panels=False)\n\n back_shell = loft([\n (12.28, chine_ring(1.94, .74, cy=.98, keel_f=.04, keel_b=.22)),\n (13.65, chine_ring(2.82, .94, cy=1.08, keel_f=.04, keel_b=.28)),\n (14.95, chine_ring(2.44, .86, 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=.022)\n\n\ndef build_head(J):\n N, H = J[\"neck\"], J[\"head\"]\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 split into jaw guard and swept cranium hood\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=.032)\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\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\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.68, [(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 = lr(J, \"shoulder\"), lr(J, \"upperarm\"), lr(J, \"forearm\"), lr(J, \"hand\")\n\n # Shoulder internal trunnion drum & twin hydraulic elevation rams\n pair(\"shoulder_trunnion\", cylinder(.42, 1.52, 2.82, 14, axis=\"x\", at=(.02, 14.70)), \"joint\", *S, smooth=True)\n pair(\"shoulder_block\", loft([\n (14.18, octo(.95, 1.12, .22, x=2.48, y=.02)),\n (15.12, octo(1.05, 1.18, .24, x=2.48, y=.02)),\n ]), \"frame\", *S, bevel=.02, panels=False)\n for k, y in ((\"f\", -.52), (\"b\", .52)):\n pair(f\"shoulder_ram_{k}\", piston((1.56, y, 13.72), (2.32, y * .85, 14.56), r=.095, n=8), \"metal\", *S, smooth=True)\n\n # Canted Aero-Chine Pauldron Carapace split into 3 interlocking plates + outboard delta wing-blade\n cant = rot(\"Y\", -12, about=(2.56, 0, 14.8))\n pauldron = transform(loft([\n (14.22, asym_ring(.44, 1.16, .94, 1.04, cx=2.52, cy=.04, keel=.20, flare=.18)),\n (14.92, asym_ring(.58, 1.64, 1.18, 1.30, cx=2.66, cy=.06, keel=.28, flare=.24)),\n (15.58, asym_ring(.50, 1.48, 1.04, 1.16, cx=2.58, cy=.08, keel=.24, flare=.20)),\n (16.02, asym_ring(.28, .86, .68, .82, cx=2.40, cy=.12, keel=.16, flare=.10)),\n ]), cant)\n pair_split(\"pauldron_shell\", pauldron, [\n ((2.7, 0, 15.10), (.35, -.15, 1)),\n ((2.7, .15, 15.00), (-.2, 1, .2)),\n ], (\"main\", \"accent\", \"main\"), *S, gap=.038, bevel=.022)\n\n wing = transform(loft([\n (14.38, [(3.42, -.70), (4.02, -.48), (4.26, .44), (3.52, .70)]),\n (15.36, [(3.68, -.84), (4.56, -.52), (4.82, .60), (3.76, .86)]),\n (16.22, [(3.36, -.42), (4.02, -.18), (4.24, .74), (3.44, .90)]),\n ]), cant)\n pair(\"pauldron_wing\", wing, \"accent\", *S, bevel=.022)\n pair(\"pauldron_wing_trim\", transform(loft([\n (14.42, [(3.96, -.52), (4.20, -.42), (4.42, .40), (4.18, .44)]),\n (15.40, [(4.48, -.56), (4.72, -.46), (4.96, .56), (4.72, .60)]),\n ]), cant), \"trim\", *S, bevel=.01, panels=False)\n pair(\"pauldron_fin\", prism([(-.56, 15.45), (.88, 15.55), (1.16, 16.42), (-.12, 16.12)], 2.96, 3.12, \"yz\"),\n \"main\", *S, bevel=.016, panels=False)\n pair(\"pauldron_under_slats\", slats(3.3, 3.98, 14.42, 14.78, -.60, 3, depth=.1, gap=.35), \"frame\", *S, panels=False)\n\n # Upper arm swivel drum & split chine bicep shells\n pair(\"upperarm_swivel\", cylinder(.42, 13.86, 14.36, 14, at=(2.58, .02)), \"joint\", *UA, smooth=True)\n pair(\"upperarm_core\", loft([\n (12.18, octo(.68, .74, .18, x=2.62, y=-.02)),\n (13.92, octo(.74, .80, .18, x=2.58, y=.02)),\n ]), \"frame\", *UA, bevel=.02, panels=False)\n bicep = loft([\n (12.36, asym_ring(.38, .60, .54, .58, cx=2.62, cy=-.02, keel=.14)),\n (13.18, asym_ring(.44, .70, .62, .66, cx=2.62, cy=0, keel=.18)),\n (13.84, asym_ring(.42, .66, .58, .62, cx=2.60, cy=.02, keel=.14)),\n ])\n pair_split(\"bicep_shell\", bicep, [((2.6, 0, 13.42), (0, 0, 1))], (\"main\", \"accent\"), *UA, gap=.032, bevel=.018)\n\n # Double-barrel elbow joint, hydraulic actuator, and sculpted forearm vambrace\n pair(\"elbow_drum\", cylinder(.44, 2.16, 3.18, 14, axis=\"x\", at=(-.06, 11.92)), \"joint\", *FA, smooth=True)\n pair(\"elbow_collar\", cylinder(.48, 3.02, 3.16, 14, axis=\"x\", at=(-.06, 11.92)), \"metal\", *FA, smooth=True)\n pair(\"elbow_piston\", piston((2.70, .52, 12.48), (2.74, .42, 11.12), r=.095, n=8), \"metal\", *FA, smooth=True)\n pair(\"forearm_core\", loft([\n (9.58, octo(.56, .66, .14, x=2.76, y=-.18)),\n (11.88, octo(.72, .84, .18, x=2.70, y=-.06)),\n ]), \"frame\", *FA, bevel=.018, panels=False)\n\n vambrace = loft([\n (9.66, asym_ring(.38, .60, .54, .62, cx=2.76, cy=-.18, keel=.14, flare=.10)),\n (10.68, asym_ring(.44, .78, .66, .78, cx=2.74, cy=-.12, keel=.20, flare=.16)),\n (11.68, asym_ring(.46, .84, .70, .86, cx=2.72, cy=-.06, keel=.22, flare=.18)),\n (12.24, asym_ring(.32, .60, .48, .72, cx=2.70, cy=.08, keel=.12, flare=.10)),\n ])\n pair_split(\"vambrace\", vambrace, [\n ((2.74, -.1, 10.22), (0, -.15, 1)),\n ((2.74, -.1, 11.28), (.45, .15, 1)),\n ], (\"accent\", \"main\", \"main\"), *FA, gap=.034, bevel=.02)\n\n # Articulated gauntlet hands\n pair(\"wrist_ball\", cylinder(.28, 9.34, 9.68, 12, at=(2.78, -.20)), \"joint\", *HA, smooth=True)\n pair(\"palm_block\", loft([(8.86, octo(.46, .76, .1, x=2.78, y=-.20)), (9.44, octo(.44, .74, .1, x=2.78, y=-.20))]),\n \"joint\", *HA, bevel=.018, panels=False)\n pair(\"hand_carapace\", loft([\n (8.90, [(2.94, -.60), (3.16, -.54), (3.16, .14), (2.94, .20)]),\n (9.50, [(2.92, -.62), (3.18, -.56), (3.18, .16), (2.92, .22)]),\n ]), \"main\", *HA, bevel=.015, panels=False)\n pair(\"fingers_block\", loft([(8.70, octo(.40, .76, .12, x=2.56, y=-.20)), (9.30, octo(.42, .76, .12, x=2.56, y=-.20))]),\n \"frame\", *HA, bevel=.02, panels=False)\n pair(\"thumb_block\", loft([(8.96, octo(.24, .24, .06, x=2.62, y=-.68)), (9.36, octo(.26, .26, .06, x=2.66, y=-.64))]),\n \"frame\", *HA, bevel=.018, panels=False)\n\n # Left Forearm Faceted Active-Defense Stealth Shield + Right Hand Twin-Rail Hyper-Velocity Lance-Rifle\n build_left_stealth_shield(FA[0])\n build_right_lance_rifle(HA[1])\n\n\ndef build_left_stealth_shield(fa_l):\n \"\"\"A faceted aero-chine active-defense stealth shield on the left forearm with physical seam cuts,\n color blocking, and glowing plasma field emitter.\"\"\"\n sh = loft([\n (8.38, [(3.32, -.62), (3.68, -.32), (3.58, .38), (3.28, .22)]),\n (9.65, [(3.38, -1.18), (3.92, -.42), (3.78, .92), (3.32, .58)]),\n (11.35, [(3.42, -1.36), (4.04, -.38), (3.88, 1.12), (3.36, .72)]),\n (12.78, [(3.36, -.96), (3.86, -.24), (3.74, .78), (3.30, .48)]),\n ])\n sh_lo, sh_hi = halves(sh, (3.65, 0, 10.85), (0, -.22, 1), gap=.038)\n solid(\"shield_hull_lo\", sh_lo, \"main\", fa_l, bevel=.022)\n solid(\"shield_hull_hi\", sh_hi, \"accent\", fa_l, bevel=.022)\n\n trim_bar = loft([\n (10.62, [(3.44, -1.32), (4.06, -.36), (3.90, 1.08), (3.38, .68)]),\n (10.82, [(3.44, -1.34), (4.08, -.36), (3.92, 1.10), (3.38, .70)]),\n ])\n solid(\"shield_chevron_trim\", trim_bar, \"trim\", fa_l, bevel=.01, panels=False)\n\n emitter = loft([\n (9.45, [(3.88, -.52), (4.04, -.38), (3.98, .12), (3.84, .04)]),\n (10.48, [(3.92, -.56), (4.08, -.40), (4.02, .16), (3.88, .08)]),\n ])\n solid(\"shield_emitter_core\", emitter, \"glow_core\", fa_l, outline=False, panels=False)\n\n\ndef build_right_lance_rifle(hand_r):\n \"\"\"A 7.4 m Twin-Rail Hyper-Velocity Lance-Rifle held in the right hand at a 30° forward-ready\n angle so `POSES.stand` and `POSES.flight` display its full profile.\"\"\"\n p0 = Vector((-2.68, -.26, 9.08))\n m = Matrix.Translation(p0) @ rot(\"X\", 30) @ rot(\"Y\", -4)\n\n rec = loft([\n (-1.65, chine_ring(.36, .72, keel_f=.14, keel_b=.08)),\n (0.45, chine_ring(.48, .96, keel_f=.18, keel_b=.10)),\n (1.65, chine_ring(.38, .78, keel_f=.14, keel_b=.10)),\n ])\n solid(\"rifle_receiver\", transform(rec, m), \"main\", hand_r, bevel=.018)\n\n cowl = loft([\n (-2.95, chine_ring(.40, .80, cy=-.06, keel_f=.16, keel_b=.08)),\n (-0.55, chine_ring(.52, .90, cy=-.06, keel_f=.18, keel_b=.10)),\n ])\n solid(\"rifle_cowl\", transform(cowl, m), \"accent\", hand_r, bevel=.018)\n\n for dy in (-.28, .14):\n rail = loft([\n (-6.05, octo(.11, .16, .03, y=dy)),\n (-1.55, octo(.16, .22, .04, y=dy)),\n ])\n solid(f\"rifle_rail_{dy:+.2f}\", transform(rail, m), \"metal\", hand_r, bevel=.01, panels=False)\n\n core = loft([\n (-5.65, octo(.07, .12, .01, y=-.07)),\n (-0.65, octo(.09, .14, .01, y=-.07)),\n ])\n solid(\"rifle_plasma_core\", transform(core, m), \"glow_core\", hand_r, outline=False, panels=False)\n\n scope = loft([\n (-2.55, octo(.18, .28, .04, y=-.56)),\n (-0.75, octo(.20, .32, .04, y=-.56)),\n ])\n solid(\"rifle_scope\", transform(scope, m), \"trim\", hand_r, bevel=.01, panels=False)\n lens = cylinder(.075, -2.62, -2.54, 12, at=(0, -.56))\n solid(\"rifle_scope_lens\", transform(lens, m), \"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 # Splayed Heroic A-Stance Thighs: from hip (1.20, -.02, 10.45) to knee (1.44, -.22, 6.02)\n pair(\"hip_ball_joint\", cylinder(.48, .58, 1.62, 14, axis=\"x\", at=(-.02, 10.45)), \"joint\", *TH, smooth=True)\n pair(\"thigh_core\", loft([\n (6.48, octo(.78, .92, .20, x=1.42, y=-.20)),\n (8.65, octo(1.16, 1.34, .28, x=1.30, y=-.10)),\n (10.22, octo(1.06, 1.22, .26, x=1.20, y=-.02)),\n ]), \"frame\", *TH, bevel=.025, panels=False)\n pair(\"thigh_ram_f\", piston((.92, -.68, 10.25), (1.10, -.76, 8.65), r=.10, n=8), \"metal\", *TH, smooth=True)\n pair(\"thigh_ram_b\", piston((1.22, .68, 10.30), (1.36, .52, 7.45), r=.12, n=8), \"joint\", *TH, smooth=True)\n\n thigh_shell = loft([\n (6.68, asym_ring(.52, .70, .74, .76, cx=1.42, cy=-.20, keel=.20, flare=.12)),\n (8.08, asym_ring(.66, .94, .92, .94, cx=1.34, cy=-.14, keel=.26, flare=.18)),\n (9.32, asym_ring(.68, 1.00, .96, .98, cx=1.26, cy=-.06, keel=.26, flare=.20)),\n (10.05, asym_ring(.54, .80, .78, .82, cx=1.20, cy=-.02, keel=.16, flare=.12)),\n ])\n pair_split(\"thigh_shell\", thigh_shell, [\n ((1.32, -.1, 8.38), (.32, -.18, 1)),\n ((1.66, -.1, 8.45), (1, .12, -.15)),\n ], (\"main\", \"main\", \"accent\"), *TH, gap=.038, bevel=.022)\n pair(\"thigh_louver_trim\", loft([\n (7.45, [(1.98, -.44), (2.18, -.40), (2.20, .16), (2.00, .20)]),\n (9.08, [(2.04, -.38), (2.24, -.34), (2.26, .24), (2.06, .28)]),\n ]), \"trim\", *TH, bevel=.01, panels=False)\n\n # Double-jointed knee drum, outboard sensor disc, and high-peaked keeled knee-guard prow\n pair(\"knee_drum\", cylinder(.50, .88, 2.00, 14, axis=\"x\", at=(-.22, 6.02)), \"joint\", *SH, smooth=True)\n pair(\"knee_disc\", cylinder(.46, 1.98, 2.18, 16, axis=\"x\", at=(-.14, 6.06)), \"accent\", *SH, smooth=True)\n pair(\"knee_ring\", cylinder(.34, 2.16, 2.24, 16, axis=\"x\", at=(-.14, 6.06)), \"metal\", *SH, smooth=True)\n pair(\"knee_sensor\", cylinder(.22, 2.22, 2.28, 14, axis=\"x\", at=(-.14, 6.06)), \"sensor\", *SH, smooth=True)\n\n kneecap = loft([\n (5.28, chine_ring(.84, .74, cx=1.46, cy=-.88, keel_f=.24, keel_b=.02)),\n (6.16, chine_ring(1.08, .98, cx=1.44, cy=-1.02, keel_f=.36, keel_b=.04)),\n (6.88, chine_ring(.90, .84, cx=1.42, cy=-.94, keel_f=.30, keel_b=.04)),\n (7.38, chine_ring(.48, .54, cx=1.40, cy=-.76, keel_f=.18, keel_b=.02)),\n ])\n k_lo, k_hi = halves(kneecap, (1.44, -1.0, 6.32), (0, -.25, 1), gap=.032)\n pair(\"kneecap_lo\", k_lo, \"main\", *SH, bevel=.022)\n pair(\"kneecap_hi\", k_hi, \"accent\", *SH, bevel=.022)\n pair(\"kneecap_spike\", prism([(-1.38, 5.92), (-1.16, 5.92), (-1.02, 7.22), (-1.26, 7.08)], 1.36, 1.52, \"yz\"),\n \"trim\", *SH, bevel=.01, panels=False)\n\n # Splayed Shin Core, Knee & Achilles Pistons, and Sculpted Aero-Chine Greaves (knee x=1.44 -> ankle x=1.68)\n pair(\"shin_core\", loft([\n (1.68, octo(.82, .96, .20, x=1.66, y=.04)),\n (5.72, octo(.96, 1.12, .24, x=1.46, y=-.18)),\n ]), \"frame\", *SH, bevel=.025, panels=False)\n pair(\"knee_piston\", piston((1.44, .48, 7.18), (1.50, .62, 5.32), r=.105, n=8), \"metal\", *SH, smooth=True)\n pair(\"achilles_piston\", piston((1.62, .72, 2.62), (1.66, .86, 1.68), r=.085, n=8), \"metal\", *SH, smooth=True)\n\n greave = loft([\n (1.82, asym_ring(.58, .78, .82, .88, cx=1.66, cy=.02, keel=.22, flare=.14)),\n (2.85, asym_ring(.70, 1.00, .96, 1.14, cx=1.60, cy=-.04, keel=.28, flare=.20)),\n (4.18, asym_ring(.74, 1.14, .98, 1.38, cx=1.52, cy=-.06, keel=.30, flare=.24)),\n (5.40, asym_ring(.58, .84, .80, 1.02, cx=1.46, cy=-.14, keel=.20, flare=.14)),\n ])\n pair_split(\"greave_shell\", greave, [\n ((1.58, 0, 3.32), (.28, -.22, 1)),\n ((1.58, .20, 3.80), (-.15, 1, .18)),\n ], (\"accent\", \"main\", \"main\"), *SH, gap=.038, bevel=.022)\n\n # Swept Rear Calf Vector-Thruster Nacelle & Twin Calf Nozzles\n calf_pod = loft([\n (3.38, chine_ring(.94, .78, cx=1.56, cy=1.12, keel_f=.04, keel_b=.26)),\n (4.48, chine_ring(1.14, 1.02, cx=1.52, cy=1.28, keel_f=.04, keel_b=.34)),\n (5.26, chine_ring(.86, .74, cx=1.48, cy=1.06, keel_f=.04, keel_b=.20)),\n ])\n pair(\"calf_thruster_pod\", calf_pod, \"accent\", *SH, bevel=.022)\n pair(\"calf_thruster_trim\", prism([(1.06, 3.58), (1.68, 3.86), (1.62, 4.94), (1.06, 4.94)], 1.44, 1.60, \"yz\"),\n \"trim\", *SH, bevel=.01, panels=False)\n pair(\"calf_vents\", slats(1.30, 1.84, 2.24, 3.08, 1.00, 4, depth=.1, gap=.32), \"frame\", *SH, panels=False)\n nozzle_pair(\"calf\", (1.54, 1.36, 4.12), (0, .52, -.85), .32, .56, *SH, housing=False)\n\n # Wide-Stance Articulated Raptor Talon Sabatons at x=1.68\n pair(\"ankle_ball\", cylinder(.42, 1.22, 2.14, 14, axis=\"x\", at=(.06, 1.52)), \"joint\", *FT, smooth=True)\n pair(\"ankle_collar\", cylinder(.46, 2.00, 2.16, 14, axis=\"x\", at=(.06, 1.52)), \"metal\", *FT, smooth=True)\n\n spat = loft([\n (1.02, chine_ring(.98, .72, cx=1.68, cy=-.62, keel_f=.22, keel_b=.04)),\n (1.78, chine_ring(1.08, .82, cx=1.66, cy=-.68, keel_f=.28, keel_b=.04)),\n (2.26, chine_ring(.68, .56, cx=1.64, 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.58, 1.74, \"yz\"),\n \"trim\", *FT, bevel=.01, panels=False)\n\n sabaton = loft([\n (0.12, chine_ring(1.24, 2.46, cx=1.68, cy=-1.04, keel_f=.36, keel_b=.08)),\n (0.58, chine_ring(1.18, 2.30, cx=1.68, cy=-.98, keel_f=.32, keel_b=.08)),\n (1.08, chine_ring(.88, 1.44, cx=1.68, cy=-.48, keel_f=.20, keel_b=.06)),\n ])\n sab_toe, sab_instep = halves(sabaton, (1.68, -1.44, 0.5), (0, 1, .18), gap=.036)\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, .80, cx=1.68, cy=-2.12, keel_f=.30, keel_b=.02)),\n (0.52, chine_ring(.56, .68, cx=1.68, cy=-2.02, keel_f=.24, keel_b=.02)),\n ]), \"trim\", *FT, bevel=.016, panels=False)\n\n heel = loft([\n (0.10, chine_ring(1.08, 1.12, cx=1.68, cy=1.08, keel_f=.04, keel_b=.24)),\n (0.68, chine_ring(.96, .98, cx=1.68, cy=1.02, keel_f=.04, keel_b=.20)),\n (1.06, chine_ring(.72, .72, cx=1.68, 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.16, 1.60, .22, x=1.68, y=-1.40)),\n (0.12, octo(1.20, 1.66, .22, x=1.68, y=-1.40)),\n ]), \"joint\", *FT, bevel=.015, panels=False)\n pair(\"sole_heel\", loft([\n (0.0, octo(1.04, 1.06, .20, x=1.68, y=1.06)),\n (0.12, octo(1.08, 1.10, .20, x=1.68, 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, Propellant Tanks, and Quad Main Nozzles\n pack = loft([\n (12.32, chine_ring(1.92, 1.18, cy=1.68, keel_f=.04, keel_b=.24)),\n (13.35, chine_ring(2.32, 1.48, cy=1.84, keel_f=.04, keel_b=.34)),\n (14.42, chine_ring(2.24, 1.42, cy=1.82, keel_f=.04, keel_b=.32)),\n (15.08, chine_ring(1.56, 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=.036)\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 ], -.11, .11, \"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)), (3.04, circle(.48, 16, 0, 13.85))], axis=\"y\"),\n \"frame\", B, smooth=True)\n solid(\"pack_turbine_collar\", loft([(2.30, circle(.86, 16, 0, 13.85)), (2.56, circle(.86, 16, 0, 13.85))], axis=\"y\"),\n \"metal\", B, smooth=True)\n solid(\"pack_turbine_glow\", loft([(2.98, circle(.28, 14, 0, 13.85)), (3.08, 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=(.98, 1.92)), \"metal\", B, B, smooth=True)\n pair(\"pack_tank_band\", cylinder(.37, 13.15, 13.45, 14, at=(.98, 1.92)), \"trim\", B, B, smooth=True)\n\n # Quad Main Thruster Array: Twin Primary Vector Bells + Twin Outboard Booster Bells\n pair(\"main_shroud\", loft([\n (12.08, asym_ring(.28, .48, .48, .56, cx=.56, cy=2.08, keel=.12)),\n (12.78, asym_ring(.36, .60, .58, .66, cx=.56, cy=2.02, keel=.14)),\n ]), \"accent\", B, B, bevel=.018)\n nozzle_pair(\"main\", (.56, 2.08, 12.50), (0, .46, -.89), .46, .88, B, B)\n nozzle_pair(\"main_aux\", (1.14, 1.96, 12.62), (.12, .52, -.84), .30, .58, B, B, housing=False)\n\n # Twin Variable-Sweep Aero-Binders on J[\"binder\", \"L/R\"]\n for s, sx in ((\"L\", 1), (\"R\", -1)):\n j = J[\"binder\", s]\n pivot = Vector((.94 * sx, 2.26, 14.74))\n m = Matrix.Translation(pivot) @ rot(\"Y\", 36 * 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 boom = loft([\n (-.92, octo(.38, .56, .08)),\n (0.48, octo(.46, .70, .10)),\n (2.35, octo(.28, .46, .06)),\n ])\n solid(f\"binder_boom.{s}\", transform(boom, m), \"frame\", j, bevel=.016, panels=False)\n\n wing_lo = prism([(-.76, -.82), (.54, -.64), (.72, 1.24), (-.48, 0.96)], .09 * sx - .09, .09 * sx + .09, \"yz\")\n wing_hi = prism([(-.46, 1.02), (.70, 1.30), (.42, 3.25), (-.24, 3.48), (-.62, 2.35)], .09 * sx - .08, .09 * sx + .08, \"yz\")\n trim_le = prism([(.50, -.60), (.68, -.54), (.86, 1.28), (.56, 3.22), (.40, 3.22), (.70, 1.26)], .09 * sx - .05, .09 * sx + .05, \"yz\")\n glow_fin = prism([(-.58, 1.18), (-.40, 1.18), (-.20, 2.85), (-.38, 2.85)], .09 * sx - .04, .09 * 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 bell, glow = nozzle(.34, .64)\n down = m.to_3x3() @ Vector((0, 0, -1))\n at = m @ Vector((0, 0, -.86))\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 * .64, j, dir=gltf_dir(down), radius=.34)\n\n\ndef build_kestrel():\n J = kestrel_joints()\n build_pelvis(J)\n build_waist(J)\n build_torso(J)\n build_head(J)\n J[\"neck\"].location.z -= .22\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.