3MF 转 STL 教程 — 现代 3D 打印格式详解

3MF 才是 STL 该有的样子
3MF(3D Manufacturing Format)是 3D 打印行业终于承认 STL 拖了所有人后腿之后造的东西。同样的三角网格数据,但装在 ZIP 后的 XML 容器里,原生支持颜色、材质、单文件多对象、打印元数据、数字签名。Bambu Studio、PrusaSlicer、Cura、Microsoft 3D Builder 都默认用 3MF 当工程文件。但 CNC 厂、老切片软件、更广的网格生态还期望 STL — 所以 3MF 转 STL 经常碰到。转换本身直白(提取三角形,扔掉其它),但知道丢什么有助于决定该不该转、还是把 3MF 留着。
3MF 和 STL 实际存的是什么
3MF 文件是 ZIP 归档(3MF Consortium 规范,2015)— 改后缀为 .zip 就能解压。里面:3D/3dmodel.model 是主要的 XML 含顶点和三角形数据,[Content_Types].xml 描述包,_rels/.rels 映射关系,可选的 Metadata/ 文件夹放缩略图和切片设置。3D 模型 XML 通过纹理引用支持顶点和三角形颜色,多对象实例带定位,基础材质,构建指令,切片参数。STL 是反面 — 带面法线的三角形扁平列表,ASCII 或二进制,没元数据没颜色没层级。3MF 转 STL 从 ZIP 里的 XML 提取三角形几何,写成更简单的二进制格式,扔掉 3MF 包装里 STL 没法表达的一切。
转换保留什么、丢什么
- 几何保留 — 3MF 里每个顶点和三角形都到 STL 里。3MF 含多对象的话,STL 里合成一个网格,或者每个对象一个 STL 文件(看转换器)。
- 顶点颜色丢了 — 3MF 支持顶点颜色(多色打印的彩色花瓶等),STL 不存。颜色重要就留 3MF 或导 OBJ。
- 材质丢了 — 3MF 基础材质和打印机配置文件没了。导入 STL 的切片软件得从头重设材质/耗材配置。
- 打印元数据丢了 — 3MF 内嵌的切片设置、层高、填充、支撑都不传。工程归档有用,转换里丢。
- 多对象 — 3MF 能装一个有 50 个零件的构建板。STL 习惯上装一个。大多数转换器合到一个 STL 或输出 STL 文件夹(每个构建对象一个)。
- 文件大小 — 二进制 STL 大约等于原始三角形数据大小(50 字节/三角形)。3MF 通常更小,因为 ZIP 压缩 XML 三角形数据能压 70-90%。3MF 转 STL 几乎总是涨大文件。
五步把 3MF 转 STL
- Open pcbviewer.app — 把 .3mf 文件拖到 MakerSuite 3D 3D 查看器先看模型。查看器把每个对象显示成单独节点,就能看出 3MF 是单零件还是构建板。
- 点 Export 选 STL。工具从 3MF 提三角形,把所有对象合成一个网格,写二进制 STL。要按对象分开 STL,用 Bambu Studio 的 File > Export > Export as STL 的 '每个对象单独文件' 选项。
- 批量转换用切片软件 CLI:prusa-slicer --export-stl in.3mf -o out.stl,或 PrusaSlicer Python 脚本。Bambu Studio 也接 CLI 参数。
- 在 MakerSuite 3D 重新打开 STL 验证。检查三角形数对得上(没丢三角形)、包围盒对得上、打印前几何水密。
- 如果转换是为了归档,两个文件都留 — 3MF 保留工程状态用新打印机配置重新切片,STL 是通用 CAD/CAM 交付格式。
验证转出来的 STL 跟 3MF 原始一致 — 把两个都拖到 MakerSuite 3D 并排放,在送打印店之前抓住任何几何丢失。
免费试用 MakerSuite 3D什么时候 3MF 转 STL vs 留着 3MF
下游工具要求时转 STL — CNC 铣床、钣金供应商、老切片软件版本(Cura 4 之前、PrusaSlicer 2.0 之前)、CAM 软件、不支持 3MF 的平台。留 3MF:工程归档时(切片设置随文件走)、分享多色或多材质打印件时、你的切片流水线原生支持 3MF 时(每个现代切片软件都支持)。更广的 3D 打印生态向 3MF 收敛 — Bambu Lab、Prusa、Anycubic 原生格式都默认 3MF — 但 STL 有 35 年装机量不会消失。正解:可编辑工程文件用 3MF,单向交付给老旧工具用 STL。
3MF 转 STL 是正解的场景
- 彩色打印件的 3MF → CNC 加工 — 几何交给只要 STL 的铣床,颜色对新工艺无关
- Bambu Studio 工程 → CAM 软件 — 刀路生成器只接 STL,几何要从 3MF 包装里出来
- 多对象 3MF → 单独 STL — 打印农场要每个零件作为自己的 STL 做批量调度
- 新切片 3MF → 老打印机宿主 — 没原生处理 3MF 的 Octoprint/Repetier-Server 安装
- 归档清理 — 在 Thingiverse/Printables 发布前剥切片设置,最大化兼容性
在浏览器里转换,不上传
打印设计,特别是商业的,是 IP。Convertio、AnyConv 这种在线转换器要把 .3mf 传到他们服务器,那里以不清楚的保留策略缓存在别人的存储上。MakerSuite 3D 在浏览器里通过 JavaScript 解析 3MF 并导出 STL — ZIP 本地解压、XML 三角形本地读、STL 本地写并直接下载。不走服务器、第三方不碰你的几何。
常见问题
What's actually inside a 3MF file?
A 3MF file is a ZIP archive — rename it to .zip and you can extract it. Inside: 3D/3dmodel.model is the main XML with vertex and triangle data, [Content_Types].xml describes MIME types, _rels/.rels maps relationships, and optional Metadata/ folders hold thumbnails and slicer settings. The 3MF Consortium spec (3mf.io) defines the structure; Microsoft, Autodesk, HP, and Dassault collaborated on it as a modern replacement for STL. The XML approach lets it carry colors, materials, and per-object metadata that STL can't represent.
Will I lose anything important converting 3MF to STL?
Yes, depending on what your 3MF contains. Lost: per-vertex colors, base materials, multiple objects collapse to one mesh, slicer settings (layer height, infill, supports), printer profile, build orientation, and embedded thumbnails. Preserved: every vertex and triangle of the geometry. For a single-color, single-object print where you only need geometry, the loss doesn't matter. For multi-color prints (Bambu AMS, Prusa MMU), you lose the color data entirely — the printer won't know which extruder to use without the original 3MF.
Why is my STL file bigger than the 3MF?
3MF is a ZIP-compressed XML; STL is uncompressed binary. The XML triangles compress 70-90% inside the ZIP, while binary STL stores 50 bytes per triangle with no compression. A 5 MB 3MF can easily become a 25 MB STL. If file size matters and the downstream tool supports both, keep the 3MF. If you must use STL but want smaller files, gzip the binary STL — most slicers accept .stl.gz directly, and you'll get most of the size advantage back.
Does Bambu Studio export STL from 3MF?
Yes. Open the 3MF in Bambu Studio (or PrusaSlicer / Cura — they all read 3MF), then File > Export > Export as STL. Most slicers also offer 'Export each object as separate STL' which splits a multi-object 3MF into one STL per part. Useful when sending parts to different machines or batch-scheduling on a print farm. PrusaSlicer's CLI: prusa-slicer --export-stl in.3mf -o out.stl works for headless batch conversion.
Should I keep the 3MF as a backup?
Yes, always. Once you've exported to STL, delete the 3MF and you've lost all your slicer settings — layer height, infill percentage, support configuration, brim/skirt, color assignments. Re-slicing from STL means redoing all that work. Keep the 3MF as the master project file; export STL as a unidirectional handoff to other tools. Same pattern as keeping .kicad_pcb instead of just Gerber, or keeping .blend instead of just .obj — always preserve the editable source format.
相关文章
拖入 3MF 文件 — 浏览器里转 STL,零上传
打开 3D 查看器