# Mako: the cockpit inside the glass nose and the rear bay behind it (exec'd by build_mako.py after mk_clamp.py; all into # SM_Mako_Cabin). The whole nose is glass, so the cockpit is in plain view: a deck below the glass's lower edge (hidden behind # the jaw from outside), one reclined pilot seat under the canopy's crown, a low console ahead of it (below the eye line), # side consoles with sticks, the hatch trunk overhead behind the seat, a bulkhead with a crawl door to the rear bay. The rear # bay (seen through the two side windows) is an equipment space: deck, a central rack, light. ZF = -0.50 + DZ # cockpit deck ZF2 = -0.20 + DZ # rear bay deck I_CK = [i for i, y in enumerate(YS) if Yi(162.0) - 1e-6 <= y <= Y_BULK + 1e-6] I_RB = [i for i, y in enumerate(YS) if Y_BULK + 0.03 <= y <= Y_BAY + 1e-6] def deck(idx, z): rows = [] for i in idx: y = YS[i] w = min(hull_x_at(z, y + dy, LINER) for dy in (0.0, -0.012, -0.024)) - 0.04 # v04: clear of the jaw's and the lower body's steps if w < 0.12: continue rows.append([Vector((x, y, z)) for x in (-w, -w * 0.5, 0.0, w * 0.5, w)]) grid_rings(cab, rows, FLOOR, closed_u=False, expect=(1, 1, (0, 0, 1))) return rows deck(I_CK, ZF) deck(I_RB, ZF2) # ---- pilot seat (reclined 25 deg), facing the nose SY = Yi(205.0) # v04 round 2: SIDE draws the seat's back and headrest at x 205-245 REC = math.radians(-14.0) qcyl(cab, 0.075, 0.24, (0, SY + 0.04, ZF + 0.12), STEEL, segs=12) qbox(cab, (0.56, 0.62, 0.05), (0, SY + 0.02, ZF + 0.02), GRAPH, bevel=0.01) # floor plate under the seat qbox(cab, (0.52, 0.52, 0.10), (0, SY, ZF + 0.29), SEAT, bevel=0.03) back_c = Vector((0, SY + 0.30, ZF + 0.62)) qbox(cab, (0.56, 0.12, 0.70), back_c + Vector((0, 0, 0.04)), SEAT, rot=(REC, 0, 0), bevel=0.03) qbox(cab, (0.34, 0.11, 0.20), back_c + Vector((0, 0.35 * math.sin(-REC) + 0.03, 0.35 * math.cos(REC) + 0.15)), SEAT, rot=(REC, 0, 0), bevel=0.03) for s in (1, -1): # armrests, side consoles, sticks qbox(cab, (0.08, 0.40, 0.07), (s * 0.31, SY - 0.02, ZF + 0.46), SEAT, bevel=0.015) qbox(cab, (0.12, 0.44, 0.30), (s * 0.31, SY - 0.02, ZF + 0.27), GRAPH, bevel=0.02) qcyl(cab, 0.016, 0.13, (s * 0.31, SY - 0.17, ZF + 0.55), GRAPH, segs=8, r2=0.013) qsphere(cab, Vector((s * 0.31, SY - 0.17, ZF + 0.625)), (0.026, 0.026, 0.034), GRAPH, cuts=2) qbox(cab, (0.07, 0.09, 0.012), (s * 0.31, SY + 0.10, ZF + 0.505), SCREEN) PILOT_EYE = Vector((0, SY - 0.02, ZF + 0.98)) # ---- console ahead of the seat: low, below the eye line, with three screens facing the pilot CY = Yi(170.0) TILT = math.radians(38.0) # the jaw is a V under the deck: the console's pedestal is sized at its foot's forward edge, the sloped top at its own height w_b = min(0.40, 2 * (hull_x_at(ZF + 0.03, CY - 0.11, LINER) - 0.05)) w_c = min(0.60, 2 * (hull_x_at(ZF + 0.30, CY - 0.13, LINER) - 0.05)) qbox(cab, (w_b, 0.22, 0.30), (0, CY, ZF + 0.15), GRAPH, bevel=0.02) TOPC = Vector((0, CY + 0.02, ZF + 0.33)) TOPN = Vector((0, math.sin(TILT), math.cos(TILT))) # the sloped top faces up and back, toward the seat qbox(cab, (w_c, 0.26, 0.05), TOPC, GRAPH, rot=(-TILT, 0, 0), bevel=0.012) for x in (-0.19 * w_c / 0.6, 0.0, 0.19 * w_c / 0.6): qbox(cab, (0.16 * w_c / 0.6, 0.010, 0.12), TOPC + TOPN * 0.028 + Vector((x, 0, 0)), SCREEN, rot=(math.pi / 2 - TILT, 0, 0)) SCREEN_N = TOPN # ---- light strips under the hood and the bezel for s in (1, -1): pts = [] for i in I_CK: y = YS[i] if False: # v04 side first: no hood over the cockpit, so no strips there x = 0.30 * s pts.append(Vector((x, y, hull_z_at(x, y, True, LINER) - 0.016))) if len(pts) >= 2: cab.sweep(pts, 0.011, CABGLOW, sides=6) # ---- bulkhead door (cockpit side): frame, leaf, handle; the bay side gets a frame too DW, DH = 0.62, 1.00 dz = ZF + 0.03 + DH / 2 for yy, sg in ((Y_BULK - 0.015, -1), (Y_BULK + 0.045, 1)): for (sx, sz, px, pz) in ((0.06, DH + 0.12, DW / 2 + 0.03, 0.0), (0.06, DH + 0.12, -DW / 2 - 0.03, 0.0), (DW + 0.12, 0.06, 0.0, DH / 2 + 0.03)): qbox(cab, (sx, 0.04, sz), (px, yy, dz + pz), GRAPH, bevel=0.01) qbox(cab, (DW, 0.03, DH), (0, Y_BULK - 0.012, dz), STEEL, bevel=0.012) qbox(cab, (0.04, 0.05, 0.16), (DW / 2 - 0.09, Y_BULK - 0.04, dz), GRAPH, bevel=0.01) qbox(cab, (DW - 0.14, 0.012, 0.06), (0, Y_BULK - 0.03, dz + DH / 2 - 0.12), YELLOW) # ---- rear bay: a central equipment rack along the deck, a light strip overhead RX0, RX1 = Yi(680.0), Yi(790.0) # v04: along the long glass bay (SIDE x 640-860), clear of the tapering stern qbox(cab, (0.36, RX1 - RX0, 0.40), (0, (RX0 + RX1) / 2, ZF2 + 0.20), GRAPH, bevel=0.02) nslots = 6 for q in range(nslots): y = RX0 + (RX1 - RX0) * (q + 0.5) / nslots for s in (1, -1): qbox(cab, (0.012, (RX1 - RX0) / nslots - 0.04, 0.26), (s * 0.186, y, ZF2 + 0.22), GRAPH) # v04: dark equipment qbox(cab, (0.010, 0.05, 0.03), (s * 0.193, y, ZF2 + 0.33), SCREEN) # v04: dim blue, no white lights pts = [Vector((0, y, hull_z_at(0.0, y, True, LINER) - 0.016)) for y in [YS[i] for i in I_RB] if Yi(380.0) <= y <= HY_A - 0.10] if len(pts) >= 2: cab.sweep(pts, 0.011, CABGLOW, sides=6) REPORT["stage"] = "cabin"