Skip to content

LukaCek/slice_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Print Price Calculator

Note: This project is in the early stages of development. Features may change, and occasional instability is expected.

This project is a web application built with Python and the Flask framework, which functions as a price calculator for 3D printing. It allows users to upload 3D models in .stl format, and the application uses OrcaSlicer to calculate the estimated printing time, material consumption, and based on this data, estimates the final printing price.

The application is available at: printprice.cekluka.com view

Current settings on this website are from the files dir. Because I couldn't figure out how to use custom parameters.

Features

  • STL File Upload: Users can upload their 3D models through the web interface.
  • Print Quality Selection: Option to choose between different print quality profiles, which affect time and price.
  • Automatic Slicing: OrcaSlicer runs in the background to prepare the model for printing.
  • Detailed Price Calculation: The price is composed of several components:
    • Material cost (PLA, PETG)
    • Cost of consumed electricity
    • Printer maintenance cost
    • Printer amortization
    • Minimum service fee
  • Various Output Formats: After calculation, the user can receive:
    • A detailed analysis of the price and printing time (web page).
    • A prepared .3mf file.
    • A generated G-code file.
    • Data in JSON format.

Technologies

  • Backend: Python, Flask
  • Slicer: OrcaSlicer
  • Frontend: HTML, Jinja2
  • Hosting: Docker, Google Cloud Run

Local Installation and Setup

To run the project in a local environment, you need Python, Flask, and OrcaSlicer installed.

  1. Clone the repository:

    git clone https://github.com/LukaCek/slice_api.git
    cd slice_api
  2. Install dependencies:

    pip install Flask
  3. Install OrcaSlicer: Follow the installation instructions on the official OrcaSlicer website. Make sure the orcaslicer command is available in your system's PATH.

  4. Run the application:

    python app.py

    The application will be accessible at http://localhost:8080.

TODO

Here are some planned features and improvements:

  • Material Selection: Implement a feature to allow users to select the printing material settings.
  • Advanced Slicing Parameters: Expose more slicing parameters to the user, such as layer height, infill percentage, support settings, etc., for more granular control over the print.

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published