|
| 1 | +# quick-look-step |
| 2 | + |
| 3 | +> QuickLook & Finder thumbnail support for STEP (`.step` / `.stp`) 3d model files on macOS. |
| 4 | +> |
| 5 | +> Built with Swift + SwiftUI, SceneKit, and [foxtrot](https://github.com/Formlabs/foxtrot). |
| 6 | +
|
| 7 | +## ✨ What does it do? |
| 8 | + |
| 9 | +* **Quick Look Preview** – Press spacebar in Finder to open an interactive 3d preview of the file (similar to the built-in preview for STL files). |
| 10 | +* **Finder Thumbnails** – Generates a raster thumbnail for every STEP file in Finder. |
| 11 | +* **STEP viewer app** – A tiny SwiftUI host app lets you drag-and-drop a STEP file to view it. This mostly exists because the preview and thumbnail extensions need to be bundled inside a `.app`. |
| 12 | + |
| 13 | +Because [foxtrot](https://github.com/Formlabs/foxtrot) is neat and very fast, even fairly complex assemblies can be previewed quickly. |
| 14 | + |
| 15 | +## 🚧 Requirements |
| 16 | + |
| 17 | +* macOS 14 (Sonoma) or newer |
| 18 | +* M1 or above CPU (Apple Silicon) |
| 19 | + |
| 20 | +## 💻 Installing |
| 21 | + |
| 22 | +* Download the latest verison from [Releases](https://github.com/johnboiles/quick-look-step/releases) and unzip it |
| 23 | +* Move QuickLookStep.app to Applications |
| 24 | +* Open the QuickLookStep.app |
| 25 | +* After a few seconds, a macOS notification appears saying an extension has added. Click this notification. |
| 26 | + * If you miss the notification, open System Settings > General > Login Items and Extensions, then click the (i) next to QuickLookStep. |
| 27 | +* Turn the switch on for both options under QuickLookStep and click Done |
| 28 | +* Open a Finder window and select a `.step` or `.stp` file. You should be able to preview it with Quick Look (using spacebar) it or see the thumbnail in the sidebar in column view. |
| 29 | +* Close the app (it doesn't need to be open for the plugins to work) |
| 30 | + |
| 31 | +## 🛠️ How it works |
| 32 | + |
| 33 | +1. A small Rust crate (shipped pre-built as `libfoxtrot_universal.a`) parses the STEP file and exposes raw vertex/index buffers via a C-compatible FFI declared in `foxtrot.h`. |
| 34 | +2. `SceneBuilder.swift` converts those buffers into a `SCNScene`, applies reasonable lighting, and positions a camera so the whole model fits on screen. |
| 35 | +3. The scene is consumed by three targets: |
| 36 | + * **`StepThumbnail.appex`** – Renders the scene off-screen to produce the Finder thumbnail. |
| 37 | + * **`StepPreview.appex`** – Embeds an interactive `SCNView` for the Quick Look preview. |
| 38 | + * **`QuickLookStep` macOS app** – Convenient wrapper around the same scene useful during development and as a fallback viewer. |
| 39 | + |
| 40 | +This app is intentionally very simple. macOS has similar built-in support for previewing STL files and I tried to keep this app as-similar-as-possible to that in appearance and feel. |
| 41 | + |
| 42 | +## 🐞 Known issues |
| 43 | + |
| 44 | +* Some STEP files don't load. The underlying [foxtrot](https://github.com/Formlabs/foxtrot) library doesn't like them. |
| 45 | +* Very large assemblies can take a long time to load and the extensions get stuck for a bit. Better timeouts could probably protect against this. |
| 46 | + |
| 47 | +## 🤝 Contributing |
| 48 | + |
| 49 | +Let's make this better together. Issues and PRs are welcome. |
| 50 | + |
| 51 | +This project is licensed under the terms of the **MIT License**. Do what you want with it but I don't guarantee it works. |
0 commit comments