✨feature: Initial commit
This commit is contained in:
57
README.md
Normal file
57
README.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# STL Print Estimator
|
||||
|
||||
Command line and optional web tool to estimate filament usage and print time for STL files using configurable printer settings.
|
||||
|
||||
## Quick start (CLI)
|
||||
|
||||
```bash
|
||||
python estimator.py --config printer-config.json --output-format csv --out estimates.csv
|
||||
```
|
||||
|
||||
Defaults:
|
||||
- Reads all `.stl` files in the current directory (non-recursive).
|
||||
- Writes `estimates.csv` or `estimates.json` if `--out` is not provided.
|
||||
|
||||
## Web interface
|
||||
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
python estimator.py --serve --port 5000 --config printer-config.json --output-format csv
|
||||
```
|
||||
|
||||
Open `http://localhost:5000`, upload a single STL or a ZIP containing multiple STLs, choose CSV or JSON, and optionally tick “Provide download” to get the generated file.
|
||||
|
||||
## Configuration
|
||||
|
||||
Printer settings live in a JSON file (default `printer-config.json`):
|
||||
|
||||
```json
|
||||
{
|
||||
"layer_height_mm": 0.2,
|
||||
"nozzle_diameter_mm": 0.4,
|
||||
"perimeter_count": 2,
|
||||
"top_layers": 4,
|
||||
"bottom_layers": 4,
|
||||
"infill_density": 0.25,
|
||||
"perimeter_speed_mm_s": 40.0,
|
||||
"infill_speed_mm_s": 60.0,
|
||||
"travel_speed_mm_s": 120.0,
|
||||
"filament_diameter_mm": 1.75,
|
||||
"filament_density_g_cm3": 1.24,
|
||||
"travel_factor": 0.1
|
||||
}
|
||||
```
|
||||
|
||||
Adjust values to match your machine and material. `travel_factor` is the fraction of extrusion distance added as travel moves for the time estimate.
|
||||
|
||||
## Notes on estimates
|
||||
|
||||
- Volume and surface area are computed directly from the STL triangles (binary or ASCII).
|
||||
- Shell volume is approximated from surface area and perimeter thickness; infill volume is scaled by `infill_density`.
|
||||
- Print time is a heuristic using perimeter/infill/travel speeds; real slicer output will differ.
|
||||
|
||||
## Examples
|
||||
|
||||
- JSON output: `python estimator.py -f json -o result.json`
|
||||
- Use a custom config: `python estimator.py -c my-printer.json`
|
||||
- Serve on a different port: `python estimator.py --serve --port 8080`
|
||||
Reference in New Issue
Block a user