Skip to content

Releases

Print3D 0.3.0

Choose a tag to compare

@ThinkArtWork ThinkArtWork released this 06 Dec 05:32

Print3D v0.3.0

一句话

0.3.0 把“生成完的模型”推进到“可测、可验收、可安全打印”,并把安装拆成轻量核心与按需 CAD 扩展。

亮点

1. 轻量核心,按需装 CAD

  • print3d 不再强制安装 build123d/OCP;只做切片、打印、预览时安装体积明显更小。
  • 需要参数化建模时安装 print3d[cad](约 250 MB)。
  • model_build 缺 CAD 时返回 cad_extra_missing,hint 里直接给出 uv pip install "print3d[cad]" 或 pip install 命令。
  • capabilities / doctor 会说明当前解释器是否有 CAD,不再只抛一个 ImportError。

2. print3d doctor

一条命令检查:Python 版本、工作区可写、配置文件、密钥文件权限、CAD、Blender、切片器、打印机目标。输出 pass / warn / fail 和修复建议;有 fail 时退出码非 0,适合写进安装脚本。

3. 可测量的特征(spec v2)

  • spec 新增 features:hole(直径 + 数量)与 wall(最小壁厚),支持公差、来源、required 和备注。
  • v1 spec 仍可读,保存时自动升级为 v2;旧资产无需迁移。
  • model_validate 在 spec 含 features 时自动测量;没有 STEP 时特征返回 needs_evidence,不会误判失败。

4. model_measure 与 model_diff

  • model_measure:从 STEP 实测孔(直径、深度、轴向位置、通孔估计)和平面间隙;从 STL 射线采样壁厚(min / p5 / median / 薄壁占比 / 薄点位置);输出 min_feature_mm 与 smallest_hole_mm。
  • model_diff:比较两个 revision 的 bbox、体积、增材/减材、三角数和采样表面距离(mean / p95 / max),回答“改了一版有没有碰到别处”。

5. 打印安全

  • send 增加打印机级文件锁,避免两个调用同时上传/启动。
  • 同一 slice 的重复调用走幂等键,不会重复启动;返回 duplicate=true 和原 job。
  • 上传前二次检查打印机状态;G-code 文件在排队后变化会拒绝发送。
  • 锁在任务提交后释放,失败/异常路径也会释放;残留锁按 TTL 过期。

6. 工具注解

所有工具带 readOnlyHint / destructiveHint / idempotentHint / openWorldHint,Agent 可以据此决定是否先确认;写操作仍保留确认串。

升级说明

  • 旧配置、旧资产、旧调用兼容;0.2.0 的 spec 自动升级。
  • 安装命令改为固定 0.3.0:
    uvx --python 3.11 --from "print3d[cad]==0.3.0" print3d init
    uvx --python 3.11 --from "print3d[cad]==0.3.0" print3d doctor
    只切片/打印可去掉 [cad]。
  • 源码开发:uv sync --extra dev --extra cad。
  • 新增工具:model_measure、model_diff;model_validate 支持 features。

验证

  • 本地全量测试通过(含 send 幂等/锁/二次检查、doctor、spec v2、measure/diff、CAD 缺失映射)。
  • 黄金件/负样本 benchmark:黄金件全部通过,负样本全部被拒绝(薄壁、少孔、错孔径)。
  • wheel 元数据检查:核心依赖不含 build123d,cad extra 才带 build123d>=0.9,<1;tool_hints.py / doctor.py / locks.py 已打进 wheel。
  • 未在真实打印机上重复做 0.3.0 验收;0.2.0 的 Snapmaker U1 实机路径未改,send 改动有模拟测试覆盖。

已知限制

  • 孔来自 STEP 圆柱面:倒角、沉孔、非圆柱孔可能多计;孔位是轴向坐标,不是装配配合检查。
  • 壁厚是射线采样 p5,不是 GD&T;极薄/极复杂内部结构可能漏检。
  • model_diff 是采样表面距离,不是 CAD 偏差。
  • Windows 仍没有 POSIX rlimit 等价物,隔离强度以 capabilities.sandbox 为准。
  • Bambu LAN / PrusaLink 仍未做对应硬件验证。

链接

Print3D 0.2.0

Choose a tag to compare

@ThinkArtWork ThinkArtWork released this 01 Dec 08:31

Print3D 0.2.0 adds an evidence and verification layer for image and reference-driven modelling. It does not replace the existing CAD, STEP, slicing or printer paths, and existing assets keep working without migration.

