An interactive web application to slice 3D STL files and export 2D DXF sketches.
Ideal for extracting profiles from multi-level extrusions for laser cutting and CNC.
- 🎯 Precise Manual Slicing: The standout feature! Use the interactive slider to pick the exact height of the cut. Perfect for models with multiple extrusions or levels.
- 👀 Interactive 3D Viewer: Visualize your model in 3D (green) and see the exact cut path (red) update in real-time as you move the slider.
- 🔄 Multi-Axis Support: Slice along the X, Y, or Z axis to capture the correct profile.
- 📂 Easy Workflow: Drag and drop your
.stlfile and get an instant.dxfdownload. - 📊 Instant Stats: See vertex/face counts and bounding box dimensions immediately.
- 🌐 Cross-Platform: Run it in your browser anywhere (Windows, Mac, Linux).
Note
This tool is best suited for prismatic shapes (extrusions). Because you can manually select the slice height, you can easily extract profiles from different levels of a stacked model (e.g., a base plate vs. a top detail) by downloading them as separate DXF files.
You can run this app on your own machine using Python.
-
Clone the repository:
git clone https://github.com/evanofficial/interactive-stl-slicer.git cd interactive-stl-slicer -
Install dependencies:
pip install -r requirements.txt
-
Run the app:
streamlit run app.py
The app will open automatically in your web browser at http://localhost:8501.
- Streamlit - For the web interface.
- Trimesh - For loading and slicing 3D meshes.
- Plotly - For interactive 3D visualization.
- Ezdxf - For creating valid DXF files.
- NumPy - For high-performance vector math.
This project is open source and available under the MIT License.
