fullseye

3D プリンタのデータ(G-code / 3MF / スライス / 層画像の検査) — 使い方ガイド

この族は何をする道具箱か

3D プリンタのデータは「形(メッシュ)→ 層(スライス)→ 経路(G-code)→ 印刷中の層画像」と流れます。この族はその往復を、Fullseye の既存語彙(mesh / voxel / table / image2d / measurement / text)だけで、numpy + 標準ライブラリで閉じます。新しい型は作りません。

17 op / 5 カテゴリ(台帳は opsprintpath.py、実体は printpath.py):

流れ

flowchart LR
    M[mesh: read_mesh / read_3mf] --> S[mesh_slice_contours]
    M --> V[mesh_slice_stack]
    S --> G[contours_to_gcode] --> W[gcode_write]
    W --> R[gcode_read] --> E[gcode_extrusion_volume / gcode_time_estimate]
    R --> I[gcode_layer_image]
    C[カメラの層画像] --> D[print_layer_defect_map]
    I --> D
    V --> X[vol_render_transfer で立体に]

最短の使い方

import fullseye as fs
L = fs.ledger

V, F = fs.read_mesh("part.stl")                       # STL / OBJ / PLY / OFF、または L.read_3mf("part.3mf")
stack = L.mesh_slice_stack((V, F), layer_mm=0.2, px_per_mm=10.0)     # (Z, Y, X) の層マスク
c = L.mesh_slice_contours((V, F), z=3.1)              # 1 層の輪郭
g = L.contours_to_gcode(c, z=3.1, layer=15)            # 周回の経路(最小のスライサ)
path = L.gcode_write(g, "part.gcode")

t = L.gcode_read("part.gcode")                        # どのスライサの出力でも(円弧は展開しておく)
print(L.gcode_extrusion_volume(t), "mm^3", L.gcode_time_estimate(t), "s (lower bound)")
expected = L.gcode_layer_image(t, layer=15, px_per_mm=10.0, bounds=(0, 0, 60, 40))
defects = L.print_layer_defect_map(camera_layer_15, expected, tolerance_px=3)   # +1 欠け / −1 はみ出し

真値で確かめてある性質(tests/test_printpath.py、examples/poc_print_layer_inspection.py)

罠

関連