Merge branch 'master' into pa_reprap_g10_temperature_support

This commit is contained in:
ardenpm 2020-09-15 11:40:38 +10:00 committed by GitHub
commit 541c31afb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
323 changed files with 28621 additions and 8886 deletions

View file

@ -35,6 +35,11 @@ option(SLIC3R_ASAN "Enable ASan on Clang and GCC" 0)
set(SLIC3R_GTK "2" CACHE STRING "GTK version to use with wxWidgets on Linux") set(SLIC3R_GTK "2" CACHE STRING "GTK version to use with wxWidgets on Linux")
if (APPLE)
set(CMAKE_FIND_FRAMEWORK LAST)
set(CMAKE_FIND_APPBUNDLE LAST)
endif ()
# Proposal for C++ unit tests and sandboxes # Proposal for C++ unit tests and sandboxes
option(SLIC3R_BUILD_SANDBOXES "Build development sandboxes" OFF) option(SLIC3R_BUILD_SANDBOXES "Build development sandboxes" OFF)
option(SLIC3R_BUILD_TESTS "Build unit tests" ON) option(SLIC3R_BUILD_TESTS "Build unit tests" ON)
@ -386,7 +391,7 @@ if (NOT EXPAT_FOUND)
set(EXPAT_LIBRARIES expat) set(EXPAT_LIBRARIES expat)
endif () endif ()
find_package(PNG) find_package(PNG REQUIRED)
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)

View file

@ -3,10 +3,11 @@ set(DEP_CMAKE_OPTS "-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
include("deps-unix-common.cmake") include("deps-unix-common.cmake")
find_package(PNG QUIET) # Some Linuxes may have very old libpng, so it's best to bundle it instead of relying on the system version.
if (NOT PNG_FOUND) # find_package(PNG QUIET)
message(WARNING "No PNG dev package found in system, building static library. You should install the system package.") # if (NOT PNG_FOUND)
endif () # message(WARNING "No PNG dev package found in system, building static library. You should install the system package.")
# endif ()
#TODO UDEV #TODO UDEV

View file

@ -79,3 +79,29 @@ This is set in the property list file
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist
To remove the limitation, simply delete the key `MinimumSDKVersion` from that file. To remove the limitation, simply delete the key `MinimumSDKVersion` from that file.
# TL; DR
Works on a fresh installation of MacOS Catalina 10.15.6
- Install [brew](https://brew.sh/):
- Open Terminal
- Enter:
```brew install cmake git gettext
brew update
brew upgrade
git clone https://github.com/prusa3d/PrusaSlicer/
cd PrusaSlicer/deps
mkdir build
cd build
cmake ..
make
cd ../..
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local"
make
src/prusa-slicer

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -1,17 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve"> viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<path fill="#FFFFFF" d="M87.29,22.62H34.71c-1.39,0-3.14,0.69-4.16,1.63L9.81,43.46c-1.05,0.98-1.82,2.73-1.82,4.16v54.31 <g id="ADD">
c0,1.9,1.55,3.45,3.45,3.45h55.17c1.4,0,3.15-0.7,4.16-1.67l12.41-11.83c0.69-0.66,0.72-1.75,0.06-2.44s-1.75-0.71-2.44-0.06 <path fill="#FFFFFF" d="M72.3,117.5H10.5v-75h75v23.27c1.61-0.56,3.28-0.99,5-1.29V41.04l27-27V72.3c1.89,1.71,3.57,3.65,5,5.76V8
L70.05,99.63v-53.2c0.26-0.19,0.51-0.39,0.72-0.61L87.3,28.29v33.12c0,0.35-0.02,0.64-0.04,0.85c-0.51,0.55-0.62,1.39-0.22,2.06 c0-0.05-0.01-0.1-0.02-0.15c0-0.06-0.01-0.11-0.02-0.17c-0.03-0.22-0.08-0.43-0.15-0.62c0,0,0-0.01,0-0.01c0,0,0,0,0,0
c0.49,0.82,1.55,1.08,2.37,0.59l0.25-0.15c0.67-0.4,1.09-1.1,1.09-3.35V26.07C90.74,24.17,89.2,22.62,87.29,22.62z M11.44,47.62 c-0.01-0.03-0.03-0.05-0.04-0.08c-0.05-0.11-0.11-0.21-0.17-0.31c-0.03-0.04-0.05-0.08-0.08-0.11c-0.06-0.08-0.13-0.16-0.2-0.24
L11.44,47.62h55.17v54.31H11.44V47.62z M68.26,43.46c-0.33,0.35-1.18,0.71-1.65,0.71H14.12L32.9,26.78 c-0.03-0.03-0.06-0.07-0.09-0.1c-0.09-0.09-0.19-0.17-0.3-0.25c-0.01-0.01-0.02-0.02-0.04-0.03c-0.12-0.08-0.24-0.15-0.38-0.2
c0.37-0.35,1.31-0.71,1.82-0.71h49.94L68.26,43.46z"/> c-0.04-0.02-0.09-0.03-0.13-0.05c-0.1-0.04-0.2-0.07-0.3-0.09c-0.05-0.01-0.09-0.02-0.14-0.03c-0.15-0.03-0.3-0.05-0.45-0.05H48
<path id="_x2B__1_" fill="#ED6B21" d="M110.57,82.1c0,0.95-0.78,1.72-1.72,1.72h-4.31c-0.95,0-1.72,0.78-1.72,1.72v4.31 c-0.57,0-1.12,0.19-1.56,0.55l-40,32c-0.03,0.03-0.06,0.06-0.09,0.09c-0.07,0.06-0.13,0.12-0.19,0.19
c0,0.95-0.78,1.72-1.72,1.72h-4.31c-0.95,0-1.72-0.78-1.72-1.72v-4.31c0-0.95-0.78-1.72-1.72-1.72h-4.31 c-0.05,0.06-0.1,0.12-0.15,0.18c-0.05,0.07-0.09,0.13-0.14,0.2c-0.04,0.07-0.08,0.14-0.12,0.21c-0.03,0.07-0.07,0.15-0.09,0.22
c-0.95,0-1.72-0.78-1.72-1.72v-4.31c0-0.95,0.78-1.72,1.72-1.72h4.31c0.95,0,1.72-0.78,1.72-1.72v-4.31c0-0.95,0.78-1.72,1.72-1.72 c-0.03,0.08-0.05,0.16-0.07,0.24c-0.02,0.08-0.04,0.15-0.05,0.23c-0.01,0.09-0.02,0.18-0.03,0.27c0,0.04-0.01,0.08-0.01,0.13v80
h4.31c0.95,0,1.72,0.78,1.72,1.72v4.31c0,0.95,0.78,1.72,1.72,1.72h4.31c0.95,0,1.72,0.78,1.72,1.72V82.1z M120.05,79.95 c0,1.38,1.12,2.5,2.5,2.5h70.06C75.95,121.07,74.01,119.39,72.3,117.5z M48.88,10.5h65.09l-27,27H15.13L48.88,10.5z"/>
c0-11.65-9.47-21.12-21.12-21.12S77.81,68.3,77.81,79.95s9.47,21.12,21.12,21.12S120.05,91.59,120.05,79.95z M116.6,79.95 <g>
c0,9.74-7.93,17.67-17.67,17.67s-17.67-7.93-17.67-17.67s7.93-17.67,17.67-17.67S116.6,70.2,116.6,79.95z"/> <path fill="#ED6B21" d="M96,69.5c-14.61,0-26.5,11.89-26.5,26.5s11.89,26.5,26.5,26.5s26.5-11.89,26.5-26.5S110.61,69.5,96,69.5z
M96,117.5c-11.86,0-21.5-9.64-21.5-21.5S84.14,74.5,96,74.5s21.5,9.64,21.5,21.5S107.86,117.5,96,117.5z"/>
<path fill="#ED6B21" d="M112,93.5H98.5V80c0-1.38-1.12-2.5-2.5-2.5s-2.5,1.12-2.5,2.5v13.5H80c-1.38,0-2.5,1.12-2.5,2.5
s1.12,2.5,2.5,2.5h13.5V112c0,1.38,1.12,2.5,2.5,2.5s2.5-1.12,2.5-2.5V98.5H112c1.38,0,2.5-1.12,2.5-2.5S113.38,93.5,112,93.5z"/>
</g>
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Before After
Before After

View file

@ -1,24 +1,23 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve"> viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<g id="ARRANGE"> <g id="arrange">
<path fill="#FFFFFF" d="M113.85,14.27v99.36h-99.7V14.27H113.85 M115.85,8.27H12.15c-2.2,0-4,1.8-4,4v103.36c0,2.2,1.8,4,4,4h103.7
c2.2,0,4-1.8,4-4V12.27C119.85,10.07,118.05,8.27,115.85,8.27L115.85,8.27z"/>
<g> <g>
<path fill="#ED6B21" d="M48.04,99.24c0,2.2-1.8,4-4,4H28.11c-2.2,0-4-1.8-4-4v-47c0-2.2,1.8-4,4-4h15.94c2.2,0,4,1.8,4,4 <path fill="#FFFFFF" d="M120,122.5H8c-1.38,0-2.5-1.12-2.5-2.5V8c0-1.38,1.12-2.5,2.5-2.5h112c1.38,0,2.5,1.12,2.5,2.5v112
L48.04,99.24L48.04,99.24z"/> C122.5,121.38,121.38,122.5,120,122.5z M10.5,117.5h107v-107h-107V117.5z"/>
</g> </g>
<g> <g>
<path fill="#ED6B21" d="M28.11,40.38c-2.2,0-4-1.8-4-4v-7.72c0-2.2,1.8-4,4-4h15.94c2.2,0,4,1.8,4,4v7.72c0,2.2-1.8,4-4,4H28.11z" <path fill="#ED6B21" d="M104,58.5H24c-1.38,0-2.5-1.12-2.5-2.5V24c0-1.38,1.12-2.5,2.5-2.5h80c1.38,0,2.5,1.12,2.5,2.5v32
/> C106.5,57.38,105.38,58.5,104,58.5z M26.5,53.5h75v-27h-75V53.5z"/>
</g> </g>
<g> <g>
<path fill="#ED6B21" d="M68,103.24c-2.2,0-4-1.8-4-4V83.67c0-2.2,1.8-4,4-4h31.89c2.2,0,4,1.8,4,4v15.57c0,2.2-1.8,4-4,4H68z"/> <path fill="#ED6B21" d="M48,106.5H24c-1.38,0-2.5-1.12-2.5-2.5V72c0-1.38,1.12-2.5,2.5-2.5h24c1.38,0,2.5,1.12,2.5,2.5v32
C50.5,105.38,49.38,106.5,48,106.5z M26.5,101.5h19v-27h-19V101.5z"/>
</g> </g>
<g> <g>
<path fill="#ED6B21" d="M103.89,59.95c0,2.2-1.8,4-4,4H68c-2.2,0-4-1.8-4-4V28.66c0-2.2,1.8-4,4-4h31.89c2.2,0,4,1.8,4,4V59.95z" <path fill="#ED6B21" d="M104,106.5H64c-1.38,0-2.5-1.12-2.5-2.5V72c0-1.38,1.12-2.5,2.5-2.5h40c1.38,0,2.5,1.12,2.5,2.5v32
/> C106.5,105.38,105.38,106.5,104,106.5z M66.5,101.5h35v-27h-35V101.5z"/>
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<g id="resin">
<rect x="4" y="7" fill="#ED6B21" width="8" height="8"/>
<path fill="none" stroke="#808080" stroke-linecap="round" stroke-miterlimit="10" d="M4.5,15h6.99c0.28,0,0.5-0.23,0.5-0.5V6
c0-1-2-1-2-2s0-1,0-1h1V1.5C11,1.23,10.77,1,10.5,1H5.5C5.23,1,5,1.23,5,1.5V3h1v1c0,1-2,1-2,2v8.5C4,14.77,4.23,15,4.5,15z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 671 B

View file

@ -1,37 +1,29 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve"> viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<g id="copy"> <g id="copy">
<g> <g>
<path fill="#ED6B21" d="M115.76,51.2l-8.06-8.06c-2.47-2.47-6.97-4.34-10.47-4.34h-50.8c-4.2,0-7.62,3.42-7.62,7.62v66.04 <path fill="#FFFFFF" d="M38.24,29.83l-15.49,8.94c-0.77,0.45-1.25,1.27-1.25,2.17v17.89c0,0.89,0.48,1.72,1.25,2.17l15.49,8.94
c0,4.2,3.42,7.62,7.62,7.62h66.04c4.2,0,7.62-3.42,7.62-7.62v-50.8C120.09,58.17,118.23,53.67,115.76,51.2z M111.42,54.04h-6.57 c0.39,0.22,0.82,0.33,1.25,0.33s0.86-0.11,1.25-0.33L48,65.75v-5.77l-8.51,4.91l-12.99-7.5v-15l12.99-7.5L48,39.8v-5.77
v-6.57L111.42,54.04z M115.01,112.47c0,1.4-1.14,2.54-2.54,2.54H46.43c-1.4,0-2.54-1.14-2.54-2.54V46.42 l-7.26-4.19C39.97,29.39,39.02,29.39,38.24,29.83z"/>
c0-1.4,1.14-2.54,2.54-2.54h50.8c0.74,0,1.63,0.18,2.54,0.46v12.24c0,1.4,1.14,2.54,2.54,2.54h12.24c0.28,0.91,0.46,1.8,0.46,2.54 <path fill="#FFFFFF" d="M48,85.5H10.5v-75h43V24c0,1.38,1.12,2.5,2.5,2.5h13.5V32h5v-8c0-0.17-0.02-0.33-0.05-0.49
V112.47z"/> c-0.02-0.11-0.06-0.22-0.1-0.33c-0.02-0.05-0.02-0.09-0.04-0.14c-0.05-0.12-0.11-0.23-0.18-0.34c-0.02-0.03-0.03-0.06-0.05-0.09
<path fill="#ED6B21" d="M53.97,59.13h35.72c1.4,0,2.54-1.14,2.54-2.54s-1.14-2.54-2.54-2.54H53.97c-1.4,0-2.54,1.14-2.54,2.54 c-0.09-0.14-0.2-0.26-0.31-0.38L57.77,6.23c-0.12-0.12-0.24-0.22-0.38-0.31c-0.04-0.02-0.08-0.04-0.11-0.06
S52.56,59.13,53.97,59.13z"/> c-0.1-0.06-0.2-0.12-0.32-0.17c-0.05-0.02-0.11-0.03-0.16-0.05c-0.1-0.03-0.2-0.07-0.3-0.09C56.33,5.52,56.17,5.5,56,5.5H8
<path fill="#ED6B21" d="M104.93,69.29H53.97c-1.4,0-2.54,1.14-2.54,2.54s1.14,2.54,2.54,2.54h50.96c1.4,0,2.54-1.14,2.54-2.54 C6.62,5.5,5.5,6.62,5.5,8v80c0,1.38,1.12,2.5,2.5,2.5h40V85.5z M58.5,14.04l7.46,7.46H58.5V14.04z"/>
S106.33,69.29,104.93,69.29z"/>
<path fill="#ED6B21" d="M104.93,84.53H53.97c-1.4,0-2.54,1.14-2.54,2.54s1.14,2.54,2.54,2.54h50.96c1.4,0,2.54-1.14,2.54-2.54
S106.33,84.53,104.93,84.53z"/>
<path fill="#ED6B21" d="M104.93,99.77H53.97c-1.4,0-2.54,1.14-2.54,2.54s1.14,2.54,2.54,2.54h50.96c1.4,0,2.54-1.14,2.54-2.54
S106.33,99.77,104.93,99.77z"/>
</g> </g>
<g> <g>
<path fill="#FFFFFF" d="M85.27,20.71l-8.06-8.06c-2.47-2.47-6.97-4.34-10.47-4.34h-50.8c-4.2,0-7.62,3.42-7.62,7.62v66.04 <path fill="#ED6B21" d="M122.45,55.51c-0.02-0.11-0.06-0.22-0.1-0.33c-0.02-0.05-0.02-0.09-0.04-0.14
c0,4.2,3.42,7.62,7.62,7.62h17.78c1.4,0,2.54-1.14,2.54-2.54s-1.14-2.54-2.54-2.54H15.94c-1.4,0-2.54-1.14-2.54-2.54V15.94 c-0.05-0.12-0.11-0.23-0.18-0.34c-0.02-0.03-0.03-0.06-0.05-0.09c-0.09-0.14-0.2-0.26-0.31-0.38l-15.99-15.99
c0-1.4,1.14-2.54,2.54-2.54h50.8c0.74,0,1.63,0.18,2.54,0.46V26.1c0,1.4,1.14,2.54,2.54,2.54h12.45c0.16,0.49,0.25,0.93,0.25,1.27 c-0.12-0.12-0.24-0.22-0.38-0.31c-0.04-0.02-0.08-0.04-0.11-0.06c-0.1-0.06-0.2-0.12-0.32-0.17c-0.05-0.02-0.11-0.03-0.16-0.05
v3.81c0,1.4,1.14,2.54,2.54,2.54c1.4,0,2.54-1.14,2.54-2.54v-3.81C89.61,27.14,87.75,23.19,85.27,20.71z M74.37,16.99l6.57,6.57 c-0.1-0.03-0.2-0.07-0.3-0.09c-0.16-0.03-0.33-0.05-0.49-0.05H56c-1.38,0-2.5,1.12-2.5,2.5v80c0,1.38,1.12,2.5,2.5,2.5h64
h-6.57V16.99z"/> c1.38,0,2.5-1.12,2.5-2.5V56C122.5,55.83,122.48,55.67,122.45,55.51z M106.5,46.04l7.46,7.46h-7.46V46.04z M58.5,117.5v-75h43V56
<path fill="#FFFFFF" d="M59.21,23.56H23.48c-1.4,0-2.54,1.14-2.54,2.54s1.14,2.54,2.54,2.54h35.72c1.4,0,2.54-1.14,2.54-2.54 c0,1.38,1.12,2.5,2.5,2.5h13.5v59H58.5z"/>
S60.61,23.56,59.21,23.56z"/> <path fill="#ED6B21" d="M104.23,70.78l-15.49-8.94c-0.77-0.45-1.73-0.45-2.5,0l-15.49,8.94c-0.77,0.45-1.25,1.27-1.25,2.17v17.89
<path fill="#FFFFFF" d="M28.73,38.8h-5.24c-1.4,0-2.54,1.14-2.54,2.54s1.14,2.54,2.54,2.54h5.24c1.4,0,2.54-1.14,2.54-2.54 c0,0.89,0.48,1.72,1.25,2.17l15.49,8.94c0.39,0.22,0.82,0.33,1.25,0.33s0.86-0.11,1.25-0.33L104.23,93
S30.13,38.8,28.73,38.8z"/> c0.77-0.45,1.25-1.27,1.25-2.17V72.94C105.48,72.05,105.01,71.23,104.23,70.78z M100.48,89.39l-12.99,7.5l-12.99-7.5v-15
<path fill="#FFFFFF" d="M28.73,54.04h-5.24c-1.4,0-2.54,1.14-2.54,2.54s1.14,2.54,2.54,2.54h5.24c1.4,0,2.54-1.14,2.54-2.54 l12.99-7.5l12.99,7.5V89.39z"/>
S30.13,54.04,28.73,54.04z"/>
<path fill="#FFFFFF" d="M28.73,69.29h-5.24c-1.4,0-2.54,1.14-2.54,2.54s1.14,2.54,2.54,2.54h5.24c1.4,0,2.54-1.14,2.54-2.54
S30.13,69.29,28.73,69.29z"/>
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Before After
Before After

View file

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="cross_megafocus.svg"
xml:space="preserve"
enable-background="new 0 0 16 16"
viewBox="0 0 16 16"
y="0px"
x="0px"
id="Layer_1"
version="1.0"><metadata
id="metadata16"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs14" /><sodipodi:namedview
inkscape:current-layer="Layer_1"
inkscape:window-maximized="1"
inkscape:window-y="-9"
inkscape:window-x="-9"
inkscape:cy="8"
inkscape:cx="8"
inkscape:zoom="47.0625"
showgrid="false"
id="namedview12"
inkscape:window-height="1721"
inkscape:window-width="3200"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<g
style="opacity:1;fill-opacity:1"
transform="matrix(1.1,0,0,1.1,-0.8,-0.8)"
id="cross">
<g
style="fill-opacity:1"
id="g4">
<line
style="fill-opacity:1"
id="line2"
y2="14"
x2="2"
y1="2"
x1="14"
stroke-miterlimit="10"
stroke-linecap="round"
stroke-width="3"
stroke="#ed6b21"
fill="none" />
</g>
<g
style="fill-opacity:1"
id="g8">
<line
style="fill-opacity:1"
id="line6"
y2="14"
x2="14"
y1="2"
x1="2"
stroke-miterlimit="10"
stroke-linecap="round"
stroke-width="3"
stroke="#ed6b21"
fill="none" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2 KiB

View file

@ -1,31 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve"> viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<g id="DELETE_ALL_1_"> <g id="delete_x5F_all">
<path fill="#FFFFFF" d="M103.52,43.87l-13.31,69.97H37.79L24.48,43.87H103.52 M108.77,37.87H19.23c-1.1,0-1.83,0.88-1.63,1.96
l14.84,78.04c0.21,1.08,1.27,1.96,2.37,1.96h58.36c1.1,0,2.17-0.88,2.37-1.96l14.84-78.04C110.6,38.75,109.87,37.87,108.77,37.87
L108.77,37.87z"/>
<g> <g>
<path fill="#ED6B21" d="M89.38,22.97c-1.1,0-2-0.9-2-2v-10.9c0-1.1-0.9-2-2-2H42.62c-1.1,0-2,0.9-2,2v10.9c0,1.1-0.9,2-2,2H19.23 <path fill="#FFFFFF" d="M104,122.5H24c-1.29,0-2.37-0.99-2.49-2.27l-8-88c-0.06-0.7,0.17-1.39,0.64-1.91
c-1.1,0-2,0.9-2,2v3.45c0,1.1,0.9,2,2,2h89.54c1.1,0,2-0.9,2-2v-3.45c0-1.1-0.9-2-2-2H89.38z M79.59,20.97c0,1.1-0.9,2-2,2H50.41 C14.63,29.8,15.3,29.5,16,29.5h96c0.7,0,1.37,0.3,1.85,0.81c0.47,0.52,0.71,1.21,0.64,1.91l-8,88
c-1.1,0-2-0.9-2-2v-3.45c0-1.1,0.9-2,2-2h27.18c1.1,0,2,0.9,2,2V20.97z"/> C106.37,121.51,105.29,122.5,104,122.5z M26.28,117.5h75.43l7.55-83H18.74L26.28,117.5z"/>
</g> </g>
<g> <g>
<path fill="#FFFFFF" d="M93.17,73.5H34.83c-0.83,0-1.5-0.67-1.5-1.5s0.67-1.5,1.5-1.5h58.34c0.83,0,1.5,0.67,1.5,1.5 <path fill="#ED6B21" d="M112,26.5H16c-1.38,0-2.5-1.12-2.5-2.5v-8c0-1.38,1.12-2.5,2.5-2.5h29.5V8c0-1.38,1.12-2.5,2.5-2.5h32
S94,73.5,93.17,73.5z"/> c1.38,0,2.5,1.12,2.5,2.5v5.5H112c1.38,0,2.5,1.12,2.5,2.5v8C114.5,25.38,113.38,26.5,112,26.5z M18.5,21.5h91v-3H80
</g> c-1.38,0-2.5-1.12-2.5-2.5v-5.5h-27V16c0,1.38-1.12,2.5-2.5,2.5H18.5V21.5z"/>
<g>
<path fill="#FFFFFF" d="M90.14,89.45H37.96c-0.83,0-1.5-0.67-1.5-1.5s0.67-1.5,1.5-1.5h52.18c0.83,0,1.5,0.67,1.5,1.5
S90.97,89.45,90.14,89.45z"/>
</g>
<g>
<path fill="#FFFFFF" d="M87.1,105.4H40.9c-0.83,0-1.5-0.67-1.5-1.5s0.67-1.5,1.5-1.5h46.2c0.83,0,1.5,0.67,1.5,1.5
S87.93,105.4,87.1,105.4z"/>
</g>
<g>
<path fill="#FFFFFF" d="M96.2,57.56H31.8c-0.83,0-1.5-0.67-1.5-1.5s0.67-1.5,1.5-1.5h64.4c0.83,0,1.5,0.67,1.5,1.5
S97.03,57.56,96.2,57.56z"/>
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1,012 B

Before After
Before After

View file

@ -1,50 +1,46 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve"> viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<g id="ADD_INSTANCE"> <g id="instance_x5F_add">
<g> <g>
<path fill="#ED6B21" d="M88.01,57.95c0-1.1-0.9-2-2-2H74c-1.1,0-2-0.9-2-2V41.94c0-1.1-0.9-2-2-2H58c-1.1,0-2,0.9-2,2v12.01 <path fill="#FFFFFF" d="M65.02,122.49c-1.36,0-2.47-1.09-2.5-2.45c-0.03-1.38,1.07-2.52,2.45-2.55c3.71-0.07,7.4-0.52,10.98-1.33
c0,1.1-0.9,2-2,2H41.99c-1.1,0-2,0.9-2,2v12.01c0,1.1,0.9,2,2,2H54c1.1,0,2,0.9,2,2v12.01c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2 c1.34-0.31,2.69,0.54,2.99,1.88c0.31,1.35-0.54,2.69-1.88,2.99c-3.91,0.89-7.95,1.38-12,1.46
V73.95c0-1.1,0.9-2,2-2h12.01c1.1,0,2-0.9,2-2V57.95z"/> C65.05,122.49,65.04,122.49,65.02,122.49z M51.6,121.12c-0.18,0-0.37-0.02-0.55-0.06c-3.93-0.89-7.79-2.19-11.46-3.88
c-1.25-0.58-1.8-2.06-1.23-3.32c0.58-1.25,2.06-1.8,3.32-1.23c3.35,1.54,6.88,2.73,10.47,3.55c1.35,0.3,2.19,1.64,1.89,2.99
C53.78,120.33,52.74,121.12,51.6,121.12z M89.21,116.52c-0.91,0-1.79-0.5-2.23-1.37c-0.62-1.23-0.13-2.74,1.1-3.36
c3.29-1.66,6.42-3.67,9.3-5.98c1.08-0.86,2.65-0.69,3.51,0.39c0.86,1.08,0.69,2.65-0.39,3.51c-3.15,2.52-6.58,4.72-10.17,6.53
C89.97,116.44,89.58,116.52,89.21,116.52z M29.14,110.33c-0.55,0-1.1-0.18-1.56-0.54c-3.15-2.51-6.06-5.36-8.63-8.46
c-0.88-1.06-0.73-2.64,0.33-3.52c1.06-0.88,2.64-0.74,3.52,0.33c2.35,2.84,5.01,5.44,7.9,7.74c1.08,0.86,1.26,2.43,0.4,3.51
C30.61,110.01,29.88,110.33,29.14,110.33z M108.39,100.64c-0.53,0-1.07-0.17-1.52-0.52c-1.09-0.84-1.3-2.41-0.46-3.51
c2.25-2.93,4.21-6.09,5.81-9.41c0.6-1.24,2.1-1.77,3.34-1.17c1.24,0.6,1.77,2.09,1.17,3.34c-1.75,3.63-3.89,7.09-6.35,10.29
C109.88,100.31,109.14,100.64,108.39,100.64z M13.58,90.89c-0.93,0-1.82-0.52-2.25-1.41c-1.76-3.63-3.14-7.46-4.11-11.37
c-0.33-1.34,0.49-2.7,1.83-3.03c1.34-0.33,2.7,0.49,3.03,1.83c0.89,3.58,2.15,7.07,3.76,10.39c0.6,1.24,0.08,2.74-1.16,3.34
C14.32,90.81,13.94,90.89,13.58,90.89z M118.82,78.01c-0.17,0-0.34-0.02-0.51-0.05c-1.35-0.28-2.22-1.61-1.94-2.96
c0.75-3.59,1.13-7.29,1.13-11l0-0.23c0-1.38,1.12-2.5,2.5-2.5s2.5,1.12,2.5,2.5l0,0.2c0,4.08-0.42,8.12-1.24,12.05
C121.02,77.2,119.98,78.01,118.82,78.01z M8,66.62c-1.38,0-2.5-1.12-2.5-2.5V64c0-4.01,0.41-8.01,1.21-11.9
c0.28-1.35,1.6-2.22,2.95-1.94c1.35,0.28,2.22,1.6,1.94,2.95C10.87,56.67,10.5,60.33,10.5,64v0.12C10.5,65.5,9.38,66.62,8,66.62z
M118.33,52.88c-1.12,0-2.14-0.76-2.42-1.89c-0.89-3.57-2.17-7.07-3.78-10.39c-0.61-1.24-0.09-2.74,1.15-3.34
c1.24-0.6,2.74-0.09,3.34,1.15c1.77,3.63,3.16,7.45,4.14,11.36c0.33,1.34-0.48,2.7-1.82,3.03
C118.74,52.85,118.53,52.88,118.33,52.88z M13.48,42.32c-0.36,0-0.73-0.08-1.08-0.25c-1.25-0.6-1.77-2.09-1.17-3.34
c1.74-3.63,3.87-7.1,6.33-10.3c0.84-1.09,2.41-1.3,3.51-0.46c1.1,0.84,1.3,2.41,0.46,3.51c-2.25,2.93-4.2,6.1-5.79,9.42
C15.3,41.79,14.41,42.32,13.48,42.32z M107.05,30.68c-0.72,0-1.43-0.31-1.92-0.9c-2.36-2.84-5.03-5.44-7.92-7.73
c-1.08-0.86-1.26-2.43-0.41-3.51c0.86-1.08,2.43-1.26,3.51-0.41c3.16,2.5,6.07,5.34,8.65,8.44c0.88,1.06,0.74,2.64-0.32,3.52
C108.18,30.49,107.61,30.68,107.05,30.68z M28.97,22.81c-0.73,0-1.46-0.32-1.95-0.94c-0.86-1.08-0.69-2.65,0.38-3.51
c3.15-2.53,6.56-4.73,10.16-6.55c1.23-0.63,2.74-0.13,3.36,1.1c0.62,1.23,0.13,2.74-1.1,3.36c-3.28,1.67-6.41,3.69-9.29,6
C30.07,22.63,29.52,22.81,28.97,22.81z M87.25,15.54c-0.35,0-0.7-0.07-1.04-0.23c-3.36-1.53-6.88-2.72-10.48-3.52
c-1.35-0.3-2.2-1.64-1.89-2.99c0.3-1.35,1.64-2.2,2.99-1.89c3.94,0.88,7.79,2.18,11.46,3.86c1.26,0.57,1.81,2.06,1.23,3.31
C89.11,15,88.2,15.54,87.25,15.54z M51.37,11.93c-1.14,0-2.17-0.78-2.43-1.94c-0.31-1.35,0.53-2.69,1.88-3
c3.91-0.9,7.95-1.4,12-1.48c1.38-0.04,2.52,1.07,2.55,2.45c0.03,1.38-1.07,2.52-2.45,2.55c-3.7,0.07-7.39,0.53-10.97,1.35
C51.75,11.91,51.56,11.93,51.37,11.93z"/>
</g> </g>
<g> <g>
<path fill="#FFFFFF" d="M67.06,119.73c-2.1,0-3.87-1.64-3.99-3.77c-0.13-2.21,1.56-4.1,3.76-4.23c1.85-0.11,3.71-0.32,5.53-0.64 <path fill="#ED6B21" d="M64,98.5c-1.38,0-2.5-1.12-2.5-2.5V32c0-1.38,1.12-2.5,2.5-2.5s2.5,1.12,2.5,2.5v64
c2.17-0.38,4.25,1.07,4.63,3.25s-1.07,4.25-3.25,4.63c-2.12,0.37-4.29,0.63-6.45,0.75C67.22,119.73,67.14,119.73,67.06,119.73z C66.5,97.38,65.38,98.5,64,98.5z"/>
M55.05,119.05c-0.23,0-0.46-0.02-0.69-0.06c-2.13-0.37-4.26-0.87-6.32-1.49c-2.12-0.63-3.32-2.86-2.69-4.98s2.86-3.32,4.98-2.69 </g>
c1.77,0.53,3.59,0.96,5.41,1.27c2.18,0.38,3.63,2.45,3.25,4.63C58.65,117.68,56.96,119.05,55.05,119.05z M84.58,115.58 <g>
c-1.55,0-3.02-0.9-3.67-2.41c-0.88-2.03,0.06-4.38,2.08-5.26c1.69-0.73,3.36-1.57,4.96-2.5c1.91-1.11,4.36-0.46,5.47,1.46 <path fill="#ED6B21" d="M96,66.5H32c-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5h64c1.38,0,2.5,1.12,2.5,2.5S97.38,66.5,96,66.5z"
c1.11,1.91,0.46,4.36-1.46,5.47c-1.87,1.08-3.82,2.07-5.8,2.92C85.65,115.47,85.11,115.58,84.58,115.58z M38.12,112.91 />
c-0.68,0-1.37-0.17-2-0.54c-1.87-1.08-3.69-2.28-5.43-3.57c-1.77-1.32-2.14-3.82-0.82-5.6c1.32-1.77,3.82-2.14,5.6-0.82
c1.49,1.11,3.05,2.13,4.65,3.06c1.91,1.1,2.57,3.55,1.47,5.46C40.84,112.2,39.5,112.91,38.12,112.91z M99.61,105.67
c-1.06,0-2.12-0.42-2.91-1.25c-1.52-1.61-1.45-4.14,0.16-5.66c1.35-1.27,2.63-2.64,3.82-4.05c1.42-1.69,3.94-1.91,5.64-0.49
c1.69,1.42,1.91,3.94,0.49,5.64c-1.39,1.65-2.88,3.24-4.45,4.72C101.58,105.3,100.59,105.67,99.61,105.67z M24.32,101.35
c-1.14,0-2.27-0.48-3.06-1.42c-1.39-1.65-2.7-3.4-3.89-5.2c-1.22-1.84-0.71-4.32,1.13-5.54c1.84-1.22,4.32-0.71,5.54,1.13
c1.02,1.54,2.14,3.04,3.33,4.46c1.42,1.69,1.21,4.21-0.48,5.64C26.14,101.04,25.23,101.35,24.32,101.35z M110.36,91.23
c-0.6,0-1.22-0.14-1.79-0.43c-1.97-0.99-2.77-3.4-1.78-5.37c0.83-1.65,1.57-3.37,2.2-5.11c0.75-2.08,3.05-3.15,5.13-2.39
c2.08,0.75,3.15,3.05,2.39,5.13c-0.74,2.03-1.61,4.04-2.58,5.97C113.24,90.42,111.83,91.23,110.36,91.23z M15.28,85.78
c-1.63,0-3.16-1-3.76-2.63c-0.74-2.03-1.37-4.12-1.87-6.22c-0.51-2.15,0.82-4.31,2.97-4.82s4.31,0.82,4.82,2.97
c0.43,1.8,0.97,3.59,1.6,5.32c0.76,2.08-0.31,4.37-2.38,5.13C16.2,85.7,15.73,85.78,15.28,85.78z M115.53,73.97
c-0.15,0-0.31-0.01-0.46-0.03c-2.19-0.25-3.77-2.24-3.52-4.43c0.21-1.83,0.32-3.7,0.32-5.56v-0.21c0-2.21,1.79-4,4-4s4,1.79,4,4
v0.15c0,2.22-0.12,4.4-0.37,6.53C119.26,72.47,117.53,73.97,115.53,73.97z M12.13,68.05c-2.21,0-4-1.79-4-4h4l-4-0.05
c0-2.18,0.12-4.33,0.36-6.42c0.25-2.19,2.24-3.76,4.43-3.52c2.2,0.25,3.77,2.23,3.52,4.43c-0.21,1.8-0.31,3.64-0.31,5.46v0.1
C16.13,66.26,14.34,68.05,12.13,68.05z M114.43,55.8c-1.81,0-3.45-1.23-3.89-3.07c-0.43-1.8-0.98-3.59-1.61-5.32
c-0.76-2.07,0.3-4.37,2.37-5.14c2.07-0.76,4.37,0.3,5.14,2.37c0.74,2.02,1.38,4.11,1.88,6.22c0.52,2.15-0.81,4.31-2.95,4.82
C115.06,55.76,114.74,55.8,114.43,55.8z M15.21,50.31c-0.45,0-0.91-0.08-1.36-0.24c-2.08-0.75-3.15-3.04-2.4-5.12
c0.73-2.03,1.6-4.04,2.56-5.97C15,37,17.4,36.2,19.38,37.19c1.98,0.99,2.77,3.39,1.79,5.37c-0.83,1.65-1.57,3.37-2.19,5.11
C18.38,49.3,16.85,50.31,15.21,50.31z M107.24,39.3c-1.29,0-2.57-0.63-3.34-1.79c-1.02-1.54-2.15-3.04-3.34-4.45
c-1.43-1.69-1.22-4.21,0.47-5.64s4.21-1.22,5.64,0.47c1.39,1.65,2.71,3.39,3.9,5.19c1.22,1.84,0.72,4.32-1.12,5.54
C108.77,39.08,108,39.3,107.24,39.3z M24.19,34.7c-0.91,0-1.82-0.31-2.56-0.93c-1.69-1.42-1.92-3.94-0.5-5.63
c1.38-1.66,2.88-3.25,4.44-4.73c1.6-1.52,4.13-1.45,5.65,0.15s1.45,4.13-0.15,5.65c-1.34,1.27-2.62,2.64-3.81,4.06
C26.47,34.21,25.33,34.7,24.19,34.7z M94.83,26.24c-0.83,0-1.66-0.26-2.38-0.79c-1.49-1.1-3.05-2.13-4.66-3.05
c-1.92-1.1-2.58-3.54-1.48-5.46c1.1-1.91,3.54-2.58,5.46-1.48c1.87,1.07,3.7,2.27,5.44,3.56c1.78,1.31,2.15,3.82,0.83,5.6
C97.27,25.68,96.06,26.24,94.83,26.24z M37.95,23.09c-1.38,0-2.72-0.71-3.46-1.99c-1.11-1.91-0.46-4.36,1.44-5.47
c1.86-1.08,3.81-2.07,5.79-2.93c2.03-0.88,4.38,0.05,5.26,2.07c0.88,2.03-0.05,4.38-2.07,5.26c-1.69,0.74-3.36,1.58-4.96,2.51
C39.33,22.92,38.64,23.09,37.95,23.09z M78.72,18.21c-0.38,0-0.76-0.05-1.13-0.17c-1.77-0.52-3.59-0.95-5.42-1.26
c-2.18-0.37-3.64-2.44-3.26-4.62s2.45-3.64,4.62-3.26c2.13,0.37,4.26,0.86,6.33,1.47c2.12,0.63,3.33,2.85,2.7,4.97
C82.04,17.08,80.45,18.21,78.72,18.21z M54.84,16.89c-1.9,0-3.59-1.36-3.93-3.3c-0.39-2.17,1.06-4.25,3.24-4.64
c2.12-0.38,4.29-0.63,6.45-0.76c2.19-0.14,4.1,1.55,4.23,3.75c0.13,2.21-1.55,4.1-3.75,4.23c-1.85,0.11-3.71,0.33-5.52,0.66
C55.31,16.87,55.07,16.89,54.84,16.89z"/>
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Before After
Before After

View file

@ -1,49 +1,42 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve"> viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<g id="REMOVE_INSTANCE"> <g id="instance_x5F_remove">
<g> <g>
<path fill="#ED6B21" d="M88.01,57.95c0-1.1-0.9-2-2-2H41.99c-1.1,0-2,0.9-2,2v12.01c0,1.1,0.9,2,2,2h44.02c1.1,0,2-0.9,2-2V57.95z <path fill="#FFFFFF" d="M65.02,122.49c-1.36,0-2.47-1.09-2.5-2.45c-0.03-1.38,1.07-2.52,2.45-2.55c3.71-0.07,7.4-0.52,10.98-1.33
"/> c1.34-0.31,2.69,0.54,2.99,1.88c0.31,1.35-0.54,2.69-1.88,2.99c-3.91,0.89-7.95,1.38-12,1.46
C65.05,122.49,65.04,122.49,65.02,122.49z M51.6,121.12c-0.18,0-0.37-0.02-0.55-0.06c-3.93-0.89-7.79-2.19-11.46-3.88
c-1.25-0.58-1.8-2.06-1.23-3.32c0.58-1.25,2.06-1.8,3.32-1.23c3.35,1.54,6.88,2.73,10.47,3.55c1.35,0.3,2.19,1.64,1.89,2.99
C53.78,120.33,52.74,121.12,51.6,121.12z M89.21,116.52c-0.91,0-1.79-0.5-2.23-1.37c-0.62-1.23-0.13-2.74,1.1-3.36
c3.29-1.66,6.42-3.67,9.3-5.98c1.08-0.86,2.65-0.69,3.51,0.39c0.86,1.08,0.69,2.65-0.39,3.51c-3.15,2.52-6.58,4.72-10.17,6.53
C89.97,116.44,89.58,116.52,89.21,116.52z M29.14,110.33c-0.55,0-1.1-0.18-1.56-0.54c-3.15-2.51-6.06-5.36-8.63-8.46
c-0.88-1.06-0.73-2.64,0.33-3.52c1.06-0.88,2.64-0.74,3.52,0.33c2.35,2.84,5.01,5.44,7.9,7.74c1.08,0.86,1.26,2.43,0.4,3.51
C30.61,110.01,29.88,110.33,29.14,110.33z M108.39,100.64c-0.53,0-1.07-0.17-1.52-0.52c-1.09-0.84-1.3-2.41-0.46-3.51
c2.25-2.93,4.21-6.09,5.81-9.41c0.6-1.24,2.1-1.77,3.34-1.17c1.24,0.6,1.77,2.09,1.17,3.34c-1.75,3.63-3.89,7.09-6.35,10.29
C109.88,100.31,109.14,100.64,108.39,100.64z M13.58,90.89c-0.93,0-1.82-0.52-2.25-1.41c-1.76-3.63-3.14-7.46-4.11-11.37
c-0.33-1.34,0.49-2.7,1.83-3.03c1.34-0.33,2.7,0.49,3.03,1.83c0.89,3.58,2.15,7.07,3.76,10.39c0.6,1.24,0.08,2.74-1.16,3.34
C14.32,90.81,13.94,90.89,13.58,90.89z M118.82,78.01c-0.17,0-0.34-0.02-0.51-0.05c-1.35-0.28-2.22-1.61-1.94-2.96
c0.75-3.59,1.13-7.29,1.13-11l0-0.23c0-1.38,1.12-2.5,2.5-2.5s2.5,1.12,2.5,2.5l0,0.2c0,4.08-0.42,8.12-1.24,12.05
C121.02,77.2,119.98,78.01,118.82,78.01z M8,66.62c-1.38,0-2.5-1.12-2.5-2.5V64c0-4.01,0.41-8.01,1.21-11.9
c0.28-1.35,1.6-2.22,2.95-1.94c1.35,0.28,2.22,1.6,1.94,2.95C10.87,56.67,10.5,60.33,10.5,64v0.12C10.5,65.5,9.38,66.62,8,66.62z
M118.33,52.88c-1.12,0-2.14-0.76-2.42-1.89c-0.89-3.57-2.17-7.07-3.78-10.39c-0.61-1.24-0.09-2.74,1.15-3.34
c1.24-0.6,2.74-0.09,3.34,1.15c1.77,3.63,3.16,7.45,4.14,11.36c0.33,1.34-0.48,2.7-1.82,3.03
C118.74,52.85,118.53,52.88,118.33,52.88z M13.48,42.32c-0.36,0-0.73-0.08-1.08-0.25c-1.25-0.6-1.77-2.09-1.17-3.34
c1.74-3.63,3.87-7.1,6.33-10.3c0.84-1.09,2.41-1.3,3.51-0.46c1.1,0.84,1.3,2.41,0.46,3.51c-2.25,2.93-4.2,6.1-5.79,9.42
C15.3,41.79,14.41,42.32,13.48,42.32z M107.05,30.68c-0.72,0-1.43-0.31-1.92-0.9c-2.36-2.84-5.03-5.44-7.92-7.73
c-1.08-0.86-1.26-2.43-0.41-3.51c0.86-1.08,2.43-1.26,3.51-0.41c3.16,2.5,6.07,5.34,8.65,8.44c0.88,1.06,0.74,2.64-0.32,3.52
C108.18,30.49,107.61,30.68,107.05,30.68z M28.97,22.81c-0.73,0-1.46-0.32-1.95-0.94c-0.86-1.08-0.69-2.65,0.38-3.51
c3.15-2.53,6.56-4.73,10.16-6.55c1.23-0.63,2.74-0.13,3.36,1.1c0.62,1.23,0.13,2.74-1.1,3.36c-3.28,1.67-6.41,3.69-9.29,6
C30.07,22.63,29.52,22.81,28.97,22.81z M87.25,15.54c-0.35,0-0.7-0.07-1.04-0.23c-3.36-1.53-6.88-2.72-10.48-3.52
c-1.35-0.3-2.2-1.64-1.89-2.99c0.3-1.35,1.64-2.2,2.99-1.89c3.94,0.88,7.79,2.18,11.46,3.86c1.26,0.57,1.81,2.06,1.23,3.31
C89.11,15,88.2,15.54,87.25,15.54z M51.37,11.93c-1.14,0-2.17-0.78-2.43-1.94c-0.31-1.35,0.53-2.69,1.88-3
c3.91-0.9,7.95-1.4,12-1.48c1.38-0.04,2.52,1.07,2.55,2.45c0.03,1.38-1.07,2.52-2.45,2.55c-3.7,0.07-7.39,0.53-10.97,1.35
C51.75,11.91,51.56,11.93,51.37,11.93z"/>
</g> </g>
<g> <g>
<path fill="#FFFFFF" d="M67.06,119.73c-2.1,0-3.87-1.64-3.99-3.77c-0.13-2.21,1.56-4.1,3.76-4.23c1.85-0.11,3.71-0.32,5.53-0.64 <path fill="#ED6B21" d="M96,66.5H32c-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5h64c1.38,0,2.5,1.12,2.5,2.5S97.38,66.5,96,66.5z"
c2.17-0.38,4.25,1.07,4.63,3.25s-1.07,4.25-3.25,4.63c-2.12,0.37-4.29,0.63-6.45,0.75C67.22,119.73,67.14,119.73,67.06,119.73z />
M55.05,119.05c-0.23,0-0.46-0.02-0.69-0.06c-2.13-0.37-4.26-0.87-6.32-1.49c-2.12-0.63-3.32-2.86-2.69-4.98s2.86-3.32,4.98-2.69
c1.77,0.53,3.59,0.96,5.41,1.27c2.18,0.38,3.63,2.45,3.25,4.63C58.65,117.68,56.96,119.05,55.05,119.05z M84.58,115.58
c-1.55,0-3.02-0.9-3.67-2.41c-0.88-2.03,0.06-4.38,2.08-5.26c1.69-0.73,3.36-1.57,4.96-2.5c1.91-1.11,4.36-0.46,5.47,1.46
c1.11,1.91,0.46,4.36-1.46,5.47c-1.87,1.08-3.82,2.07-5.8,2.92C85.65,115.47,85.11,115.58,84.58,115.58z M38.12,112.91
c-0.68,0-1.37-0.17-2-0.54c-1.87-1.08-3.69-2.28-5.43-3.57c-1.77-1.32-2.14-3.82-0.82-5.6c1.32-1.77,3.82-2.14,5.6-0.82
c1.49,1.11,3.05,2.13,4.65,3.06c1.91,1.1,2.57,3.55,1.47,5.46C40.84,112.2,39.5,112.91,38.12,112.91z M99.61,105.67
c-1.06,0-2.12-0.42-2.91-1.25c-1.52-1.61-1.45-4.14,0.16-5.66c1.35-1.27,2.63-2.64,3.82-4.05c1.42-1.69,3.94-1.91,5.64-0.49
c1.69,1.42,1.91,3.94,0.49,5.64c-1.39,1.65-2.88,3.24-4.45,4.72C101.58,105.3,100.59,105.67,99.61,105.67z M24.32,101.35
c-1.14,0-2.27-0.48-3.06-1.42c-1.39-1.65-2.7-3.4-3.89-5.2c-1.22-1.84-0.71-4.32,1.13-5.54c1.84-1.22,4.32-0.71,5.54,1.13
c1.02,1.54,2.14,3.04,3.33,4.46c1.42,1.69,1.21,4.21-0.48,5.64C26.14,101.04,25.23,101.35,24.32,101.35z M110.36,91.23
c-0.6,0-1.22-0.14-1.79-0.43c-1.97-0.99-2.77-3.4-1.78-5.37c0.83-1.65,1.57-3.37,2.2-5.11c0.75-2.08,3.05-3.15,5.13-2.39
c2.08,0.75,3.15,3.05,2.39,5.13c-0.74,2.03-1.61,4.04-2.58,5.97C113.24,90.42,111.83,91.23,110.36,91.23z M15.28,85.78
c-1.63,0-3.16-1-3.76-2.63c-0.74-2.03-1.37-4.12-1.87-6.22c-0.51-2.15,0.82-4.31,2.97-4.82s4.31,0.82,4.82,2.97
c0.43,1.8,0.97,3.59,1.6,5.32c0.76,2.08-0.31,4.37-2.38,5.13C16.2,85.7,15.73,85.78,15.28,85.78z M115.53,73.97
c-0.15,0-0.31-0.01-0.46-0.03c-2.19-0.25-3.77-2.24-3.52-4.43c0.21-1.83,0.32-3.7,0.32-5.56v-0.21c0-2.21,1.79-4,4-4s4,1.79,4,4
v0.15c0,2.22-0.12,4.4-0.37,6.53C119.26,72.47,117.53,73.97,115.53,73.97z M12.13,68.05c-2.21,0-4-1.79-4-4h4l-4-0.05
c0-2.18,0.12-4.33,0.36-6.42c0.25-2.19,2.24-3.76,4.43-3.52c2.2,0.25,3.77,2.23,3.52,4.43c-0.21,1.8-0.31,3.64-0.31,5.46v0.1
C16.13,66.26,14.34,68.05,12.13,68.05z M114.43,55.8c-1.81,0-3.45-1.23-3.89-3.07c-0.43-1.8-0.98-3.59-1.61-5.32
c-0.76-2.07,0.3-4.37,2.37-5.14c2.07-0.76,4.37,0.3,5.14,2.37c0.74,2.02,1.38,4.11,1.88,6.22c0.52,2.15-0.81,4.31-2.95,4.82
C115.06,55.76,114.74,55.8,114.43,55.8z M15.21,50.31c-0.45,0-0.91-0.08-1.36-0.24c-2.08-0.75-3.15-3.04-2.4-5.12
c0.73-2.03,1.6-4.04,2.56-5.97C15,37,17.4,36.2,19.38,37.19c1.98,0.99,2.77,3.39,1.79,5.37c-0.83,1.65-1.57,3.37-2.19,5.11
C18.38,49.3,16.85,50.31,15.21,50.31z M107.24,39.3c-1.29,0-2.57-0.63-3.34-1.79c-1.02-1.54-2.15-3.04-3.34-4.45
c-1.43-1.69-1.22-4.21,0.47-5.64s4.21-1.22,5.64,0.47c1.39,1.65,2.71,3.39,3.9,5.19c1.22,1.84,0.72,4.32-1.12,5.54
C108.77,39.08,108,39.3,107.24,39.3z M24.19,34.7c-0.91,0-1.82-0.31-2.56-0.93c-1.69-1.42-1.92-3.94-0.5-5.63
c1.38-1.66,2.88-3.25,4.44-4.73c1.6-1.52,4.13-1.45,5.65,0.15s1.45,4.13-0.15,5.65c-1.34,1.27-2.62,2.64-3.81,4.06
C26.47,34.21,25.33,34.7,24.19,34.7z M94.83,26.24c-0.83,0-1.66-0.26-2.38-0.79c-1.49-1.1-3.05-2.13-4.66-3.05
c-1.92-1.1-2.58-3.54-1.48-5.46c1.1-1.91,3.54-2.58,5.46-1.48c1.87,1.07,3.7,2.27,5.44,3.56c1.78,1.31,2.15,3.82,0.83,5.6
C97.27,25.68,96.06,26.24,94.83,26.24z M37.95,23.09c-1.38,0-2.72-0.71-3.46-1.99c-1.11-1.91-0.46-4.36,1.44-5.47
c1.86-1.08,3.81-2.07,5.79-2.93c2.03-0.88,4.38,0.05,5.26,2.07c0.88,2.03-0.05,4.38-2.07,5.26c-1.69,0.74-3.36,1.58-4.96,2.51
C39.33,22.92,38.64,23.09,37.95,23.09z M78.72,18.21c-0.38,0-0.76-0.05-1.13-0.17c-1.77-0.52-3.59-0.95-5.42-1.26
c-2.18-0.37-3.64-2.44-3.26-4.62s2.45-3.64,4.62-3.26c2.13,0.37,4.26,0.86,6.33,1.47c2.12,0.63,3.33,2.85,2.7,4.97
C82.04,17.08,80.45,18.21,78.72,18.21z M54.84,16.89c-1.9,0-3.59-1.36-3.93-3.3c-0.39-2.17,1.06-4.25,3.24-4.64
c2.12-0.38,4.29-0.63,6.45-0.76c2.19-0.14,4.1,1.55,4.23,3.75c0.13,2.21-1.55,4.1-3.75,4.23c-1.85,0.11-3.71,0.33-5.52,0.66
C55.31,16.87,55.07,16.89,54.84,16.89z"/>
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Before After
Before After

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<g id="ironing">
<g>
<path fill="#ED6B21" d="M14,9.42H2c-0.39,0-0.71-0.32-0.71-0.71C1.29,7.08,2.07,4,5,4h8c0.33,0,0.61,0.22,0.69,0.54l1,4
c0.05,0.21,0,0.44-0.13,0.61C14.42,9.32,14.22,9.42,14,9.42z M2.77,8h10.32l-0.65-2.58H5C3.39,5.42,2.91,7.03,2.77,8z"/>
</g>
<g>
<path fill="#ED6B21" d="M13,5.42c-0.39,0-0.71-0.32-0.71-0.71v-1c0-1.18-0.99-1.29-1.3-1.29H6c-0.39,0-0.71-0.32-0.71-0.71
S5.61,1,6,1h5c1.05,0,2.61,0.68,2.7,2.52c0,0.03,0,0.06,0,0.08v1.1C13.71,5.1,13.39,5.42,13,5.42z"/>
</g>
<g>
<path fill="#808080" d="M14.65,15H1.35C1.16,15,1,14.84,1,14.65s0.16-0.35,0.35-0.35h13.29c0.2,0,0.35,0.16,0.35,0.35
S14.84,15,14.65,15z"/>
</g>
<g>
<path fill="#808080" d="M14.65,13H1.35C1.16,13,1,12.84,1,12.65s0.16-0.35,0.35-0.35h13.29c0.2,0,0.35,0.16,0.35,0.35
S14.84,13,14.65,13z"/>
</g>
<g>
<path fill="#808080" d="M14.65,11H1.35C1.16,11,1,10.84,1,10.65s0.16-0.35,0.35-0.35h13.29c0.2,0,0.35,0.16,0.35,0.35
S14.84,11,14.65,11z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.2.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="close_window" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
<g>
<path fill="#ED6B21" d="M80,92.83H20c-7.08,0-12.83-5.76-12.83-12.84V20c0-7.08,5.76-12.83,12.83-12.83h60
c7.08,0,12.84,5.76,12.84,12.83v60C92.83,87.08,87.08,92.83,80,92.83z M20,12.83c-3.95,0-7.17,3.21-7.17,7.17v60
c0,3.95,3.21,7.17,7.17,7.17h60c3.95,0,7.17-3.21,7.17-7.17V20c0-3.95-3.21-7.17-7.17-7.17H20z"/>
</g>
<g>
<path fill="#ED6B21" d="M70,75.67c-1.45,0-2.9-0.55-4.01-1.66l-40-40c-2.21-2.21-2.21-5.8,0-8.02s5.8-2.21,8.02,0l40,40
c2.21,2.21,2.21,5.8,0,8.02C72.9,75.12,71.45,75.67,70,75.67z"/>
</g>
<g>
<path fill="#ED6B21" d="M30,75.67c-1.45,0-2.9-0.55-4.01-1.66c-2.21-2.21-2.21-5.8,0-8.02l40-40c2.21-2.21,5.8-2.21,8.02,0
c2.21,2.21,2.21,5.8,0,8.02l-40,40C32.9,75.12,31.45,75.67,30,75.67z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="notification_close_hover.svg"
xml:space="preserve"
enable-background="new 0 0 100 100"
viewBox="0 0 100 100"
y="0px"
x="0px"
id="close_window"
version="1.0"><metadata
id="metadata19"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs17" /><sodipodi:namedview
inkscape:current-layer="close_window"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:cy="50"
inkscape:cx="50"
inkscape:zoom="10.08"
showgrid="false"
id="namedview15"
inkscape:window-height="1377"
inkscape:window-width="2560"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<g
transform="matrix(1.15,0,0,1.15,-7.50075,-7.5)"
id="g4">
<path
id="path2"
d="M 80,92.83 H 20 C 12.92,92.83 7.17,87.07 7.17,79.99 V 20 C 7.17,12.92 12.93,7.17 20,7.17 h 60 c 7.08,0 12.84,5.76 12.84,12.83 V 80 C 92.83,87.08 87.08,92.83 80,92.83 Z m -60,-80 c -3.95,0 -7.17,3.21 -7.17,7.17 v 60 c 0,3.95 3.21,7.17 7.17,7.17 h 60 c 3.95,0 7.17,-3.21 7.17,-7.17 V 20 c 0,-3.95 -3.21,-7.17 -7.17,-7.17 z"
fill="#ED6B21" />
</g>
<g
transform="matrix(1.15,0,0,1.15,-7.50075,-7.5)"
id="g8">
<path
id="path6"
d="m 70,75.67 c -1.45,0 -2.9,-0.55 -4.01,-1.66 l -40,-40 c -2.21,-2.21 -2.21,-5.8 0,-8.02 2.21,-2.22 5.8,-2.21 8.02,0 l 40,40 c 2.21,2.21 2.21,5.8 0,8.02 -1.11,1.11 -2.56,1.66 -4.01,1.66 z"
fill="#ED6B21" />
</g>
<g
transform="matrix(1.15,0,0,1.15,-7.50075,-7.5)"
id="g12">
<path
id="path10"
d="m 30,75.67 c -1.45,0 -2.9,-0.55 -4.01,-1.66 -2.21,-2.21 -2.21,-5.8 0,-8.02 l 40,-40 c 2.21,-2.21 5.8,-2.21 8.02,0 2.21,2.21 2.21,5.8 0,8.02 l -40,40 C 32.9,75.12 31.45,75.67 30,75.67 Z"
fill="#ED6B21" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
id="error"
x="0px"
y="0px"
viewBox="0 0 200 200"
enable-background="new 0 0 100 100"
xml:space="preserve"
sodipodi:docname="notification_error.svg"
width="200"
height="200"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"><metadata
id="metadata19"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs17" /><sodipodi:namedview
inkscape:document-rotation="0"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1377"
id="namedview15"
showgrid="false"
inkscape:zoom="5.04"
inkscape:cx="117.17146"
inkscape:cy="98.609664"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="error" />
<g
id="g4"
transform="matrix(2.52,0,0,2.52,-26,-26)">
<path
fill="#ed6b21"
d="m 50,54.25 c -2.35,0 -4.25,-1.9 -4.25,-4.25 V 35 c 0,-2.35 1.9,-4.25 4.25,-4.25 2.35,0 4.25,1.9 4.25,4.25 v 15 c 0,2.35 -1.9,4.25 -4.25,4.25 z"
id="path2" />
</g>
<g
id="g8"
transform="matrix(2.52,0,0,2.52,-26,-26)">
<circle
fill="#ed6b21"
cx="50"
cy="65"
r="5"
id="circle6" />
</g>
<g
id="g12"
transform="matrix(2.52,0,0,2.52,-26,-26)">
<path
fill="#ed6b21"
d="M 50,89.25 C 28.36,89.25 10.75,71.64 10.75,50 10.75,28.36 28.36,10.75 50,10.75 71.64,10.75 89.25,28.36 89.25,50 89.25,71.64 71.64,89.25 50,89.25 Z m 0,-70 C 33.05,19.25 19.25,33.04 19.25,50 19.25,66.95 33.04,80.75 50,80.75 66.95,80.75 80.75,66.96 80.75,50 80.75,33.05 66.95,19.25 50,19.25 Z"
id="path10" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.2.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="minimalize_window" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
<g>
<path fill="#ED6B21" d="M80,92.83H20c-7.08,0-12.83-5.76-12.83-12.84V20c0-7.08,5.76-12.83,12.83-12.83h60
c7.08,0,12.84,5.76,12.84,12.83v60C92.83,87.08,87.08,92.83,80,92.83z M20,12.83c-3.95,0-7.17,3.21-7.17,7.17v60
c0,3.95,3.21,7.17,7.17,7.17h60c3.95,0,7.17-3.21,7.17-7.17V20c0-3.95-3.21-7.17-7.17-7.17H20z"/>
</g>
<g>
<path fill="#ED6B21" d="M70,75.67H30c-3.13,0-5.67-2.54-5.67-5.67v-5c0-3.13,2.54-5.67,5.67-5.67h40c3.13,0,5.67,2.54,5.67,5.67v5
C75.67,73.13,73.13,75.67,70,75.67z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 858 B

View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="notification_minimalize.svg"
xml:space="preserve"
enable-background="new 0 0 100 100"
viewBox="0 0 100 100"
y="0px"
x="0px"
id="minimalize_window"
version="1.0"><metadata
id="metadata15"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs13" /><sodipodi:namedview
inkscape:current-layer="minimalize_window"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:cy="50"
inkscape:cx="50"
inkscape:zoom="10.08"
showgrid="false"
id="namedview11"
inkscape:window-height="1377"
inkscape:window-width="2560"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<g
transform="matrix(1.15,0,0,1.15,-7.50075,-7.5)"
id="g4">
<path
id="path2"
d="M 80,92.83 H 20 C 12.92,92.83 7.17,87.07 7.17,79.99 V 20 C 7.17,12.92 12.93,7.17 20,7.17 h 60 c 7.08,0 12.84,5.76 12.84,12.83 V 80 C 92.83,87.08 87.08,92.83 80,92.83 Z m -60,-80 c -3.95,0 -7.17,3.21 -7.17,7.17 v 60 c 0,3.95 3.21,7.17 7.17,7.17 h 60 c 3.95,0 7.17,-3.21 7.17,-7.17 V 20 c 0,-3.95 -3.21,-7.17 -7.17,-7.17 z"
fill="#ed6b21" />
</g>
<g
transform="matrix(1.15,0,0,1.15,-7.50075,-7.5)"
id="g8">
<path
id="path6"
d="M 70,75.67 H 30 c -3.13,0 -5.67,-2.54 -5.67,-5.67 v -5 c 0,-3.13 2.54,-5.67 5.67,-5.67 h 40 c 3.13,0 5.67,2.54 5.67,5.67 v 5 c 0,3.13 -2.54,5.67 -5.67,5.67 z"
fill="#ed6b21" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
height="200"
width="200"
sodipodi:docname="notification_warning.svg"
xml:space="preserve"
enable-background="new 0 0 100 100"
viewBox="0 0 200 200"
y="0px"
x="0px"
id="warning"
version="1.0"><metadata
id="metadata19"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs17" /><sodipodi:namedview
inkscape:current-layer="warning"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:cy="71.071558"
inkscape:cx="34.775892"
inkscape:zoom="3.5638182"
showgrid="false"
id="namedview15"
inkscape:window-height="1377"
inkscape:window-width="2560"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<g
transform="matrix(2.2,0,0,2.2,-9.9977389,-10)"
id="g4">
<path
id="path2"
d="M 90,89.25 H 10 C 8.48,89.25 7.08,88.44 6.32,87.13 5.56,85.82 5.55,84.2 6.31,82.89 l 40,-70 c 0.76,-1.33 2.17,-2.14 3.69,-2.14 1.53,0 2.93,0.82 3.69,2.14 l 40,70 c 0.75,1.32 0.75,2.93 -0.01,4.24 -0.76,1.32 -2.16,2.12 -3.68,2.12 z M 17.33,80.75 H 82.68 L 50,23.57 Z"
fill="#ed6b21" />
</g>
<g
transform="matrix(2.2,0,0,2.2,-9.9977389,-10)"
id="g8">
<path
id="path6"
d="m 50,59.25 c -2.35,0 -4.25,-1.9 -4.25,-4.25 V 40 c 0,-2.35 1.9,-4.25 4.25,-4.25 2.35,0 4.25,1.9 4.25,4.25 v 15 c 0,2.35 -1.9,4.25 -4.25,4.25 z"
fill="#ed6b21" />
</g>
<g
transform="matrix(2.2,0,0,2.2,-9.9977389,-10)"
id="g12">
<circle
id="circle10"
r="5"
cy="70"
cx="50"
fill="#ed6b21" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -1,27 +1,22 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve"> viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<g id="paste"> <g id="paste">
<path fill="#FFFFFF" d="M33.73,107.03H15.94c-1.4,0-2.54-1.14-2.54-2.54V23.52c0-1.4,1.14-2.54,2.54-2.54h7.62v5.08 <path fill="#FFFFFF" d="M48,101.5H10.5v-83h11V24c0,1.38,1.12,2.5,2.5,2.5h48c1.38,0,2.5-1.12,2.5-2.5v-5.5h11V32h5V16
c0,1.4,1.14,2.54,2.54,2.54h45.72c1.4,0,2.54-1.14,2.54-2.54v-5.08h7.62c1.4,0,2.54,1.14,2.54,2.54v10.16 c0-1.38-1.12-2.5-2.5-2.5H74.5V8c0-1.38-1.12-2.5-2.5-2.5H24c-1.38,0-2.5,1.12-2.5,2.5v5.5H8c-1.38,0-2.5,1.12-2.5,2.5v88
c0,1.4,1.14,2.54,2.54,2.54c1.4,0,2.54-1.14,2.54-2.54V23.52c0-4.2-3.42-7.62-7.62-7.62h-7.62v-5.08c0-1.4-1.14-2.54-2.54-2.54 c0,1.38,1.12,2.5,2.5,2.5h40V101.5z M26.5,10.5h43v11h-43V10.5z"/>
H26.11c-1.4,0-2.54,1.14-2.54,2.54v5.08h-7.62c-4.2,0-7.62,3.42-7.62,7.62v80.97c0,4.2,3.42,7.62,7.62,7.62h17.78
c1.4,0,2.54-1.14,2.54-2.54C36.27,108.16,35.13,107.03,33.73,107.03z M28.65,13.36h40.64v10.16H28.65V13.36z"/>
<g> <g>
<path fill="#ED6B21" d="M53.97,59.08h35.72c1.4,0,2.54-1.14,2.54-2.54c0-1.4-1.14-2.54-2.54-2.54H53.97 <path fill="#ED6B21" d="M122.45,55.51c-0.02-0.11-0.06-0.22-0.1-0.33c-0.02-0.05-0.02-0.09-0.04-0.14
c-1.4,0-2.54,1.14-2.54,2.54C51.43,57.94,52.56,59.08,53.97,59.08z"/> c-0.05-0.12-0.11-0.23-0.18-0.34c-0.02-0.03-0.03-0.06-0.05-0.09c-0.09-0.14-0.2-0.26-0.31-0.38l-15.99-15.99
<path fill="#ED6B21" d="M104.93,69.24H53.97c-1.4,0-2.54,1.14-2.54,2.54c0,1.4,1.14,2.54,2.54,2.54h50.96 c-0.12-0.12-0.24-0.22-0.38-0.31c-0.04-0.02-0.08-0.04-0.11-0.06c-0.1-0.06-0.2-0.12-0.32-0.17c-0.05-0.02-0.11-0.03-0.16-0.05
c1.4,0,2.54-1.14,2.54-2.54C107.47,70.38,106.33,69.24,104.93,69.24z"/> c-0.1-0.03-0.2-0.07-0.3-0.09c-0.16-0.03-0.33-0.05-0.49-0.05H56c-1.38,0-2.5,1.12-2.5,2.5v80c0,1.38,1.12,2.5,2.5,2.5h64
<path fill="#ED6B21" d="M104.93,99.72H53.97c-1.4,0-2.54,1.14-2.54,2.54s1.14,2.54,2.54,2.54h50.96c1.4,0,2.54-1.14,2.54-2.54 c1.38,0,2.5-1.12,2.5-2.5V56C122.5,55.83,122.48,55.67,122.45,55.51z M106.5,46.04l7.46,7.46h-7.46V46.04z M58.5,117.5v-75h43V56
S106.33,99.72,104.93,99.72z"/> c0,1.38,1.12,2.5,2.5,2.5h13.5v59H58.5z"/>
<path fill="#ED6B21" d="M115.75,51.15l-8.06-8.06c-2.47-2.47-6.97-4.34-10.47-4.34h-50.8c-4.2,0-7.62,3.42-7.62,7.62v66.04 <path fill="#ED6B21" d="M104.23,70.78l-15.49-8.94c-0.77-0.45-1.73-0.45-2.5,0l-15.49,8.94c-0.77,0.45-1.25,1.27-1.25,2.17v17.89
c0,4.2,3.42,7.62,7.62,7.62h66.04c4.2,0,7.62-3.42,7.62-7.62v-50.8C120.09,58.12,118.23,53.62,115.75,51.15z M104.85,47.43 c0,0.89,0.48,1.72,1.25,2.17l15.49,8.94c0.39,0.22,0.82,0.33,1.25,0.33s0.86-0.11,1.25-0.33L104.23,93
l6.57,6.57h-6.57V47.43z M115.01,112.42c0,1.4-1.14,2.54-2.54,2.54H46.43c-1.4,0-2.54-1.14-2.54-2.54V46.38 c0.77-0.45,1.25-1.27,1.25-2.17V72.94C105.48,72.05,105.01,71.23,104.23,70.78z M100.48,89.39l-12.99,7.5l-12.99-7.5v-15
c0-1.4,1.14-2.54,2.54-2.54h50.8c0.74,0,1.63,0.18,2.54,0.46v12.24c0,1.4,1.14,2.54,2.54,2.54h12.24c0.28,0.91,0.46,1.8,0.46,2.54 l12.99-7.5l12.99,7.5V89.39z"/>
V112.42z"/>
<path fill="#ED6B21" d="M104.93,84.48H53.97c-1.4,0-2.54,1.14-2.54,2.54c0,1.4,1.14,2.54,2.54,2.54h50.96
c1.4,0,2.54-1.14,2.54-2.54C107.47,85.62,106.33,84.48,104.93,84.48z"/>
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before After
Before After

View file

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="800" viewBox="0 0 800 800">
<circle cx="400" cy="400" r="400" fill="#fff"/>
<path d="M599.3,186.8c-93.9-93.9-246.1-93.9-340,0s-93.9,246.1,0,340Z" transform="translate(0 0)" fill="#363636"/>
<path d="M202.7,612.5c93.9,93.9,246.1,93.9,340,0s93.9-246.1,0-340" transform="translate(0 0)" fill="#ed6b21"/>
</svg>

After

Width:  |  Height:  |  Size: 374 B

View file

@ -1,13 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.6, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve"> viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<path id="undo_1_" fill="#ED6B21" d="M1.95,7.01h10.24L8.86,2.51c-0.31-0.42-0.22-1.01,0.2-1.32c0.42-0.31,1.01-0.22,1.32,0.2 <g id="redo">
l4.44,6.01c0,0.01,0.01,0.01,0.01,0.02c0.01,0.01,0.02,0.03,0.03,0.04c0.01,0.02,0.03,0.05,0.04,0.07c0.01,0.02,0.02,0.03,0.03,0.05 <g>
c0.01,0.01,0.01,0.03,0.02,0.04c0.01,0.02,0.02,0.05,0.02,0.07c0.01,0.02,0.01,0.04,0.02,0.06c0,0.01,0,0.03,0.01,0.04 <path fill="#ED6B21" d="M91.43,72.21c-0.73,0-1.46-0.32-1.95-0.94c-0.86-1.08-0.69-2.65,0.39-3.51L116,46.86l-26.13-20.9
c0,0.02,0.01,0.05,0.01,0.07c0,0.02,0.01,0.05,0.01,0.07c0,0.01,0,0.01,0,0.02c0,0.01,0,0.01,0,0.02c0,0.02,0,0.05-0.01,0.07 c-1.08-0.86-1.25-2.44-0.39-3.51c0.86-1.08,2.43-1.25,3.51-0.39l28.57,22.86c0.59,0.47,0.94,1.19,0.94,1.95s-0.35,1.48-0.94,1.95
c0,0.02,0,0.05-0.01,0.07c0,0.01,0,0.03-0.01,0.04c0,0.02-0.01,0.04-0.02,0.06c-0.01,0.02-0.01,0.05-0.02,0.07 L92.99,71.67C92.53,72.04,91.98,72.21,91.43,72.21z"/>
c-0.01,0.01-0.01,0.03-0.02,0.04c-0.01,0.02-0.02,0.04-0.03,0.05c-0.01,0.02-0.02,0.04-0.04,0.07c-0.01,0.01-0.02,0.03-0.03,0.04 </g>
c0,0.01-0.01,0.01-0.01,0.02l-4.54,6.05c-0.19,0.25-0.47,0.38-0.76,0.38c-0.2,0-0.4-0.06-0.57-0.19c-0.42-0.31-0.5-0.91-0.19-1.32 <g>
l3.41-4.54H1.95C1.42,8.91,1,8.48,1,7.96C1,7.44,1.42,7.01,1.95,7.01z"/> <path fill="#ED6B21" d="M80,106.5H36.57C19.44,106.5,5.5,92.56,5.5,75.43s13.94-31.07,31.07-31.07H120c1.38,0,2.5,1.12,2.5,2.5
s-1.12,2.5-2.5,2.5H36.57c-14.38,0-26.07,11.7-26.07,26.07s11.7,26.07,26.07,26.07H80c1.38,0,2.5,1.12,2.5,2.5
S81.38,106.5,80,106.5z"/>
</g>
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 959 B

Before After
Before After

View file

@ -1,44 +1,60 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve"> viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<path fill="#FFFFFF" d="M38.11,44.25H25.75c-0.95,0-1.72,0.77-1.72,1.72s0.77,1.72,1.72,1.72H38.1c0.95,0,1.72-0.77,1.72-1.72 <g id="remove_1_">
C39.83,45.02,39.06,44.25,38.11,44.25z M45.89,45.97c0,0.95,0.77,1.72,1.72,1.72h12.35c0.95,0,1.72-0.77,1.72-1.72 <g>
s-0.77-1.72-1.72-1.72H47.61C46.66,44.25,45.89,45.02,45.89,45.97z M68.11,43.6c-0.33,0.28-0.52,0.65-0.59,1.04 <path fill="#FFFFFF" d="M98.71,29.29c0.49,0.49,1.13,0.73,1.77,0.73s1.28-0.24,1.77-0.73l7.05-7.05c0.98-0.98,0.98-2.56,0-3.54
c-0.59,0.27-1,0.87-1,1.56v5.6c0,0.95,0.77,1.72,1.72,1.72c0.95,0,1.72-0.77,1.72-1.72v-5.34c0.12-0.06,0.24-0.13,0.35-0.22 c-0.98-0.98-2.56-0.98-3.54,0l-7.05,7.05C97.73,26.74,97.73,28.32,98.71,29.29z"/>
c0.13-0.11,0.25-0.23,0.36-0.34l8.27-8.77c0.65-0.69,0.62-1.78-0.07-2.43s-1.78-0.62-2.43,0.07l-8.27,8.78 <path fill="#FFFFFF" d="M82,42.5h3.5V46c0,1.38,1.12,2.5,2.5,2.5s2.5-1.12,2.5-2.5v-4.96l3.51-3.51c0.98-0.98,0.98-2.56,0-3.54
C68.16,43.56,68.14,43.58,68.11,43.6z M68.25,76.84c-0.95,0-1.72,0.77-1.72,1.72V89.1c0,0.95,0.77,1.72,1.72,1.72 c-0.98-0.98-2.56-0.98-3.54,0l-3.51,3.51H82c-1.38,0-2.5,1.12-2.5,2.5S80.62,42.5,82,42.5z"/>
c0.95,0,1.72-0.77,1.72-1.72V78.56C69.97,77.61,69.2,76.84,68.25,76.84z M69.97,59.91c0-0.95-0.77-1.72-1.72-1.72 <path fill="#FFFFFF" d="M113.97,10.5c-0.95,0.98-0.94,2.54,0.02,3.51c0.49,0.49,1.13,0.73,1.77,0.73c0.63,0,1.26-0.24,1.75-0.71
c-0.95,0-1.72,0.77-1.72,1.72v10.54c0,0.95,0.77,1.72,1.72,1.72c0.95,0,1.72-0.77,1.72-1.72V59.91z M88.92,56.35 c0.02,1.37,1.13,2.47,2.5,2.47c1.38,0,2.5-1.12,2.5-2.5V8c0-0.05-0.01-0.1-0.02-0.15c0-0.06-0.01-0.11-0.02-0.17
c-0.95,0-1.72,0.77-1.72,1.72v3.4c0,0.34-0.02,0.63-0.04,0.85c-0.51,0.55-0.62,1.38-0.22,2.06c0.32,0.54,0.89,0.84,1.48,0.84 c-0.03-0.22-0.08-0.43-0.15-0.62c0,0,0-0.01,0-0.01c0,0,0,0,0,0c-0.01-0.03-0.03-0.05-0.04-0.08c-0.05-0.11-0.11-0.21-0.17-0.31
c0.3,0,0.6-0.08,0.88-0.24l0.25-0.15c0.67-0.4,1.09-1.1,1.09-3.35v-3.4C90.64,57.12,89.87,56.35,88.92,56.35z M41.81,26.17h11.3 c-0.03-0.04-0.05-0.08-0.08-0.11c-0.06-0.08-0.13-0.16-0.2-0.24c-0.03-0.03-0.06-0.07-0.09-0.1c-0.09-0.09-0.19-0.17-0.3-0.25
c0.95,0,1.72-0.77,1.72-1.72s-0.77-1.72-1.72-1.72h-11.3c-0.95,0-1.72,0.77-1.72,1.72S40.86,26.17,41.81,26.17z M87.2,22.73h-5.39 c-0.01-0.01-0.02-0.02-0.04-0.03c-0.12-0.08-0.24-0.15-0.38-0.2c-0.04-0.02-0.09-0.03-0.13-0.05c-0.1-0.04-0.2-0.07-0.3-0.09
c-0.95,0-1.72,0.77-1.72,1.72s0.77,1.72,1.72,1.72h2.75l-1.58,1.68c-0.65,0.69-0.62,1.78,0.07,2.43c0.33,0.31,0.76,0.47,1.18,0.47 c-0.05-0.01-0.09-0.02-0.14-0.03c-0.15-0.03-0.3-0.05-0.45-0.05h-6c-1.38,0-2.5,1.12-2.5,2.5C111.5,9.37,112.6,10.48,113.97,10.5z
c0.46,0,0.91-0.18,1.25-0.54l1.72-1.82v0.99c0,0.95,0.77,1.72,1.72,1.72c0.95,0,1.72-0.77,1.72-1.72v-3.21 "/>
C90.64,24.27,89.09,22.73,87.2,22.73z M61.81,26.17h11.3c0.95,0,1.72-0.77,1.72-1.72s-0.77-1.72-1.72-1.72h-11.3 <path fill="#FFFFFF" d="M89.49,10.5h11.31c1.38,0,2.5-1.12,2.5-2.5s-1.12-2.5-2.5-2.5H89.49c-1.38,0-2.5,1.12-2.5,2.5
c-0.95,0-1.72,0.77-1.72,1.72S60.86,26.17,61.81,26.17z M9.71,67.54c0.95,0,1.72-0.77,1.72-1.72v-11.3c0-0.95-0.77-1.72-1.72-1.72 S88.11,10.5,89.49,10.5z"/>
s-1.72,0.77-1.72,1.72v11.3C7.99,66.77,8.76,67.54,9.71,67.54z M24.65,33.86c0.42,0,0.84-0.15,1.17-0.46l7.04-6.52 <path fill="#FFFFFF" d="M88,57.92c-1.38,0-2.5,1.12-2.5,2.5v5.35c1.61-0.56,3.28-0.99,5-1.29v-4.06
c0.14-0.13,0.46-0.34,0.9-0.51c0.89-0.34,1.34-1.33,1-2.22s-1.33-1.34-2.22-1c-0.8,0.3-1.52,0.73-2.03,1.2l-7.04,6.52 C90.5,59.04,89.38,57.92,88,57.92z"/>
c-0.7,0.65-0.74,1.74-0.09,2.43C23.73,33.68,24.19,33.86,24.65,33.86z M70.35,99.28l-0.37,0.36v-2.43c0-0.95-0.77-1.72-1.72-1.72 <path fill="#FFFFFF" d="M117.5,63.91c0,1.38,1.12,2.5,2.5,2.5s2.5-1.12,2.5-2.5V52.39c0-1.38-1.12-2.5-2.5-2.5s-2.5,1.12-2.5,2.5
c-0.95,0-1.72,0.77-1.72,1.72v4.72H61.3c-0.95,0-1.72,0.77-1.72,1.72s0.77,1.72,1.72,1.72h5.23c1.4,0,3.15-0.7,4.16-1.66l2.03-1.94 V63.91z"/>
c0.69-0.66,0.71-1.75,0.06-2.43C72.13,98.65,71.03,98.63,70.35,99.28z M52.6,101.93H41.3c-0.95,0-1.72,0.77-1.72,1.72 <path fill="#FFFFFF" d="M64.99,10.5H76.3c1.38,0,2.5-1.12,2.5-2.5s-1.12-2.5-2.5-2.5H64.99c-1.38,0-2.5,1.12-2.5,2.5
s0.77,1.72,1.72,1.72h11.3c0.95,0,1.72-0.77,1.72-1.72S53.55,101.93,52.6,101.93z M88.92,36.35c-0.95,0-1.72,0.77-1.72,1.72v11.3 S63.6,10.5,64.99,10.5z"/>
c0,0.95,0.77,1.72,1.72,1.72c0.95,0,1.72-0.77,1.72-1.72v-11.3C90.64,37.12,89.87,36.35,88.92,36.35z M32.61,101.93H21.3 <path fill="#FFFFFF" d="M120,24.94c-1.38,0-2.5,1.12-2.5,2.5v11.52c0,1.38,1.12,2.5,2.5,2.5s2.5-1.12,2.5-2.5V27.44
c-0.95,0-1.72,0.77-1.72,1.72s0.77,1.72,1.72,1.72h11.3c0.95,0,1.72-0.77,1.72-1.72S33.56,101.93,32.61,101.93z M9.71,87.54 C122.5,26.06,121.38,24.94,120,24.94z"/>
c0.95,0,1.72-0.77,1.72-1.72v-11.3c0-0.95-0.77-1.72-1.72-1.72s-1.72,0.77-1.72,1.72v11.3C7.99,86.77,8.76,87.54,9.71,87.54z <path fill="#FFFFFF" d="M14.76,37.63c0.59-0.88,0.58-2.07-0.12-2.94c-0.86-1.08-2.44-1.25-3.51-0.39l-4.69,3.75
M12.61,101.93h-1.18v-7.42c0-0.95-0.77-1.72-1.72-1.72s-1.72,0.77-1.72,1.72v7.42c0,1.9,1.54,3.44,3.44,3.44h1.18 c-0.03,0.03-0.06,0.06-0.09,0.09c-0.07,0.06-0.13,0.12-0.19,0.19c-0.05,0.06-0.1,0.12-0.15,0.18c-0.05,0.07-0.09,0.13-0.14,0.2
c0.95,0,1.72-0.77,1.72-1.72S13.56,101.93,12.61,101.93z M19.53,36.88c-0.65-0.7-1.74-0.74-2.43-0.09l-7.3,6.76 c-0.04,0.07-0.08,0.14-0.12,0.21c-0.03,0.07-0.07,0.15-0.09,0.22c-0.03,0.08-0.05,0.15-0.07,0.23c-0.02,0.08-0.04,0.15-0.05,0.23
c-0.55,0.51-0.93,1.15-1.16,1.6C8.22,46,8.56,47.03,9.41,47.46c0.25,0.12,0.51,0.18,0.77,0.18h0.01c0.14,0.04,0.29,0.07,0.45,0.07 c-0.01,0.09-0.02,0.17-0.03,0.26c0,0.04-0.01,0.09-0.01,0.13v6c0,1.38,1.12,2.5,2.5,2.5s2.5-1.12,2.5-2.5v-3.5H14
h5.6c0.95,0,1.72-0.77,1.72-1.72s-0.77-1.72-1.72-1.72h-2.13l5.33-4.94C20.14,38.66,20.18,37.57,19.53,36.88z M80.7,89.4l-4.05,3.86 c1.38,0,2.5-1.12,2.5-2.5C16.5,38.89,15.77,37.95,14.76,37.63z"/>
c-0.69,0.66-0.71,1.75-0.06,2.43c0.34,0.35,0.79,0.53,1.25,0.53c0.43,0,0.86-0.16,1.19-0.48l4.05-3.86 <path fill="#FFFFFF" d="M40.79,37.5H28.42c-1.38,0-2.5,1.12-2.5,2.5s1.12,2.5,2.5,2.5h12.36c1.38,0,2.5-1.12,2.5-2.5
c0.69-0.66,0.71-1.75,0.06-2.43C82.48,88.77,81.39,88.75,80.7,89.4z"/> S42.17,37.5,40.79,37.5z"/>
<g> <path fill="#FFFFFF" d="M54.29,8c0-1.38-1.12-2.5-2.5-2.5H48c-0.57,0-1.12,0.19-1.56,0.55l-5.87,4.7
<path fill="#ED6B21" d="M98.82,101.06c-11.63,0-21.09-9.46-21.09-21.09s9.46-21.09,21.09-21.09s21.09,9.46,21.09,21.09 c-1.08,0.86-1.25,2.44-0.39,3.51c0.49,0.62,1.22,0.94,1.95,0.94c0.55,0,1.1-0.18,1.56-0.55l5.19-4.15h2.91
S110.45,101.06,98.82,101.06z M98.82,62.32c-9.73,0-17.65,7.92-17.65,17.65s7.92,17.65,17.65,17.65s17.65-7.92,17.65-17.65 C53.17,10.5,54.29,9.38,54.29,8z"/>
S108.55,62.32,98.82,62.32z"/> <path fill="#FFFFFF" d="M40.79,117.5H28.42c-1.38,0-2.5,1.12-2.5,2.5s1.12,2.5,2.5,2.5h12.36c1.38,0,2.5-1.12,2.5-2.5
</g> S42.17,117.5,40.79,117.5z"/>
<g> <path fill="#FFFFFF" d="M67.58,117.5H55.21c-1.38,0-2.5,1.12-2.5,2.5s1.12,2.5,2.5,2.5h12.36c1.38,0,2.5-1.12,2.5-2.5
<path fill="#ED6B21" d="M110.44,81.84c0,1.1-0.9,2-2,2H89.2c-1.1,0-2-0.9-2-2v-3.75c0-1.1,0.9-2,2-2h19.25c1.1,0,2,0.9,2,2 S68.96,117.5,67.58,117.5z"/>
L110.44,81.84L110.44,81.84z"/> <path fill="#FFFFFF" d="M52.71,40c0,1.38,1.12,2.5,2.5,2.5h12.36c1.38,0,2.5-1.12,2.5-2.5s-1.12-2.5-2.5-2.5H55.21
C53.83,37.5,52.71,38.62,52.71,40z"/>
<path fill="#FFFFFF" d="M8,102.08c1.38,0,2.5-1.12,2.5-2.5V87.21c0-1.38-1.12-2.5-2.5-2.5s-2.5,1.12-2.5,2.5v12.36
C5.5,100.96,6.62,102.08,8,102.08z"/>
<path fill="#FFFFFF" d="M8,75.29c1.38,0,2.5-1.12,2.5-2.5V60.42c0-1.38-1.12-2.5-2.5-2.5s-2.5,1.12-2.5,2.5v12.36
C5.5,74.17,6.62,75.29,8,75.29z"/>
<path fill="#FFFFFF" d="M14,117.5h-3.5V114c0-1.38-1.12-2.5-2.5-2.5s-2.5,1.12-2.5,2.5v6c0,1.38,1.12,2.5,2.5,2.5h6
c1.38,0,2.5-1.12,2.5-2.5S15.38,117.5,14,117.5z"/>
<path fill="#FFFFFF" d="M33.77,19.38c-0.86-1.08-2.44-1.25-3.51-0.39l-8.83,7.07c-1.08,0.86-1.25,2.44-0.39,3.51
c0.49,0.62,1.22,0.94,1.95,0.94c0.55,0,1.1-0.18,1.56-0.55l8.83-7.07C34.46,22.03,34.64,20.46,33.77,19.38z"/>
</g>
<g>
<path fill="#ED6B21" d="M96,69.5c-14.61,0-26.5,11.89-26.5,26.5s11.89,26.5,26.5,26.5s26.5-11.89,26.5-26.5S110.61,69.5,96,69.5z
M96,117.5c-11.86,0-21.5-9.64-21.5-21.5S84.14,74.5,96,74.5s21.5,9.64,21.5,21.5S107.86,117.5,96,117.5z"/>
<path fill="#ED6B21" d="M112,93.5H80c-1.38,0-2.5,1.12-2.5,2.5s1.12,2.5,2.5,2.5h32c1.38,0,2.5-1.12,2.5-2.5S113.38,93.5,112,93.5
z"/>
</g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

35
resources/icons/seam.svg Normal file
View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<g id="paint_x5F_seams_2_">
<polyline fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
120,32 64,8 8,32 8,96 64,120 "/>
<path fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
M120,96"/>
<polyline fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
8,32 64,56 64,120 "/>
<line fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="64" y1="56" x2="120" y2="32"/>
<line fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="64" y1="120" x2="120" y2="96"/>
<line fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="120" y1="96" x2="120" y2="32"/>
<line fill="none" stroke="#ED6B21" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="88.05" y1="53.69" x2="95.96" y2="50.3"/>
<line fill="none" stroke="#ED6B21" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="95.96" y1="58.3" x2="103.99" y2="54.86"/>
<line fill="none" stroke="#ED6B21" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="88.05" y1="69.69" x2="95.96" y2="66.3"/>
<line fill="none" stroke="#ED6B21" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="80.05" y1="81.12" x2="88.05" y2="77.69"/>
<line fill="none" stroke="#ED6B21" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="71.94" y1="92.6" x2="80.05" y2="89.12"/>
<line fill="none" stroke="#ED6B21" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="80.05" y1="97.12" x2="88.05" y2="93.69"/>
<line fill="none" stroke="#ED6B21" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="88.05" y1="101.69" x2="96.13" y2="98.23"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -1,4 +1,26 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24px" height="24px"> <?xml version="1.0" encoding="utf-8"?>
<path fill="#FFFFFF" d="M 13.261719 14.867188 L 15.742188 17.347656 C 15.363281 18.070313 15.324219 18.789063 15.722656 19.1875 L 20.25 23.714844 C 20.820313 24.285156 22.0625 23.972656 23.015625 23.015625 C 23.972656 22.058594 24.285156 20.820313 23.714844 20.25 L 19.191406 15.722656 C 18.789063 15.324219 18.070313 15.363281 17.347656 15.738281 L 14.867188 13.261719 Z M 8.5 0 C 3.804688 0 0 3.804688 0 8.5 C 0 13.195313 3.804688 17 8.5 17 C 13.195313 17 17 13.195313 17 8.5 C 17 3.804688 13.195313 0 8.5 0 Z M 8.5 15 C 4.910156 15 2 12.089844 2 8.5 C 2 4.910156 4.910156 2 8.5 2 C 12.089844 2 15 4.910156 15 8.5 C 15 12.089844 12.089844 15 8.5 15 Z"/> <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<path fill="#ED6B21" d="M 13.261719 14.867188 L 19.191406 15.722656 C 18.789063 15.324219 18.070313 15.363281 17.347656 15.738281 M 8.5 0 C 3.804688 0 0 3.804688 0 8.5 C 0 13.195313 3.804688 17 8.5 17 C 13.195313 17 17 13.195313 17 8.5 C 17 3.804688 13.195313 0 8.5 0 Z M 8.5 15 C 4.910156 15 2 12.089844 2 8.5 C 2 4.910156 4.910156 2 8.5 2 C 12.089844 2 15 4.910156 15 8.5 C 15 12.089844 12.089844 15 8.5 15 Z"/> <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<g id="search">
<g>
<path fill="#ED6B21" d="M52,98.5C26.36,98.5,5.5,77.64,5.5,52C5.5,26.36,26.36,5.5,52,5.5c25.64,0,46.5,20.86,46.5,46.5
C98.5,77.64,77.64,98.5,52,98.5z M52,10.5c-22.88,0-41.5,18.62-41.5,41.5c0,22.88,18.62,41.5,41.5,41.5
c22.88,0,41.5-18.62,41.5-41.5C93.5,29.12,74.88,10.5,52,10.5z"/>
</g>
<g>
<path fill="#ED6B21" d="M117.47,119.97c-0.64,0-1.28-0.24-1.77-0.73L81.34,84.88c-0.98-0.98-0.98-2.56,0-3.54s2.56-0.98,3.54,0
l34.36,34.36c0.98,0.98,0.98,2.56,0,3.54C118.75,119.72,118.11,119.97,117.47,119.97z"/>
</g>
<g>
<path fill="#ED6B21" d="M117.47,122.47c-1.28,0-2.56-0.49-3.54-1.46L92.46,99.54c-1.95-1.95-1.95-5.12,0-7.07
c1.95-1.95,5.12-1.95,7.07,0L121,113.93c1.95,1.95,1.95,5.12,0,7.07C120.03,121.98,118.75,122.47,117.47,122.47z"/>
</g>
<g>
<path fill="#FFFFFF" d="M52,77.59c-0.43,0-0.86-0.11-1.25-0.33l-20-11.55c-0.77-0.45-1.25-1.27-1.25-2.17V40.45
c0-0.89,0.48-1.72,1.25-2.17l20-11.55c0.77-0.45,1.73-0.45,2.5,0l20,11.55c0.77,0.45,1.25,1.27,1.25,2.17v23.09
c0,0.89-0.48,1.72-1.25,2.17l-20,11.55C52.86,77.48,52.43,77.59,52,77.59z M34.5,62.1L52,72.21l17.5-10.1V41.9L52,31.79L34.5,41.9
V62.1z M72,63.55L72,63.55L72,63.55z"/>
</g>
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Before After
Before After

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.6, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<path id="undo_1_" fill="#ED6B21" d="M1.95,7.01h10.24L8.86,2.51c-0.31-0.42-0.22-1.01,0.2-1.32c0.42-0.31,1.01-0.22,1.32,0.2
l4.44,6.01c0,0.01,0.01,0.01,0.01,0.02c0.01,0.01,0.02,0.03,0.03,0.04c0.01,0.02,0.03,0.05,0.04,0.07c0.01,0.02,0.02,0.03,0.03,0.05
c0.01,0.01,0.01,0.03,0.02,0.04c0.01,0.02,0.02,0.05,0.02,0.07c0.01,0.02,0.01,0.04,0.02,0.06c0,0.01,0,0.03,0.01,0.04
c0,0.02,0.01,0.05,0.01,0.07c0,0.02,0.01,0.05,0.01,0.07c0,0.01,0,0.01,0,0.02c0,0.01,0,0.01,0,0.02c0,0.02,0,0.05-0.01,0.07
c0,0.02,0,0.05-0.01,0.07c0,0.01,0,0.03-0.01,0.04c0,0.02-0.01,0.04-0.02,0.06c-0.01,0.02-0.01,0.05-0.02,0.07
c-0.01,0.01-0.01,0.03-0.02,0.04c-0.01,0.02-0.02,0.04-0.03,0.05c-0.01,0.02-0.02,0.04-0.04,0.07c-0.01,0.01-0.02,0.03-0.03,0.04
c0,0.01-0.01,0.01-0.01,0.02l-4.54,6.05c-0.19,0.25-0.47,0.38-0.76,0.38c-0.2,0-0.4-0.06-0.57-0.19c-0.42-0.31-0.5-0.91-0.19-1.32
l3.41-4.54H1.95C1.42,8.91,1,8.48,1,7.96C1,7.44,1.42,7.01,1.95,7.01z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<g id="settings">
<g>
<g>
<path fill="#ED6B21" d="M51.99,81.99c-0.56,0-1.12-0.11-1.66-0.33c-1.06-0.44-1.88-1.27-2.32-2.33l-1.69-4.1
c-1.61,0.12-3.24,0.11-4.86-0.02l-1.71,4.1c-0.91,2.19-3.44,3.22-5.62,2.31l-9.97-4.17c-2.19-0.91-3.22-3.44-2.31-5.62l1.71-4.1
c-1.23-1.06-2.38-2.21-3.43-3.44l-4.1,1.69c-1.06,0.43-2.23,0.43-3.29-0.01c-1.06-0.44-1.88-1.27-2.32-2.33l-4.1-10
c-0.9-2.19,0.15-4.71,2.34-5.61l4.1-1.69c-0.12-1.61-0.11-3.24,0.02-4.86l-4.1-1.71c-1.06-0.44-1.88-1.27-2.32-2.33
c-0.44-1.06-0.43-2.23,0.01-3.29l4.17-9.97c0.44-1.06,1.27-1.88,2.33-2.32c1.06-0.44,2.23-0.43,3.29,0.01l4.1,1.71
c1.06-1.23,2.21-2.38,3.44-3.43l-1.69-4.1c-0.44-1.06-0.43-2.23,0.01-3.29s1.27-1.88,2.33-2.32l10-4.1
c2.19-0.9,4.71,0.15,5.61,2.34l1.69,4.1c1.61-0.12,3.24-0.11,4.86,0.02l1.71-4.1c0.44-1.06,1.27-1.88,2.33-2.32
c1.06-0.44,2.23-0.43,3.29,0.01l9.97,4.17c1.06,0.44,1.88,1.27,2.32,2.33c0.44,1.06,0.43,2.23-0.01,3.29l-1.71,4.1
c1.23,1.06,2.38,2.21,3.43,3.44l4.1-1.69c1.06-0.44,2.23-0.43,3.29,0.01c1.06,0.44,1.88,1.27,2.32,2.33l4.1,9.99
c0.44,1.06,0.43,2.23-0.01,3.29s-1.27,1.88-2.33,2.32l-4.1,1.69c0.12,1.61,0.11,3.24-0.02,4.86l4.1,1.71
c2.19,0.91,3.22,3.44,2.31,5.62l-4.17,9.97c-0.91,2.19-3.44,3.22-5.62,2.31l-4.1-1.71c-1.06,1.23-2.21,2.38-3.44,3.43l1.69,4.1
c0.44,1.06,0.43,2.23-0.01,3.29c-0.44,1.06-1.27,1.88-2.33,2.32l-10,4.1C53.1,81.88,52.54,81.99,51.99,81.99z M46.77,70.18
c1.75,0,3.33,1.03,4,2.66l1.61,3.93l8.7-3.57l-1.61-3.93c-0.72-1.75-0.21-3.75,1.27-4.97c1.25-1.03,2.42-2.2,3.47-3.46
c1.22-1.47,3.2-1.97,4.95-1.24l3.95,1.65l3.62-8.67l-3.95-1.65c-1.74-0.73-2.78-2.49-2.59-4.39c0.16-1.63,0.17-3.28,0.02-4.9
c-0.17-1.91,0.89-3.68,2.64-4.4l3.93-1.61l-3.57-8.7l-3.93,1.61c-1.75,0.72-3.75,0.21-4.97-1.27c-1.03-1.25-2.2-2.42-3.46-3.47
c-1.47-1.22-1.97-3.21-1.24-4.94l1.65-3.95l-8.67-3.62l-1.65,3.95c-0.73,1.74-2.49,2.78-4.39,2.59c-1.63-0.16-3.28-0.17-4.9-0.02
c-1.91,0.16-3.68-0.89-4.4-2.64l-1.61-3.93l-8.7,3.57l1.61,3.93c0.72,1.75,0.21,3.75-1.27,4.97c-1.25,1.04-2.42,2.2-3.47,3.46
c-1.22,1.47-3.21,1.97-4.95,1.24l-3.95-1.65l-3.62,8.67l3.95,1.65c1.74,0.73,2.78,2.49,2.59,4.39c-0.16,1.63-0.17,3.28-0.02,4.9
c0.17,1.91-0.89,3.68-2.64,4.4l-3.93,1.61l3.57,8.7l3.93-1.61c1.75-0.72,3.75-0.21,4.97,1.27c1.04,1.25,2.2,2.42,3.46,3.47
c1.47,1.22,1.97,3.21,1.24,4.95l-1.65,3.95l8.67,3.62l1.65-3.95c0.73-1.74,2.49-2.79,4.39-2.59c1.63,0.16,3.28,0.17,4.9,0.02
C46.5,70.19,46.63,70.18,46.77,70.18z M77.04,36.27C77.04,36.27,77.04,36.28,77.04,36.27L77.04,36.27z"/>
</g>
<g>
<path fill="#ED6B21" d="M44,60.91c-2.21,0-4.42-0.44-6.52-1.32c-4.17-1.74-7.4-5-9.12-9.17c-1.71-4.18-1.7-8.77,0.04-12.93
s5-7.4,9.17-9.12c4.18-1.71,8.77-1.7,12.93,0.04c4.17,1.74,7.4,5,9.12,9.17c1.71,4.18,1.7,8.77-0.04,12.93s-5,7.4-9.17,9.12
C48.35,60.48,46.17,60.91,44,60.91z M44,32.09c-1.53,0-3.06,0.3-4.52,0.9c-2.94,1.21-5.23,3.49-6.46,6.42s-1.24,6.17-0.03,9.11
c1.21,2.94,3.49,5.23,6.42,6.46c2.93,1.23,6.17,1.23,9.11,0.03c2.94-1.21,5.23-3.49,6.46-6.42s1.24-6.17,0.03-9.11l0,0
c-1.21-2.94-3.49-5.23-6.42-6.46C47.11,32.4,45.56,32.09,44,32.09z"/>
</g>
</g>
<g>
<g>
<path fill="#FFFFFF" d="M97.4,122.5h-7.98c-2.11,0-3.83-1.72-3.83-3.83v-2.81c-0.86-0.3-1.71-0.65-2.53-1.05l-1.99,1.99
c-1.49,1.49-3.92,1.49-5.41,0l-5.64-5.65c-0.72-0.72-1.12-1.68-1.12-2.71c0-1.02,0.4-1.98,1.12-2.71l1.99-1.99
c-0.4-0.82-0.75-1.67-1.05-2.53h-2.81c-2.11,0-3.83-1.72-3.83-3.83v-7.98c0-2.11,1.72-3.83,3.83-3.83h2.81
c0.3-0.86,0.65-1.71,1.05-2.53l-1.99-1.99c-1.49-1.49-1.49-3.92,0-5.41l5.64-5.64c1.49-1.49,3.92-1.49,5.41,0L83.06,72
c0.82-0.4,1.67-0.75,2.53-1.05v-2.81c0-2.11,1.72-3.83,3.83-3.83h7.98c2.11,0,3.83,1.72,3.83,3.83v2.81
c0.86,0.3,1.71,0.65,2.53,1.05l1.99-1.99c1.45-1.45,3.97-1.45,5.41,0l5.64,5.64c1.49,1.49,1.49,3.92,0,5.41l-1.99,1.99
c0.4,0.83,0.75,1.67,1.05,2.53h2.81c2.11,0,3.83,1.72,3.83,3.83v7.98c0,2.11-1.72,3.83-3.83,3.83h-2.81
c-0.3,0.86-0.65,1.71-1.05,2.53l1.99,1.99c0.72,0.72,1.12,1.68,1.12,2.71c0,1.02-0.4,1.99-1.12,2.71l-5.64,5.64
c-1.44,1.44-3.97,1.45-5.41,0l-1.99-1.99c-0.83,0.4-1.67,0.75-2.53,1.05v2.81C101.22,120.78,99.51,122.5,97.4,122.5z
M90.59,117.5h5.64v-2.49c0-1.69,1.1-3.16,2.73-3.67c1.11-0.34,2.19-0.79,3.23-1.34c1.5-0.8,3.3-0.53,4.49,0.65l1.78,1.78
l3.99-3.99l-1.78-1.77c-1.19-1.19-1.45-3-0.66-4.5c0.55-1.04,1-2.12,1.34-3.23c0.51-1.63,1.98-2.73,3.67-2.73h2.49v-5.64h-2.49
c-1.69,0-3.16-1.1-3.67-2.73c-0.34-1.11-0.79-2.19-1.34-3.23c-0.8-1.5-0.53-3.31,0.66-4.49l1.78-1.78l-3.99-3.99l-1.78,1.78
c-1.19,1.19-3,1.45-4.5,0.65c-1.03-0.55-2.12-1-3.23-1.34c-1.63-0.51-2.73-1.98-2.73-3.67v-2.49h-5.64v2.49
c0,1.69-1.1,3.16-2.73,3.67c-1.11,0.34-2.19,0.79-3.23,1.34c-1.5,0.8-3.31,0.53-4.5-0.66l-1.77-1.77l-3.99,3.99l1.78,1.78
c1.19,1.19,1.45,2.99,0.65,4.5c-0.55,1.03-1,2.12-1.34,3.23c-0.51,1.63-1.98,2.73-3.67,2.73h-2.49v5.64h2.49
c1.69,0,3.16,1.1,3.67,2.73c0.34,1.11,0.8,2.2,1.34,3.23c0.8,1.5,0.53,3.3-0.66,4.49l-1.78,1.78l3.99,3.99l1.78-1.78
c1.19-1.19,2.99-1.45,4.49-0.66c1.04,0.55,2.13,1,3.23,1.34c1.63,0.51,2.73,1.98,2.73,3.67V117.5z M72.39,104.52
C72.39,104.52,72.39,104.53,72.39,104.52C72.39,104.53,72.39,104.52,72.39,104.52z M72.62,83.67
C72.62,83.67,72.62,83.67,72.62,83.67L72.62,83.67z M104.52,72.39C104.52,72.39,104.52,72.39,104.52,72.39
C104.52,72.39,104.52,72.39,104.52,72.39z"/>
</g>
<g>
<path fill="#FFFFFF" d="M93.41,106.54c-7.24,0-13.14-5.89-13.14-13.14s5.89-13.14,13.14-13.14s13.14,5.89,13.14,13.14
S100.65,106.54,93.41,106.54z M93.41,85.27c-4.49,0-8.14,3.65-8.14,8.14s3.65,8.14,8.14,8.14s8.14-3.65,8.14-8.14
S97.89,85.27,93.41,85.27z"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

View file

@ -1,19 +1,20 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve"> viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<g id="OBJECTS"> <g id="split_x5F_objects">
<g> <g>
<path fill="#FFFFFF" d="M34.63,91.95h-17.3c-4.96,0-9-4.04-9-9V17.28c0-4.96,4.04-9,9-9H83c4.96,0,9,4.04,9,9v17.3 <path fill="#FFFFFF" d="M32,90.5H8c-1.38,0-2.5-1.12-2.5-2.5V8c0-1.38,1.12-2.5,2.5-2.5h80c1.38,0,2.5,1.12,2.5,2.5v24
c0,1.66-1.34,3-3,3s-3-1.34-3-3v-17.3c0-1.65-1.35-3-3-3H17.32c-1.65,0-3,1.35-3,3v65.67c0,1.65,1.35,3,3,3h17.3 c0,1.38-1.12,2.5-2.5,2.5s-2.5-1.12-2.5-2.5V10.5h-75v75H32c1.38,0,2.5,1.12,2.5,2.5S33.38,90.5,32,90.5z"/>
c1.66,0,3,1.34,3,3S36.28,91.95,34.63,91.95z"/>
</g> </g>
<g> <g>
<path fill="#ED6B21" d="M114.89,42.35H47.57c-2.85,0-5.18,2.33-5.18,5.18v67.32c0,2.85,2.33,5.18,5.18,5.18h67.32 <path fill="#ED6B21" d="M120,122.5H40c-1.38,0-2.5-1.12-2.5-2.5V40c0-1.38,1.12-2.5,2.5-2.5h80c1.38,0,2.5,1.12,2.5,2.5v80
c2.85,0,5.18-2.33,5.18-5.18V47.52C120.07,44.68,117.74,42.35,114.89,42.35z M101.82,94.28c0,12.63-6.35,18.27-20.89,18.27 C122.5,121.38,121.38,122.5,120,122.5z M42.5,117.5h75v-75h-75V117.5z"/>
s-20.42-5.64-20.42-18.27v-25.9c0-12.95,5.64-18.27,20.42-18.27c14.77,0,20.89,5.32,20.89,18.27V94.28z"/> </g>
<path fill="#ED6B21" d="M80.93,59.8c-7.94,0-9.45,3.58-9.45,9.14v24.78c0,5.8,1.51,9.13,9.45,9.13s9.93-3.33,9.93-9.13V68.94 <g>
C90.86,63.38,89.43,59.8,80.93,59.8z"/> <path fill="#ED6B21" d="M86,106.5H74c-6.89,0-12.5-5.61-12.5-12.5V66c0-6.89,5.61-12.5,12.5-12.5h12c6.89,0,12.5,5.61,12.5,12.5
v28C98.5,100.89,92.89,106.5,86,106.5z M74,58.5c-4.14,0-7.5,3.36-7.5,7.5v28c0,4.14,3.36,7.5,7.5,7.5h12c4.14,0,7.5-3.36,7.5-7.5
V66c0-4.14-3.36-7.5-7.5-7.5H74z"/>
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

View file

@ -1,18 +1,20 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve"> viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<g id="PARTS"> <g id="split_x5F_parts_1_">
<g> <g>
<path fill="#FFFFFF" d="M34.63,91.95h-17.3c-4.96,0-9-4.04-9-9V17.28c0-4.96,4.04-9,9-9H83c4.96,0,9,4.04,9,9v17.3 <path fill="#FFFFFF" d="M32,90.5H8c-1.38,0-2.5-1.12-2.5-2.5V8c0-1.38,1.12-2.5,2.5-2.5h80c1.38,0,2.5,1.12,2.5,2.5v24
c0,1.66-1.34,3-3,3s-3-1.34-3-3v-17.3c0-1.65-1.35-3-3-3H17.32c-1.65,0-3,1.35-3,3v65.67c0,1.65,1.35,3,3,3h17.3 c0,1.38-1.12,2.5-2.5,2.5s-2.5-1.12-2.5-2.5V10.5h-75v75H32c1.38,0,2.5,1.12,2.5,2.5S33.38,90.5,32,90.5z"/>
c1.66,0,3,1.34,3,3S36.28,91.95,34.63,91.95z"/>
</g> </g>
<g> <g>
<path fill="#ED6B21" d="M114.91,42.32H47.57c-2.85,0-5.18,2.33-5.18,5.18v67.34c0,2.85,2.33,5.18,5.18,5.18h67.34 <path fill="#ED6B21" d="M120,122.5H40c-1.38,0-2.5-1.12-2.5-2.5V40c0-1.38,1.12-2.5,2.5-2.5h80c1.38,0,2.5,1.12,2.5,2.5v80
c2.85,0,5.18-2.33,5.18-5.18V47.5C120.09,44.65,117.76,42.32,114.91,42.32z M99.95,74.39c0,12.84-7.27,18.81-22.04,18.81h-4.28 C122.5,121.38,121.38,122.5,120,122.5z M42.5,117.5h75v-75h-75V117.5z"/>
v19.05H62.25V50.09h15.66c15.02,0,22.04,5.41,22.04,18.57C99.95,68.66,99.95,74.39,99.95,74.39z"/> </g>
<path fill="#ED6B21" d="M78.07,60.26h-4.52v22.2h4.36c8.08,0,10.74-2.74,10.74-8.64v-4.6C88.65,63.33,86.71,60.26,78.07,60.26z"/> <g>
<path fill="#ED6B21" d="M64,106.5c-1.38,0-2.5-1.12-2.5-2.5V61c0-4.14,3.36-7.5,7.5-7.5h17c6.89,0,12.5,5.61,12.5,12.5v4
c0,6.89-5.61,12.5-12.5,12.5H66.5V104C66.5,105.38,65.38,106.5,64,106.5z M66.5,77.5H86c4.14,0,7.5-3.36,7.5-7.5v-4
c0-4.14-3.36-7.5-7.5-7.5H69c-1.38,0-2.5,1.12-2.5,2.5V77.5z"/>
</g> </g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

View file

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="thumb_left.svg"
xml:space="preserve"
enable-background="new 0 0 16 16"
viewBox="0 0 16 16"
y="0px"
x="0px"
id="Layer_1"
version="1.0"><metadata
id="metadata32"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs30" /><sodipodi:namedview
inkscape:current-layer="Layer_1"
inkscape:window-maximized="0"
inkscape:window-y="0"
inkscape:window-x="1268"
inkscape:cy="8"
inkscape:cx="8"
inkscape:zoom="63"
showgrid="false"
id="namedview28"
inkscape:window-height="1368"
inkscape:window-width="1283"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<g
transform="rotate(-90,8.0158731,7.984127)"
id="hex_x5F_plus">
<g
id="g24">
<polygon
id="polygon22"
style="stroke:#ffffff;stroke-width:1"
points="15,7 15,5 8,0 1,5 1,7 1,8 15,8 "
fill="#ed6b21" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="thumb_right.svg"
xml:space="preserve"
enable-background="new 0 0 16 16"
viewBox="0 0 16 16"
y="0px"
x="0px"
id="Layer_1"
version="1.0"><metadata
id="metadata32"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs30" /><sodipodi:namedview
inkscape:current-layer="Layer_1"
inkscape:window-maximized="0"
inkscape:window-y="0"
inkscape:window-x="1268"
inkscape:cy="8"
inkscape:cx="8"
inkscape:zoom="63"
showgrid="false"
id="namedview28"
inkscape:window-height="1368"
inkscape:window-width="1283"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<g
transform="matrix(0,-1,-1,0,16.012532,16)"
id="hex_x5F_plus">
<g
id="g24">
<polygon
id="polygon22"
style="stroke:#ffffff;stroke-width:1"
points="15,8 15,7 15,5 8,0 1,5 1,7 1,8 "
fill="#ed6b21" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -292.77)">
<path d="m2.2728 301.7 3.2932 4.8789 8.3542-11.435" fill="none" stroke="#00af00" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.9994"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 319 B

View file

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="timer_dot.svg"
xml:space="preserve"
enable-background="new 0 0 16 16"
viewBox="0 0 16 16"
y="0px"
x="0px"
id="Layer_1"
version="1.0"><metadata
id="metadata11"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs9"><linearGradient
id="linearGradient830"
inkscape:collect="always"><stop
id="stop826"
offset="0"
style="stop-color:#000000;stop-opacity:1;" /><stop
id="stop828"
offset="1"
style="stop-color:#000000;stop-opacity:0;" /></linearGradient><radialGradient
gradientUnits="userSpaceOnUse"
r="3.5"
fy="8"
fx="8"
cy="8"
cx="8"
id="radialGradient832"
xlink:href="#linearGradient830"
inkscape:collect="always" /></defs><sodipodi:namedview
inkscape:document-rotation="0"
inkscape:current-layer="Layer_1"
inkscape:window-maximized="1"
inkscape:window-y="-11"
inkscape:window-x="-11"
inkscape:cy="6.66147"
inkscape:cx="7.0304602"
inkscape:zoom="83.4386"
showgrid="false"
id="namedview7"
inkscape:window-height="2066"
inkscape:window-width="3840"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<g
transform="matrix(0.7,0,0,0.7,2.4,2.4)"
style="fill:#bf6637;fill-opacity:1;stroke:none;stroke-opacity:1"
id="g4">
<circle
style="fill:#bf6637;fill-opacity:1;stroke:none;stroke-opacity:1"
id="circle2"
r="3"
cy="8"
cx="8" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
id="Layer_1"
x="0px"
y="0px"
viewBox="0 0 16 16"
enable-background="new 0 0 16 16"
xml:space="preserve"
sodipodi:docname="timer_dot_empty.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><metadata
id="metadata11"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs9"><linearGradient
inkscape:collect="always"
id="linearGradient830"><stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop826" /><stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop828" /></linearGradient><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient830"
id="radialGradient832"
cx="8"
cy="8"
fx="8"
fy="8"
r="3.5"
gradientUnits="userSpaceOnUse" /></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="3840"
inkscape:window-height="2066"
id="namedview7"
showgrid="false"
inkscape:zoom="83.4386"
inkscape:cx="7.0304602"
inkscape:cy="6.66147"
inkscape:window-x="-11"
inkscape:window-y="-11"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1" />
<g
id="g4"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-opacity:1"
transform="matrix(0.7,0,0,0.7,2.4,2.4)">
<circle
cx="8"
cy="8"
r="3"
id="circle2"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -1,13 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.6, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve"> viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<path id="undo_1_" fill="#ED6B21" d="M14.05,7.01H3.82l3.32-4.51c0.31-0.42,0.22-1.01-0.2-1.32c-0.42-0.31-1.01-0.22-1.32,0.2 <g id="redo">
L1.18,7.4c0,0.01-0.01,0.01-0.01,0.02C1.17,7.43,1.16,7.44,1.15,7.46C1.13,7.48,1.12,7.5,1.11,7.53C1.1,7.54,1.09,7.56,1.08,7.58 <g>
C1.08,7.59,1.07,7.61,1.06,7.62C1.06,7.65,1.05,7.67,1.04,7.69C1.04,7.71,1.03,7.73,1.02,7.75c0,0.01,0,0.03-0.01,0.04 <path fill="#ED6B21" d="M36.57,72.21c0.73,0,1.46-0.32,1.95-0.94c0.86-1.08,0.69-2.65-0.39-3.51L12,46.86l26.13-20.9
c0,0.02-0.01,0.05-0.01,0.07C1.01,7.89,1,7.92,1,7.94c0,0.01,0,0.01,0,0.02c0,0.01,0,0.01,0,0.02c0,0.02,0,0.05,0.01,0.07 c1.08-0.86,1.25-2.44,0.39-3.51c-0.86-1.08-2.43-1.25-3.51-0.39L6.44,44.9C5.85,45.38,5.5,46.1,5.5,46.86s0.35,1.48,0.94,1.95
c0,0.02,0,0.05,0.01,0.07c0,0.01,0,0.03,0.01,0.04c0,0.02,0.01,0.04,0.02,0.06C1.05,8.26,1.06,8.28,1.07,8.3 l28.57,22.86C35.47,72.04,36.02,72.21,36.57,72.21z"/>
c0.01,0.01,0.01,0.03,0.02,0.04C1.09,8.36,1.1,8.38,1.11,8.4c0.01,0.02,0.02,0.04,0.04,0.07c0.01,0.01,0.02,0.03,0.03,0.04 </g>
c0,0.01,0.01,0.01,0.01,0.02l4.54,6.05c0.19,0.25,0.47,0.38,0.76,0.38c0.2,0,0.4-0.06,0.57-0.19c0.42-0.31,0.5-0.91,0.19-1.32 <g>
L3.84,8.91h10.22c0.52,0,0.95-0.42,0.95-0.95C15,7.44,14.58,7.01,14.05,7.01z"/> <path fill="#ED6B21" d="M48,106.5h43.43c17.13,0,31.07-13.94,31.07-31.07s-13.94-31.07-31.07-31.07H8c-1.38,0-2.5,1.12-2.5,2.5
s1.12,2.5,2.5,2.5h83.43c14.38,0,26.07,11.7,26.07,26.07s-11.7,26.07-26.07,26.07H48c-1.38,0-2.5,1.12-2.5,2.5
S46.62,106.5,48,106.5z"/>
</g>
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 952 B

Before After
Before After

View file

@ -0,0 +1,11 @@
#version 110
uniform vec4 uniform_color;
// x = tainted, y = specular;
varying vec2 intensity;
void main()
{
gl_FragColor = vec4(vec3(intensity.y, intensity.y, intensity.y) + uniform_color.rgb * intensity.x, uniform_color.a);
}

View file

@ -0,0 +1,38 @@
#version 110
#define INTENSITY_CORRECTION 0.6
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
#define LIGHT_TOP_DIFFUSE (0.8 * INTENSITY_CORRECTION)
#define LIGHT_TOP_SPECULAR (0.125 * INTENSITY_CORRECTION)
#define LIGHT_TOP_SHININESS 20.0
// normalized values for (1./1.43, 0.2/1.43, 1./1.43)
const vec3 LIGHT_FRONT_DIR = vec3(0.6985074, 0.1397015, 0.6985074);
#define LIGHT_FRONT_DIFFUSE (0.3 * INTENSITY_CORRECTION)
#define INTENSITY_AMBIENT 0.3
// x = tainted, y = specular;
varying vec2 intensity;
void main()
{
// First transform the normal into camera space and normalize the result.
vec3 normal = normalize(gl_NormalMatrix * gl_Normal);
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
// Since these two are normalized the cosine is the dot product. We also need to clamp the result to the [0,1] range.
float NdotL = max(dot(normal, LIGHT_TOP_DIR), 0.0);
intensity.x = INTENSITY_AMBIENT + NdotL * LIGHT_TOP_DIFFUSE;
vec3 position = (gl_ModelViewMatrix * gl_Vertex).xyz;
intensity.y = LIGHT_TOP_SPECULAR * pow(max(dot(-normalize(position), reflect(-LIGHT_TOP_DIR, normal)), 0.0), LIGHT_TOP_SHININESS);
// Perform the same lighting calculation for the 2nd light source (no specular applied).
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
gl_Position = ftransform();
}

View file

@ -0,0 +1,8 @@
#version 110
uniform vec4 uniform_color;
void main()
{
gl_FragColor = uniform_color;
}

View file

@ -0,0 +1,11 @@
#version 110
uniform float zoom;
uniform float point_size;
uniform float near_plane_height;
void main()
{
gl_Position = ftransform();
gl_PointSize = (gl_Position.w == 1.0) ? zoom * near_plane_height * point_size : near_plane_height * point_size / gl_Position.w;
}

View file

@ -0,0 +1,22 @@
// version 120 is needed for gl_PointCoord
#version 120
uniform vec4 uniform_color;
uniform float percent_outline_radius;
uniform float percent_center_radius;
vec4 calc_color(float radius, vec4 color)
{
return ((radius < percent_center_radius) || (radius > 1.0 - percent_outline_radius)) ?
vec4(0.5 * color.rgb, color.a) : color;
}
void main()
{
vec2 pos = (gl_PointCoord - 0.5) * 2.0;
float radius = length(pos);
if (radius > 1.0)
discard;
gl_FragColor = calc_color(radius, uniform_color);
}

View file

@ -0,0 +1,11 @@
#version 120
uniform float zoom;
uniform float point_size;
uniform float near_plane_height;
void main()
{
gl_Position = ftransform();
gl_PointSize = (gl_Position.w == 1.0) ? zoom * near_plane_height * point_size : near_plane_height * point_size / gl_Position.w;
}

View file

@ -0,0 +1,28 @@
#version 110
// normalized values for (-0.6/1.31, 0.6/1.31, 1./1.31)
const vec3 LIGHT_TOP_DIR = vec3(-0.4574957, 0.4574957, 0.7624929);
const vec3 LIGHT_FRONT_DIR = vec3(0.0, 0.0, 1.0);
// x = ambient, y = top diffuse, z = front diffuse, w = global
uniform vec4 light_intensity;
uniform vec4 uniform_color;
varying vec3 eye_normal;
void main()
{
vec3 normal = normalize(eye_normal);
// Compute the cos of the angle between the normal and lights direction. The light is directional so the direction is constant for every vertex.
// Since these two are normalized the cosine is the dot product. Take the abs value to light the lines no matter in which direction the normal points.
float NdotL = abs(dot(normal, LIGHT_TOP_DIR));
float intensity = light_intensity.x + NdotL * light_intensity.y;
// Perform the same lighting calculation for the 2nd light source.
NdotL = abs(dot(normal, LIGHT_FRONT_DIR));
intensity += NdotL * light_intensity.z;
gl_FragColor = vec4(uniform_color.rgb * light_intensity.w * intensity, uniform_color.a);
}

View file

@ -0,0 +1,19 @@
#version 110
varying vec3 eye_normal;
vec3 world_normal()
{
// the world normal is always parallel to the world XY plane
// the x component is stored into gl_Vertex.w
float x = gl_Vertex.w;
float y = sqrt(1.0 - x * x);
return vec3(x, y, 0.0);
}
void main()
{
vec4 world_position = vec4(gl_Vertex.xyz, 1.0);
gl_Position = gl_ModelViewProjectionMatrix * world_position;
eye_normal = gl_NormalMatrix * world_normal();
}

View file

@ -6,6 +6,7 @@ add_executable(opencsg_example WIN32
main.cpp main.cpp
Engine.hpp Engine.cpp Engine.hpp Engine.cpp
ShaderCSGDisplay.hpp ShaderCSGDisplay.cpp ShaderCSGDisplay.hpp ShaderCSGDisplay.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../../src/slic3r/GUI/Jobs/Job.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../../src/slic3r/GUI/ProgressStatusBar.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../src/slic3r/GUI/ProgressStatusBar.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../../src/slic3r/GUI/I18N.hpp ${CMAKE_CURRENT_SOURCE_DIR}/../../src/slic3r/GUI/I18N.hpp
${CMAKE_CURRENT_SOURCE_DIR}/../../src/slic3r/GUI/I18N.cpp) ${CMAKE_CURRENT_SOURCE_DIR}/../../src/slic3r/GUI/I18N.cpp)

View file

@ -26,7 +26,7 @@
#include "libslic3r/Format/3mf.hpp" #include "libslic3r/Format/3mf.hpp"
#include "libslic3r/SLAPrint.hpp" #include "libslic3r/SLAPrint.hpp"
#include "slic3r/GUI/Job.hpp" #include "slic3r/GUI/Jobs/Job.hpp"
#include "slic3r/GUI/ProgressStatusBar.hpp" #include "slic3r/GUI/ProgressStatusBar.hpp"
using namespace Slic3r::GL; using namespace Slic3r::GL;

View file

@ -92,6 +92,7 @@ endif()
# Create a slic3r executable # Create a slic3r executable
# Process mainfests for various platforms. # Process mainfests for various platforms.
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/msw/PrusaSlicer.rc.in ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer.rc @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/msw/PrusaSlicer.rc.in ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer.rc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/msw/PrusaSlicer-gcodeviewer.rc.in ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer-gcodeviewer.rc @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/msw/PrusaSlicer.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer.manifest @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/msw/PrusaSlicer.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer.manifest @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/osx/Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/platform/osx/Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist @ONLY)
if (WIN32) if (WIN32)
@ -105,9 +106,9 @@ if (MINGW)
set_target_properties(PrusaSlicer PROPERTIES PREFIX "") set_target_properties(PrusaSlicer PROPERTIES PREFIX "")
endif (MINGW) endif (MINGW)
if (NOT WIN32) if (NOT WIN32 AND NOT APPLE)
# Binary name on unix like systems (OSX, Linux) # Binary name on unix like systems (Linux, Unix)
set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer") set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
endif () endif ()
target_link_libraries(PrusaSlicer libslic3r cereal) target_link_libraries(PrusaSlicer libslic3r cereal)
@ -161,12 +162,22 @@ if (WIN32)
add_executable(PrusaSlicer_app_console PrusaSlicer_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer.rc) add_executable(PrusaSlicer_app_console PrusaSlicer_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer.rc)
# Generate debug symbols even in release mode. # Generate debug symbols even in release mode.
if (MSVC) if (MSVC)
target_link_options(PrusaSlicer_app_console PUBLIC "$<$<CONFIG:RELEASE>:/DEBUG>") target_link_options(PrusaSlicer_app_console PUBLIC "$<$<CONFIG:RELEASE>:/DEBUG>")
endif () endif ()
target_compile_definitions(PrusaSlicer_app_console PRIVATE -DSLIC3R_WRAPPER_CONSOLE) target_compile_definitions(PrusaSlicer_app_console PRIVATE -DSLIC3R_WRAPPER_CONSOLE)
add_dependencies(PrusaSlicer_app_console PrusaSlicer) add_dependencies(PrusaSlicer_app_console PrusaSlicer)
set_target_properties(PrusaSlicer_app_console PROPERTIES OUTPUT_NAME "prusa-slicer-console") set_target_properties(PrusaSlicer_app_console PROPERTIES OUTPUT_NAME "prusa-slicer-console")
target_link_libraries(PrusaSlicer_app_console PRIVATE boost_headeronly) target_link_libraries(PrusaSlicer_app_console PRIVATE boost_headeronly)
add_executable(PrusaSlicer_app_gcodeviewer WIN32 PrusaSlicer_app_msvc.cpp ${CMAKE_CURRENT_BINARY_DIR}/PrusaSlicer-gcodeviewer.rc)
# Generate debug symbols even in release mode.
if (MSVC)
target_link_options(PrusaSlicer_app_gcodeviewer PUBLIC "$<$<CONFIG:RELEASE>:/DEBUG>")
endif ()
target_compile_definitions(PrusaSlicer_app_gcodeviewer PRIVATE -DSLIC3R_WRAPPER_NOCONSOLE -DSLIC3R_WRAPPER_GCODEVIEWER)
add_dependencies(PrusaSlicer_app_gcodeviewer PrusaSlicer)
set_target_properties(PrusaSlicer_app_gcodeviewer PROPERTIES OUTPUT_NAME "prusa-gcodeviewer")
target_link_libraries(PrusaSlicer_app_gcodeviewer PRIVATE boost_headeronly)
endif () endif ()
# Link the resources dir to where Slic3r GUI expects it # Link the resources dir to where Slic3r GUI expects it
@ -198,20 +209,34 @@ if (WIN32)
add_custom_target(PrusaSlicerDllsCopy ALL DEPENDS PrusaSlicer) add_custom_target(PrusaSlicerDllsCopy ALL DEPENDS PrusaSlicer)
prusaslicer_copy_dlls(PrusaSlicerDllsCopy) prusaslicer_copy_dlls(PrusaSlicerDllsCopy)
elseif (XCODE)
# Because of Debug/Release/etc. configurations (similar to MSVC) the slic3r binary is located in an extra level
add_custom_command(TARGET PrusaSlicer POST_BUILD
COMMAND ln -sfn "${SLIC3R_RESOURCES_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/resources"
COMMENT "Symlinking the resources directory into the build tree"
VERBATIM
)
else () else ()
if (APPLE)
# On OSX, the name of the binary matches the name of the Application.
add_custom_command(TARGET PrusaSlicer POST_BUILD
COMMAND ln -sf PrusaSlicer prusa-slicer
COMMAND ln -sf PrusaSlicer prusa-gcodeviewer
COMMAND ln -sf PrusaSlicer PrusaGCodeViewer
WORKING_DIRECTORY "$<TARGET_FILE_DIR:PrusaSlicer>"
COMMENT "Symlinking the G-code viewer to PrusaSlicer, symlinking to prusa-slicer and prusa-gcodeviewer"
VERBATIM)
else ()
add_custom_command(TARGET PrusaSlicer POST_BUILD
COMMAND ln -sf prusa-slicer prusa-gcodeviewer
WORKING_DIRECTORY "$<TARGET_FILE_DIR:PrusaSlicer>"
COMMENT "Symlinking the G-code viewer to PrusaSlicer"
VERBATIM)
endif ()
if (XCODE)
# Because of Debug/Release/etc. configurations (similar to MSVC) the slic3r binary is located in an extra level
set(BIN_RESOURCES_DIR "${CMAKE_CURRENT_BINARY_DIR}/resources")
else ()
set(BIN_RESOURCES_DIR "${CMAKE_CURRENT_BINARY_DIR}/../resources")
endif ()
add_custom_command(TARGET PrusaSlicer POST_BUILD add_custom_command(TARGET PrusaSlicer POST_BUILD
COMMAND ln -sfn "${SLIC3R_RESOURCES_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/../resources" COMMAND ln -sfn "${SLIC3R_RESOURCES_DIR}" "${BIN_RESOURCES_DIR}"
COMMENT "Symlinking the resources directory into the build tree" COMMENT "Symlinking the resources directory into the build tree"
VERBATIM VERBATIM)
) endif ()
endif()
# Slic3r binary install target # Slic3r binary install target
if (WIN32) if (WIN32)

View file

@ -22,6 +22,7 @@
#include <cstring> #include <cstring>
#include <iostream> #include <iostream>
#include <math.h> #include <math.h>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/nowide/args.hpp> #include <boost/nowide/args.hpp>
#include <boost/nowide/cenv.hpp> #include <boost/nowide/cenv.hpp>
@ -44,6 +45,7 @@
#include "libslic3r/Format/OBJ.hpp" #include "libslic3r/Format/OBJ.hpp"
#include "libslic3r/Format/SL1.hpp" #include "libslic3r/Format/SL1.hpp"
#include "libslic3r/Utils.hpp" #include "libslic3r/Utils.hpp"
#include "libslic3r/AppConfig.hpp"
#include "PrusaSlicer.hpp" #include "PrusaSlicer.hpp"
@ -52,7 +54,6 @@
#include "slic3r/GUI/GUI_App.hpp" #include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/3DScene.hpp" #include "slic3r/GUI/3DScene.hpp"
#include "slic3r/GUI/InstanceCheck.hpp" #include "slic3r/GUI/InstanceCheck.hpp"
#include "slic3r/GUI/AppConfig.hpp"
#include "slic3r/GUI/MainFrame.hpp" #include "slic3r/GUI/MainFrame.hpp"
#include "slic3r/GUI/Plater.hpp" #include "slic3r/GUI/Plater.hpp"
#endif /* SLIC3R_GUI */ #endif /* SLIC3R_GUI */
@ -101,6 +102,13 @@ int CLI::run(int argc, char **argv)
std::find(m_transforms.begin(), m_transforms.end(), "cut") == m_transforms.end() && std::find(m_transforms.begin(), m_transforms.end(), "cut") == m_transforms.end() &&
std::find(m_transforms.begin(), m_transforms.end(), "cut_x") == m_transforms.end() && std::find(m_transforms.begin(), m_transforms.end(), "cut_x") == m_transforms.end() &&
std::find(m_transforms.begin(), m_transforms.end(), "cut_y") == m_transforms.end(); std::find(m_transforms.begin(), m_transforms.end(), "cut_y") == m_transforms.end();
bool start_as_gcodeviewer =
#ifdef _WIN32
false;
#else
// On Unix systems, the prusa-slicer binary may be symlinked to give the application a different meaning.
boost::algorithm::iends_with(boost::filesystem::path(argv[0]).filename().string(), "gcodeviewer");
#endif // _WIN32
const std::vector<std::string> &load_configs = m_config.option<ConfigOptionStrings>("load", true)->values; const std::vector<std::string> &load_configs = m_config.option<ConfigOptionStrings>("load", true)->values;
@ -132,37 +140,57 @@ int CLI::run(int argc, char **argv)
m_print_config.apply(config); m_print_config.apply(config);
} }
// Read input file(s) if any. #if ENABLE_GCODE_VIEWER
for (const std::string &file : m_input_files) { // are we starting as gcodeviewer ?
if (! boost::filesystem::exists(file)) { for (auto it = m_actions.begin(); it != m_actions.end(); ++it) {
boost::nowide::cerr << "No such file: " << file << std::endl; if (*it == "gcodeviewer") {
exit(1); start_gui = true;
start_as_gcodeviewer = true;
m_actions.erase(it);
break;
} }
Model model; }
try { #endif // ENABLE_GCODE_VIEWER
// When loading an AMF or 3MF, config is imported as well, including the printer technology.
DynamicPrintConfig config; // Read input file(s) if any.
model = Model::read_from_file(file, &config, true); #if ENABLE_GCODE_VIEWER
PrinterTechnology other_printer_technology = Slic3r::printer_technology(config); if (!start_as_gcodeviewer) {
if (printer_technology == ptUnknown) { #endif // ENABLE_GCODE_VIEWER
printer_technology = other_printer_technology; for (const std::string& file : m_input_files) {
} else if (printer_technology != other_printer_technology && other_printer_technology != ptUnknown) { if (!boost::filesystem::exists(file)) {
boost::nowide::cerr << "Mixing configurations for FFF and SLA technologies" << std::endl; boost::nowide::cerr << "No such file: " << file << std::endl;
exit(1);
}
Model model;
try {
// When loading an AMF or 3MF, config is imported as well, including the printer technology.
DynamicPrintConfig config;
model = Model::read_from_file(file, &config, true);
PrinterTechnology other_printer_technology = Slic3r::printer_technology(config);
if (printer_technology == ptUnknown) {
printer_technology = other_printer_technology;
}
else if (printer_technology != other_printer_technology && other_printer_technology != ptUnknown) {
boost::nowide::cerr << "Mixing configurations for FFF and SLA technologies" << std::endl;
return 1;
}
// config is applied to m_print_config before the current m_config values.
config += std::move(m_print_config);
m_print_config = std::move(config);
}
catch (std::exception& e) {
boost::nowide::cerr << file << ": " << e.what() << std::endl;
return 1; return 1;
} }
// config is applied to m_print_config before the current m_config values. if (model.objects.empty()) {
config += std::move(m_print_config); boost::nowide::cerr << "Error: file is empty: " << file << std::endl;
m_print_config = std::move(config); continue;
} catch (std::exception &e) { }
boost::nowide::cerr << file << ": " << e.what() << std::endl; m_models.push_back(model);
return 1;
} }
if (model.objects.empty()) { #if ENABLE_GCODE_VIEWER
boost::nowide::cerr << "Error: file is empty: " << file << std::endl;
continue;
}
m_models.push_back(model);
} }
#endif // ENABLE_GCODE_VIEWER
// Apply command line options to a more specific DynamicPrintConfig which provides normalize() // Apply command line options to a more specific DynamicPrintConfig which provides normalize()
// (command line options override --load files) // (command line options override --load files)
@ -469,7 +497,11 @@ int CLI::run(int argc, char **argv)
print->process(); print->process();
if (printer_technology == ptFFF) { if (printer_technology == ptFFF) {
// The outfile is processed by a PlaceholderParser. // The outfile is processed by a PlaceholderParser.
#if ENABLE_GCODE_VIEWER
outfile = fff_print.export_gcode(outfile, nullptr, nullptr);
#else
outfile = fff_print.export_gcode(outfile, nullptr); outfile = fff_print.export_gcode(outfile, nullptr);
#endif // ENABLE_GCODE_VIEWER
outfile_final = fff_print.print_statistics().finalize_output_path(outfile); outfile_final = fff_print.print_statistics().finalize_output_path(outfile);
} else { } else {
outfile = sla_print.output_filepath(outfile); outfile = sla_print.output_filepath(outfile);
@ -517,6 +549,11 @@ int CLI::run(int argc, char **argv)
<< " (" << print.total_extruded_volume()/1000 << "cm3)" << std::endl; << " (" << print.total_extruded_volume()/1000 << "cm3)" << std::endl;
*/ */
} }
#if !ENABLE_GCODE_VIEWER
} else if (opt_key == "gcodeviewer") {
start_gui = true;
start_as_gcodeviewer = true;
#endif // !ENABLE_GCODE_VIEWER
} else { } else {
boost::nowide::cerr << "error: option not supported yet: " << opt_key << std::endl; boost::nowide::cerr << "error: option not supported yet: " << opt_key << std::endl;
return 1; return 1;
@ -526,7 +563,11 @@ int CLI::run(int argc, char **argv)
if (start_gui) { if (start_gui) {
#ifdef SLIC3R_GUI #ifdef SLIC3R_GUI
// #ifdef USE_WX // #ifdef USE_WX
#if ENABLE_GCODE_VIEWER
GUI::GUI_App* gui = new GUI::GUI_App(start_as_gcodeviewer ? GUI::GUI_App::EAppMode::GCodeViewer : GUI::GUI_App::EAppMode::Editor);
#else
GUI::GUI_App *gui = new GUI::GUI_App(); GUI::GUI_App *gui = new GUI::GUI_App();
#endif // ENABLE_GCODE_VIEWER
bool gui_single_instance_setting = gui->app_config->get("single_instance") == "1"; bool gui_single_instance_setting = gui->app_config->get("single_instance") == "1";
if (Slic3r::instance_check(argc, argv, gui_single_instance_setting)) { if (Slic3r::instance_check(argc, argv, gui_single_instance_setting)) {
@ -536,28 +577,42 @@ int CLI::run(int argc, char **argv)
// gui->autosave = m_config.opt_string("autosave"); // gui->autosave = m_config.opt_string("autosave");
GUI::GUI_App::SetInstance(gui); GUI::GUI_App::SetInstance(gui);
#if ENABLE_GCODE_VIEWER
gui->CallAfter([gui, this, &load_configs, start_as_gcodeviewer] {
#else
gui->CallAfter([gui, this, &load_configs] { gui->CallAfter([gui, this, &load_configs] {
#endif // ENABLE_GCODE_VIEWER
if (!gui->initialized()) { if (!gui->initialized()) {
return; return;
} }
#if ENABLE_GCODE_VIEWER
if (start_as_gcodeviewer) {
if (!m_input_files.empty())
gui->plater()->load_gcode(wxString::FromUTF8(m_input_files[0].c_str()));
} else {
#endif // ENABLE_GCODE_VIEWER_AS
#if 0 #if 0
// Load the cummulative config over the currently active profiles. // Load the cummulative config over the currently active profiles.
//FIXME if multiple configs are loaded, only the last one will have an effect. //FIXME if multiple configs are loaded, only the last one will have an effect.
// We need to decide what to do about loading of separate presets (just print preset, just filament preset etc). // We need to decide what to do about loading of separate presets (just print preset, just filament preset etc).
// As of now only the full configs are supported here. // As of now only the full configs are supported here.
if (!m_print_config.empty()) if (!m_print_config.empty())
gui->mainframe->load_config(m_print_config); gui->mainframe->load_config(m_print_config);
#endif #endif
if (! load_configs.empty()) if (!load_configs.empty())
// Load the last config to give it a name at the UI. The name of the preset may be later // Load the last config to give it a name at the UI. The name of the preset may be later
// changed by loading an AMF or 3MF. // changed by loading an AMF or 3MF.
//FIXME this is not strictly correct, as one may pass a print/filament/printer profile here instead of a full config. //FIXME this is not strictly correct, as one may pass a print/filament/printer profile here instead of a full config.
gui->mainframe->load_config_file(load_configs.back()); gui->mainframe->load_config_file(load_configs.back());
// If loading a 3MF file, the config is loaded from the last one. // If loading a 3MF file, the config is loaded from the last one.
if (! m_input_files.empty()) if (!m_input_files.empty())
gui->plater()->load_files(m_input_files, true, true); gui->plater()->load_files(m_input_files, true, true);
if (! m_extra_config.empty()) if (!m_extra_config.empty())
gui->mainframe->load_config(m_extra_config); gui->mainframe->load_config(m_extra_config);
#if ENABLE_GCODE_VIEWER
}
#endif // ENABLE_GCODE_VIEWER
}); });
int result = wxEntry(argc, argv); int result = wxEntry(argc, argv);
return result; return result;

View file

@ -221,6 +221,11 @@ int wmain(int argc, wchar_t **argv)
std::vector<wchar_t*> argv_extended; std::vector<wchar_t*> argv_extended;
argv_extended.emplace_back(argv[0]); argv_extended.emplace_back(argv[0]);
#ifdef SLIC3R_WRAPPER_GCODEVIEWER
wchar_t gcodeviewer_param[] = L"--gcodeviewer";
argv_extended.emplace_back(gcodeviewer_param);
#endif /* SLIC3R_WRAPPER_GCODEVIEWER */
#ifdef SLIC3R_GUI #ifdef SLIC3R_GUI
// Here one may push some additional parameters based on the wrapper type. // Here one may push some additional parameters based on the wrapper type.
bool force_mesa = false; bool force_mesa = false;

View file

@ -48,9 +48,19 @@
#include <ostream> #include <ostream>
#include <functional> #include <functional>
#include <assert.h> #include <assert.h>
#include <Shiny/Shiny.h>
#include <libslic3r/Int128.hpp> #include <libslic3r/Int128.hpp>
// Profiling support using the Shiny intrusive profiler
//#define CLIPPERLIB_PROFILE
#if defined(SLIC3R_PROFILE) && defined(CLIPPERLIB_PROFILE)
#include <Shiny/Shiny.h>
#define CLIPPERLIB_PROFILE_FUNC() PROFILE_FUNC()
#define CLIPPERLIB_PROFILE_BLOCK(name) PROFILE_BLOCK(name)
#else
#define CLIPPERLIB_PROFILE_FUNC()
#define CLIPPERLIB_PROFILE_BLOCK(name)
#endif
#ifdef use_xyz #ifdef use_xyz
namespace ClipperLib_Z { namespace ClipperLib_Z {
#else /* use_xyz */ #else /* use_xyz */
@ -263,7 +273,7 @@ int PointInPolygon (const IntPoint &pt, OutPt *op)
// This is potentially very expensive! O(n^2)! // This is potentially very expensive! O(n^2)!
bool Poly2ContainsPoly1(OutPt *OutPt1, OutPt *OutPt2) bool Poly2ContainsPoly1(OutPt *OutPt1, OutPt *OutPt2)
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
OutPt* op = OutPt1; OutPt* op = OutPt1;
do do
{ {
@ -714,7 +724,7 @@ TEdge* ClipperBase::ProcessBound(TEdge* E, bool NextIsForward)
bool ClipperBase::AddPath(const Path &pg, PolyType PolyTyp, bool Closed) bool ClipperBase::AddPath(const Path &pg, PolyType PolyTyp, bool Closed)
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
// Remove duplicate end point from a closed input path. // Remove duplicate end point from a closed input path.
// Remove duplicate points from the end of the input path. // Remove duplicate points from the end of the input path.
int highI = (int)pg.size() -1; int highI = (int)pg.size() -1;
@ -738,7 +748,7 @@ bool ClipperBase::AddPath(const Path &pg, PolyType PolyTyp, bool Closed)
bool ClipperBase::AddPaths(const Paths &ppg, PolyType PolyTyp, bool Closed) bool ClipperBase::AddPaths(const Paths &ppg, PolyType PolyTyp, bool Closed)
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
std::vector<int> num_edges(ppg.size(), 0); std::vector<int> num_edges(ppg.size(), 0);
int num_edges_total = 0; int num_edges_total = 0;
for (size_t i = 0; i < ppg.size(); ++ i) { for (size_t i = 0; i < ppg.size(); ++ i) {
@ -780,7 +790,7 @@ bool ClipperBase::AddPaths(const Paths &ppg, PolyType PolyTyp, bool Closed)
bool ClipperBase::AddPathInternal(const Path &pg, int highI, PolyType PolyTyp, bool Closed, TEdge* edges) bool ClipperBase::AddPathInternal(const Path &pg, int highI, PolyType PolyTyp, bool Closed, TEdge* edges)
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
#ifdef use_lines #ifdef use_lines
if (!Closed && PolyTyp == ptClip) if (!Closed && PolyTyp == ptClip)
throw clipperException("AddPath: Open paths must be subject."); throw clipperException("AddPath: Open paths must be subject.");
@ -954,7 +964,7 @@ bool ClipperBase::AddPathInternal(const Path &pg, int highI, PolyType PolyTyp, b
void ClipperBase::Clear() void ClipperBase::Clear()
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
m_MinimaList.clear(); m_MinimaList.clear();
m_edges.clear(); m_edges.clear();
m_UseFullRange = false; m_UseFullRange = false;
@ -966,7 +976,7 @@ void ClipperBase::Clear()
// Sort the LML entries, initialize the left / right bound edges of each Local Minima. // Sort the LML entries, initialize the left / right bound edges of each Local Minima.
void ClipperBase::Reset() void ClipperBase::Reset()
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
if (m_MinimaList.empty()) return; //ie nothing to process if (m_MinimaList.empty()) return; //ie nothing to process
std::sort(m_MinimaList.begin(), m_MinimaList.end(), [](const LocalMinimum& lm1, const LocalMinimum& lm2){ return lm1.Y < lm2.Y; }); std::sort(m_MinimaList.begin(), m_MinimaList.end(), [](const LocalMinimum& lm1, const LocalMinimum& lm2){ return lm1.Y < lm2.Y; });
@ -995,7 +1005,7 @@ void ClipperBase::Reset()
// Returns (0,0,0,0) for an empty rectangle. // Returns (0,0,0,0) for an empty rectangle.
IntRect ClipperBase::GetBounds() IntRect ClipperBase::GetBounds()
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
IntRect result; IntRect result;
auto lm = m_MinimaList.begin(); auto lm = m_MinimaList.begin();
if (lm == m_MinimaList.end()) if (lm == m_MinimaList.end())
@ -1056,7 +1066,7 @@ Clipper::Clipper(int initOptions) :
void Clipper::Reset() void Clipper::Reset()
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
ClipperBase::Reset(); ClipperBase::Reset();
m_Scanbeam = std::priority_queue<cInt>(); m_Scanbeam = std::priority_queue<cInt>();
m_Maxima.clear(); m_Maxima.clear();
@ -1071,7 +1081,7 @@ void Clipper::Reset()
bool Clipper::Execute(ClipType clipType, Paths &solution, bool Clipper::Execute(ClipType clipType, Paths &solution,
PolyFillType subjFillType, PolyFillType clipFillType) PolyFillType subjFillType, PolyFillType clipFillType)
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
if (m_HasOpenPaths) if (m_HasOpenPaths)
throw clipperException("Error: PolyTree struct is needed for open path clipping."); throw clipperException("Error: PolyTree struct is needed for open path clipping.");
solution.resize(0); solution.resize(0);
@ -1089,7 +1099,7 @@ bool Clipper::Execute(ClipType clipType, Paths &solution,
bool Clipper::Execute(ClipType clipType, PolyTree& polytree, bool Clipper::Execute(ClipType clipType, PolyTree& polytree,
PolyFillType subjFillType, PolyFillType clipFillType) PolyFillType subjFillType, PolyFillType clipFillType)
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
m_SubjFillType = subjFillType; m_SubjFillType = subjFillType;
m_ClipFillType = clipFillType; m_ClipFillType = clipFillType;
m_ClipType = clipType; m_ClipType = clipType;
@ -1103,10 +1113,10 @@ bool Clipper::Execute(ClipType clipType, PolyTree& polytree,
bool Clipper::ExecuteInternal() bool Clipper::ExecuteInternal()
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
bool succeeded = true; bool succeeded = true;
try { try {
PROFILE_BLOCK(Clipper_ExecuteInternal_Process); CLIPPERLIB_PROFILE_BLOCK(Clipper_ExecuteInternal_Process);
Reset(); Reset();
if (m_MinimaList.empty()) return true; if (m_MinimaList.empty()) return true;
cInt botY = m_Scanbeam.top(); cInt botY = m_Scanbeam.top();
@ -1131,13 +1141,13 @@ bool Clipper::ExecuteInternal()
if (succeeded) if (succeeded)
{ {
PROFILE_BLOCK(Clipper_ExecuteInternal_Fix); CLIPPERLIB_PROFILE_BLOCK(Clipper_ExecuteInternal_Fix);
//fix orientations ... //fix orientations ...
//FIXME Vojtech: Does it not invalidate the loop hierarchy maintained as OutRec::FirstLeft pointers? //FIXME Vojtech: Does it not invalidate the loop hierarchy maintained as OutRec::FirstLeft pointers?
//FIXME Vojtech: The area is calculated with floats, it may not be numerically stable! //FIXME Vojtech: The area is calculated with floats, it may not be numerically stable!
{ {
PROFILE_BLOCK(Clipper_ExecuteInternal_Fix_orientations); CLIPPERLIB_PROFILE_BLOCK(Clipper_ExecuteInternal_Fix_orientations);
for (OutRec *outRec : m_PolyOuts) for (OutRec *outRec : m_PolyOuts)
if (outRec->Pts && !outRec->IsOpen && (outRec->IsHole ^ m_ReverseOutput) == (Area(*outRec) > 0)) if (outRec->Pts && !outRec->IsOpen && (outRec->IsHole ^ m_ReverseOutput) == (Area(*outRec) > 0))
ReversePolyPtLinks(outRec->Pts); ReversePolyPtLinks(outRec->Pts);
@ -1147,7 +1157,7 @@ bool Clipper::ExecuteInternal()
//unfortunately FixupOutPolygon() must be done after JoinCommonEdges() //unfortunately FixupOutPolygon() must be done after JoinCommonEdges()
{ {
PROFILE_BLOCK(Clipper_ExecuteInternal_Fix_fixup); CLIPPERLIB_PROFILE_BLOCK(Clipper_ExecuteInternal_Fix_fixup);
for (OutRec *outRec : m_PolyOuts) for (OutRec *outRec : m_PolyOuts)
if (outRec->Pts) { if (outRec->Pts) {
if (outRec->IsOpen) if (outRec->IsOpen)
@ -1401,7 +1411,7 @@ bool Clipper::IsContributing(const TEdge& edge) const
// Called from Clipper::InsertLocalMinimaIntoAEL() and Clipper::IntersectEdges(). // Called from Clipper::InsertLocalMinimaIntoAEL() and Clipper::IntersectEdges().
OutPt* Clipper::AddLocalMinPoly(TEdge *e1, TEdge *e2, const IntPoint &Pt) OutPt* Clipper::AddLocalMinPoly(TEdge *e1, TEdge *e2, const IntPoint &Pt)
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
OutPt* result; OutPt* result;
TEdge *e, *prevE; TEdge *e, *prevE;
if (IsHorizontal(*e2) || ( e1->Dx > e2->Dx )) if (IsHorizontal(*e2) || ( e1->Dx > e2->Dx ))
@ -1493,7 +1503,7 @@ void Clipper::CopyAELToSEL()
// Called from Clipper::ExecuteInternal() // Called from Clipper::ExecuteInternal()
void Clipper::InsertLocalMinimaIntoAEL(const cInt botY) void Clipper::InsertLocalMinimaIntoAEL(const cInt botY)
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
while (!m_MinimaList.empty() && m_MinimaList.back().Y == botY) while (!m_MinimaList.empty() && m_MinimaList.back().Y == botY)
{ {
TEdge* lb = m_MinimaList.back().LeftBound; TEdge* lb = m_MinimaList.back().LeftBound;
@ -2043,7 +2053,7 @@ OutPt* Clipper::GetLastOutPt(TEdge *e)
void Clipper::ProcessHorizontals() void Clipper::ProcessHorizontals()
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
TEdge* horzEdge = m_SortedEdges; TEdge* horzEdge = m_SortedEdges;
while(horzEdge) while(horzEdge)
{ {
@ -2414,7 +2424,7 @@ void Clipper::UpdateEdgeIntoAEL(TEdge *&e)
bool Clipper::ProcessIntersections(const cInt topY) bool Clipper::ProcessIntersections(const cInt topY)
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
if( !m_ActiveEdges ) return true; if( !m_ActiveEdges ) return true;
try { try {
BuildIntersectList(topY); BuildIntersectList(topY);
@ -2569,7 +2579,7 @@ void Clipper::DoMaxima(TEdge *e)
void Clipper::ProcessEdgesAtTopOfScanbeam(const cInt topY) void Clipper::ProcessEdgesAtTopOfScanbeam(const cInt topY)
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
TEdge* e = m_ActiveEdges; TEdge* e = m_ActiveEdges;
while( e ) while( e )
{ {
@ -3177,7 +3187,7 @@ bool Clipper::JoinPoints(Join *j, OutRec* outRec1, OutRec* outRec2)
// This is potentially very expensive! O(n^3)! // This is potentially very expensive! O(n^3)!
void Clipper::FixupFirstLefts1(OutRec* OldOutRec, OutRec* NewOutRec) const void Clipper::FixupFirstLefts1(OutRec* OldOutRec, OutRec* NewOutRec) const
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
//tests if NewOutRec contains the polygon before reassigning FirstLeft //tests if NewOutRec contains the polygon before reassigning FirstLeft
for (OutRec *outRec : m_PolyOuts) for (OutRec *outRec : m_PolyOuts)
{ {
@ -3201,7 +3211,7 @@ void Clipper::FixupFirstLefts2(OutRec* OldOutRec, OutRec* NewOutRec) const
void Clipper::JoinCommonEdges() void Clipper::JoinCommonEdges()
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
for (Join &join : m_Joins) for (Join &join : m_Joins)
{ {
OutRec *outRec1 = GetOutRec(join.OutPt1->Idx); OutRec *outRec1 = GetOutRec(join.OutPt1->Idx);
@ -3771,7 +3781,7 @@ void ClipperOffset::DoRound(int j, int k)
// http://www.angusj.com/delphi/clipper/documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/StrictlySimple.htm // http://www.angusj.com/delphi/clipper/documentation/Docs/Units/ClipperLib/Classes/Clipper/Properties/StrictlySimple.htm
void Clipper::DoSimplePolygons() void Clipper::DoSimplePolygons()
{ {
PROFILE_FUNC(); CLIPPERLIB_PROFILE_FUNC();
size_t i = 0; size_t i = 0;
while (i < m_PolyOuts.size()) while (i < m_PolyOuts.size())
{ {

View file

@ -108,12 +108,19 @@ namespace ImGui
const char ColorMarkerEnd = 0x3; // ETX const char ColorMarkerEnd = 0x3; // ETX
// Special ASCII characters are used here as an ikons markers // Special ASCII characters are used here as an ikons markers
const char PrintIconMarker = 0x4; const char PrintIconMarker = 0x4;
const char PrinterIconMarker = 0x5; const char PrinterIconMarker = 0x5;
const char PrinterSlaIconMarker = 0x6; const char PrinterSlaIconMarker = 0x6;
const char FilamentIconMarker = 0x7; const char FilamentIconMarker = 0x7;
const char MaterialIconMarker = 0x8; const char MaterialIconMarker = 0x8;
const char CloseIconMarker = 0xB;
const char CloseIconHoverMarker = 0xC;
// const char TimerDotMarker = 0xE;
// const char TimerDotEmptyMarker = 0xF;
const char MinimalizeMarker = 0xE;
const char MinimalizeHoverMarker = 0xF;
const char WarningMarker = 0x10;
const char ErrorMarker = 0x11;
// void MyFunction(const char* name, const MyMatrix44& v); // void MyFunction(const char* name, const MyMatrix44& v);
} }

View file

@ -1,661 +1,165 @@
GNU AFFERO GENERAL PUBLIC LICENSE GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 19 November 2007 Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
Preamble
This version of the GNU Lesser General Public License incorporates
The GNU Affero General Public License is a free, copyleft license for the terms and conditions of version 3 of the GNU General Public
software and other kinds of works, specifically designed to ensure License, supplemented by the additional permissions listed below.
cooperation with the community in the case of network server software.
0. Additional Definitions.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast, As used herein, "this License" refers to version 3 of the GNU Lesser
our General Public Licenses are intended to guarantee your freedom to General Public License, and the "GNU GPL" refers to version 3 of the GNU
share and change all versions of a program--to make sure it remains free General Public License.
software for all its users.
"The Library" refers to a covered work governed by this License,
When we speak of free software, we are referring to freedom, not other than an Application or a Combined Work as defined below.
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for An "Application" is any work that makes use of an interface provided
them if you wish), that you receive source code or can get it if you by the Library, but which is not otherwise based on the Library.
want it, that you can change the software or use pieces of it in new Defining a subclass of a class defined by the Library is deemed a mode
free programs, and that you know you can do these things. of using an interface provided by the Library.
Developers that use our General Public Licenses protect your rights A "Combined Work" is a work produced by combining or linking an
with two steps: (1) assert copyright on the software, and (2) offer Application with the Library. The particular version of the Library
you this License which gives you legal permission to copy, distribute with which the Combined Work was made is also called the "Linked
and/or modify the software. Version".
A secondary benefit of defending all users' freedom is that The "Minimal Corresponding Source" for a Combined Work means the
improvements made in alternate versions of the program, if they Corresponding Source for the Combined Work, excluding any source code
receive widespread use, become available for other developers to for portions of the Combined Work that, considered in isolation, are
incorporate. Many developers of free software are heartened and based on the Application, and not on the Linked Version.
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about. The "Corresponding Application Code" for a Combined Work means the
The GNU General Public License permits making a modified version and object code and/or source code for the Application, including any data
letting the public access it on a server without ever releasing its and utility programs needed for reproducing the Combined Work from the
source code to the public. Application, but excluding the System Libraries of the Combined Work.
The GNU Affero General Public License is designed specifically to 1. Exception to Section 3 of the GNU GPL.
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to You may convey a covered work under sections 3 and 4 of this License
provide the source code of the modified version running there to the without being bound by section 3 of the GNU GPL.
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source 2. Conveying Modified Versions.
code of the modified version.
If you modify a copy of the Library, and, in your modifications, a
An older license, called the Affero General Public License and facility refers to a function or data to be supplied by an Application
published by Affero, was designed to accomplish similar goals. This is that uses the facility (other than as an argument passed when the
a different license, not a version of the Affero GPL, but Affero has facility is invoked), then you may convey a copy of the modified
released a new version of the Affero GPL which permits relicensing under version:
this license.
a) under this License, provided that you make a good faith effort to
The precise terms and conditions for copying, distribution and ensure that, in the event an Application does not supply the
modification follow. function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
TERMS AND CONDITIONS
b) under the GNU GPL, with none of the additional permissions of
0. Definitions. this License applicable to that copy.
"This License" refers to version 3 of the GNU Affero General Public License. 3. Object Code Incorporating Material from Library Header Files.
"Copyright" also means copyright-like laws that apply to other kinds of The object code form of an Application may incorporate material from
works, such as semiconductor masks. a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
"The Program" refers to any copyrightable work licensed under this material is not limited to numerical parameters, data structure
License. Each licensee is addressed as "you". "Licensees" and layouts and accessors, or small macros, inline functions and templates
"recipients" may be individuals or organizations. (ten or fewer lines in length), you do both of the following:
To "modify" a work means to copy from or adapt all or part of the work a) Give prominent notice with each copy of the object code that the
in a fashion requiring copyright permission, other than the making of an Library is used in it and that the Library and its use are
exact copy. The resulting work is called a "modified version" of the covered by this License.
earlier work or a work "based on" the earlier work.
b) Accompany the object code with a copy of the GNU GPL and this license
A "covered work" means either the unmodified Program or a work based document.
on the Program.
4. Combined Works.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for You may convey a Combined Work under terms of your choice that,
infringement under applicable copyright law, except executing it on a taken together, effectively do not restrict modification of the
computer or modifying a private copy. Propagation includes copying, portions of the Library contained in the Combined Work and reverse
distribution (with or without modification), making available to the engineering for debugging such modifications, if you also do each of
public, and in some countries other activities as well. the following:
To "convey" a work means any kind of propagation that enables other a) Give prominent notice with each copy of the Combined Work that
parties to make or receive copies. Mere interaction with a user through the Library is used in it and that the Library and its use are
a computer network, with no transfer of a copy, is not conveying. covered by this License.
An interactive user interface displays "Appropriate Legal Notices" b) Accompany the Combined Work with a copy of the GNU GPL and this license
to the extent that it includes a convenient and prominently visible document.
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the c) For a Combined Work that displays copyright notices during
extent that warranties are provided), that licensees may convey the execution, include the copyright notice for the Library among
work under this License, and how to view a copy of this License. If these notices, as well as a reference directing the user to the
the interface presents a list of user commands or options, such as a copies of the GNU GPL and this license document.
menu, a prominent item in the list meets this criterion.
d) Do one of the following:
1. Source Code.
0) Convey the Minimal Corresponding Source under the terms of this
The "source code" for a work means the preferred form of the work License, and the Corresponding Application Code in a form
for making modifications to it. "Object code" means any non-source suitable for, and under terms that permit, the user to
form of a work. recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
A "Standard Interface" means an interface that either is an official manner specified by section 6 of the GNU GPL for conveying
standard defined by a recognized standards body, or, in the case of Corresponding Source.
interfaces specified for a particular programming language, one that
is widely used among developers working in that language. 1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
The "System Libraries" of an executable work include anything, other a copy of the Library already present on the user's computer
than the work as a whole, that (a) is included in the normal form of system, and (b) will operate properly with a modified version
packaging a Major Component, but which is not part of that Major of the Library that is interface-compatible with the Linked
Component, and (b) serves only to enable use of the work with that Version.
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A e) Provide Installation Information, but only if you would otherwise
"Major Component", in this context, means a major essential component be required to provide such information under section 6 of the
(kernel, window system, and so on) of the specific operating system GNU GPL, and only to the extent that such information is
(if any) on which the executable work runs, or a compiler used to necessary to install and execute a modified version of the
produce the work, or an object code interpreter used to run it. Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
The "Corresponding Source" for a work in object code form means all you use option 4d0, the Installation Information must accompany
the source code needed to generate, install, and (for an executable the Minimal Corresponding Source and Corresponding Application
work) run the object code and to modify the work, including scripts to Code. If you use option 4d1, you must provide the Installation
control those activities. However, it does not include the work's Information in the manner specified by section 6 of the GNU GPL
System Libraries, or general-purpose tools or generally available free for conveying Corresponding Source.)
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source 5. Combined Libraries.
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically You may place library facilities that are a work based on the
linked subprograms that the work is specifically designed to require, Library side by side in a single library together with other library
such as by intimate data communication or control flow between those facilities that are not Applications and are not covered by this
subprograms and other parts of the work. License, and convey such a combined library under terms of your
choice, if you do both of the following:
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding a) Accompany the combined library with a copy of the same work based
Source. on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
The Corresponding Source for a work in source code form is that
same work. b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
2. Basic Permissions. accompanying uncombined form of the same work.
All rights granted under this License are granted for the term of 6. Revised Versions of the GNU Lesser General Public License.
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited The Free Software Foundation may publish revised and/or new versions
permission to run the unmodified Program. The output from running a of the GNU Lesser General Public License from time to time. Such new
covered work is covered by this License only if the output, given its versions will be similar in spirit to the present version, but may
content, constitutes a covered work. This License acknowledges your differ in detail to address new problems or concerns.
rights of fair use or other equivalent, as provided by copyright law.
Each version is given a distinguishing version number. If the
You may make, run and propagate covered works that you do not Library as you received it specifies that a certain numbered version
convey, without conditions so long as your license otherwise remains of the GNU Lesser General Public License "or any later version"
in force. You may convey covered works to others for the sole purpose applies to it, you have the option of following the terms and
of having them make modifications exclusively for you, or provide you conditions either of that published version or of any later version
with facilities for running those works, provided that you comply with published by the Free Software Foundation. If the Library as you
the terms of this License in conveying all material for which you do received it does not specify a version number of the GNU Lesser
not control copyright. Those thus making or running the covered works General Public License, you may choose any version of the GNU Lesser
for you must do so exclusively on your behalf, under your direction General Public License ever published by the Free Software Foundation.
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you. If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
Conveying under any other circumstances is permitted solely under apply, that proxy's public statement of acceptance of any version is
the conditions stated below. Sublicensing is not allowed; section 10 permanent authorization for you to choose that version for the
makes it unnecessary. Library.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.

View file

@ -692,6 +692,40 @@ inline typename VectorType::Scalar squared_distance_to_indexed_triangle_set(
detail::squared_distance_to_indexed_triangle_set_recursive(distancer, size_t(0), Scalar(0), std::numeric_limits<Scalar>::infinity(), hit_idx_out, hit_point_out); detail::squared_distance_to_indexed_triangle_set_recursive(distancer, size_t(0), Scalar(0), std::numeric_limits<Scalar>::infinity(), hit_idx_out, hit_point_out);
} }
// Decides if exists some triangle in defined radius on a 3D indexed triangle set using a pre-built AABBTreeIndirect::Tree.
// Closest point to triangle test will be performed with the accuracy of VectorType::Scalar
// even if the triangle mesh and the AABB Tree are built with floats.
// Returns true if exists some triangle in defined radius, false otherwise.
template<typename VertexType, typename IndexedFaceType, typename TreeType, typename VectorType>
inline bool is_any_triangle_in_radius(
// Indexed triangle set - 3D vertices.
const std::vector<VertexType> &vertices,
// Indexed triangle set - triangular faces, references to vertices.
const std::vector<IndexedFaceType> &faces,
// AABBTreeIndirect::Tree over vertices & faces, bounding boxes built with the accuracy of vertices.
const TreeType &tree,
// Point to which the closest point on the indexed triangle set is searched for.
const VectorType &point,
// Maximum distance in which triangle is search for
typename VectorType::Scalar &max_distance)
{
using Scalar = typename VectorType::Scalar;
auto distancer = detail::IndexedTriangleSetDistancer<VertexType, IndexedFaceType, TreeType, VectorType>
{ vertices, faces, tree, point };
size_t hit_idx;
VectorType hit_point = VectorType::Ones() * (std::nan(""));
if(tree.empty())
{
return false;
}
detail::squared_distance_to_indexed_triangle_set_recursive(distancer, size_t(0), Scalar(0), max_distance, hit_idx, hit_point);
return hit_point.allFinite();
}
} // namespace AABBTreeIndirect } // namespace AABBTreeIndirect
} // namespace Slic3r } // namespace Slic3r

View file

@ -1,6 +1,7 @@
#include "libslic3r/libslic3r.h" #include "libslic3r/libslic3r.h"
#include "libslic3r/Utils.hpp" #include "libslic3r/Utils.hpp"
#include "AppConfig.hpp" #include "AppConfig.hpp"
#include "Exception.hpp"
#include <utility> #include <utility>
#include <vector> #include <vector>
@ -15,8 +16,8 @@
#include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/predicate.hpp>
#include <boost/format/format_fwd.hpp> #include <boost/format/format_fwd.hpp>
#include <wx/string.h> //#include <wx/string.h>
#include "I18N.hpp" //#include "I18N.hpp"
namespace Slic3r { namespace Slic3r {
@ -101,6 +102,9 @@ void AppConfig::set_defaults()
if (get("use_inches").empty()) if (get("use_inches").empty())
set("use_inches", "0"); set("use_inches", "0");
if (get("show_splash_screen").empty())
set("show_splash_screen", "1");
// Remove legacy window positions/sizes // Remove legacy window positions/sizes
erase("", "main_frame_maximized"); erase("", "main_frame_maximized");
erase("", "main_frame_pos"); erase("", "main_frame_pos");
@ -110,7 +114,7 @@ void AppConfig::set_defaults()
erase("", "object_settings_size"); erase("", "object_settings_size");
} }
void AppConfig::load() std::string AppConfig::load()
{ {
// 1) Read the complete config file into a boost::property_tree. // 1) Read the complete config file into a boost::property_tree.
namespace pt = boost::property_tree; namespace pt = boost::property_tree;
@ -120,10 +124,15 @@ void AppConfig::load()
pt::read_ini(ifs, tree); pt::read_ini(ifs, tree);
} catch (pt::ptree_error& ex) { } catch (pt::ptree_error& ex) {
// Error while parsing config file. We'll customize the error message and rethrow to be displayed. // Error while parsing config file. We'll customize the error message and rethrow to be displayed.
throw std::runtime_error( // ! But to avoid the use of _utf8 (related to use of wxWidgets)
// we will rethrow this exception from the place of load() call, if returned value wouldn't be empty
/*
throw Slic3r::RuntimeError(
_utf8(L("Error parsing PrusaSlicer config file, it is probably corrupted. " _utf8(L("Error parsing PrusaSlicer config file, it is probably corrupted. "
"Try to manually delete the file to recover from the error. Your user profiles will not be affected.")) + "Try to manually delete the file to recover from the error. Your user profiles will not be affected.")) +
"\n\n" + AppConfig::config_path() + "\n\n" + ex.what()); "\n\n" + AppConfig::config_path() + "\n\n" + ex.what());
*/
return ex.what();
} }
// 2) Parse the property_tree, extract the sections and key / value pairs. // 2) Parse the property_tree, extract the sections and key / value pairs.
@ -169,10 +178,16 @@ void AppConfig::load()
// Override missing or keys with their defaults. // Override missing or keys with their defaults.
this->set_defaults(); this->set_defaults();
m_dirty = false; m_dirty = false;
return "";
} }
void AppConfig::save() void AppConfig::save()
{ {
#if ENABLE_GCODE_VIEWER
if (!m_save_enabled)
return;
#endif // ENABLE_GCODE_VIEWER
// The config is first written to a file with a PID suffix and then moved // The config is first written to a file with a PID suffix and then moved
// to avoid race conditions with multiple instances of Slic3r // to avoid race conditions with multiple instances of Slic3r
const auto path = config_path(); const auto path = config_path();

View file

@ -18,6 +18,9 @@ public:
AppConfig() : AppConfig() :
m_dirty(false), m_dirty(false),
m_orig_version(Semver::invalid()), m_orig_version(Semver::invalid()),
#if ENABLE_GCODE_VIEWER
m_save_enabled(true),
#endif // ENABLE_GCODE_VIEWER
m_legacy_datadir(false) m_legacy_datadir(false)
{ {
this->reset(); this->reset();
@ -29,7 +32,8 @@ public:
void set_defaults(); void set_defaults();
// Load the slic3r.ini from a user profile directory (or a datadir, if configured). // Load the slic3r.ini from a user profile directory (or a datadir, if configured).
void load(); // return error string or empty strinf
std::string load();
// Store the slic3r.ini into a user profile directory (or a datadir, if configured). // Store the slic3r.ini into a user profile directory (or a datadir, if configured).
void save(); void save();
@ -156,6 +160,10 @@ public:
bool get_mouse_device_swap_yz(const std::string& name, bool& swap) const bool get_mouse_device_swap_yz(const std::string& name, bool& swap) const
{ return get_3dmouse_device_numeric_value(name, "swap_yz", swap); } { return get_3dmouse_device_numeric_value(name, "swap_yz", swap); }
#if ENABLE_GCODE_VIEWER
void enable_save(bool enable) { m_save_enabled = enable; }
#endif // ENABLE_GCODE_VIEWER
static const std::string SECTION_FILAMENTS; static const std::string SECTION_FILAMENTS;
static const std::string SECTION_MATERIALS; static const std::string SECTION_MATERIALS;
@ -182,6 +190,10 @@ private:
bool m_dirty; bool m_dirty;
// Original version found in the ini file before it was overwritten // Original version found in the ini file before it was overwritten
Semver m_orig_version; Semver m_orig_version;
#if ENABLE_GCODE_VIEWER
// Whether or not calls to save() should take effect
bool m_save_enabled;
#endif // ENABLE_GCODE_VIEWER
// Whether the existing version is before system profiles & configuration updating // Whether the existing version is before system profiles & configuration updating
bool m_legacy_datadir; bool m_legacy_datadir;
}; };

View file

@ -2,6 +2,7 @@
#define slic3r_BoundingBox_hpp_ #define slic3r_BoundingBox_hpp_
#include "libslic3r.h" #include "libslic3r.h"
#include "Exception.hpp"
#include "Point.hpp" #include "Point.hpp"
#include "Polygon.hpp" #include "Polygon.hpp"
@ -22,7 +23,7 @@ public:
{ {
if (points.empty()) { if (points.empty()) {
this->defined = false; this->defined = false;
// throw std::invalid_argument("Empty point set supplied to BoundingBoxBase constructor"); // throw Slic3r::InvalidArgument("Empty point set supplied to BoundingBoxBase constructor");
} else { } else {
typename std::vector<PointClass>::const_iterator it = points.begin(); typename std::vector<PointClass>::const_iterator it = points.begin();
this->min = *it; this->min = *it;
@ -68,7 +69,7 @@ public:
BoundingBox3Base(const std::vector<PointClass>& points) BoundingBox3Base(const std::vector<PointClass>& points)
{ {
if (points.empty()) if (points.empty())
throw std::invalid_argument("Empty point set supplied to BoundingBox3Base constructor"); throw Slic3r::InvalidArgument("Empty point set supplied to BoundingBox3Base constructor");
typename std::vector<PointClass>::const_iterator it = points.begin(); typename std::vector<PointClass>::const_iterator it = points.begin();
this->min = *it; this->min = *it;
this->max = *it; this->max = *it;
@ -192,6 +193,20 @@ inline BoundingBox3 scaled(const BoundingBoxf3 &bb) { return {scaled(bb.min), sc
inline BoundingBoxf unscaled(const BoundingBox &bb) { return {unscaled(bb.min), unscaled(bb.max)}; } inline BoundingBoxf unscaled(const BoundingBox &bb) { return {unscaled(bb.min), unscaled(bb.max)}; }
inline BoundingBoxf3 unscaled(const BoundingBox3 &bb) { return {unscaled(bb.min), unscaled(bb.max)}; } inline BoundingBoxf3 unscaled(const BoundingBox3 &bb) { return {unscaled(bb.min), unscaled(bb.max)}; }
template<class Tout, class Tin>
auto cast(const BoundingBoxBase<Tin> &b)
{
return BoundingBoxBase<Vec<3, Tout>>{b.min.template cast<Tout>(),
b.max.template cast<Tout>()};
}
template<class Tout, class Tin>
auto cast(const BoundingBox3Base<Tin> &b)
{
return BoundingBox3Base<Vec<3, Tout>>{b.min.template cast<Tout>(),
b.max.template cast<Tout>()};
}
} // namespace Slic3r } // namespace Slic3r
// Serialization through the Cereal library // Serialization through the Cereal library

View file

@ -46,6 +46,8 @@ add_library(libslic3r STATIC
Fill/Fill.hpp Fill/Fill.hpp
Fill/Fill3DHoneycomb.cpp Fill/Fill3DHoneycomb.cpp
Fill/Fill3DHoneycomb.hpp Fill/Fill3DHoneycomb.hpp
Fill/FillAdaptive.cpp
Fill/FillAdaptive.hpp
Fill/FillBase.cpp Fill/FillBase.cpp
Fill/FillBase.hpp Fill/FillBase.hpp
Fill/FillConcentric.cpp Fill/FillConcentric.cpp
@ -99,6 +101,8 @@ add_library(libslic3r STATIC
GCode/ToolOrdering.hpp GCode/ToolOrdering.hpp
GCode/WipeTower.cpp GCode/WipeTower.cpp
GCode/WipeTower.hpp GCode/WipeTower.hpp
GCode/GCodeProcessor.cpp
GCode/GCodeProcessor.hpp
GCode.cpp GCode.cpp
GCode.hpp GCode.hpp
GCodeReader.cpp GCodeReader.cpp
@ -147,6 +151,12 @@ add_library(libslic3r STATIC
PolygonTrimmer.hpp PolygonTrimmer.hpp
Polyline.cpp Polyline.cpp
Polyline.hpp Polyline.hpp
Preset.cpp
Preset.hpp
PresetBundle.cpp
PresetBundle.hpp
AppConfig.cpp
AppConfig.hpp
Print.cpp Print.cpp
Print.hpp Print.hpp
PrintBase.cpp PrintBase.cpp
@ -155,6 +165,8 @@ add_library(libslic3r STATIC
PrintConfig.hpp PrintConfig.hpp
PrintObject.cpp PrintObject.cpp
PrintRegion.cpp PrintRegion.cpp
PNGRead.hpp
PNGRead.cpp
Semver.cpp Semver.cpp
ShortestPath.cpp ShortestPath.cpp
ShortestPath.hpp ShortestPath.hpp
@ -187,6 +199,8 @@ add_library(libslic3r STATIC
Utils.hpp Utils.hpp
Time.cpp Time.cpp
Time.hpp Time.hpp
TriangleSelector.cpp
TriangleSelector.hpp
MTUtils.hpp MTUtils.hpp
VoronoiOffset.cpp VoronoiOffset.cpp
VoronoiOffset.hpp VoronoiOffset.hpp
@ -201,12 +215,15 @@ add_library(libslic3r STATIC
SimplifyMeshImpl.hpp SimplifyMeshImpl.hpp
SimplifyMesh.cpp SimplifyMesh.cpp
MarchingSquares.hpp MarchingSquares.hpp
Optimize/Optimizer.hpp
Optimize/NLoptOptimizer.hpp
Optimize/BruteforceOptimizer.hpp
${OpenVDBUtils_SOURCES} ${OpenVDBUtils_SOURCES}
SLA/Common.hpp
SLA/Common.cpp
SLA/Pad.hpp SLA/Pad.hpp
SLA/Pad.cpp SLA/Pad.cpp
SLA/SupportTreeBuilder.hpp SLA/SupportTreeBuilder.hpp
SLA/SupportTreeMesher.hpp
SLA/SupportTreeMesher.cpp
SLA/SupportTreeBuildsteps.hpp SLA/SupportTreeBuildsteps.hpp
SLA/SupportTreeBuildsteps.cpp SLA/SupportTreeBuildsteps.cpp
SLA/SupportTreeBuilder.cpp SLA/SupportTreeBuilder.cpp
@ -218,6 +235,7 @@ add_library(libslic3r STATIC
SLA/Rotfinder.cpp SLA/Rotfinder.cpp
SLA/BoostAdapter.hpp SLA/BoostAdapter.hpp
SLA/SpatIndex.hpp SLA/SpatIndex.hpp
SLA/SpatIndex.cpp
SLA/RasterBase.hpp SLA/RasterBase.hpp
SLA/RasterBase.cpp SLA/RasterBase.cpp
SLA/AGGRaster.hpp SLA/AGGRaster.hpp
@ -233,8 +251,10 @@ add_library(libslic3r STATIC
SLA/SupportPointGenerator.cpp SLA/SupportPointGenerator.cpp
SLA/Contour3D.hpp SLA/Contour3D.hpp
SLA/Contour3D.cpp SLA/Contour3D.cpp
SLA/EigenMesh3D.hpp SLA/IndexedMesh.hpp
SLA/IndexedMesh.cpp
SLA/Clustering.hpp SLA/Clustering.hpp
SLA/Clustering.cpp
SLA/ReprojectPointsOnMesh.hpp SLA/ReprojectPointsOnMesh.hpp
) )
@ -296,6 +316,8 @@ target_link_libraries(libslic3r
TBB::tbb TBB::tbb
libslic3r_cgal libslic3r_cgal
${CMAKE_DL_LIBS} ${CMAKE_DL_LIBS}
PNG::PNG
ZLIB::ZLIB
) )
if (TARGET OpenVDB::openvdb) if (TARGET OpenVDB::openvdb)

View file

@ -8,7 +8,16 @@
#include "SVG.hpp" #include "SVG.hpp"
#endif /* CLIPPER_UTILS_DEBUG */ #endif /* CLIPPER_UTILS_DEBUG */
#include <Shiny/Shiny.h> // Profiling support using the Shiny intrusive profiler
//#define CLIPPER_UTILS_PROFILE
#if defined(SLIC3R_PROFILE) && defined(CLIPPER_UTILS_PROFILE)
#include <Shiny/Shiny.h>
#define CLIPPERUTILS_PROFILE_FUNC() PROFILE_FUNC()
#define CLIPPERUTILS_PROFILE_BLOCK(name) PROFILE_BLOCK(name)
#else
#define CLIPPERUTILS_PROFILE_FUNC()
#define CLIPPERUTILS_PROFILE_BLOCK(name)
#endif
#define CLIPPER_OFFSET_SHORTEST_EDGE_FACTOR (0.005f) #define CLIPPER_OFFSET_SHORTEST_EDGE_FACTOR (0.005f)
@ -50,7 +59,7 @@ err:
void scaleClipperPolygon(ClipperLib::Path &polygon) void scaleClipperPolygon(ClipperLib::Path &polygon)
{ {
PROFILE_FUNC(); CLIPPERUTILS_PROFILE_FUNC();
for (ClipperLib::Path::iterator pit = polygon.begin(); pit != polygon.end(); ++pit) { for (ClipperLib::Path::iterator pit = polygon.begin(); pit != polygon.end(); ++pit) {
pit->X <<= CLIPPER_OFFSET_POWER_OF_2; pit->X <<= CLIPPER_OFFSET_POWER_OF_2;
pit->Y <<= CLIPPER_OFFSET_POWER_OF_2; pit->Y <<= CLIPPER_OFFSET_POWER_OF_2;
@ -59,7 +68,7 @@ void scaleClipperPolygon(ClipperLib::Path &polygon)
void scaleClipperPolygons(ClipperLib::Paths &polygons) void scaleClipperPolygons(ClipperLib::Paths &polygons)
{ {
PROFILE_FUNC(); CLIPPERUTILS_PROFILE_FUNC();
for (ClipperLib::Paths::iterator it = polygons.begin(); it != polygons.end(); ++it) for (ClipperLib::Paths::iterator it = polygons.begin(); it != polygons.end(); ++it)
for (ClipperLib::Path::iterator pit = (*it).begin(); pit != (*it).end(); ++pit) { for (ClipperLib::Path::iterator pit = (*it).begin(); pit != (*it).end(); ++pit) {
pit->X <<= CLIPPER_OFFSET_POWER_OF_2; pit->X <<= CLIPPER_OFFSET_POWER_OF_2;
@ -69,7 +78,7 @@ void scaleClipperPolygons(ClipperLib::Paths &polygons)
void unscaleClipperPolygon(ClipperLib::Path &polygon) void unscaleClipperPolygon(ClipperLib::Path &polygon)
{ {
PROFILE_FUNC(); CLIPPERUTILS_PROFILE_FUNC();
for (ClipperLib::Path::iterator pit = polygon.begin(); pit != polygon.end(); ++pit) { for (ClipperLib::Path::iterator pit = polygon.begin(); pit != polygon.end(); ++pit) {
pit->X += CLIPPER_OFFSET_SCALE_ROUNDING_DELTA; pit->X += CLIPPER_OFFSET_SCALE_ROUNDING_DELTA;
pit->Y += CLIPPER_OFFSET_SCALE_ROUNDING_DELTA; pit->Y += CLIPPER_OFFSET_SCALE_ROUNDING_DELTA;
@ -80,7 +89,7 @@ void unscaleClipperPolygon(ClipperLib::Path &polygon)
void unscaleClipperPolygons(ClipperLib::Paths &polygons) void unscaleClipperPolygons(ClipperLib::Paths &polygons)
{ {
PROFILE_FUNC(); CLIPPERUTILS_PROFILE_FUNC();
for (ClipperLib::Paths::iterator it = polygons.begin(); it != polygons.end(); ++it) for (ClipperLib::Paths::iterator it = polygons.begin(); it != polygons.end(); ++it)
for (ClipperLib::Path::iterator pit = (*it).begin(); pit != (*it).end(); ++pit) { for (ClipperLib::Path::iterator pit = (*it).begin(); pit != (*it).end(); ++pit) {
pit->X += CLIPPER_OFFSET_SCALE_ROUNDING_DELTA; pit->X += CLIPPER_OFFSET_SCALE_ROUNDING_DELTA;
@ -790,7 +799,7 @@ ExPolygons simplify_polygons_ex(const Polygons &subject, bool preserve_collinear
void safety_offset(ClipperLib::Paths* paths) void safety_offset(ClipperLib::Paths* paths)
{ {
PROFILE_FUNC(); CLIPPERUTILS_PROFILE_FUNC();
// scale input // scale input
scaleClipperPolygons(*paths); scaleClipperPolygons(*paths);
@ -812,11 +821,11 @@ void safety_offset(ClipperLib::Paths* paths)
if (! ccw) if (! ccw)
std::reverse(path.begin(), path.end()); std::reverse(path.begin(), path.end());
{ {
PROFILE_BLOCK(safety_offset_AddPaths); CLIPPERUTILS_PROFILE_BLOCK(safety_offset_AddPaths);
co.AddPath((*paths)[i], ClipperLib::jtMiter, ClipperLib::etClosedPolygon); co.AddPath((*paths)[i], ClipperLib::jtMiter, ClipperLib::etClosedPolygon);
} }
{ {
PROFILE_BLOCK(safety_offset_Execute); CLIPPERUTILS_PROFILE_BLOCK(safety_offset_Execute);
// offset outside by 10um // offset outside by 10um
ClipperLib::Paths out_this; ClipperLib::Paths out_this;
co.Execute(out_this, ccw ? 10.f * float(CLIPPER_OFFSET_SCALE) : -10.f * float(CLIPPER_OFFSET_SCALE)); co.Execute(out_this, ccw ? 10.f * float(CLIPPER_OFFSET_SCALE) : -10.f * float(CLIPPER_OFFSET_SCALE));

View file

@ -5,7 +5,6 @@
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
#include <exception> // std::runtime_error
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/classification.hpp> #include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/erase.hpp> #include <boost/algorithm/string/erase.hpp>
@ -218,7 +217,7 @@ ConfigOption* ConfigOptionDef::create_empty_option() const
case coInts: return new ConfigOptionIntsNullable(); case coInts: return new ConfigOptionIntsNullable();
case coPercents: return new ConfigOptionPercentsNullable(); case coPercents: return new ConfigOptionPercentsNullable();
case coBools: return new ConfigOptionBoolsNullable(); case coBools: return new ConfigOptionBoolsNullable();
default: throw std::runtime_error(std::string("Unknown option type for nullable option ") + this->label); default: throw Slic3r::RuntimeError(std::string("Unknown option type for nullable option ") + this->label);
} }
} else { } else {
switch (this->type) { switch (this->type) {
@ -238,7 +237,7 @@ ConfigOption* ConfigOptionDef::create_empty_option() const
case coBool: return new ConfigOptionBool(); case coBool: return new ConfigOptionBool();
case coBools: return new ConfigOptionBools(); case coBools: return new ConfigOptionBools();
case coEnum: return new ConfigOptionEnumGeneric(this->enum_keys_map); case coEnum: return new ConfigOptionEnumGeneric(this->enum_keys_map);
default: throw std::runtime_error(std::string("Unknown option type for option ") + this->label); default: throw Slic3r::RuntimeError(std::string("Unknown option type for option ") + this->label);
} }
} }
} }
@ -535,7 +534,7 @@ double ConfigBase::get_abs_value(const t_config_option_key &opt_key) const
return opt_def->ratio_over.empty() ? 0. : return opt_def->ratio_over.empty() ? 0. :
static_cast<const ConfigOptionFloatOrPercent*>(raw_opt)->get_abs_value(this->get_abs_value(opt_def->ratio_over)); static_cast<const ConfigOptionFloatOrPercent*>(raw_opt)->get_abs_value(this->get_abs_value(opt_def->ratio_over));
} }
throw std::runtime_error("ConfigBase::get_abs_value(): Not a valid option type for get_abs_value()"); throw Slic3r::RuntimeError("ConfigBase::get_abs_value(): Not a valid option type for get_abs_value()");
} }
// Return an absolute value of a possibly relative config variable. // Return an absolute value of a possibly relative config variable.
@ -546,7 +545,7 @@ double ConfigBase::get_abs_value(const t_config_option_key &opt_key, double rati
const ConfigOption *raw_opt = this->option(opt_key); const ConfigOption *raw_opt = this->option(opt_key);
assert(raw_opt != nullptr); assert(raw_opt != nullptr);
if (raw_opt->type() != coFloatOrPercent) if (raw_opt->type() != coFloatOrPercent)
throw std::runtime_error("ConfigBase::get_abs_value(): opt_key is not of coFloatOrPercent"); throw Slic3r::RuntimeError("ConfigBase::get_abs_value(): opt_key is not of coFloatOrPercent");
// Compute absolute value. // Compute absolute value.
return static_cast<const ConfigOptionFloatOrPercent*>(raw_opt)->get_abs_value(ratio_over); return static_cast<const ConfigOptionFloatOrPercent*>(raw_opt)->get_abs_value(ratio_over);
} }
@ -609,7 +608,7 @@ void ConfigBase::load_from_gcode_file(const std::string &file)
std::getline(ifs, firstline); std::getline(ifs, firstline);
if (strncmp(slic3r_gcode_header, firstline.c_str(), strlen(slic3r_gcode_header)) != 0 && if (strncmp(slic3r_gcode_header, firstline.c_str(), strlen(slic3r_gcode_header)) != 0 &&
strncmp(prusaslicer_gcode_header, firstline.c_str(), strlen(prusaslicer_gcode_header)) != 0) strncmp(prusaslicer_gcode_header, firstline.c_str(), strlen(prusaslicer_gcode_header)) != 0)
throw std::runtime_error("Not a PrusaSlicer / Slic3r PE generated g-code."); throw Slic3r::RuntimeError("Not a PrusaSlicer / Slic3r PE generated g-code.");
} }
ifs.seekg(0, ifs.end); ifs.seekg(0, ifs.end);
auto file_length = ifs.tellg(); auto file_length = ifs.tellg();
@ -621,7 +620,7 @@ void ConfigBase::load_from_gcode_file(const std::string &file)
size_t key_value_pairs = load_from_gcode_string(data.data()); size_t key_value_pairs = load_from_gcode_string(data.data());
if (key_value_pairs < 80) if (key_value_pairs < 80)
throw std::runtime_error(format("Suspiciously low number of configuration values extracted from %1%: %2%", file, key_value_pairs)); throw Slic3r::RuntimeError(format("Suspiciously low number of configuration values extracted from %1%: %2%", file, key_value_pairs));
} }
// Load the config keys from the given string. // Load the config keys from the given string.
@ -750,7 +749,7 @@ ConfigOption* DynamicConfig::optptr(const t_config_option_key &opt_key, bool cre
throw NoDefinitionException(opt_key); throw NoDefinitionException(opt_key);
const ConfigOptionDef *optdef = def->get(opt_key); const ConfigOptionDef *optdef = def->get(opt_key);
if (optdef == nullptr) if (optdef == nullptr)
// throw std::runtime_error(std::string("Invalid option name: ") + opt_key); // throw Slic3r::RuntimeError(std::string("Invalid option name: ") + opt_key);
// Let the parent decide what to do if the opt_key is not defined by this->def(). // Let the parent decide what to do if the opt_key is not defined by this->def().
return nullptr; return nullptr;
ConfigOption *opt = optdef->create_default_option(); ConfigOption *opt = optdef->create_default_option();

View file

@ -13,6 +13,7 @@
#include <vector> #include <vector>
#include "libslic3r.h" #include "libslic3r.h"
#include "clonable_ptr.hpp" #include "clonable_ptr.hpp"
#include "Exception.hpp"
#include "Point.hpp" #include "Point.hpp"
#include <boost/algorithm/string/trim.hpp> #include <boost/algorithm/string/trim.hpp>
@ -34,31 +35,31 @@ extern bool unescape_string_cstyle(const std::string &str, std::string &
extern bool unescape_strings_cstyle(const std::string &str, std::vector<std::string> &out); extern bool unescape_strings_cstyle(const std::string &str, std::vector<std::string> &out);
/// Specialization of std::exception to indicate that an unknown config option has been encountered. /// Specialization of std::exception to indicate that an unknown config option has been encountered.
class UnknownOptionException : public std::runtime_error { class UnknownOptionException : public Slic3r::RuntimeError {
public: public:
UnknownOptionException() : UnknownOptionException() :
std::runtime_error("Unknown option exception") {} Slic3r::RuntimeError("Unknown option exception") {}
UnknownOptionException(const std::string &opt_key) : UnknownOptionException(const std::string &opt_key) :
std::runtime_error(std::string("Unknown option exception: ") + opt_key) {} Slic3r::RuntimeError(std::string("Unknown option exception: ") + opt_key) {}
}; };
/// Indicate that the ConfigBase derived class does not provide config definition (the method def() returns null). /// Indicate that the ConfigBase derived class does not provide config definition (the method def() returns null).
class NoDefinitionException : public std::runtime_error class NoDefinitionException : public Slic3r::RuntimeError
{ {
public: public:
NoDefinitionException() : NoDefinitionException() :
std::runtime_error("No definition exception") {} Slic3r::RuntimeError("No definition exception") {}
NoDefinitionException(const std::string &opt_key) : NoDefinitionException(const std::string &opt_key) :
std::runtime_error(std::string("No definition exception: ") + opt_key) {} Slic3r::RuntimeError(std::string("No definition exception: ") + opt_key) {}
}; };
/// Indicate that an unsupported accessor was called on a config option. /// Indicate that an unsupported accessor was called on a config option.
class BadOptionTypeException : public std::runtime_error class BadOptionTypeException : public Slic3r::RuntimeError
{ {
public: public:
BadOptionTypeException() : std::runtime_error("Bad option type exception") {} BadOptionTypeException() : Slic3r::RuntimeError("Bad option type exception") {}
BadOptionTypeException(const std::string &message) : std::runtime_error(message) {} BadOptionTypeException(const std::string &message) : Slic3r::RuntimeError(message) {}
BadOptionTypeException(const char* message) : std::runtime_error(message) {} BadOptionTypeException(const char* message) : Slic3r::RuntimeError(message) {}
}; };
// Type of a configuration value. // Type of a configuration value.
@ -167,7 +168,7 @@ public:
void set(const ConfigOption *rhs) override void set(const ConfigOption *rhs) override
{ {
if (rhs->type() != this->type()) if (rhs->type() != this->type())
throw std::runtime_error("ConfigOptionSingle: Assigning an incompatible type"); throw Slic3r::RuntimeError("ConfigOptionSingle: Assigning an incompatible type");
assert(dynamic_cast<const ConfigOptionSingle<T>*>(rhs)); assert(dynamic_cast<const ConfigOptionSingle<T>*>(rhs));
this->value = static_cast<const ConfigOptionSingle<T>*>(rhs)->value; this->value = static_cast<const ConfigOptionSingle<T>*>(rhs)->value;
} }
@ -175,7 +176,7 @@ public:
bool operator==(const ConfigOption &rhs) const override bool operator==(const ConfigOption &rhs) const override
{ {
if (rhs.type() != this->type()) if (rhs.type() != this->type())
throw std::runtime_error("ConfigOptionSingle: Comparing incompatible types"); throw Slic3r::RuntimeError("ConfigOptionSingle: Comparing incompatible types");
assert(dynamic_cast<const ConfigOptionSingle<T>*>(&rhs)); assert(dynamic_cast<const ConfigOptionSingle<T>*>(&rhs));
return this->value == static_cast<const ConfigOptionSingle<T>*>(&rhs)->value; return this->value == static_cast<const ConfigOptionSingle<T>*>(&rhs)->value;
} }
@ -239,7 +240,7 @@ public:
void set(const ConfigOption *rhs) override void set(const ConfigOption *rhs) override
{ {
if (rhs->type() != this->type()) if (rhs->type() != this->type())
throw std::runtime_error("ConfigOptionVector: Assigning an incompatible type"); throw Slic3r::RuntimeError("ConfigOptionVector: Assigning an incompatible type");
assert(dynamic_cast<const ConfigOptionVector<T>*>(rhs)); assert(dynamic_cast<const ConfigOptionVector<T>*>(rhs));
this->values = static_cast<const ConfigOptionVector<T>*>(rhs)->values; this->values = static_cast<const ConfigOptionVector<T>*>(rhs)->values;
} }
@ -256,12 +257,12 @@ public:
if (opt->type() == this->type()) { if (opt->type() == this->type()) {
auto other = static_cast<const ConfigOptionVector<T>*>(opt); auto other = static_cast<const ConfigOptionVector<T>*>(opt);
if (other->values.empty()) if (other->values.empty())
throw std::runtime_error("ConfigOptionVector::set(): Assigning from an empty vector"); throw Slic3r::RuntimeError("ConfigOptionVector::set(): Assigning from an empty vector");
this->values.emplace_back(other->values.front()); this->values.emplace_back(other->values.front());
} else if (opt->type() == this->scalar_type()) } else if (opt->type() == this->scalar_type())
this->values.emplace_back(static_cast<const ConfigOptionSingle<T>*>(opt)->value); this->values.emplace_back(static_cast<const ConfigOptionSingle<T>*>(opt)->value);
else else
throw std::runtime_error("ConfigOptionVector::set():: Assigning an incompatible type"); throw Slic3r::RuntimeError("ConfigOptionVector::set():: Assigning an incompatible type");
} }
} }
@ -280,12 +281,12 @@ public:
// Assign the first value of the rhs vector. // Assign the first value of the rhs vector.
auto other = static_cast<const ConfigOptionVector<T>*>(rhs); auto other = static_cast<const ConfigOptionVector<T>*>(rhs);
if (other->values.empty()) if (other->values.empty())
throw std::runtime_error("ConfigOptionVector::set_at(): Assigning from an empty vector"); throw Slic3r::RuntimeError("ConfigOptionVector::set_at(): Assigning from an empty vector");
this->values[i] = other->get_at(j); this->values[i] = other->get_at(j);
} else if (rhs->type() == this->scalar_type()) } else if (rhs->type() == this->scalar_type())
this->values[i] = static_cast<const ConfigOptionSingle<T>*>(rhs)->value; this->values[i] = static_cast<const ConfigOptionSingle<T>*>(rhs)->value;
else else
throw std::runtime_error("ConfigOptionVector::set_at(): Assigning an incompatible type"); throw Slic3r::RuntimeError("ConfigOptionVector::set_at(): Assigning an incompatible type");
} }
const T& get_at(size_t i) const const T& get_at(size_t i) const
@ -310,9 +311,9 @@ public:
else if (n > this->values.size()) { else if (n > this->values.size()) {
if (this->values.empty()) { if (this->values.empty()) {
if (opt_default == nullptr) if (opt_default == nullptr)
throw std::runtime_error("ConfigOptionVector::resize(): No default value provided."); throw Slic3r::RuntimeError("ConfigOptionVector::resize(): No default value provided.");
if (opt_default->type() != this->type()) if (opt_default->type() != this->type())
throw std::runtime_error("ConfigOptionVector::resize(): Extending with an incompatible type."); throw Slic3r::RuntimeError("ConfigOptionVector::resize(): Extending with an incompatible type.");
this->values.resize(n, static_cast<const ConfigOptionVector<T>*>(opt_default)->values.front()); this->values.resize(n, static_cast<const ConfigOptionVector<T>*>(opt_default)->values.front());
} else { } else {
// Resize by duplicating the last value. // Resize by duplicating the last value.
@ -329,7 +330,7 @@ public:
bool operator==(const ConfigOption &rhs) const override bool operator==(const ConfigOption &rhs) const override
{ {
if (rhs.type() != this->type()) if (rhs.type() != this->type())
throw std::runtime_error("ConfigOptionVector: Comparing incompatible types"); throw Slic3r::RuntimeError("ConfigOptionVector: Comparing incompatible types");
assert(dynamic_cast<const ConfigOptionVector<T>*>(&rhs)); assert(dynamic_cast<const ConfigOptionVector<T>*>(&rhs));
return this->values == static_cast<const ConfigOptionVector<T>*>(&rhs)->values; return this->values == static_cast<const ConfigOptionVector<T>*>(&rhs)->values;
} }
@ -341,9 +342,9 @@ public:
// An option overrides another option if it is not nil and not equal. // An option overrides another option if it is not nil and not equal.
bool overriden_by(const ConfigOption *rhs) const override { bool overriden_by(const ConfigOption *rhs) const override {
if (this->nullable()) if (this->nullable())
throw std::runtime_error("Cannot override a nullable ConfigOption."); throw Slic3r::RuntimeError("Cannot override a nullable ConfigOption.");
if (rhs->type() != this->type()) if (rhs->type() != this->type())
throw std::runtime_error("ConfigOptionVector.overriden_by() applied to different types."); throw Slic3r::RuntimeError("ConfigOptionVector.overriden_by() applied to different types.");
auto rhs_vec = static_cast<const ConfigOptionVector<T>*>(rhs); auto rhs_vec = static_cast<const ConfigOptionVector<T>*>(rhs);
if (! rhs->nullable()) if (! rhs->nullable())
// Overridding a non-nullable object with another non-nullable object. // Overridding a non-nullable object with another non-nullable object.
@ -361,9 +362,9 @@ public:
// Apply an override option, possibly a nullable one. // Apply an override option, possibly a nullable one.
bool apply_override(const ConfigOption *rhs) override { bool apply_override(const ConfigOption *rhs) override {
if (this->nullable()) if (this->nullable())
throw std::runtime_error("Cannot override a nullable ConfigOption."); throw Slic3r::RuntimeError("Cannot override a nullable ConfigOption.");
if (rhs->type() != this->type()) if (rhs->type() != this->type())
throw std::runtime_error("ConfigOptionVector.apply_override() applied to different types."); throw Slic3r::RuntimeError("ConfigOptionVector.apply_override() applied to different types.");
auto rhs_vec = static_cast<const ConfigOptionVector<T>*>(rhs); auto rhs_vec = static_cast<const ConfigOptionVector<T>*>(rhs);
if (! rhs->nullable()) { if (! rhs->nullable()) {
// Overridding a non-nullable object with another non-nullable object. // Overridding a non-nullable object with another non-nullable object.
@ -452,7 +453,7 @@ public:
bool operator==(const ConfigOptionFloatsTempl &rhs) const { return vectors_equal(this->values, rhs.values); } bool operator==(const ConfigOptionFloatsTempl &rhs) const { return vectors_equal(this->values, rhs.values); }
bool operator==(const ConfigOption &rhs) const override { bool operator==(const ConfigOption &rhs) const override {
if (rhs.type() != this->type()) if (rhs.type() != this->type())
throw std::runtime_error("ConfigOptionFloatsTempl: Comparing incompatible types"); throw Slic3r::RuntimeError("ConfigOptionFloatsTempl: Comparing incompatible types");
assert(dynamic_cast<const ConfigOptionVector<double>*>(&rhs)); assert(dynamic_cast<const ConfigOptionVector<double>*>(&rhs));
return vectors_equal(this->values, static_cast<const ConfigOptionVector<double>*>(&rhs)->values); return vectors_equal(this->values, static_cast<const ConfigOptionVector<double>*>(&rhs)->values);
} }
@ -499,7 +500,7 @@ public:
if (NULLABLE) if (NULLABLE)
this->values.push_back(nil_value()); this->values.push_back(nil_value());
else else
throw std::runtime_error("Deserializing nil into a non-nullable object"); throw Slic3r::RuntimeError("Deserializing nil into a non-nullable object");
} else { } else {
std::istringstream iss(item_str); std::istringstream iss(item_str);
double value; double value;
@ -524,9 +525,9 @@ protected:
if (NULLABLE) if (NULLABLE)
ss << "nil"; ss << "nil";
else else
throw std::runtime_error("Serializing NaN"); throw Slic3r::RuntimeError("Serializing NaN");
} else } else
throw std::runtime_error("Serializing invalid number"); throw Slic3r::RuntimeError("Serializing invalid number");
} }
static bool vectors_equal(const std::vector<double> &v1, const std::vector<double> &v2) { static bool vectors_equal(const std::vector<double> &v1, const std::vector<double> &v2) {
if (NULLABLE) { if (NULLABLE) {
@ -645,7 +646,7 @@ public:
if (NULLABLE) if (NULLABLE)
this->values.push_back(nil_value()); this->values.push_back(nil_value());
else else
throw std::runtime_error("Deserializing nil into a non-nullable object"); throw Slic3r::RuntimeError("Deserializing nil into a non-nullable object");
} else { } else {
std::istringstream iss(item_str); std::istringstream iss(item_str);
int value; int value;
@ -662,7 +663,7 @@ private:
if (NULLABLE) if (NULLABLE)
ss << "nil"; ss << "nil";
else else
throw std::runtime_error("Serializing NaN"); throw Slic3r::RuntimeError("Serializing NaN");
} else } else
ss << v; ss << v;
} }
@ -847,7 +848,7 @@ public:
bool operator==(const ConfigOption &rhs) const override bool operator==(const ConfigOption &rhs) const override
{ {
if (rhs.type() != this->type()) if (rhs.type() != this->type())
throw std::runtime_error("ConfigOptionFloatOrPercent: Comparing incompatible types"); throw Slic3r::RuntimeError("ConfigOptionFloatOrPercent: Comparing incompatible types");
assert(dynamic_cast<const ConfigOptionFloatOrPercent*>(&rhs)); assert(dynamic_cast<const ConfigOptionFloatOrPercent*>(&rhs));
return *this == *static_cast<const ConfigOptionFloatOrPercent*>(&rhs); return *this == *static_cast<const ConfigOptionFloatOrPercent*>(&rhs);
} }
@ -858,7 +859,7 @@ public:
void set(const ConfigOption *rhs) override { void set(const ConfigOption *rhs) override {
if (rhs->type() != this->type()) if (rhs->type() != this->type())
throw std::runtime_error("ConfigOptionFloatOrPercent: Assigning an incompatible type"); throw Slic3r::RuntimeError("ConfigOptionFloatOrPercent: Assigning an incompatible type");
assert(dynamic_cast<const ConfigOptionFloatOrPercent*>(rhs)); assert(dynamic_cast<const ConfigOptionFloatOrPercent*>(rhs));
*this = *static_cast<const ConfigOptionFloatOrPercent*>(rhs); *this = *static_cast<const ConfigOptionFloatOrPercent*>(rhs);
} }
@ -1126,7 +1127,7 @@ public:
if (NULLABLE) if (NULLABLE)
this->values.push_back(nil_value()); this->values.push_back(nil_value());
else else
throw std::runtime_error("Deserializing nil into a non-nullable object"); throw Slic3r::RuntimeError("Deserializing nil into a non-nullable object");
} else } else
this->values.push_back(item_str.compare("1") == 0); this->values.push_back(item_str.compare("1") == 0);
} }
@ -1139,7 +1140,7 @@ protected:
if (NULLABLE) if (NULLABLE)
ss << "nil"; ss << "nil";
else else
throw std::runtime_error("Serializing NaN"); throw Slic3r::RuntimeError("Serializing NaN");
} else } else
ss << (v ? "1" : "0"); ss << (v ? "1" : "0");
} }
@ -1175,14 +1176,14 @@ public:
bool operator==(const ConfigOption &rhs) const override bool operator==(const ConfigOption &rhs) const override
{ {
if (rhs.type() != this->type()) if (rhs.type() != this->type())
throw std::runtime_error("ConfigOptionEnum<T>: Comparing incompatible types"); throw Slic3r::RuntimeError("ConfigOptionEnum<T>: Comparing incompatible types");
// rhs could be of the following type: ConfigOptionEnumGeneric or ConfigOptionEnum<T> // rhs could be of the following type: ConfigOptionEnumGeneric or ConfigOptionEnum<T>
return this->value == (T)rhs.getInt(); return this->value == (T)rhs.getInt();
} }
void set(const ConfigOption *rhs) override { void set(const ConfigOption *rhs) override {
if (rhs->type() != this->type()) if (rhs->type() != this->type())
throw std::runtime_error("ConfigOptionEnum<T>: Assigning an incompatible type"); throw Slic3r::RuntimeError("ConfigOptionEnum<T>: Assigning an incompatible type");
// rhs could be of the following type: ConfigOptionEnumGeneric or ConfigOptionEnum<T> // rhs could be of the following type: ConfigOptionEnumGeneric or ConfigOptionEnum<T>
this->value = (T)rhs->getInt(); this->value = (T)rhs->getInt();
} }
@ -1259,14 +1260,14 @@ public:
bool operator==(const ConfigOption &rhs) const override bool operator==(const ConfigOption &rhs) const override
{ {
if (rhs.type() != this->type()) if (rhs.type() != this->type())
throw std::runtime_error("ConfigOptionEnumGeneric: Comparing incompatible types"); throw Slic3r::RuntimeError("ConfigOptionEnumGeneric: Comparing incompatible types");
// rhs could be of the following type: ConfigOptionEnumGeneric or ConfigOptionEnum<T> // rhs could be of the following type: ConfigOptionEnumGeneric or ConfigOptionEnum<T>
return this->value == rhs.getInt(); return this->value == rhs.getInt();
} }
void set(const ConfigOption *rhs) override { void set(const ConfigOption *rhs) override {
if (rhs->type() != this->type()) if (rhs->type() != this->type())
throw std::runtime_error("ConfigOptionEnumGeneric: Assigning an incompatible type"); throw Slic3r::RuntimeError("ConfigOptionEnumGeneric: Assigning an incompatible type");
// rhs could be of the following type: ConfigOptionEnumGeneric or ConfigOptionEnum<T> // rhs could be of the following type: ConfigOptionEnumGeneric or ConfigOptionEnum<T>
this->value = rhs->getInt(); this->value = rhs->getInt();
} }
@ -1321,7 +1322,7 @@ public:
case coInts: { auto opt = new ConfigOptionIntsNullable(); archive(*opt); return opt; } case coInts: { auto opt = new ConfigOptionIntsNullable(); archive(*opt); return opt; }
case coPercents: { auto opt = new ConfigOptionPercentsNullable();archive(*opt); return opt; } case coPercents: { auto opt = new ConfigOptionPercentsNullable();archive(*opt); return opt; }
case coBools: { auto opt = new ConfigOptionBoolsNullable(); archive(*opt); return opt; } case coBools: { auto opt = new ConfigOptionBoolsNullable(); archive(*opt); return opt; }
default: throw std::runtime_error(std::string("ConfigOptionDef::load_option_from_archive(): Unknown nullable option type for option ") + this->opt_key); default: throw Slic3r::RuntimeError(std::string("ConfigOptionDef::load_option_from_archive(): Unknown nullable option type for option ") + this->opt_key);
} }
} else { } else {
switch (this->type) { switch (this->type) {
@ -1340,7 +1341,7 @@ public:
case coBool: { auto opt = new ConfigOptionBool(); archive(*opt); return opt; } case coBool: { auto opt = new ConfigOptionBool(); archive(*opt); return opt; }
case coBools: { auto opt = new ConfigOptionBools(); archive(*opt); return opt; } case coBools: { auto opt = new ConfigOptionBools(); archive(*opt); return opt; }
case coEnum: { auto opt = new ConfigOptionEnumGeneric(this->enum_keys_map); archive(*opt); return opt; } case coEnum: { auto opt = new ConfigOptionEnumGeneric(this->enum_keys_map); archive(*opt); return opt; }
default: throw std::runtime_error(std::string("ConfigOptionDef::load_option_from_archive(): Unknown option type for option ") + this->opt_key); default: throw Slic3r::RuntimeError(std::string("ConfigOptionDef::load_option_from_archive(): Unknown option type for option ") + this->opt_key);
} }
} }
} }
@ -1352,7 +1353,7 @@ public:
case coInts: archive(*static_cast<const ConfigOptionIntsNullable*>(opt)); break; case coInts: archive(*static_cast<const ConfigOptionIntsNullable*>(opt)); break;
case coPercents: archive(*static_cast<const ConfigOptionPercentsNullable*>(opt));break; case coPercents: archive(*static_cast<const ConfigOptionPercentsNullable*>(opt));break;
case coBools: archive(*static_cast<const ConfigOptionBoolsNullable*>(opt)); break; case coBools: archive(*static_cast<const ConfigOptionBoolsNullable*>(opt)); break;
default: throw std::runtime_error(std::string("ConfigOptionDef::save_option_to_archive(): Unknown nullable option type for option ") + this->opt_key); default: throw Slic3r::RuntimeError(std::string("ConfigOptionDef::save_option_to_archive(): Unknown nullable option type for option ") + this->opt_key);
} }
} else { } else {
switch (this->type) { switch (this->type) {
@ -1371,7 +1372,7 @@ public:
case coBool: archive(*static_cast<const ConfigOptionBool*>(opt)); break; case coBool: archive(*static_cast<const ConfigOptionBool*>(opt)); break;
case coBools: archive(*static_cast<const ConfigOptionBools*>(opt)); break; case coBools: archive(*static_cast<const ConfigOptionBools*>(opt)); break;
case coEnum: archive(*static_cast<const ConfigOptionEnumGeneric*>(opt)); break; case coEnum: archive(*static_cast<const ConfigOptionEnumGeneric*>(opt)); break;
default: throw std::runtime_error(std::string("ConfigOptionDef::save_option_to_archive(): Unknown option type for option ") + this->opt_key); default: throw Slic3r::RuntimeError(std::string("ConfigOptionDef::save_option_to_archive(): Unknown option type for option ") + this->opt_key);
} }
} }
// Make the compiler happy, shut up the warnings. // Make the compiler happy, shut up the warnings.

View file

@ -1,6 +1,10 @@
#include "CustomGCode.hpp" #include "CustomGCode.hpp"
#include "Config.hpp" #include "Config.hpp"
#if ENABLE_GCODE_VIEWER
#include "GCode.hpp"
#else
#include "GCode/PreviewData.hpp" #include "GCode/PreviewData.hpp"
#endif // ENABLE_GCODE_VIEWER
#include "GCodeWriter.hpp" #include "GCodeWriter.hpp"
namespace Slic3r { namespace Slic3r {
@ -17,8 +21,12 @@ extern void update_custom_gcode_per_print_z_from_config(Info& info, DynamicPrint
return; return;
if (info.gcodes.empty() && ! colorprint_heights->values.empty()) { if (info.gcodes.empty() && ! colorprint_heights->values.empty()) {
// Convert the old colorprint_heighs only if there is no equivalent data in a new format. // Convert the old colorprint_heighs only if there is no equivalent data in a new format.
const std::vector<std::string>& colors = GCodePreviewData::ColorPrintColors(); #if ENABLE_GCODE_VIEWER
const auto& colorprint_values = colorprint_heights->values; const std::vector<std::string>& colors = ColorPrintColors::get();
#else
const std::vector<std::string>& colors = GCodePreviewData::ColorPrintColors();
#endif // ENABLE_GCODE_VIEWER
const auto& colorprint_values = colorprint_heights->values;
info.gcodes.clear(); info.gcodes.clear();
info.gcodes.reserve(colorprint_values.size()); info.gcodes.reserve(colorprint_values.size());
int i = 0; int i = 0;

View file

@ -1,5 +1,6 @@
#include "BoundingBox.hpp" #include "BoundingBox.hpp"
#include "ExPolygon.hpp" #include "ExPolygon.hpp"
#include "Exception.hpp"
#include "Geometry.hpp" #include "Geometry.hpp"
#include "Polygon.hpp" #include "Polygon.hpp"
#include "Line.hpp" #include "Line.hpp"
@ -435,7 +436,7 @@ void ExPolygon::triangulate_pp(Polygons* polygons) const
std::list<TPPLPoly> output; std::list<TPPLPoly> output;
int res = TPPLPartition().Triangulate_MONO(&input, &output); int res = TPPLPartition().Triangulate_MONO(&input, &output);
if (res != 1) if (res != 1)
throw std::runtime_error("Triangulation failed"); throw Slic3r::RuntimeError("Triangulation failed");
// convert output polygons // convert output polygons
for (std::list<TPPLPoly>::iterator poly = output.begin(); poly != output.end(); ++poly) { for (std::list<TPPLPoly>::iterator poly = output.begin(); poly != output.end(); ++poly) {
@ -548,7 +549,7 @@ void ExPolygon::triangulate_pp(Points *triangles) const
int res = TPPLPartition().Triangulate_MONO(&input, &output); int res = TPPLPartition().Triangulate_MONO(&input, &output);
// int TPPLPartition::Triangulate_EC(TPPLPolyList *inpolys, TPPLPolyList *triangles) { // int TPPLPartition::Triangulate_EC(TPPLPolyList *inpolys, TPPLPolyList *triangles) {
if (res != 1) if (res != 1)
throw std::runtime_error("Triangulation failed"); throw Slic3r::RuntimeError("Triangulation failed");
*triangles = polypartition_output_to_triangles(output); *triangles = polypartition_output_to_triangles(output);
} }
@ -591,7 +592,7 @@ void ExPolygon::triangulate_p2t(Polygons* polygons) const
} }
polygons->push_back(p); polygons->push_back(p);
} }
} catch (const std::runtime_error & /* err */) { } catch (const Slic3r::RuntimeError & /* err */) {
assert(false); assert(false);
// just ignore, don't triangulate // just ignore, don't triangulate
} }

View file

@ -333,6 +333,14 @@ extern std::list<TPPLPoly> expoly_to_polypartition_input(const ExPolygons &expp)
extern std::list<TPPLPoly> expoly_to_polypartition_input(const ExPolygon &ex); extern std::list<TPPLPoly> expoly_to_polypartition_input(const ExPolygon &ex);
extern std::vector<Point> polypartition_output_to_triangles(const std::list<TPPLPoly> &output); extern std::vector<Point> polypartition_output_to_triangles(const std::list<TPPLPoly> &output);
inline double area(const ExPolygons &polys)
{
double s = 0.;
for (auto &p : polys) s += p.area();
return s;
}
} // namespace Slic3r } // namespace Slic3r
// start Boost // start Boost

View file

@ -0,0 +1,28 @@
#ifndef _libslic3r_Exception_h_
#define _libslic3r_Exception_h_
#include <stdexcept>
namespace Slic3r {
// PrusaSlicer's own exception hierarchy is derived from std::runtime_error.
// Base for Slicer's own exceptions.
class Exception : public std::runtime_error { using std::runtime_error::runtime_error; };
#define SLIC3R_DERIVE_EXCEPTION(DERIVED_EXCEPTION, PARENT_EXCEPTION) \
class DERIVED_EXCEPTION : public PARENT_EXCEPTION { using PARENT_EXCEPTION::PARENT_EXCEPTION; }
// Critical exception produced by Slicer, such exception shall never propagate up to the UI thread.
// If that happens, an ugly fat message box with an ugly fat exclamation mark is displayed.
SLIC3R_DERIVE_EXCEPTION(CriticalException, Exception);
SLIC3R_DERIVE_EXCEPTION(RuntimeError, CriticalException);
SLIC3R_DERIVE_EXCEPTION(LogicError, CriticalException);
SLIC3R_DERIVE_EXCEPTION(InvalidArgument, LogicError);
SLIC3R_DERIVE_EXCEPTION(OutOfRange, LogicError);
SLIC3R_DERIVE_EXCEPTION(IOError, CriticalException);
SLIC3R_DERIVE_EXCEPTION(FileIOError, IOError);
// Runtime exception produced by Slicer. Such exception cancels the slicing process and it shall be shown in notifications.
SLIC3R_DERIVE_EXCEPTION(SlicingError, Exception);
#undef SLIC3R_DERIVE_EXCEPTION
} // namespace Slic3r
#endif // _libslic3r_Exception_h_

View file

@ -306,14 +306,18 @@ double ExtrusionLoop::min_mm3_per_mm() const
std::string ExtrusionEntity::role_to_string(ExtrusionRole role) std::string ExtrusionEntity::role_to_string(ExtrusionRole role)
{ {
switch (role) { switch (role) {
#if ENABLE_GCODE_VIEWER
case erNone : return L("Unknown");
#else
case erNone : return L("None"); case erNone : return L("None");
#endif // ENABLE_GCODE_VIEWER
case erPerimeter : return L("Perimeter"); case erPerimeter : return L("Perimeter");
case erExternalPerimeter : return L("External perimeter"); case erExternalPerimeter : return L("External perimeter");
case erOverhangPerimeter : return L("Overhang perimeter"); case erOverhangPerimeter : return L("Overhang perimeter");
case erInternalInfill : return L("Internal infill"); case erInternalInfill : return L("Internal infill");
case erSolidInfill : return L("Solid infill"); case erSolidInfill : return L("Solid infill");
case erIroning : return L("Ironing");
case erTopSolidInfill : return L("Top solid infill"); case erTopSolidInfill : return L("Top solid infill");
case erIroning : return L("Ironing");
case erBridgeInfill : return L("Bridge infill"); case erBridgeInfill : return L("Bridge infill");
case erGapFill : return L("Gap fill"); case erGapFill : return L("Gap fill");
case erSkirt : return L("Skirt"); case erSkirt : return L("Skirt");
@ -327,4 +331,40 @@ std::string ExtrusionEntity::role_to_string(ExtrusionRole role)
return ""; return "";
} }
ExtrusionRole ExtrusionEntity::string_to_role(const std::string& role)
{
if (role == L("Perimeter"))
return erPerimeter;
else if (role == L("External perimeter"))
return erExternalPerimeter;
else if (role == L("Overhang perimeter"))
return erOverhangPerimeter;
else if (role == L("Internal infill"))
return erInternalInfill;
else if (role == L("Solid infill"))
return erSolidInfill;
else if (role == L("Top solid infill"))
return erTopSolidInfill;
else if (role == L("Ironing"))
return erIroning;
else if (role == L("Bridge infill"))
return erBridgeInfill;
else if (role == L("Gap fill"))
return erGapFill;
else if (role == L("Skirt"))
return erSkirt;
else if (role == L("Support material"))
return erSupportMaterial;
else if (role == L("Support material interface"))
return erSupportMaterialInterface;
else if (role == L("Wipe tower"))
return erWipeTower;
else if (role == L("Custom"))
return erCustom;
else if (role == L("Mixed"))
return erMixed;
else
return erNone;
}
} }

View file

@ -106,6 +106,7 @@ public:
virtual double total_volume() const = 0; virtual double total_volume() const = 0;
static std::string role_to_string(ExtrusionRole role); static std::string role_to_string(ExtrusionRole role);
static ExtrusionRole string_to_role(const std::string& role);
}; };
typedef std::vector<ExtrusionEntity*> ExtrusionEntitiesPtr; typedef std::vector<ExtrusionEntity*> ExtrusionEntitiesPtr;
@ -121,8 +122,8 @@ public:
// Height of the extrusion, used for visualization purposes. // Height of the extrusion, used for visualization purposes.
float height; float height;
ExtrusionPath(ExtrusionRole role) : mm3_per_mm(-1), width(-1), height(-1), m_role(role) {}; ExtrusionPath(ExtrusionRole role) : mm3_per_mm(-1), width(-1), height(-1), m_role(role) {}
ExtrusionPath(ExtrusionRole role, double mm3_per_mm, float width, float height) : mm3_per_mm(mm3_per_mm), width(width), height(height), m_role(role) {}; ExtrusionPath(ExtrusionRole role, double mm3_per_mm, float width, float height) : mm3_per_mm(mm3_per_mm), width(width), height(height), m_role(role) {}
ExtrusionPath(const ExtrusionPath& rhs) : polyline(rhs.polyline), mm3_per_mm(rhs.mm3_per_mm), width(rhs.width), height(rhs.height), m_role(rhs.m_role) {} ExtrusionPath(const ExtrusionPath& rhs) : polyline(rhs.polyline), mm3_per_mm(rhs.mm3_per_mm), width(rhs.width), height(rhs.height), m_role(rhs.m_role) {}
ExtrusionPath(ExtrusionPath&& rhs) : polyline(std::move(rhs.polyline)), mm3_per_mm(rhs.mm3_per_mm), width(rhs.width), height(rhs.height), m_role(rhs.m_role) {} ExtrusionPath(ExtrusionPath&& rhs) : polyline(std::move(rhs.polyline)), mm3_per_mm(rhs.mm3_per_mm), width(rhs.width), height(rhs.height), m_role(rhs.m_role) {}
ExtrusionPath(const Polyline &polyline, const ExtrusionPath &rhs) : polyline(polyline), mm3_per_mm(rhs.mm3_per_mm), width(rhs.width), height(rhs.height), m_role(rhs.m_role) {} ExtrusionPath(const Polyline &polyline, const ExtrusionPath &rhs) : polyline(polyline), mm3_per_mm(rhs.mm3_per_mm), width(rhs.width), height(rhs.height), m_role(rhs.m_role) {}

View file

@ -2,6 +2,7 @@
#define slic3r_ExtrusionEntityCollection_hpp_ #define slic3r_ExtrusionEntityCollection_hpp_
#include "libslic3r.h" #include "libslic3r.h"
#include "Exception.hpp"
#include "ExtrusionEntity.hpp" #include "ExtrusionEntity.hpp"
namespace Slic3r { namespace Slic3r {
@ -107,7 +108,7 @@ public:
// Following methods shall never be called on an ExtrusionEntityCollection. // Following methods shall never be called on an ExtrusionEntityCollection.
Polyline as_polyline() const override { Polyline as_polyline() const override {
throw std::runtime_error("Calling as_polyline() on a ExtrusionEntityCollection"); throw Slic3r::RuntimeError("Calling as_polyline() on a ExtrusionEntityCollection");
return Polyline(); return Polyline();
}; };
@ -117,7 +118,7 @@ public:
} }
double length() const override { double length() const override {
throw std::runtime_error("Calling length() on a ExtrusionEntityCollection"); throw Slic3r::RuntimeError("Calling length() on a ExtrusionEntityCollection");
return 0.; return 0.;
} }
}; };

View file

@ -10,14 +10,14 @@
namespace Slic3r { namespace Slic3r {
// Generic file parser error, mostly copied from boost::property_tree::file_parser_error // Generic file parser error, mostly copied from boost::property_tree::file_parser_error
class file_parser_error: public std::runtime_error class file_parser_error: public Slic3r::RuntimeError
{ {
public: public:
file_parser_error(const std::string &msg, const std::string &file, unsigned long line = 0) : file_parser_error(const std::string &msg, const std::string &file, unsigned long line = 0) :
std::runtime_error(format_what(msg, file, line)), Slic3r::RuntimeError(format_what(msg, file, line)),
m_message(msg), m_filename(file), m_line(line) {} m_message(msg), m_filename(file), m_line(line) {}
file_parser_error(const std::string &msg, const boost::filesystem::path &file, unsigned long line = 0) : file_parser_error(const std::string &msg, const boost::filesystem::path &file, unsigned long line = 0) :
std::runtime_error(format_what(msg, file.string(), line)), Slic3r::RuntimeError(format_what(msg, file.string(), line)),
m_message(msg), m_filename(file.string()), m_line(line) {} m_message(msg), m_filename(file.string()), m_line(line) {}
// gcc 3.4.2 complains about lack of throw specifier on compiler // gcc 3.4.2 complains about lack of throw specifier on compiler
// generated dtor // generated dtor
@ -35,7 +35,7 @@ private:
std::string m_filename; std::string m_filename;
unsigned long m_line; unsigned long m_line;
// Format error message to be returned by std::runtime_error::what() // Format error message to be returned by Slic3r::RuntimeError::what()
static std::string format_what(const std::string &msg, const std::string &file, unsigned long l) static std::string format_what(const std::string &msg, const std::string &file, unsigned long l)
{ {
std::stringstream stream; std::stringstream stream;

View file

@ -318,7 +318,7 @@ void export_group_fills_to_svg(const char *path, const std::vector<SurfaceFill>
#endif #endif
// friend to Layer // friend to Layer
void Layer::make_fills() void Layer::make_fills(FillAdaptive_Internal::Octree* adaptive_fill_octree, FillAdaptive_Internal::Octree* support_fill_octree)
{ {
for (LayerRegion *layerm : m_regions) for (LayerRegion *layerm : m_regions)
layerm->fills.clear(); layerm->fills.clear();
@ -345,6 +345,8 @@ void Layer::make_fills()
f->layer_id = this->id(); f->layer_id = this->id();
f->z = this->print_z; f->z = this->print_z;
f->angle = surface_fill.params.angle; f->angle = surface_fill.params.angle;
f->adapt_fill_octree = adaptive_fill_octree;
f->support_fill_octree = support_fill_octree;
// calculate flow spacing for infill pattern generation // calculate flow spacing for infill pattern generation
bool using_internal_flow = ! surface_fill.surface.is_solid() && ! surface_fill.params.flow.bridge; bool using_internal_flow = ! surface_fill.surface.is_solid() && ! surface_fill.params.flow.bridge;

View file

@ -0,0 +1,520 @@
#include "../ClipperUtils.hpp"
#include "../ExPolygon.hpp"
#include "../Surface.hpp"
#include "../Geometry.hpp"
#include "../AABBTreeIndirect.hpp"
#include "../Layer.hpp"
#include "../Print.hpp"
#include "../ShortestPath.hpp"
#include "FillAdaptive.hpp"
namespace Slic3r {
std::pair<double, double> adaptive_fill_line_spacing(const PrintObject &print_object)
{
// Output, spacing for icAdaptiveCubic and icSupportCubic
double adaptive_line_spacing = 0.;
double support_line_spacing = 0.;
enum class Tristate {
Yes,
No,
Maybe
};
struct RegionFillData {
Tristate has_adaptive_infill;
Tristate has_support_infill;
double density;
double extrusion_width;
};
std::vector<RegionFillData> region_fill_data;
region_fill_data.reserve(print_object.print()->regions().size());
bool build_octree = false;
for (const PrintRegion *region : print_object.print()->regions()) {
const PrintRegionConfig &config = region->config();
bool nonempty = config.fill_density > 0;
bool has_adaptive_infill = nonempty && config.fill_pattern == ipAdaptiveCubic;
bool has_support_infill = nonempty && config.fill_pattern == ipSupportCubic;
region_fill_data.push_back(RegionFillData({
has_adaptive_infill ? Tristate::Maybe : Tristate::No,
has_support_infill ? Tristate::Maybe : Tristate::No,
config.fill_density,
config.infill_extrusion_width
}));
build_octree |= has_adaptive_infill || has_support_infill;
}
if (build_octree) {
// Compute the average of above parameters over all layers
for (const Layer *layer : print_object.layers())
for (size_t region_id = 0; region_id < layer->regions().size(); ++ region_id) {
RegionFillData &rd = region_fill_data[region_id];
if (rd.has_adaptive_infill == Tristate::Maybe && ! layer->regions()[region_id]->fill_surfaces.empty())
rd.has_adaptive_infill = Tristate::Yes;
if (rd.has_support_infill == Tristate::Maybe && ! layer->regions()[region_id]->fill_surfaces.empty())
rd.has_support_infill = Tristate::Yes;
}
double adaptive_fill_density = 0.;
double adaptive_infill_extrusion_width = 0.;
int adaptive_cnt = 0;
double support_fill_density = 0.;
double support_infill_extrusion_width = 0.;
int support_cnt = 0;
for (const RegionFillData &rd : region_fill_data) {
if (rd.has_adaptive_infill == Tristate::Yes) {
adaptive_fill_density += rd.density;
adaptive_infill_extrusion_width += rd.extrusion_width;
++ adaptive_cnt;
} else if (rd.has_support_infill == Tristate::Yes) {
support_fill_density += rd.density;
support_infill_extrusion_width += rd.extrusion_width;
++ support_cnt;
}
}
auto to_line_spacing = [](int cnt, double density, double extrusion_width) {
if (cnt) {
density /= double(cnt);
extrusion_width /= double(cnt);
return extrusion_width / ((density / 100.0f) * 0.333333333f);
} else
return 0.;
};
adaptive_line_spacing = to_line_spacing(adaptive_cnt, adaptive_fill_density, adaptive_infill_extrusion_width);
support_line_spacing = to_line_spacing(support_cnt, support_fill_density, support_infill_extrusion_width);
}
return std::make_pair(adaptive_line_spacing, support_line_spacing);
}
void FillAdaptive::_fill_surface_single(const FillParams & params,
unsigned int thickness_layers,
const std::pair<float, Point> &direction,
ExPolygon & expolygon,
Polylines & polylines_out)
{
if(this->adapt_fill_octree != nullptr)
this->generate_infill(params, thickness_layers, direction, expolygon, polylines_out, this->adapt_fill_octree);
}
void FillAdaptive::generate_infill(const FillParams & params,
unsigned int thickness_layers,
const std::pair<float, Point> &direction,
ExPolygon & expolygon,
Polylines & polylines_out,
FillAdaptive_Internal::Octree *octree)
{
Vec3d rotation = Vec3d((5.0 * M_PI) / 4.0, Geometry::deg2rad(215.264), M_PI / 6.0);
Transform3d rotation_matrix = Geometry::assemble_transform(Vec3d::Zero(), rotation, Vec3d::Ones(), Vec3d::Ones());
// Store grouped lines by its direction (multiple of 120°)
std::vector<Lines> infill_lines_dir(3);
this->generate_infill_lines(octree->root_cube.get(),
this->z, octree->origin, rotation_matrix,
infill_lines_dir, octree->cubes_properties,
int(octree->cubes_properties.size()) - 1);
Polylines all_polylines;
all_polylines.reserve(infill_lines_dir[0].size() * 3);
for (Lines &infill_lines : infill_lines_dir)
{
for (const Line &line : infill_lines)
{
all_polylines.emplace_back(line.a, line.b);
}
}
if (params.dont_connect)
{
// Crop all polylines
polylines_out = intersection_pl(all_polylines, to_polygons(expolygon));
}
else
{
// Crop all polylines
all_polylines = intersection_pl(all_polylines, to_polygons(expolygon));
Polylines boundary_polylines;
Polylines non_boundary_polylines;
for (const Polyline &polyline : all_polylines)
{
// connect_infill required all polylines to touch the boundary.
if(polyline.lines().size() == 1 && expolygon.has_boundary_point(polyline.lines().front().a) && expolygon.has_boundary_point(polyline.lines().front().b))
{
boundary_polylines.push_back(polyline);
}
else
{
non_boundary_polylines.push_back(polyline);
}
}
if(!boundary_polylines.empty())
{
boundary_polylines = chain_polylines(boundary_polylines);
FillAdaptive::connect_infill(std::move(boundary_polylines), expolygon, polylines_out, this->spacing, params);
}
polylines_out.insert(polylines_out.end(), non_boundary_polylines.begin(), non_boundary_polylines.end());
}
#ifdef SLIC3R_DEBUG_SLICE_PROCESSING
{
static int iRuna = 0;
BoundingBox bbox_svg = this->bounding_box;
{
::Slic3r::SVG svg(debug_out_path("FillAdaptive-%d.svg", iRuna), bbox_svg);
for (const Polyline &polyline : polylines_out)
{
for (const Line &line : polyline.lines())
{
Point from = line.a;
Point to = line.b;
Point diff = to - from;
float shrink_length = scale_(0.4);
float line_slope = (float)diff.y() / diff.x();
float shrink_x = shrink_length / (float)std::sqrt(1.0 + (line_slope * line_slope));
float shrink_y = line_slope * shrink_x;
to.x() -= shrink_x;
to.y() -= shrink_y;
from.x() += shrink_x;
from.y() += shrink_y;
svg.draw(Line(from, to));
}
}
}
iRuna++;
}
#endif /* SLIC3R_DEBUG */
}
void FillAdaptive::generate_infill_lines(
FillAdaptive_Internal::Cube *cube,
double z_position,
const Vec3d &origin,
const Transform3d &rotation_matrix,
std::vector<Lines> &dir_lines_out,
const std::vector<FillAdaptive_Internal::CubeProperties> &cubes_properties,
int depth)
{
using namespace FillAdaptive_Internal;
if(cube == nullptr)
{
return;
}
Vec3d cube_center_tranformed = rotation_matrix * cube->center;
double z_diff = std::abs(z_position - cube_center_tranformed.z());
if (z_diff > cubes_properties[depth].height / 2)
{
return;
}
if (z_diff < cubes_properties[depth].line_z_distance)
{
Point from(
scale_((cubes_properties[depth].diagonal_length / 2) * (cubes_properties[depth].line_z_distance - z_diff) / cubes_properties[depth].line_z_distance),
scale_(cubes_properties[depth].line_xy_distance - ((z_position - (cube_center_tranformed.z() - cubes_properties[depth].line_z_distance)) / sqrt(2))));
Point to(-from.x(), from.y());
// Relative to cube center
double rotation_angle = (2.0 * M_PI) / 3.0;
for (Lines &lines : dir_lines_out)
{
Vec3d offset = cube_center_tranformed - (rotation_matrix * origin);
Point from_abs(from), to_abs(to);
from_abs.x() += int(scale_(offset.x()));
from_abs.y() += int(scale_(offset.y()));
to_abs.x() += int(scale_(offset.x()));
to_abs.y() += int(scale_(offset.y()));
// lines.emplace_back(from_abs, to_abs);
this->connect_lines(lines, Line(from_abs, to_abs));
from.rotate(rotation_angle);
to.rotate(rotation_angle);
}
}
for(const std::unique_ptr<Cube> &child : cube->children)
{
if(child != nullptr)
{
generate_infill_lines(child.get(), z_position, origin, rotation_matrix, dir_lines_out, cubes_properties, depth - 1);
}
}
}
void FillAdaptive::connect_lines(Lines &lines, Line new_line)
{
auto eps = int(scale_(0.10));
for (size_t i = 0; i < lines.size(); ++i)
{
if (std::abs(new_line.a.x() - lines[i].b.x()) < eps && std::abs(new_line.a.y() - lines[i].b.y()) < eps)
{
new_line.a = lines[i].a;
lines.erase(lines.begin() + i);
--i;
continue;
}
if (std::abs(new_line.b.x() - lines[i].a.x()) < eps && std::abs(new_line.b.y() - lines[i].a.y()) < eps)
{
new_line.b = lines[i].b;
lines.erase(lines.begin() + i);
--i;
continue;
}
}
lines.emplace_back(new_line.a, new_line.b);
}
std::unique_ptr<FillAdaptive_Internal::Octree> FillAdaptive::build_octree(
TriangleMesh &triangle_mesh,
coordf_t line_spacing,
const Vec3d &cube_center)
{
using namespace FillAdaptive_Internal;
if(line_spacing <= 0 || std::isnan(line_spacing))
{
return nullptr;
}
Vec3d bb_size = triangle_mesh.bounding_box().size();
// The furthest point from the center of the bottom of the mesh bounding box.
double furthest_point = std::sqrt(((bb_size.x() * bb_size.x()) / 4.0) +
((bb_size.y() * bb_size.y()) / 4.0) +
(bb_size.z() * bb_size.z()));
double max_cube_edge_length = furthest_point * 2;
std::vector<CubeProperties> cubes_properties;
for (double edge_length = (line_spacing * 2); edge_length < (max_cube_edge_length * 2); edge_length *= 2)
{
CubeProperties props{};
props.edge_length = edge_length;
props.height = edge_length * sqrt(3);
props.diagonal_length = edge_length * sqrt(2);
props.line_z_distance = edge_length / sqrt(3);
props.line_xy_distance = edge_length / sqrt(6);
cubes_properties.push_back(props);
}
if (triangle_mesh.its.vertices.empty())
{
triangle_mesh.require_shared_vertices();
}
AABBTreeIndirect::Tree3f aabbTree = AABBTreeIndirect::build_aabb_tree_over_indexed_triangle_set(
triangle_mesh.its.vertices, triangle_mesh.its.indices);
auto octree = std::make_unique<Octree>(std::make_unique<Cube>(cube_center), cube_center, cubes_properties);
FillAdaptive::expand_cube(octree->root_cube.get(), cubes_properties, aabbTree, triangle_mesh, int(cubes_properties.size()) - 1);
return octree;
}
void FillAdaptive::expand_cube(
FillAdaptive_Internal::Cube *cube,
const std::vector<FillAdaptive_Internal::CubeProperties> &cubes_properties,
const AABBTreeIndirect::Tree3f &distance_tree,
const TriangleMesh &triangle_mesh, int depth)
{
using namespace FillAdaptive_Internal;
if (cube == nullptr || depth == 0)
{
return;
}
std::vector<Vec3d> child_centers = {
Vec3d(-1, -1, -1), Vec3d( 1, -1, -1), Vec3d(-1, 1, -1), Vec3d( 1, 1, -1),
Vec3d(-1, -1, 1), Vec3d( 1, -1, 1), Vec3d(-1, 1, 1), Vec3d( 1, 1, 1)
};
double cube_radius_squared = (cubes_properties[depth].height * cubes_properties[depth].height) / 16;
for (size_t i = 0; i < 8; ++i)
{
const Vec3d &child_center = child_centers[i];
Vec3d child_center_transformed = cube->center + (child_center * (cubes_properties[depth].edge_length / 4));
if(AABBTreeIndirect::is_any_triangle_in_radius(triangle_mesh.its.vertices, triangle_mesh.its.indices,
distance_tree, child_center_transformed, cube_radius_squared))
{
cube->children[i] = std::make_unique<Cube>(child_center_transformed);
FillAdaptive::expand_cube(cube->children[i].get(), cubes_properties, distance_tree, triangle_mesh, depth - 1);
}
}
}
void FillAdaptive_Internal::Octree::propagate_point(
Vec3d point,
FillAdaptive_Internal::Cube * current,
int depth,
const std::vector<FillAdaptive_Internal::CubeProperties> &cubes_properties)
{
using namespace FillAdaptive_Internal;
if(depth <= 0)
{
return;
}
size_t octant_idx = Octree::find_octant(point, current->center);
Cube * child = current->children[octant_idx].get();
// Octant not exists, then create it
if(child == nullptr) {
std::vector<Vec3d> child_centers = {
Vec3d(-1, -1, -1), Vec3d( 1, -1, -1), Vec3d(-1, 1, -1), Vec3d( 1, 1, -1),
Vec3d(-1, -1, 1), Vec3d( 1, -1, 1), Vec3d(-1, 1, 1), Vec3d( 1, 1, 1)
};
const Vec3d &child_center = child_centers[octant_idx];
Vec3d child_center_transformed = current->center + (child_center * (cubes_properties[depth].edge_length / 4));
current->children[octant_idx] = std::make_unique<Cube>(child_center_transformed);
child = current->children[octant_idx].get();
}
Octree::propagate_point(point, child, (depth - 1), cubes_properties);
}
std::unique_ptr<FillAdaptive_Internal::Octree> FillSupportCubic::build_octree(
TriangleMesh & triangle_mesh,
coordf_t line_spacing,
const Vec3d & cube_center,
const Transform3d &rotation_matrix)
{
using namespace FillAdaptive_Internal;
if(line_spacing <= 0 || std::isnan(line_spacing))
{
return nullptr;
}
Vec3d bb_size = triangle_mesh.bounding_box().size();
// The furthest point from the center of the bottom of the mesh bounding box.
double furthest_point = std::sqrt(((bb_size.x() * bb_size.x()) / 4.0) +
((bb_size.y() * bb_size.y()) / 4.0) +
(bb_size.z() * bb_size.z()));
double max_cube_edge_length = furthest_point * 2;
std::vector<CubeProperties> cubes_properties;
for (double edge_length = (line_spacing * 2); edge_length < (max_cube_edge_length * 2); edge_length *= 2)
{
CubeProperties props{};
props.edge_length = edge_length;
props.height = edge_length * sqrt(3);
props.diagonal_length = edge_length * sqrt(2);
props.line_z_distance = edge_length / sqrt(3);
props.line_xy_distance = edge_length / sqrt(6);
cubes_properties.push_back(props);
}
if (triangle_mesh.its.vertices.empty())
{
triangle_mesh.require_shared_vertices();
}
AABBTreeIndirect::Tree3f aabbTree = AABBTreeIndirect::build_aabb_tree_over_indexed_triangle_set(
triangle_mesh.its.vertices, triangle_mesh.its.indices);
auto octree = std::make_unique<Octree>(std::make_unique<Cube>(cube_center), cube_center, cubes_properties);
double cube_edge_length = line_spacing / 2.0;
int max_depth = int(octree->cubes_properties.size()) - 1;
BoundingBoxf3 mesh_bb = triangle_mesh.bounding_box();
Vec3f vertical(0, 0, 1);
for (size_t facet_idx = 0; facet_idx < triangle_mesh.stl.facet_start.size(); ++facet_idx)
{
if(triangle_mesh.stl.facet_start[facet_idx].normal.dot(vertical) <= 0.707)
{
// The angle is smaller than PI/4, than infill don't to be there
continue;
}
stl_vertex v_1 = triangle_mesh.stl.facet_start[facet_idx].vertex[0];
stl_vertex v_2 = triangle_mesh.stl.facet_start[facet_idx].vertex[1];
stl_vertex v_3 = triangle_mesh.stl.facet_start[facet_idx].vertex[2];
std::vector<Vec3d> triangle_vertices =
{Vec3d(v_1.x(), v_1.y(), v_1.z()),
Vec3d(v_2.x(), v_2.y(), v_2.z()),
Vec3d(v_3.x(), v_3.y(), v_3.z())};
BoundingBoxf3 triangle_bb(triangle_vertices);
Vec3d triangle_start_relative = triangle_bb.min - mesh_bb.min;
Vec3d triangle_end_relative = triangle_bb.max - mesh_bb.min;
Vec3crd triangle_start_idx = Vec3crd(
int(std::floor(triangle_start_relative.x() / cube_edge_length)),
int(std::floor(triangle_start_relative.y() / cube_edge_length)),
int(std::floor(triangle_start_relative.z() / cube_edge_length)));
Vec3crd triangle_end_idx = Vec3crd(
int(std::floor(triangle_end_relative.x() / cube_edge_length)),
int(std::floor(triangle_end_relative.y() / cube_edge_length)),
int(std::floor(triangle_end_relative.z() / cube_edge_length)));
for (int z = triangle_start_idx.z(); z <= triangle_end_idx.z(); ++z)
{
for (int y = triangle_start_idx.y(); y <= triangle_end_idx.y(); ++y)
{
for (int x = triangle_start_idx.x(); x <= triangle_end_idx.x(); ++x)
{
Vec3d cube_center_relative(x * cube_edge_length + (cube_edge_length / 2.0), y * cube_edge_length + (cube_edge_length / 2.0), z * cube_edge_length);
Vec3d cube_center_absolute = cube_center_relative + mesh_bb.min;
double cube_center_absolute_arr[3] = {cube_center_absolute.x(), cube_center_absolute.y(), cube_center_absolute.z()};
double distance = 0, cord_u = 0, cord_v = 0;
double dir[3] = {0.0, 0.0, 1.0};
double vert_0[3] = {triangle_vertices[0].x(),
triangle_vertices[0].y(),
triangle_vertices[0].z()};
double vert_1[3] = {triangle_vertices[1].x(),
triangle_vertices[1].y(),
triangle_vertices[1].z()};
double vert_2[3] = {triangle_vertices[2].x(),
triangle_vertices[2].y(),
triangle_vertices[2].z()};
if(intersect_triangle(cube_center_absolute_arr, dir, vert_0, vert_1, vert_2, &distance, &cord_u, &cord_v) && distance > 0 && distance <= cube_edge_length)
{
Vec3d cube_center_transformed(cube_center_absolute.x(), cube_center_absolute.y(), cube_center_absolute.z() + (cube_edge_length / 2.0));
Octree::propagate_point(rotation_matrix * cube_center_transformed, octree->root_cube.get(), max_depth, octree->cubes_properties);
}
}
}
}
}
return octree;
}
void FillSupportCubic::_fill_surface_single(const FillParams & params,
unsigned int thickness_layers,
const std::pair<float, Point> &direction,
ExPolygon & expolygon,
Polylines & polylines_out)
{
if (this->support_fill_octree != nullptr)
this->generate_infill(params, thickness_layers, direction, expolygon, polylines_out, this->support_fill_octree);
}
} // namespace Slic3r

View file

@ -0,0 +1,139 @@
#ifndef slic3r_FillAdaptive_hpp_
#define slic3r_FillAdaptive_hpp_
#include "../AABBTreeIndirect.hpp"
#include "FillBase.hpp"
namespace Slic3r {
class PrintObject;
class TriangleMesh;
namespace FillAdaptive_Internal
{
struct CubeProperties
{
double edge_length; // Lenght of edge of a cube
double height; // Height of rotated cube (standing on the corner)
double diagonal_length; // Length of diagonal of a cube a face
double line_z_distance; // Defines maximal distance from a center of a cube on Z axis on which lines will be created
double line_xy_distance;// Defines maximal distance from a center of a cube on X and Y axis on which lines will be created
};
struct Cube
{
Vec3d center;
std::unique_ptr<Cube> children[8] = {};
Cube(const Vec3d &center) : center(center) {}
};
struct Octree
{
std::unique_ptr<Cube> root_cube;
Vec3d origin;
std::vector<CubeProperties> cubes_properties;
Octree(std::unique_ptr<Cube> rootCube, const Vec3d &origin, const std::vector<CubeProperties> &cubes_properties)
: root_cube(std::move(rootCube)), origin(origin), cubes_properties(cubes_properties) {}
inline static int find_octant(const Vec3d &i_cube, const Vec3d &current)
{
return (i_cube.z() > current.z()) * 4 + (i_cube.y() > current.y()) * 2 + (i_cube.x() > current.x());
}
static void propagate_point(
Vec3d point,
FillAdaptive_Internal::Cube *current_cube,
int depth,
const std::vector<FillAdaptive_Internal::CubeProperties> &cubes_properties);
};
}; // namespace FillAdaptive_Internal
//
// Some of the algorithms used by class FillAdaptive were inspired by
// Cura Engine's class SubDivCube
// https://github.com/Ultimaker/CuraEngine/blob/master/src/infill/SubDivCube.h
//
class FillAdaptive : public Fill
{
public:
virtual ~FillAdaptive() {}
protected:
virtual Fill* clone() const { return new FillAdaptive(*this); };
virtual void _fill_surface_single(
const FillParams &params,
unsigned int thickness_layers,
const std::pair<float, Point> &direction,
ExPolygon &expolygon,
Polylines &polylines_out);
virtual bool no_sort() const { return true; }
void generate_infill_lines(
FillAdaptive_Internal::Cube *cube,
double z_position,
const Vec3d & origin,
const Transform3d & rotation_matrix,
std::vector<Lines> & dir_lines_out,
const std::vector<FillAdaptive_Internal::CubeProperties> &cubes_properties,
int depth);
static void connect_lines(Lines &lines, Line new_line);
void generate_infill(const FillParams & params,
unsigned int thickness_layers,
const std::pair<float, Point> &direction,
ExPolygon & expolygon,
Polylines & polylines_out,
FillAdaptive_Internal::Octree *octree);
public:
static std::unique_ptr<FillAdaptive_Internal::Octree> build_octree(
TriangleMesh &triangle_mesh,
coordf_t line_spacing,
const Vec3d & cube_center);
static void expand_cube(
FillAdaptive_Internal::Cube *cube,
const std::vector<FillAdaptive_Internal::CubeProperties> &cubes_properties,
const AABBTreeIndirect::Tree3f &distance_tree,
const TriangleMesh & triangle_mesh,
int depth);
};
class FillSupportCubic : public FillAdaptive
{
public:
virtual ~FillSupportCubic() = default;
protected:
virtual Fill* clone() const { return new FillSupportCubic(*this); };
virtual bool no_sort() const { return true; }
virtual void _fill_surface_single(
const FillParams &params,
unsigned int thickness_layers,
const std::pair<float, Point> &direction,
ExPolygon &expolygon,
Polylines &polylines_out);
public:
static std::unique_ptr<FillAdaptive_Internal::Octree> build_octree(
TriangleMesh & triangle_mesh,
coordf_t line_spacing,
const Vec3d & cube_center,
const Transform3d &rotation_matrix);
};
// Calculate line spacing for
// 1) adaptive cubic infill
// 2) adaptive internal support cubic infill
// Returns zero for a particular infill type if no such infill is to be generated.
std::pair<double, double> adaptive_fill_line_spacing(const PrintObject &print_object);
} // namespace Slic3r
#endif // slic3r_FillAdaptive_hpp_

View file

@ -16,6 +16,7 @@
#include "FillRectilinear.hpp" #include "FillRectilinear.hpp"
#include "FillRectilinear2.hpp" #include "FillRectilinear2.hpp"
#include "FillRectilinear3.hpp" #include "FillRectilinear3.hpp"
#include "FillAdaptive.hpp"
namespace Slic3r { namespace Slic3r {
@ -37,7 +38,9 @@ Fill* Fill::new_from_type(const InfillPattern type)
case ipArchimedeanChords: return new FillArchimedeanChords(); case ipArchimedeanChords: return new FillArchimedeanChords();
case ipHilbertCurve: return new FillHilbertCurve(); case ipHilbertCurve: return new FillHilbertCurve();
case ipOctagramSpiral: return new FillOctagramSpiral(); case ipOctagramSpiral: return new FillOctagramSpiral();
default: throw std::invalid_argument("unknown type"); case ipAdaptiveCubic: return new FillAdaptive();
case ipSupportCubic: return new FillSupportCubic();
default: throw Slic3r::InvalidArgument("unknown type");
} }
} }

View file

@ -11,6 +11,7 @@
#include "../libslic3r.h" #include "../libslic3r.h"
#include "../BoundingBox.hpp" #include "../BoundingBox.hpp"
#include "../Exception.hpp"
#include "../Utils.hpp" #include "../Utils.hpp"
namespace Slic3r { namespace Slic3r {
@ -19,9 +20,14 @@ class ExPolygon;
class Surface; class Surface;
enum InfillPattern : int; enum InfillPattern : int;
class InfillFailedException : public std::runtime_error { namespace FillAdaptive_Internal {
struct Octree;
};
// Infill shall never fail, therefore the error is classified as RuntimeError, not SlicingError.
class InfillFailedException : public Slic3r::RuntimeError {
public: public:
InfillFailedException() : std::runtime_error("Infill failed") {} InfillFailedException() : Slic3r::RuntimeError("Infill failed") {}
}; };
struct FillParams struct FillParams
@ -69,6 +75,11 @@ public:
// In scaled coordinates. Bounding box of the 2D projection of the object. // In scaled coordinates. Bounding box of the 2D projection of the object.
BoundingBox bounding_box; BoundingBox bounding_box;
// Octree builds on mesh for usage in the adaptive cubic infill
FillAdaptive_Internal::Octree* adapt_fill_octree = nullptr;
// Octree builds on mesh for usage in the support cubic infill
FillAdaptive_Internal::Octree* support_fill_octree = nullptr;
public: public:
virtual ~Fill() {} virtual ~Fill() {}

View file

@ -53,7 +53,7 @@ static inline FlowRole opt_key_to_flow_role(const std::string &opt_key)
else if (opt_key == "support_material_extrusion_width") else if (opt_key == "support_material_extrusion_width")
return frSupportMaterial; return frSupportMaterial;
else else
throw std::runtime_error("opt_key_to_flow_role: invalid argument"); throw Slic3r::RuntimeError("opt_key_to_flow_role: invalid argument");
}; };
static inline void throw_on_missing_variable(const std::string &opt_key, const char *dependent_opt_key) static inline void throw_on_missing_variable(const std::string &opt_key, const char *dependent_opt_key)
@ -126,7 +126,7 @@ Flow Flow::new_from_config_width(FlowRole role, const ConfigOptionFloatOrPercent
{ {
// we need layer height unless it's a bridge // we need layer height unless it's a bridge
if (height <= 0 && bridge_flow_ratio == 0) if (height <= 0 && bridge_flow_ratio == 0)
throw std::invalid_argument("Invalid flow height supplied to new_from_config_width()"); throw Slic3r::InvalidArgument("Invalid flow height supplied to new_from_config_width()");
float w; float w;
if (bridge_flow_ratio > 0) { if (bridge_flow_ratio > 0) {
@ -151,7 +151,7 @@ Flow Flow::new_from_spacing(float spacing, float nozzle_diameter, float height,
{ {
// we need layer height unless it's a bridge // we need layer height unless it's a bridge
if (height <= 0 && !bridge) if (height <= 0 && !bridge)
throw std::invalid_argument("Invalid flow height supplied to new_from_spacing()"); throw Slic3r::InvalidArgument("Invalid flow height supplied to new_from_spacing()");
// Calculate width from spacing. // Calculate width from spacing.
// For normal extrusons, extrusion width is wider than the spacing due to the rounding and squishing of the extrusions. // For normal extrusons, extrusion width is wider than the spacing due to the rounding and squishing of the extrusions.
// For bridge extrusions, the extrusions are placed with a tiny BRIDGE_EXTRA_SPACING gaps between the threads. // For bridge extrusions, the extrusions are placed with a tiny BRIDGE_EXTRA_SPACING gaps between the threads.

View file

@ -3,6 +3,7 @@
#include "libslic3r.h" #include "libslic3r.h"
#include "Config.hpp" #include "Config.hpp"
#include "Exception.hpp"
#include "ExtrusionEntity.hpp" #include "ExtrusionEntity.hpp"
namespace Slic3r { namespace Slic3r {
@ -27,11 +28,11 @@ enum FlowRole {
frSupportMaterialInterface, frSupportMaterialInterface,
}; };
class FlowError : public std::invalid_argument class FlowError : public Slic3r::InvalidArgument
{ {
public: public:
FlowError(const std::string& what_arg) : invalid_argument(what_arg) {} FlowError(const std::string& what_arg) : Slic3r::InvalidArgument(what_arg) {}
FlowError(const char* what_arg) : invalid_argument(what_arg) {} FlowError(const char* what_arg) : Slic3r::InvalidArgument(what_arg) {}
}; };
class FlowErrorNegativeSpacing : public FlowError class FlowErrorNegativeSpacing : public FlowError

View file

@ -1,9 +1,11 @@
#include "../libslic3r.h" #include "../libslic3r.h"
#include "../Exception.hpp"
#include "../Model.hpp" #include "../Model.hpp"
#include "../Utils.hpp" #include "../Utils.hpp"
#include "../GCode.hpp" #include "../GCode.hpp"
#include "../Geometry.hpp" #include "../Geometry.hpp"
#include "../GCode/ThumbnailData.hpp" #include "../GCode/ThumbnailData.hpp"
#include "../Time.hpp"
#include "../I18N.hpp" #include "../I18N.hpp"
@ -85,6 +87,8 @@ const char* OBJECTID_ATTR = "objectid";
const char* TRANSFORM_ATTR = "transform"; const char* TRANSFORM_ATTR = "transform";
const char* PRINTABLE_ATTR = "printable"; const char* PRINTABLE_ATTR = "printable";
const char* INSTANCESCOUNT_ATTR = "instances_count"; const char* INSTANCESCOUNT_ATTR = "instances_count";
const char* CUSTOM_SUPPORTS_ATTR = "slic3rpe:custom_supports";
const char* CUSTOM_SEAM_ATTR = "slic3rpe:custom_seam";
const char* KEY_ATTR = "key"; const char* KEY_ATTR = "key";
const char* VALUE_ATTR = "value"; const char* VALUE_ATTR = "value";
@ -120,11 +124,11 @@ const char* INVALID_OBJECT_TYPES[] =
"other" "other"
}; };
class version_error : public std::runtime_error class version_error : public Slic3r::FileIOError
{ {
public: public:
version_error(const std::string& what_arg) : std::runtime_error(what_arg) {} version_error(const std::string& what_arg) : Slic3r::FileIOError(what_arg) {}
version_error(const char* what_arg) : std::runtime_error(what_arg) {} version_error(const char* what_arg) : Slic3r::FileIOError(what_arg) {}
}; };
const char* get_attribute_value_charptr(const char** attributes, unsigned int attributes_size, const char* attribute_key) const char* get_attribute_value_charptr(const char** attributes, unsigned int attributes_size, const char* attribute_key)
@ -282,6 +286,8 @@ namespace Slic3r {
{ {
std::vector<float> vertices; std::vector<float> vertices;
std::vector<unsigned int> triangles; std::vector<unsigned int> triangles;
std::vector<std::string> custom_supports;
std::vector<std::string> custom_seam;
bool empty() bool empty()
{ {
@ -292,6 +298,8 @@ namespace Slic3r {
{ {
vertices.clear(); vertices.clear();
triangles.clear(); triangles.clear();
custom_supports.clear();
custom_seam.clear();
} }
}; };
@ -600,7 +608,7 @@ namespace Slic3r {
{ {
// ensure the zip archive is closed and rethrow the exception // ensure the zip archive is closed and rethrow the exception
close_zip_reader(&archive); close_zip_reader(&archive);
throw std::runtime_error(e.what()); throw Slic3r::FileIOError(e.what());
} }
} }
} }
@ -773,7 +781,7 @@ namespace Slic3r {
{ {
char error_buf[1024]; char error_buf[1024];
::sprintf(error_buf, "Error (%s) while parsing '%s' at line %d", XML_ErrorString(XML_GetErrorCode(data->parser)), data->stat.m_filename, (int)XML_GetCurrentLineNumber(data->parser)); ::sprintf(error_buf, "Error (%s) while parsing '%s' at line %d", XML_ErrorString(XML_GetErrorCode(data->parser)), data->stat.m_filename, (int)XML_GetCurrentLineNumber(data->parser));
throw std::runtime_error(error_buf); throw Slic3r::FileIOError(error_buf);
} }
return n; return n;
@ -782,7 +790,7 @@ namespace Slic3r {
catch (const version_error& e) catch (const version_error& e)
{ {
// rethrow the exception // rethrow the exception
throw std::runtime_error(e.what()); throw Slic3r::FileIOError(e.what());
} }
catch (std::exception& e) catch (std::exception& e)
{ {
@ -1111,6 +1119,15 @@ namespace Slic3r {
float(std::atof(object_data_points[i+7].c_str()))); float(std::atof(object_data_points[i+7].c_str())));
} }
// The holes are saved elevated above the mesh and deeper (bad idea indeed).
// This is retained for compatibility.
// Place the hole to the mesh and make it shallower to compensate.
// The offset is 1 mm above the mesh.
for (sla::DrainHole& hole : sla_drain_holes) {
hole.pos += hole.normal.normalized();
hole.height -= 1.f;
}
if (!sla_drain_holes.empty()) if (!sla_drain_holes.empty())
m_sla_drain_holes.insert(IdToSlaDrainHolesMap::value_type(object_id, sla_drain_holes)); m_sla_drain_holes.insert(IdToSlaDrainHolesMap::value_type(object_id, sla_drain_holes));
} }
@ -1538,6 +1555,9 @@ namespace Slic3r {
m_curr_object.geometry.triangles.push_back((unsigned int)get_attribute_value_int(attributes, num_attributes, V1_ATTR)); m_curr_object.geometry.triangles.push_back((unsigned int)get_attribute_value_int(attributes, num_attributes, V1_ATTR));
m_curr_object.geometry.triangles.push_back((unsigned int)get_attribute_value_int(attributes, num_attributes, V2_ATTR)); m_curr_object.geometry.triangles.push_back((unsigned int)get_attribute_value_int(attributes, num_attributes, V2_ATTR));
m_curr_object.geometry.triangles.push_back((unsigned int)get_attribute_value_int(attributes, num_attributes, V3_ATTR)); m_curr_object.geometry.triangles.push_back((unsigned int)get_attribute_value_int(attributes, num_attributes, V3_ATTR));
m_curr_object.geometry.custom_supports.push_back(get_attribute_value_string(attributes, num_attributes, CUSTOM_SUPPORTS_ATTR));
m_curr_object.geometry.custom_seam.push_back(get_attribute_value_string(attributes, num_attributes, CUSTOM_SEAM_ATTR));
return true; return true;
} }
@ -1871,6 +1891,18 @@ namespace Slic3r {
volume->source.transform = Slic3r::Geometry::Transformation(volume_matrix_to_object); volume->source.transform = Slic3r::Geometry::Transformation(volume_matrix_to_object);
volume->calculate_convex_hull(); volume->calculate_convex_hull();
// recreate custom supports and seam from previously loaded attribute
for (unsigned i=0; i<triangles_count; ++i) {
size_t index = src_start_id/3 + i;
assert(index < geometry.custom_supports.size());
assert(index < geometry.custom_seam.size());
if (! geometry.custom_supports[index].empty())
volume->m_supported_facets.set_triangle_from_string(i, geometry.custom_supports[index]);
if (! geometry.custom_seam[index].empty())
volume->m_seam_facets.set_triangle_from_string(i, geometry.custom_seam[index]);
}
// apply the remaining volume's metadata // apply the remaining volume's metadata
for (const Metadata& metadata : volume_data.metadata) for (const Metadata& metadata : volume_data.metadata)
{ {
@ -1991,7 +2023,7 @@ namespace Slic3r {
bool _add_content_types_file_to_archive(mz_zip_archive& archive); bool _add_content_types_file_to_archive(mz_zip_archive& archive);
bool _add_thumbnail_file_to_archive(mz_zip_archive& archive, const ThumbnailData& thumbnail_data); bool _add_thumbnail_file_to_archive(mz_zip_archive& archive, const ThumbnailData& thumbnail_data);
bool _add_relationships_file_to_archive(mz_zip_archive& archive); bool _add_relationships_file_to_archive(mz_zip_archive& archive);
bool _add_model_file_to_archive(mz_zip_archive& archive, const Model& model, IdToObjectDataMap &objects_data); bool _add_model_file_to_archive(const std::string& filename, mz_zip_archive& archive, const Model& model, IdToObjectDataMap& objects_data);
bool _add_object_to_model_stream(std::stringstream& stream, unsigned int& object_id, ModelObject& object, BuildItemsList& build_items, VolumeToOffsetsMap& volumes_offsets); bool _add_object_to_model_stream(std::stringstream& stream, unsigned int& object_id, ModelObject& object, BuildItemsList& build_items, VolumeToOffsetsMap& volumes_offsets);
bool _add_mesh_to_object_stream(std::stringstream& stream, ModelObject& object, VolumeToOffsetsMap& volumes_offsets); bool _add_mesh_to_object_stream(std::stringstream& stream, ModelObject& object, VolumeToOffsetsMap& volumes_offsets);
bool _add_build_to_model_stream(std::stringstream& stream, const BuildItemsList& build_items); bool _add_build_to_model_stream(std::stringstream& stream, const BuildItemsList& build_items);
@ -2054,7 +2086,7 @@ namespace Slic3r {
// Adds model file ("3D/3dmodel.model"). // Adds model file ("3D/3dmodel.model").
// This is the one and only file that contains all the geometry (vertices and triangles) of all ModelVolumes. // This is the one and only file that contains all the geometry (vertices and triangles) of all ModelVolumes.
IdToObjectDataMap objects_data; IdToObjectDataMap objects_data;
if (!_add_model_file_to_archive(archive, model, objects_data)) if (!_add_model_file_to_archive(filename, archive, model, objects_data))
{ {
close_zip_writer(&archive); close_zip_writer(&archive);
boost::filesystem::remove(filename); boost::filesystem::remove(filename);
@ -2203,7 +2235,7 @@ namespace Slic3r {
return true; return true;
} }
bool _3MF_Exporter::_add_model_file_to_archive(mz_zip_archive& archive, const Model& model, IdToObjectDataMap &objects_data) bool _3MF_Exporter::_add_model_file_to_archive(const std::string& filename, mz_zip_archive& archive, const Model& model, IdToObjectDataMap& objects_data)
{ {
std::stringstream stream; std::stringstream stream;
// https://en.cppreference.com/w/cpp/types/numeric_limits/max_digits10 // https://en.cppreference.com/w/cpp/types/numeric_limits/max_digits10
@ -2214,6 +2246,19 @@ namespace Slic3r {
stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
stream << "<" << MODEL_TAG << " unit=\"millimeter\" xml:lang=\"en-US\" xmlns=\"http://schemas.microsoft.com/3dmanufacturing/core/2015/02\" xmlns:slic3rpe=\"http://schemas.slic3r.org/3mf/2017/06\">\n"; stream << "<" << MODEL_TAG << " unit=\"millimeter\" xml:lang=\"en-US\" xmlns=\"http://schemas.microsoft.com/3dmanufacturing/core/2015/02\" xmlns:slic3rpe=\"http://schemas.slic3r.org/3mf/2017/06\">\n";
stream << " <" << METADATA_TAG << " name=\"" << SLIC3RPE_3MF_VERSION << "\">" << VERSION_3MF << "</" << METADATA_TAG << ">\n"; stream << " <" << METADATA_TAG << " name=\"" << SLIC3RPE_3MF_VERSION << "\">" << VERSION_3MF << "</" << METADATA_TAG << ">\n";
std::string name = boost::filesystem::path(filename).stem().string();
stream << " <" << METADATA_TAG << " name=\"Title\">" << name << "</" << METADATA_TAG << ">\n";
stream << " <" << METADATA_TAG << " name=\"Designer\">" << "</" << METADATA_TAG << ">\n";
stream << " <" << METADATA_TAG << " name=\"Description\">" << name << "</" << METADATA_TAG << ">\n";
stream << " <" << METADATA_TAG << " name=\"Copyright\">" << "</" << METADATA_TAG << ">\n";
stream << " <" << METADATA_TAG << " name=\"LicenseTerms\">" << "</" << METADATA_TAG << ">\n";
stream << " <" << METADATA_TAG << " name=\"Rating\">" << "</" << METADATA_TAG << ">\n";
std::string date = Slic3r::Utils::utc_timestamp(Slic3r::Utils::get_current_time_utc());
// keep only the date part of the string
date = date.substr(0, 10);
stream << " <" << METADATA_TAG << " name=\"CreationDate\">" << date << "</" << METADATA_TAG << ">\n";
stream << " <" << METADATA_TAG << " name=\"ModificationDate\">" << date << "</" << METADATA_TAG << ">\n";
stream << " <" << METADATA_TAG << " name=\"Application\">" << SLIC3R_APP_KEY << "-" << SLIC3R_VERSION << "</" << METADATA_TAG << ">\n";
stream << " <" << RESOURCES_TAG << ">\n"; stream << " <" << RESOURCES_TAG << ">\n";
// Instance transformations, indexed by the 3MF object ID (which is a linear serialization of all instances of all ModelObjects). // Instance transformations, indexed by the 3MF object ID (which is a linear serialization of all instances of all ModelObjects).
@ -2316,9 +2361,9 @@ namespace Slic3r {
continue; continue;
if (!volume->mesh().repaired) if (!volume->mesh().repaired)
throw std::runtime_error("store_3mf() requires repair()"); throw Slic3r::FileIOError("store_3mf() requires repair()");
if (!volume->mesh().has_shared_vertices()) if (!volume->mesh().has_shared_vertices())
throw std::runtime_error("store_3mf() requires shared vertices"); throw Slic3r::FileIOError("store_3mf() requires shared vertices");
volumes_offsets.insert(VolumeToOffsetsMap::value_type(volume, Offsets(vertices_count))).first; volumes_offsets.insert(VolumeToOffsetsMap::value_type(volume, Offsets(vertices_count))).first;
@ -2369,6 +2414,15 @@ namespace Slic3r {
{ {
stream << "v" << j + 1 << "=\"" << its.indices[i][j] + volume_it->second.first_vertex_id << "\" "; stream << "v" << j + 1 << "=\"" << its.indices[i][j] + volume_it->second.first_vertex_id << "\" ";
} }
std::string custom_supports_data_string = volume->m_supported_facets.get_triangle_as_string(i);
if (! custom_supports_data_string.empty())
stream << CUSTOM_SUPPORTS_ATTR << "=\"" << custom_supports_data_string << "\" ";
std::string custom_seam_data_string = volume->m_seam_facets.get_triangle_as_string(i);
if (! custom_seam_data_string.empty())
stream << CUSTOM_SEAM_ATTR << "=\"" << custom_seam_data_string << "\" ";
stream << "/>\n"; stream << "/>\n";
} }
} }
@ -2559,7 +2613,18 @@ namespace Slic3r {
for (const ModelObject* object : model.objects) for (const ModelObject* object : model.objects)
{ {
++count; ++count;
auto& drain_holes = object->sla_drain_holes; sla::DrainHoles drain_holes = object->sla_drain_holes;
// The holes were placed 1mm above the mesh in the first implementation.
// This was a bad idea and the reference point was changed in 2.3 so
// to be on the mesh exactly. The elevated position is still saved
// in 3MFs for compatibility reasons.
for (sla::DrainHole& hole : drain_holes) {
hole.pos -= hole.normal.normalized();
hole.height += 1.f;
}
if (!drain_holes.empty()) if (!drain_holes.empty())
{ {
out += string_printf(fmt, count); out += string_printf(fmt, count);

View file

@ -35,6 +35,6 @@ namespace Slic3r {
// The model could be modified during the export process if meshes are not repaired or have no shared vertices // The model could be modified during the export process if meshes are not repaired or have no shared vertices
extern bool store_3mf(const char* path, Model* model, const DynamicPrintConfig* config, bool fullpath_sources, const ThumbnailData* thumbnail_data = nullptr); extern bool store_3mf(const char* path, Model* model, const DynamicPrintConfig* config, bool fullpath_sources, const ThumbnailData* thumbnail_data = nullptr);
}; // namespace Slic3r } // namespace Slic3r
#endif /* slic3r_Format_3mf_hpp_ */ #endif /* slic3r_Format_3mf_hpp_ */

View file

@ -7,6 +7,7 @@
#include <boost/nowide/cstdio.hpp> #include <boost/nowide/cstdio.hpp>
#include "../libslic3r.h" #include "../libslic3r.h"
#include "../Exception.hpp"
#include "../Model.hpp" #include "../Model.hpp"
#include "../GCode.hpp" #include "../GCode.hpp"
#include "../PrintConfig.hpp" #include "../PrintConfig.hpp"
@ -923,7 +924,7 @@ bool extract_model_from_archive(mz_zip_archive& archive, const mz_zip_archive_fi
{ {
char error_buf[1024]; char error_buf[1024];
::sprintf(error_buf, "Error (%s) while parsing '%s' at line %d", XML_ErrorString(XML_GetErrorCode(data->parser)), data->stat.m_filename, (int)XML_GetCurrentLineNumber(data->parser)); ::sprintf(error_buf, "Error (%s) while parsing '%s' at line %d", XML_ErrorString(XML_GetErrorCode(data->parser)), data->stat.m_filename, (int)XML_GetCurrentLineNumber(data->parser));
throw std::runtime_error(error_buf); throw Slic3r::FileIOError(error_buf);
} }
return n; return n;
@ -948,9 +949,9 @@ bool extract_model_from_archive(mz_zip_archive& archive, const mz_zip_archive_fi
if (check_version && (ctx.m_version > VERSION_AMF_COMPATIBLE)) if (check_version && (ctx.m_version > VERSION_AMF_COMPATIBLE))
{ {
// std::string msg = _(L("The selected amf file has been saved with a newer version of " + std::string(SLIC3R_APP_NAME) + " and is not compatible.")); // std::string msg = _(L("The selected amf file has been saved with a newer version of " + std::string(SLIC3R_APP_NAME) + " and is not compatible."));
// throw std::runtime_error(msg.c_str()); // throw Slic3r::FileIOError(msg.c_str());
const std::string msg = (boost::format(_(L("The selected amf file has been saved with a newer version of %1% and is not compatible."))) % std::string(SLIC3R_APP_NAME)).str(); const std::string msg = (boost::format(_(L("The selected amf file has been saved with a newer version of %1% and is not compatible."))) % std::string(SLIC3R_APP_NAME)).str();
throw std::runtime_error(msg); throw Slic3r::FileIOError(msg);
} }
return true; return true;
@ -994,7 +995,7 @@ bool load_amf_archive(const char* path, DynamicPrintConfig* config, Model* model
{ {
// ensure the zip archive is closed and rethrow the exception // ensure the zip archive is closed and rethrow the exception
close_zip_reader(&archive); close_zip_reader(&archive);
throw std::runtime_error(e.what()); throw Slic3r::FileIOError(e.what());
} }
break; break;
@ -1147,9 +1148,9 @@ bool store_amf(const char* path, Model* model, const DynamicPrintConfig* config,
for (ModelVolume *volume : object->volumes) { for (ModelVolume *volume : object->volumes) {
vertices_offsets.push_back(num_vertices); vertices_offsets.push_back(num_vertices);
if (! volume->mesh().repaired) if (! volume->mesh().repaired)
throw std::runtime_error("store_amf() requires repair()"); throw Slic3r::FileIOError("store_amf() requires repair()");
if (! volume->mesh().has_shared_vertices()) if (! volume->mesh().has_shared_vertices())
throw std::runtime_error("store_amf() requires shared vertices"); throw Slic3r::FileIOError("store_amf() requires shared vertices");
const indexed_triangle_set &its = volume->mesh().its; const indexed_triangle_set &its = volume->mesh().its;
const Transform3d& matrix = volume->get_matrix(); const Transform3d& matrix = volume->get_matrix();
for (size_t i = 0; i < its.vertices.size(); ++i) { for (size_t i = 0; i < its.vertices.size(); ++i) {

View file

@ -147,7 +147,7 @@ static void extract_model_from_archive(
} }
} }
if (! trafo_set) if (! trafo_set)
throw std::runtime_error(std::string("Archive ") + path + " does not contain a valid entry in scene.xml for " + name); throw Slic3r::FileIOError(std::string("Archive ") + path + " does not contain a valid entry in scene.xml for " + name);
// Extract the STL. // Extract the STL.
StlHeader header; StlHeader header;
@ -266,7 +266,7 @@ static void extract_model_from_archive(
} }
if (! mesh_valid) if (! mesh_valid)
throw std::runtime_error(std::string("Archive ") + path + " does not contain a valid mesh for " + name); throw Slic3r::FileIOError(std::string("Archive ") + path + " does not contain a valid mesh for " + name);
// Add this mesh to the model. // Add this mesh to the model.
ModelVolume *volume = nullptr; ModelVolume *volume = nullptr;
@ -303,7 +303,7 @@ bool load_prus(const char *path, Model *model)
mz_bool res = MZ_FALSE; mz_bool res = MZ_FALSE;
try { try {
if (!open_zip_reader(&archive, path)) if (!open_zip_reader(&archive, path))
throw std::runtime_error(std::string("Unable to init zip reader for ") + path); throw Slic3r::FileIOError(std::string("Unable to init zip reader for ") + path);
std::vector<char> scene_xml_data; std::vector<char> scene_xml_data;
// For grouping multiple STLs into a single ModelObject for multi-material prints. // For grouping multiple STLs into a single ModelObject for multi-material prints.
std::map<int, ModelObject*> group_to_model_object; std::map<int, ModelObject*> group_to_model_object;
@ -316,10 +316,10 @@ bool load_prus(const char *path, Model *model)
buffer.assign((size_t)stat.m_uncomp_size, 0); buffer.assign((size_t)stat.m_uncomp_size, 0);
res = mz_zip_reader_extract_file_to_mem(&archive, stat.m_filename, (char*)buffer.data(), (size_t)stat.m_uncomp_size, 0); res = mz_zip_reader_extract_file_to_mem(&archive, stat.m_filename, (char*)buffer.data(), (size_t)stat.m_uncomp_size, 0);
if (res == MZ_FALSE) if (res == MZ_FALSE)
std::runtime_error(std::string("Error while extracting a file from ") + path); throw Slic3r::FileIOError(std::string("Error while extracting a file from ") + path);
if (strcmp(stat.m_filename, "scene.xml") == 0) { if (strcmp(stat.m_filename, "scene.xml") == 0) {
if (! scene_xml_data.empty()) if (! scene_xml_data.empty())
throw std::runtime_error(std::string("Multiple scene.xml were found in the archive.") + path); throw Slic3r::FileIOError(std::string("Multiple scene.xml were found in the archive.") + path);
scene_xml_data = std::move(buffer); scene_xml_data = std::move(buffer);
} else if (boost::iends_with(stat.m_filename, ".stl")) { } else if (boost::iends_with(stat.m_filename, ".stl")) {
// May throw std::exception // May throw std::exception

View file

@ -8,8 +8,317 @@
#include "libslic3r/Zipper.hpp" #include "libslic3r/Zipper.hpp"
#include "libslic3r/SLAPrint.hpp" #include "libslic3r/SLAPrint.hpp"
#include <sstream>
#include "libslic3r/Exception.hpp"
#include "libslic3r/SlicesToTriangleMesh.hpp"
#include "libslic3r/MarchingSquares.hpp"
#include "libslic3r/ClipperUtils.hpp"
#include "libslic3r/MTUtils.hpp"
#include "libslic3r/PrintConfig.hpp"
#include "libslic3r/SLA/RasterBase.hpp"
#include "libslic3r/miniz_extension.hpp"
#include "libslic3r/PNGRead.hpp"
#include <boost/property_tree/ini_parser.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/algorithm/string.hpp>
namespace marchsq {
template<> struct _RasterTraits<Slic3r::png::ImageGreyscale> {
using Rst = Slic3r::png::ImageGreyscale;
// The type of pixel cell in the raster
using ValueType = uint8_t;
// Value at a given position
static uint8_t get(const Rst &rst, size_t row, size_t col)
{
return rst.get(row, col);
}
// Number of rows and cols of the raster
static size_t rows(const Rst &rst) { return rst.rows; }
static size_t cols(const Rst &rst) { return rst.cols; }
};
} // namespace marchsq
namespace Slic3r { namespace Slic3r {
namespace {
struct PNGBuffer { std::vector<uint8_t> buf; std::string fname; };
struct ArchiveData {
boost::property_tree::ptree profile, config;
std::vector<PNGBuffer> images;
};
static const constexpr char *CONFIG_FNAME = "config.ini";
static const constexpr char *PROFILE_FNAME = "prusaslicer.ini";
boost::property_tree::ptree read_ini(const mz_zip_archive_file_stat &entry,
MZ_Archive & zip)
{
std::string buf(size_t(entry.m_uncomp_size), '\0');
if (!mz_zip_reader_extract_file_to_mem(&zip.arch, entry.m_filename,
buf.data(), buf.size(), 0))
throw Slic3r::FileIOError(zip.get_errorstr());
boost::property_tree::ptree tree;
std::stringstream ss(buf);
boost::property_tree::read_ini(ss, tree);
return tree;
}
PNGBuffer read_png(const mz_zip_archive_file_stat &entry,
MZ_Archive & zip,
const std::string & name)
{
std::vector<uint8_t> buf(entry.m_uncomp_size);
if (!mz_zip_reader_extract_file_to_mem(&zip.arch, entry.m_filename,
buf.data(), buf.size(), 0))
throw Slic3r::FileIOError(zip.get_errorstr());
return {std::move(buf), (name.empty() ? entry.m_filename : name)};
}
ArchiveData extract_sla_archive(const std::string &zipfname,
const std::string &exclude)
{
ArchiveData arch;
// Little RAII
struct Arch: public MZ_Archive {
Arch(const std::string &fname) {
if (!open_zip_reader(&arch, fname))
throw Slic3r::FileIOError(get_errorstr());
}
~Arch() { close_zip_reader(&arch); }
} zip (zipfname);
mz_uint num_entries = mz_zip_reader_get_num_files(&zip.arch);
for (mz_uint i = 0; i < num_entries; ++i)
{
mz_zip_archive_file_stat entry;
if (mz_zip_reader_file_stat(&zip.arch, i, &entry))
{
std::string name = entry.m_filename;
boost::algorithm::to_lower(name);
if (boost::algorithm::contains(name, exclude)) continue;
if (name == CONFIG_FNAME) arch.config = read_ini(entry, zip);
if (name == PROFILE_FNAME) arch.profile = read_ini(entry, zip);
if (boost::filesystem::path(name).extension().string() == ".png") {
auto it = std::lower_bound(
arch.images.begin(), arch.images.end(), PNGBuffer{{}, name},
[](const PNGBuffer &r1, const PNGBuffer &r2) {
return std::less<std::string>()(r1.fname, r2.fname);
});
arch.images.insert(it, read_png(entry, zip, name));
}
}
}
return arch;
}
ExPolygons rings_to_expolygons(const std::vector<marchsq::Ring> &rings,
double px_w, double px_h)
{
ExPolygons polys; polys.reserve(rings.size());
for (const marchsq::Ring &ring : rings) {
Polygon poly; Points &pts = poly.points;
pts.reserve(ring.size());
for (const marchsq::Coord &crd : ring)
pts.emplace_back(scaled(crd.c * px_w), scaled(crd.r * px_h));
polys.emplace_back(poly);
}
// reverse the raster transformations
return union_ex(polys);
}
template<class Fn> void foreach_vertex(ExPolygon &poly, Fn &&fn)
{
for (auto &p : poly.contour.points) fn(p);
for (auto &h : poly.holes)
for (auto &p : h.points) fn(p);
}
void invert_raster_trafo(ExPolygons & expolys,
const sla::RasterBase::Trafo &trafo,
coord_t width,
coord_t height)
{
if (trafo.flipXY) std::swap(height, width);
for (auto &expoly : expolys) {
if (trafo.mirror_y)
foreach_vertex(expoly, [height](Point &p) {p.y() = height - p.y(); });
if (trafo.mirror_x)
foreach_vertex(expoly, [width](Point &p) {p.x() = width - p.x(); });
expoly.translate(-trafo.center_x, -trafo.center_y);
if (trafo.flipXY)
foreach_vertex(expoly, [](Point &p) { std::swap(p.x(), p.y()); });
if ((trafo.mirror_x + trafo.mirror_y + trafo.flipXY) % 2) {
expoly.contour.reverse();
for (auto &h : expoly.holes) h.reverse();
}
}
}
struct RasterParams {
sla::RasterBase::Trafo trafo; // Raster transformations
coord_t width, height; // scaled raster dimensions (not resolution)
double px_h, px_w; // pixel dimesions
marchsq::Coord win; // marching squares window size
};
RasterParams get_raster_params(const DynamicPrintConfig &cfg)
{
auto *opt_disp_cols = cfg.option<ConfigOptionInt>("display_pixels_x");
auto *opt_disp_rows = cfg.option<ConfigOptionInt>("display_pixels_y");
auto *opt_disp_w = cfg.option<ConfigOptionFloat>("display_width");
auto *opt_disp_h = cfg.option<ConfigOptionFloat>("display_height");
auto *opt_mirror_x = cfg.option<ConfigOptionBool>("display_mirror_x");
auto *opt_mirror_y = cfg.option<ConfigOptionBool>("display_mirror_y");
auto *opt_orient = cfg.option<ConfigOptionEnum<SLADisplayOrientation>>("display_orientation");
if (!opt_disp_cols || !opt_disp_rows || !opt_disp_w || !opt_disp_h ||
!opt_mirror_x || !opt_mirror_y || !opt_orient)
throw Slic3r::FileIOError("Invalid SL1 file");
RasterParams rstp;
rstp.px_w = opt_disp_w->value / (opt_disp_cols->value - 1);
rstp.px_h = opt_disp_h->value / (opt_disp_rows->value - 1);
rstp.trafo = sla::RasterBase::Trafo{opt_orient->value == sladoLandscape ?
sla::RasterBase::roLandscape :
sla::RasterBase::roPortrait,
{opt_mirror_x->value, opt_mirror_y->value}};
rstp.height = scaled(opt_disp_h->value);
rstp.width = scaled(opt_disp_w->value);
return rstp;
}
struct SliceParams { double layerh = 0., initial_layerh = 0.; };
SliceParams get_slice_params(const DynamicPrintConfig &cfg)
{
auto *opt_layerh = cfg.option<ConfigOptionFloat>("layer_height");
auto *opt_init_layerh = cfg.option<ConfigOptionFloat>("initial_layer_height");
if (!opt_layerh || !opt_init_layerh)
throw Slic3r::FileIOError("Invalid SL1 file");
return SliceParams{opt_layerh->getFloat(), opt_init_layerh->getFloat()};
}
std::vector<ExPolygons> extract_slices_from_sla_archive(
ArchiveData & arch,
const RasterParams & rstp,
std::function<bool(int)> progr)
{
auto jobdir = arch.config.get<std::string>("jobDir");
for (auto &c : jobdir) c = std::tolower(c);
std::vector<ExPolygons> slices(arch.images.size());
struct Status
{
double incr, val, prev;
bool stop = false;
tbb::spin_mutex mutex;
} st {100. / slices.size(), 0., 0.};
tbb::parallel_for(size_t(0), arch.images.size(),
[&arch, &slices, &st, &rstp, progr](size_t i) {
// Status indication guarded with the spinlock
{
std::lock_guard<tbb::spin_mutex> lck(st.mutex);
if (st.stop) return;
st.val += st.incr;
double curr = std::round(st.val);
if (curr > st.prev) {
st.prev = curr;
st.stop = !progr(int(curr));
}
}
png::ImageGreyscale img;
png::ReadBuf rb{arch.images[i].buf.data(), arch.images[i].buf.size()};
if (!png::decode_png(rb, img)) return;
auto rings = marchsq::execute(img, 128, rstp.win);
ExPolygons expolys = rings_to_expolygons(rings, rstp.px_w, rstp.px_h);
// Invert the raster transformations indicated in
// the profile metadata
invert_raster_trafo(expolys, rstp.trafo, rstp.width, rstp.height);
slices[i] = std::move(expolys);
});
if (st.stop) slices = {};
return slices;
}
} // namespace
void import_sla_archive(const std::string &zipfname, DynamicPrintConfig &out)
{
ArchiveData arch = extract_sla_archive(zipfname, "png");
out.load(arch.profile);
}
void import_sla_archive(
const std::string & zipfname,
Vec2i windowsize,
TriangleMesh & out,
DynamicPrintConfig & profile,
std::function<bool(int)> progr)
{
// Ensure minimum window size for marching squares
windowsize.x() = std::max(2, windowsize.x());
windowsize.y() = std::max(2, windowsize.y());
ArchiveData arch = extract_sla_archive(zipfname, "thumbnail");
profile.load(arch.profile);
RasterParams rstp = get_raster_params(profile);
rstp.win = {windowsize.y(), windowsize.x()};
SliceParams slicp = get_slice_params(profile);
std::vector<ExPolygons> slices =
extract_slices_from_sla_archive(arch, rstp, progr);
if (!slices.empty())
out = slices_to_triangle_mesh(slices, 0, slicp.layerh, slicp.initial_layerh);
}
using ConfMap = std::map<std::string, std::string>; using ConfMap = std::map<std::string, std::string>;
namespace { namespace {
@ -126,9 +435,9 @@ uqptr<sla::RasterBase> SL1Archive::create_raster() const
return sla::create_raster_grayscale_aa(res, pxdim, gamma, tr); return sla::create_raster_grayscale_aa(res, pxdim, gamma, tr);
} }
sla::EncodedRaster SL1Archive::encode_raster(const sla::RasterBase &rst) const sla::RasterEncoder SL1Archive::get_encoder() const
{ {
return rst.encode(sla::PNGRasterEncoder()); return sla::PNGRasterEncoder{};
} }
void SL1Archive::export_print(Zipper& zipper, void SL1Archive::export_print(Zipper& zipper,

View file

@ -13,7 +13,7 @@ class SL1Archive: public SLAPrinter {
protected: protected:
uqptr<sla::RasterBase> create_raster() const override; uqptr<sla::RasterBase> create_raster() const override;
sla::EncodedRaster encode_raster(const sla::RasterBase &rst) const override; sla::RasterEncoder get_encoder() const override;
public: public:
@ -38,6 +38,24 @@ public:
} }
}; };
void import_sla_archive(const std::string &zipfname, DynamicPrintConfig &out);
void import_sla_archive(
const std::string & zipfname,
Vec2i windowsize,
TriangleMesh & out,
DynamicPrintConfig & profile,
std::function<bool(int)> progr = [](int) { return true; });
inline void import_sla_archive(
const std::string & zipfname,
Vec2i windowsize,
TriangleMesh & out,
std::function<bool(int)> progr = [](int) { return true; })
{
DynamicPrintConfig profile;
import_sla_archive(zipfname, windowsize, out, profile, progr);
}
} // namespace Slic3r::sla } // namespace Slic3r::sla

File diff suppressed because it is too large Load diff

View file

@ -13,9 +13,13 @@
#include "GCode/SpiralVase.hpp" #include "GCode/SpiralVase.hpp"
#include "GCode/ToolOrdering.hpp" #include "GCode/ToolOrdering.hpp"
#include "GCode/WipeTower.hpp" #include "GCode/WipeTower.hpp"
#include "GCodeTimeEstimator.hpp" #if ENABLE_GCODE_VIEWER
#include "EdgeGrid.hpp" #include "GCode/GCodeProcessor.hpp"
#else
#include "GCode/Analyzer.hpp" #include "GCode/Analyzer.hpp"
#include "GCodeTimeEstimator.hpp"
#endif // ENABLE_GCODE_VIEWER
#include "EdgeGrid.hpp"
#include "GCode/ThumbnailData.hpp" #include "GCode/ThumbnailData.hpp"
#include <memory> #include <memory>
@ -29,7 +33,9 @@ namespace Slic3r {
// Forward declarations. // Forward declarations.
class GCode; class GCode;
#if !ENABLE_GCODE_VIEWER
class GCodePreviewData; class GCodePreviewData;
#endif // !ENABLE_GCODE_VIEWER
namespace { struct Item; } namespace { struct Item; }
struct PrintInstance; struct PrintInstance;
@ -138,6 +144,15 @@ private:
double m_last_wipe_tower_print_z = 0.f; double m_last_wipe_tower_print_z = 0.f;
}; };
#if ENABLE_GCODE_VIEWER
class ColorPrintColors
{
static const std::vector<std::string> Colors;
public:
static const std::vector<std::string>& get() { return Colors; }
};
#endif // ENABLE_GCODE_VIEWER
class GCode { class GCode {
public: public:
GCode() : GCode() :
@ -145,21 +160,33 @@ public:
m_enable_loop_clipping(true), m_enable_loop_clipping(true),
m_enable_cooling_markers(false), m_enable_cooling_markers(false),
m_enable_extrusion_role_markers(false), m_enable_extrusion_role_markers(false),
#if ENABLE_GCODE_VIEWER
m_last_processor_extrusion_role(erNone),
#else
m_enable_analyzer(false), m_enable_analyzer(false),
m_last_analyzer_extrusion_role(erNone), m_last_analyzer_extrusion_role(erNone),
#endif // ENABLE_GCODE_VIEWER
m_layer_count(0), m_layer_count(0),
m_layer_index(-1), m_layer_index(-1),
m_layer(nullptr), m_layer(nullptr),
m_volumetric_speed(0), m_volumetric_speed(0),
m_last_pos_defined(false), m_last_pos_defined(false),
m_last_extrusion_role(erNone), m_last_extrusion_role(erNone),
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
m_last_mm3_per_mm(0.0),
m_last_width(0.0f),
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
#if !ENABLE_GCODE_VIEWER
m_last_mm3_per_mm(GCodeAnalyzer::Default_mm3_per_mm), m_last_mm3_per_mm(GCodeAnalyzer::Default_mm3_per_mm),
m_last_width(GCodeAnalyzer::Default_Width), m_last_width(GCodeAnalyzer::Default_Width),
m_last_height(GCodeAnalyzer::Default_Height), m_last_height(GCodeAnalyzer::Default_Height),
#endif // !ENABLE_GCODE_VIEWER
m_brim_done(false), m_brim_done(false),
m_second_layer_things_done(false), m_second_layer_things_done(false),
#if !ENABLE_GCODE_VIEWER
m_normal_time_estimator(GCodeTimeEstimator::Normal), m_normal_time_estimator(GCodeTimeEstimator::Normal),
m_silent_time_estimator(GCodeTimeEstimator::Silent), m_silent_time_estimator(GCodeTimeEstimator::Silent),
#endif // !ENABLE_GCODE_VIEWER
m_silent_time_estimator_enabled(false), m_silent_time_estimator_enabled(false),
m_last_obj_copy(nullptr, Point(std::numeric_limits<coord_t>::max(), std::numeric_limits<coord_t>::max())) m_last_obj_copy(nullptr, Point(std::numeric_limits<coord_t>::max(), std::numeric_limits<coord_t>::max()))
{} {}
@ -167,7 +194,11 @@ public:
// throws std::runtime_exception on error, // throws std::runtime_exception on error,
// throws CanceledException through print->throw_if_canceled(). // throws CanceledException through print->throw_if_canceled().
#if ENABLE_GCODE_VIEWER
void do_export(Print* print, const char* path, GCodeProcessor::Result* result = nullptr, ThumbnailsGeneratorCallback thumbnail_cb = nullptr);
#else
void do_export(Print* print, const char* path, GCodePreviewData* preview_data = nullptr, ThumbnailsGeneratorCallback thumbnail_cb = nullptr); void do_export(Print* print, const char* path, GCodePreviewData* preview_data = nullptr, ThumbnailsGeneratorCallback thumbnail_cb = nullptr);
#endif // ENABLE_GCODE_VIEWER
// Exported for the helper classes (OozePrevention, Wipe) and for the Perl binding for unit tests. // Exported for the helper classes (OozePrevention, Wipe) and for the Perl binding for unit tests.
const Vec2d& origin() const { return m_origin; } const Vec2d& origin() const { return m_origin; }
@ -327,11 +358,16 @@ private:
// Markers for the Pressure Equalizer to recognize the extrusion type. // Markers for the Pressure Equalizer to recognize the extrusion type.
// The Pressure Equalizer removes the markers from the final G-code. // The Pressure Equalizer removes the markers from the final G-code.
bool m_enable_extrusion_role_markers; bool m_enable_extrusion_role_markers;
#if ENABLE_GCODE_VIEWER
// Keeps track of the last extrusion role passed to the processor
ExtrusionRole m_last_processor_extrusion_role;
#else
// Enableds the G-code Analyzer. // Enableds the G-code Analyzer.
// Extended markers will be added during G-code generation. // Extended markers will be added during G-code generation.
// The G-code Analyzer will remove these comments from the final G-code. // The G-code Analyzer will remove these comments from the final G-code.
bool m_enable_analyzer; bool m_enable_analyzer;
ExtrusionRole m_last_analyzer_extrusion_role; ExtrusionRole m_last_analyzer_extrusion_role;
#endif // ENABLE_GCODE_VIEWER
// How many times will change_layer() be called? // How many times will change_layer() be called?
// change_layer() will update the progress bar. // change_layer() will update the progress bar.
unsigned int m_layer_count; unsigned int m_layer_count;
@ -344,10 +380,20 @@ private:
double m_volumetric_speed; double m_volumetric_speed;
// Support for the extrusion role markers. Which marker is active? // Support for the extrusion role markers. Which marker is active?
ExtrusionRole m_last_extrusion_role; ExtrusionRole m_last_extrusion_role;
#if ENABLE_GCODE_VIEWER
// Support for G-Code Processor
float m_last_height{ 0.0f };
float m_last_layer_z{ 0.0f };
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
double m_last_mm3_per_mm;
float m_last_width{ 0.0f };
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
#else
// Support for G-Code Analyzer // Support for G-Code Analyzer
double m_last_mm3_per_mm; double m_last_mm3_per_mm;
float m_last_width; float m_last_width;
float m_last_height; float m_last_height;
#endif // ENABLE_GCODE_VIEWER
Point m_last_pos; Point m_last_pos;
bool m_last_pos_defined; bool m_last_pos_defined;
@ -368,13 +414,20 @@ private:
// Index of a last object copy extruded. // Index of a last object copy extruded.
std::pair<const PrintObject*, Point> m_last_obj_copy; std::pair<const PrintObject*, Point> m_last_obj_copy;
#if !ENABLE_GCODE_VIEWER
// Time estimators // Time estimators
GCodeTimeEstimator m_normal_time_estimator; GCodeTimeEstimator m_normal_time_estimator;
GCodeTimeEstimator m_silent_time_estimator; GCodeTimeEstimator m_silent_time_estimator;
#endif // !ENABLE_GCODE_VIEWER
bool m_silent_time_estimator_enabled; bool m_silent_time_estimator_enabled;
#if ENABLE_GCODE_VIEWER
// Processor
GCodeProcessor m_processor;
#else
// Analyzer // Analyzer
GCodeAnalyzer m_analyzer; GCodeAnalyzer m_analyzer;
#endif // ENABLE_GCODE_VIEWER
// Write a string into a file. // Write a string into a file.
void _write(FILE* file, const std::string& what) { this->_write(file, what.c_str()); } void _write(FILE* file, const std::string& what) { this->_write(file, what.c_str()); }

View file

@ -12,6 +12,8 @@
#include "Analyzer.hpp" #include "Analyzer.hpp"
#include "PreviewData.hpp" #include "PreviewData.hpp"
#if !ENABLE_GCODE_VIEWER
static const std::string AXIS_STR = "XYZE"; static const std::string AXIS_STR = "XYZE";
static const float MMMIN_TO_MMSEC = 1.0f / 60.0f; static const float MMMIN_TO_MMSEC = 1.0f / 60.0f;
static const float INCHES_TO_MM = 25.4f; static const float INCHES_TO_MM = 25.4f;
@ -350,7 +352,7 @@ void GCodeAnalyzer::_processG1(const GCodeReader::GCodeLine& line)
if (delta_pos[E] < 0.0f) if (delta_pos[E] < 0.0f)
{ {
if ((delta_pos[X] != 0.0f) || (delta_pos[Y] != 0.0f) || (delta_pos[Z] != 0.0f)) if ((delta_pos[X] != 0.0f) || (delta_pos[Y] != 0.0f) || (delta_pos[Z] != 0.0f))
type = GCodeMove::Move; type = GCodeMove::Move;
else else
type = GCodeMove::Retract; type = GCodeMove::Retract;
} }
@ -651,7 +653,7 @@ bool GCodeAnalyzer::_process_tags(const GCodeReader::GCodeLine& line)
return true; return true;
} }
// color change tag // pause print tag
pos = comment.find(Pause_Print_Tag); pos = comment.find(Pause_Print_Tag);
if (pos != comment.npos) if (pos != comment.npos)
{ {
@ -659,7 +661,7 @@ bool GCodeAnalyzer::_process_tags(const GCodeReader::GCodeLine& line)
return true; return true;
} }
// color change tag // custom code tag
pos = comment.find(Custom_Code_Tag); pos = comment.find(Custom_Code_Tag);
if (pos != comment.npos) if (pos != comment.npos)
{ {
@ -667,7 +669,7 @@ bool GCodeAnalyzer::_process_tags(const GCodeReader::GCodeLine& line)
return true; return true;
} }
// color change tag // end pause print or custom code tag
pos = comment.find(End_Pause_Print_Or_Custom_Code_Tag); pos = comment.find(End_Pause_Print_Or_Custom_Code_Tag);
if (pos != comment.npos) if (pos != comment.npos)
{ {
@ -1191,3 +1193,5 @@ size_t GCodeAnalyzer::memory_used() const
} }
} // namespace Slic3r } // namespace Slic3r
#endif // !ENABLE_GCODE_VIEWER

View file

@ -1,6 +1,8 @@
#ifndef slic3r_GCode_Analyzer_hpp_ #ifndef slic3r_GCode_Analyzer_hpp_
#define slic3r_GCode_Analyzer_hpp_ #define slic3r_GCode_Analyzer_hpp_
#if !ENABLE_GCODE_VIEWER
#include "../libslic3r.h" #include "../libslic3r.h"
#include "../PrintConfig.hpp" #include "../PrintConfig.hpp"
#include "../ExtrusionEntity.hpp" #include "../ExtrusionEntity.hpp"
@ -302,4 +304,6 @@ private:
} // namespace Slic3r } // namespace Slic3r
#endif // !ENABLE_GCODE_VIEWER
#endif /* slic3r_GCode_Analyzer_hpp_ */ #endif /* slic3r_GCode_Analyzer_hpp_ */

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,560 @@
#ifndef slic3r_GCodeProcessor_hpp_
#define slic3r_GCodeProcessor_hpp_
#if ENABLE_GCODE_VIEWER
#include "libslic3r/GCodeReader.hpp"
#include "libslic3r/Point.hpp"
#include "libslic3r/ExtrusionEntity.hpp"
#include "libslic3r/PrintConfig.hpp"
#include "libslic3r/CustomGCode.hpp"
#include <array>
#include <vector>
#include <string>
namespace Slic3r {
enum class EMoveType : unsigned char
{
Noop,
Retract,
Unretract,
Tool_change,
Color_change,
Pause_Print,
Custom_GCode,
Travel,
Extrude,
Count
};
struct PrintEstimatedTimeStatistics
{
enum class ETimeMode : unsigned char
{
Normal,
Stealth,
Count
};
struct Mode
{
float time;
std::vector<std::pair<CustomGCode::Type, std::pair<float, float>>> custom_gcode_times;
std::vector<std::pair<EMoveType, float>> moves_times;
std::vector<std::pair<ExtrusionRole, float>> roles_times;
std::vector<float> layers_times;
void reset() {
time = 0.0f;
custom_gcode_times.clear();
moves_times.clear();
roles_times.clear();
layers_times.clear();
}
};
std::array<Mode, static_cast<size_t>(ETimeMode::Count)> modes;
PrintEstimatedTimeStatistics() { reset(); }
void reset() {
for (auto m : modes) {
m.reset();
}
}
};
class GCodeProcessor
{
public:
static const std::string Extrusion_Role_Tag;
static const std::string Height_Tag;
static const std::string Layer_Change_Tag;
static const std::string Color_Change_Tag;
static const std::string Pause_Print_Tag;
static const std::string Custom_Code_Tag;
static const std::string First_Line_M73_Placeholder_Tag;
static const std::string Last_Line_M73_Placeholder_Tag;
static const std::string Estimated_Printing_Time_Placeholder_Tag;
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
static const std::string Width_Tag;
static const std::string Mm3_Per_Mm_Tag;
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
private:
using AxisCoords = std::array<float, 4>;
using ExtruderColors = std::vector<unsigned char>;
enum class EUnits : unsigned char
{
Millimeters,
Inches
};
enum class EPositioningType : unsigned char
{
Absolute,
Relative
};
struct CachedPosition
{
AxisCoords position; // mm
float feedrate; // mm/s
void reset();
};
struct CpColor
{
unsigned char counter;
unsigned char current;
void reset();
};
public:
struct FeedrateProfile
{
float entry{ 0.0f }; // mm/s
float cruise{ 0.0f }; // mm/s
float exit{ 0.0f }; // mm/s
};
struct Trapezoid
{
float accelerate_until{ 0.0f }; // mm
float decelerate_after{ 0.0f }; // mm
float cruise_feedrate{ 0.0f }; // mm/sec
float acceleration_time(float entry_feedrate, float acceleration) const;
float cruise_time() const;
float deceleration_time(float distance, float acceleration) const;
float cruise_distance() const;
};
struct TimeBlock
{
struct Flags
{
bool recalculate{ false };
bool nominal_length{ false };
};
EMoveType move_type{ EMoveType::Noop };
ExtrusionRole role{ erNone };
unsigned int layer_id{ 0 };
float distance{ 0.0f }; // mm
float acceleration{ 0.0f }; // mm/s^2
float max_entry_speed{ 0.0f }; // mm/s
float safe_feedrate{ 0.0f }; // mm/s
Flags flags;
FeedrateProfile feedrate_profile;
Trapezoid trapezoid;
// Calculates this block's trapezoid
void calculate_trapezoid();
float time() const;
};
private:
struct TimeMachine
{
struct State
{
float feedrate; // mm/s
float safe_feedrate; // mm/s
AxisCoords axis_feedrate; // mm/s
AxisCoords abs_axis_feedrate; // mm/s
void reset();
};
struct CustomGCodeTime
{
bool needed;
float cache;
std::vector<std::pair<CustomGCode::Type, float>> times;
void reset();
};
bool enabled;
float acceleration; // mm/s^2
// hard limit for the acceleration, to which the firmware will clamp.
float max_acceleration; // mm/s^2
float extrude_factor_override_percentage;
float time; // s
std::string line_m73_mask;
State curr;
State prev;
CustomGCodeTime gcode_time;
std::vector<TimeBlock> blocks;
std::vector<float> g1_times_cache;
std::array<float, static_cast<size_t>(EMoveType::Count)> moves_time;
std::array<float, static_cast<size_t>(ExtrusionRole::erCount)> roles_time;
std::vector<float> layers_time;
void reset();
// Simulates firmware st_synchronize() call
void simulate_st_synchronize(float additional_time = 0.0f);
void calculate_time(size_t keep_last_n_blocks = 0);
};
struct TimeProcessor
{
struct Planner
{
// Size of the firmware planner queue. The old 8-bit Marlins usually just managed 16 trapezoidal blocks.
// Let's be conservative and plan for newer boards with more memory.
static constexpr size_t queue_size = 64;
// The firmware recalculates last planner_queue_size trapezoidal blocks each time a new block is added.
// We are not simulating the firmware exactly, we calculate a sequence of blocks once a reasonable number of blocks accumulate.
static constexpr size_t refresh_threshold = queue_size * 4;
};
// extruder_id is currently used to correctly calculate filament load / unload times into the total print time.
// This is currently only really used by the MK3 MMU2:
// extruder_unloaded = true means no filament is loaded yet, all the filaments are parked in the MK3 MMU2 unit.
bool extruder_unloaded;
// whether or not to export post-process the gcode to export lines M73 in it
bool export_remaining_time_enabled;
// allow to skip the lines M201/M203/M204/M205 generated by GCode::print_machine_envelope()
bool machine_envelope_processing_enabled;
MachineEnvelopeConfig machine_limits;
// Additional load / unload times for a filament exchange sequence.
std::vector<float> filament_load_times;
std::vector<float> filament_unload_times;
std::array<TimeMachine, static_cast<size_t>(PrintEstimatedTimeStatistics::ETimeMode::Count)> machines;
void reset();
// post process the file with the given filename to add remaining time lines M73
void post_process(const std::string& filename);
};
public:
struct MoveVertex
{
EMoveType type{ EMoveType::Noop };
ExtrusionRole extrusion_role{ erNone };
unsigned char extruder_id{ 0 };
unsigned char cp_color_id{ 0 };
Vec3f position{ Vec3f::Zero() }; // mm
float delta_extruder{ 0.0f }; // mm
float feedrate{ 0.0f }; // mm/s
float width{ 0.0f }; // mm
float height{ 0.0f }; // mm
float mm3_per_mm{ 0.0f };
float fan_speed{ 0.0f }; // percentage
float time{ 0.0f }; // s
float volumetric_rate() const { return feedrate * mm3_per_mm; }
};
struct Result
{
unsigned int id;
std::vector<MoveVertex> moves;
Pointfs bed_shape;
std::string printer_settings_id;
std::vector<std::string> extruder_colors;
PrintEstimatedTimeStatistics time_statistics;
#if ENABLE_GCODE_VIEWER_STATISTICS
long long time{ 0 };
void reset()
{
time = 0;
moves = std::vector<MoveVertex>();
bed_shape = Pointfs();
extruder_colors = std::vector<std::string>();
}
#else
void reset()
{
moves = std::vector<MoveVertex>();
bed_shape = Pointfs();
extruder_colors = std::vector<std::string>();
}
#endif // ENABLE_GCODE_VIEWER_STATISTICS
};
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
struct DataChecker
{
struct Error
{
float value;
float tag_value;
ExtrusionRole role;
};
std::string type;
float threshold{ 0.01f };
float last_tag_value{ 0.0f };
unsigned int count{ 0 };
std::vector<Error> errors;
DataChecker(const std::string& type, float threshold)
: type(type), threshold(threshold)
{}
void update(float value, ExtrusionRole role) {
++count;
if (last_tag_value != 0.0f) {
if (std::abs(value - last_tag_value) / last_tag_value > threshold)
errors.push_back({ value, last_tag_value, role });
}
}
void reset() { last_tag_value = 0.0f; errors.clear(); count = 0; }
std::pair<float, float> get_min() const {
float delta_min = FLT_MAX;
float perc_min = 0.0f;
for (const Error& e : errors) {
if (delta_min > e.value - e.tag_value) {
delta_min = e.value - e.tag_value;
perc_min = 100.0f * delta_min / e.tag_value;
}
}
return { delta_min, perc_min };
}
std::pair<float, float> get_max() const {
float delta_max = -FLT_MAX;
float perc_max = 0.0f;
for (const Error& e : errors) {
if (delta_max < e.value - e.tag_value) {
delta_max = e.value - e.tag_value;
perc_max = 100.0f * delta_max / e.tag_value;
}
}
return { delta_max, perc_max };
}
void output() const {
if (!errors.empty()) {
std::cout << type << ":\n";
std::cout << "Errors: " << errors.size() << " (" << 100.0f * float(errors.size()) / float(count) << "%)\n";
auto [min, perc_min] = get_min();
auto [max, perc_max] = get_max();
std::cout << "min: " << min << "(" << perc_min << "%) - max: " << max << "(" << perc_max << "%)\n";
}
}
};
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
private:
GCodeReader m_parser;
EUnits m_units;
EPositioningType m_global_positioning_type;
EPositioningType m_e_local_positioning_type;
std::vector<Vec3f> m_extruder_offsets;
GCodeFlavor m_flavor;
AxisCoords m_start_position; // mm
AxisCoords m_end_position; // mm
AxisCoords m_origin; // mm
CachedPosition m_cached_position;
float m_feedrate; // mm/s
float m_width; // mm
float m_height; // mm
float m_mm3_per_mm;
float m_fan_speed; // percentage
ExtrusionRole m_extrusion_role;
unsigned char m_extruder_id;
ExtruderColors m_extruder_colors;
std::vector<float> m_filament_diameters;
float m_extruded_last_z;
unsigned int m_layer_id;
CpColor m_cp_color;
enum class EProducer
{
Unknown,
PrusaSlicer,
Cura,
Simplify3D,
CraftWare,
ideaMaker
};
static const std::vector<std::pair<GCodeProcessor::EProducer, std::string>> Producers;
EProducer m_producer;
bool m_producers_enabled;
TimeProcessor m_time_processor;
Result m_result;
static unsigned int s_result_id;
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
DataChecker m_mm3_per_mm_compare{ "mm3_per_mm", 0.01f };
DataChecker m_height_compare{ "height", 0.01f };
DataChecker m_width_compare{ "width", 0.01f };
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
public:
GCodeProcessor();
void apply_config(const PrintConfig& config);
void apply_config(const DynamicPrintConfig& config);
void enable_stealth_time_estimator(bool enabled);
bool is_stealth_time_estimator_enabled() const {
return m_time_processor.machines[static_cast<size_t>(PrintEstimatedTimeStatistics::ETimeMode::Stealth)].enabled;
}
void enable_machine_envelope_processing(bool enabled) { m_time_processor.machine_envelope_processing_enabled = enabled; }
void enable_producers(bool enabled) { m_producers_enabled = enabled; }
void reset();
const Result& get_result() const { return m_result; }
Result&& extract_result() { return std::move(m_result); }
// Process the gcode contained in the file with the given filename
// throws CanceledException through print->throw_if_canceled() (sent by the caller as callback).
void process_file(const std::string& filename, std::function<void()> cancel_callback = nullptr);
float get_time(PrintEstimatedTimeStatistics::ETimeMode mode) const;
std::string get_time_dhm(PrintEstimatedTimeStatistics::ETimeMode mode) const;
std::vector<std::pair<CustomGCode::Type, std::pair<float, float>>> get_custom_gcode_times(PrintEstimatedTimeStatistics::ETimeMode mode, bool include_remaining) const;
std::vector<std::pair<EMoveType, float>> get_moves_time(PrintEstimatedTimeStatistics::ETimeMode mode) const;
std::vector<std::pair<ExtrusionRole, float>> get_roles_time(PrintEstimatedTimeStatistics::ETimeMode mode) const;
std::vector<float> get_layers_time(PrintEstimatedTimeStatistics::ETimeMode mode) const;
private:
void process_gcode_line(const GCodeReader::GCodeLine& line);
// Process tags embedded into comments
void process_tags(const std::string& comment);
bool process_producers_tags(const std::string& comment);
bool process_prusaslicer_tags(const std::string& comment);
bool process_cura_tags(const std::string& comment);
bool process_simplify3d_tags(const std::string& comment);
bool process_craftware_tags(const std::string& comment);
bool process_ideamaker_tags(const std::string& comment);
bool detect_producer(const std::string& comment);
// Move
void process_G0(const GCodeReader::GCodeLine& line);
void process_G1(const GCodeReader::GCodeLine& line);
// Retract
void process_G10(const GCodeReader::GCodeLine& line);
// Unretract
void process_G11(const GCodeReader::GCodeLine& line);
// Set Units to Inches
void process_G20(const GCodeReader::GCodeLine& line);
// Set Units to Millimeters
void process_G21(const GCodeReader::GCodeLine& line);
// Firmware controlled Retract
void process_G22(const GCodeReader::GCodeLine& line);
// Firmware controlled Unretract
void process_G23(const GCodeReader::GCodeLine& line);
// Set to Absolute Positioning
void process_G90(const GCodeReader::GCodeLine& line);
// Set to Relative Positioning
void process_G91(const GCodeReader::GCodeLine& line);
// Set Position
void process_G92(const GCodeReader::GCodeLine& line);
// Sleep or Conditional stop
void process_M1(const GCodeReader::GCodeLine& line);
// Set extruder to absolute mode
void process_M82(const GCodeReader::GCodeLine& line);
// Set extruder to relative mode
void process_M83(const GCodeReader::GCodeLine& line);
// Set fan speed
void process_M106(const GCodeReader::GCodeLine& line);
// Disable fan
void process_M107(const GCodeReader::GCodeLine& line);
// Set tool (Sailfish)
void process_M108(const GCodeReader::GCodeLine& line);
// Recall stored home offsets
void process_M132(const GCodeReader::GCodeLine& line);
// Set tool (MakerWare)
void process_M135(const GCodeReader::GCodeLine& line);
// Set max printing acceleration
void process_M201(const GCodeReader::GCodeLine& line);
// Set maximum feedrate
void process_M203(const GCodeReader::GCodeLine& line);
// Set default acceleration
void process_M204(const GCodeReader::GCodeLine& line);
// Advanced settings
void process_M205(const GCodeReader::GCodeLine& line);
// Set extrude factor override percentage
void process_M221(const GCodeReader::GCodeLine& line);
// Repetier: Store x, y and z position
void process_M401(const GCodeReader::GCodeLine& line);
// Repetier: Go to stored position
void process_M402(const GCodeReader::GCodeLine& line);
// Set allowable instantaneous speed change
void process_M566(const GCodeReader::GCodeLine& line);
// Unload the current filament into the MK3 MMU2 unit at the end of print.
void process_M702(const GCodeReader::GCodeLine& line);
// Processes T line (Select Tool)
void process_T(const GCodeReader::GCodeLine& line);
void process_T(const std::string& command);
void store_move_vertex(EMoveType type);
float minimum_feedrate(PrintEstimatedTimeStatistics::ETimeMode mode, float feedrate) const;
float minimum_travel_feedrate(PrintEstimatedTimeStatistics::ETimeMode mode, float feedrate) const;
float get_axis_max_feedrate(PrintEstimatedTimeStatistics::ETimeMode mode, Axis axis) const;
float get_axis_max_acceleration(PrintEstimatedTimeStatistics::ETimeMode mode, Axis axis) const;
float get_axis_max_jerk(PrintEstimatedTimeStatistics::ETimeMode mode, Axis axis) const;
float get_retract_acceleration(PrintEstimatedTimeStatistics::ETimeMode mode) const;
float get_acceleration(PrintEstimatedTimeStatistics::ETimeMode mode) const;
void set_acceleration(PrintEstimatedTimeStatistics::ETimeMode mode, float value);
float get_filament_load_time(size_t extruder_id);
float get_filament_unload_time(size_t extruder_id);
void process_custom_gcode_time(CustomGCode::Type code);
// Simulates firmware st_synchronize() call
void simulate_st_synchronize(float additional_time = 0.0f);
void update_estimated_times_stats();
};
} /* namespace Slic3r */
#endif // ENABLE_GCODE_VIEWER
#endif /* slic3r_GCodeProcessor_hpp_ */

View file

@ -79,7 +79,7 @@ static DWORD execute_process_winapi(const std::wstring &command_line)
if (! ::CreateProcessW( if (! ::CreateProcessW(
nullptr /* lpApplicationName */, (LPWSTR)command_line.c_str(), nullptr /* lpProcessAttributes */, nullptr /* lpThreadAttributes */, false /* bInheritHandles */, nullptr /* lpApplicationName */, (LPWSTR)command_line.c_str(), nullptr /* lpProcessAttributes */, nullptr /* lpThreadAttributes */, false /* bInheritHandles */,
CREATE_UNICODE_ENVIRONMENT /* | CREATE_NEW_CONSOLE */ /* dwCreationFlags */, (LPVOID)envstr.c_str(), nullptr /* lpCurrentDirectory */, &startup_info, &process_info)) CREATE_UNICODE_ENVIRONMENT /* | CREATE_NEW_CONSOLE */ /* dwCreationFlags */, (LPVOID)envstr.c_str(), nullptr /* lpCurrentDirectory */, &startup_info, &process_info))
throw std::runtime_error(std::string("Failed starting the script ") + boost::nowide::narrow(command_line) + ", Win32 error: " + std::to_string(int(::GetLastError()))); throw Slic3r::RuntimeError(std::string("Failed starting the script ") + boost::nowide::narrow(command_line) + ", Win32 error: " + std::to_string(int(::GetLastError())));
::WaitForSingleObject(process_info.hProcess, INFINITE); ::WaitForSingleObject(process_info.hProcess, INFINITE);
ULONG rc = 0; ULONG rc = 0;
::GetExitCodeProcess(process_info.hProcess, &rc); ::GetExitCodeProcess(process_info.hProcess, &rc);
@ -98,13 +98,13 @@ static int run_script(const std::string &script, const std::string &gcode, std::
LPWSTR *szArglist = CommandLineToArgvW(boost::nowide::widen(script).c_str(), &nArgs); LPWSTR *szArglist = CommandLineToArgvW(boost::nowide::widen(script).c_str(), &nArgs);
if (szArglist == nullptr || nArgs <= 0) { if (szArglist == nullptr || nArgs <= 0) {
// CommandLineToArgvW failed. Maybe the command line escapment is invalid? // CommandLineToArgvW failed. Maybe the command line escapment is invalid?
throw std::runtime_error(std::string("Post processing script ") + script + " on file " + gcode + " failed. CommandLineToArgvW() refused to parse the command line path."); throw Slic3r::RuntimeError(std::string("Post processing script ") + script + " on file " + gcode + " failed. CommandLineToArgvW() refused to parse the command line path.");
} }
std::wstring command_line; std::wstring command_line;
std::wstring command = szArglist[0]; std::wstring command = szArglist[0];
if (! boost::filesystem::exists(boost::filesystem::path(command))) if (! boost::filesystem::exists(boost::filesystem::path(command)))
throw std::runtime_error(std::string("The configured post-processing script does not exist: ") + boost::nowide::narrow(command)); throw Slic3r::RuntimeError(std::string("The configured post-processing script does not exist: ") + boost::nowide::narrow(command));
if (boost::iends_with(command, L".pl")) { if (boost::iends_with(command, L".pl")) {
// This is a perl script. Run it through the perl interpreter. // This is a perl script. Run it through the perl interpreter.
// The current process may be slic3r.exe or slic3r-console.exe. // The current process may be slic3r.exe or slic3r-console.exe.
@ -115,7 +115,7 @@ static int run_script(const std::string &script, const std::string &gcode, std::
boost::filesystem::path path_perl = path_exe.parent_path() / "perl" / "perl.exe"; boost::filesystem::path path_perl = path_exe.parent_path() / "perl" / "perl.exe";
if (! boost::filesystem::exists(path_perl)) { if (! boost::filesystem::exists(path_perl)) {
LocalFree(szArglist); LocalFree(szArglist);
throw std::runtime_error(std::string("Perl interpreter ") + path_perl.string() + " does not exist."); throw Slic3r::RuntimeError(std::string("Perl interpreter ") + path_perl.string() + " does not exist.");
} }
// Replace it with the current perl interpreter. // Replace it with the current perl interpreter.
quote_argv_winapi(boost::nowide::widen(path_perl.string()), command_line); quote_argv_winapi(boost::nowide::widen(path_perl.string()), command_line);
@ -187,7 +187,7 @@ void run_post_process_scripts(const std::string &path, const PrintConfig &config
config.setenv_(); config.setenv_();
auto gcode_file = boost::filesystem::path(path); auto gcode_file = boost::filesystem::path(path);
if (! boost::filesystem::exists(gcode_file)) if (! boost::filesystem::exists(gcode_file))
throw std::runtime_error(std::string("Post-processor can't find exported gcode file")); throw Slic3r::RuntimeError(std::string("Post-processor can't find exported gcode file"));
for (const std::string &scripts : config.post_process.values) { for (const std::string &scripts : config.post_process.values) {
std::vector<std::string> lines; std::vector<std::string> lines;
@ -205,7 +205,7 @@ void run_post_process_scripts(const std::string &path, const PrintConfig &config
const std::string msg = std_err.empty() ? (boost::format("Post-processing script %1% on file %2% failed.\nError code: %3%") % script % path % result).str() const std::string msg = std_err.empty() ? (boost::format("Post-processing script %1% on file %2% failed.\nError code: %3%") % script % path % result).str()
: (boost::format("Post-processing script %1% on file %2% failed.\nError code: %3%\nOutput:\n%4%") % script % path % result % std_err).str(); : (boost::format("Post-processing script %1% on file %2% failed.\nError code: %3%\nOutput:\n%4%") % script % path % result % std_err).str();
BOOST_LOG_TRIVIAL(error) << msg; BOOST_LOG_TRIVIAL(error) << msg;
throw std::runtime_error(msg); throw Slic3r::RuntimeError(msg);
} }
} }
} }

View file

@ -148,7 +148,7 @@ static inline int parse_int(const char *&line)
char *endptr = NULL; char *endptr = NULL;
long result = strtol(line, &endptr, 10); long result = strtol(line, &endptr, 10);
if (endptr == NULL || !is_ws_or_eol(*endptr)) if (endptr == NULL || !is_ws_or_eol(*endptr))
throw std::runtime_error("PressureEqualizer: Error parsing an int"); throw Slic3r::RuntimeError("PressureEqualizer: Error parsing an int");
line = endptr; line = endptr;
return int(result); return int(result);
}; };
@ -160,7 +160,7 @@ static inline float parse_float(const char *&line)
char *endptr = NULL; char *endptr = NULL;
float result = strtof(line, &endptr); float result = strtof(line, &endptr);
if (endptr == NULL || !is_ws_or_eol(*endptr)) if (endptr == NULL || !is_ws_or_eol(*endptr))
throw std::runtime_error("PressureEqualizer: Error parsing a float"); throw Slic3r::RuntimeError("PressureEqualizer: Error parsing a float");
line = endptr; line = endptr;
return result; return result;
}; };
@ -229,7 +229,7 @@ bool PressureEqualizer::process_line(const char *line, const size_t len, GCodeLi
assert(false); assert(false);
} }
if (i == -1) if (i == -1)
throw std::runtime_error(std::string("GCode::PressureEqualizer: Invalid axis for G0/G1: ") + axis); throw Slic3r::RuntimeError(std::string("GCode::PressureEqualizer: Invalid axis for G0/G1: ") + axis);
buf.pos_provided[i] = true; buf.pos_provided[i] = true;
new_pos[i] = parse_float(line); new_pos[i] = parse_float(line);
if (i == 3 && m_config->use_relative_e_distances.value) if (i == 3 && m_config->use_relative_e_distances.value)
@ -298,7 +298,7 @@ bool PressureEqualizer::process_line(const char *line, const size_t len, GCodeLi
set = true; set = true;
break; break;
default: default:
throw std::runtime_error(std::string("GCode::PressureEqualizer: Incorrect axis in a G92 G-code: ") + axis); throw Slic3r::RuntimeError(std::string("GCode::PressureEqualizer: Incorrect axis in a G92 G-code: ") + axis);
} }
eatws(line); eatws(line);
} }

View file

@ -5,6 +5,8 @@
#include <boost/format.hpp> #include <boost/format.hpp>
#if !ENABLE_GCODE_VIEWER
//! macro used to mark string used at localization, //! macro used to mark string used at localization,
#define L(s) (s) #define L(s) (s)
@ -516,3 +518,5 @@ Color operator * (float f, const Color& color)
} }
} // namespace Slic3r } // namespace Slic3r
#endif // !ENABLE_GCODE_VIEWER

View file

@ -1,6 +1,8 @@
#ifndef slic3r_GCode_PreviewData_hpp_ #ifndef slic3r_GCode_PreviewData_hpp_
#define slic3r_GCode_PreviewData_hpp_ #define slic3r_GCode_PreviewData_hpp_
#if !ENABLE_GCODE_VIEWER
#include "../libslic3r.h" #include "../libslic3r.h"
#include "../ExtrusionEntity.hpp" #include "../ExtrusionEntity.hpp"
#include "../Point.hpp" #include "../Point.hpp"
@ -56,8 +58,7 @@ public:
// Color mapping to convert a float into a smooth rainbow of 10 colors. // Color mapping to convert a float into a smooth rainbow of 10 colors.
class RangeBase class RangeBase
{ {
public: public:
virtual void reset() = 0; virtual void reset() = 0;
virtual bool empty() const = 0; virtual bool empty() const = 0;
virtual float min() const = 0; virtual float min() const = 0;
@ -73,7 +74,7 @@ public:
// Color mapping converting a float in a range between a min and a max into a smooth rainbow of 10 colors. // Color mapping converting a float in a range between a min and a max into a smooth rainbow of 10 colors.
class Range : public RangeBase class Range : public RangeBase
{ {
public: public:
Range(); Range();
// RangeBase Overrides // RangeBase Overrides
@ -97,8 +98,7 @@ public:
template <typename EnumRangeType> template <typename EnumRangeType>
class MultiRange : public RangeBase class MultiRange : public RangeBase
{ {
public: public:
void reset() override void reset() override
{ {
bounds = decltype(bounds){}; bounds = decltype(bounds){};
@ -160,8 +160,7 @@ public:
mode.set(static_cast<std::size_t>(range_type_value), enable); mode.set(static_cast<std::size_t>(range_type_value), enable);
} }
private: private:
// Interval bounds // Interval bounds
struct Bounds struct Bounds
{ {
@ -394,4 +393,6 @@ public:
} // namespace Slic3r } // namespace Slic3r
#endif // !ENABLE_GCODE_VIEWER
#endif /* slic3r_GCode_PreviewData_hpp_ */ #endif /* slic3r_GCode_PreviewData_hpp_ */

View file

@ -94,7 +94,7 @@ static BoundingBoxf extrusionentity_extents(const ExtrusionEntity *extrusion_ent
auto *extrusion_entity_collection = dynamic_cast<const ExtrusionEntityCollection*>(extrusion_entity); auto *extrusion_entity_collection = dynamic_cast<const ExtrusionEntityCollection*>(extrusion_entity);
if (extrusion_entity_collection != nullptr) if (extrusion_entity_collection != nullptr)
return extrusionentity_extents(*extrusion_entity_collection); return extrusionentity_extents(*extrusion_entity_collection);
throw std::runtime_error("Unexpected extrusion_entity type in extrusionentity_extents()"); throw Slic3r::RuntimeError("Unexpected extrusion_entity type in extrusionentity_extents()");
return BoundingBoxf(); return BoundingBoxf();
} }

View file

@ -21,7 +21,11 @@ TODO LIST
#include <vector> #include <vector>
#include <numeric> #include <numeric>
#if ENABLE_GCODE_VIEWER
#include "GCodeProcessor.hpp"
#else
#include "Analyzer.hpp" #include "Analyzer.hpp"
#endif // ENABLE_GCODE_VIEWER
#include "BoundingBox.hpp" #include "BoundingBox.hpp"
#if defined(__linux) || defined(__GNUC__ ) #if defined(__linux) || defined(__GNUC__ )
@ -47,36 +51,69 @@ public:
m_extrusion_flow(0.f), m_extrusion_flow(0.f),
m_preview_suppressed(false), m_preview_suppressed(false),
m_elapsed_time(0.f), m_elapsed_time(0.f),
#if !ENABLE_GCODE_VIEWER || ENABLE_GCODE_VIEWER_DATA_CHECKING
m_default_analyzer_line_width(line_width), m_default_analyzer_line_width(line_width),
#endif // !ENABLE_GCODE_VIEWER || ENABLE_GCODE_VIEWER_DATA_CHECKING
m_gcode_flavor(flavor), m_gcode_flavor(flavor),
m_filpar(filament_parameters) m_filpar(filament_parameters)
{ {
// adds tag for analyzer: // adds tag for analyzer:
char buf[64]; char buf[64];
#if ENABLE_GCODE_VIEWER
sprintf(buf, ";%s%f\n", GCodeProcessor::Height_Tag.c_str(), m_layer_height); // don't rely on GCodeAnalyzer knowing the layer height - it knows nothing at priming
m_gcode += buf;
sprintf(buf, ";%s%s\n", GCodeProcessor::Extrusion_Role_Tag.c_str(), ExtrusionEntity::role_to_string(erWipeTower).c_str());
m_gcode += buf;
#else
sprintf(buf, ";%s%f\n", GCodeAnalyzer::Height_Tag.c_str(), m_layer_height); // don't rely on GCodeAnalyzer knowing the layer height - it knows nothing at priming sprintf(buf, ";%s%f\n", GCodeAnalyzer::Height_Tag.c_str(), m_layer_height); // don't rely on GCodeAnalyzer knowing the layer height - it knows nothing at priming
m_gcode += buf; m_gcode += buf;
sprintf(buf, ";%s%d\n", GCodeAnalyzer::Extrusion_Role_Tag.c_str(), erWipeTower); sprintf(buf, ";%s%d\n", GCodeAnalyzer::Extrusion_Role_Tag.c_str(), erWipeTower);
m_gcode += buf; m_gcode += buf;
#endif // ENABLE_GCODE_VIEWER
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
change_analyzer_line_width(line_width); change_analyzer_line_width(line_width);
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
} }
WipeTowerWriter& change_analyzer_line_width(float line_width) { #if ENABLE_GCODE_VIEWER_DATA_CHECKING
// adds tag for analyzer: WipeTowerWriter& change_analyzer_line_width(float line_width) {
char buf[64]; // adds tag for analyzer:
sprintf(buf, ";%s%f\n", GCodeAnalyzer::Width_Tag.c_str(), line_width); char buf[64];
m_gcode += buf; sprintf(buf, ";%s%f\n", GCodeProcessor::Width_Tag.c_str(), line_width);
return *this; m_gcode += buf;
return *this;
} }
WipeTowerWriter& change_analyzer_mm3_per_mm(float len, float e) { WipeTowerWriter& change_analyzer_mm3_per_mm(float len, float e) {
static const float area = float(M_PI) * 1.75f * 1.75f / 4.f; static const float area = float(M_PI) * 1.75f * 1.75f / 4.f;
float mm3_per_mm = (len == 0.f ? 0.f : area * e / len); float mm3_per_mm = (len == 0.f ? 0.f : area * e / len);
// adds tag for analyzer: // adds tag for processor:
char buf[64]; char buf[64];
sprintf(buf, ";%s%f\n", GCodeAnalyzer::Mm3_Per_Mm_Tag.c_str(), mm3_per_mm); sprintf(buf, ";%s%f\n", GCodeProcessor::Mm3_Per_Mm_Tag.c_str(), mm3_per_mm);
m_gcode += buf; m_gcode += buf;
return *this; return *this;
} }
#else
#if !ENABLE_GCODE_VIEWER
WipeTowerWriter& change_analyzer_line_width(float line_width) {
// adds tag for analyzer:
char buf[64];
sprintf(buf, ";%s%f\n", GCodeAnalyzer::Width_Tag.c_str(), line_width);
m_gcode += buf;
return *this;
}
WipeTowerWriter& change_analyzer_mm3_per_mm(float len, float e) {
static const float area = float(M_PI) * 1.75f * 1.75f / 4.f;
float mm3_per_mm = (len == 0.f ? 0.f : area * e / len);
// adds tag for analyzer:
char buf[64];
sprintf(buf, ";%s%f\n", GCodeAnalyzer::Mm3_Per_Mm_Tag.c_str(), mm3_per_mm);
m_gcode += buf;
return *this;
}
#endif // !ENABLE_GCODE_VIEWER
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
WipeTowerWriter& set_initial_position(const Vec2f &pos, float width = 0.f, float depth = 0.f, float internal_angle = 0.f) { WipeTowerWriter& set_initial_position(const Vec2f &pos, float width = 0.f, float depth = 0.f, float internal_angle = 0.f) {
m_wipe_tower_width = width; m_wipe_tower_width = width;
@ -111,8 +148,13 @@ public:
// Suppress / resume G-code preview in Slic3r. Slic3r will have difficulty to differentiate the various // Suppress / resume G-code preview in Slic3r. Slic3r will have difficulty to differentiate the various
// filament loading and cooling moves from normal extrusion moves. Therefore the writer // filament loading and cooling moves from normal extrusion moves. Therefore the writer
// is asked to suppres output of some lines, which look like extrusions. // is asked to suppres output of some lines, which look like extrusions.
WipeTowerWriter& suppress_preview() { change_analyzer_line_width(0.f); m_preview_suppressed = true; return *this; } #if !ENABLE_GCODE_VIEWER || ENABLE_GCODE_VIEWER_DATA_CHECKING
WipeTowerWriter& resume_preview() { change_analyzer_line_width(m_default_analyzer_line_width); m_preview_suppressed = false; return *this; } WipeTowerWriter& suppress_preview() { change_analyzer_line_width(0.f); m_preview_suppressed = true; return *this; }
WipeTowerWriter& resume_preview() { change_analyzer_line_width(m_default_analyzer_line_width); m_preview_suppressed = false; return *this; }
#else
WipeTowerWriter& suppress_preview() { m_preview_suppressed = true; return *this; }
WipeTowerWriter& resume_preview() { m_preview_suppressed = false; return *this; }
#endif // !ENABLE_GCODE_VIEWER || ENABLE_GCODE_VIEWER_DATA_CHECKING
WipeTowerWriter& feedrate(float f) WipeTowerWriter& feedrate(float f)
{ {
@ -149,8 +191,14 @@ public:
Vec2f rot(this->rotate(Vec2f(x,y))); // this is where we want to go Vec2f rot(this->rotate(Vec2f(x,y))); // this is where we want to go
if (! m_preview_suppressed && e > 0.f && len > 0.f) { if (! m_preview_suppressed && e > 0.f && len > 0.f) {
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
change_analyzer_mm3_per_mm(len, e); change_analyzer_mm3_per_mm(len, e);
// Width of a squished extrusion, corrected for the roundings of the squished extrusions. #else
#if !ENABLE_GCODE_VIEWER
change_analyzer_mm3_per_mm(len, e);
#endif // !ENABLE_GCODE_VIEWER
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
// Width of a squished extrusion, corrected for the roundings of the squished extrusions.
// This is left zero if it is a travel move. // This is left zero if it is a travel move.
float width = e * m_filpar[0].filament_area / (len * m_layer_height); float width = e * m_filpar[0].filament_area / (len * m_layer_height);
// Correct for the roundings of a squished extrusion. // Correct for the roundings of a squished extrusion.
@ -411,7 +459,9 @@ private:
float m_wipe_tower_depth = 0.f; float m_wipe_tower_depth = 0.f;
unsigned m_last_fan_speed = 0; unsigned m_last_fan_speed = 0;
int current_temp = -1; int current_temp = -1;
#if !ENABLE_GCODE_VIEWER || ENABLE_GCODE_VIEWER_DATA_CHECKING
const float m_default_analyzer_line_width; const float m_default_analyzer_line_width;
#endif // !ENABLE_GCODE_VIEWER || ENABLE_GCODE_VIEWER_DATA_CHECKING
float m_used_filament_length = 0.f; float m_used_filament_length = 0.f;
GCodeFlavor m_gcode_flavor; GCodeFlavor m_gcode_flavor;
const std::vector<WipeTower::FilamentParameters>& m_filpar; const std::vector<WipeTower::FilamentParameters>& m_filpar;
@ -852,8 +902,12 @@ void WipeTower::toolchange_Unload(
const float line_width = m_perimeter_width * m_filpar[m_current_tool].ramming_line_width_multiplicator; // desired ramming line thickness const float line_width = m_perimeter_width * m_filpar[m_current_tool].ramming_line_width_multiplicator; // desired ramming line thickness
const float y_step = line_width * m_filpar[m_current_tool].ramming_step_multiplicator * m_extra_spacing; // spacing between lines in mm const float y_step = line_width * m_filpar[m_current_tool].ramming_step_multiplicator * m_extra_spacing; // spacing between lines in mm
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
writer.append("; CP TOOLCHANGE UNLOAD\n") writer.append("; CP TOOLCHANGE UNLOAD\n")
.change_analyzer_line_width(line_width); .change_analyzer_line_width(line_width);
#else
writer.append("; CP TOOLCHANGE UNLOAD\n");
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
unsigned i = 0; // iterates through ramming_speed unsigned i = 0; // iterates through ramming_speed
m_left_to_right = true; // current direction of ramming m_left_to_right = true; // current direction of ramming
@ -930,7 +984,9 @@ void WipeTower::toolchange_Unload(
} }
} }
Vec2f end_of_ramming(writer.x(),writer.y()); Vec2f end_of_ramming(writer.x(),writer.y());
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
writer.change_analyzer_line_width(m_perimeter_width); // so the next lines are not affected by ramming_line_width_multiplier writer.change_analyzer_line_width(m_perimeter_width); // so the next lines are not affected by ramming_line_width_multiplier
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
// Retraction: // Retraction:
float old_x = writer.x(); float old_x = writer.x();

View file

@ -1,6 +1,9 @@
#include "GCodeReader.hpp" #include "GCodeReader.hpp"
#include <boost/algorithm/string/classification.hpp> #include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp> #include <boost/algorithm/string/split.hpp>
#if ENABLE_GCODE_VIEWER
#include <boost/nowide/fstream.hpp>
#endif // ENABLE_GCODE_VIEWER
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
@ -113,9 +116,18 @@ void GCodeReader::update_coordinates(GCodeLine &gline, std::pair<const char*, co
void GCodeReader::parse_file(const std::string &file, callback_t callback) void GCodeReader::parse_file(const std::string &file, callback_t callback)
{ {
#if ENABLE_GCODE_VIEWER
boost::nowide::ifstream f(file);
#else
std::ifstream f(file); std::ifstream f(file);
#endif // ENABLE_GCODE_VIEWER
std::string line; std::string line;
#if ENABLE_GCODE_VIEWER
m_parsing_file = true;
while (m_parsing_file && std::getline(f, line))
#else
while (std::getline(f, line)) while (std::getline(f, line))
#endif // ENABLE_GCODE_VIEWER
this->parse_line(line, callback); this->parse_line(line, callback);
} }

View file

@ -107,6 +107,9 @@ public:
{ GCodeLine gline; this->parse_line(line.c_str(), gline, callback); } { GCodeLine gline; this->parse_line(line.c_str(), gline, callback); }
void parse_file(const std::string &file, callback_t callback); void parse_file(const std::string &file, callback_t callback);
#if ENABLE_GCODE_VIEWER
void quit_parsing_file() { m_parsing_file = false; }
#endif // ENABLE_GCODE_VIEWER
float& x() { return m_position[X]; } float& x() { return m_position[X]; }
float x() const { return m_position[X]; } float x() const { return m_position[X]; }
@ -145,6 +148,9 @@ private:
char m_extrusion_axis; char m_extrusion_axis;
float m_position[NUM_AXES]; float m_position[NUM_AXES];
bool m_verbose; bool m_verbose;
#if ENABLE_GCODE_VIEWER
bool m_parsing_file{ false };
#endif // ENABLE_GCODE_VIEWER
}; };
} /* namespace Slic3r */ } /* namespace Slic3r */

View file

@ -153,7 +153,7 @@ GCodeSender::set_baud_rate(unsigned int baud_rate)
if (::tcsetattr(handle, TCSAFLUSH, &ios) != 0) if (::tcsetattr(handle, TCSAFLUSH, &ios) != 0)
printf("Failed to set baud rate: %s\n", strerror(errno)); printf("Failed to set baud rate: %s\n", strerror(errno));
#else #else
//throw invalid_argument ("OS does not currently support custom bauds"); //throw Slic3r::InvalidArgument("OS does not currently support custom bauds");
#endif #endif
} }
} }

View file

@ -1,3 +1,4 @@
#include "Exception.hpp"
#include "GCodeTimeEstimator.hpp" #include "GCodeTimeEstimator.hpp"
#include "Utils.hpp" #include "Utils.hpp"
#include <boost/bind.hpp> #include <boost/bind.hpp>
@ -9,6 +10,8 @@
#include <boost/nowide/cstdio.hpp> #include <boost/nowide/cstdio.hpp>
#include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/predicate.hpp>
#if !ENABLE_GCODE_VIEWER
static const float MMMIN_TO_MMSEC = 1.0f / 60.0f; static const float MMMIN_TO_MMSEC = 1.0f / 60.0f;
static const float MILLISEC_TO_SEC = 0.001f; static const float MILLISEC_TO_SEC = 0.001f;
static const float INCHES_TO_MM = 25.4f; static const float INCHES_TO_MM = 25.4f;
@ -252,13 +255,13 @@ namespace Slic3r {
{ {
boost::nowide::ifstream in(filename); boost::nowide::ifstream in(filename);
if (!in.good()) if (!in.good())
throw std::runtime_error(std::string("Time estimator post process export failed.\nCannot open file for reading.\n")); throw Slic3r::RuntimeError(std::string("Time estimator post process export failed.\nCannot open file for reading.\n"));
std::string path_tmp = filename + ".postprocess"; std::string path_tmp = filename + ".postprocess";
FILE* out = boost::nowide::fopen(path_tmp.c_str(), "wb"); FILE* out = boost::nowide::fopen(path_tmp.c_str(), "wb");
if (out == nullptr) if (out == nullptr)
throw std::runtime_error(std::string("Time estimator post process export failed.\nCannot open file for writing.\n")); throw Slic3r::RuntimeError(std::string("Time estimator post process export failed.\nCannot open file for writing.\n"));
std::string normal_time_mask = "M73 P%s R%s\n"; std::string normal_time_mask = "M73 P%s R%s\n";
std::string silent_time_mask = "M73 Q%s S%s\n"; std::string silent_time_mask = "M73 Q%s S%s\n";
@ -276,7 +279,7 @@ namespace Slic3r {
in.close(); in.close();
fclose(out); fclose(out);
boost::nowide::remove(path_tmp.c_str()); boost::nowide::remove(path_tmp.c_str());
throw std::runtime_error(std::string("Time estimator post process export failed.\nIs the disk full?\n")); throw Slic3r::RuntimeError(std::string("Time estimator post process export failed.\nIs the disk full?\n"));
} }
export_line.clear(); export_line.clear();
}; };
@ -324,7 +327,7 @@ namespace Slic3r {
if (!in.good()) if (!in.good())
{ {
fclose(out); fclose(out);
throw std::runtime_error(std::string("Time estimator post process export failed.\nError while reading from file.\n")); throw Slic3r::RuntimeError(std::string("Time estimator post process export failed.\nError while reading from file.\n"));
} }
// check tags // check tags
@ -381,7 +384,7 @@ namespace Slic3r {
in.close(); in.close();
if (rename_file(path_tmp, filename)) if (rename_file(path_tmp, filename))
throw std::runtime_error(std::string("Failed to rename the output G-code file from ") + path_tmp + " to " + filename + '\n' + throw Slic3r::RuntimeError(std::string("Failed to rename the output G-code file from ") + path_tmp + " to " + filename + '\n' +
"Is " + path_tmp + " locked?" + '\n'); "Is " + path_tmp + " locked?" + '\n');
return true; return true;
@ -1672,3 +1675,5 @@ namespace Slic3r {
} }
#endif // ENABLE_MOVE_STATS #endif // ENABLE_MOVE_STATS
} }
#endif // !ENABLE_GCODE_VIEWER

Some files were not shown because too many files have changed in this diff Show more