Skip to content

evanofficial/interactive-stl-slicer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📐 STL to DXF Slicer

Try It Online Python

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.

App Screenshot

✨ Features

  • 🎯 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 .stl file and get an instant .dxf download.
  • 📊 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.

🚀 How to Run Locally

You can run this app on your own machine using Python.

  1. Clone the repository:

    git clone https://github.com/evanofficial/interactive-stl-slicer.git
    cd interactive-stl-slicer
  2. Install dependencies:

    pip install -r requirements.txt
  3. Run the app:

    streamlit run app.py

The app will open automatically in your web browser at http://localhost:8501.

🛠️ Built With

  • 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.

📄 License

This project is open source and available under the MIT License.

About

Open source interactive web tool to slice 3D STL models at precise heights and export 2D DXF profiles. Features real-time 3D visualization and manual cut control.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages