"""Mako: read-only probe of the interior fork (never saved). The deck well's lip in the Tender's own frame at BOARD (launch arm, origin (3.015, -3.66, -2.16), turned 90 deg as sweep_check.py does), so the hull can be sized to the user's 1 m limit before anything is built. Writes checks/well_tender_frame.json.""" import bpy, os, json, math HERE = os.path.dirname(os.path.abspath(__file__)) lip = bpy.data.objects["Moonpool | inner black lip"] pts = [(lip.matrix_world @ p.co.to_3d()) for p in lip.data.splines[0].points] # world = (-P.y + 3.015, P.x - 3.66): P.x = w.y + 3.66, P.y = 3.015 - w.x tf = [(round(w.y + 3.66, 4), round(3.015 - w.x, 4)) for w in pts] xs = [p[0] for p in tf]; ys = [p[1] for p in tf] out = {"lip_world_z": round(sum(w.z for w in pts) / len(pts), 3), "n": len(tf), "tender_x_range": [min(xs), max(xs)], "tender_y_range": [min(ys), max(ys)], "poly": tf} json.dump(out, open(os.path.join(HERE, "checks", "well_tender_frame.json"), "w"), indent=0) print("WELL", json.dumps({k: v for k, v in out.items() if k != "poly"}))