add support for building .sl1 and .ctb outputs, for resin-based printers
This commit is contained in:
12
Makefile
12
Makefile
@@ -66,7 +66,7 @@ SLIC3R_FLAGS=\
|
|||||||
--skirts 3
|
--skirts 3
|
||||||
# --brim-width 10 #< combine with raft, if first layer fails to adhere well
|
# --brim-width 10 #< combine with raft, if first layer fails to adhere well
|
||||||
|
|
||||||
all: build/case.stl build/case.gcode
|
all: build/case.stl build/case.gcode build/case.sl1 build/case.ctb
|
||||||
|
|
||||||
install:
|
install:
|
||||||
mkdir -p $(SHAREDIR)
|
mkdir -p $(SHAREDIR)
|
||||||
@@ -101,10 +101,20 @@ build/case.stl: main.py src/*.py
|
|||||||
mkdir -p "$(@D)"
|
mkdir -p "$(@D)"
|
||||||
./main.py --export-stl $@
|
./main.py --export-stl $@
|
||||||
|
|
||||||
|
# .gcode: for FDM printers
|
||||||
%.gcode: %.stl
|
%.gcode: %.stl
|
||||||
mkdir -p $(shell dirname $@)
|
mkdir -p $(shell dirname $@)
|
||||||
slic3r $(SLIC3R_FLAGS) $< -o $@
|
slic3r $(SLIC3R_FLAGS) $< -o $@
|
||||||
|
|
||||||
|
# .sl1: for prusa resin-based printers
|
||||||
|
%.sl1: %.stl
|
||||||
|
prusa-slicer --export-sla $<
|
||||||
|
|
||||||
|
# .ctb: for Elegoo printers (requires `uvtools` package)
|
||||||
|
%.ctb: %.sl1
|
||||||
|
# XXX: UVtoolsCmd exits `1` on success ?? (what does it exit on failure? bleh)
|
||||||
|
UVtoolsCmd convert $< Chitubox $@ || test -f $@
|
||||||
|
|
||||||
readme: readme_files/pinephone_front_case_with_phone.png readme_files/pinephone_back_case_with_phone.png readme_files/pinephone_side_case_with_phone.png
|
readme: readme_files/pinephone_front_case_with_phone.png readme_files/pinephone_back_case_with_phone.png readme_files/pinephone_side_case_with_phone.png
|
||||||
|
|
||||||
doc: readme build/web-viewer/index.html
|
doc: readme build/web-viewer/index.html
|
||||||
|
@@ -27,6 +27,9 @@ you'll need a browser which supports webGL (e.g. chromium).
|
|||||||
- Python3
|
- Python3
|
||||||
- cadquery
|
- cadquery
|
||||||
- cq-editor (for interactive viewing/development)
|
- cq-editor (for interactive viewing/development)
|
||||||
|
- slic3r (if you want .gcode files, for FDM printers)
|
||||||
|
- prusa-slicer (if you want .sl1 files, for resin printers)
|
||||||
|
- uvtools (if you want .ctb files, for resin printers)
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
|
@@ -14,6 +14,7 @@
|
|||||||
buildInputs = [
|
buildInputs = [
|
||||||
cqPkgs.cadquery
|
cqPkgs.cadquery
|
||||||
cqPkgs.cq-editor
|
cqPkgs.cq-editor
|
||||||
|
pkgs.prusa-slicer
|
||||||
pkgs.slic3r
|
pkgs.slic3r
|
||||||
pkgs.chromium
|
pkgs.chromium
|
||||||
# (pkgs.python37.withPackages (ps: with ps; [ cadquery ]))
|
# (pkgs.python37.withPackages (ps: with ps; [ cadquery ]))
|
||||||
|
Reference in New Issue
Block a user