-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathcurvislice.bat
88 lines (70 loc) · 2.28 KB
/
curvislice.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
REM @echo off
set gurobi=0
set volumic=0
set nozzle=0.4
set layer=0.3
set filament=1.75
set ironing=0
set model=
set arg=none
for %%A in (%*) do call :Loop %%A
goto :EndLoop
:Loop
if "%arg%" EQU "none" (
set arg=%1
) else (
set %arg%=%1
set arg=none
)
goto :End
:EndLoop
if "%arg%" EQU "none" (
echo Error in arguments
exit
)
set path=%arg%
for %%f in ("%path%") do set model=%%~dpnf
set model=%model:\=/%
echo %model%
echo Generate tetmesh "from %model%.stl" ...
call toTetmesh.bat %model%
echo Done!
echo Optimize...
if "%gurobi%" EQU "1" (
.\bin\curvislice_grb.exe %model%.msh -l %layer%
) else (
.\bin\curvislice_osqp.exe %model%.msh -l %layer%
)
echo Done!
echo Prepare lua for IceSL
call luaGenerator.bat %model% %volumic% %nozzle% %layer% %filament% %ironing%
if not exist %appdata%\IceSL\icesl-printers\fff\curvi (
echo Create 'curvi' printer profile for IceSL
mkdir "%appdata%\IceSL\icesl-printers\fff\curvi"
copy /Y resources\curvi\features.lua "%appdata%\IceSL\icesl-printers\fff\curvi\"
copy /Y resources\curvi\printer.lua "%appdata%\IceSL\icesl-printers\fff\curvi\"
)
set ODIR=%CD%
.\tools\icesl\bin\icesl-slicer.exe settings.lua --service
chdir /d %ODIR%
echo Uncurve %model%
.\bin\uncurve.exe -l %layer% --gcode %model%
echo "
echo "
echo "
echo "
echo " ______ __ __ __
echo " / \ / | / |/ |
echo "/$$$$$$ | __ __ ______ __ __ $$/ _______ $$ |$$/ _______ ______
echo "$$ | $$/ / | / | / \ / \ / |/ | / |$$ |/ | / | / \
echo "$$ | $$ | $$ |/$$$$$$ |$$ \ /$$/ $$ |/$$$$$$$/ $$ |$$ |/$$$$$$$/ /$$$$$$ |
echo "$$ | __ $$ | $$ |$$ | $$/ $$ /$$/ $$ |$$ \ $$ |$$ |$$ | $$ $$ |
echo "$$ \__/ |$$ \__$$ |$$ | $$ $$/ $$ | $$$$$$ |$$ |$$ |$$ \_____ $$$$$$$$/
echo "$$ $$/ $$ $$/ $$ | $$$/ $$ |/ $$/ $$ |$$ |$$ |$$ |
echo " $$$$$$/ $$$$$$/ $$/ $/ $$/ $$$$$$$/ $$/ $$/ $$$$$$$/ $$$$$$$/
echo "===================================================================================
echo "==>
echo " Gcode generated at: %model%.gcode
echo "==>
echo "===================================================================================
:End