Highlights

  • Versioned evidence: model_write accepts an optional spec (or spec_path) and a reference mask. The normalized spec.json and mask are copied into the revision and recorded with SHA-256, so the evidence used for a build stays reproducible.
  • Measured dimensions: model_validate measures the built STL and compares named dimensions against the specification. Supported measurements are the model bounding box, its axes (width/depth/height) and volume. Each dimension records its source, tolerance, measured value, error and status.
  • Honest validation states: model_validate distinguishes pass, warn, needs_evidence and fail, and reports what is still missing. A build alone is not treated as accepted when a mask, visual check or human review is still required.
  • Optional silhouette likeness: model_likeness compares a single orthographic view with a user-supplied mask. It reports IoU, clipping, shape-only mode and a mirror/rotation diagnostic. It is always advisory and never blocks the existing build or slice path.
  • Build feedback: model_build now includes the dimension validation result when a spec exists, and its hint says explicitly when visual or human evidence is still outstanding.
  • Documentation and metadata: the Chinese and English manuals document the spec schema, measurement semantics and likeness limits. The MCP server and registry metadata report version 0.2.0.

The server now exposes 32 tools. Existing workspaces, assets and scripts are unchanged.

Install

From PyPI:

uvx --python 3.11 --from print3d==0.2.0 print3d init
uvx --python 3.11 --from print3d==0.2.0 print3d capabilities

The release also provides a wheel, an sdist and the npm bundle tarball below for offline or pinned installation. The previous v0.1.1 release remains available and is not modified.

Package channels

  • npm (DSH bundle): print3d-mcp@0.2.0, 6 files, shasum cd80bee9beee9819b9df29b59184bed87a4a0a43; it pins print3d==0.2.0. The same tarball is attached below.
  • MCP Registry: io.github.ThinkArtWork/print3d@0.2.0, status active and isLatest=true; the PyPI-backed 0.1.1 entry remains active.

Verification

  • ruff check src tests: passed.
  • Full local test suite: 368 passed, 12 skipped; skipped cases are Windows-specific checks or the Unix-covered equivalent.
  • Real build123d end-to-end: a 40 × 20 × 10 mm box, four named dimensions, a 402 × 202 px top-view mask at 0.1 mm/px, dimension validation pass, likeness IoU 0.9925 with advisory=true and blocking=false.
  • Clean wheel install: version 0.2.0, 32 tools discoverable, CLI reports 0.2.0.

Windows x64 acceptance (2026-12-01)

A Windows 11 x64 machine (NT 10.0.26300.0, AMD64, PowerShell 5.1, uv/uvx 0.13.8) installed print3d==0.2.0 from PyPI and ran the published acceptance kit end to end:

  • Cold start: 67.3 s; warm start: 0.7 s; MCP handshake plus evidence path: 10.4 s.
  • 32 tools exposed, including model_validate and model_likeness.
  • A real build123d 20 × 20 × 10 mm box built with bbox=[20,20,10] mm, volume=4.0 cm3, one solid, 6 faces and 12 triangles; watertight and valid.
  • Four named bbox/volume dimensions passed with 0.0 mm error; model_validate returned pass with complete=false and human_review still listed as remaining evidence, as designed.
  • model_likeness ran in physical mode at 0.1 mm/px and returned IoU 0.9901, severity=pass, advisory=true, blocking=false.
  • capabilities reported native CAD available and the Windows sandbox (tree_kill=true, kill_method=job object, no POSIX rlimits). Blender, OrcaSlicer and printers were not configured; that is expected for this smoke test.
  • Non-blocking warning: the ezdxf cache directory under the test account's home was unavailable, so cad.json recorded a cache warning. The build exited 0 and STL/STEP geometry was valid.

This acceptance covers the Windows execution path: package installation, native CAD, MCP transport, spec/mask persistence, named-dimension validation and advisory likeness. It does not prove image-to-model accuracy or physical print quality. The machine was Windows 11 x64; Windows 10 was not re-run in this acceptance.

Acknowledgements

The dimension evidence, silhouette comparison and evidence-aware acceptance design were developed with reference to mfranzon/print3d (MIT), at revision 3926182. Thanks to the original author for open-sourcing these mechanisms. The upstream copyright and full MIT license text are preserved in the repository's NOTICE; the Chinese and English READMEs and manuals link to it.

Boundaries

  • Dimension validation covers the bounding box and volume, not hole positions, wall thickness, internal features or assembly fits. Use CAD/STEP checks, a coupon or a physical fit for those.
  • Photo-based dimension evidence still requires a user or host-selected scale, points and mask. Camera perspective, occlusion and segmentation error remain the user's responsibility.
  • Silhouette IoU is two-dimensional view evidence, not a 3D reconstruction or a guarantee that the part matches the object.
  • This release did not add a new physical print validation. The Windows 11 x64 acceptance above is a software/geometry smoke test, not a print test; Windows 10 was not re-run in that acceptance.

Alpha software. See the README and manual for platform, hardware and safety boundaries.

Print3D 0.1.1

Choose a tag to compare

@ThinkArtWork ThinkArtWork released this 25 Nov 00:50

Print3D 0.1.1 is the current public MCP release: a PyPI-installable server, a DeepSeek Harness bundle, and client setup docs.

Install the server:

uvx --python 3.11 --from print3d==0.1.1 print3d init
uvx --python 3.11 --from print3d==0.1.1 print3d serve --stdio

Published artifacts:

This patch supersedes 0.1.0 with corrected install documentation. Alpha software; see README for platform and hardware support boundaries.

Windows x64 smoke test