A macOS Quick Look extension for .3mf files (3D Manufacturing Format) and sliced G-code. Press Space on any .3mf or .gcode file in Finder to see a 3D preview of the model or the print — no slicer needed.
- Quick Look integration — press Space in Finder to preview
.3mffiles - 3D rendering with SceneKit — proper lighting, shading, and materials
- Build plate — Bambu Studio / OrcaSlicer / PrusaSlicer projects sit on the printer's real bed, sized from the project's bed shape; other files get a grid scaled to the model's footprint. Either way it turns with the model like a turntable
- Auto-rotating model — spins around the vertical axis so you can see all sides, with a pause/resume button to freeze it at any angle
- Interactive controls — orbit and zoom with your mouse/trackpad in the preview
- Model info overlay — triangle count, object count, and dimensions parsed from the file, plus the print profile for Bambu Studio / OrcaSlicer / PrusaSlicer projects (printer, nozzle, layer height, filament, infill, supports) and, once a plate has been sliced, its estimated print time and filament weight
- Color support — renders per-object/per-triangle colors from both
<basematerials>and the 3MF Materials & Properties extension (<m:colorgroup>), with or without a namespace prefix - Painted colours — colours brushed onto a model in Bambu Studio, OrcaSlicer or PrusaSlicer show up, following the brush even where paint covers only part of a triangle
- Light and dark mode — preview and host app follow the system appearance; light mode uses a grey backdrop so pale models stay visible
- Finder thumbnails — rendered icons for
.3mfand.gcodefiles, reusing the slicer's embedded preview when available - G-code previews — press Space on a
.gcodefile from PrusaSlicer, Bambu Studio, OrcaSlicer or Cura to see the toolpath drawn as printed lines, coloured by feature (walls, infill, supports) the way the slicer shows it, or by filament for a multi-colour print. A slider down the right edge scrubs through the print layer by layer (drag it, or scroll over it), and the info line shows the slicer, layer count, size, estimated time and filament, and the print profile. Very large prints are thinned to stay quick, and say so. Binary.bgcodeisn't supported yet - Multi-object support — handles files with multiple mesh objects (Bambu Studio, PrusaSlicer, etc.)
- Slicer project files — reads Bambu Studio / OrcaSlicer projects properly: filament colours per object, one build plate at a time rather than every plate at once, and boolean "negative parts" left out of the render
- Plate paging — multi-plate projects show a
‹ Plate 1/3 ›control, named where the slicer named the plate. In the app window the left/right arrow keys work too; in Quick Look they don't, because the preview panel uses them to step through the Finder selection - Large projects — only the plate on screen is parsed, the next one is loaded ahead of time, and ZIP64 packages open
- Drag-and-drop — drop
.3mffiles into the host app for inline preview - Automatic updates — signed updates delivered through Sparkle
- Help links — star the project or report a problem from the Help menu or the foot of the window; a report opens a GitHub issue with the app and macOS versions filled in
- Download the latest release (or build from source)
- Move
Preview3MF.appto/Applications - Launch it once — this registers the Quick Look extensions
- Go to System Settings → Privacy & Security → Extensions → Quick Look and make sure both are enabled:
- PreviewExtension — the 3D preview shown when you press Space
- ThumbnailExtension — the rendered icon shown in Finder
- That's it — press Space on any
.3mffile in Finder, or just look at the icons
Tip: If Quick Look doesn't pick it up immediately, run
qlmanage -rin Terminal to reset the Quick Look cache.
From v1.0.18 onward the app updates itself. It checks daily and you can ask any time with Preview3MF → Check for Updates…. Updates are downloaded from the GitHub release and verified against an EdDSA signature before installing, so a tampered download is rejected.
Running v1.0.17 or earlier? Those builds predate Sparkle, so download v1.0.18 manually once — after that it's automatic.
Requires Xcode 15+ and macOS 13+.
git clone https://github.com/cavoco/Preview3MF.git
cd Preview3MF
xcodebuild -scheme Preview3MF -configuration Release buildOr open Preview3MF.xcodeproj in Xcode and hit Cmd+R.
Local builds can't check for updates out of the box. Sparkle ships its helpers
(Updater.app, Autoupdate, the XPC services) ad-hoc signed, and Sparkle refuses
to use helpers whose team identifier doesn't match the host app — it reports
"An error occurred in retrieving update information". Release builds are fixed up
by the release workflow; local builds need it done by hand:
./scripts/sign_sparkle.sh /path/to/Preview3MF.app \
"$(security find-identity -v -p codesigning | grep 'Apple Development' | head -1 | awk -F'"' '{print $2}')"This isn't an Xcode build phase because the project enables
ENABLE_USER_SCRIPT_SANDBOXING, under which codesign can't modify the app
bundle — and the phase fails silently rather than erroring.
.3mf files are ZIP archives containing XML model data. The extension:
- Extracts all
.modelfiles from the archive (using ZIPFoundation, from a fork with a ZIP64 fix) - Parses
<vertex>,<triangle>,<build>items, materials, and metadata from the XML - Resolves
<component>references so assembly objects expand to their part meshes with composed transforms - Builds SceneKit geometry with per-face normals for flat shading, applying each build item's transform
- Renders with a 3-point lighting setup, a build-plate grid, and an auto-framed camera
For Finder thumbnails, slicers usually bake a rendered PNG into the package — the thumbnail extension reuses that embedded image as a fast path and only falls back to SceneKit rendering when none is present.
G-code is read line by line: only moves that extrude are kept (arcs are flattened), grouped into
layers by the slicer's layer-change comments, with each line's feature taken from its ;TYPE: label.
Each extrusion is drawn as a short tube one line wide and one layer tall, all in a single geometry,
so scrubbing the layer slider just draws fewer of its triangles. G-code thumbnails use the picture
the slicer embeds at the top of the file, and draw the toolpath when there isn't one.
├── Preview3MF/ # Host app (SwiftUI)
│ ├── Preview3MFApp.swift
│ └── ContentView.swift # Drag-and-drop preview UI
├── PreviewExtension/ # Quick Look preview extension (Space to preview)
│ ├── PreviewViewController.swift
│ └── Info.plist # UTI + QL config
├── ThumbnailExtension/ # Quick Look thumbnail extension (Finder icons)
│ └── ThumbnailProvider.swift
└── Shared/ # Used by all targets
├── ThreeMFParser.swift # ZIP extraction, XML parsing, metadata, embedded thumbnails
├── GCodeParser.swift # G-code → toolpath, layers, print details, embedded thumbnails
├── ToolpathGeometry.swift # Toolpath → printed-line geometry
└── SceneBuilder.swift # Mesh → SCNScene with lighting and build-plate grid
Full history and downloads are on the Releases page. Recent highlights:
- v1.1.0 — G-code previews and Finder thumbnails, with a layer slider
- v1.0.27 — painted colours from Bambu Studio / OrcaSlicer; grey backdrop in light mode; Finder thumbnails fill the whole card
- v1.0.26 — large projects load faster (only the shown plate is parsed); ZIP64 packages open; filament colours no longer washed out
- v1.0.25 — estimated print time and filament weight per sliced plate, with a per-filament breakdown
- v1.0.24 — build plate drawn at the printer's real bed size; Quick Look works when Bambu Studio or Shapr3D has claimed
.3mf - v1.0.23 — print profile in the info overlay; pause/resume for the auto-rotation; build plate turns with the model
- v1.0.21 — Bambu Studio / OrcaSlicer projects: filament colours, one plate at a time,
‹ Plate 1/3 ›paging - v1.0.18 — automatic updates through Sparkle
- v1.0.17 — scroll-wheel zoom in the 3D preview and host app
MIT
