diff --git a/pyproject.toml b/pyproject.toml index 519335c..a316633 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,7 @@ [dependency-groups] dev = [ + "manifold3d>=3.5.4", "pytest>=9.0.3", "ruff>=0.15.12", ] diff --git a/scripts/generate_cube_housing.py b/scripts/generate_cube_housing.py index 7f2196e..fa6f156 100644 --- a/scripts/generate_cube_housing.py +++ b/scripts/generate_cube_housing.py @@ -201,6 +201,273 @@ return mesh +def _rounded_rect_radius(theta: np.ndarray, half: float, corner: float) -> np.ndarray: + """角を半径 corner で丸めた正方形(半幅 half)の境界までの極座標の半径を返す.""" + cos_t = np.abs(np.cos(theta)) + sin_t = np.abs(np.sin(theta)) + straight = _rect_radius(theta, half, half) + if corner <= 0.0: + return straight + inner = half - corner + # 直線部で当たるのは,当たる点のもう一方の座標が inner 以下のとき + on_edge = np.minimum(straight * cos_t, straight * sin_t) <= inner + 1e-9 + # 角の円(中心 (inner, inner))との交点: s = u·C + sqrt((u·C)^2 - |C|^2 + r^2) + uc = inner * (cos_t + sin_t) + s = uc + np.sqrt(np.maximum(uc**2 - 2.0 * inner**2 + corner**2, 0.0)) + return np.where(on_edge, straight, s) + + +def _rounded_surface( + theta: np.ndarray, + rim_r: np.ndarray, + half: float, + fillet: float, + rim_z: float, + top_z: float, + bottom_z: float, + n_ceiling: int, + n_fillet: int, + n_wall: int, + n_bottom: int, +) -> tuple[np.ndarray, np.ndarray]: + """リム → 天井 → 丸めた稜 → 側壁(縦の稜も丸める)→ 丸めた稜 → 底面の 1 枚曲面. + + 形は「一辺 2·(half - fillet) の箱を半径 fillet の球で膨らませたもの」(全ての稜と角を + 同じ半径で丸めた箱).高さ z の断面は,半幅 half - fillet + ρ・角の半径 ρ の角丸正方形. + """ + flat = half - fillet + rings_rho: list[np.ndarray] = [] + rings_z: list[float] = [] + if top_z > rim_z: + for z in np.linspace(rim_z, top_z, 2, endpoint=False): + rings_rho.append(rim_r) + rings_z.append(float(z)) + flat_r = _rect_radius(theta, flat, flat) + for t in np.linspace(0.0, 1.0, n_ceiling, endpoint=False): + rings_rho.append((1.0 - t) * rim_r + t * flat_r) + rings_z.append(top_z) + for a in np.linspace(0.0, np.pi / 2, n_fillet, endpoint=False): + rho = fillet * np.sin(a) + rings_rho.append(_rounded_rect_radius(theta, flat + rho, rho)) + rings_z.append(top_z - fillet * (1.0 - np.cos(a))) + wall_r = _rounded_rect_radius(theta, half, fillet) + for z in np.linspace(top_z - fillet, bottom_z + fillet, n_wall, endpoint=False): + rings_rho.append(wall_r) + rings_z.append(float(z)) + for a in np.linspace(0.0, np.pi / 2, n_fillet, endpoint=False): + rho = fillet * np.cos(a) + rings_rho.append(_rounded_rect_radius(theta, flat + rho, rho)) + rings_z.append(bottom_z + fillet * (1.0 - np.sin(a))) + for t in np.linspace(0.0, 1.0, n_bottom, endpoint=False): + rings_rho.append((1.0 - t) * flat_r) + rings_z.append(bottom_z) + + n_ring, n_theta = len(rings_rho), len(theta) + vertices = np.empty((n_ring * n_theta + 1, 3), dtype=np.float64) + rings = np.arange(n_ring * n_theta).reshape(n_ring, n_theta) + for i, (rho, z) in enumerate(zip(rings_rho, rings_z, strict=True)): + vertices[rings[i], 0] = rho * np.cos(theta) + vertices[rings[i], 1] = rho * np.sin(theta) + vertices[rings[i], 2] = z + vertices[-1] = (0.0, 0.0, bottom_z) + return vertices, rings + + +def build_rounded_cube_housing( + size: float, + thickness: float, + board_half_x: float, + board_half_y: float, + rim_inset: float, + rim_z: float, + fillet: float, + n_theta: int = 512, + n_ceiling: int = 24, + n_fillet: int = 16, + n_wall: int = 64, + n_bottom: int = 32, +) -> trimesh.Trimesh: + """内側の稜と角を半径 fillet で丸めた立方体キャビティ筐体の閉ソリッドを生成する. + + build_cube_housing と同じ構成(リム・天井・側壁・底面)で,内面の 12 本の稜と 8 つの + 角を半径 fillet で丸める.外面は半径 fillet + thickness で丸める.天井の平らな部分 + (半幅 size/2 - fillet)がリム矩形より外にある必要がある. + + Raises: + ValueError: fillet が負,または天井の平らな部分がリム矩形を含まない場合. + """ + hx_in = board_half_x - rim_inset + hy_in = board_half_y - rim_inset + half_in = size / 2.0 + if fillet <= 0.0: + raise ValueError(f"fillet は正の値にしてください({fillet}).0 なら build_cube_housing") + if half_in - fillet <= max(hx_in, hy_in) + thickness: + msg = ( + f"fillet={fillet}mm では天井の平らな部分(半幅 {half_in - fillet:g}mm)が" + f"リム(半幅 {max(hx_in, hy_in) + thickness:g}mm)より狭くなります" + ) + raise ValueError(msg) + half_out = half_in + thickness + flat = half_in - fillet + theta = _build_theta( + n_theta, + [(hx_in, hy_in), (flat, flat), (hx_in + thickness, hy_in + thickness)], + ) + v_in, rings_in = _rounded_surface( + theta, _rect_radius(theta, hx_in, hy_in), half_in, fillet, + rim_z, rim_z, rim_z - size, n_ceiling, n_fillet, n_wall, n_bottom, + ) + v_out, rings_out = _rounded_surface( + theta, _rect_radius(theta, hx_in + thickness, hy_in + thickness), half_out, + fillet + thickness, rim_z, rim_z + thickness, rim_z - size - thickness, + n_ceiling, n_fillet, n_wall, n_bottom, + ) + f_in = _stitch_rings(rings_in, len(v_in) - 1) + f_out = _stitch_rings(rings_out, len(v_out) - 1) + offset = len(v_in) + vertices = np.vstack([v_in, v_out]) + top_in, top_out = rings_in[0], rings_out[0] + offset + n_ring_theta = rings_in.shape[1] + band: list[tuple[int, int, int]] = [] + for j in range(n_ring_theta): + k = (j + 1) % n_ring_theta + band.append((top_in[j], top_out[j], top_out[k])) + band.append((top_in[j], top_out[k], top_in[k])) + faces = np.vstack([f_in, f_out + offset, np.asarray(band, dtype=np.int64)]) + mesh = trimesh.Trimesh(vertices=vertices, faces=faces, process=False) + mesh.fix_normals() + if not mesh.is_watertight: + raise ValueError("生成メッシュが watertight になりませんでした(縫合パラメータを確認)") + return mesh + + +def _bounds_radius( + theta: np.ndarray, x0: float, x1: float, y0: float, y1: float +) -> np.ndarray: + """原点を含む矩形 [x0, x1] × [y0, y1] の境界までの極座標の半径を返す.""" + cos_t = np.cos(theta) + sin_t = np.sin(theta) + with np.errstate(divide="ignore", invalid="ignore"): + rx = np.where(cos_t > 1e-12, x1 / cos_t, np.where(cos_t < -1e-12, x0 / cos_t, np.inf)) + ry = np.where(sin_t > 1e-12, y1 / sin_t, np.where(sin_t < -1e-12, y0 / sin_t, np.inf)) + return np.minimum(rx, ry) + + +def _sloped_surface( + theta: np.ndarray, + rim_r: np.ndarray, + half_x: float, + y_min: float, + y_top: float, + slope: float, + rim_z: float, + top_z: float, + bottom_z: float, + n_ceiling: int, + n_wall: int, + n_bottom: int, +) -> tuple[np.ndarray, np.ndarray]: + """+Y 側の壁だけが傾いた箱の 1 枚曲面(リム → 天井 → 側壁 → 底面). + + +Y 側の壁は y = y_top + slope·(z - top_z)(z は負なので slope > 0 で奥ほど低い). + """ + def bounds_at(z: float) -> np.ndarray: + return _bounds_radius(theta, -half_x, half_x, y_min, y_top + slope * (z - top_z)) + + rings_rho: list[np.ndarray] = [] + rings_z: list[float] = [] + if top_z > rim_z: + for z in np.linspace(rim_z, top_z, 2, endpoint=False): + rings_rho.append(rim_r) + rings_z.append(float(z)) + top_r = bounds_at(top_z) + for t in np.linspace(0.0, 1.0, n_ceiling, endpoint=False): + rings_rho.append((1.0 - t) * rim_r + t * top_r) + rings_z.append(top_z) + for z in np.linspace(top_z, bottom_z, n_wall, endpoint=False): + rings_rho.append(bounds_at(float(z))) + rings_z.append(float(z)) + bottom_r = bounds_at(bottom_z) + for t in np.linspace(0.0, 1.0, n_bottom, endpoint=False): + rings_rho.append((1.0 - t) * bottom_r) + rings_z.append(bottom_z) + + n_ring, n_theta = len(rings_rho), len(theta) + vertices = np.empty((n_ring * n_theta + 1, 3), dtype=np.float64) + rings = np.arange(n_ring * n_theta).reshape(n_ring, n_theta) + for i, (rho, z) in enumerate(zip(rings_rho, rings_z, strict=True)): + vertices[rings[i], 0] = rho * np.cos(theta) + vertices[rings[i], 1] = rho * np.sin(theta) + vertices[rings[i], 2] = z + vertices[-1] = (0.0, 0.0, bottom_z) + return vertices, rings + + +def build_sloped_box_housing( + half_x: float, + y_min: float, + y_top: float, + slope: float, + depth: float, + thickness: float, + board_half_x: float, + board_half_y: float, + rim_inset: float, + rim_z: float, + n_theta: int = 1024, + n_ceiling: int = 24, + n_wall: int = 96, + n_bottom: int = 32, +) -> trimesh.Trimesh: + """+Y 側(上面)の壁を奥ほど低く傾けた箱形キャビティ筐体の閉ソリッドを生成する. + + 撮影される人が装置の上越しにスマホの画面を見られるよう,上面を低く抑えた形 + (PLAN_03「スマホの画面」).内面は X = ±half_x,Y = y_min 〜 y_top + slope·z, + Z = rim_z 〜 rim_z - depth.外面は各面を thickness だけ外へ出す(傾いた面は Y 方向に + thickness だけずらす近似).傾いた壁の隅は周方向の分割で僅かに面取りされる. + + Raises: + ValueError: 評価板が天井に収まらない,または原点が断面に含まれない場合. + """ + hx_in = board_half_x - rim_inset + hy_in = board_half_y - rim_inset + y_bottom = y_top - slope * depth + if half_x <= hx_in + thickness or y_top <= hy_in + thickness or -y_min <= hy_in + thickness: + raise ValueError("評価板(リム)が天井に収まりません.half_x・y_top・y_min を確認") + if y_bottom <= 0.0: + raise ValueError(f"底の +Y 側の壁(Y={y_bottom:g})が原点より下です.slope を確認") + theta = (np.arange(n_theta) + 0.5) * (2.0 * np.pi / n_theta) + theta = np.unique(np.concatenate([ + theta, _corner_angles(hx_in, hy_in), _corner_angles(hx_in + thickness, hy_in + thickness), + ])) + v_in, rings_in = _sloped_surface( + theta, _rect_radius(theta, hx_in, hy_in), half_x, y_min, y_top, slope, + rim_z, rim_z, rim_z - depth, n_ceiling, n_wall, n_bottom, + ) + v_out, rings_out = _sloped_surface( + theta, _rect_radius(theta, hx_in + thickness, hy_in + thickness), half_x + thickness, + y_min - thickness, y_top + thickness + slope * thickness, slope, + rim_z, rim_z + thickness, rim_z - depth - thickness, n_ceiling, n_wall, n_bottom, + ) + f_in = _stitch_rings(rings_in, len(v_in) - 1) + f_out = _stitch_rings(rings_out, len(v_out) - 1) + offset = len(v_in) + vertices = np.vstack([v_in, v_out]) + top_in, top_out = rings_in[0], rings_out[0] + offset + n_ring_theta = rings_in.shape[1] + band: list[tuple[int, int, int]] = [] + for j in range(n_ring_theta): + k = (j + 1) % n_ring_theta + band.append((top_in[j], top_out[j], top_out[k])) + band.append((top_in[j], top_out[k], top_in[k])) + faces = np.vstack([f_in, f_out + offset, np.asarray(band, dtype=np.int64)]) + mesh = trimesh.Trimesh(vertices=vertices, faces=faces, process=False) + mesh.fix_normals() + if not mesh.is_watertight: + raise ValueError("生成メッシュが watertight になりませんでした(縫合パラメータを確認)") + return mesh + + def _parse_args(argv: list[str] | None = None) -> argparse.Namespace: """コマンドライン引数をパースして返す.""" parser = argparse.ArgumentParser( diff --git a/scripts/sweep_candidate_layouts.py b/scripts/sweep_candidate_layouts.py index 1b9a748..e136ea8 100644 --- a/scripts/sweep_candidate_layouts.py +++ b/scripts/sweep_candidate_layouts.py @@ -40,7 +40,7 @@ import subprocess import sys import time -from dataclasses import dataclass +from dataclasses import dataclass, replace from pathlib import Path import numpy as np @@ -50,7 +50,11 @@ sys.path.insert(0, str(Path(__file__).resolve().parent)) sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "src")) -from generate_cube_housing import build_cube_housing # noqa: E402 +from generate_cube_housing import ( # noqa: E402 + build_cube_housing, + build_rounded_cube_housing, + build_sloped_box_housing, +) from sm_tias_lightsim.scene.paths import relative_mesh_path # noqa: E402 @@ -93,6 +97,7 @@ label: str angle_deg: float led_xy: tuple[float, float] + dz: float = 0.0 # この基板だけ Z 方向に追加で動かす量 [mm](候補の led_dz に足す) @dataclass(frozen=True) @@ -108,6 +113,9 @@ floor_up: bool = False # 基板を箱の底(スマホ側)に置き,LED を評価板へ向けて遮光板を付ける gain_bottom: float = 1.0 # 下の基板の LED の放射量の倍率(基板ごとの出力差への強さを見る) box_size: float = 144.0 # 箱形の内寸(一辺・深さ)[mm] + fillet: float = 0.0 # 箱形の内側の稜と角を丸める半径 [mm](0 で丸めない) + y_min: float = -80.0 # housing="sloped": 内面の -Y 側の壁 [mm] + nose: bool = False # 箱形: 上の壁に鼻の穴(現行機と同じ U 字の切り欠き)を開ける def _current_top() -> Board: @@ -207,6 +215,98 @@ ), ) +# 内側の稜と角の丸み(B2_z25・内寸 160 mm.半径 27 mm 超は天井の平らな部分が評価板の縁より狭い) +FILLETS = (10.0, 20.0, 25.0) +_wall160 = 160.0 / 2 - LED_WALL_OFFSET +for _r in FILLETS: + CANDIDATES += ( + Candidate( + f"B2_z25_L160_R{_r:g}", "box", + ( + Board("bottom", 0.0, (0.0, -_wall160)), + Board("top", 180.0, (0.0, _wall160)), + Board("right", 90.0, (_wall160, 0.0)), + Board("left", -90.0, (-_wall160, 0.0)), + ), + f"箱形 160 mm・内側の角を R{_r:g} で丸める・上下左右 4 枚・LED 高さ Z=-25", + led_dz=-25.0 - (-65.95), box_size=160.0, fillet=_r, + ), + ) + +# 上面(+Y 側)を奥ほど低く傾けた箱(撮影される人がスマホの画面を今と同じ範囲で見られる形. +# 外面の上端を顔側 Y=62・傾き 0.18(Z=-150 で約 35)にすると,目の高さ 60〜90 mm で今の装置と +# 同じかそれ以上に画面が見える).内面はそこから壁厚だけ内側.X は ±80(内寸 160 と同じ) +SLOPED_HALF_X = 80.0 +SLOPED_Y_TOP = 59.0 +SLOPED_SLOPE = 0.18 +SLOPED_DEPTH = 160.0 +SLOPED_LED_Z = -25.0 +SLOPED_TOP_LED_Z = -70.0 + + +def _sloped_boards(y_min: float, with_top: bool) -> tuple[Board, ...]: + wall_x = SLOPED_HALF_X - LED_WALL_OFFSET + boards = [ + Board("bottom", 0.0, (0.0, y_min + LED_WALL_OFFSET)), + Board("right", 90.0, (wall_x, 0.0)), + Board("left", -90.0, (-wall_x, 0.0)), + ] + if with_top: + # 上の壁は評価板の縁に近く,Z=-25 ではカメラから開口部の縁をふさぐ.カメラの視野が + # 細くなる奥(Z=-70)へ下げる + top_wall = SLOPED_Y_TOP + SLOPED_SLOPE * SLOPED_TOP_LED_Z + boards.append(Board("top", 180.0, (0.0, top_wall - LED_WALL_OFFSET), + dz=SLOPED_TOP_LED_Z - SLOPED_LED_Z)) + return tuple(boards) + + +for _ymin in (-80.0, -65.0): + for _top in (True, False): + _n = 4 if _top else 3 + CANDIDATES += ( + Candidate( + f"F{_n}_y{-_ymin:g}", "sloped", _sloped_boards(_ymin, _top), + f"上面を傾けた箱(-Y 側 {_ymin:g})・{_n} 枚・LED 高さ Z=-25" + + ("(上の基板は Z=-70)" if _top else ""), + led_dz=SLOPED_LED_Z - (-65.95), box_size=SLOPED_DEPTH, y_min=_ymin, + ), + ) + +# 上面を傾けた箱で +Y 側が暗い傾きを,明るさの配分で打ち消す(上の壁には基板を置けないため). +# 左右の基板を +Y へずらす量 [mm] と下の基板の明るさの倍率(0 は下の基板なし)の組み合わせ +SLOPED_BALANCE = ((10.0, 1.0), (20.0, 1.0), (0.0, 0.5), (10.0, 0.5), (20.0, 0.5), (20.0, 0.0)) + +for _shift, _gain in SLOPED_BALANCE: + _boards = tuple( + Board(b.label, b.angle_deg, (b.led_xy[0], b.led_xy[1] + _shift)) + if b.label in ("right", "left") else b + for b in _sloped_boards(-80.0, False) + if not (b.label == "bottom" and _gain == 0.0) + ) + CANDIDATES += ( + Candidate( + f"F3_y80_s{_shift:g}_b{_gain:g}".replace(".", ""), "sloped", _boards, + f"上面を傾けた箱・左右を +Y へ {_shift:g} mm・" + + (f"下の基板 ×{_gain:g}" if _gain > 0 else "下の基板なし"), + led_dz=SLOPED_LED_Z - (-65.95), box_size=SLOPED_DEPTH, y_min=-80.0, + gain_bottom=_gain if _gain > 0 else 1.0, + ), + ) + +# 鼻の穴: 現行機の前側と同じ切り欠き.顔の面で幅 30 mm,深さ 15 mm で幅 15 mm に狭まり,底は +# 半径 7.5 mm の丸(顔の面から深さ 22.5 mm).この断面(凸)を上の壁に Y 方向へ貫通させる. +# 穴の外は何も無い(光を返さない)扱いで,A0(現行機の STL)と同じ条件になる +NOSE_TOP_HALF_WIDTH = 15.0 +NOSE_HALF_WIDTH = 7.5 +NOSE_DEPTH = 22.5 +NOSE_Y_START = BOARD_HALF[1] + 1.0 # 評価板の縁(受けの部分)は切らない + +for _base in [c for c in CANDIDATES + if c.name in ("B2_z25_L160", "F3_y80", "F3_y80_s10_b1", "F3_y80_s20_b1")]: + CANDIDATES += ( + replace(_base, name=f"{_base.name}_N", note=f"{_base.note}・鼻の穴あり", nose=True), + ) + # 遮光板: LED 発光面から BAFFLE_GAP 上に置く厚さ BAFFLE_THICKNESS の板.LED のどの点からも # 評価板の裏面(Z = -4.5,±49.5 × ±51)が直接見えない大きさにし,BAFFLE_MARGIN だけ広げる BAFFLE_GAP = 10.0 @@ -252,7 +352,7 @@ probe = cover.copy() probe.apply_transform(transform) dz = (RIM_Z - box_size + 0.2) - float(probe.bounds[0][2]) - transform = trimesh.transformations.translation_matrix([0.0, 0.0, dz]) @ transform + transform = trimesh.transformations.translation_matrix([0.0, 0.0, dz + board.dz]) @ transform mesh = cover.copy() mesh.apply_transform(transform) path = MESH_DIR / f"{name}_led_cover_{board.label}.stl" @@ -306,11 +406,54 @@ return plate -def _box_meshes(yaml_dir: Path, box_size: float = BOX_SIZE) -> list[dict]: - housing = MESH_DIR / f"箱形_L{box_size:g}.stl" +def cut_nose(housing: trimesh.Trimesh) -> trimesh.Trimesh: + """箱形の筐体の上の壁に鼻の穴(U 字の切り欠き.NOSE_* 参照)を開ける.""" + face_z = float(housing.bounds[1][2]) + center_z = face_z - NOSE_DEPTH + NOSE_HALF_WIDTH + y_end = float(housing.bounds[1][1]) + 10.0 + angles = np.linspace(np.pi, 2 * np.pi, 33) + section = [(NOSE_HALF_WIDTH * np.cos(a), center_z + NOSE_HALF_WIDTH * np.sin(a)) + for a in angles] + section += [(NOSE_TOP_HALF_WIDTH, face_z + 10.0), (-NOSE_TOP_HALF_WIDTH, face_z + 10.0)] + points = [(x, y, z) for x, z in section for y in (NOSE_Y_START, y_end)] + cutter = trimesh.convex.convex_hull(np.array(points)) + result = trimesh.boolean.difference([housing, cutter], engine="manifold") + if not result.is_watertight: + raise RuntimeError("鼻の穴を開けた筐体が閉じた立体になっていない") + return result + + +def _box_meshes( + yaml_dir: Path, box_size: float = BOX_SIZE, fillet: float = 0.0, y_min: float | None = None, + nose: bool = False, +) -> list[dict]: + suffix = f"_R{fillet:g}" if fillet > 0 else "" + if y_min is not None: + suffix = f"_傾斜_y{-y_min:g}" + if nose: + plain = MESH_DIR / f"箱形_L{box_size:g}{suffix}.stl" + _box_meshes(yaml_dir, box_size, fillet, y_min) # 穴の無い筐体を先に用意する + housing = MESH_DIR / f"箱形_L{box_size:g}{suffix}_鼻.stl" + if not housing.exists(): + cut_nose(trimesh.load(plain, force="mesh")).export(housing) + else: + housing = MESH_DIR / f"箱形_L{box_size:g}{suffix}.stl" window = MESH_DIR / f"箱形_L{box_size:g}_スマホ側の窓.stl" MESH_DIR.mkdir(parents=True, exist_ok=True) - if not housing.exists(): + if not housing.exists() and y_min is not None: + build_sloped_box_housing( + half_x=SLOPED_HALF_X, y_min=y_min, y_top=SLOPED_Y_TOP, slope=SLOPED_SLOPE, + depth=box_size, thickness=BOX_THICKNESS, + board_half_x=BOARD_HALF[0], board_half_y=BOARD_HALF[1], + rim_inset=RIM_INSET, rim_z=RIM_Z, + ).export(housing) + elif not housing.exists() and fillet > 0: + build_rounded_cube_housing( + size=box_size, thickness=BOX_THICKNESS, + board_half_x=BOARD_HALF[0], board_half_y=BOARD_HALF[1], + rim_inset=RIM_INSET, rim_z=RIM_Z, fillet=fillet, + ).export(housing) + elif not housing.exists(): build_cube_housing( size=box_size, thickness=BOX_THICKNESS, board_half_x=BOARD_HALF[0], board_half_y=BOARD_HALF[1], @@ -351,7 +494,8 @@ if not any(light["id"].startswith(f"led_{r}_") for r in removed) ] else: - meshes = _box_meshes(yaml_dir, cand.box_size) + meshes = _box_meshes(yaml_dir, cand.box_size, cand.fillet, + cand.y_min if cand.housing == "sloped" else None, cand.nose) meshes.append({ "id": "evaluation_board", "path": relative_mesh_path(BASE_YAML.parent / "meshes" / "照明ムラ補正ボード.stl", diff --git a/uv.lock b/uv.lock index 2ca08b2..7fe2e77 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 5 +revision = 3 requires-python = ">=3.12" resolution-markers = [ "python_full_version >= '3.14' and sys_platform == 'win32'", @@ -417,6 +417,44 @@ ] [[package]] +name = "manifold3d" +version = "3.5.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f3/0f/1f7e51a8f9a6f25e837159c5bf7c95a3ae948aa12e1c5fdeee0fd90ca5f9/manifold3d-3.5.4.tar.gz", hash = "sha256:5bd88c482c6fd7fc01aa7b715b3e31c2585ee98343d5559d286ba30db0d0b6f0", size = 307695, upload-time = "2026-09-25T10:46:09.083Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ad/f4/3bde89d5e37eb223ef7493b9ba782462dd8aea5af07d0370e6ce8a847186/manifold3d-3.5.4-cp312-cp312-macosx_10_14_universal2.whl", hash = "sha256:d4b47d7b0aba1ba1b575e7d549be8c9ba2d552b03e4043e3022454fdaad13447", size = 1843283, upload-time = "2026-09-25T10:45:25.725Z" }, + { url = "https://files.pythonhosted.org/packages/1f/95/3b2e63c154d3b2e70cb8e52fc72a061eaf1bc82e826c955b324381162dc7/manifold3d-3.5.4-cp312-cp312-macosx_10_14_x86_64.whl", hash = "sha256:b1ae587cf7cfa489fb50bba84a0e048d9daadd105b6a047a312e45a7602163fa", size = 1005349, upload-time = "2026-09-25T10:45:27.09Z" }, + { url = "https://files.pythonhosted.org/packages/66/28/6ec4f751be1b5868964eb92925da789c985efdaff5f0a5f85b47cbd87428/manifold3d-3.5.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d440e37d1e9888f90f42c70b4b3da98655be54105616e7739d84692bf7bda671", size = 884727, upload-time = "2026-09-25T10:45:28.554Z" }, + { url = "https://files.pythonhosted.org/packages/c3/f2/15ab84b2a80dcdc91ef53cde5fafdeb63cc3989646f17da7542011522b58/manifold3d-3.5.4-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4f4e8ca1c59d68047b262dbdb6e917ac4abff2942a65e7e469f4a398ce1f0b9b", size = 1317923, upload-time = "2026-09-25T10:45:30.034Z" }, + { url = "https://files.pythonhosted.org/packages/9e/04/91323ab10f23d185931b572622589673ec561a8106fa1ae0f2fc876fb960/manifold3d-3.5.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4a985892699268bbf07192b78b5e5569034c41ce74bf8183495123e8095af4fe", size = 1427177, upload-time = "2026-09-25T10:45:31.537Z" }, + { url = "https://files.pythonhosted.org/packages/a9/35/6b67f3af439f209b6f4ba653a5f3500f56464c99274fb4aa21323886c762/manifold3d-3.5.4-cp312-cp312-win_amd64.whl", hash = "sha256:5be1025860df8a83ed3c4fd585d87376b075e23ea45e833578fe77eacc49bee1", size = 1036128, upload-time = "2026-09-25T10:45:32.819Z" }, + { url = "https://files.pythonhosted.org/packages/79/55/aacf4b263a8bef710108cdcf1469156b53e44a63af574b435262b0e46820/manifold3d-3.5.4-cp312-cp312-win_arm64.whl", hash = "sha256:559b6cd07976a6ab3edf9806e5f1757432c397589069e01a0045e78d326ff510", size = 1145058, upload-time = "2026-09-29T05:41:55.705Z" }, + { url = "https://files.pythonhosted.org/packages/56/a7/12b1585a876eca4a1cf4985c45ce165a9c13583dd7b74f0c1f19cbf7c23e/manifold3d-3.5.4-cp313-cp313-macosx_10_14_universal2.whl", hash = "sha256:f26933565a268f91e222a494570bebe494bde204277134b3e32e0d6ac686a9ad", size = 1843251, upload-time = "2026-09-25T10:45:34.177Z" }, + { url = "https://files.pythonhosted.org/packages/b5/3b/4f030178617d1309883a857318e2764ca9ddb1080e9d9be66f326ce30286/manifold3d-3.5.4-cp313-cp313-macosx_10_14_x86_64.whl", hash = "sha256:95b512975ae13d5ecc57a9d388cf84be4cc717add5173d7d5fa408e6d6a07677", size = 1005296, upload-time = "2026-09-25T10:45:35.763Z" }, + { url = "https://files.pythonhosted.org/packages/5e/55/6f434b0b4750565ac57dd5dcd3b2770b7de408988f0d9a044bf587863e7d/manifold3d-3.5.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ed0736f472c3362b8084867f10a724a9a483927bdb7cbfceb564acc52a7f4273", size = 884711, upload-time = "2026-09-25T10:45:37.364Z" }, + { url = "https://files.pythonhosted.org/packages/5c/91/f5ccf45874cd667005107b654390e6379a2d970ed5fe6e5989bf24f4c7d6/manifold3d-3.5.4-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b46d2f19017fc2f3095d71cc111b8574e92afd5515d70529720324da5b1c0ed", size = 1317898, upload-time = "2026-09-25T10:45:38.768Z" }, + { url = "https://files.pythonhosted.org/packages/ac/9e/993cc841e4d88e2c8e6b1c5dfc52d4d0e8f78a46fbeaa98ff9bd539e3248/manifold3d-3.5.4-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7a5469641713f1bc291fea873cb134c435704df36828d134190fc2475b304259", size = 1427121, upload-time = "2026-09-25T10:45:40.199Z" }, + { url = "https://files.pythonhosted.org/packages/ea/7a/316e60dea127721fcd523210c2e6c641ab2fa5f6c957eb8a83222f0d7ee4/manifold3d-3.5.4-cp313-cp313-win_amd64.whl", hash = "sha256:76975aa4ebd18dcb0481e43dac3ed70d78066e9ad047e73a5f7dbc0df1553cf4", size = 1036021, upload-time = "2026-09-25T10:45:41.554Z" }, + { url = "https://files.pythonhosted.org/packages/d1/e7/a96928beac5287485cc0f61ac34c3b2ee42f57221d279a7d3bb176739a4d/manifold3d-3.5.4-cp313-cp313-win_arm64.whl", hash = "sha256:552ffb1f79ef77f1c7e05d638ee43e7fe88c652b1f9b042a88aab1fef85fc28c", size = 1144955, upload-time = "2026-09-29T05:41:57.75Z" }, + { url = "https://files.pythonhosted.org/packages/b8/20/86f3ec8c2481a002b378aeb28341f613eb8c10a2dec6945be7c1a4db0647/manifold3d-3.5.4-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:7c96a28ef7ed7a34e37cad775db95831051f03ca9e188f572b0a08b3561f4763", size = 1843034, upload-time = "2026-09-25T10:45:43.258Z" }, + { url = "https://files.pythonhosted.org/packages/ce/de/f57e7aebf0092bca0a6a3435d45105043a1f902cc89289264ab68823b07e/manifold3d-3.5.4-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:487b351a9b064353c9a8cb86b9f004ec0064511d121355a0fe738e96a5ca5306", size = 1004990, upload-time = "2026-09-25T10:45:44.55Z" }, + { url = "https://files.pythonhosted.org/packages/43/83/6d168952066c22749fdc570a67ba580271057b3da9da299d9cac32e3b374/manifold3d-3.5.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:3d6a81f79f4812dd9e88c8093588c31c6e863c410f61a274656f9cdff76b80c0", size = 884652, upload-time = "2026-09-25T10:45:46.168Z" }, + { url = "https://files.pythonhosted.org/packages/00/cd/475da5e3d38586edd0c487e116a77896d28dfc0f90fdbf9bb1f1a64057c9/manifold3d-3.5.4-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a7869f140b830faf93a76da3705d814b8e1652f3f68aab39351bfc6f05d93e01", size = 1319035, upload-time = "2026-09-25T10:45:47.572Z" }, + { url = "https://files.pythonhosted.org/packages/75/9f/d91de303052c3b6d851c14cc60c4ff9aabcdb4ed79e6a6122fde5c668aa9/manifold3d-3.5.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c3fc18f0712b5ff10fdc5307f9abc8a40affe3a5f8559a19b9c03e3a82e4513b", size = 1427465, upload-time = "2026-09-25T10:45:48.848Z" }, + { url = "https://files.pythonhosted.org/packages/17/a6/396f72fbcab489cb2678c066468fe2e33d7ce577351d11f948f0a7527d21/manifold3d-3.5.4-cp314-cp314-win_amd64.whl", hash = "sha256:a04a30eb686e913e1872dce6f537947d64a01c5b4a882af0be47beef2309b074", size = 1068405, upload-time = "2026-09-25T10:45:50.573Z" }, + { url = "https://files.pythonhosted.org/packages/aa/e8/f6751f97187a8e7fddc446ac5d73f5000cf4dcc033dec5683fea3fe906ff/manifold3d-3.5.4-cp314-cp314-win_arm64.whl", hash = "sha256:8c309c698837fdbca297ad7387f5348526e6635e49ce28476e2c9dcad30a947e", size = 1181481, upload-time = "2026-09-29T05:41:59.352Z" }, + { url = "https://files.pythonhosted.org/packages/93/00/5f7651472bab7378cc57b6a15edba155d056542b4c0c117b743f5cdc8a44/manifold3d-3.5.4-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:ee967a8f1b526194ea8a598e04d2fd6920a9a78e9d465a7b78e2a6827585b8f3", size = 1853599, upload-time = "2026-09-25T10:45:51.941Z" }, + { url = "https://files.pythonhosted.org/packages/f8/b4/63fa966d1138716a78c4e856c7846088f74a6797cc18346e6dbc8601f82f/manifold3d-3.5.4-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:a55945fccc1ad20c958bedf61397a12ea5329f897a29f2237c70e12bdf7bd51d", size = 1011076, upload-time = "2026-09-25T10:45:53.499Z" }, + { url = "https://files.pythonhosted.org/packages/28/2f/e200a5f4204d935435df2c6d58b35da8f2bfaaab61839365b2c1bac614e9/manifold3d-3.5.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5284a8a14fc86798d1698b37729e519516ba6c0574624ae16542032764adf189", size = 890394, upload-time = "2026-09-25T10:45:55.033Z" }, + { url = "https://files.pythonhosted.org/packages/19/8d/3856eefc139ab1f18e928abcc4531515e75d4a43db31a6180583c33d90f0/manifold3d-3.5.4-cp314-cp314t-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fd68576b104f563a8d2a9629f7de565c5ac704f276394f9ffdb9f0c5a05c20d8", size = 1326941, upload-time = "2026-09-25T10:45:56.43Z" }, + { url = "https://files.pythonhosted.org/packages/0f/24/8c9d993e89cf758c3dbbd4470dcf3efc5efef11dcd8f89e208539fd11b21/manifold3d-3.5.4-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ae80814e5c6f85f4c53f632b71009fdfa185645a1d68c673d0d7a6171c29f78b", size = 1433600, upload-time = "2026-09-25T10:45:57.904Z" }, + { url = "https://files.pythonhosted.org/packages/9e/f0/fac6f8eaff4617eeab741c87bfae8a6afd1057648b0551f206c4247b0407/manifold3d-3.5.4-cp314-cp314t-win_amd64.whl", hash = "sha256:d034b1d74df1aad9377f30b2228c33b3887bf5057c7efd98a86892604edd86aa", size = 1070681, upload-time = "2026-09-25T10:45:59.412Z" }, +] + +[[package]] name = "markdown-it-py" version = "4.0.0" source = { registry = "https://pypi.org/simple" } @@ -1220,6 +1258,7 @@ [package.dev-dependencies] dev = [ + { name = "manifold3d" }, { name = "pytest" }, { name = "ruff" }, ] @@ -1243,6 +1282,7 @@ [package.metadata.requires-dev] dev = [ + { name = "manifold3d", specifier = ">=3.5.4" }, { name = "pytest", specifier = ">=9.0.3" }, { name = "ruff", specifier = ">=0.15.12" }, ]