Fixed conflicts after merge with branch dev
This commit is contained in:
commit
b9b702d550
@ -491,17 +491,36 @@ add_custom_target(gettext_merge_po_with_pot
|
|||||||
)
|
)
|
||||||
file(GLOB L10N_PO_FILES "${L10N_DIR}/*/PrusaSlicer*.po")
|
file(GLOB L10N_PO_FILES "${L10N_DIR}/*/PrusaSlicer*.po")
|
||||||
foreach(po_file ${L10N_PO_FILES})
|
foreach(po_file ${L10N_PO_FILES})
|
||||||
GET_FILENAME_COMPONENT(po_dir "${po_file}" DIRECTORY)
|
#GET_FILENAME_COMPONENT(po_dir "${po_file}" DIRECTORY)
|
||||||
SET(po_new_file "${po_dir}/PrusaSlicer_.po")
|
#SET(po_new_file "${po_dir}/PrusaSlicer_.po")
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET gettext_merge_po_with_pot PRE_BUILD
|
TARGET gettext_merge_po_with_pot PRE_BUILD
|
||||||
COMMAND msgmerge -N -o ${po_file} ${po_file} "${L10N_DIR}/PrusaSlicer.pot"
|
COMMAND msgmerge -N -o ${po_file} ${po_file} "${L10N_DIR}/PrusaSlicer.pot"
|
||||||
DEPENDS ${po_file}
|
DEPENDS ${po_file}
|
||||||
)
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
add_custom_target(gettext_concat_wx_po_with_po
|
||||||
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
|
COMMENT "Concatenate and merge wxWidgets localization po with PrusaSlicer po file"
|
||||||
|
)
|
||||||
|
file(GLOB L10N_PO_FILES "${L10N_DIR}/*/PrusaSlicer*.po")
|
||||||
|
file(GLOB L10N_WX_PO_FILES "${L10N_DIR}/*/PrusaSlicer*.po")
|
||||||
|
foreach(po_file ${L10N_PO_FILES})
|
||||||
|
GET_FILENAME_COMPONENT(po_dir "${po_file}" DIRECTORY)
|
||||||
|
GET_FILENAME_COMPONENT(po_dir_name "${po_dir}" NAME)
|
||||||
|
SET(wx_po_file "${L10N_DIR}/wx_locale/${po_dir_name}.po")
|
||||||
|
#SET(po_new_file "${po_dir}/PrusaSlicer_.po")
|
||||||
|
add_custom_command(
|
||||||
|
TARGET gettext_concat_wx_po_with_po PRE_BUILD
|
||||||
|
COMMAND msgcat --use-first -o ${po_file} ${po_file} ${wx_po_file}
|
||||||
|
DEPENDS ${po_file}
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_custom_target(gettext_po_to_mo
|
add_custom_target(gettext_po_to_mo
|
||||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
COMMENT "Generate localization po files (binary) from mo files (texts)"
|
COMMENT "Generate localization mo files (binary) from po files (texts)"
|
||||||
)
|
)
|
||||||
file(GLOB L10N_PO_FILES "${L10N_DIR}/*/PrusaSlicer*.po")
|
file(GLOB L10N_PO_FILES "${L10N_DIR}/*/PrusaSlicer*.po")
|
||||||
foreach(po_file ${L10N_PO_FILES})
|
foreach(po_file ${L10N_PO_FILES})
|
||||||
|
2
deps/wxWidgets/wxWidgets.cmake
vendored
2
deps/wxWidgets/wxWidgets.cmake
vendored
@ -13,7 +13,7 @@ prusaslicer_add_cmake_project(wxWidgets
|
|||||||
# GIT_REPOSITORY "https://github.com/prusa3d/wxWidgets"
|
# GIT_REPOSITORY "https://github.com/prusa3d/wxWidgets"
|
||||||
# GIT_TAG tm_cross_compile #${_wx_git_tag}
|
# GIT_TAG tm_cross_compile #${_wx_git_tag}
|
||||||
URL https://github.com/prusa3d/wxWidgets/archive/refs/heads/v3.1.4-patched.zip
|
URL https://github.com/prusa3d/wxWidgets/archive/refs/heads/v3.1.4-patched.zip
|
||||||
URL_HASH SHA256=1dc34e0ef90c2a05b36df3c6a87ff80254186e23d5035b6500e82f4da628152a
|
URL_HASH SHA256=69dec874981d2fc3d90345660c27f3450d8430c483e8446edcc87b6ed18bff8f
|
||||||
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} dep_TIFF dep_JPEG
|
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} dep_TIFF dep_JPEG
|
||||||
CMAKE_ARGS
|
CMAKE_ARGS
|
||||||
-DwxBUILD_PRECOMP=ON
|
-DwxBUILD_PRECOMP=ON
|
||||||
|
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-12-20 10:09+0100\n"
|
"POT-Creation-Date: 2021-12-21 22:19+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -77,6 +77,11 @@ msgid ""
|
|||||||
"and we would be glad if you reported it."
|
"and we would be glad if you reported it."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/slic3r/GUI/BackgroundSlicingProcess.cpp:84
|
||||||
|
#, possible-boost-format
|
||||||
|
msgid "PrusaSlicer has encountered a fatal error: \"%1%\""
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/BackgroundSlicingProcess.cpp:85
|
#: src/slic3r/GUI/BackgroundSlicingProcess.cpp:85
|
||||||
msgid ""
|
msgid ""
|
||||||
"Please save your project and restart PrusaSlicer. We would be glad if you "
|
"Please save your project and restart PrusaSlicer. We would be glad if you "
|
||||||
@ -209,8 +214,8 @@ msgstr ""
|
|||||||
#: src/slic3r/GUI/BedShapeDialog.cpp:64 src/slic3r/GUI/ConfigWizard.cpp:262
|
#: src/slic3r/GUI/BedShapeDialog.cpp:64 src/slic3r/GUI/ConfigWizard.cpp:262
|
||||||
#: src/slic3r/GUI/ConfigWizard.cpp:1476 src/slic3r/GUI/ConfigWizard.cpp:1490
|
#: src/slic3r/GUI/ConfigWizard.cpp:1476 src/slic3r/GUI/ConfigWizard.cpp:1490
|
||||||
#: src/slic3r/GUI/ExtruderSequenceDialog.cpp:100
|
#: src/slic3r/GUI/ExtruderSequenceDialog.cpp:100
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3166 src/slic3r/GUI/GCodeViewer.cpp:3172
|
#: src/slic3r/GUI/GCodeViewer.cpp:3176 src/slic3r/GUI/GCodeViewer.cpp:3182
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3180 src/slic3r/GUI/Gizmos/GLGizmoCut.cpp:192
|
#: src/slic3r/GUI/GCodeViewer.cpp:3190 src/slic3r/GUI/Gizmos/GLGizmoCut.cpp:192
|
||||||
#: src/slic3r/GUI/GUI_ObjectLayers.cpp:145
|
#: src/slic3r/GUI/GUI_ObjectLayers.cpp:145
|
||||||
#: src/slic3r/GUI/GUI_ObjectManipulation.cpp:320
|
#: src/slic3r/GUI/GUI_ObjectManipulation.cpp:320
|
||||||
#: src/slic3r/GUI/GUI_ObjectManipulation.cpp:409
|
#: src/slic3r/GUI/GUI_ObjectManipulation.cpp:409
|
||||||
@ -285,7 +290,7 @@ msgstr ""
|
|||||||
msgid "Load shape from STL..."
|
msgid "Load shape from STL..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/BedShapeDialog.cpp:249 src/slic3r/GUI/GCodeViewer.cpp:3695
|
#: src/slic3r/GUI/BedShapeDialog.cpp:249 src/slic3r/GUI/GCodeViewer.cpp:3705
|
||||||
#: src/slic3r/GUI/MainFrame.cpp:2140
|
#: src/slic3r/GUI/MainFrame.cpp:2140
|
||||||
msgid "Settings"
|
msgid "Settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -1690,6 +1695,10 @@ msgstr ""
|
|||||||
msgid "Firmware image:"
|
msgid "Firmware image:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/slic3r/GUI/FirmwareDialog.cpp:814
|
||||||
|
msgid "Select a file"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/FirmwareDialog.cpp:816
|
#: src/slic3r/GUI/FirmwareDialog.cpp:816
|
||||||
#: src/slic3r/GUI/PhysicalPrinterDialog.cpp:297
|
#: src/slic3r/GUI/PhysicalPrinterDialog.cpp:297
|
||||||
#: src/slic3r/GUI/PhysicalPrinterDialog.cpp:372
|
#: src/slic3r/GUI/PhysicalPrinterDialog.cpp:372
|
||||||
@ -1808,238 +1817,238 @@ msgstr ""
|
|||||||
msgid "Loading of the \"%1%\""
|
msgid "Loading of the \"%1%\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:264
|
#: src/slic3r/GUI/GCodeViewer.cpp:274
|
||||||
msgid "Tool position"
|
msgid "Tool position"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:1452
|
#: src/slic3r/GUI/GCodeViewer.cpp:1462
|
||||||
msgid "Generating toolpaths"
|
msgid "Generating toolpaths"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:1512
|
#: src/slic3r/GUI/GCodeViewer.cpp:1522
|
||||||
msgid "Generating vertex buffer"
|
msgid "Generating vertex buffer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:1847
|
#: src/slic3r/GUI/GCodeViewer.cpp:1857
|
||||||
msgid "Generating index buffers"
|
msgid "Generating index buffers"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3032
|
#: src/slic3r/GUI/GCodeViewer.cpp:3042
|
||||||
msgid "Click to hide"
|
msgid "Click to hide"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3032
|
#: src/slic3r/GUI/GCodeViewer.cpp:3042
|
||||||
msgid "Click to show"
|
msgid "Click to show"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3166
|
#: src/slic3r/GUI/GCodeViewer.cpp:3176
|
||||||
msgid "up to"
|
msgid "up to"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3172
|
#: src/slic3r/GUI/GCodeViewer.cpp:3182
|
||||||
msgid "above"
|
msgid "above"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3180
|
#: src/slic3r/GUI/GCodeViewer.cpp:3190
|
||||||
msgid "from"
|
msgid "from"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3180
|
#: src/slic3r/GUI/GCodeViewer.cpp:3190
|
||||||
msgid "to"
|
msgid "to"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3230 src/slic3r/GUI/GCodeViewer.cpp:3231
|
#: src/slic3r/GUI/GCodeViewer.cpp:3240 src/slic3r/GUI/GCodeViewer.cpp:3241
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3280
|
#: src/slic3r/GUI/GCodeViewer.cpp:3290
|
||||||
msgid "Percentage"
|
msgid "Percentage"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3241 src/slic3r/GUI/GCodeViewer.cpp:3280
|
#: src/slic3r/GUI/GCodeViewer.cpp:3251 src/slic3r/GUI/GCodeViewer.cpp:3290
|
||||||
#: src/slic3r/GUI/GUI_Preview.cpp:217 src/slic3r/GUI/GUI_Preview.cpp:957
|
#: src/slic3r/GUI/GUI_Preview.cpp:217 src/slic3r/GUI/GUI_Preview.cpp:957
|
||||||
msgid "Feature type"
|
msgid "Feature type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3241 src/slic3r/GUI/GCodeViewer.cpp:3280
|
#: src/slic3r/GUI/GCodeViewer.cpp:3251 src/slic3r/GUI/GCodeViewer.cpp:3290
|
||||||
#: src/slic3r/GUI/RammingChart.cpp:90
|
#: src/slic3r/GUI/RammingChart.cpp:90
|
||||||
msgid "Time"
|
msgid "Time"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3280 src/slic3r/GUI/GCodeViewer.cpp:3291
|
#: src/slic3r/GUI/GCodeViewer.cpp:3290 src/slic3r/GUI/GCodeViewer.cpp:3301
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3552
|
#: src/slic3r/GUI/GCodeViewer.cpp:3562
|
||||||
msgid "Used filament"
|
msgid "Used filament"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3283
|
#: src/slic3r/GUI/GCodeViewer.cpp:3293
|
||||||
msgid "Height (mm)"
|
msgid "Height (mm)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3284
|
#: src/slic3r/GUI/GCodeViewer.cpp:3294
|
||||||
msgid "Width (mm)"
|
msgid "Width (mm)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3285
|
#: src/slic3r/GUI/GCodeViewer.cpp:3295
|
||||||
msgid "Speed (mm/s)"
|
msgid "Speed (mm/s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3286
|
#: src/slic3r/GUI/GCodeViewer.cpp:3296
|
||||||
msgid "Fan Speed (%)"
|
msgid "Fan Speed (%)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3287
|
#: src/slic3r/GUI/GCodeViewer.cpp:3297
|
||||||
msgid "Temperature (°C)"
|
msgid "Temperature (°C)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3288
|
#: src/slic3r/GUI/GCodeViewer.cpp:3298
|
||||||
msgid "Volumetric flow rate (mm³/s)"
|
msgid "Volumetric flow rate (mm³/s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3291 src/slic3r/GUI/GUI_Preview.cpp:224
|
#: src/slic3r/GUI/GCodeViewer.cpp:3301 src/slic3r/GUI/GUI_Preview.cpp:224
|
||||||
#: src/slic3r/GUI/GUI_Preview.cpp:957
|
#: src/slic3r/GUI/GUI_Preview.cpp:957
|
||||||
msgid "Tool"
|
msgid "Tool"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3294 src/slic3r/GUI/GUI_Preview.cpp:225
|
#: src/slic3r/GUI/GCodeViewer.cpp:3304 src/slic3r/GUI/GUI_Preview.cpp:225
|
||||||
#: src/slic3r/GUI/GUI_Preview.cpp:956
|
#: src/slic3r/GUI/GUI_Preview.cpp:956
|
||||||
msgid "Color Print"
|
msgid "Color Print"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3332 src/slic3r/GUI/GCodeViewer.cpp:3378
|
#: src/slic3r/GUI/GCodeViewer.cpp:3342 src/slic3r/GUI/GCodeViewer.cpp:3388
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3383 src/slic3r/GUI/GUI_ObjectList.cpp:312
|
#: src/slic3r/GUI/GCodeViewer.cpp:3393 src/slic3r/GUI/GUI_ObjectList.cpp:312
|
||||||
#: src/slic3r/GUI/wxExtensions.cpp:536 src/libslic3r/PrintConfig.cpp:769
|
#: src/slic3r/GUI/wxExtensions.cpp:536 src/libslic3r/PrintConfig.cpp:769
|
||||||
msgid "Extruder"
|
msgid "Extruder"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3355
|
#: src/slic3r/GUI/GCodeViewer.cpp:3365
|
||||||
msgid "Default color"
|
msgid "Default color"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3378
|
#: src/slic3r/GUI/GCodeViewer.cpp:3388
|
||||||
msgid "default color"
|
msgid "default color"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3477 src/slic3r/GUI/GCodeViewer.cpp:3533
|
#: src/slic3r/GUI/GCodeViewer.cpp:3487 src/slic3r/GUI/GCodeViewer.cpp:3543
|
||||||
msgid "Color change"
|
msgid "Color change"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3496 src/slic3r/GUI/GCodeViewer.cpp:3531
|
#: src/slic3r/GUI/GCodeViewer.cpp:3506 src/slic3r/GUI/GCodeViewer.cpp:3541
|
||||||
msgid "Print"
|
msgid "Print"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3532 src/slic3r/GUI/GCodeViewer.cpp:3566
|
#: src/slic3r/GUI/GCodeViewer.cpp:3542 src/slic3r/GUI/GCodeViewer.cpp:3576
|
||||||
msgid "Pause"
|
msgid "Pause"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3549 src/slic3r/GUI/GCodeViewer.cpp:3552
|
#: src/slic3r/GUI/GCodeViewer.cpp:3559 src/slic3r/GUI/GCodeViewer.cpp:3562
|
||||||
msgid "Event"
|
msgid "Event"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3549 src/slic3r/GUI/GCodeViewer.cpp:3552
|
#: src/slic3r/GUI/GCodeViewer.cpp:3559 src/slic3r/GUI/GCodeViewer.cpp:3562
|
||||||
msgid "Remaining time"
|
msgid "Remaining time"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3549 src/slic3r/GUI/GCodeViewer.cpp:3552
|
#: src/slic3r/GUI/GCodeViewer.cpp:3559 src/slic3r/GUI/GCodeViewer.cpp:3562
|
||||||
msgid "Duration"
|
msgid "Duration"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3595 src/slic3r/GUI/GUI_Preview.cpp:1048
|
#: src/slic3r/GUI/GCodeViewer.cpp:3605 src/slic3r/GUI/GUI_Preview.cpp:1048
|
||||||
#: src/libslic3r/PrintConfig.cpp:2881
|
#: src/libslic3r/PrintConfig.cpp:2881
|
||||||
msgid "Travel"
|
msgid "Travel"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3598
|
#: src/slic3r/GUI/GCodeViewer.cpp:3608
|
||||||
msgid "Movement"
|
msgid "Movement"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3599
|
#: src/slic3r/GUI/GCodeViewer.cpp:3609
|
||||||
msgid "Extrusion"
|
msgid "Extrusion"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3600 src/slic3r/GUI/Tab.cpp:1838
|
#: src/slic3r/GUI/GCodeViewer.cpp:3610 src/slic3r/GUI/Tab.cpp:1838
|
||||||
#: src/slic3r/GUI/Tab.cpp:2773
|
#: src/slic3r/GUI/Tab.cpp:2773
|
||||||
msgid "Retraction"
|
msgid "Retraction"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3617 src/slic3r/GUI/GCodeViewer.cpp:3620
|
#: src/slic3r/GUI/GCodeViewer.cpp:3627 src/slic3r/GUI/GCodeViewer.cpp:3630
|
||||||
#: src/slic3r/GUI/GUI_Preview.cpp:1049
|
#: src/slic3r/GUI/GUI_Preview.cpp:1049
|
||||||
msgid "Wipe"
|
msgid "Wipe"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3652 src/slic3r/GUI/GUI_Preview.cpp:257
|
#: src/slic3r/GUI/GCodeViewer.cpp:3662 src/slic3r/GUI/GUI_Preview.cpp:257
|
||||||
#: src/slic3r/GUI/GUI_Preview.cpp:272
|
#: src/slic3r/GUI/GUI_Preview.cpp:272
|
||||||
msgid "Options"
|
msgid "Options"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3655 src/slic3r/GUI/GUI_Preview.cpp:1050
|
#: src/slic3r/GUI/GCodeViewer.cpp:3665 src/slic3r/GUI/GUI_Preview.cpp:1050
|
||||||
msgid "Retractions"
|
msgid "Retractions"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3656 src/slic3r/GUI/GUI_Preview.cpp:1051
|
#: src/slic3r/GUI/GCodeViewer.cpp:3666 src/slic3r/GUI/GUI_Preview.cpp:1051
|
||||||
msgid "Deretractions"
|
msgid "Deretractions"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3657 src/slic3r/GUI/GUI_Preview.cpp:1052
|
#: src/slic3r/GUI/GCodeViewer.cpp:3667 src/slic3r/GUI/GUI_Preview.cpp:1052
|
||||||
msgid "Seams"
|
msgid "Seams"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3658 src/slic3r/GUI/GUI_Preview.cpp:1053
|
#: src/slic3r/GUI/GCodeViewer.cpp:3668 src/slic3r/GUI/GUI_Preview.cpp:1053
|
||||||
msgid "Tool changes"
|
msgid "Tool changes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3659 src/slic3r/GUI/GUI_Preview.cpp:1054
|
#: src/slic3r/GUI/GCodeViewer.cpp:3669 src/slic3r/GUI/GUI_Preview.cpp:1054
|
||||||
msgid "Color changes"
|
msgid "Color changes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3660 src/slic3r/GUI/GUI_Preview.cpp:1055
|
#: src/slic3r/GUI/GCodeViewer.cpp:3670 src/slic3r/GUI/GUI_Preview.cpp:1055
|
||||||
msgid "Print pauses"
|
msgid "Print pauses"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3661 src/slic3r/GUI/GUI_Preview.cpp:1056
|
#: src/slic3r/GUI/GCodeViewer.cpp:3671 src/slic3r/GUI/GUI_Preview.cpp:1056
|
||||||
msgid "Custom G-codes"
|
msgid "Custom G-codes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3681 src/slic3r/GUI/GCodeViewer.cpp:3700
|
#: src/slic3r/GUI/GCodeViewer.cpp:3691 src/slic3r/GUI/GCodeViewer.cpp:3710
|
||||||
#: src/slic3r/GUI/GUI.cpp:341 src/slic3r/GUI/Plater.cpp:821
|
#: src/slic3r/GUI/GUI.cpp:341 src/slic3r/GUI/Plater.cpp:821
|
||||||
#: src/libslic3r/PrintConfig.cpp:299
|
#: src/libslic3r/PrintConfig.cpp:299
|
||||||
msgid "Printer"
|
msgid "Printer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3683 src/slic3r/GUI/GCodeViewer.cpp:3705
|
#: src/slic3r/GUI/GCodeViewer.cpp:3693 src/slic3r/GUI/GCodeViewer.cpp:3715
|
||||||
#: src/slic3r/GUI/GUI.cpp:337 src/slic3r/GUI/Plater.cpp:817
|
#: src/slic3r/GUI/GUI.cpp:337 src/slic3r/GUI/Plater.cpp:817
|
||||||
msgid "Print settings"
|
msgid "Print settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3686 src/slic3r/GUI/GCodeViewer.cpp:3712
|
#: src/slic3r/GUI/GCodeViewer.cpp:3696 src/slic3r/GUI/GCodeViewer.cpp:3722
|
||||||
#: src/slic3r/GUI/GUI.cpp:339 src/slic3r/GUI/Plater.cpp:818
|
#: src/slic3r/GUI/GUI.cpp:339 src/slic3r/GUI/Plater.cpp:818
|
||||||
#: src/slic3r/GUI/Tab.cpp:1938 src/slic3r/GUI/Tab.cpp:1939
|
#: src/slic3r/GUI/Tab.cpp:1938 src/slic3r/GUI/Tab.cpp:1939
|
||||||
msgid "Filament"
|
msgid "Filament"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3725
|
#: src/slic3r/GUI/GCodeViewer.cpp:3735
|
||||||
msgid "Estimated printing times"
|
msgid "Estimated printing times"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3744
|
#: src/slic3r/GUI/GCodeViewer.cpp:3754
|
||||||
msgid "Normal mode"
|
msgid "Normal mode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3745
|
#: src/slic3r/GUI/GCodeViewer.cpp:3755
|
||||||
msgid "Stealth mode"
|
msgid "Stealth mode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3752 src/libslic3r/PrintConfig.cpp:1166
|
#: src/slic3r/GUI/GCodeViewer.cpp:3762 src/libslic3r/PrintConfig.cpp:1166
|
||||||
#: src/libslic3r/PrintConfig.cpp:1184 src/libslic3r/PrintConfig.cpp:1194
|
#: src/libslic3r/PrintConfig.cpp:1184 src/libslic3r/PrintConfig.cpp:1194
|
||||||
#: src/libslic3r/PrintConfig.cpp:1239
|
#: src/libslic3r/PrintConfig.cpp:1239
|
||||||
msgid "First layer"
|
msgid "First layer"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3753
|
#: src/slic3r/GUI/GCodeViewer.cpp:3763
|
||||||
msgid "Total"
|
msgid "Total"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3787
|
#: src/slic3r/GUI/GCodeViewer.cpp:3797
|
||||||
msgid "Show stealth mode"
|
msgid "Show stealth mode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GCodeViewer.cpp:3791
|
#: src/slic3r/GUI/GCodeViewer.cpp:3801
|
||||||
msgid "Show normal mode"
|
msgid "Show normal mode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -3192,10 +3201,6 @@ msgstr ""
|
|||||||
msgid "Remember my choice"
|
msgid "Remember my choice"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/GUI_App.cpp:1158
|
|
||||||
msgid "Loading configuration"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: src/slic3r/GUI/GUI_App.cpp:1191
|
#: src/slic3r/GUI/GUI_App.cpp:1191
|
||||||
#, possible-boost-format
|
#, possible-boost-format
|
||||||
msgid "New release version %1% is available."
|
msgid "New release version %1% is available."
|
||||||
@ -4625,6 +4630,34 @@ msgstr ""
|
|||||||
msgid "An unexpected error occured"
|
msgid "An unexpected error occured"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/slic3r/GUI/Jobs/RotoptimizeJob.hpp:21
|
||||||
|
msgid "Best surface quality"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/slic3r/GUI/Jobs/RotoptimizeJob.hpp:23
|
||||||
|
msgid "Optimize object rotation for best surface quality."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/slic3r/GUI/Jobs/RotoptimizeJob.hpp:24
|
||||||
|
msgid "Reduced overhang slopes"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/slic3r/GUI/Jobs/RotoptimizeJob.hpp:26
|
||||||
|
msgid ""
|
||||||
|
"Optimize object rotation to have minimum amount of overhangs needing support "
|
||||||
|
"structures.\n"
|
||||||
|
"Note that this method will try to find the best surface of the object for "
|
||||||
|
"touching the print bed if no elevation is set."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/slic3r/GUI/Jobs/RotoptimizeJob.hpp:30
|
||||||
|
msgid "Lowest Z height"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/slic3r/GUI/Jobs/RotoptimizeJob.hpp:32
|
||||||
|
msgid "Rotate the model to have the lowest z height for faster print time."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/Jobs/RotoptimizeJob.cpp:59
|
#: src/slic3r/GUI/Jobs/RotoptimizeJob.cpp:59
|
||||||
msgid "Searching for optimal orientation"
|
msgid "Searching for optimal orientation"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -5982,32 +6015,32 @@ msgstr ""
|
|||||||
msgid "Swap Y/Z axes"
|
msgid "Swap Y/Z axes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/MsgDialog.cpp:198
|
#: src/slic3r/GUI/MsgDialog.cpp:203
|
||||||
#, possible-c-format, possible-boost-format
|
#, possible-c-format, possible-boost-format
|
||||||
msgid "%s error"
|
msgid "%s error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/MsgDialog.cpp:199
|
#: src/slic3r/GUI/MsgDialog.cpp:204
|
||||||
#, possible-c-format, possible-boost-format
|
#, possible-c-format, possible-boost-format
|
||||||
msgid "%s has encountered an error"
|
msgid "%s has encountered an error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/MsgDialog.cpp:218
|
#: src/slic3r/GUI/MsgDialog.cpp:223
|
||||||
#, possible-c-format, possible-boost-format
|
#, possible-c-format, possible-boost-format
|
||||||
msgid "%s warning"
|
msgid "%s warning"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/MsgDialog.cpp:219
|
#: src/slic3r/GUI/MsgDialog.cpp:224
|
||||||
#, possible-c-format, possible-boost-format
|
#, possible-c-format, possible-boost-format
|
||||||
msgid "%s has a warning"
|
msgid "%s has a warning"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/MsgDialog.cpp:232 src/slic3r/GUI/MsgDialog.cpp:245
|
#: src/slic3r/GUI/MsgDialog.cpp:237 src/slic3r/GUI/MsgDialog.cpp:250
|
||||||
#, possible-c-format, possible-boost-format
|
#, possible-c-format, possible-boost-format
|
||||||
msgid "%s info"
|
msgid "%s info"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/MsgDialog.cpp:273
|
#: src/slic3r/GUI/MsgDialog.cpp:278
|
||||||
#, possible-c-format, possible-boost-format
|
#, possible-c-format, possible-boost-format
|
||||||
msgid "%s information"
|
msgid "%s information"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -7076,35 +7109,35 @@ msgstr ""
|
|||||||
#: src/slic3r/GUI/Preferences.cpp:220
|
#: src/slic3r/GUI/Preferences.cpp:220
|
||||||
#: src/slic3r/GUI/UnsavedChangesDialog.cpp:896
|
#: src/slic3r/GUI/UnsavedChangesDialog.cpp:896
|
||||||
msgid ""
|
msgid ""
|
||||||
"Ask to save unsaved changes when closing the application or when loading a "
|
"Ask to save unsaved changes in presets when closing the application or when "
|
||||||
"new project"
|
"loading a new project"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/Preferences.cpp:222
|
#: src/slic3r/GUI/Preferences.cpp:222
|
||||||
msgid ""
|
msgid ""
|
||||||
"Always ask for unsaved changes, when: \n"
|
"Always ask for unsaved changes in presets, when: \n"
|
||||||
"- Closing PrusaSlicer while some presets are modified,\n"
|
"- Closing PrusaSlicer while some presets are modified,\n"
|
||||||
"- Loading a new project while some presets are modified"
|
"- Loading a new project while some presets are modified"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/Preferences.cpp:229
|
#: src/slic3r/GUI/Preferences.cpp:229
|
||||||
#: src/slic3r/GUI/UnsavedChangesDialog.cpp:895
|
#: src/slic3r/GUI/UnsavedChangesDialog.cpp:895
|
||||||
msgid "Ask for unsaved changes when selecting new preset"
|
msgid "Ask for unsaved changes in presets when selecting new preset"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/Preferences.cpp:231
|
#: src/slic3r/GUI/Preferences.cpp:231
|
||||||
msgid ""
|
msgid ""
|
||||||
"Always ask for unsaved changes when selecting new preset or resetting a "
|
"Always ask for unsaved changes in presets when selecting new preset or "
|
||||||
"preset"
|
"resetting a preset"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/Preferences.cpp:236
|
#: src/slic3r/GUI/Preferences.cpp:236
|
||||||
#: src/slic3r/GUI/UnsavedChangesDialog.cpp:894
|
#: src/slic3r/GUI/UnsavedChangesDialog.cpp:894
|
||||||
msgid "Ask for unsaved changes when creating new project"
|
msgid "Ask for unsaved changes in presets when creating new project"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/Preferences.cpp:238
|
#: src/slic3r/GUI/Preferences.cpp:238
|
||||||
msgid "Always ask for unsaved changes when creating new project"
|
msgid "Always ask for unsaved changes in presets when creating new project"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/Preferences.cpp:245
|
#: src/slic3r/GUI/Preferences.cpp:245
|
||||||
@ -8739,19 +8772,20 @@ msgstr ""
|
|||||||
|
|
||||||
#: src/slic3r/GUI/UnsavedChangesDialog.cpp:897
|
#: src/slic3r/GUI/UnsavedChangesDialog.cpp:897
|
||||||
msgid ""
|
msgid ""
|
||||||
"You will not be asked about the unsaved changes the next time you create new "
|
"You will not be asked about the unsaved changes in presets the next time you "
|
||||||
"project"
|
"create new project"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/UnsavedChangesDialog.cpp:898
|
#: src/slic3r/GUI/UnsavedChangesDialog.cpp:898
|
||||||
msgid ""
|
msgid ""
|
||||||
"You will not be asked about the unsaved changes the next time you switch a "
|
"You will not be asked about the unsaved changes in presets the next time you "
|
||||||
"preset"
|
"switch a preset"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/UnsavedChangesDialog.cpp:899
|
#: src/slic3r/GUI/UnsavedChangesDialog.cpp:899
|
||||||
msgid ""
|
msgid ""
|
||||||
"You will not be asked about the unsaved changes the next time you: \n"
|
"You will not be asked about the unsaved changes in presets the next time "
|
||||||
|
"you: \n"
|
||||||
"- Closing PrusaSlicer while some presets are modified,\n"
|
"- Closing PrusaSlicer while some presets are modified,\n"
|
||||||
"- Loading a new project while some presets are modified"
|
"- Loading a new project while some presets are modified"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -8832,6 +8866,10 @@ msgstr ""
|
|||||||
msgid "Extruders count"
|
msgid "Extruders count"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/slic3r/GUI/UnsavedChangesDialog.cpp:1444
|
||||||
|
msgid "Select presets to compare"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/slic3r/GUI/UnsavedChangesDialog.cpp:1493
|
#: src/slic3r/GUI/UnsavedChangesDialog.cpp:1493
|
||||||
msgid "Show all presets (including incompatible)"
|
msgid "Show all presets (including incompatible)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -9377,6 +9415,27 @@ msgid ""
|
|||||||
"Error: \"%2%\""
|
"Error: \"%2%\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/slic3r/Config/Snapshot.cpp:584
|
||||||
|
msgid "Taking a configuration snapshot failed."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/slic3r/Config/Snapshot.cpp:598
|
||||||
|
msgid ""
|
||||||
|
"PrusaSlicer has encountered an error while taking a configuration snapshot."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/slic3r/Config/Snapshot.cpp:599
|
||||||
|
msgid "PrusaSlicer error"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/slic3r/Config/Snapshot.cpp:601
|
||||||
|
msgid "Continue"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/slic3r/Config/Snapshot.cpp:601
|
||||||
|
msgid "Abort"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: src/libslic3r/GCode.cpp:539
|
#: src/libslic3r/GCode.cpp:539
|
||||||
msgid "There is an object with no extrusions in the first layer."
|
msgid "There is an object with no extrusions in the first layer."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -9419,7 +9478,11 @@ msgid ""
|
|||||||
"This may cause problems in g-code visualization and printing time estimation."
|
"This may cause problems in g-code visualization and printing time estimation."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/libslic3r/GCode.cpp:1420
|
#: src/libslic3r/GCode.cpp:1217 src/libslic3r/GCode.cpp:1228
|
||||||
|
msgid "No extrusions were generated for objects."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: src/libslic3r/GCode.cpp:1426
|
||||||
msgid ""
|
msgid ""
|
||||||
"Your print is very close to the priming regions. Make sure there is no "
|
"Your print is very close to the priming regions. Make sure there is no "
|
||||||
"collision."
|
"collision."
|
||||||
|
@ -44,6 +44,7 @@ src/slic3r/GUI/Jobs/ArrangeJob.cpp
|
|||||||
src/slic3r/GUI/Jobs/FillBedJob.cpp
|
src/slic3r/GUI/Jobs/FillBedJob.cpp
|
||||||
src/slic3r/GUI/Jobs/Job.cpp
|
src/slic3r/GUI/Jobs/Job.cpp
|
||||||
src/slic3r/GUI/Jobs/PlaterJob.cpp
|
src/slic3r/GUI/Jobs/PlaterJob.cpp
|
||||||
|
src/slic3r/GUI/Jobs/RotoptimizeJob.hpp
|
||||||
src/slic3r/GUI/Jobs/RotoptimizeJob.cpp
|
src/slic3r/GUI/Jobs/RotoptimizeJob.cpp
|
||||||
src/slic3r/GUI/Jobs/SLAImportJob.cpp
|
src/slic3r/GUI/Jobs/SLAImportJob.cpp
|
||||||
src/slic3r/GUI/KBShortcutsDialog.cpp
|
src/slic3r/GUI/KBShortcutsDialog.cpp
|
||||||
@ -83,6 +84,7 @@ src/slic3r/Utils/PresetUpdater.cpp
|
|||||||
src/slic3r/Utils/Http.cpp
|
src/slic3r/Utils/Http.cpp
|
||||||
src/slic3r/Utils/Process.cpp
|
src/slic3r/Utils/Process.cpp
|
||||||
src/slic3r/Utils/Repetier.cpp
|
src/slic3r/Utils/Repetier.cpp
|
||||||
|
src/slic3r/Config/Snapshot.cpp
|
||||||
src/libslic3r/GCode.cpp
|
src/libslic3r/GCode.cpp
|
||||||
src/libslic3r/ExtrusionEntity.cpp
|
src/libslic3r/ExtrusionEntity.cpp
|
||||||
src/libslic3r/Flow.cpp
|
src/libslic3r/Flow.cpp
|
||||||
|
9686
resources/localization/wx_locale/af.po
Normal file
9686
resources/localization/wx_locale/af.po
Normal file
File diff suppressed because it is too large
Load Diff
9539
resources/localization/wx_locale/an.po
Normal file
9539
resources/localization/wx_locale/an.po
Normal file
File diff suppressed because it is too large
Load Diff
9429
resources/localization/wx_locale/ar.po
Normal file
9429
resources/localization/wx_locale/ar.po
Normal file
File diff suppressed because it is too large
Load Diff
9697
resources/localization/wx_locale/ca.po
Normal file
9697
resources/localization/wx_locale/ca.po
Normal file
File diff suppressed because it is too large
Load Diff
10082
resources/localization/wx_locale/ca@valencia.po
Normal file
10082
resources/localization/wx_locale/ca@valencia.po
Normal file
File diff suppressed because it is too large
Load Diff
9866
resources/localization/wx_locale/cs.po
Normal file
9866
resources/localization/wx_locale/cs.po
Normal file
File diff suppressed because it is too large
Load Diff
8857
resources/localization/wx_locale/da.po
Normal file
8857
resources/localization/wx_locale/da.po
Normal file
File diff suppressed because it is too large
Load Diff
9968
resources/localization/wx_locale/de.po
Normal file
9968
resources/localization/wx_locale/de.po
Normal file
File diff suppressed because it is too large
Load Diff
10178
resources/localization/wx_locale/el.po
Normal file
10178
resources/localization/wx_locale/el.po
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/localization/wx_locale/en.mo
Normal file
BIN
resources/localization/wx_locale/en.mo
Normal file
Binary file not shown.
8761
resources/localization/wx_locale/en.po
Normal file
8761
resources/localization/wx_locale/en.po
Normal file
File diff suppressed because it is too large
Load Diff
8893
resources/localization/wx_locale/es.po
Normal file
8893
resources/localization/wx_locale/es.po
Normal file
File diff suppressed because it is too large
Load Diff
9617
resources/localization/wx_locale/eu.po
Normal file
9617
resources/localization/wx_locale/eu.po
Normal file
File diff suppressed because it is too large
Load Diff
8760
resources/localization/wx_locale/fa_IR.po
Normal file
8760
resources/localization/wx_locale/fa_IR.po
Normal file
File diff suppressed because it is too large
Load Diff
9883
resources/localization/wx_locale/fi.po
Normal file
9883
resources/localization/wx_locale/fi.po
Normal file
File diff suppressed because it is too large
Load Diff
10005
resources/localization/wx_locale/fr.po
Normal file
10005
resources/localization/wx_locale/fr.po
Normal file
File diff suppressed because it is too large
Load Diff
10015
resources/localization/wx_locale/gl_ES.po
Normal file
10015
resources/localization/wx_locale/gl_ES.po
Normal file
File diff suppressed because it is too large
Load Diff
10078
resources/localization/wx_locale/hi.po
Normal file
10078
resources/localization/wx_locale/hi.po
Normal file
File diff suppressed because it is too large
Load Diff
8868
resources/localization/wx_locale/hr.po
Normal file
8868
resources/localization/wx_locale/hr.po
Normal file
File diff suppressed because it is too large
Load Diff
9992
resources/localization/wx_locale/hu.po
Normal file
9992
resources/localization/wx_locale/hu.po
Normal file
File diff suppressed because it is too large
Load Diff
9229
resources/localization/wx_locale/id.po
Normal file
9229
resources/localization/wx_locale/id.po
Normal file
File diff suppressed because it is too large
Load Diff
9987
resources/localization/wx_locale/it.po
Normal file
9987
resources/localization/wx_locale/it.po
Normal file
File diff suppressed because it is too large
Load Diff
10196
resources/localization/wx_locale/ja.po
Normal file
10196
resources/localization/wx_locale/ja.po
Normal file
File diff suppressed because it is too large
Load Diff
9772
resources/localization/wx_locale/ko.po
Normal file
9772
resources/localization/wx_locale/ko.po
Normal file
File diff suppressed because it is too large
Load Diff
9772
resources/localization/wx_locale/ko_KR.po
Normal file
9772
resources/localization/wx_locale/ko_KR.po
Normal file
File diff suppressed because it is too large
Load Diff
8839
resources/localization/wx_locale/lt.po
Normal file
8839
resources/localization/wx_locale/lt.po
Normal file
File diff suppressed because it is too large
Load Diff
9803
resources/localization/wx_locale/lv.po
Normal file
9803
resources/localization/wx_locale/lv.po
Normal file
File diff suppressed because it is too large
Load Diff
10117
resources/localization/wx_locale/ms.po
Normal file
10117
resources/localization/wx_locale/ms.po
Normal file
File diff suppressed because it is too large
Load Diff
9856
resources/localization/wx_locale/nb.po
Normal file
9856
resources/localization/wx_locale/nb.po
Normal file
File diff suppressed because it is too large
Load Diff
9134
resources/localization/wx_locale/ne.po
Normal file
9134
resources/localization/wx_locale/ne.po
Normal file
File diff suppressed because it is too large
Load Diff
9420
resources/localization/wx_locale/nl.po
Normal file
9420
resources/localization/wx_locale/nl.po
Normal file
File diff suppressed because it is too large
Load Diff
10137
resources/localization/wx_locale/pl.po
Normal file
10137
resources/localization/wx_locale/pl.po
Normal file
File diff suppressed because it is too large
Load Diff
10064
resources/localization/wx_locale/pt.po
Normal file
10064
resources/localization/wx_locale/pt.po
Normal file
File diff suppressed because it is too large
Load Diff
9948
resources/localization/wx_locale/pt_BR.po
Normal file
9948
resources/localization/wx_locale/pt_BR.po
Normal file
File diff suppressed because it is too large
Load Diff
9759
resources/localization/wx_locale/ro.po
Normal file
9759
resources/localization/wx_locale/ro.po
Normal file
File diff suppressed because it is too large
Load Diff
8691
resources/localization/wx_locale/ru.po
Normal file
8691
resources/localization/wx_locale/ru.po
Normal file
File diff suppressed because it is too large
Load Diff
9802
resources/localization/wx_locale/sk.po
Normal file
9802
resources/localization/wx_locale/sk.po
Normal file
File diff suppressed because it is too large
Load Diff
10104
resources/localization/wx_locale/sl.po
Normal file
10104
resources/localization/wx_locale/sl.po
Normal file
File diff suppressed because it is too large
Load Diff
8864
resources/localization/wx_locale/sq.po
Normal file
8864
resources/localization/wx_locale/sq.po
Normal file
File diff suppressed because it is too large
Load Diff
10003
resources/localization/wx_locale/sv.po
Normal file
10003
resources/localization/wx_locale/sv.po
Normal file
File diff suppressed because it is too large
Load Diff
9518
resources/localization/wx_locale/ta.po
Normal file
9518
resources/localization/wx_locale/ta.po
Normal file
File diff suppressed because it is too large
Load Diff
9132
resources/localization/wx_locale/tr.po
Normal file
9132
resources/localization/wx_locale/tr.po
Normal file
File diff suppressed because it is too large
Load Diff
9855
resources/localization/wx_locale/uk.po
Normal file
9855
resources/localization/wx_locale/uk.po
Normal file
File diff suppressed because it is too large
Load Diff
9876
resources/localization/wx_locale/vi.po
Normal file
9876
resources/localization/wx_locale/vi.po
Normal file
File diff suppressed because it is too large
Load Diff
9913
resources/localization/wx_locale/zh_CN.po
Normal file
9913
resources/localization/wx_locale/zh_CN.po
Normal file
File diff suppressed because it is too large
Load Diff
9676
resources/localization/wx_locale/zh_TW.po
Normal file
9676
resources/localization/wx_locale/zh_TW.po
Normal file
File diff suppressed because it is too large
Load Diff
BIN
resources/profiles/Artillery/Hornet_thumbnail.png
Normal file
BIN
resources/profiles/Artillery/Hornet_thumbnail.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
BIN
resources/profiles/Artillery/bed-hornet.png
Normal file
BIN
resources/profiles/Artillery/bed-hornet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 67 KiB |
BIN
resources/profiles/Artillery/bed-hornet.stl
Normal file
BIN
resources/profiles/Artillery/bed-hornet.stl
Normal file
Binary file not shown.
@ -1,4 +1,5 @@
|
|||||||
min_slic3r_version = 2.4.0-rc
|
min_slic3r_version = 2.4.0-rc
|
||||||
|
1.4.1 Updated firmware version.
|
||||||
1.4.0 Updated for the PrusaSlicer 2.4.0-rc release. Updated SLA material colors.
|
1.4.0 Updated for the PrusaSlicer 2.4.0-rc release. Updated SLA material colors.
|
||||||
min_slic3r_version = 2.4.0-beta2
|
min_slic3r_version = 2.4.0-beta2
|
||||||
1.4.0-beta3 Added material profiles for Prusament Resins.
|
1.4.0-beta3 Added material profiles for Prusament Resins.
|
||||||
@ -20,6 +21,7 @@ min_slic3r_version = 2.4.0-alpha0
|
|||||||
1.3.0-alpha1 Added Prusament PCCF. Increased travel acceleration for Prusa MINI. Updated start g-code for Prusa MINI. Added multiple add:north and Extrudr filament profiles. Updated Z travel speed values.
|
1.3.0-alpha1 Added Prusament PCCF. Increased travel acceleration for Prusa MINI. Updated start g-code for Prusa MINI. Added multiple add:north and Extrudr filament profiles. Updated Z travel speed values.
|
||||||
1.3.0-alpha0 Disabled thick bridges, updated support settings.
|
1.3.0-alpha0 Disabled thick bridges, updated support settings.
|
||||||
min_slic3r_version = 2.3.2-alpha0
|
min_slic3r_version = 2.3.2-alpha0
|
||||||
|
1.3.6 Updated firmware version.
|
||||||
1.3.5 Added material profiles for Prusament Resins.
|
1.3.5 Added material profiles for Prusament Resins.
|
||||||
1.3.4 Added material profiles for new Prusament Resins. Added profiles for multiple BASF filaments.
|
1.3.4 Added material profiles for new Prusament Resins. Added profiles for multiple BASF filaments.
|
||||||
1.3.3 Added multiple profiles for Filatech filaments. Added material profiles for SL1S SPEED. Updated SLA print settings.
|
1.3.3 Added multiple profiles for Filatech filaments. Added material profiles for SL1S SPEED. Updated SLA print settings.
|
||||||
@ -27,6 +29,7 @@ min_slic3r_version = 2.3.2-alpha0
|
|||||||
1.3.1 Added multiple add:north and Extrudr filament profiles. Updated support head settings (SL1S).
|
1.3.1 Added multiple add:north and Extrudr filament profiles. Updated support head settings (SL1S).
|
||||||
1.3.0 Added SL1S SPEED profiles.
|
1.3.0 Added SL1S SPEED profiles.
|
||||||
min_slic3r_version = 2.3.0-rc1
|
min_slic3r_version = 2.3.0-rc1
|
||||||
|
1.2.11 Updated firmware version.
|
||||||
1.2.10 Added multiple profiles for Filatech filaments. Updated SLA print settings (pad wall slope angle).
|
1.2.10 Added multiple profiles for Filatech filaments. Updated SLA print settings (pad wall slope angle).
|
||||||
1.2.9 Added material profiles for Prusament Resin.
|
1.2.9 Added material profiles for Prusament Resin.
|
||||||
1.2.8 Added multiple add:north and Extrudr filament profiles.
|
1.2.8 Added multiple add:north and Extrudr filament profiles.
|
||||||
@ -46,6 +49,7 @@ min_slic3r_version = 2.3.0-alpha4
|
|||||||
1.2.0-alpha1 Renamed MK3S and MINI printer profiles. Updated end g-code (MINI). Added new SLA materials and filament profiles.
|
1.2.0-alpha1 Renamed MK3S and MINI printer profiles. Updated end g-code (MINI). Added new SLA materials and filament profiles.
|
||||||
1.2.0-alpha0 Added filament spool weights
|
1.2.0-alpha0 Added filament spool weights
|
||||||
min_slic3r_version = 2.2.0-alpha3
|
min_slic3r_version = 2.2.0-alpha3
|
||||||
|
1.1.15 Updated firmware version.
|
||||||
1.1.14 Updated firmware version.
|
1.1.14 Updated firmware version.
|
||||||
1.1.13 Updated firmware version. Updated end g-code in MMU2 printer profiles.
|
1.1.13 Updated firmware version. Updated end g-code in MMU2 printer profiles.
|
||||||
1.1.12 Added Prusament PVB filament profile. Added 0.8mm nozzle profiles.
|
1.1.12 Added Prusament PVB filament profile. Added 0.8mm nozzle profiles.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
name = Prusa Research
|
name = Prusa Research
|
||||||
# Configuration version of this file. Config file will only be installed, if the config_version differs.
|
# Configuration version of this file. Config file will only be installed, if the config_version differs.
|
||||||
# This means, the server may force the PrusaSlicer configuration to be downgraded.
|
# This means, the server may force the PrusaSlicer configuration to be downgraded.
|
||||||
config_version = 1.4.0
|
config_version = 1.4.1
|
||||||
# Where to get the updates from?
|
# Where to get the updates from?
|
||||||
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/PrusaResearch/
|
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/PrusaResearch/
|
||||||
changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1%
|
changelog_url = https://files.prusa3d.com/?latest=slicer-profiles&lng=%1%
|
||||||
@ -7045,6 +7045,7 @@ machine_max_jerk_y = 10
|
|||||||
machine_max_jerk_z = 0.2
|
machine_max_jerk_z = 0.2
|
||||||
machine_min_extruding_rate = 0
|
machine_min_extruding_rate = 0
|
||||||
machine_min_travel_rate = 0
|
machine_min_travel_rate = 0
|
||||||
|
machine_limits_usage = emit_to_gcode
|
||||||
layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z]
|
layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z]
|
||||||
max_layer_height = 0.25
|
max_layer_height = 0.25
|
||||||
min_layer_height = 0.07
|
min_layer_height = 0.07
|
||||||
@ -7188,21 +7189,21 @@ inherits = Original Prusa i3 MK2S
|
|||||||
printer_model = MK2.5
|
printer_model = MK2.5
|
||||||
remaining_times = 1
|
remaining_times = 1
|
||||||
machine_max_jerk_e = 4.5
|
machine_max_jerk_e = 4.5
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0
|
||||||
|
|
||||||
[printer:Original Prusa i3 MK2.5 0.25 nozzle]
|
[printer:Original Prusa i3 MK2.5 0.25 nozzle]
|
||||||
inherits = Original Prusa i3 MK2S 0.25 nozzle
|
inherits = Original Prusa i3 MK2S 0.25 nozzle
|
||||||
printer_model = MK2.5
|
printer_model = MK2.5
|
||||||
remaining_times = 1
|
remaining_times = 1
|
||||||
machine_max_jerk_e = 4.5
|
machine_max_jerk_e = 4.5
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0
|
||||||
|
|
||||||
[printer:Original Prusa i3 MK2.5 0.6 nozzle]
|
[printer:Original Prusa i3 MK2.5 0.6 nozzle]
|
||||||
inherits = Original Prusa i3 MK2S 0.6 nozzle
|
inherits = Original Prusa i3 MK2S 0.6 nozzle
|
||||||
printer_model = MK2.5
|
printer_model = MK2.5
|
||||||
remaining_times = 1
|
remaining_times = 1
|
||||||
machine_max_jerk_e = 4.5
|
machine_max_jerk_e = 4.5
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0
|
||||||
|
|
||||||
[printer:Original Prusa i3 MK2.5 0.8 nozzle]
|
[printer:Original Prusa i3 MK2.5 0.8 nozzle]
|
||||||
inherits = Original Prusa i3 MK2S 0.6 nozzle
|
inherits = Original Prusa i3 MK2S 0.6 nozzle
|
||||||
@ -7214,7 +7215,7 @@ min_layer_height = 0.2
|
|||||||
retract_length = 1
|
retract_length = 1
|
||||||
remaining_times = 1
|
remaining_times = 1
|
||||||
machine_max_jerk_e = 4.5
|
machine_max_jerk_e = 4.5
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0
|
||||||
default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
||||||
default_filament_profile = Prusament PLA @0.8 nozzle
|
default_filament_profile = Prusament PLA @0.8 nozzle
|
||||||
color_change_gcode = M600\nG1 E0.6 F1500 ; prime after color change
|
color_change_gcode = M600\nG1 E0.6 F1500 ; prime after color change
|
||||||
@ -7227,7 +7228,7 @@ max_print_height = 200
|
|||||||
default_print_profile = 0.15mm OPTIMAL @MK2.5
|
default_print_profile = 0.15mm OPTIMAL @MK2.5
|
||||||
default_filament_profile = Prusament PLA
|
default_filament_profile = Prusament PLA
|
||||||
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK2.5\n
|
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK2.5\n
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\n; select extruder\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; load to nozzle\nTc\n; purge line\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.20 F1000\nG1 X5 E4 F1000\nG92 E0\n
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\n; select extruder\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; load to nozzle\nTc\n; purge line\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.20 F1000\nG1 X5 E4 F1000\nG92 E0\n
|
||||||
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+10, max_print_height)}{endif} F720 ; Move print head up\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM702 C\nG4 ; wait\nM104 S0 ; turn off temperature\nM900 K0 ; reset LA\nM84 ; disable motors
|
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+10, max_print_height)}{endif} F720 ; Move print head up\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM702 C\nG4 ; wait\nM104 S0 ; turn off temperature\nM900 K0 ; reset LA\nM84 ; disable motors
|
||||||
|
|
||||||
[printer:Original Prusa i3 MK2.5 MMU2 Single 0.8 nozzle]
|
[printer:Original Prusa i3 MK2.5 MMU2 Single 0.8 nozzle]
|
||||||
@ -7251,7 +7252,7 @@ printer_notes = Don't remove the following keywords! These keywords are used in
|
|||||||
single_extruder_multi_material = 1
|
single_extruder_multi_material = 1
|
||||||
nozzle_diameter = 0.4,0.4,0.4,0.4,0.4
|
nozzle_diameter = 0.4,0.4,0.4,0.4,0.4
|
||||||
extruder_colour = #FF8000;#DB5182;#3EC0FF;#FF4F4F;#FBEB7D
|
extruder_colour = #FF8000;#DB5182;#3EC0FF;#FF4F4F;#FBEB7D
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E32 F1073\nG1 X5 E32 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\nG92 E0\n
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E32 F1073\nG1 X5 E32 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\nG92 E0\n
|
||||||
end_gcode = ; Lift print head a bit\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+30, max_print_height)}{endif} ; Move print head up\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM104 S0 ; turn off temperature\nG1 X0 Y210 F3000 ; home X axis\nM900 K0 ; reset LA\nM84 ; disable motors\n
|
end_gcode = ; Lift print head a bit\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+30, max_print_height)}{endif} ; Move print head up\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM104 S0 ; turn off temperature\nG1 X0 Y210 F3000 ; home X axis\nM900 K0 ; reset LA\nM84 ; disable motors\n
|
||||||
|
|
||||||
[printer:Original Prusa i3 MK2.5S]
|
[printer:Original Prusa i3 MK2.5S]
|
||||||
@ -7278,7 +7279,7 @@ max_print_height = 200
|
|||||||
default_print_profile = 0.15mm OPTIMAL @MK2.5
|
default_print_profile = 0.15mm OPTIMAL @MK2.5
|
||||||
default_filament_profile = Prusament PLA
|
default_filament_profile = Prusament PLA
|
||||||
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK2.5\n
|
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK2.5\n
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n
|
||||||
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+10, max_print_height)}{endif} F720 ; Move print head up\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM702 C\nG4 ; wait\nM104 S0 ; turn off temperature\nM900 K0 ; reset LA\nM84 ; disable motors
|
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+10, max_print_height)}{endif} F720 ; Move print head up\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM702 C\nG4 ; wait\nM104 S0 ; turn off temperature\nM900 K0 ; reset LA\nM84 ; disable motors
|
||||||
|
|
||||||
[printer:Original Prusa i3 MK2.5S MMU2S Single 0.8 nozzle]
|
[printer:Original Prusa i3 MK2.5S MMU2S Single 0.8 nozzle]
|
||||||
@ -7289,7 +7290,7 @@ min_layer_height = 0.2
|
|||||||
nozzle_diameter = 0.8
|
nozzle_diameter = 0.8
|
||||||
printer_variant = 0.8
|
printer_variant = 0.8
|
||||||
retract_length = 1
|
retract_length = 1
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n
|
||||||
default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
||||||
default_filament_profile = Prusament PLA @0.8 nozzle
|
default_filament_profile = Prusament PLA @0.8 nozzle
|
||||||
color_change_gcode = M600\nG1 E0.6 F1500 ; prime after color change
|
color_change_gcode = M600\nG1 E0.6 F1500 ; prime after color change
|
||||||
@ -7313,7 +7314,7 @@ nozzle_diameter = 0.25
|
|||||||
printer_variant = 0.25
|
printer_variant = 0.25
|
||||||
retract_lift = 0.15
|
retract_lift = 0.15
|
||||||
default_print_profile = 0.10mm DETAIL 0.25 nozzle
|
default_print_profile = 0.10mm DETAIL 0.25 nozzle
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F1400\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F1400\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n
|
||||||
color_change_gcode = M600\nG1 E0.3 F1500 ; prime after color change
|
color_change_gcode = M600\nG1 E0.3 F1500 ; prime after color change
|
||||||
|
|
||||||
[printer:Original Prusa i3 MK2.5S MMU2S]
|
[printer:Original Prusa i3 MK2.5S MMU2S]
|
||||||
@ -7325,7 +7326,7 @@ printer_notes = Don't remove the following keywords! These keywords are used in
|
|||||||
single_extruder_multi_material = 1
|
single_extruder_multi_material = 1
|
||||||
nozzle_diameter = 0.4,0.4,0.4,0.4,0.4
|
nozzle_diameter = 0.4,0.4,0.4,0.4,0.4
|
||||||
extruder_colour = #FF8000;#DB5182;#3EC0FF;#FF4F4F;#FBEB7D
|
extruder_colour = #FF8000;#DB5182;#3EC0FF;#FF4F4F;#FBEB7D
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E29 F1073\nG1 X5 E29 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\nG92 E0\n
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E29 F1073\nG1 X5 E29 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\nG92 E0\n
|
||||||
end_gcode = ; Lift print head a bit\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+30, max_print_height)}{endif} ; Move print head up\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM104 S0 ; turn off temperature\nG1 X0 Y210 F3000 ; home X axis\nM900 K0 ; reset LA\nM84 ; disable motors\n
|
end_gcode = ; Lift print head a bit\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+30, max_print_height)}{endif} ; Move print head up\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM104 S0 ; turn off temperature\nG1 X0 Y210 F3000 ; home X axis\nM900 K0 ; reset LA\nM84 ; disable motors\n
|
||||||
|
|
||||||
[printer:Original Prusa i3 MK2.5S MMU2S 0.6 nozzle]
|
[printer:Original Prusa i3 MK2.5S MMU2S 0.6 nozzle]
|
||||||
@ -7356,7 +7357,7 @@ color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
|||||||
## printer_variant = 0.8
|
## printer_variant = 0.8
|
||||||
## retract_length = 1
|
## retract_length = 1
|
||||||
## default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
## default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
||||||
## start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3.0 F1000.0\nG1 Z0.4 F1000.0\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55.0 E29.0 F1073.0\nG1 X5.0 E29.0 F1800.0\nG1 X55.0 E8.0 F2000.0\nG1 Z0.3 F1000.0\nG92 E0.0\nG1 X240.0 E25.0 F2200.0\nG1 Y-2.0 F1000.0\nG1 X55.0 E25 F1400.0\nG1 Z0.20 F1000.0\nG1 X5.0 E4.0 F1000.0\nG92 E0.0\n{endif}\nG92 E0.0\n
|
## start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3.0 F1000.0\nG1 Z0.4 F1000.0\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55.0 E29.0 F1073.0\nG1 X5.0 E29.0 F1800.0\nG1 X55.0 E8.0 F2000.0\nG1 Z0.3 F1000.0\nG92 E0.0\nG1 X240.0 E25.0 F2200.0\nG1 Y-2.0 F1000.0\nG1 X55.0 E25 F1400.0\nG1 Z0.20 F1000.0\nG1 X5.0 E4.0 F1000.0\nG92 E0.0\n{endif}\nG92 E0.0\n
|
||||||
|
|
||||||
## [printer:Original Prusa i3 MK2.5 MMU2 0.8 nozzle]
|
## [printer:Original Prusa i3 MK2.5 MMU2 0.8 nozzle]
|
||||||
## inherits = Original Prusa i3 MK2.5 MMU2
|
## inherits = Original Prusa i3 MK2.5 MMU2
|
||||||
@ -7366,7 +7367,7 @@ color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
|||||||
## printer_variant = 0.8
|
## printer_variant = 0.8
|
||||||
## retract_length = 1
|
## retract_length = 1
|
||||||
## default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
## default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
||||||
## start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3.0 F1000.0\nG1 Z0.4 F1000.0\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55.0 E29.0 F1073.0\nG1 X5.0 E29.0 F1800.0\nG1 X55.0 E8.0 F2000.0\nG1 Z0.3 F1000.0\nG92 E0.0\nG1 X240.0 E25.0 F2200.0\nG1 Y-2.0 F1000.0\nG1 X55.0 E25 F1400.0\nG1 Z0.20 F1000.0\nG1 X5.0 E4.0 F1000.0\nG92 E0.0\n{endif}\nG92 E0.0\n
|
## start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3.0 F1000.0\nG1 Z0.4 F1000.0\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55.0 E29.0 F1073.0\nG1 X5.0 E29.0 F1800.0\nG1 X55.0 E8.0 F2000.0\nG1 Z0.3 F1000.0\nG92 E0.0\nG1 X240.0 E25.0 F2200.0\nG1 Y-2.0 F1000.0\nG1 X55.0 E25 F1400.0\nG1 Z0.20 F1000.0\nG1 X5.0 E4.0 F1000.0\nG92 E0.0\n{endif}\nG92 E0.0\n
|
||||||
|
|
||||||
# XXXXXXXXXXXXXXXXX
|
# XXXXXXXXXXXXXXXXX
|
||||||
# XXX--- MK3 ---XXX
|
# XXX--- MK3 ---XXX
|
||||||
@ -7396,7 +7397,7 @@ remaining_times = 1
|
|||||||
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK3\n
|
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK3\n
|
||||||
retract_lift_below = 209
|
retract_lift_below = 209
|
||||||
max_print_height = 210
|
max_print_height = 210
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0\nM221 S{if layer_height<0.075}100{else}95{endif}\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0\nM221 S{if layer_height<0.075}100{else}95{endif}\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
|
||||||
printer_model = MK3
|
printer_model = MK3
|
||||||
default_print_profile = 0.15mm QUALITY @MK3
|
default_print_profile = 0.15mm QUALITY @MK3
|
||||||
|
|
||||||
@ -7407,7 +7408,7 @@ max_layer_height = 0.15
|
|||||||
min_layer_height = 0.05
|
min_layer_height = 0.05
|
||||||
printer_variant = 0.25
|
printer_variant = 0.25
|
||||||
retract_lift = 0.15
|
retract_lift = 0.15
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E8 F700 ; intro line\nG1 X100 E12.5 F700 ; intro line\nG92 E0\nM221 S{if layer_height<0.075}100{else}95{endif}\n\n; Don't change E value below. Excessive value can damage the printer.\n{if print_settings_id=~/.*@0.25 nozzle MK3.*/}M907 E430 ; set extruder motor current{endif}
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E8 F700 ; intro line\nG1 X100 E12.5 F700 ; intro line\nG92 E0\nM221 S{if layer_height<0.075}100{else}95{endif}\n\n; Don't change E value below. Excessive value can damage the printer.\n{if print_settings_id=~/.*@0.25 nozzle MK3.*/}M907 E430 ; set extruder motor current{endif}
|
||||||
default_print_profile = 0.10mm DETAIL @0.25 nozzle MK3
|
default_print_profile = 0.10mm DETAIL @0.25 nozzle MK3
|
||||||
color_change_gcode = M600\nG1 E0.3 F1500 ; prime after color change
|
color_change_gcode = M600\nG1 E0.3 F1500 ; prime after color change
|
||||||
|
|
||||||
@ -7417,7 +7418,7 @@ nozzle_diameter = 0.6
|
|||||||
max_layer_height = 0.40
|
max_layer_height = 0.40
|
||||||
min_layer_height = 0.15
|
min_layer_height = 0.15
|
||||||
printer_variant = 0.6
|
printer_variant = 0.6
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0\nM221 S{if layer_height<0.075}100{else}95{endif}
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0\nM221 S{if layer_height<0.075}100{else}95{endif}
|
||||||
default_print_profile = 0.30mm QUALITY @0.6 nozzle MK3
|
default_print_profile = 0.30mm QUALITY @0.6 nozzle MK3
|
||||||
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
||||||
|
|
||||||
@ -7428,7 +7429,7 @@ max_layer_height = 0.6
|
|||||||
min_layer_height = 0.2
|
min_layer_height = 0.2
|
||||||
printer_variant = 0.8
|
printer_variant = 0.8
|
||||||
retract_length = 1
|
retract_length = 1
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0\nM221 S95
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Z0.2 F720\nG1 Y-3 F1000 ; go outside print area\nG92 E0\nG1 X60 E9 F1000 ; intro line\nG1 X100 E12.5 F1000 ; intro line\nG92 E0\nM221 S95
|
||||||
default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
||||||
default_filament_profile = Prusament PLA @0.8 nozzle
|
default_filament_profile = Prusament PLA @0.8 nozzle
|
||||||
color_change_gcode = M600\nG1 E0.6 F1500 ; prime after color change
|
color_change_gcode = M600\nG1 E0.6 F1500 ; prime after color change
|
||||||
@ -7500,7 +7501,7 @@ default_filament_profile = Prusament PLA @MMU2
|
|||||||
inherits = *mm2*
|
inherits = *mm2*
|
||||||
single_extruder_multi_material = 0
|
single_extruder_multi_material = 0
|
||||||
default_filament_profile = Prusament PLA
|
default_filament_profile = Prusament PLA
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
|
||||||
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+10, max_print_height)}{endif} F720 ; Move print head up\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM702 C\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nM84 ; disable motors
|
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+10, max_print_height)}{endif} F720 ; Move print head up\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM702 C\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nM84 ; disable motors
|
||||||
|
|
||||||
[printer:Original Prusa i3 MK3 MMU2 Single 0.6 nozzle]
|
[printer:Original Prusa i3 MK3 MMU2 Single 0.6 nozzle]
|
||||||
@ -7510,7 +7511,7 @@ nozzle_diameter = 0.6
|
|||||||
max_layer_height = 0.40
|
max_layer_height = 0.40
|
||||||
min_layer_height = 0.15
|
min_layer_height = 0.15
|
||||||
printer_variant = 0.6
|
printer_variant = 0.6
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
||||||
default_print_profile = 0.30mm QUALITY @0.6 nozzle MK3
|
default_print_profile = 0.30mm QUALITY @0.6 nozzle MK3
|
||||||
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
||||||
|
|
||||||
@ -7522,7 +7523,7 @@ max_layer_height = 0.6
|
|||||||
min_layer_height = 0.2
|
min_layer_height = 0.2
|
||||||
printer_variant = 0.8
|
printer_variant = 0.8
|
||||||
retract_length = 1
|
retract_length = 1
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
||||||
default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
||||||
default_filament_profile = Prusament PLA @0.8 nozzle
|
default_filament_profile = Prusament PLA @0.8 nozzle
|
||||||
color_change_gcode = M600\nG1 E0.6 F1500 ; prime after color change
|
color_change_gcode = M600\nG1 E0.6 F1500 ; prime after color change
|
||||||
@ -7535,7 +7536,7 @@ max_layer_height = 0.15
|
|||||||
min_layer_height = 0.05
|
min_layer_height = 0.05
|
||||||
printer_variant = 0.25
|
printer_variant = 0.25
|
||||||
retract_lift = 0.15
|
retract_lift = 0.15
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 E8 F1000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F1400\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E value below. Excessive value can damage the printer.\n{if print_settings_id=~/.*@0.25 nozzle MK3.*/}M907 E430 ; set extruder motor current{endif}
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 E8 F1000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F1400\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E value below. Excessive value can damage the printer.\n{if print_settings_id=~/.*@0.25 nozzle MK3.*/}M907 E430 ; set extruder motor current{endif}
|
||||||
default_print_profile = 0.10mm DETAIL @0.25 nozzle MK3
|
default_print_profile = 0.10mm DETAIL @0.25 nozzle MK3
|
||||||
color_change_gcode = M600\nG1 E0.3 F1500 ; prime after color change
|
color_change_gcode = M600\nG1 E0.3 F1500 ; prime after color change
|
||||||
|
|
||||||
@ -7544,7 +7545,7 @@ inherits = *mm2*
|
|||||||
machine_max_acceleration_e = 8000,8000
|
machine_max_acceleration_e = 8000,8000
|
||||||
nozzle_diameter = 0.4,0.4,0.4,0.4,0.4
|
nozzle_diameter = 0.4,0.4,0.4,0.4,0.4
|
||||||
extruder_colour = #FF8000;#DB5182;#3EC0FF;#FF4F4F;#FBEB7D
|
extruder_colour = #FF8000;#DB5182;#3EC0FF;#FF4F4F;#FBEB7D
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E32 F1073\nG1 X5 E32 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|SOLUBLE).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E32 F1073\nG1 X5 E32 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|SOLUBLE).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
|
||||||
end_gcode = ; Lift print head a bit\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+30, max_print_height)}{endif} ; Move print head up\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|SOLUBLE|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nG1 X0 Y210 F3000 ; home X axis\nM84 ; disable motors\n
|
end_gcode = ; Lift print head a bit\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+30, max_print_height)}{endif} ; Move print head up\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|SOLUBLE|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nG1 X0 Y210 F3000 ; home X axis\nM84 ; disable motors\n
|
||||||
|
|
||||||
[printer:Original Prusa i3 MK3S & MK3S+ MMU2S Single]
|
[printer:Original Prusa i3 MK3S & MK3S+ MMU2S Single]
|
||||||
@ -7552,7 +7553,7 @@ inherits = *mm2s*
|
|||||||
renamed_from = "Original Prusa i3 MK3S MMU2S Single"
|
renamed_from = "Original Prusa i3 MK3S MMU2S Single"
|
||||||
single_extruder_multi_material = 0
|
single_extruder_multi_material = 0
|
||||||
default_filament_profile = Prusament PLA
|
default_filament_profile = Prusament PLA
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
|
||||||
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+10, max_print_height)}{endif} F720 ; Move print head up\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM702 C\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nM84 ; disable motors
|
end_gcode = {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+10, max_print_height)}{endif} F720 ; Move print head up\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM702 C\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nM84 ; disable motors
|
||||||
|
|
||||||
[printer:Original Prusa i3 MK3S & MK3S+ MMU2S Single 0.6 nozzle]
|
[printer:Original Prusa i3 MK3S & MK3S+ MMU2S Single 0.6 nozzle]
|
||||||
@ -7563,7 +7564,7 @@ nozzle_diameter = 0.6
|
|||||||
max_layer_height = 0.40
|
max_layer_height = 0.40
|
||||||
min_layer_height = 0.15
|
min_layer_height = 0.15
|
||||||
printer_variant = 0.6
|
printer_variant = 0.6
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
||||||
default_print_profile = 0.30mm QUALITY @0.6 nozzle MK3
|
default_print_profile = 0.30mm QUALITY @0.6 nozzle MK3
|
||||||
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
||||||
|
|
||||||
@ -7575,7 +7576,7 @@ max_layer_height = 0.6
|
|||||||
min_layer_height = 0.2
|
min_layer_height = 0.2
|
||||||
printer_variant = 0.8
|
printer_variant = 0.8
|
||||||
retract_length = 1
|
retract_length = 1
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
||||||
default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
||||||
default_filament_profile = Prusament PLA @0.8 nozzle
|
default_filament_profile = Prusament PLA @0.8 nozzle
|
||||||
color_change_gcode = M600\nG1 E0.6 F1500 ; prime after color change
|
color_change_gcode = M600\nG1 E0.6 F1500 ; prime after color change
|
||||||
@ -7589,7 +7590,7 @@ max_layer_height = 0.15
|
|||||||
min_layer_height = 0.05
|
min_layer_height = 0.05
|
||||||
printer_variant = 0.25
|
printer_variant = 0.25
|
||||||
retract_lift = 0.15
|
retract_lift = 0.15
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F1400\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E value below. Excessive value can damage the printer.\n{if print_settings_id=~/.*@0.25 nozzle MK3.*/}M907 E430 ; set extruder motor current{endif}
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nTx\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nTc\n; purge line\nG1 X55 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F1400\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E value below. Excessive value can damage the printer.\n{if print_settings_id=~/.*@0.25 nozzle MK3.*/}M907 E430 ; set extruder motor current{endif}
|
||||||
default_print_profile = 0.10mm DETAIL @0.25 nozzle MK3
|
default_print_profile = 0.10mm DETAIL @0.25 nozzle MK3
|
||||||
color_change_gcode = M600\nG1 E0.3 F1500 ; prime after color change
|
color_change_gcode = M600\nG1 E0.3 F1500 ; prime after color change
|
||||||
|
|
||||||
@ -7599,7 +7600,7 @@ renamed_from = "Original Prusa i3 MK3S MMU2S"
|
|||||||
machine_max_acceleration_e = 8000,8000
|
machine_max_acceleration_e = 8000,8000
|
||||||
nozzle_diameter = 0.4,0.4,0.4,0.4,0.4
|
nozzle_diameter = 0.4,0.4,0.4,0.4,0.4
|
||||||
extruder_colour = #FF8000;#DB5182;#3EC0FF;#FF4F4F;#FBEB7D
|
extruder_colour = #FF8000;#DB5182;#3EC0FF;#FF4F4F;#FBEB7D
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E29 F1073\nG1 X5 E29 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|SOLUBLE).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E29 F1073\nG1 X5 E29 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0\n\n; Don't change E values below. Excessive value can damage the printer.\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|SOLUBLE).*/}M907 E430 ; set extruder motor current{endif}\n{if print_settings_id=~/.*(SPEED @MK3|DRAFT @MK3).*/}M907 E538 ; set extruder motor current{endif}
|
||||||
end_gcode = ; Lift print head a bit\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+30, max_print_height)}{endif} ; Move print head up\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|SOLUBLE|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nG1 X0 Y210 F3000 ; home X axis\nM84 ; disable motors\n
|
end_gcode = ; Lift print head a bit\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+30, max_print_height)}{endif} ; Move print head up\n{if has_wipe_tower}\nG1 E-15 F3000\n{else}\nG1 X0 Y210 F7200\nG1 E2 F5000\nG1 E2 F5500\nG1 E2 F6000\nG1 E-15 F5800\nG1 E-20 F5500\nG1 E10 F3000\nG1 E-10 F3100\nG1 E10 F3150\nG1 E-10 F3250\nG1 E10 F3300\n{endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\n\n; Unload filament\nM702 C\n\nG4 ; wait\nM221 S100 ; reset flow\nM900 K0 ; reset LA\n{if print_settings_id=~/.*(DETAIL @MK3|QUALITY @MK3|SOLUBLE|@0.25 nozzle MK3).*/}M907 E538 ; reset extruder motor current{endif}\nM104 S0 ; turn off temperature\nG1 X0 Y210 F3000 ; home X axis\nM84 ; disable motors\n
|
||||||
|
|
||||||
## 0.6mm nozzle MMU2/S printer profiles
|
## 0.6mm nozzle MMU2/S printer profiles
|
||||||
@ -7611,7 +7612,7 @@ nozzle_diameter = 0.6,0.6,0.6,0.6,0.6
|
|||||||
max_layer_height = 0.40
|
max_layer_height = 0.40
|
||||||
min_layer_height = 0.15
|
min_layer_height = 0.15
|
||||||
printer_variant = 0.6
|
printer_variant = 0.6
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E29 F1073\nG1 X5 E29 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E29 F1073\nG1 X5 E29 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
||||||
default_print_profile = 0.30mm QUALITY @0.6 nozzle MK3
|
default_print_profile = 0.30mm QUALITY @0.6 nozzle MK3
|
||||||
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
||||||
|
|
||||||
@ -7621,7 +7622,7 @@ nozzle_diameter = 0.6,0.6,0.6,0.6,0.6
|
|||||||
max_layer_height = 0.40
|
max_layer_height = 0.40
|
||||||
min_layer_height = 0.15
|
min_layer_height = 0.15
|
||||||
printer_variant = 0.6
|
printer_variant = 0.6
|
||||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E32 F1073\nG1 X5 E32 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55 E32 F1073\nG1 X5 E32 F1800\nG1 X55 E8 F2000\nG1 Z0.3 F1000\nG92 E0\nG1 X240 E25 F2200\nG1 Y-2 F1000\nG1 X55 E25 F1400\nG1 Z0.2 F1000\nG1 X5 E4 F1000\nG92 E0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0
|
||||||
default_print_profile = 0.30mm QUALITY @0.6 nozzle MK3
|
default_print_profile = 0.30mm QUALITY @0.6 nozzle MK3
|
||||||
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
||||||
|
|
||||||
@ -7635,7 +7636,7 @@ color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
|||||||
## max_layer_height = 0.6
|
## max_layer_height = 0.6
|
||||||
## min_layer_height = 0.2
|
## min_layer_height = 0.2
|
||||||
## printer_variant = 0.8
|
## printer_variant = 0.8
|
||||||
## start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3.0 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55.0 E32.0 F1073.0\nG1 X5.0 E32.0 F1800.0\nG1 X55.0 E8.0 F2000.0\nG1 Z0.3 F1000\nG92 E0.0\nG1 X240.0 E25.0 F2200.0\nG1 Y-2.0 F1000.0\nG1 X55.0 E25 F1400.0\nG1 Z0.20 F1000.0\nG1 X5.0 E4.0 F1000.0\nG92 E0.0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0.0
|
## start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3.0 F1000\nG1 Z0.4 F1000\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55.0 E32.0 F1073.0\nG1 X5.0 E32.0 F1800.0\nG1 X55.0 E8.0 F2000.0\nG1 Z0.3 F1000\nG92 E0.0\nG1 X240.0 E25.0 F2200.0\nG1 Y-2.0 F1000.0\nG1 X55.0 E25 F1400.0\nG1 Z0.20 F1000.0\nG1 X5.0 E4.0 F1000.0\nG92 E0.0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0.0
|
||||||
## default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
## default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
||||||
|
|
||||||
## [printer:Original Prusa i3 MK3S & MK3S+ MMU2S 0.8 nozzle]
|
## [printer:Original Prusa i3 MK3S & MK3S+ MMU2S 0.8 nozzle]
|
||||||
@ -7644,7 +7645,7 @@ color_change_gcode = M600\nG1 E0.5 F1500 ; prime after color change
|
|||||||
## max_layer_height = 0.6
|
## max_layer_height = 0.6
|
||||||
## min_layer_height = 0.2
|
## min_layer_height = 0.2
|
||||||
## printer_variant = 0.8
|
## printer_variant = 0.8
|
||||||
## start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.0 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3.0 F1000.0\nG1 Z0.4 F1000.0\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55.0 E29.0 F1073.0\nG1 X5.0 E29.0 F1800.0\nG1 X55.0 E8.0 F2000.0\nG1 Z0.3 F1000.0\nG92 E0.0\nG1 X240.0 E25.0 F2200.0\nG1 Y-2.0 F1000.0\nG1 X55.0 E25 F1400.0\nG1 Z0.20 F1000.0\nG1 X5.0 E4.0 F1000.0\nG92 E0.0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0.0
|
## start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nM862.1 P[nozzle_diameter] ; nozzle diameter check\nM115 U3.10.1 ; tell printer latest fw version\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\n\n; Send the filament type to the MMU2.0 unit.\n; E stands for extruder number, F stands for filament type (0: default; 1:flex; 2: PVA)\nM403 E0 F{"" + ((filament_type[0]=="FLEX") ? 1 : ((filament_type[0]=="PVA") ? 2 : 0))}\nM403 E1 F{"" + ((filament_type[1]=="FLEX") ? 1 : ((filament_type[1]=="PVA") ? 2 : 0))}\nM403 E2 F{"" + ((filament_type[2]=="FLEX") ? 1 : ((filament_type[2]=="PVA") ? 2 : 0))}\nM403 E3 F{"" + ((filament_type[3]=="FLEX") ? 1 : ((filament_type[3]=="PVA") ? 2 : 0))}\nM403 E4 F{"" + ((filament_type[4]=="FLEX") ? 1 : ((filament_type[4]=="PVA") ? 2 : 0))}\n\n{if not has_single_extruder_multi_material_priming}\n;go outside print area\nG1 Y-3.0 F1000.0\nG1 Z0.4 F1000.0\n; select extruder\nT[initial_tool]\n; initial load\nG1 X55.0 E29.0 F1073.0\nG1 X5.0 E29.0 F1800.0\nG1 X55.0 E8.0 F2000.0\nG1 Z0.3 F1000.0\nG92 E0.0\nG1 X240.0 E25.0 F2200.0\nG1 Y-2.0 F1000.0\nG1 X55.0 E25 F1400.0\nG1 Z0.20 F1000.0\nG1 X5.0 E4.0 F1000.0\nG92 E0.0\n{endif}\n\nM221 S{if layer_height<0.075}100{else}95{endif}\nG92 E0.0
|
||||||
## default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
## default_print_profile = 0.40mm QUALITY @0.8 nozzle
|
||||||
|
|
||||||
## MINI
|
## MINI
|
||||||
|
@ -175,6 +175,9 @@ void AppConfig::set_defaults()
|
|||||||
if (get("show_splash_screen").empty())
|
if (get("show_splash_screen").empty())
|
||||||
set("show_splash_screen", "1");
|
set("show_splash_screen", "1");
|
||||||
|
|
||||||
|
if (get("restore_win_position").empty())
|
||||||
|
set("restore_win_position", "1"); // allowed values - "1", "0", "crashed_at_..."
|
||||||
|
|
||||||
if (get("show_hints").empty())
|
if (get("show_hints").empty())
|
||||||
set("show_hints", "1");
|
set("show_hints", "1");
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ public:
|
|||||||
bool has_section(const std::string §ion) const
|
bool has_section(const std::string §ion) const
|
||||||
{ return m_storage.find(section) != m_storage.end(); }
|
{ return m_storage.find(section) != m_storage.end(); }
|
||||||
const std::map<std::string, std::string>& get_section(const std::string §ion) const
|
const std::map<std::string, std::string>& get_section(const std::string §ion) const
|
||||||
{ return m_storage.find(section)->second; }
|
{ auto it = m_storage.find(section); assert(it != m_storage.end()); return it->second; }
|
||||||
void set_section(const std::string §ion, const std::map<std::string, std::string>& data)
|
void set_section(const std::string §ion, const std::map<std::string, std::string>& data)
|
||||||
{ m_storage[section] = data; }
|
{ m_storage[section] = data; }
|
||||||
void clear_section(const std::string §ion)
|
void clear_section(const std::string §ion)
|
||||||
|
@ -29,6 +29,8 @@ set(SLIC3R_SOURCES
|
|||||||
clipper.hpp
|
clipper.hpp
|
||||||
ClipperUtils.cpp
|
ClipperUtils.cpp
|
||||||
ClipperUtils.hpp
|
ClipperUtils.hpp
|
||||||
|
Color.cpp
|
||||||
|
Color.hpp
|
||||||
Config.cpp
|
Config.cpp
|
||||||
Config.hpp
|
Config.hpp
|
||||||
EdgeGrid.cpp
|
EdgeGrid.cpp
|
||||||
|
400
src/libslic3r/Color.cpp
Normal file
400
src/libslic3r/Color.cpp
Normal file
@ -0,0 +1,400 @@
|
|||||||
|
#include "libslic3r.h"
|
||||||
|
#include "Color.hpp"
|
||||||
|
|
||||||
|
#include <random>
|
||||||
|
|
||||||
|
static const float INV_255 = 1.0f / 255.0f;
|
||||||
|
|
||||||
|
namespace Slic3r {
|
||||||
|
|
||||||
|
// Conversion from RGB to HSV color space
|
||||||
|
// The input RGB values are in the range [0, 1]
|
||||||
|
// The output HSV values are in the ranges h = [0, 360], and s, v = [0, 1]
|
||||||
|
static void RGBtoHSV(float r, float g, float b, float& h, float& s, float& v)
|
||||||
|
{
|
||||||
|
assert(0.0f <= r && r <= 1.0f);
|
||||||
|
assert(0.0f <= g && g <= 1.0f);
|
||||||
|
assert(0.0f <= b && b <= 1.0f);
|
||||||
|
|
||||||
|
const float max_comp = std::max(std::max(r, g), b);
|
||||||
|
const float min_comp = std::min(std::min(r, g), b);
|
||||||
|
const float delta = max_comp - min_comp;
|
||||||
|
|
||||||
|
if (delta > 0.0f) {
|
||||||
|
if (max_comp == r)
|
||||||
|
h = 60.0f * (std::fmod(((g - b) / delta), 6.0f));
|
||||||
|
else if (max_comp == g)
|
||||||
|
h = 60.0f * (((b - r) / delta) + 2.0f);
|
||||||
|
else if (max_comp == b)
|
||||||
|
h = 60.0f * (((r - g) / delta) + 4.0f);
|
||||||
|
|
||||||
|
s = (max_comp > 0.0f) ? delta / max_comp : 0.0f;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
h = 0.0f;
|
||||||
|
s = 0.0f;
|
||||||
|
}
|
||||||
|
v = max_comp;
|
||||||
|
|
||||||
|
while (h < 0.0f) { h += 360.0f; }
|
||||||
|
while (h > 360.0f) { h -= 360.0f; }
|
||||||
|
|
||||||
|
assert(0.0f <= s && s <= 1.0f);
|
||||||
|
assert(0.0f <= v && v <= 1.0f);
|
||||||
|
assert(0.0f <= h && h <= 360.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Conversion from HSV to RGB color space
|
||||||
|
// The input HSV values are in the ranges h = [0, 360], and s, v = [0, 1]
|
||||||
|
// The output RGB values are in the range [0, 1]
|
||||||
|
static void HSVtoRGB(float h, float s, float v, float& r, float& g, float& b)
|
||||||
|
{
|
||||||
|
assert(0.0f <= s && s <= 1.0f);
|
||||||
|
assert(0.0f <= v && v <= 1.0f);
|
||||||
|
assert(0.0f <= h && h <= 360.0f);
|
||||||
|
|
||||||
|
const float chroma = v * s;
|
||||||
|
const float h_prime = std::fmod(h / 60.0f, 6.0f);
|
||||||
|
const float x = chroma * (1.0f - std::abs(std::fmod(h_prime, 2.0f) - 1.0f));
|
||||||
|
const float m = v - chroma;
|
||||||
|
|
||||||
|
if (0.0f <= h_prime && h_prime < 1.0f) {
|
||||||
|
r = chroma;
|
||||||
|
g = x;
|
||||||
|
b = 0.0f;
|
||||||
|
}
|
||||||
|
else if (1.0f <= h_prime && h_prime < 2.0f) {
|
||||||
|
r = x;
|
||||||
|
g = chroma;
|
||||||
|
b = 0.0f;
|
||||||
|
}
|
||||||
|
else if (2.0f <= h_prime && h_prime < 3.0f) {
|
||||||
|
r = 0.0f;
|
||||||
|
g = chroma;
|
||||||
|
b = x;
|
||||||
|
}
|
||||||
|
else if (3.0f <= h_prime && h_prime < 4.0f) {
|
||||||
|
r = 0.0f;
|
||||||
|
g = x;
|
||||||
|
b = chroma;
|
||||||
|
}
|
||||||
|
else if (4.0f <= h_prime && h_prime < 5.0f) {
|
||||||
|
r = x;
|
||||||
|
g = 0.0f;
|
||||||
|
b = chroma;
|
||||||
|
}
|
||||||
|
else if (5.0f <= h_prime && h_prime < 6.0f) {
|
||||||
|
r = chroma;
|
||||||
|
g = 0.0f;
|
||||||
|
b = x;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
r = 0.0f;
|
||||||
|
g = 0.0f;
|
||||||
|
b = 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
r += m;
|
||||||
|
g += m;
|
||||||
|
b += m;
|
||||||
|
|
||||||
|
assert(0.0f <= r && r <= 1.0f);
|
||||||
|
assert(0.0f <= g && g <= 1.0f);
|
||||||
|
assert(0.0f <= b && b <= 1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
class Randomizer
|
||||||
|
{
|
||||||
|
std::random_device m_rd;
|
||||||
|
|
||||||
|
public:
|
||||||
|
float random_float(float min, float max) {
|
||||||
|
std::mt19937 rand_generator(m_rd());
|
||||||
|
std::uniform_real_distribution<float> distrib(min, max);
|
||||||
|
return distrib(rand_generator);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ColorRGB::ColorRGB(float r, float g, float b)
|
||||||
|
: m_data({ std::clamp(r, 0.0f, 1.0f), std::clamp(g, 0.0f, 1.0f), std::clamp(b, 0.0f, 1.0f) })
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorRGB::ColorRGB(unsigned char r, unsigned char g, unsigned char b)
|
||||||
|
: m_data({ std::clamp(r * INV_255, 0.0f, 1.0f), std::clamp(g * INV_255, 0.0f, 1.0f), std::clamp(b * INV_255, 0.0f, 1.0f) })
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ColorRGB::operator < (const ColorRGB& other) const
|
||||||
|
{
|
||||||
|
for (size_t i = 0; i < 3; ++i) {
|
||||||
|
if (m_data[i] < other.m_data[i])
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ColorRGB::operator > (const ColorRGB& other) const
|
||||||
|
{
|
||||||
|
for (size_t i = 0; i < 3; ++i) {
|
||||||
|
if (m_data[i] > other.m_data[i])
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorRGB ColorRGB::operator + (const ColorRGB& other) const
|
||||||
|
{
|
||||||
|
ColorRGB ret;
|
||||||
|
for (size_t i = 0; i < 3; ++i) {
|
||||||
|
ret.m_data[i] = std::clamp(m_data[i] + other.m_data[i], 0.0f, 1.0f);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorRGB ColorRGB::operator * (float value) const
|
||||||
|
{
|
||||||
|
assert(value >= 0.0f);
|
||||||
|
ColorRGB ret;
|
||||||
|
for (size_t i = 0; i < 3; ++i) {
|
||||||
|
ret.m_data[i] = std::clamp(value * m_data[i], 0.0f, 1.0f);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorRGBA::ColorRGBA(float r, float g, float b, float a)
|
||||||
|
: m_data({ std::clamp(r, 0.0f, 1.0f), std::clamp(g, 0.0f, 1.0f), std::clamp(b, 0.0f, 1.0f), std::clamp(a, 0.0f, 1.0f) })
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorRGBA::ColorRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
|
||||||
|
: m_data({ std::clamp(r * INV_255, 0.0f, 1.0f), std::clamp(g * INV_255, 0.0f, 1.0f), std::clamp(b * INV_255, 0.0f, 1.0f), std::clamp(a * INV_255, 0.0f, 1.0f) })
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ColorRGBA::operator < (const ColorRGBA& other) const
|
||||||
|
{
|
||||||
|
for (size_t i = 0; i < 3; ++i) {
|
||||||
|
if (m_data[i] < other.m_data[i])
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ColorRGBA::operator > (const ColorRGBA& other) const
|
||||||
|
{
|
||||||
|
for (size_t i = 0; i < 3; ++i) {
|
||||||
|
if (m_data[i] > other.m_data[i])
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorRGBA ColorRGBA::operator + (const ColorRGBA& other) const
|
||||||
|
{
|
||||||
|
ColorRGBA ret;
|
||||||
|
for (size_t i = 0; i < 3; ++i) {
|
||||||
|
ret.m_data[i] = std::clamp(m_data[i] + other.m_data[i], 0.0f, 1.0f);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorRGBA ColorRGBA::operator * (float value) const
|
||||||
|
{
|
||||||
|
assert(value >= 0.0f);
|
||||||
|
ColorRGBA ret;
|
||||||
|
for (size_t i = 0; i < 3; ++i) {
|
||||||
|
ret.m_data[i] = std::clamp(value * m_data[i], 0.0f, 1.0f);
|
||||||
|
}
|
||||||
|
ret.m_data[3] = this->m_data[3];
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorRGB operator * (float value, const ColorRGB& other) { return other * value; }
|
||||||
|
ColorRGBA operator * (float value, const ColorRGBA& other) { return other * value; }
|
||||||
|
|
||||||
|
ColorRGB lerp(const ColorRGB& a, const ColorRGB& b, float t)
|
||||||
|
{
|
||||||
|
assert(0.0f <= t && t <= 1.0f);
|
||||||
|
return (1.0f - t) * a + t * b;
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorRGBA lerp(const ColorRGBA& a, const ColorRGBA& b, float t)
|
||||||
|
{
|
||||||
|
assert(0.0f <= t && t <= 1.0f);
|
||||||
|
return (1.0f - t) * a + t * b;
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorRGB complementary(const ColorRGB& color)
|
||||||
|
{
|
||||||
|
return { 1.0f - color.r(), 1.0f - color.g(), 1.0f - color.b() };
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorRGBA complementary(const ColorRGBA& color)
|
||||||
|
{
|
||||||
|
return { 1.0f - color.r(), 1.0f - color.g(), 1.0f - color.b(), color.a() };
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorRGB saturate(const ColorRGB& color, float factor)
|
||||||
|
{
|
||||||
|
float h, s, v;
|
||||||
|
RGBtoHSV(color.r(), color.g(), color.b(), h, s, v);
|
||||||
|
s = std::clamp(s * factor, 0.0f, 1.0f);
|
||||||
|
float r, g, b;
|
||||||
|
HSVtoRGB(h, s, v, r, g, b);
|
||||||
|
return { r, g, b };
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorRGBA saturate(const ColorRGBA& color, float factor)
|
||||||
|
{
|
||||||
|
return to_rgba(saturate(to_rgb(color), factor), color.a());
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorRGB opposite(const ColorRGB& color)
|
||||||
|
{
|
||||||
|
float h, s, v;
|
||||||
|
RGBtoHSV(color.r(), color.g(), color.b(), h, s, v);
|
||||||
|
|
||||||
|
h += 65.0f; // 65 instead 60 to avoid circle values
|
||||||
|
if (h > 360.0f)
|
||||||
|
h -= 360.0f;
|
||||||
|
|
||||||
|
Randomizer rnd;
|
||||||
|
s = rnd.random_float(0.65f, 1.0f);
|
||||||
|
v = rnd.random_float(0.65f, 1.0f);
|
||||||
|
|
||||||
|
float r, g, b;
|
||||||
|
HSVtoRGB(h, s, v, r, g, b);
|
||||||
|
return { r, g, b };
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorRGB opposite(const ColorRGB& a, const ColorRGB& b)
|
||||||
|
{
|
||||||
|
float ha, sa, va;
|
||||||
|
RGBtoHSV(a.r(), a.g(), a.b(), ha, sa, va);
|
||||||
|
float hb, sb, vb;
|
||||||
|
RGBtoHSV(b.r(), b.g(), b.b(), hb, sb, vb);
|
||||||
|
|
||||||
|
float delta_h = std::abs(ha - hb);
|
||||||
|
float start_h = (delta_h > 180.0f) ? std::min(ha, hb) : std::max(ha, hb);
|
||||||
|
|
||||||
|
start_h += 5.0f; // to avoid circle change of colors for 120 deg
|
||||||
|
if (delta_h < 180.0f)
|
||||||
|
delta_h = 360.0f - delta_h;
|
||||||
|
|
||||||
|
Randomizer rnd;
|
||||||
|
float out_h = start_h + 0.5f * delta_h;
|
||||||
|
if (out_h > 360.0f)
|
||||||
|
out_h -= 360.0f;
|
||||||
|
float out_s = rnd.random_float(0.65f, 1.0f);
|
||||||
|
float out_v = rnd.random_float(0.65f, 1.0f);
|
||||||
|
|
||||||
|
float out_r, out_g, out_b;
|
||||||
|
HSVtoRGB(out_h, out_s, out_v, out_r, out_g, out_b);
|
||||||
|
return { out_r, out_g, out_b };
|
||||||
|
}
|
||||||
|
|
||||||
|
bool can_decode_color(const std::string& color) { return color.size() == 7 && color.front() == '#'; }
|
||||||
|
|
||||||
|
bool decode_color(const std::string& color_in, ColorRGB& color_out)
|
||||||
|
{
|
||||||
|
auto hex_digit_to_int = [](const char c) {
|
||||||
|
return
|
||||||
|
(c >= '0' && c <= '9') ? int(c - '0') :
|
||||||
|
(c >= 'A' && c <= 'F') ? int(c - 'A') + 10 :
|
||||||
|
(c >= 'a' && c <= 'f') ? int(c - 'a') + 10 : -1;
|
||||||
|
};
|
||||||
|
|
||||||
|
color_out = ColorRGB::BLACK();
|
||||||
|
if (can_decode_color(color_in)) {
|
||||||
|
const char* c = color_in.data() + 1;
|
||||||
|
for (unsigned int i = 0; i < 3; ++i) {
|
||||||
|
const int digit1 = hex_digit_to_int(*c++);
|
||||||
|
const int digit2 = hex_digit_to_int(*c++);
|
||||||
|
if (digit1 != -1 && digit2 != -1)
|
||||||
|
color_out.set(i, float(digit1 * 16 + digit2) * INV_255);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
|
||||||
|
assert(0.0f <= color_out.r() && color_out.r() <= 1.0f);
|
||||||
|
assert(0.0f <= color_out.g() && color_out.g() <= 1.0f);
|
||||||
|
assert(0.0f <= color_out.b() && color_out.b() <= 1.0f);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool decode_color(const std::string& color_in, ColorRGBA& color_out)
|
||||||
|
{
|
||||||
|
ColorRGB rgb;
|
||||||
|
if (!decode_color(color_in, rgb))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
color_out = to_rgba(rgb, color_out.a());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool decode_colors(const std::vector<std::string>& colors_in, std::vector<ColorRGB>& colors_out)
|
||||||
|
{
|
||||||
|
colors_out = std::vector<ColorRGB>(colors_in.size(), ColorRGB::BLACK());
|
||||||
|
for (size_t i = 0; i < colors_in.size(); ++i) {
|
||||||
|
if (!decode_color(colors_in[i], colors_out[i]))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool decode_colors(const std::vector<std::string>& colors_in, std::vector<ColorRGBA>& colors_out)
|
||||||
|
{
|
||||||
|
colors_out = std::vector<ColorRGBA>(colors_in.size(), ColorRGBA::BLACK());
|
||||||
|
for (size_t i = 0; i < colors_in.size(); ++i) {
|
||||||
|
if (!decode_color(colors_in[i], colors_out[i]))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string encode_color(const ColorRGB& color)
|
||||||
|
{
|
||||||
|
char buffer[64];
|
||||||
|
::sprintf(buffer, "#%02X%02X%02X", color.r_uchar(), color.g_uchar(), color.b_uchar());
|
||||||
|
return std::string(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string encode_color(const ColorRGBA& color) { return encode_color(to_rgb(color)); }
|
||||||
|
|
||||||
|
ColorRGB to_rgb(const ColorRGBA& other_rgba) { return { other_rgba.r(), other_rgba.g(), other_rgba.b() }; }
|
||||||
|
ColorRGBA to_rgba(const ColorRGB& other_rgb) { return { other_rgb.r(), other_rgb.g(), other_rgb.b(), 1.0f }; }
|
||||||
|
ColorRGBA to_rgba(const ColorRGB& other_rgb, float alpha) { return { other_rgb.r(), other_rgb.g(), other_rgb.b(), alpha }; }
|
||||||
|
|
||||||
|
ColorRGBA picking_decode(unsigned int id)
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
float((id >> 0) & 0xff) * INV_255, // red
|
||||||
|
float((id >> 8) & 0xff) * INV_255, // green
|
||||||
|
float((id >> 16) & 0xff) * INV_255, // blue
|
||||||
|
float(picking_checksum_alpha_channel(id & 0xff, (id >> 8) & 0xff, (id >> 16) & 0xff)) * INV_255 // checksum for validating against unwanted alpha blending and multi sampling
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int picking_encode(unsigned char r, unsigned char g, unsigned char b) { return r + (g << 8) + (b << 16); }
|
||||||
|
|
||||||
|
unsigned char picking_checksum_alpha_channel(unsigned char red, unsigned char green, unsigned char blue)
|
||||||
|
{
|
||||||
|
// 8 bit hash for the color
|
||||||
|
unsigned char b = ((((37 * red) + green) & 0x0ff) * 37 + blue) & 0x0ff;
|
||||||
|
// Increase enthropy by a bit reversal
|
||||||
|
b = (b & 0xF0) >> 4 | (b & 0x0F) << 4;
|
||||||
|
b = (b & 0xCC) >> 2 | (b & 0x33) << 2;
|
||||||
|
b = (b & 0xAA) >> 1 | (b & 0x55) << 1;
|
||||||
|
// Flip every second bit to increase the enthropy even more.
|
||||||
|
b ^= 0x55;
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Slic3r
|
||||||
|
|
170
src/libslic3r/Color.hpp
Normal file
170
src/libslic3r/Color.hpp
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
#ifndef slic3r_Color_hpp_
|
||||||
|
#define slic3r_Color_hpp_
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
namespace Slic3r {
|
||||||
|
|
||||||
|
class ColorRGB
|
||||||
|
{
|
||||||
|
std::array<float, 3> m_data{1.0f, 1.0f, 1.0f};
|
||||||
|
|
||||||
|
public:
|
||||||
|
ColorRGB() = default;
|
||||||
|
ColorRGB(float r, float g, float b);
|
||||||
|
ColorRGB(unsigned char r, unsigned char g, unsigned char b);
|
||||||
|
ColorRGB(const ColorRGB& other) = default;
|
||||||
|
|
||||||
|
ColorRGB& operator = (const ColorRGB& other) { m_data = other.m_data; return *this; }
|
||||||
|
|
||||||
|
bool operator == (const ColorRGB& other) const { return m_data == other.m_data; }
|
||||||
|
bool operator != (const ColorRGB& other) const { return !operator==(other); }
|
||||||
|
bool operator < (const ColorRGB& other) const;
|
||||||
|
bool operator > (const ColorRGB& other) const;
|
||||||
|
|
||||||
|
ColorRGB operator + (const ColorRGB& other) const;
|
||||||
|
ColorRGB operator * (float value) const;
|
||||||
|
|
||||||
|
const float* const data() const { return m_data.data(); }
|
||||||
|
|
||||||
|
float r() const { return m_data[0]; }
|
||||||
|
float g() const { return m_data[1]; }
|
||||||
|
float b() const { return m_data[2]; }
|
||||||
|
|
||||||
|
void r(float r) { m_data[0] = std::clamp(r, 0.0f, 1.0f); }
|
||||||
|
void g(float g) { m_data[1] = std::clamp(g, 0.0f, 1.0f); }
|
||||||
|
void b(float b) { m_data[2] = std::clamp(b, 0.0f, 1.0f); }
|
||||||
|
|
||||||
|
void set(unsigned int comp, float value) {
|
||||||
|
assert(0 <= comp && comp <= 2);
|
||||||
|
m_data[comp] = std::clamp(value, 0.0f, 1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned char r_uchar() const { return static_cast<unsigned char>(m_data[0] * 255.0f); }
|
||||||
|
unsigned char g_uchar() const { return static_cast<unsigned char>(m_data[1] * 255.0f); }
|
||||||
|
unsigned char b_uchar() const { return static_cast<unsigned char>(m_data[2] * 255.0f); }
|
||||||
|
|
||||||
|
static const ColorRGB BLACK() { return { 0.0f, 0.0f, 0.0f }; }
|
||||||
|
static const ColorRGB BLUE() { return { 0.0f, 0.0f, 1.0f }; }
|
||||||
|
static const ColorRGB BLUEISH() { return { 0.5f, 0.5f, 1.0f }; }
|
||||||
|
static const ColorRGB DARK_GRAY() { return { 0.25f, 0.25f, 0.25f }; }
|
||||||
|
static const ColorRGB DARK_YELLOW() { return { 0.5f, 0.5f, 0.0f }; }
|
||||||
|
static const ColorRGB GRAY() { return { 0.5f, 0.5f, 0.5f }; }
|
||||||
|
static const ColorRGB GREEN() { return { 0.0f, 1.0f, 0.0f }; }
|
||||||
|
static const ColorRGB GREENISH() { return { 0.5f, 1.0f, 0.5f }; }
|
||||||
|
static const ColorRGB LIGHT_GRAY() { return { 0.75f, 0.75f, 0.75f }; }
|
||||||
|
static const ColorRGB ORANGE() { return { 0.92f, 0.50f, 0.26f }; }
|
||||||
|
static const ColorRGB RED() { return { 1.0f, 0.0f, 0.0f }; }
|
||||||
|
static const ColorRGB REDISH() { return { 1.0f, 0.5f, 0.5f }; }
|
||||||
|
static const ColorRGB YELLOW() { return { 1.0f, 1.0f, 0.0f }; }
|
||||||
|
static const ColorRGB WHITE() { return { 1.0f, 1.0f, 1.0f }; }
|
||||||
|
|
||||||
|
static const ColorRGB X() { return { 0.75f, 0.0f, 0.0f }; }
|
||||||
|
static const ColorRGB Y() { return { 0.0f, 0.75f, 0.0f }; }
|
||||||
|
static const ColorRGB Z() { return { 0.0f, 0.0f, 0.75f }; }
|
||||||
|
};
|
||||||
|
|
||||||
|
class ColorRGBA
|
||||||
|
{
|
||||||
|
std::array<float, 4> m_data{ 1.0f, 1.0f, 1.0f, 1.0f };
|
||||||
|
|
||||||
|
public:
|
||||||
|
ColorRGBA() = default;
|
||||||
|
ColorRGBA(float r, float g, float b, float a);
|
||||||
|
ColorRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
|
||||||
|
ColorRGBA(const ColorRGBA& other) = default;
|
||||||
|
|
||||||
|
ColorRGBA& operator = (const ColorRGBA& other) { m_data = other.m_data; return *this; }
|
||||||
|
|
||||||
|
bool operator == (const ColorRGBA& other) const { return m_data == other.m_data; }
|
||||||
|
bool operator != (const ColorRGBA& other) const { return !operator==(other); }
|
||||||
|
bool operator < (const ColorRGBA& other) const;
|
||||||
|
bool operator > (const ColorRGBA& other) const;
|
||||||
|
|
||||||
|
ColorRGBA operator + (const ColorRGBA& other) const;
|
||||||
|
ColorRGBA operator * (float value) const;
|
||||||
|
|
||||||
|
const float* const data() const { return m_data.data(); }
|
||||||
|
|
||||||
|
float r() const { return m_data[0]; }
|
||||||
|
float g() const { return m_data[1]; }
|
||||||
|
float b() const { return m_data[2]; }
|
||||||
|
float a() const { return m_data[3]; }
|
||||||
|
|
||||||
|
void r(float r) { m_data[0] = std::clamp(r, 0.0f, 1.0f); }
|
||||||
|
void g(float g) { m_data[1] = std::clamp(g, 0.0f, 1.0f); }
|
||||||
|
void b(float b) { m_data[2] = std::clamp(b, 0.0f, 1.0f); }
|
||||||
|
void a(float a) { m_data[3] = std::clamp(a, 0.0f, 1.0f); }
|
||||||
|
|
||||||
|
void set(unsigned int comp, float value) {
|
||||||
|
assert(0 <= comp && comp <= 3);
|
||||||
|
m_data[comp] = std::clamp(value, 0.0f, 1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned char r_uchar() const { return static_cast<unsigned char>(m_data[0] * 255.0f); }
|
||||||
|
unsigned char g_uchar() const { return static_cast<unsigned char>(m_data[1] * 255.0f); }
|
||||||
|
unsigned char b_uchar() const { return static_cast<unsigned char>(m_data[2] * 255.0f); }
|
||||||
|
unsigned char a_uchar() const { return static_cast<unsigned char>(m_data[3] * 255.0f); }
|
||||||
|
|
||||||
|
bool is_transparent() const { return m_data[3] < 1.0f; }
|
||||||
|
|
||||||
|
static const ColorRGBA BLACK() { return { 0.0f, 0.0f, 0.0f, 1.0f }; }
|
||||||
|
static const ColorRGBA BLUE() { return { 0.0f, 0.0f, 1.0f, 1.0f }; }
|
||||||
|
static const ColorRGBA BLUEISH() { return { 0.5f, 0.5f, 1.0f, 1.0f }; }
|
||||||
|
static const ColorRGBA DARK_GRAY() { return { 0.25f, 0.25f, 0.25f, 1.0f }; }
|
||||||
|
static const ColorRGBA DARK_YELLOW() { return { 0.5f, 0.5f, 0.0f, 1.0f }; }
|
||||||
|
static const ColorRGBA GRAY() { return { 0.5f, 0.5f, 0.5f, 1.0f }; }
|
||||||
|
static const ColorRGBA GREEN() { return { 0.0f, 1.0f, 0.0f, 1.0f }; }
|
||||||
|
static const ColorRGBA GREENISH() { return { 0.5f, 1.0f, 0.5f, 1.0f }; }
|
||||||
|
static const ColorRGBA LIGHT_GRAY() { return { 0.75f, 0.75f, 0.75f, 1.0f }; }
|
||||||
|
static const ColorRGBA ORANGE() { return { 0.923f, 0.504f, 0.264f, 1.0f }; }
|
||||||
|
static const ColorRGBA RED() { return { 1.0f, 0.0f, 0.0f, 1.0f }; }
|
||||||
|
static const ColorRGBA REDISH() { return { 1.0f, 0.5f, 0.5f, 1.0f }; }
|
||||||
|
static const ColorRGBA YELLOW() { return { 1.0f, 1.0f, 0.0f, 1.0f }; }
|
||||||
|
static const ColorRGBA WHITE() { return { 1.0f, 1.0f, 1.0f, 1.0f }; }
|
||||||
|
|
||||||
|
static const ColorRGBA X() { return { 0.75f, 0.0f, 0.0f, 1.0f }; }
|
||||||
|
static const ColorRGBA Y() { return { 0.0f, 0.75f, 0.0f, 1.0f }; }
|
||||||
|
static const ColorRGBA Z() { return { 0.0f, 0.0f, 0.75f, 1.0f }; }
|
||||||
|
};
|
||||||
|
|
||||||
|
extern ColorRGB operator * (float value, const ColorRGB& other);
|
||||||
|
extern ColorRGBA operator * (float value, const ColorRGBA& other);
|
||||||
|
|
||||||
|
extern ColorRGB lerp(const ColorRGB& a, const ColorRGB& b, float t);
|
||||||
|
extern ColorRGBA lerp(const ColorRGBA& a, const ColorRGBA& b, float t);
|
||||||
|
|
||||||
|
extern ColorRGB complementary(const ColorRGB& color);
|
||||||
|
extern ColorRGBA complementary(const ColorRGBA& color);
|
||||||
|
|
||||||
|
extern ColorRGB saturate(const ColorRGB& color, float factor);
|
||||||
|
extern ColorRGBA saturate(const ColorRGBA& color, float factor);
|
||||||
|
|
||||||
|
extern ColorRGB opposite(const ColorRGB& color);
|
||||||
|
extern ColorRGB opposite(const ColorRGB& a, const ColorRGB& b);
|
||||||
|
|
||||||
|
extern bool can_decode_color(const std::string& color);
|
||||||
|
|
||||||
|
extern bool decode_color(const std::string& color_in, ColorRGB& color_out);
|
||||||
|
extern bool decode_color(const std::string& color_in, ColorRGBA& color_out);
|
||||||
|
|
||||||
|
extern bool decode_colors(const std::vector<std::string>& colors_in, std::vector<ColorRGB>& colors_out);
|
||||||
|
extern bool decode_colors(const std::vector<std::string>& colors_in, std::vector<ColorRGBA>& colors_out);
|
||||||
|
|
||||||
|
extern std::string encode_color(const ColorRGB& color);
|
||||||
|
extern std::string encode_color(const ColorRGBA& color);
|
||||||
|
|
||||||
|
extern ColorRGB to_rgb(const ColorRGBA& other_rgba);
|
||||||
|
extern ColorRGBA to_rgba(const ColorRGB& other_rgb);
|
||||||
|
extern ColorRGBA to_rgba(const ColorRGB& other_rgb, float alpha);
|
||||||
|
|
||||||
|
extern ColorRGBA picking_decode(unsigned int id);
|
||||||
|
extern unsigned int picking_encode(unsigned char r, unsigned char g, unsigned char b);
|
||||||
|
// Produce an alpha channel checksum for the red green blue components. The alpha channel may then be used to verify, whether the rgb components
|
||||||
|
// were not interpolated by alpha blending or multi sampling.
|
||||||
|
extern unsigned char picking_checksum_alpha_channel(unsigned char red, unsigned char green, unsigned char blue);
|
||||||
|
|
||||||
|
} // namespace Slic3r
|
||||||
|
|
||||||
|
#endif /* slic3r_Color_hpp_ */
|
@ -758,6 +758,8 @@ public:
|
|||||||
ConfigOptionIntsTempl() : ConfigOptionVector<int>() {}
|
ConfigOptionIntsTempl() : ConfigOptionVector<int>() {}
|
||||||
explicit ConfigOptionIntsTempl(size_t n, int value) : ConfigOptionVector<int>(n, value) {}
|
explicit ConfigOptionIntsTempl(size_t n, int value) : ConfigOptionVector<int>(n, value) {}
|
||||||
explicit ConfigOptionIntsTempl(std::initializer_list<int> il) : ConfigOptionVector<int>(std::move(il)) {}
|
explicit ConfigOptionIntsTempl(std::initializer_list<int> il) : ConfigOptionVector<int>(std::move(il)) {}
|
||||||
|
explicit ConfigOptionIntsTempl(const std::vector<int> &v) : ConfigOptionVector<int>(v) {}
|
||||||
|
explicit ConfigOptionIntsTempl(std::vector<int> &&v) : ConfigOptionVector<int>(std::move(v)) {}
|
||||||
|
|
||||||
static ConfigOptionType static_type() { return coInts; }
|
static ConfigOptionType static_type() { return coInts; }
|
||||||
ConfigOptionType type() const override { return static_type(); }
|
ConfigOptionType type() const override { return static_type(); }
|
||||||
|
@ -677,7 +677,7 @@ namespace DoExport {
|
|||||||
print_statistics.total_weight = total_weight;
|
print_statistics.total_weight = total_weight;
|
||||||
print_statistics.total_cost = total_cost;
|
print_statistics.total_cost = total_cost;
|
||||||
|
|
||||||
print_statistics.filament_stats = result.print_statistics.volumes_per_extruder;
|
print_statistics.filament_stats = result.print_statistics.volumes_per_extruder;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if any reserved keyword is found, returns a std::vector containing the first MAX_COUNT keywords found
|
// if any reserved keyword is found, returns a std::vector containing the first MAX_COUNT keywords found
|
||||||
@ -984,19 +984,26 @@ namespace DoExport {
|
|||||||
static std::string update_print_stats_and_format_filament_stats(
|
static std::string update_print_stats_and_format_filament_stats(
|
||||||
const bool has_wipe_tower,
|
const bool has_wipe_tower,
|
||||||
const WipeTowerData &wipe_tower_data,
|
const WipeTowerData &wipe_tower_data,
|
||||||
|
const FullPrintConfig &config,
|
||||||
const std::vector<Extruder> &extruders,
|
const std::vector<Extruder> &extruders,
|
||||||
|
unsigned int initial_extruder_id,
|
||||||
PrintStatistics &print_statistics)
|
PrintStatistics &print_statistics)
|
||||||
{
|
{
|
||||||
std::string filament_stats_string_out;
|
std::string filament_stats_string_out;
|
||||||
|
|
||||||
print_statistics.clear();
|
print_statistics.clear();
|
||||||
print_statistics.total_toolchanges = std::max(0, wipe_tower_data.number_of_toolchanges);
|
print_statistics.total_toolchanges = std::max(0, wipe_tower_data.number_of_toolchanges);
|
||||||
|
print_statistics.initial_extruder_id = initial_extruder_id;
|
||||||
|
std::vector<std::string> filament_types;
|
||||||
if (! extruders.empty()) {
|
if (! extruders.empty()) {
|
||||||
std::pair<std::string, unsigned int> out_filament_used_mm ("; filament used [mm] = ", 0);
|
std::pair<std::string, unsigned int> out_filament_used_mm ("; filament used [mm] = ", 0);
|
||||||
std::pair<std::string, unsigned int> out_filament_used_cm3("; filament used [cm3] = ", 0);
|
std::pair<std::string, unsigned int> out_filament_used_cm3("; filament used [cm3] = ", 0);
|
||||||
std::pair<std::string, unsigned int> out_filament_used_g ("; filament used [g] = ", 0);
|
std::pair<std::string, unsigned int> out_filament_used_g ("; filament used [g] = ", 0);
|
||||||
std::pair<std::string, unsigned int> out_filament_cost ("; filament cost = ", 0);
|
std::pair<std::string, unsigned int> out_filament_cost ("; filament cost = ", 0);
|
||||||
for (const Extruder &extruder : extruders) {
|
for (const Extruder &extruder : extruders) {
|
||||||
|
print_statistics.printing_extruders.emplace_back(extruder.id());
|
||||||
|
filament_types.emplace_back(config.filament_type.get_at(extruder.id()));
|
||||||
|
|
||||||
double used_filament = extruder.used_filament() + (has_wipe_tower ? wipe_tower_data.used_filament[extruder.id()] : 0.f);
|
double used_filament = extruder.used_filament() + (has_wipe_tower ? wipe_tower_data.used_filament[extruder.id()] : 0.f);
|
||||||
double extruded_volume = extruder.extruded_volume() + (has_wipe_tower ? wipe_tower_data.used_filament[extruder.id()] * 2.4052f : 0.f); // assumes 1.75mm filament diameter
|
double extruded_volume = extruder.extruded_volume() + (has_wipe_tower ? wipe_tower_data.used_filament[extruder.id()] * 2.4052f : 0.f); // assumes 1.75mm filament diameter
|
||||||
double filament_weight = extruded_volume * extruder.filament_density() * 0.001;
|
double filament_weight = extruded_volume * extruder.filament_density() * 0.001;
|
||||||
@ -1036,6 +1043,13 @@ namespace DoExport {
|
|||||||
filament_stats_string_out += "\n" + out_filament_used_g.first;
|
filament_stats_string_out += "\n" + out_filament_used_g.first;
|
||||||
if (out_filament_cost.second)
|
if (out_filament_cost.second)
|
||||||
filament_stats_string_out += "\n" + out_filament_cost.first;
|
filament_stats_string_out += "\n" + out_filament_cost.first;
|
||||||
|
print_statistics.initial_filament_type = config.filament_type.get_at(initial_extruder_id);
|
||||||
|
std::sort(filament_types.begin(), filament_types.end());
|
||||||
|
print_statistics.printing_filament_types = filament_types.front();
|
||||||
|
for (size_t i = 1; i < filament_types.size(); ++ i) {
|
||||||
|
print_statistics.printing_filament_types += ",";
|
||||||
|
print_statistics.printing_filament_types += filament_types[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return filament_stats_string_out;
|
return filament_stats_string_out;
|
||||||
}
|
}
|
||||||
@ -1486,7 +1500,9 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
|||||||
file.write(DoExport::update_print_stats_and_format_filament_stats(
|
file.write(DoExport::update_print_stats_and_format_filament_stats(
|
||||||
// Const inputs
|
// Const inputs
|
||||||
has_wipe_tower, print.wipe_tower_data(),
|
has_wipe_tower, print.wipe_tower_data(),
|
||||||
|
this->config(),
|
||||||
m_writer.extruders(),
|
m_writer.extruders(),
|
||||||
|
initial_extruder_id,
|
||||||
// Modifies
|
// Modifies
|
||||||
print.m_print_statistics));
|
print.m_print_statistics));
|
||||||
file.write("\n");
|
file.write("\n");
|
||||||
@ -1685,40 +1701,56 @@ static bool custom_gcode_sets_temperature(const std::string &gcode, const int mc
|
|||||||
// Do not process this piece of G-code by the time estimator, it already knows the values through another sources.
|
// Do not process this piece of G-code by the time estimator, it already knows the values through another sources.
|
||||||
void GCode::print_machine_envelope(GCodeOutputStream &file, Print &print)
|
void GCode::print_machine_envelope(GCodeOutputStream &file, Print &print)
|
||||||
{
|
{
|
||||||
if ((print.config().gcode_flavor.value == gcfMarlinLegacy || print.config().gcode_flavor.value == gcfMarlinFirmware)
|
const GCodeFlavor flavor = print.config().gcode_flavor.value;
|
||||||
|
if ( (flavor == gcfMarlinLegacy || flavor == gcfMarlinFirmware || flavor == gcfRepRapFirmware)
|
||||||
&& print.config().machine_limits_usage.value == MachineLimitsUsage::EmitToGCode) {
|
&& print.config().machine_limits_usage.value == MachineLimitsUsage::EmitToGCode) {
|
||||||
|
int factor = flavor == gcfRepRapFirmware ? 60 : 1; // RRF M203 and M566 are in mm/min
|
||||||
file.write_format("M201 X%d Y%d Z%d E%d ; sets maximum accelerations, mm/sec^2\n",
|
file.write_format("M201 X%d Y%d Z%d E%d ; sets maximum accelerations, mm/sec^2\n",
|
||||||
int(print.config().machine_max_acceleration_x.values.front() + 0.5),
|
int(print.config().machine_max_acceleration_x.values.front() + 0.5),
|
||||||
int(print.config().machine_max_acceleration_y.values.front() + 0.5),
|
int(print.config().machine_max_acceleration_y.values.front() + 0.5),
|
||||||
int(print.config().machine_max_acceleration_z.values.front() + 0.5),
|
int(print.config().machine_max_acceleration_z.values.front() + 0.5),
|
||||||
int(print.config().machine_max_acceleration_e.values.front() + 0.5));
|
int(print.config().machine_max_acceleration_e.values.front() + 0.5));
|
||||||
file.write_format("M203 X%d Y%d Z%d E%d ; sets maximum feedrates, mm/sec\n",
|
file.write_format("M203 X%d Y%d Z%d E%d ; sets maximum feedrates, %s\n",
|
||||||
int(print.config().machine_max_feedrate_x.values.front() + 0.5),
|
int(print.config().machine_max_feedrate_x.values.front() * factor + 0.5),
|
||||||
int(print.config().machine_max_feedrate_y.values.front() + 0.5),
|
int(print.config().machine_max_feedrate_y.values.front() * factor + 0.5),
|
||||||
int(print.config().machine_max_feedrate_z.values.front() + 0.5),
|
int(print.config().machine_max_feedrate_z.values.front() * factor + 0.5),
|
||||||
int(print.config().machine_max_feedrate_e.values.front() + 0.5));
|
int(print.config().machine_max_feedrate_e.values.front() * factor + 0.5),
|
||||||
|
factor == 60 ? "mm / min" : "mm / sec");
|
||||||
|
|
||||||
// Now M204 - acceleration. This one is quite hairy thanks to how Marlin guys care about
|
// Now M204 - acceleration. This one is quite hairy thanks to how Marlin guys care about
|
||||||
// backwards compatibility: https://github.com/prusa3d/PrusaSlicer/issues/1089
|
// backwards compatibility: https://github.com/prusa3d/PrusaSlicer/issues/1089
|
||||||
// Legacy Marlin should export travel acceleration the same as printing acceleration.
|
// Legacy Marlin should export travel acceleration the same as printing acceleration.
|
||||||
// MarlinFirmware has the two separated.
|
// MarlinFirmware has the two separated.
|
||||||
int travel_acc = print.config().gcode_flavor == gcfMarlinLegacy
|
int travel_acc = flavor == gcfMarlinLegacy
|
||||||
? int(print.config().machine_max_acceleration_extruding.values.front() + 0.5)
|
? int(print.config().machine_max_acceleration_extruding.values.front() + 0.5)
|
||||||
: int(print.config().machine_max_acceleration_travel.values.front() + 0.5);
|
: int(print.config().machine_max_acceleration_travel.values.front() + 0.5);
|
||||||
file.write_format("M204 P%d R%d T%d ; sets acceleration (P, T) and retract acceleration (R), mm/sec^2\n",
|
// Retract acceleration not accepted in M204 in RRF
|
||||||
int(print.config().machine_max_acceleration_extruding.values.front() + 0.5),
|
if (flavor == gcfRepRapFirmware)
|
||||||
int(print.config().machine_max_acceleration_retracting.values.front() + 0.5),
|
file.write_format("M204 P%d T%d ; sets acceleration (P, T), mm/sec^2\n",
|
||||||
travel_acc);
|
int(print.config().machine_max_acceleration_extruding.values.front() + 0.5),
|
||||||
|
travel_acc);
|
||||||
|
else
|
||||||
|
file.write_format("M204 P%d R%d T%d ; sets acceleration (P, T) and retract acceleration (R), mm/sec^2\n",
|
||||||
|
int(print.config().machine_max_acceleration_extruding.values.front() + 0.5),
|
||||||
|
int(print.config().machine_max_acceleration_retracting.values.front() + 0.5),
|
||||||
|
travel_acc);
|
||||||
|
|
||||||
assert(is_decimal_separator_point());
|
assert(is_decimal_separator_point());
|
||||||
file.write_format("M205 X%.2lf Y%.2lf Z%.2lf E%.2lf ; sets the jerk limits, mm/sec\n",
|
file.write_format(flavor == gcfRepRapFirmware
|
||||||
print.config().machine_max_jerk_x.values.front(),
|
? "M566 X%.2lf Y%.2lf Z%.2lf E%.2lf ; sets the jerk limits, mm/min\n"
|
||||||
print.config().machine_max_jerk_y.values.front(),
|
: "M205 X%.2lf Y%.2lf Z%.2lf E%.2lf ; sets the jerk limits, mm/sec\n",
|
||||||
print.config().machine_max_jerk_z.values.front(),
|
print.config().machine_max_jerk_x.values.front() * factor,
|
||||||
print.config().machine_max_jerk_e.values.front());
|
print.config().machine_max_jerk_y.values.front() * factor,
|
||||||
file.write_format("M205 S%d T%d ; sets the minimum extruding and travel feed rate, mm/sec\n",
|
print.config().machine_max_jerk_z.values.front() * factor,
|
||||||
int(print.config().machine_min_extruding_rate.values.front() + 0.5),
|
print.config().machine_max_jerk_e.values.front() * factor);
|
||||||
int(print.config().machine_min_travel_rate.values.front() + 0.5));
|
if (flavor != gcfRepRapFirmware)
|
||||||
|
file.write_format("M205 S%d T%d ; sets the minimum extruding and travel feed rate, mm/sec\n",
|
||||||
|
int(print.config().machine_min_extruding_rate.values.front() + 0.5),
|
||||||
|
int(print.config().machine_min_travel_rate.values.front() + 0.5));
|
||||||
|
else {
|
||||||
|
// M205 Sn Tn not supported in RRF. They use M203 Inn to set minimum feedrate for
|
||||||
|
// all moves. This is currently not implemented.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -811,13 +811,13 @@ std::string CoolingBuffer::apply_layer_cooldown(
|
|||||||
// Skip the non-whitespaces of the F parameter up the comment or end of line.
|
// Skip the non-whitespaces of the F parameter up the comment or end of line.
|
||||||
for (; fpos != end && *fpos != ' ' && *fpos != ';' && *fpos != '\n'; ++ fpos);
|
for (; fpos != end && *fpos != ' ' && *fpos != ';' && *fpos != '\n'; ++ fpos);
|
||||||
// Append the rest of the line without the comment.
|
// Append the rest of the line without the comment.
|
||||||
if (fpos < end)
|
if (remove && (fpos == end || *fpos == '\n') && (new_gcode == "G1" || boost::ends_with(new_gcode, "\nG1"))) {
|
||||||
// The G-code line is not empty yet. Emit the rest of it.
|
|
||||||
new_gcode.append(fpos, end - fpos);
|
|
||||||
else if (remove && new_gcode == "G1") {
|
|
||||||
// The G-code line only contained the F word, now it is empty. Remove it completely including the comments.
|
// The G-code line only contained the F word, now it is empty. Remove it completely including the comments.
|
||||||
new_gcode.resize(new_gcode.size() - 2);
|
new_gcode.resize(new_gcode.size() - 2);
|
||||||
end = line_end;
|
end = line_end;
|
||||||
|
} else {
|
||||||
|
// The G-code line may not be empty yet. Emit the rest of it.
|
||||||
|
new_gcode.append(fpos, end - fpos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Process the rest of the line.
|
// Process the rest of the line.
|
||||||
@ -845,6 +845,8 @@ std::string CoolingBuffer::apply_layer_cooldown(
|
|||||||
if (pos < gcode_end)
|
if (pos < gcode_end)
|
||||||
new_gcode.append(pos, gcode_end - pos);
|
new_gcode.append(pos, gcode_end - pos);
|
||||||
|
|
||||||
|
// There should be no empty G1 lines emitted.
|
||||||
|
assert(new_gcode.find("G1\n") == std::string::npos);
|
||||||
return new_gcode;
|
return new_gcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -737,6 +737,9 @@ void GCodeProcessorResult::reset() {
|
|||||||
filament_diameters = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DIAMETER);
|
filament_diameters = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DIAMETER);
|
||||||
filament_densities = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DENSITY);
|
filament_densities = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DENSITY);
|
||||||
custom_gcode_per_print_z = std::vector<CustomGCode::Item>();
|
custom_gcode_per_print_z = std::vector<CustomGCode::Item>();
|
||||||
|
#if ENABLE_SPIRAL_VASE_LAYERS
|
||||||
|
spiral_vase_layers = std::vector<std::pair<float, std::pair<size_t, size_t>>>();
|
||||||
|
#endif // ENABLE_SPIRAL_VASE_LAYERS
|
||||||
time = 0;
|
time = 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -752,6 +755,9 @@ void GCodeProcessorResult::reset() {
|
|||||||
filament_diameters = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DIAMETER);
|
filament_diameters = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DIAMETER);
|
||||||
filament_densities = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DENSITY);
|
filament_densities = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DENSITY);
|
||||||
custom_gcode_per_print_z = std::vector<CustomGCode::Item>();
|
custom_gcode_per_print_z = std::vector<CustomGCode::Item>();
|
||||||
|
#if ENABLE_SPIRAL_VASE_LAYERS
|
||||||
|
spiral_vase_layers = std::vector<std::pair<float, std::pair<size_t, size_t>>>();
|
||||||
|
#endif // ENABLE_SPIRAL_VASE_LAYERS
|
||||||
}
|
}
|
||||||
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
|
|
||||||
@ -853,12 +859,17 @@ void GCodeProcessor::apply_config(const PrintConfig& config)
|
|||||||
m_result.filament_densities[i] = static_cast<float>(config.filament_density.get_at(i));
|
m_result.filament_densities[i] = static_cast<float>(config.filament_density.get_at(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware) && config.machine_limits_usage.value != MachineLimitsUsage::Ignore) {
|
if ((m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware || m_flavor == gcfRepRapFirmware) && config.machine_limits_usage.value != MachineLimitsUsage::Ignore) {
|
||||||
m_time_processor.machine_limits = reinterpret_cast<const MachineEnvelopeConfig&>(config);
|
m_time_processor.machine_limits = reinterpret_cast<const MachineEnvelopeConfig&>(config);
|
||||||
if (m_flavor == gcfMarlinLegacy) {
|
if (m_flavor == gcfMarlinLegacy) {
|
||||||
// Legacy Marlin does not have separate travel acceleration, it uses the 'extruding' value instead.
|
// Legacy Marlin does not have separate travel acceleration, it uses the 'extruding' value instead.
|
||||||
m_time_processor.machine_limits.machine_max_acceleration_travel = m_time_processor.machine_limits.machine_max_acceleration_extruding;
|
m_time_processor.machine_limits.machine_max_acceleration_travel = m_time_processor.machine_limits.machine_max_acceleration_extruding;
|
||||||
}
|
}
|
||||||
|
if (m_flavor == gcfRepRapFirmware) {
|
||||||
|
// RRF does not support setting min feedrates. Set them to zero.
|
||||||
|
m_time_processor.machine_limits.machine_min_travel_rate.values.assign(m_time_processor.machine_limits.machine_min_travel_rate.size(), 0.);
|
||||||
|
m_time_processor.machine_limits.machine_min_extruding_rate.values.assign(m_time_processor.machine_limits.machine_min_extruding_rate.size(), 0.);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filament load / unload times are not specific to a firmware flavor. Let anybody use it if they find it useful.
|
// Filament load / unload times are not specific to a firmware flavor. Let anybody use it if they find it useful.
|
||||||
@ -893,6 +904,12 @@ void GCodeProcessor::apply_config(const PrintConfig& config)
|
|||||||
m_first_layer_height = std::abs(first_layer_height->value);
|
m_first_layer_height = std::abs(first_layer_height->value);
|
||||||
|
|
||||||
m_result.max_print_height = config.max_print_height;
|
m_result.max_print_height = config.max_print_height;
|
||||||
|
|
||||||
|
#if ENABLE_SPIRAL_VASE_LAYERS
|
||||||
|
const ConfigOptionBool* spiral_vase = config.option<ConfigOptionBool>("spiral_vase");
|
||||||
|
if (spiral_vase != nullptr)
|
||||||
|
m_spiral_vase_active = spiral_vase->value;
|
||||||
|
#endif // ENABLE_SPIRAL_VASE_LAYERS
|
||||||
}
|
}
|
||||||
|
|
||||||
void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
||||||
@ -1020,7 +1037,7 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
|||||||
if (machine_limits_usage != nullptr)
|
if (machine_limits_usage != nullptr)
|
||||||
use_machine_limits = machine_limits_usage->value != MachineLimitsUsage::Ignore;
|
use_machine_limits = machine_limits_usage->value != MachineLimitsUsage::Ignore;
|
||||||
|
|
||||||
if (use_machine_limits && (m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware)) {
|
if (use_machine_limits && (m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware || m_flavor == gcfRepRapFirmware)) {
|
||||||
const ConfigOptionFloats* machine_max_acceleration_x = config.option<ConfigOptionFloats>("machine_max_acceleration_x");
|
const ConfigOptionFloats* machine_max_acceleration_x = config.option<ConfigOptionFloats>("machine_max_acceleration_x");
|
||||||
if (machine_max_acceleration_x != nullptr)
|
if (machine_max_acceleration_x != nullptr)
|
||||||
m_time_processor.machine_limits.machine_max_acceleration_x.values = machine_max_acceleration_x->values;
|
m_time_processor.machine_limits.machine_max_acceleration_x.values = machine_max_acceleration_x->values;
|
||||||
@ -1087,12 +1104,22 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
|||||||
|
|
||||||
|
|
||||||
const ConfigOptionFloats* machine_min_extruding_rate = config.option<ConfigOptionFloats>("machine_min_extruding_rate");
|
const ConfigOptionFloats* machine_min_extruding_rate = config.option<ConfigOptionFloats>("machine_min_extruding_rate");
|
||||||
if (machine_min_extruding_rate != nullptr)
|
if (machine_min_extruding_rate != nullptr) {
|
||||||
m_time_processor.machine_limits.machine_min_extruding_rate.values = machine_min_extruding_rate->values;
|
m_time_processor.machine_limits.machine_min_extruding_rate.values = machine_min_extruding_rate->values;
|
||||||
|
if (m_flavor == gcfRepRapFirmware) {
|
||||||
|
// RRF does not support setting min feedrates. Set zero.
|
||||||
|
m_time_processor.machine_limits.machine_min_extruding_rate.values.assign(m_time_processor.machine_limits.machine_min_extruding_rate.size(), 0.);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const ConfigOptionFloats* machine_min_travel_rate = config.option<ConfigOptionFloats>("machine_min_travel_rate");
|
const ConfigOptionFloats* machine_min_travel_rate = config.option<ConfigOptionFloats>("machine_min_travel_rate");
|
||||||
if (machine_min_travel_rate != nullptr)
|
if (machine_min_travel_rate != nullptr) {
|
||||||
m_time_processor.machine_limits.machine_min_travel_rate.values = machine_min_travel_rate->values;
|
m_time_processor.machine_limits.machine_min_travel_rate.values = machine_min_travel_rate->values;
|
||||||
|
if (m_flavor == gcfRepRapFirmware) {
|
||||||
|
// RRF does not support setting min feedrates. Set zero.
|
||||||
|
m_time_processor.machine_limits.machine_min_travel_rate.values.assign(m_time_processor.machine_limits.machine_min_travel_rate.size(), 0.);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Count); ++i) {
|
for (size_t i = 0; i < static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Count); ++i) {
|
||||||
@ -1126,6 +1153,12 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
|||||||
const ConfigOptionFloat* max_print_height = config.option<ConfigOptionFloat>("max_print_height");
|
const ConfigOptionFloat* max_print_height = config.option<ConfigOptionFloat>("max_print_height");
|
||||||
if (max_print_height != nullptr)
|
if (max_print_height != nullptr)
|
||||||
m_result.max_print_height = max_print_height->value;
|
m_result.max_print_height = max_print_height->value;
|
||||||
|
|
||||||
|
#if ENABLE_SPIRAL_VASE_LAYERS
|
||||||
|
const ConfigOptionBool* spiral_vase = config.option<ConfigOptionBool>("spiral_vase");
|
||||||
|
if (spiral_vase != nullptr)
|
||||||
|
m_spiral_vase_active = spiral_vase->value;
|
||||||
|
#endif // ENABLE_SPIRAL_VASE_LAYERS
|
||||||
}
|
}
|
||||||
|
|
||||||
void GCodeProcessor::enable_stealth_time_estimator(bool enabled)
|
void GCodeProcessor::enable_stealth_time_estimator(bool enabled)
|
||||||
@ -1188,6 +1221,10 @@ void GCodeProcessor::reset()
|
|||||||
|
|
||||||
m_options_z_corrector.reset();
|
m_options_z_corrector.reset();
|
||||||
|
|
||||||
|
#if ENABLE_SPIRAL_VASE_LAYERS
|
||||||
|
m_spiral_vase_active = false;
|
||||||
|
#endif // ENABLE_SPIRAL_VASE_LAYERS
|
||||||
|
|
||||||
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
|
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
|
||||||
m_mm3_per_mm_compare.reset();
|
m_mm3_per_mm_compare.reset();
|
||||||
m_height_compare.reset();
|
m_height_compare.reset();
|
||||||
@ -1888,6 +1925,16 @@ void GCodeProcessor::process_tags(const std::string_view comment, bool producers
|
|||||||
// layer change tag
|
// layer change tag
|
||||||
if (comment == reserved_tag(ETags::Layer_Change)) {
|
if (comment == reserved_tag(ETags::Layer_Change)) {
|
||||||
++m_layer_id;
|
++m_layer_id;
|
||||||
|
#if ENABLE_SPIRAL_VASE_LAYERS
|
||||||
|
if (m_spiral_vase_active) {
|
||||||
|
assert(!m_result.moves.empty());
|
||||||
|
size_t move_id = m_result.moves.size() - 1;
|
||||||
|
if (!m_result.spiral_vase_layers.empty() && m_end_position[Z] == m_result.spiral_vase_layers.back().first)
|
||||||
|
m_result.spiral_vase_layers.back().second.second = move_id;
|
||||||
|
else
|
||||||
|
m_result.spiral_vase_layers.push_back({ m_end_position[Z], { move_id, move_id } });
|
||||||
|
}
|
||||||
|
#endif // ENABLE_SPIRAL_VASE_LAYERS
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2693,6 +2740,11 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line)
|
|||||||
m_seams_detector.set_first_vertex(m_result.moves.back().position - m_extruder_offsets[m_extruder_id]);
|
m_seams_detector.set_first_vertex(m_result.moves.back().position - m_extruder_offsets[m_extruder_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ENABLE_SPIRAL_VASE_LAYERS
|
||||||
|
if (m_spiral_vase_active && !m_result.spiral_vase_layers.empty() && !m_result.moves.empty())
|
||||||
|
m_result.spiral_vase_layers.back().second.second = m_result.moves.size() - 1;
|
||||||
|
#endif // ENABLE_SPIRAL_VASE_LAYERS
|
||||||
|
|
||||||
// store move
|
// store move
|
||||||
store_move_vertex(type);
|
store_move_vertex(type);
|
||||||
}
|
}
|
||||||
|
@ -131,6 +131,9 @@ namespace Slic3r {
|
|||||||
std::vector<float> filament_densities;
|
std::vector<float> filament_densities;
|
||||||
PrintEstimatedStatistics print_statistics;
|
PrintEstimatedStatistics print_statistics;
|
||||||
std::vector<CustomGCode::Item> custom_gcode_per_print_z;
|
std::vector<CustomGCode::Item> custom_gcode_per_print_z;
|
||||||
|
#if ENABLE_SPIRAL_VASE_LAYERS
|
||||||
|
std::vector<std::pair<float, std::pair<size_t, size_t>>> spiral_vase_layers;
|
||||||
|
#endif // ENABLE_SPIRAL_VASE_LAYERS
|
||||||
|
|
||||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
int64_t time{ 0 };
|
int64_t time{ 0 };
|
||||||
@ -541,6 +544,9 @@ namespace Slic3r {
|
|||||||
SeamsDetector m_seams_detector;
|
SeamsDetector m_seams_detector;
|
||||||
OptionsZCorrector m_options_z_corrector;
|
OptionsZCorrector m_options_z_corrector;
|
||||||
size_t m_last_default_color_id;
|
size_t m_last_default_color_id;
|
||||||
|
#if ENABLE_SPIRAL_VASE_LAYERS
|
||||||
|
bool m_spiral_vase_active;
|
||||||
|
#endif // ENABLE_SPIRAL_VASE_LAYERS
|
||||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
std::chrono::time_point<std::chrono::high_resolution_clock> m_start_time;
|
std::chrono::time_point<std::chrono::high_resolution_clock> m_start_time;
|
||||||
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
|
@ -20,8 +20,10 @@ void GCodeWriter::apply_print_config(const PrintConfig &print_config)
|
|||||||
this->config.apply(print_config, true);
|
this->config.apply(print_config, true);
|
||||||
m_extrusion_axis = get_extrusion_axis(this->config);
|
m_extrusion_axis = get_extrusion_axis(this->config);
|
||||||
m_single_extruder_multi_material = print_config.single_extruder_multi_material.value;
|
m_single_extruder_multi_material = print_config.single_extruder_multi_material.value;
|
||||||
bool is_marlin = print_config.gcode_flavor.value == gcfMarlinLegacy || print_config.gcode_flavor.value == gcfMarlinFirmware;
|
bool use_mach_limits = print_config.gcode_flavor.value == gcfMarlinLegacy
|
||||||
m_max_acceleration = std::lrint((is_marlin && print_config.machine_limits_usage.value == MachineLimitsUsage::EmitToGCode) ?
|
|| print_config.gcode_flavor.value == gcfMarlinFirmware
|
||||||
|
|| print_config.gcode_flavor.value == gcfRepRapFirmware;
|
||||||
|
m_max_acceleration = std::lrint((use_mach_limits && print_config.machine_limits_usage.value == MachineLimitsUsage::EmitToGCode) ?
|
||||||
print_config.machine_max_acceleration_extruding.values.front() : 0);
|
print_config.machine_max_acceleration_extruding.values.front() : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1797,19 +1797,28 @@ std::vector<std::vector<ExPolygons>> multi_material_segmentation_by_painting(con
|
|||||||
line_end_f = facet[1] + t2 * (facet[2] - facet[1]);
|
line_end_f = facet[1] + t2 * (facet[2] - facet[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Point line_start(scale_(line_start_f.x()), scale_(line_start_f.y()));
|
Line line_to_test(Point(scale_(line_start_f.x()), scale_(line_start_f.y())),
|
||||||
Point line_end(scale_(line_end_f.x()), scale_(line_end_f.y()));
|
Point(scale_(line_end_f.x()), scale_(line_end_f.y())));
|
||||||
line_start -= print_object.center_offset();
|
line_to_test.translate(-print_object.center_offset());
|
||||||
line_end -= print_object.center_offset();
|
|
||||||
|
// BoundingBoxes for EdgeGrids are computed from printable regions. It is possible that the painted line (line_to_test) could
|
||||||
|
// be outside EdgeGrid's BoundingBox, for example, when the negative volume is used on the painted area (GH #7618).
|
||||||
|
// To ensure that the painted line is always inside EdgeGrid's BoundingBox, it is clipped by EdgeGrid's BoundingBox in cases
|
||||||
|
// when any of the endpoints of the line are outside the EdgeGrid's BoundingBox.
|
||||||
|
if (const BoundingBox &edge_grid_bbox = edge_grids[layer_idx].bbox(); !edge_grid_bbox.contains(line_to_test.a) || !edge_grid_bbox.contains(line_to_test.b)) {
|
||||||
|
// If the painted line (line_to_test) is entirely outside EdgeGrid's BoundingBox, skip this painted line.
|
||||||
|
if (!edge_grid_bbox.overlap(BoundingBox(Points{line_to_test.a, line_to_test.b})) ||
|
||||||
|
!line_to_test.clip_with_bbox(edge_grid_bbox))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
size_t mutex_idx = layer_idx & 0x3F;
|
size_t mutex_idx = layer_idx & 0x3F;
|
||||||
assert(mutex_idx < painted_lines_mutex.size());
|
assert(mutex_idx < painted_lines_mutex.size());
|
||||||
|
|
||||||
PaintedLineVisitor visitor(edge_grids[layer_idx], painted_lines[layer_idx], painted_lines_mutex[mutex_idx], 16);
|
PaintedLineVisitor visitor(edge_grids[layer_idx], painted_lines[layer_idx], painted_lines_mutex[mutex_idx], 16);
|
||||||
visitor.line_to_test.a = line_start;
|
visitor.line_to_test = line_to_test;
|
||||||
visitor.line_to_test.b = line_end;
|
visitor.color = int(extruder_idx);
|
||||||
visitor.color = int(extruder_idx);
|
edge_grids[layer_idx].visit_cells_intersecting_line(line_to_test.a, line_to_test.b, visitor);
|
||||||
edge_grids[layer_idx].visit_cells_intersecting_line(line_start, line_end, visitor);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}); // end of parallel_for
|
}); // end of parallel_for
|
||||||
|
@ -1248,6 +1248,13 @@ DynamicConfig PrintStatistics::config() const
|
|||||||
config.set_key_value("total_weight", new ConfigOptionFloat(this->total_weight));
|
config.set_key_value("total_weight", new ConfigOptionFloat(this->total_weight));
|
||||||
config.set_key_value("total_wipe_tower_cost", new ConfigOptionFloat(this->total_wipe_tower_cost));
|
config.set_key_value("total_wipe_tower_cost", new ConfigOptionFloat(this->total_wipe_tower_cost));
|
||||||
config.set_key_value("total_wipe_tower_filament", new ConfigOptionFloat(this->total_wipe_tower_filament));
|
config.set_key_value("total_wipe_tower_filament", new ConfigOptionFloat(this->total_wipe_tower_filament));
|
||||||
|
config.set_key_value("initial_tool", new ConfigOptionInt(int(this->initial_extruder_id)));
|
||||||
|
config.set_key_value("initial_extruder", new ConfigOptionInt(int(this->initial_extruder_id)));
|
||||||
|
config.set_key_value("initial_filament_type", new ConfigOptionString(this->initial_filament_type));
|
||||||
|
config.set_key_value("printing_filament_types", new ConfigOptionString(this->printing_filament_types));
|
||||||
|
config.set_key_value("num_printing_extruders", new ConfigOptionInt(int(this->printing_extruders.size())));
|
||||||
|
// config.set_key_value("printing_extruders", new ConfigOptionInts(std::vector<int>(this->printing_extruders.begin(), this->printing_extruders.end())));
|
||||||
|
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1257,7 +1264,8 @@ DynamicConfig PrintStatistics::placeholders()
|
|||||||
for (const std::string &key : {
|
for (const std::string &key : {
|
||||||
"print_time", "normal_print_time", "silent_print_time",
|
"print_time", "normal_print_time", "silent_print_time",
|
||||||
"used_filament", "extruded_volume", "total_cost", "total_weight",
|
"used_filament", "extruded_volume", "total_cost", "total_weight",
|
||||||
"total_toolchanges", "total_wipe_tower_cost", "total_wipe_tower_filament"})
|
"total_toolchanges", "total_wipe_tower_cost", "total_wipe_tower_filament",
|
||||||
|
"initial_tool", "initial_extruder", "initial_filament_type", "printing_filament_types", "num_printing_extruders" })
|
||||||
config.set_key_value(key, new ConfigOptionString(std::string("{") + key + "}"));
|
config.set_key_value(key, new ConfigOptionString(std::string("{") + key + "}"));
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@ -455,6 +455,10 @@ struct PrintStatistics
|
|||||||
double total_weight;
|
double total_weight;
|
||||||
double total_wipe_tower_cost;
|
double total_wipe_tower_cost;
|
||||||
double total_wipe_tower_filament;
|
double total_wipe_tower_filament;
|
||||||
|
std::vector<unsigned int> printing_extruders;
|
||||||
|
unsigned int initial_extruder_id;
|
||||||
|
std::string initial_filament_type;
|
||||||
|
std::string printing_filament_types;
|
||||||
std::map<size_t, double> filament_stats;
|
std::map<size_t, double> filament_stats;
|
||||||
|
|
||||||
// Config with the filled in print statistics.
|
// Config with the filled in print statistics.
|
||||||
@ -472,7 +476,11 @@ struct PrintStatistics
|
|||||||
total_weight = 0.;
|
total_weight = 0.;
|
||||||
total_wipe_tower_cost = 0.;
|
total_wipe_tower_cost = 0.;
|
||||||
total_wipe_tower_filament = 0.;
|
total_wipe_tower_filament = 0.;
|
||||||
|
initial_extruder_id = 0;
|
||||||
|
initial_filament_type.clear();
|
||||||
|
printing_filament_types.clear();
|
||||||
filament_stats.clear();
|
filament_stats.clear();
|
||||||
|
printing_extruders.clear();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1614,7 +1614,7 @@ void PrintConfigDef::init_fff_params()
|
|||||||
def->enum_labels.push_back(L("Use for time estimate"));
|
def->enum_labels.push_back(L("Use for time estimate"));
|
||||||
def->enum_labels.push_back(L("Ignore"));
|
def->enum_labels.push_back(L("Ignore"));
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionEnum<MachineLimitsUsage>(MachineLimitsUsage::EmitToGCode));
|
def->set_default_value(new ConfigOptionEnum<MachineLimitsUsage>(MachineLimitsUsage::TimeEstimateOnly));
|
||||||
|
|
||||||
{
|
{
|
||||||
struct AxisDefault {
|
struct AxisDefault {
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#include <libslic3r/SLA/RasterBase.hpp>
|
#include <libslic3r/SLA/RasterBase.hpp>
|
||||||
#include "libslic3r/ExPolygon.hpp"
|
#include "libslic3r/ExPolygon.hpp"
|
||||||
#include "libslic3r/MTUtils.hpp"
|
|
||||||
|
|
||||||
// For rasterizing
|
// For rasterizing
|
||||||
#include <agg/agg_basics.h>
|
#include <agg/agg_basics.h>
|
||||||
|
@ -47,7 +47,7 @@ inline indexed_triangle_set straight_walls(const Polygon &plate,
|
|||||||
double lo_z,
|
double lo_z,
|
||||||
double hi_z)
|
double hi_z)
|
||||||
{
|
{
|
||||||
return walls(plate, plate, lo_z, hi_z);
|
return wall_strip(plate, hi_z, lo_z); //walls(plate, plate, lo_z, hi_z);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function to cut tiny connector cavities for a given polygon. The input poly
|
// Function to cut tiny connector cavities for a given polygon. The input poly
|
||||||
|
@ -77,6 +77,8 @@ std::unique_ptr<RasterBase> create_raster_grayscale_aa(
|
|||||||
|
|
||||||
if (gamma > 0)
|
if (gamma > 0)
|
||||||
rst = std::make_unique<RasterGrayscaleAAGammaPower>(res, pxdim, tr, gamma);
|
rst = std::make_unique<RasterGrayscaleAAGammaPower>(res, pxdim, tr, gamma);
|
||||||
|
else if (std::abs(gamma - 1.) < 1e-6)
|
||||||
|
rst = std::make_unique<RasterGrayscaleAA>(res, pxdim, tr, agg::gamma_none());
|
||||||
else
|
else
|
||||||
rst = std::make_unique<RasterGrayscaleAA>(res, pxdim, tr, agg::gamma_threshold(.5));
|
rst = std::make_unique<RasterGrayscaleAA>(res, pxdim, tr, agg::gamma_threshold(.5));
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include <libslic3r/ExPolygon.hpp>
|
#include <libslic3r/ExPolygon.hpp>
|
||||||
#include <libslic3r/SLA/Concurrency.hpp>
|
//#include <libslic3r/SLA/Concurrency.hpp>
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
#include "MTUtils.hpp"
|
#include "MTUtils.hpp"
|
||||||
#include "Zipper.hpp"
|
#include "Zipper.hpp"
|
||||||
|
|
||||||
|
#include "libslic3r/Execution/ExecutionTBB.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
enum SLAPrintStep : unsigned int {
|
enum SLAPrintStep : unsigned int {
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "SlicesToTriangleMesh.hpp"
|
#include "SlicesToTriangleMesh.hpp"
|
||||||
|
|
||||||
//#include "libslic3r/MTUtils.hpp"
|
|
||||||
#include "libslic3r/Execution/ExecutionTBB.hpp"
|
#include "libslic3r/Execution/ExecutionTBB.hpp"
|
||||||
#include "libslic3r/ClipperUtils.hpp"
|
#include "libslic3r/ClipperUtils.hpp"
|
||||||
#include "libslic3r/Tesselate.hpp"
|
#include "libslic3r/Tesselate.hpp"
|
||||||
@ -12,39 +11,6 @@
|
|||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
inline indexed_triangle_set wall_strip(const Polygon &poly,
|
|
||||||
double lower_z_mm,
|
|
||||||
double upper_z_mm)
|
|
||||||
{
|
|
||||||
indexed_triangle_set ret;
|
|
||||||
|
|
||||||
size_t startidx = ret.vertices.size();
|
|
||||||
size_t offs = poly.points.size();
|
|
||||||
|
|
||||||
ret.vertices.reserve(ret.vertices.size() + 2 *offs);
|
|
||||||
|
|
||||||
// The expression unscaled(p).cast<float>().eval() is important here
|
|
||||||
// as it ensures identical conversion of 2D scaled coordinates to float 3D
|
|
||||||
// to that used by the tesselation. This way, the duplicated vertices in the
|
|
||||||
// output mesh can be found with the == operator of the points.
|
|
||||||
// its_merge_vertices will then reliably remove the duplicates.
|
|
||||||
for (const Point &p : poly.points)
|
|
||||||
ret.vertices.emplace_back(to_3d(unscaled(p).cast<float>().eval(), float(lower_z_mm)));
|
|
||||||
|
|
||||||
for (const Point &p : poly.points)
|
|
||||||
ret.vertices.emplace_back(to_3d(unscaled(p).cast<float>().eval(), float(upper_z_mm)));
|
|
||||||
|
|
||||||
for (size_t i = startidx + 1; i < startidx + offs; ++i) {
|
|
||||||
ret.indices.emplace_back(i - 1, i, i + offs - 1);
|
|
||||||
ret.indices.emplace_back(i, i + offs, i + offs - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret.indices.emplace_back(startidx + offs - 1, startidx, startidx + 2 * offs - 1);
|
|
||||||
ret.indices.emplace_back(startidx, startidx + offs, startidx + 2 * offs - 1);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Same as walls() but with identical higher and lower polygons.
|
// Same as walls() but with identical higher and lower polygons.
|
||||||
indexed_triangle_set inline straight_walls(const Polygon &plate,
|
indexed_triangle_set inline straight_walls(const Polygon &plate,
|
||||||
double lo_z,
|
double lo_z,
|
||||||
|
@ -36,41 +36,28 @@
|
|||||||
#define ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS 1
|
#define ENABLE_FIXED_SCREEN_SIZE_POINT_MARKERS 1
|
||||||
|
|
||||||
|
|
||||||
//====================
|
//================
|
||||||
// 2.4.0.beta1 techs
|
// 2.4.1.rc techs
|
||||||
//====================
|
//================
|
||||||
#define ENABLE_2_4_0_BETA1 1
|
#define ENABLE_2_4_1_RC 1
|
||||||
|
|
||||||
// Enable rendering modifiers and similar objects always as transparent
|
// Enable detection of layers for spiral vase prints
|
||||||
#define ENABLE_MODIFIERS_ALWAYS_TRANSPARENT (1 && ENABLE_2_4_0_BETA1)
|
#define ENABLE_SPIRAL_VASE_LAYERS (1 && ENABLE_2_4_1_RC)
|
||||||
|
|
||||||
|
|
||||||
//====================
|
//====================
|
||||||
// 2.4.0.beta2 techs
|
// 2.5.0.alpha1 techs
|
||||||
//====================
|
//====================
|
||||||
#define ENABLE_2_4_0_BETA2 1
|
#define ENABLE_2_5_0_ALPHA1 1
|
||||||
|
|
||||||
// Enable modified ImGuiWrapper::slider_float() to create a compound widget where
|
|
||||||
// an additional button can be used to set the keyboard focus into the slider
|
|
||||||
// to allow the user to type in the desired value
|
|
||||||
#define ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT (1 && ENABLE_2_4_0_BETA2)
|
|
||||||
// Enable fit print volume command for circular printbeds
|
|
||||||
#define ENABLE_ENHANCED_PRINT_VOLUME_FIT (1 && ENABLE_2_4_0_BETA2)
|
|
||||||
|
|
||||||
|
|
||||||
//=================
|
|
||||||
// 2.4.0.rc techs
|
|
||||||
//=================
|
|
||||||
#define ENABLE_2_4_0_RC 1
|
|
||||||
|
|
||||||
// Enable changes in preview layout
|
// Enable changes in preview layout
|
||||||
#define ENABLE_PREVIEW_LAYOUT (1 && ENABLE_2_4_0_RC)
|
#define ENABLE_PREVIEW_LAYOUT (1 && ENABLE_2_5_0_ALPHA1)
|
||||||
// Enable drawing the items in legend toolbar using icons
|
// Enable drawing the items in legend toolbar using icons
|
||||||
#define ENABLE_LEGEND_TOOLBAR_ICONS (1 && ENABLE_PREVIEW_LAYOUT)
|
#define ENABLE_LEGEND_TOOLBAR_ICONS (1 && ENABLE_PREVIEW_LAYOUT)
|
||||||
// Enable coloring of toolpaths in preview by layer time
|
// Enable coloring of toolpaths in preview by layer time
|
||||||
#define ENABLE_PREVIEW_LAYER_TIME (1 && ENABLE_2_4_0_RC)
|
#define ENABLE_PREVIEW_LAYER_TIME (1 && ENABLE_2_5_0_ALPHA1)
|
||||||
// Enable showing time estimate for travel moves in legend
|
// Enable showing time estimate for travel moves in legend
|
||||||
#define ENABLE_TRAVEL_TIME (1 && ENABLE_2_4_0_RC)
|
#define ENABLE_TRAVEL_TIME (1 && ENABLE_2_5_0_ALPHA1)
|
||||||
|
|
||||||
|
|
||||||
#endif // _prusaslicer_technologies_h_
|
#endif // _prusaslicer_technologies_h_
|
||||||
|
@ -245,4 +245,35 @@ std::vector<Vec2f> triangulate_expolygons_2f(const ExPolygons &polys, bool flip)
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
indexed_triangle_set wall_strip(const Polygon &poly, double lower_z_mm, double upper_z_mm)
|
||||||
|
{
|
||||||
|
indexed_triangle_set ret;
|
||||||
|
|
||||||
|
size_t startidx = ret.vertices.size();
|
||||||
|
size_t offs = poly.points.size();
|
||||||
|
|
||||||
|
ret.vertices.reserve(ret.vertices.size() + 2 *offs);
|
||||||
|
|
||||||
|
// The expression unscaled(p).cast<float>().eval() is important here
|
||||||
|
// as it ensures identical conversion of 2D scaled coordinates to float 3D
|
||||||
|
// to that used by the tesselation. This way, the duplicated vertices in the
|
||||||
|
// output mesh can be found with the == operator of the points.
|
||||||
|
// its_merge_vertices will then reliably remove the duplicates.
|
||||||
|
for (const Point &p : poly.points)
|
||||||
|
ret.vertices.emplace_back(to_3d(unscaled(p).cast<float>().eval(), float(lower_z_mm)));
|
||||||
|
|
||||||
|
for (const Point &p : poly.points)
|
||||||
|
ret.vertices.emplace_back(to_3d(unscaled(p).cast<float>().eval(), float(upper_z_mm)));
|
||||||
|
|
||||||
|
for (size_t i = startidx + 1; i < startidx + offs; ++i) {
|
||||||
|
ret.indices.emplace_back(i - 1, i, i + offs - 1);
|
||||||
|
ret.indices.emplace_back(i, i + offs, i + offs - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
ret.indices.emplace_back(startidx + offs - 1, startidx, startidx + 2 * offs - 1);
|
||||||
|
ret.indices.emplace_back(startidx, startidx + offs, startidx + 2 * offs - 1);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace Slic3r
|
} // namespace Slic3r
|
||||||
|
@ -2,14 +2,12 @@
|
|||||||
#define slic3r_Tesselate_hpp_
|
#define slic3r_Tesselate_hpp_
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <admesh/stl.h>
|
||||||
|
|
||||||
#include "Point.hpp"
|
#include "ExPolygon.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
class ExPolygon;
|
|
||||||
typedef std::vector<ExPolygon> ExPolygons;
|
|
||||||
|
|
||||||
const bool constexpr NORMALS_UP = false;
|
const bool constexpr NORMALS_UP = false;
|
||||||
const bool constexpr NORMALS_DOWN = true;
|
const bool constexpr NORMALS_DOWN = true;
|
||||||
|
|
||||||
@ -20,6 +18,10 @@ extern std::vector<Vec2d> triangulate_expolygons_2d(const ExPolygons &polys, boo
|
|||||||
extern std::vector<Vec2f> triangulate_expolygon_2f (const ExPolygon &poly, bool flip = NORMALS_UP);
|
extern std::vector<Vec2f> triangulate_expolygon_2f (const ExPolygon &poly, bool flip = NORMALS_UP);
|
||||||
extern std::vector<Vec2f> triangulate_expolygons_2f(const ExPolygons &polys, bool flip = NORMALS_UP);
|
extern std::vector<Vec2f> triangulate_expolygons_2f(const ExPolygons &polys, bool flip = NORMALS_UP);
|
||||||
|
|
||||||
|
indexed_triangle_set wall_strip(const Polygon &poly,
|
||||||
|
double lower_z_mm,
|
||||||
|
double upper_z_mm);
|
||||||
|
|
||||||
} // namespace Slic3r
|
} // namespace Slic3r
|
||||||
|
|
||||||
#endif /* slic3r_Tesselate_hpp_ */
|
#endif /* slic3r_Tesselate_hpp_ */
|
||||||
|
@ -75,6 +75,10 @@ extern local_encoded_string encode_path(const char *src);
|
|||||||
extern std::string decode_path(const char *src);
|
extern std::string decode_path(const char *src);
|
||||||
extern std::string normalize_utf8_nfc(const char *src);
|
extern std::string normalize_utf8_nfc(const char *src);
|
||||||
|
|
||||||
|
// Returns next utf8 sequence length. =number of bytes in string, that creates together one utf-8 character.
|
||||||
|
// Starting at pos. ASCII characters returns 1. Works also if pos is in the middle of the sequence.
|
||||||
|
extern size_t get_utf8_sequence_length(const std::string& text, size_t pos = 0);
|
||||||
|
|
||||||
// Safely rename a file even if the target exists.
|
// Safely rename a file even if the target exists.
|
||||||
// On Windows, the file explorer (or anti-virus or whatever else) often locks the file
|
// On Windows, the file explorer (or anti-virus or whatever else) often locks the file
|
||||||
// for a short while, so the file may not be movable. Retry while we see recoverable errors.
|
// for a short while, so the file may not be movable. Retry while we see recoverable errors.
|
||||||
|
@ -863,6 +863,71 @@ std::string normalize_utf8_nfc(const char *src)
|
|||||||
return boost::locale::normalize(src, boost::locale::norm_nfc, locale_utf8);
|
return boost::locale::normalize(src, boost::locale::norm_nfc, locale_utf8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t get_utf8_sequence_length(const std::string& text, size_t pos)
|
||||||
|
{
|
||||||
|
assert(pos < text.size());
|
||||||
|
size_t length = 0;
|
||||||
|
unsigned char c = text[pos];
|
||||||
|
if (c < 0x80) { // 0x00-0x7F
|
||||||
|
// is ASCII letter
|
||||||
|
length++;
|
||||||
|
}
|
||||||
|
// Bytes 0x80 to 0xBD are trailer bytes in a multibyte sequence.
|
||||||
|
// pos is in the middle of a utf-8 sequence. Add the utf-8 trailer bytes.
|
||||||
|
else if (c < 0xC0) { // 0x80-0xBF
|
||||||
|
length++;
|
||||||
|
while (pos + length < text.size()) {
|
||||||
|
c = text[pos + length];
|
||||||
|
if (c < 0x80 || c >= 0xC0) {
|
||||||
|
break; // prevent overrun
|
||||||
|
}
|
||||||
|
length++; // add a utf-8 trailer byte
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Bytes 0xC0 to 0xFD are header bytes in a multibyte sequence.
|
||||||
|
// The number of one bits above the topmost zero bit indicates the number of bytes (including this one) in the whole sequence.
|
||||||
|
else if (c < 0xE0) { // 0xC0-0xDF
|
||||||
|
// add a utf-8 sequence (2 bytes)
|
||||||
|
if (pos + 2 > text.size()) {
|
||||||
|
return text.size() - pos; // prevent overrun
|
||||||
|
}
|
||||||
|
length += 2;
|
||||||
|
}
|
||||||
|
else if (c < 0xF0) { // 0xE0-0xEF
|
||||||
|
// add a utf-8 sequence (3 bytes)
|
||||||
|
if (pos + 3 > text.size()) {
|
||||||
|
return text.size() - pos; // prevent overrun
|
||||||
|
}
|
||||||
|
length += 3;
|
||||||
|
}
|
||||||
|
else if (c < 0xF8) { // 0xF0-0xF7
|
||||||
|
// add a utf-8 sequence (4 bytes)
|
||||||
|
if (pos + 4 > text.size()) {
|
||||||
|
return text.size() - pos; // prevent overrun
|
||||||
|
}
|
||||||
|
length += 4;
|
||||||
|
}
|
||||||
|
else if (c < 0xFC) { // 0xF8-0xFB
|
||||||
|
// add a utf-8 sequence (5 bytes)
|
||||||
|
if (pos + 5 > text.size()) {
|
||||||
|
return text.size() - pos; // prevent overrun
|
||||||
|
}
|
||||||
|
length += 5;
|
||||||
|
}
|
||||||
|
else if (c < 0xFE) { // 0xFC-0xFD
|
||||||
|
// add a utf-8 sequence (6 bytes)
|
||||||
|
if (pos + 6 > text.size()) {
|
||||||
|
return text.size() - pos; // prevent overrun
|
||||||
|
}
|
||||||
|
length += 6;
|
||||||
|
}
|
||||||
|
else { // 0xFE-0xFF
|
||||||
|
// not a utf-8 sequence
|
||||||
|
length++;
|
||||||
|
}
|
||||||
|
return length;
|
||||||
|
}
|
||||||
|
|
||||||
namespace PerlUtils {
|
namespace PerlUtils {
|
||||||
// Get a file name including the extension.
|
// Get a file name including the extension.
|
||||||
std::string path_to_filename(const char *src) { return boost::filesystem::path(src).filename().string(); }
|
std::string path_to_filename(const char *src) { return boost::filesystem::path(src).filename().string(); }
|
||||||
|
@ -169,9 +169,11 @@ set(SLIC3R_GUI_SOURCES
|
|||||||
GUI/PrintHostDialogs.cpp
|
GUI/PrintHostDialogs.cpp
|
||||||
GUI/PrintHostDialogs.hpp
|
GUI/PrintHostDialogs.hpp
|
||||||
GUI/Jobs/Job.hpp
|
GUI/Jobs/Job.hpp
|
||||||
GUI/Jobs/Job.cpp
|
GUI/Jobs/Worker.hpp
|
||||||
GUI/Jobs/PlaterJob.hpp
|
GUI/Jobs/BoostThreadWorker.hpp
|
||||||
GUI/Jobs/PlaterJob.cpp
|
GUI/Jobs/BoostThreadWorker.cpp
|
||||||
|
GUI/Jobs/BusyCursorJob.hpp
|
||||||
|
GUI/Jobs/PlaterWorker.hpp
|
||||||
GUI/Jobs/ArrangeJob.hpp
|
GUI/Jobs/ArrangeJob.hpp
|
||||||
GUI/Jobs/ArrangeJob.cpp
|
GUI/Jobs/ArrangeJob.cpp
|
||||||
GUI/Jobs/RotoptimizeJob.hpp
|
GUI/Jobs/RotoptimizeJob.hpp
|
||||||
@ -183,6 +185,8 @@ set(SLIC3R_GUI_SOURCES
|
|||||||
GUI/Jobs/ProgressIndicator.hpp
|
GUI/Jobs/ProgressIndicator.hpp
|
||||||
GUI/Jobs/NotificationProgressIndicator.hpp
|
GUI/Jobs/NotificationProgressIndicator.hpp
|
||||||
GUI/Jobs/NotificationProgressIndicator.cpp
|
GUI/Jobs/NotificationProgressIndicator.cpp
|
||||||
|
GUI/Jobs/ThreadSafeQueue.hpp
|
||||||
|
GUI/Jobs/SLAImportDialog.hpp
|
||||||
GUI/ProgressStatusBar.hpp
|
GUI/ProgressStatusBar.hpp
|
||||||
GUI/ProgressStatusBar.cpp
|
GUI/ProgressStatusBar.cpp
|
||||||
GUI/Mouse3DController.cpp
|
GUI/Mouse3DController.cpp
|
||||||
|
@ -19,8 +19,10 @@
|
|||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
|
|
||||||
static const float GROUND_Z = -0.02f;
|
static const float GROUND_Z = -0.02f;
|
||||||
static const std::array<float, 4> DEFAULT_MODEL_COLOR = { 0.235f, 0.235f, 0.235f, 1.0f };
|
static const Slic3r::ColorRGBA DEFAULT_MODEL_COLOR = Slic3r::ColorRGBA::DARK_GRAY();
|
||||||
static const std::array<float, 4> PICKING_MODEL_COLOR = { 0.0f, 0.0f, 0.0f, 1.0f };
|
static const Slic3r::ColorRGBA PICKING_MODEL_COLOR = Slic3r::ColorRGBA::BLACK();
|
||||||
|
static const Slic3r::ColorRGBA DEFAULT_SOLID_GRID_COLOR = { 0.9f, 0.9f, 0.9f, 1.0f };
|
||||||
|
static const Slic3r::ColorRGBA DEFAULT_TRANSPARENT_GRID_COLOR = { 0.9f, 0.9f, 0.9f, 0.6f };
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
@ -121,15 +123,15 @@ void Bed3D::Axes::render() const
|
|||||||
shader->set_uniform("emission_factor", 0.0f);
|
shader->set_uniform("emission_factor", 0.0f);
|
||||||
|
|
||||||
// x axis
|
// x axis
|
||||||
const_cast<GLModel*>(&m_arrow)->set_color(-1, { 0.75f, 0.0f, 0.0f, 1.0f });
|
const_cast<GLModel*>(&m_arrow)->set_color(-1, ColorRGBA::X());
|
||||||
render_axis(Geometry::assemble_transform(m_origin, { 0.0, 0.5 * M_PI, 0.0 }).cast<float>());
|
render_axis(Geometry::assemble_transform(m_origin, { 0.0, 0.5 * M_PI, 0.0 }).cast<float>());
|
||||||
|
|
||||||
// y axis
|
// y axis
|
||||||
const_cast<GLModel*>(&m_arrow)->set_color(-1, { 0.0f, 0.75f, 0.0f, 1.0f });
|
const_cast<GLModel*>(&m_arrow)->set_color(-1, ColorRGBA::Y());
|
||||||
render_axis(Geometry::assemble_transform(m_origin, { -0.5 * M_PI, 0.0, 0.0 }).cast<float>());
|
render_axis(Geometry::assemble_transform(m_origin, { -0.5 * M_PI, 0.0, 0.0 }).cast<float>());
|
||||||
|
|
||||||
// z axis
|
// z axis
|
||||||
const_cast<GLModel*>(&m_arrow)->set_color(-1, { 0.0f, 0.0f, 0.75f, 1.0f });
|
const_cast<GLModel*>(&m_arrow)->set_color(-1, ColorRGBA::Z());
|
||||||
render_axis(Geometry::assemble_transform(m_origin).cast<float>());
|
render_axis(Geometry::assemble_transform(m_origin).cast<float>());
|
||||||
|
|
||||||
shader->stop_using();
|
shader->stop_using();
|
||||||
@ -550,10 +552,7 @@ void Bed3D::render_default(bool bottom, bool picking) const
|
|||||||
if (!picking) {
|
if (!picking) {
|
||||||
// draw grid
|
// draw grid
|
||||||
glsafe(::glLineWidth(1.5f * m_scale_factor));
|
glsafe(::glLineWidth(1.5f * m_scale_factor));
|
||||||
if (has_model && !bottom)
|
glsafe(::glColor4fv(has_model && !bottom ? DEFAULT_SOLID_GRID_COLOR.data() : DEFAULT_TRANSPARENT_GRID_COLOR.data()));
|
||||||
glsafe(::glColor4f(0.9f, 0.9f, 0.9f, 1.0f));
|
|
||||||
else
|
|
||||||
glsafe(::glColor4f(0.9f, 0.9f, 0.9f, 0.6f));
|
|
||||||
glsafe(::glVertexPointer(3, GL_FLOAT, m_triangles.get_vertex_data_size(), (GLvoid*)m_gridlines.get_vertices_data()));
|
glsafe(::glVertexPointer(3, GL_FLOAT, m_triangles.get_vertex_data_size(), (GLvoid*)m_gridlines.get_vertices_data()));
|
||||||
glsafe(::glDrawArrays(GL_LINES, 0, (GLsizei)m_gridlines.get_vertices_count()));
|
glsafe(::glDrawArrays(GL_LINES, 0, (GLsizei)m_gridlines.get_vertices_count()));
|
||||||
}
|
}
|
||||||
|
@ -344,20 +344,20 @@ void GLVolume::SinkingContours::update()
|
|||||||
m_model.reset();
|
m_model.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::array<float, 4> GLVolume::SELECTED_COLOR = { 0.0f, 1.0f, 0.0f, 1.0f };
|
const ColorRGBA GLVolume::SELECTED_COLOR = ColorRGBA::GREEN();
|
||||||
const std::array<float, 4> GLVolume::HOVER_SELECT_COLOR = { 0.4f, 0.9f, 0.1f, 1.0f };
|
const ColorRGBA GLVolume::HOVER_SELECT_COLOR = { 0.4f, 0.9f, 0.1f, 1.0f };
|
||||||
const std::array<float, 4> GLVolume::HOVER_DESELECT_COLOR = { 1.0f, 0.75f, 0.75f, 1.0f };
|
const ColorRGBA GLVolume::HOVER_DESELECT_COLOR = { 1.0f, 0.75f, 0.75f, 1.0f };
|
||||||
const std::array<float, 4> GLVolume::OUTSIDE_COLOR = { 0.0f, 0.38f, 0.8f, 1.0f };
|
const ColorRGBA GLVolume::OUTSIDE_COLOR = { 0.0f, 0.38f, 0.8f, 1.0f };
|
||||||
const std::array<float, 4> GLVolume::SELECTED_OUTSIDE_COLOR = { 0.19f, 0.58f, 1.0f, 1.0f };
|
const ColorRGBA GLVolume::SELECTED_OUTSIDE_COLOR = { 0.19f, 0.58f, 1.0f, 1.0f };
|
||||||
const std::array<float, 4> GLVolume::DISABLED_COLOR = { 0.25f, 0.25f, 0.25f, 1.0f };
|
const ColorRGBA GLVolume::DISABLED_COLOR = ColorRGBA::DARK_GRAY();
|
||||||
const std::array<float, 4> GLVolume::SLA_SUPPORT_COLOR = { 0.75f, 0.75f, 0.75f, 1.0f };
|
const ColorRGBA GLVolume::SLA_SUPPORT_COLOR = ColorRGBA::LIGHT_GRAY();
|
||||||
const std::array<float, 4> GLVolume::SLA_PAD_COLOR = { 0.0f, 0.2f, 0.0f, 1.0f };
|
const ColorRGBA GLVolume::SLA_PAD_COLOR = { 0.0f, 0.2f, 0.0f, 1.0f };
|
||||||
const std::array<float, 4> GLVolume::NEUTRAL_COLOR = { 0.9f, 0.9f, 0.9f, 1.0f };
|
const ColorRGBA GLVolume::NEUTRAL_COLOR = { 0.9f, 0.9f, 0.9f, 1.0f };
|
||||||
const std::array<std::array<float, 4>, 4> GLVolume::MODEL_COLOR = { {
|
const std::array<ColorRGBA, 4> GLVolume::MODEL_COLOR = { {
|
||||||
{ 1.0f, 1.0f, 0.0f, 1.f },
|
ColorRGBA::YELLOW(),
|
||||||
{ 1.0f, 0.5f, 0.5f, 1.f },
|
{ 1.0f, 0.5f, 0.5f, 1.0f },
|
||||||
{ 0.5f, 1.0f, 0.5f, 1.f },
|
{ 0.5f, 1.0f, 0.5f, 1.0f },
|
||||||
{ 0.5f, 0.5f, 1.0f, 1.f }
|
{ 0.5f, 0.5f, 1.0f, 1.0f }
|
||||||
} };
|
} };
|
||||||
|
|
||||||
GLVolume::GLVolume(float r, float g, float b, float a)
|
GLVolume::GLVolume(float r, float g, float b, float a)
|
||||||
@ -388,21 +388,6 @@ GLVolume::GLVolume(float r, float g, float b, float a)
|
|||||||
set_render_color(color);
|
set_render_color(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLVolume::set_color(const std::array<float, 4>& rgba)
|
|
||||||
{
|
|
||||||
color = rgba;
|
|
||||||
}
|
|
||||||
|
|
||||||
void GLVolume::set_render_color(float r, float g, float b, float a)
|
|
||||||
{
|
|
||||||
render_color = { r, g, b, a };
|
|
||||||
}
|
|
||||||
|
|
||||||
void GLVolume::set_render_color(const std::array<float, 4>& rgba)
|
|
||||||
{
|
|
||||||
render_color = rgba;
|
|
||||||
}
|
|
||||||
|
|
||||||
void GLVolume::set_render_color()
|
void GLVolume::set_render_color()
|
||||||
{
|
{
|
||||||
bool outside = is_outside || is_below_printbed();
|
bool outside = is_outside || is_below_printbed();
|
||||||
@ -432,46 +417,28 @@ void GLVolume::set_render_color()
|
|||||||
set_render_color(color);
|
set_render_color(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!printable) {
|
if (!printable)
|
||||||
render_color[0] /= 4;
|
render_color = saturate(render_color, 0.25f);
|
||||||
render_color[1] /= 4;
|
|
||||||
render_color[2] /= 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (force_transparent)
|
if (force_transparent)
|
||||||
render_color[3] = color[3];
|
render_color.a(color.a());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::array<float, 4> color_from_model_volume(const ModelVolume& model_volume)
|
ColorRGBA color_from_model_volume(const ModelVolume& model_volume)
|
||||||
{
|
{
|
||||||
std::array<float, 4> color;
|
ColorRGBA color;
|
||||||
if (model_volume.is_negative_volume()) {
|
if (model_volume.is_negative_volume())
|
||||||
color[0] = 0.2f;
|
color = { 0.2f, 0.2f, 0.2f, 1.0f };
|
||||||
color[1] = 0.2f;
|
else if (model_volume.is_modifier())
|
||||||
color[2] = 0.2f;
|
color = { 1.0, 1.0f, 0.2f, 1.0f };
|
||||||
}
|
else if (model_volume.is_support_blocker())
|
||||||
else if (model_volume.is_modifier()) {
|
color = { 1.0f, 0.2f, 0.2f, 1.0f };
|
||||||
#if ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
else if (model_volume.is_support_enforcer())
|
||||||
color[0] = 1.0f;
|
color = { 0.2f, 0.2f, 1.0f, 1.0f };
|
||||||
color[1] = 1.0f;
|
|
||||||
color[2] = 0.2f;
|
if (!model_volume.is_model_part())
|
||||||
#else
|
color.a(0.5f);
|
||||||
color[0] = 0.2f;
|
|
||||||
color[1] = 1.0f;
|
|
||||||
color[2] = 0.2f;
|
|
||||||
#endif // ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
|
||||||
}
|
|
||||||
else if (model_volume.is_support_blocker()) {
|
|
||||||
color[0] = 1.0f;
|
|
||||||
color[1] = 0.2f;
|
|
||||||
color[2] = 0.2f;
|
|
||||||
}
|
|
||||||
else if (model_volume.is_support_enforcer()) {
|
|
||||||
color[0] = 0.2f;
|
|
||||||
color[1] = 0.2f;
|
|
||||||
color[2] = 1.0f;
|
|
||||||
}
|
|
||||||
color[3] = model_volume.is_model_part() ? 1.f : 0.5f;
|
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -631,8 +598,8 @@ int GLVolumeCollection::load_object_volume(
|
|||||||
const int extruder_id = model_volume->extruder_id();
|
const int extruder_id = model_volume->extruder_id();
|
||||||
const ModelInstance *instance = model_object->instances[instance_idx];
|
const ModelInstance *instance = model_object->instances[instance_idx];
|
||||||
const TriangleMesh &mesh = model_volume->mesh();
|
const TriangleMesh &mesh = model_volume->mesh();
|
||||||
std::array<float, 4> color = GLVolume::MODEL_COLOR[((color_by == "volume") ? volume_idx : obj_idx) % 4];
|
ColorRGBA color = GLVolume::MODEL_COLOR[((color_by == "volume") ? volume_idx : obj_idx) % 4];
|
||||||
color[3] = model_volume->is_model_part() ? 1.f : 0.5f;
|
color.a(model_volume->is_model_part() ? 1.0f : 0.5f);
|
||||||
this->volumes.emplace_back(new GLVolume(color));
|
this->volumes.emplace_back(new GLVolume(color));
|
||||||
GLVolume& v = *this->volumes.back();
|
GLVolume& v = *this->volumes.back();
|
||||||
v.set_color(color_from_model_volume(*model_volume));
|
v.set_color(color_from_model_volume(*model_volume));
|
||||||
@ -713,13 +680,13 @@ int GLVolumeCollection::load_wipe_tower_preview(
|
|||||||
height = 0.1f;
|
height = 0.1f;
|
||||||
|
|
||||||
TriangleMesh mesh;
|
TriangleMesh mesh;
|
||||||
std::array<float, 4> color = { 0.5f, 0.5f, 0.0f, 1.0f };
|
ColorRGBA color = ColorRGBA::DARK_YELLOW();
|
||||||
|
|
||||||
// In case we don't know precise dimensions of the wipe tower yet, we'll draw
|
// In case we don't know precise dimensions of the wipe tower yet, we'll draw
|
||||||
// the box with different color with one side jagged:
|
// the box with different color with one side jagged:
|
||||||
if (size_unknown) {
|
if (size_unknown) {
|
||||||
color[0] = 0.9f;
|
color.r(0.9f);
|
||||||
color[1] = 0.6f;
|
color.g(0.6f);
|
||||||
|
|
||||||
// Too narrow tower would interfere with the teeth. The estimate is not precise anyway.
|
// Too narrow tower would interfere with the teeth. The estimate is not precise anyway.
|
||||||
depth = std::max(depth, 10.f);
|
depth = std::max(depth, 10.f);
|
||||||
@ -775,14 +742,14 @@ int GLVolumeCollection::load_wipe_tower_preview(
|
|||||||
return int(volumes.size() - 1);
|
return int(volumes.size() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLVolume* GLVolumeCollection::new_toolpath_volume(const std::array<float, 4>& rgba, size_t reserve_vbo_floats)
|
GLVolume* GLVolumeCollection::new_toolpath_volume(const ColorRGBA& rgba, size_t reserve_vbo_floats)
|
||||||
{
|
{
|
||||||
GLVolume *out = new_nontoolpath_volume(rgba, reserve_vbo_floats);
|
GLVolume *out = new_nontoolpath_volume(rgba, reserve_vbo_floats);
|
||||||
out->is_extrusion_path = true;
|
out->is_extrusion_path = true;
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLVolume* GLVolumeCollection::new_nontoolpath_volume(const std::array<float, 4>& rgba, size_t reserve_vbo_floats)
|
GLVolume* GLVolumeCollection::new_nontoolpath_volume(const ColorRGBA& rgba, size_t reserve_vbo_floats)
|
||||||
{
|
{
|
||||||
GLVolume *out = new GLVolume(rgba);
|
GLVolume *out = new GLVolume(rgba);
|
||||||
out->is_extrusion_path = false;
|
out->is_extrusion_path = false;
|
||||||
@ -799,7 +766,7 @@ GLVolumeWithIdAndZList volumes_to_render(const GLVolumePtrs& volumes, GLVolumeCo
|
|||||||
|
|
||||||
for (unsigned int i = 0; i < (unsigned int)volumes.size(); ++i) {
|
for (unsigned int i = 0; i < (unsigned int)volumes.size(); ++i) {
|
||||||
GLVolume* volume = volumes[i];
|
GLVolume* volume = volumes[i];
|
||||||
bool is_transparent = (volume->render_color[3] < 1.0f);
|
bool is_transparent = volume->render_color.is_transparent();
|
||||||
if (((type == GLVolumeCollection::ERenderType::Opaque && !is_transparent) ||
|
if (((type == GLVolumeCollection::ERenderType::Opaque && !is_transparent) ||
|
||||||
(type == GLVolumeCollection::ERenderType::Transparent && is_transparent) ||
|
(type == GLVolumeCollection::ERenderType::Transparent && is_transparent) ||
|
||||||
type == GLVolumeCollection::ERenderType::All) &&
|
type == GLVolumeCollection::ERenderType::All) &&
|
||||||
@ -845,15 +812,11 @@ void GLVolumeCollection::render(GLVolumeCollection::ERenderType type, bool disab
|
|||||||
glsafe(::glDisable(GL_CULL_FACE));
|
glsafe(::glDisable(GL_CULL_FACE));
|
||||||
|
|
||||||
for (GLVolumeWithIdAndZ& volume : to_render) {
|
for (GLVolumeWithIdAndZ& volume : to_render) {
|
||||||
#if ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
|
||||||
if (type == ERenderType::Transparent)
|
if (type == ERenderType::Transparent)
|
||||||
volume.first->force_transparent = true;
|
volume.first->force_transparent = true;
|
||||||
#endif // ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
|
||||||
volume.first->set_render_color();
|
volume.first->set_render_color();
|
||||||
#if ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
|
||||||
if (type == ERenderType::Transparent)
|
if (type == ERenderType::Transparent)
|
||||||
volume.first->force_transparent = false;
|
volume.first->force_transparent = false;
|
||||||
#endif // ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
|
||||||
|
|
||||||
// render sinking contours of non-hovered volumes
|
// render sinking contours of non-hovered volumes
|
||||||
if (m_show_sinking_contours)
|
if (m_show_sinking_contours)
|
||||||
@ -982,8 +945,7 @@ bool GLVolumeCollection::check_outside_state(const BuildVolume &build_volume, Mo
|
|||||||
|
|
||||||
void GLVolumeCollection::reset_outside_state()
|
void GLVolumeCollection::reset_outside_state()
|
||||||
{
|
{
|
||||||
for (GLVolume* volume : this->volumes)
|
for (GLVolume* volume : this->volumes) {
|
||||||
{
|
|
||||||
if (volume != nullptr)
|
if (volume != nullptr)
|
||||||
volume->is_outside = false;
|
volume->is_outside = false;
|
||||||
}
|
}
|
||||||
@ -991,46 +953,18 @@ void GLVolumeCollection::reset_outside_state()
|
|||||||
|
|
||||||
void GLVolumeCollection::update_colors_by_extruder(const DynamicPrintConfig* config)
|
void GLVolumeCollection::update_colors_by_extruder(const DynamicPrintConfig* config)
|
||||||
{
|
{
|
||||||
static const float inv_255 = 1.0f / 255.0f;
|
using ColorItem = std::pair<std::string, ColorRGBA>;
|
||||||
|
std::vector<ColorItem> colors;
|
||||||
|
|
||||||
struct Color
|
if (static_cast<PrinterTechnology>(config->opt_int("printer_technology")) == ptSLA) {
|
||||||
{
|
|
||||||
std::string text;
|
|
||||||
unsigned char rgb[3];
|
|
||||||
|
|
||||||
Color()
|
|
||||||
: text("")
|
|
||||||
{
|
|
||||||
rgb[0] = 255;
|
|
||||||
rgb[1] = 255;
|
|
||||||
rgb[2] = 255;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set(const std::string& text, unsigned char* rgb)
|
|
||||||
{
|
|
||||||
this->text = text;
|
|
||||||
::memcpy((void*)this->rgb, (const void*)rgb, 3 * sizeof(unsigned char));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if (config == nullptr)
|
|
||||||
return;
|
|
||||||
|
|
||||||
unsigned char rgb[3];
|
|
||||||
std::vector<Color> colors;
|
|
||||||
|
|
||||||
if (static_cast<PrinterTechnology>(config->opt_int("printer_technology")) == ptSLA)
|
|
||||||
{
|
|
||||||
const std::string& txt_color = config->opt_string("material_colour").empty() ?
|
const std::string& txt_color = config->opt_string("material_colour").empty() ?
|
||||||
print_config_def.get("material_colour")->get_default_value<ConfigOptionString>()->value :
|
print_config_def.get("material_colour")->get_default_value<ConfigOptionString>()->value :
|
||||||
config->opt_string("material_colour");
|
config->opt_string("material_colour");
|
||||||
if (Slic3r::GUI::BitmapCache::parse_color(txt_color, rgb)) {
|
ColorRGBA rgba;
|
||||||
colors.resize(1);
|
if (decode_color(txt_color, rgba))
|
||||||
colors[0].set(txt_color, rgb);
|
colors.push_back({ txt_color, rgba });
|
||||||
}
|
}
|
||||||
}
|
else {
|
||||||
else
|
|
||||||
{
|
|
||||||
const ConfigOptionStrings* extruders_opt = dynamic_cast<const ConfigOptionStrings*>(config->option("extruder_colour"));
|
const ConfigOptionStrings* extruders_opt = dynamic_cast<const ConfigOptionStrings*>(config->option("extruder_colour"));
|
||||||
if (extruders_opt == nullptr)
|
if (extruders_opt == nullptr)
|
||||||
return;
|
return;
|
||||||
@ -1039,37 +973,35 @@ void GLVolumeCollection::update_colors_by_extruder(const DynamicPrintConfig* con
|
|||||||
if (filamemts_opt == nullptr)
|
if (filamemts_opt == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
unsigned int colors_count = std::max((unsigned int)extruders_opt->values.size(), (unsigned int)filamemts_opt->values.size());
|
size_t colors_count = std::max(extruders_opt->values.size(), filamemts_opt->values.size());
|
||||||
if (colors_count == 0)
|
if (colors_count == 0)
|
||||||
return;
|
return;
|
||||||
colors.resize(colors_count);
|
colors.resize(colors_count);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < colors_count; ++i) {
|
for (unsigned int i = 0; i < colors_count; ++i) {
|
||||||
const std::string& txt_color = config->opt_string("extruder_colour", i);
|
const std::string& ext_color = config->opt_string("extruder_colour", i);
|
||||||
if (Slic3r::GUI::BitmapCache::parse_color(txt_color, rgb))
|
ColorRGBA rgba;
|
||||||
colors[i].set(txt_color, rgb);
|
if (decode_color(ext_color, rgba))
|
||||||
|
colors[i] = { ext_color, rgba };
|
||||||
else {
|
else {
|
||||||
const std::string& txt_color = config->opt_string("filament_colour", i);
|
const std::string& fil_color = config->opt_string("filament_colour", i);
|
||||||
if (Slic3r::GUI::BitmapCache::parse_color(txt_color, rgb))
|
if (decode_color(fil_color, rgba))
|
||||||
colors[i].set(txt_color, rgb);
|
colors[i] = { fil_color, rgba };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (GLVolume* volume : volumes) {
|
for (GLVolume* volume : volumes) {
|
||||||
if (volume == nullptr || volume->is_modifier || volume->is_wipe_tower || (volume->volume_idx() < 0))
|
if (volume == nullptr || volume->is_modifier || volume->is_wipe_tower || volume->volume_idx() < 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
int extruder_id = volume->extruder_id - 1;
|
int extruder_id = volume->extruder_id - 1;
|
||||||
if (extruder_id < 0 || (int)colors.size() <= extruder_id)
|
if (extruder_id < 0 || (int)colors.size() <= extruder_id)
|
||||||
extruder_id = 0;
|
extruder_id = 0;
|
||||||
|
|
||||||
const Color& color = colors[extruder_id];
|
const ColorItem& color = colors[extruder_id];
|
||||||
if (!color.text.empty()) {
|
if (!color.first.empty())
|
||||||
for (int i = 0; i < 3; ++i) {
|
volume->color = color.second;
|
||||||
volume->color[i] = (float)color.rgb[i] * inv_255;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "libslic3r/TriangleMesh.hpp"
|
#include "libslic3r/TriangleMesh.hpp"
|
||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "libslic3r/Geometry.hpp"
|
#include "libslic3r/Geometry.hpp"
|
||||||
|
#include "libslic3r/Color.hpp"
|
||||||
|
|
||||||
#include "GLModel.hpp"
|
#include "GLModel.hpp"
|
||||||
|
|
||||||
@ -43,7 +44,7 @@ class ModelVolume;
|
|||||||
enum ModelInstanceEPrintVolumeState : unsigned char;
|
enum ModelInstanceEPrintVolumeState : unsigned char;
|
||||||
|
|
||||||
// Return appropriate color based on the ModelVolume.
|
// Return appropriate color based on the ModelVolume.
|
||||||
std::array<float, 4> color_from_model_volume(const ModelVolume& model_volume);
|
extern ColorRGBA color_from_model_volume(const ModelVolume& model_volume);
|
||||||
|
|
||||||
// A container for interleaved arrays of 3D vertices and normals,
|
// A container for interleaved arrays of 3D vertices and normals,
|
||||||
// possibly indexed by triangles and / or quads.
|
// possibly indexed by triangles and / or quads.
|
||||||
@ -248,16 +249,16 @@ private:
|
|||||||
|
|
||||||
class GLVolume {
|
class GLVolume {
|
||||||
public:
|
public:
|
||||||
static const std::array<float, 4> SELECTED_COLOR;
|
static const ColorRGBA SELECTED_COLOR;
|
||||||
static const std::array<float, 4> HOVER_SELECT_COLOR;
|
static const ColorRGBA HOVER_SELECT_COLOR;
|
||||||
static const std::array<float, 4> HOVER_DESELECT_COLOR;
|
static const ColorRGBA HOVER_DESELECT_COLOR;
|
||||||
static const std::array<float, 4> OUTSIDE_COLOR;
|
static const ColorRGBA OUTSIDE_COLOR;
|
||||||
static const std::array<float, 4> SELECTED_OUTSIDE_COLOR;
|
static const ColorRGBA SELECTED_OUTSIDE_COLOR;
|
||||||
static const std::array<float, 4> DISABLED_COLOR;
|
static const ColorRGBA DISABLED_COLOR;
|
||||||
static const std::array<float, 4> SLA_SUPPORT_COLOR;
|
static const ColorRGBA SLA_SUPPORT_COLOR;
|
||||||
static const std::array<float, 4> SLA_PAD_COLOR;
|
static const ColorRGBA SLA_PAD_COLOR;
|
||||||
static const std::array<float, 4> NEUTRAL_COLOR;
|
static const ColorRGBA NEUTRAL_COLOR;
|
||||||
static const std::array<std::array<float, 4>, 4> MODEL_COLOR;
|
static const std::array<ColorRGBA, 4> MODEL_COLOR;
|
||||||
|
|
||||||
enum EHoverState : unsigned char
|
enum EHoverState : unsigned char
|
||||||
{
|
{
|
||||||
@ -267,8 +268,8 @@ public:
|
|||||||
HS_Deselect
|
HS_Deselect
|
||||||
};
|
};
|
||||||
|
|
||||||
GLVolume(float r = 1.f, float g = 1.f, float b = 1.f, float a = 1.f);
|
GLVolume(float r = 1.0f, float g = 1.0f, float b = 1.0f, float a = 1.0f);
|
||||||
GLVolume(const std::array<float, 4>& rgba) : GLVolume(rgba[0], rgba[1], rgba[2], rgba[3]) {}
|
GLVolume(const ColorRGBA& color) : GLVolume(color.r(), color.g(), color.b(), color.a()) {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Geometry::Transformation m_instance_transformation;
|
Geometry::Transformation m_instance_transformation;
|
||||||
@ -305,9 +306,9 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// Color of the triangles / quads held by this volume.
|
// Color of the triangles / quads held by this volume.
|
||||||
std::array<float, 4> color;
|
ColorRGBA color;
|
||||||
// Color used to render this volume.
|
// Color used to render this volume.
|
||||||
std::array<float, 4> render_color;
|
ColorRGBA render_color;
|
||||||
|
|
||||||
struct CompositeID {
|
struct CompositeID {
|
||||||
CompositeID(int object_id, int volume_id, int instance_id) : object_id(object_id), volume_id(volume_id), instance_id(instance_id) {}
|
CompositeID(int object_id, int volume_id, int instance_id) : object_id(object_id), volume_id(volume_id), instance_id(instance_id) {}
|
||||||
@ -393,9 +394,8 @@ public:
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_color(const std::array<float, 4>& rgba);
|
void set_color(const ColorRGBA& rgba) { color = rgba; }
|
||||||
void set_render_color(float r, float g, float b, float a);
|
void set_render_color(const ColorRGBA& rgba) { render_color = rgba; }
|
||||||
void set_render_color(const std::array<float, 4>& rgba);
|
|
||||||
// Sets render color in dependence of current state
|
// Sets render color in dependence of current state
|
||||||
void set_render_color();
|
void set_render_color();
|
||||||
// set color according to model volume
|
// set color according to model volume
|
||||||
@ -595,8 +595,8 @@ public:
|
|||||||
int load_wipe_tower_preview(
|
int load_wipe_tower_preview(
|
||||||
int obj_idx, float pos_x, float pos_y, float width, float depth, float height, float rotation_angle, bool size_unknown, float brim_width, bool opengl_initialized);
|
int obj_idx, float pos_x, float pos_y, float width, float depth, float height, float rotation_angle, bool size_unknown, float brim_width, bool opengl_initialized);
|
||||||
|
|
||||||
GLVolume* new_toolpath_volume(const std::array<float, 4>& rgba, size_t reserve_vbo_floats = 0);
|
GLVolume* new_toolpath_volume(const ColorRGBA& rgba, size_t reserve_vbo_floats = 0);
|
||||||
GLVolume* new_nontoolpath_volume(const std::array<float, 4>& rgba, size_t reserve_vbo_floats = 0);
|
GLVolume* new_nontoolpath_volume(const ColorRGBA& rgba, size_t reserve_vbo_floats = 0);
|
||||||
|
|
||||||
// Render the volumes by OpenGL.
|
// Render the volumes by OpenGL.
|
||||||
void render(ERenderType type, bool disable_cullface, const Transform3d& view_matrix, std::function<bool(const GLVolume&)> filter_func = std::function<bool(const GLVolume&)>()) const;
|
void render(ERenderType type, bool disable_cullface, const Transform3d& view_matrix, std::function<bool(const GLVolume&)> filter_func = std::function<bool(const GLVolume&)>()) const;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include "I18N.hpp"
|
#include "I18N.hpp"
|
||||||
|
|
||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
|
#include "libslic3r/Color.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
#include "MainFrame.hpp"
|
#include "MainFrame.hpp"
|
||||||
@ -132,13 +133,13 @@ wxString CopyrightsDialog::get_html_text()
|
|||||||
{
|
{
|
||||||
wxColour bgr_clr = wxGetApp().get_window_default_clr();//wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
|
wxColour bgr_clr = wxGetApp().get_window_default_clr();//wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
|
||||||
|
|
||||||
const auto text_clr = wxGetApp().get_label_clr_default();// wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
|
const auto text_clr = wxGetApp().get_label_clr_default();
|
||||||
const auto text_clr_str = wxString::Format(wxT("#%02X%02X%02X"), text_clr.Red(), text_clr.Green(), text_clr.Blue());
|
const auto text_clr_str = encode_color(ColorRGB(text_clr.Red(), text_clr.Green(), text_clr.Blue()));
|
||||||
const auto bgr_clr_str = wxString::Format(wxT("#%02X%02X%02X"), bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue());
|
const auto bgr_clr_str = encode_color(ColorRGB(bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue()));
|
||||||
|
|
||||||
const wxString copyright_str = _(L("Copyright")) + "© ";
|
const wxString copyright_str = _L("Copyright") + "© ";
|
||||||
// TRN "Slic3r _is licensed under the_ License"
|
// TRN "Slic3r _is licensed under the_ License"
|
||||||
const wxString header_str = _(L("License agreements of all following programs (libraries) are part of application license agreement"));
|
const wxString header_str = _L("License agreements of all following programs (libraries) are part of application license agreement");
|
||||||
|
|
||||||
wxString text = wxString::Format(
|
wxString text = wxString::Format(
|
||||||
"<html>"
|
"<html>"
|
||||||
@ -256,9 +257,9 @@ AboutDialog::AboutDialog()
|
|||||||
{
|
{
|
||||||
m_html->SetMinSize(wxSize(-1, 16 * wxGetApp().em_unit()));
|
m_html->SetMinSize(wxSize(-1, 16 * wxGetApp().em_unit()));
|
||||||
wxFont font = get_default_font(this);
|
wxFont font = get_default_font(this);
|
||||||
const auto text_clr = wxGetApp().get_label_clr_default();//wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
|
const auto text_clr = wxGetApp().get_label_clr_default();
|
||||||
auto text_clr_str = wxString::Format(wxT("#%02X%02X%02X"), text_clr.Red(), text_clr.Green(), text_clr.Blue());
|
const auto text_clr_str = encode_color(ColorRGB(text_clr.Red(), text_clr.Green(), text_clr.Blue()));
|
||||||
auto bgr_clr_str = wxString::Format(wxT("#%02X%02X%02X"), bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue());
|
const auto bgr_clr_str = encode_color(ColorRGB(bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue()));
|
||||||
|
|
||||||
const int fs = font.GetPointSize()-1;
|
const int fs = font.GetPointSize()-1;
|
||||||
int size[] = {fs,fs,fs,fs,fs,fs,fs};
|
int size[] = {fs,fs,fs,fs,fs,fs,fs};
|
||||||
|
@ -81,7 +81,7 @@ std::pair<std::string, bool> SlicingProcessCompletedEvent::format_error_message(
|
|||||||
"be glad if you reported it."))) % SLIC3R_APP_NAME).str());
|
"be glad if you reported it."))) % SLIC3R_APP_NAME).str());
|
||||||
error = std::string(errmsg.ToUTF8()) + "\n\n" + std::string(ex.what());
|
error = std::string(errmsg.ToUTF8()) + "\n\n" + std::string(ex.what());
|
||||||
} catch (const HardCrash &ex) {
|
} catch (const HardCrash &ex) {
|
||||||
error = GUI::format("PrusaSlicer has encountered a fatal error: \"%1%\"", ex.what()) + "\n\n" +
|
error = GUI::format(_L("PrusaSlicer has encountered a fatal error: \"%1%\""), ex.what()) + "\n\n" +
|
||||||
_u8L("Please save your project and restart PrusaSlicer. "
|
_u8L("Please save your project and restart PrusaSlicer. "
|
||||||
"We would be glad if you reported the issue.");
|
"We would be glad if you reported the issue.");
|
||||||
} catch (PlaceholderParserError &ex) {
|
} catch (PlaceholderParserError &ex) {
|
||||||
|
@ -309,7 +309,7 @@ wxPanel* BedShapePanel::init_texture_panel()
|
|||||||
wxStaticText* lbl = dynamic_cast<wxStaticText*>(e.GetEventObject());
|
wxStaticText* lbl = dynamic_cast<wxStaticText*>(e.GetEventObject());
|
||||||
if (lbl != nullptr) {
|
if (lbl != nullptr) {
|
||||||
bool exists = (m_custom_texture == NONE) || boost::filesystem::exists(m_custom_texture);
|
bool exists = (m_custom_texture == NONE) || boost::filesystem::exists(m_custom_texture);
|
||||||
lbl->SetForegroundColour(exists ? /*wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)*/wxGetApp().get_label_clr_default() : wxColor(*wxRED));
|
lbl->SetForegroundColour(exists ? wxGetApp().get_label_clr_default() : wxColor(*wxRED));
|
||||||
|
|
||||||
wxString tooltip_text = "";
|
wxString tooltip_text = "";
|
||||||
if (m_custom_texture != NONE) {
|
if (m_custom_texture != NONE) {
|
||||||
@ -380,7 +380,7 @@ wxPanel* BedShapePanel::init_model_panel()
|
|||||||
wxStaticText* lbl = dynamic_cast<wxStaticText*>(e.GetEventObject());
|
wxStaticText* lbl = dynamic_cast<wxStaticText*>(e.GetEventObject());
|
||||||
if (lbl != nullptr) {
|
if (lbl != nullptr) {
|
||||||
bool exists = (m_custom_model == NONE) || boost::filesystem::exists(m_custom_model);
|
bool exists = (m_custom_model == NONE) || boost::filesystem::exists(m_custom_model);
|
||||||
lbl->SetForegroundColour(exists ? /*wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)*/wxGetApp().get_label_clr_default() : wxColor(*wxRED));
|
lbl->SetForegroundColour(exists ? wxGetApp().get_label_clr_default() : wxColor(*wxRED));
|
||||||
|
|
||||||
wxString tooltip_text = "";
|
wxString tooltip_text = "";
|
||||||
if (m_custom_model != NONE) {
|
if (m_custom_model != NONE) {
|
||||||
|
@ -395,21 +395,5 @@ wxBitmap BitmapCache::mksolid(size_t width, size_t height, unsigned char r, unsi
|
|||||||
return wxImage_to_wxBitmap_with_alpha(std::move(image), scale);
|
return wxImage_to_wxBitmap_with_alpha(std::move(image), scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BitmapCache::parse_color(const std::string& scolor, unsigned char* rgb_out)
|
|
||||||
{
|
|
||||||
rgb_out[0] = rgb_out[1] = rgb_out[2] = 0;
|
|
||||||
if (scolor.size() != 7 || scolor.front() != '#')
|
|
||||||
return false;
|
|
||||||
const char* c = scolor.data() + 1;
|
|
||||||
for (size_t i = 0; i < 3; ++i) {
|
|
||||||
int digit1 = hex_digit_to_int(*c++);
|
|
||||||
int digit2 = hex_digit_to_int(*c++);
|
|
||||||
if (digit1 == -1 || digit2 == -1)
|
|
||||||
return false;
|
|
||||||
rgb_out[i] = (unsigned char)(digit1 * 16 + digit2);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace GUI
|
} // namespace GUI
|
||||||
} // namespace Slic3r
|
} // namespace Slic3r
|
||||||
|
@ -9,9 +9,12 @@
|
|||||||
#include <wx/wx.h>
|
#include <wx/wx.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "libslic3r/Color.hpp"
|
||||||
|
|
||||||
struct NSVGimage;
|
struct NSVGimage;
|
||||||
|
|
||||||
namespace Slic3r { namespace GUI {
|
namespace Slic3r {
|
||||||
|
namespace GUI {
|
||||||
|
|
||||||
class BitmapCache
|
class BitmapCache
|
||||||
{
|
{
|
||||||
@ -43,11 +46,9 @@ public:
|
|||||||
wxBitmap* load_svg(const std::string &bitmap_key, unsigned width = 0, unsigned height = 0, const bool grayscale = false, const bool dark_mode = false, const std::string& new_color = "");
|
wxBitmap* load_svg(const std::string &bitmap_key, unsigned width = 0, unsigned height = 0, const bool grayscale = false, const bool dark_mode = false, const std::string& new_color = "");
|
||||||
|
|
||||||
wxBitmap mksolid(size_t width, size_t height, unsigned char r, unsigned char g, unsigned char b, unsigned char transparency, bool suppress_scaling = false, size_t border_width = 0, bool dark_mode = false);
|
wxBitmap mksolid(size_t width, size_t height, unsigned char r, unsigned char g, unsigned char b, unsigned char transparency, bool suppress_scaling = false, size_t border_width = 0, bool dark_mode = false);
|
||||||
wxBitmap mksolid(size_t width, size_t height, const unsigned char rgb[3], bool suppress_scaling = false, size_t border_width = 0, bool dark_mode = false) { return mksolid(width, height, rgb[0], rgb[1], rgb[2], wxALPHA_OPAQUE, suppress_scaling, border_width, dark_mode); }
|
wxBitmap mksolid(size_t width, size_t height, const ColorRGB& rgb, bool suppress_scaling = false, size_t border_width = 0, bool dark_mode = false) { return mksolid(width, height, rgb.r_uchar(), rgb.g_uchar(), rgb.b_uchar(), wxALPHA_OPAQUE, suppress_scaling, border_width, dark_mode); }
|
||||||
wxBitmap mkclear(size_t width, size_t height) { return mksolid(width, height, 0, 0, 0, wxALPHA_TRANSPARENT); }
|
wxBitmap mkclear(size_t width, size_t height) { return mksolid(width, height, 0, 0, 0, wxALPHA_TRANSPARENT); }
|
||||||
|
|
||||||
static bool parse_color(const std::string& scolor, unsigned char* rgb_out);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::map<std::string, wxBitmap*> m_map;
|
std::map<std::string, wxBitmap*> m_map;
|
||||||
double m_gs = 0.2; // value, used for image.ConvertToGreyscale(m_gs, m_gs, m_gs)
|
double m_gs = 0.2; // value, used for image.ConvertToGreyscale(m_gs, m_gs, m_gs)
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "libslic3r/Time.hpp"
|
#include "libslic3r/Time.hpp"
|
||||||
|
#include "libslic3r/Color.hpp"
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
#include "MainFrame.hpp"
|
#include "MainFrame.hpp"
|
||||||
#include "wxExtensions.hpp"
|
#include "wxExtensions.hpp"
|
||||||
@ -31,11 +32,9 @@ static wxString format_reason(const Config::Snapshot::Reason reason)
|
|||||||
|
|
||||||
static std::string get_color(wxColour colour)
|
static std::string get_color(wxColour colour)
|
||||||
{
|
{
|
||||||
wxString clr_str = wxString::Format(wxT("#%02X%02X%02X"), colour.Red(), colour.Green(), colour.Blue());
|
return encode_color(ColorRGB(colour.Red(), colour.Green(), colour.Blue()));
|
||||||
return clr_str.ToStdString();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static wxString generate_html_row(const Config::Snapshot &snapshot, bool row_even, bool snapshot_active, bool dark_mode)
|
static wxString generate_html_row(const Config::Snapshot &snapshot, bool row_even, bool snapshot_active, bool dark_mode)
|
||||||
{
|
{
|
||||||
// Start by declaring a row with an alternating background color.
|
// Start by declaring a row with an alternating background color.
|
||||||
@ -105,7 +104,7 @@ static wxString generate_html_page(const Config::SnapshotDB &snapshot_db, const
|
|||||||
wxString text =
|
wxString text =
|
||||||
"<html>"
|
"<html>"
|
||||||
"<body bgcolor=\"" + get_color(wxGetApp().get_window_default_clr()/*wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)*/) + "\" cellspacing=\"2\" cellpadding=\"0\" border=\"0\" link=\"#800000\">"
|
"<body bgcolor=\"" + get_color(wxGetApp().get_window_default_clr()/*wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)*/) + "\" cellspacing=\"2\" cellpadding=\"0\" border=\"0\" link=\"#800000\">"
|
||||||
"<font color=\"" + get_color(wxGetApp().get_label_clr_default()/*wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)*/) + "\">";
|
"<font color=\"" + get_color(wxGetApp().get_label_clr_default()) + "\">";
|
||||||
text += "<table style=\"width:100%\">";
|
text += "<table style=\"width:100%\">";
|
||||||
for (size_t i_row = 0; i_row < snapshot_db.snapshots().size(); ++ i_row) {
|
for (size_t i_row = 0; i_row < snapshot_db.snapshots().size(); ++ i_row) {
|
||||||
const Config::Snapshot &snapshot = snapshot_db.snapshots()[snapshot_db.snapshots().size() - i_row - 1];
|
const Config::Snapshot &snapshot = snapshot_db.snapshots()[snapshot_db.snapshots().size() - i_row - 1];
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "libslic3r/Config.hpp"
|
#include "libslic3r/Config.hpp"
|
||||||
#include "libslic3r/libslic3r.h"
|
#include "libslic3r/libslic3r.h"
|
||||||
#include "libslic3r/Model.hpp"
|
#include "libslic3r/Model.hpp"
|
||||||
|
#include "libslic3r/Color.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
#include "GUI_Utils.hpp"
|
#include "GUI_Utils.hpp"
|
||||||
@ -746,9 +747,9 @@ void PageMaterials::set_compatible_printers_html_window(const std::vector<std::s
|
|||||||
wxSystemSettings::GetColour(wxSYS_COLOUR_MENU);
|
wxSystemSettings::GetColour(wxSYS_COLOUR_MENU);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
const auto bgr_clr_str = wxString::Format(wxT("#%02X%02X%02X"), bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue());
|
const auto text_clr = wxGetApp().get_label_clr_default();
|
||||||
const auto text_clr = wxGetApp().get_label_clr_default();//wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
|
const auto bgr_clr_str = encode_color(ColorRGB(bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue()));
|
||||||
const auto text_clr_str = wxString::Format(wxT("#%02X%02X%02X"), text_clr.Red(), text_clr.Green(), text_clr.Blue());
|
const auto text_clr_str = encode_color(ColorRGB(text_clr.Red(), text_clr.Green(), text_clr.Blue()));
|
||||||
wxString first_line = format_wxstr(_L("%1% marked with <b>*</b> are <b>not</b> compatible with some installed printers."), materials->technology == T_FFF ? _L("Filaments") : _L("SLA materials"));
|
wxString first_line = format_wxstr(_L("%1% marked with <b>*</b> are <b>not</b> compatible with some installed printers."), materials->technology == T_FFF ? _L("Filaments") : _L("SLA materials"));
|
||||||
wxString text;
|
wxString text;
|
||||||
if (all_printers) {
|
if (all_printers) {
|
||||||
@ -2729,8 +2730,11 @@ bool ConfigWizard::priv::apply_config(AppConfig *app_config, PresetBundle *prese
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bool is_filaments_changed = app_config->get_section(AppConfig::SECTION_FILAMENTS) != appconfig_new.get_section(AppConfig::SECTION_FILAMENTS);
|
auto changed = [app_config, &appconfig_new = std::as_const(this->appconfig_new)](const std::string& section_name) {
|
||||||
bool is_sla_materials_changed = app_config->get_section(AppConfig::SECTION_MATERIALS) != appconfig_new.get_section(AppConfig::SECTION_MATERIALS);
|
return (app_config->has_section(section_name) ? app_config->get_section(section_name) : std::map<std::string, std::string>()) != appconfig_new.get_section(section_name);
|
||||||
|
};
|
||||||
|
bool is_filaments_changed = changed(AppConfig::SECTION_FILAMENTS);
|
||||||
|
bool is_sla_materials_changed = changed(AppConfig::SECTION_MATERIALS);
|
||||||
if ((check_unsaved_preset_changes = is_filaments_changed || is_sla_materials_changed)) {
|
if ((check_unsaved_preset_changes = is_filaments_changed || is_sla_materials_changed)) {
|
||||||
header = is_filaments_changed ? _L("Some filaments were uninstalled.") : _L("Some SLA materials were uninstalled.");
|
header = is_filaments_changed ? _L("Some filaments were uninstalled.") : _L("Some SLA materials were uninstalled.");
|
||||||
if (!wxGetApp().check_and_keep_current_preset_changes(caption, header, act_btns, &apply_keeped_changes))
|
if (!wxGetApp().check_and_keep_current_preset_changes(caption, header, act_btns, &apply_keeped_changes))
|
||||||
|
@ -2557,36 +2557,46 @@ bool Control::check_ticks_changed_event(Type type)
|
|||||||
|
|
||||||
std::string TickCodeInfo::get_color_for_tick(TickCode tick, Type type, const int extruder)
|
std::string TickCodeInfo::get_color_for_tick(TickCode tick, Type type, const int extruder)
|
||||||
{
|
{
|
||||||
|
auto opposite_one_color = [](const std::string& color) {
|
||||||
|
ColorRGB rgb;
|
||||||
|
decode_color(color, rgb);
|
||||||
|
return encode_color(opposite(rgb));
|
||||||
|
};
|
||||||
|
auto opposite_two_colors = [](const std::string& a, const std::string& b) {
|
||||||
|
ColorRGB rgb1; decode_color(a, rgb1);
|
||||||
|
ColorRGB rgb2; decode_color(b, rgb2);
|
||||||
|
return encode_color(opposite(rgb1, rgb2));
|
||||||
|
};
|
||||||
|
|
||||||
if (mode == SingleExtruder && type == ColorChange && m_use_default_colors) {
|
if (mode == SingleExtruder && type == ColorChange && m_use_default_colors) {
|
||||||
#if 1
|
#if 1
|
||||||
if (ticks.empty())
|
if (ticks.empty())
|
||||||
return color_generator.get_opposite_color((*m_colors)[0]);
|
return opposite_one_color((*m_colors)[0]);
|
||||||
|
|
||||||
auto before_tick_it = std::lower_bound(ticks.begin(), ticks.end(), tick);
|
auto before_tick_it = std::lower_bound(ticks.begin(), ticks.end(), tick);
|
||||||
if (before_tick_it == ticks.end())
|
if (before_tick_it == ticks.end()) {
|
||||||
{
|
|
||||||
while (before_tick_it != ticks.begin())
|
while (before_tick_it != ticks.begin())
|
||||||
if (--before_tick_it; before_tick_it->type == ColorChange)
|
if (--before_tick_it; before_tick_it->type == ColorChange)
|
||||||
break;
|
break;
|
||||||
if (before_tick_it->type == ColorChange)
|
if (before_tick_it->type == ColorChange)
|
||||||
return color_generator.get_opposite_color(before_tick_it->color);
|
return opposite_one_color(before_tick_it->color);
|
||||||
return color_generator.get_opposite_color((*m_colors)[0]);
|
|
||||||
|
return opposite_one_color((*m_colors)[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (before_tick_it == ticks.begin())
|
if (before_tick_it == ticks.begin()) {
|
||||||
{
|
|
||||||
const std::string& frst_color = (*m_colors)[0];
|
const std::string& frst_color = (*m_colors)[0];
|
||||||
if (before_tick_it->type == ColorChange)
|
if (before_tick_it->type == ColorChange)
|
||||||
return color_generator.get_opposite_color(frst_color, before_tick_it->color);
|
return opposite_two_colors(frst_color, before_tick_it->color);
|
||||||
|
|
||||||
auto next_tick_it = before_tick_it;
|
auto next_tick_it = before_tick_it;
|
||||||
while (next_tick_it != ticks.end())
|
while (next_tick_it != ticks.end())
|
||||||
if (++next_tick_it; next_tick_it->type == ColorChange)
|
if (++next_tick_it; next_tick_it->type == ColorChange)
|
||||||
break;
|
break;
|
||||||
if (next_tick_it->type == ColorChange)
|
if (next_tick_it->type == ColorChange)
|
||||||
return color_generator.get_opposite_color(frst_color, next_tick_it->color);
|
return opposite_two_colors(frst_color, next_tick_it->color);
|
||||||
|
|
||||||
return color_generator.get_opposite_color(frst_color);
|
return opposite_one_color(frst_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string frst_color = "";
|
std::string frst_color = "";
|
||||||
@ -2607,13 +2617,15 @@ std::string TickCodeInfo::get_color_for_tick(TickCode tick, Type type, const int
|
|||||||
|
|
||||||
if (before_tick_it->type == ColorChange) {
|
if (before_tick_it->type == ColorChange) {
|
||||||
if (frst_color.empty())
|
if (frst_color.empty())
|
||||||
return color_generator.get_opposite_color(before_tick_it->color);
|
return opposite_one_color(before_tick_it->color);
|
||||||
return color_generator.get_opposite_color(before_tick_it->color, frst_color);
|
|
||||||
|
return opposite_two_colors(before_tick_it->color, frst_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frst_color.empty())
|
if (frst_color.empty())
|
||||||
return color_generator.get_opposite_color((*m_colors)[0]);
|
return opposite_one_color((*m_colors)[0]);
|
||||||
return color_generator.get_opposite_color((*m_colors)[0], frst_color);
|
|
||||||
|
return opposite_two_colors((*m_colors)[0], frst_color);
|
||||||
#else
|
#else
|
||||||
const std::vector<std::string>& colors = ColorPrintColors::get();
|
const std::vector<std::string>& colors = ColorPrintColors::get();
|
||||||
if (ticks.empty())
|
if (ticks.empty())
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#include "libslic3r/CustomGCode.hpp"
|
#include "libslic3r/CustomGCode.hpp"
|
||||||
#include "wxExtensions.hpp"
|
#include "wxExtensions.hpp"
|
||||||
#include "DoubleSlider_Utils.hpp"
|
|
||||||
|
|
||||||
#include <wx/window.h>
|
#include <wx/window.h>
|
||||||
#include <wx/control.h>
|
#include <wx/control.h>
|
||||||
@ -119,7 +118,6 @@ class TickCodeInfo
|
|||||||
// int m_default_color_idx = 0;
|
// int m_default_color_idx = 0;
|
||||||
|
|
||||||
std::vector<std::string>* m_colors {nullptr};
|
std::vector<std::string>* m_colors {nullptr};
|
||||||
ColorGenerator color_generator;
|
|
||||||
|
|
||||||
std::string get_color_for_tick(TickCode tick, Type type, const int extruder);
|
std::string get_color_for_tick(TickCode tick, Type type, const int extruder);
|
||||||
|
|
||||||
|
@ -1,191 +1,8 @@
|
|||||||
|
#ifndef slic3r_GUI_DoubleSlider_Utils_hpp_
|
||||||
|
#define slic3r_GUI_DoubleSlider_Utils_hpp_
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <random>
|
#include <random>
|
||||||
|
|
||||||
#include "wx/colour.h"
|
|
||||||
|
|
||||||
class ColorGenerator
|
#endif // slic3r_GUI_DoubleSlider_Utils_hpp_
|
||||||
{
|
|
||||||
// Some of next code is borrowed from https://stackoverflow.com/questions/3018313/algorithm-to-convert-rgb-to-hsv-and-hsv-to-rgb-in-range-0-255-for-both
|
|
||||||
typedef struct {
|
|
||||||
double r; // a fraction between 0 and 1
|
|
||||||
double g; // a fraction between 0 and 1
|
|
||||||
double b; // a fraction between 0 and 1
|
|
||||||
} rgb;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
double h; // angle in degrees
|
|
||||||
double s; // a fraction between 0 and 1
|
|
||||||
double v; // a fraction between 0 and 1
|
|
||||||
} hsv;
|
|
||||||
|
|
||||||
//static hsv rgb2hsv(rgb in);
|
|
||||||
//static rgb hsv2rgb(hsv in);
|
|
||||||
|
|
||||||
hsv rgb2hsv(rgb in)
|
|
||||||
{
|
|
||||||
hsv out;
|
|
||||||
double min, max, delta;
|
|
||||||
|
|
||||||
min = in.r < in.g ? in.r : in.g;
|
|
||||||
min = min < in.b ? min : in.b;
|
|
||||||
|
|
||||||
max = in.r > in.g ? in.r : in.g;
|
|
||||||
max = max > in.b ? max : in.b;
|
|
||||||
|
|
||||||
out.v = max; // v
|
|
||||||
delta = max - min;
|
|
||||||
if (delta < 0.00001)
|
|
||||||
{
|
|
||||||
out.s = 0;
|
|
||||||
out.h = 0; // undefined, maybe nan?
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
if (max > 0.0) { // NOTE: if Max is == 0, this divide would cause a crash
|
|
||||||
out.s = (delta / max); // s
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// if max is 0, then r = g = b = 0
|
|
||||||
// s = 0, h is undefined
|
|
||||||
out.s = 0.0;
|
|
||||||
out.h = NAN; // its now undefined
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
if (in.r >= max) // > is bogus, just keeps compilor happy
|
|
||||||
out.h = (in.g - in.b) / delta; // between yellow & magenta
|
|
||||||
else
|
|
||||||
if (in.g >= max)
|
|
||||||
out.h = 2.0 + (in.b - in.r) / delta; // between cyan & yellow
|
|
||||||
else
|
|
||||||
out.h = 4.0 + (in.r - in.g) / delta; // between magenta & cyan
|
|
||||||
|
|
||||||
out.h *= 60.0; // degrees
|
|
||||||
|
|
||||||
if (out.h < 0.0)
|
|
||||||
out.h += 360.0;
|
|
||||||
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
hsv rgb2hsv(const std::string& str_clr_in)
|
|
||||||
{
|
|
||||||
wxColour clr(str_clr_in);
|
|
||||||
rgb in = { clr.Red() / 255.0, clr.Green() / 255.0, clr.Blue() / 255.0 };
|
|
||||||
return rgb2hsv(in);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
rgb hsv2rgb(hsv in)
|
|
||||||
{
|
|
||||||
double hh, p, q, t, ff;
|
|
||||||
long i;
|
|
||||||
rgb out;
|
|
||||||
|
|
||||||
if (in.s <= 0.0) { // < is bogus, just shuts up warnings
|
|
||||||
out.r = in.v;
|
|
||||||
out.g = in.v;
|
|
||||||
out.b = in.v;
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
hh = in.h;
|
|
||||||
if (hh >= 360.0) hh -= 360.0;//hh = 0.0;
|
|
||||||
hh /= 60.0;
|
|
||||||
i = (long)hh;
|
|
||||||
ff = hh - i;
|
|
||||||
p = in.v * (1.0 - in.s);
|
|
||||||
q = in.v * (1.0 - (in.s * ff));
|
|
||||||
t = in.v * (1.0 - (in.s * (1.0 - ff)));
|
|
||||||
|
|
||||||
switch (i) {
|
|
||||||
case 0:
|
|
||||||
out.r = in.v;
|
|
||||||
out.g = t;
|
|
||||||
out.b = p;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
out.r = q;
|
|
||||||
out.g = in.v;
|
|
||||||
out.b = p;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
out.r = p;
|
|
||||||
out.g = in.v;
|
|
||||||
out.b = t;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 3:
|
|
||||||
out.r = p;
|
|
||||||
out.g = q;
|
|
||||||
out.b = in.v;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
out.r = t;
|
|
||||||
out.g = p;
|
|
||||||
out.b = in.v;
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
default:
|
|
||||||
out.r = in.v;
|
|
||||||
out.g = p;
|
|
||||||
out.b = q;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::random_device rd;
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
ColorGenerator() {}
|
|
||||||
~ColorGenerator() {}
|
|
||||||
|
|
||||||
double rand_val()
|
|
||||||
{
|
|
||||||
std::mt19937 rand_generator(rd());
|
|
||||||
|
|
||||||
// this value will be used for Saturation and Value
|
|
||||||
// to avoid extremely light/dark colors, take this value from range [0.65; 1.0]
|
|
||||||
std::uniform_real_distribution<double> distrib(0.65, 1.0);
|
|
||||||
return distrib(rand_generator);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
std::string get_opposite_color(const std::string& color)
|
|
||||||
{
|
|
||||||
std::string opp_color = "";
|
|
||||||
|
|
||||||
hsv hsv_clr = rgb2hsv(color);
|
|
||||||
hsv_clr.h += 65; // 65 instead 60 to avoid circle values
|
|
||||||
hsv_clr.s = rand_val();
|
|
||||||
hsv_clr.v = rand_val();
|
|
||||||
|
|
||||||
rgb rgb_opp_color = hsv2rgb(hsv_clr);
|
|
||||||
|
|
||||||
wxString clr_str = wxString::Format(wxT("#%02X%02X%02X"), (unsigned char)(rgb_opp_color.r * 255), (unsigned char)(rgb_opp_color.g * 255), (unsigned char)(rgb_opp_color.b * 255));
|
|
||||||
opp_color = clr_str.ToStdString();
|
|
||||||
|
|
||||||
return opp_color;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string get_opposite_color(const std::string& color_frst, const std::string& color_scnd)
|
|
||||||
{
|
|
||||||
std::string opp_color = "";
|
|
||||||
|
|
||||||
hsv hsv_frst = rgb2hsv(color_frst);
|
|
||||||
hsv hsv_scnd = rgb2hsv(color_scnd);
|
|
||||||
|
|
||||||
double delta_h = fabs(hsv_frst.h - hsv_scnd.h);
|
|
||||||
double start_h = delta_h > 180 ? std::min<double>(hsv_scnd.h, hsv_frst.h) : std::max<double>(hsv_scnd.h, hsv_frst.h);
|
|
||||||
start_h += 5; // to avoid circle change of colors for 120 deg
|
|
||||||
if (delta_h < 180)
|
|
||||||
delta_h = 360 - delta_h;
|
|
||||||
|
|
||||||
hsv hsv_opp = hsv{ start_h + 0.5 * delta_h, rand_val(), rand_val() };
|
|
||||||
rgb rgb_opp_color = hsv2rgb(hsv_opp);
|
|
||||||
|
|
||||||
wxString clr_str = wxString::Format(wxT("#%02X%02X%02X"), (unsigned char)(rgb_opp_color.r * 255), (unsigned char)(rgb_opp_color.g * 255), (unsigned char)(rgb_opp_color.b * 255));
|
|
||||||
opp_color = clr_str.ToStdString();
|
|
||||||
|
|
||||||
return opp_color;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
@ -1389,10 +1389,8 @@ boost::any& ColourPicker::get_value()
|
|||||||
auto colour = static_cast<wxColourPickerCtrl*>(window)->GetColour();
|
auto colour = static_cast<wxColourPickerCtrl*>(window)->GetColour();
|
||||||
if (colour == wxTransparentColour)
|
if (colour == wxTransparentColour)
|
||||||
m_value = std::string("");
|
m_value = std::string("");
|
||||||
else {
|
else
|
||||||
auto clr_str = wxString::Format(wxT("#%02X%02X%02X"), colour.Red(), colour.Green(), colour.Blue());
|
m_value = encode_color(ColorRGB(colour.Red(), colour.Green(), colour.Blue()));
|
||||||
m_value = clr_str.ToStdString();
|
|
||||||
}
|
|
||||||
return m_value;
|
return m_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -270,13 +270,12 @@ void FirmwareDialog::priv::flashing_start(unsigned tasks)
|
|||||||
|
|
||||||
void FirmwareDialog::priv::flashing_done(AvrDudeComplete complete)
|
void FirmwareDialog::priv::flashing_done(AvrDudeComplete complete)
|
||||||
{
|
{
|
||||||
auto text_color = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
|
|
||||||
port_picker->Enable();
|
port_picker->Enable();
|
||||||
btn_rescan->Enable();
|
btn_rescan->Enable();
|
||||||
hex_picker->Enable();
|
hex_picker->Enable();
|
||||||
btn_close->Enable();
|
btn_close->Enable();
|
||||||
btn_flash->SetLabel(btn_flash_label_ready);
|
btn_flash->SetLabel(btn_flash_label_ready);
|
||||||
txt_status->SetForegroundColour(text_color);
|
txt_status->SetForegroundColour(GUI::wxGetApp().get_label_clr_default());
|
||||||
timer_pulse.Stop();
|
timer_pulse.Stop();
|
||||||
progressbar->SetValue(progressbar->GetRange());
|
progressbar->SetValue(progressbar->GetRange());
|
||||||
|
|
||||||
@ -811,7 +810,7 @@ FirmwareDialog::FirmwareDialog(wxWindow *parent) :
|
|||||||
panel->SetSizer(vsizer);
|
panel->SetSizer(vsizer);
|
||||||
|
|
||||||
auto *label_hex_picker = new wxStaticText(panel, wxID_ANY, _(L("Firmware image:")));
|
auto *label_hex_picker = new wxStaticText(panel, wxID_ANY, _(L("Firmware image:")));
|
||||||
p->hex_picker = new wxFilePickerCtrl(panel, wxID_ANY, wxEmptyString, wxFileSelectorPromptStr,
|
p->hex_picker = new wxFilePickerCtrl(panel, wxID_ANY, wxEmptyString, /*wxFileSelectorPromptStr*/_L("Select a file"),
|
||||||
"Hex files (*.hex)|*.hex|All files|*.*");
|
"Hex files (*.hex)|*.hex|All files|*.*");
|
||||||
p->hex_picker->GetPickerCtrl()->SetLabelText(_(L("Browse")));
|
p->hex_picker->GetPickerCtrl()->SetLabelText(_(L("Browse")));
|
||||||
|
|
||||||
|
@ -47,32 +47,6 @@ static EMoveType buffer_type(unsigned char id) {
|
|||||||
return static_cast<EMoveType>(static_cast<unsigned char>(EMoveType::Retract) + id);
|
return static_cast<EMoveType>(static_cast<unsigned char>(EMoveType::Retract) + id);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::array<float, 4> decode_color(const std::string& color) {
|
|
||||||
static const float INV_255 = 1.0f / 255.0f;
|
|
||||||
|
|
||||||
std::array<float, 4> ret = { 0.0f, 0.0f, 0.0f, 1.0f };
|
|
||||||
const char* c = color.data() + 1;
|
|
||||||
if (color.size() == 7 && color.front() == '#') {
|
|
||||||
for (size_t j = 0; j < 3; ++j) {
|
|
||||||
int digit1 = hex_digit_to_int(*c++);
|
|
||||||
int digit2 = hex_digit_to_int(*c++);
|
|
||||||
if (digit1 == -1 || digit2 == -1)
|
|
||||||
break;
|
|
||||||
|
|
||||||
ret[j] = float(digit1 * 16 + digit2) * INV_255;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static std::vector<std::array<float, 4>> decode_colors(const std::vector<std::string>& colors) {
|
|
||||||
std::vector<std::array<float, 4>> output(colors.size(), { 0.0f, 0.0f, 0.0f, 1.0f });
|
|
||||||
for (size_t i = 0; i < colors.size(); ++i) {
|
|
||||||
output[i] = decode_color(colors[i]);
|
|
||||||
}
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Round to a bin with minimum two digits resolution.
|
// Round to a bin with minimum two digits resolution.
|
||||||
// Equivalent to conversion to string with sprintf(buf, "%.2g", value) and conversion back to float, but faster.
|
// Equivalent to conversion to string with sprintf(buf, "%.2g", value) and conversion back to float, but faster.
|
||||||
static float round_to_bin(const float value)
|
static float round_to_bin(const float value)
|
||||||
@ -197,9 +171,9 @@ float GCodeViewer::Extrusions::Range::step_size(EType type) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GCodeViewer::Color GCodeViewer::Extrusions::Range::get_color_at(float value, EType type) const
|
ColorRGBA GCodeViewer::Extrusions::Range::get_color_at(float value, EType type) const
|
||||||
#else
|
#else
|
||||||
GCodeViewer::Color GCodeViewer::Extrusions::Range::get_color_at(float value) const
|
ColorRGBA GCodeViewer::Extrusions::Range::get_color_at(float value) const
|
||||||
#endif // ENABLE_PREVIEW_LAYER_TIME
|
#endif // ENABLE_PREVIEW_LAYER_TIME
|
||||||
{
|
{
|
||||||
// Input value scaled to the colors range
|
// Input value scaled to the colors range
|
||||||
@ -222,18 +196,11 @@ GCodeViewer::Color GCodeViewer::Extrusions::Range::get_color_at(float value) con
|
|||||||
const size_t color_max_idx = Range_Colors.size() - 1;
|
const size_t color_max_idx = Range_Colors.size() - 1;
|
||||||
|
|
||||||
// Compute the two colors just below (low) and above (high) the input value
|
// Compute the two colors just below (low) and above (high) the input value
|
||||||
const size_t color_low_idx = std::clamp<size_t>(static_cast<size_t>(global_t), 0, color_max_idx);
|
const size_t color_low_idx = std::clamp<size_t>(static_cast<size_t>(global_t), 0, color_max_idx);
|
||||||
const size_t color_high_idx = std::clamp<size_t>(color_low_idx + 1, 0, color_max_idx);
|
const size_t color_high_idx = std::clamp<size_t>(color_low_idx + 1, 0, color_max_idx);
|
||||||
|
|
||||||
// Compute how far the value is between the low and high colors so that they can be interpolated
|
|
||||||
const float local_t = std::clamp(global_t - static_cast<float>(color_low_idx), 0.0f, 1.0f);
|
|
||||||
|
|
||||||
// Interpolate between the low and high colors to find exactly which color the input value should get
|
// Interpolate between the low and high colors to find exactly which color the input value should get
|
||||||
Color ret = { 0.0f, 0.0f, 0.0f, 1.0f };
|
return lerp(Range_Colors[color_low_idx], Range_Colors[color_high_idx], global_t - static_cast<float>(color_low_idx));
|
||||||
for (unsigned int i = 0; i < 3; ++i) {
|
|
||||||
ret[i] = lerp(Range_Colors[color_low_idx][i], Range_Colors[color_high_idx][i], local_t);
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GCodeViewer::SequentialRangeCap::~SequentialRangeCap() {
|
GCodeViewer::SequentialRangeCap::~SequentialRangeCap() {
|
||||||
@ -311,12 +278,7 @@ void GCodeViewer::SequentialView::Marker::render() const
|
|||||||
if (width != last_window_width || length != last_text_length) {
|
if (width != last_window_width || length != last_text_length) {
|
||||||
last_window_width = width;
|
last_window_width = width;
|
||||||
last_text_length = length;
|
last_text_length = length;
|
||||||
#if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
imgui.set_requires_extra_frame();
|
imgui.set_requires_extra_frame();
|
||||||
#else
|
|
||||||
wxGetApp().plater()->get_current_canvas3D()->set_as_dirty();
|
|
||||||
wxGetApp().plater()->get_current_canvas3D()->request_extra_frame();
|
|
||||||
#endif // ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
}
|
}
|
||||||
|
|
||||||
imgui.end();
|
imgui.end();
|
||||||
@ -383,11 +345,11 @@ void GCodeViewer::SequentialView::GCodeWindow::render(float top, float bottom, u
|
|||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const ImVec4 LINE_NUMBER_COLOR = ImGuiWrapper::COL_ORANGE_LIGHT;
|
static const ImVec4 LINE_NUMBER_COLOR = ImGuiWrapper::COL_ORANGE_LIGHT;
|
||||||
static const ImVec4 SELECTION_RECT_COLOR = ImGuiWrapper::COL_ORANGE_DARK;
|
static const ImVec4 SELECTION_RECT_COLOR = ImGuiWrapper::COL_ORANGE_DARK;
|
||||||
static const ImVec4 COMMAND_COLOR = { 0.8f, 0.8f, 0.0f, 1.0f };
|
static const ImVec4 COMMAND_COLOR = { 0.8f, 0.8f, 0.0f, 1.0f };
|
||||||
static const ImVec4 PARAMETERS_COLOR = { 1.0f, 1.0f, 1.0f, 1.0f };
|
static const ImVec4 PARAMETERS_COLOR = { 1.0f, 1.0f, 1.0f, 1.0f };
|
||||||
static const ImVec4 COMMENT_COLOR = { 0.7f, 0.7f, 0.7f, 1.0f };
|
static const ImVec4 COMMENT_COLOR = { 0.7f, 0.7f, 0.7f, 1.0f };
|
||||||
|
|
||||||
if (!m_visible || m_filename.empty() || m_lines_ends.empty() || curr_line_id == 0)
|
if (!m_visible || m_filename.empty() || m_lines_ends.empty() || curr_line_id == 0)
|
||||||
return;
|
return;
|
||||||
@ -512,7 +474,7 @@ void GCodeViewer::SequentialView::render(float legend_height) const
|
|||||||
gcode_window.render(legend_height, bottom, static_cast<uint64_t>(gcode_ids[current.last]));
|
gcode_window.render(legend_height, bottom, static_cast<uint64_t>(gcode_ids[current.last]));
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<GCodeViewer::Color> GCodeViewer::Extrusion_Role_Colors {{
|
const std::vector<ColorRGBA> GCodeViewer::Extrusion_Role_Colors{ {
|
||||||
{ 0.90f, 0.70f, 0.70f, 1.0f }, // erNone
|
{ 0.90f, 0.70f, 0.70f, 1.0f }, // erNone
|
||||||
{ 1.00f, 0.90f, 0.30f, 1.0f }, // erPerimeter
|
{ 1.00f, 0.90f, 0.30f, 1.0f }, // erPerimeter
|
||||||
{ 1.00f, 0.49f, 0.22f, 1.0f }, // erExternalPerimeter
|
{ 1.00f, 0.49f, 0.22f, 1.0f }, // erExternalPerimeter
|
||||||
@ -531,7 +493,7 @@ const std::vector<GCodeViewer::Color> GCodeViewer::Extrusion_Role_Colors {{
|
|||||||
{ 0.00f, 0.00f, 0.00f, 1.0f } // erMixed
|
{ 0.00f, 0.00f, 0.00f, 1.0f } // erMixed
|
||||||
}};
|
}};
|
||||||
|
|
||||||
const std::vector<GCodeViewer::Color> GCodeViewer::Options_Colors {{
|
const std::vector<ColorRGBA> GCodeViewer::Options_Colors{ {
|
||||||
{ 0.803f, 0.135f, 0.839f, 1.0f }, // Retractions
|
{ 0.803f, 0.135f, 0.839f, 1.0f }, // Retractions
|
||||||
{ 0.287f, 0.679f, 0.810f, 1.0f }, // Unretractions
|
{ 0.287f, 0.679f, 0.810f, 1.0f }, // Unretractions
|
||||||
{ 0.900f, 0.900f, 0.900f, 1.0f }, // Seams
|
{ 0.900f, 0.900f, 0.900f, 1.0f }, // Seams
|
||||||
@ -541,7 +503,7 @@ const std::vector<GCodeViewer::Color> GCodeViewer::Options_Colors {{
|
|||||||
{ 0.886f, 0.825f, 0.262f, 1.0f } // CustomGCodes
|
{ 0.886f, 0.825f, 0.262f, 1.0f } // CustomGCodes
|
||||||
}};
|
}};
|
||||||
|
|
||||||
const std::vector<GCodeViewer::Color> GCodeViewer::Travel_Colors {{
|
const std::vector<ColorRGBA> GCodeViewer::Travel_Colors{ {
|
||||||
{ 0.219f, 0.282f, 0.609f, 1.0f }, // Move
|
{ 0.219f, 0.282f, 0.609f, 1.0f }, // Move
|
||||||
{ 0.112f, 0.422f, 0.103f, 1.0f }, // Extrude
|
{ 0.112f, 0.422f, 0.103f, 1.0f }, // Extrude
|
||||||
{ 0.505f, 0.064f, 0.028f, 1.0f } // Retract
|
{ 0.505f, 0.064f, 0.028f, 1.0f } // Retract
|
||||||
@ -549,7 +511,7 @@ const std::vector<GCodeViewer::Color> GCodeViewer::Travel_Colors {{
|
|||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
// Normal ranges
|
// Normal ranges
|
||||||
const std::vector<GCodeViewer::Color> GCodeViewer::Range_Colors {{
|
const std::vector<ColorRGBA> GCodeViewer::Range_Colors{ {
|
||||||
{ 0.043f, 0.173f, 0.478f, 1.0f }, // bluish
|
{ 0.043f, 0.173f, 0.478f, 1.0f }, // bluish
|
||||||
{ 0.075f, 0.349f, 0.522f, 1.0f },
|
{ 0.075f, 0.349f, 0.522f, 1.0f },
|
||||||
{ 0.110f, 0.533f, 0.569f, 1.0f },
|
{ 0.110f, 0.533f, 0.569f, 1.0f },
|
||||||
@ -564,7 +526,7 @@ const std::vector<GCodeViewer::Color> GCodeViewer::Range_Colors {{
|
|||||||
}};
|
}};
|
||||||
#else
|
#else
|
||||||
// Detailed ranges
|
// Detailed ranges
|
||||||
const std::vector<GCodeViewer::Color> GCodeViewer::Range_Colors{ {
|
const std::vector<ColorRGBA> GCodeViewer::Range_Colors{ {
|
||||||
{ 0.043f, 0.173f, 0.478f, 1.0f }, // bluish
|
{ 0.043f, 0.173f, 0.478f, 1.0f }, // bluish
|
||||||
{ 0.5f * (0.043f + 0.075f), 0.5f * (0.173f + 0.349f), 0.5f * (0.478f + 0.522f), 1.0f },
|
{ 0.5f * (0.043f + 0.075f), 0.5f * (0.173f + 0.349f), 0.5f * (0.478f + 0.522f), 1.0f },
|
||||||
{ 0.075f, 0.349f, 0.522f, 1.0f },
|
{ 0.075f, 0.349f, 0.522f, 1.0f },
|
||||||
@ -589,8 +551,8 @@ const std::vector<GCodeViewer::Color> GCodeViewer::Range_Colors{ {
|
|||||||
} };
|
} };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const GCodeViewer::Color GCodeViewer::Wipe_Color = { 1.0f, 1.0f, 0.0f, 1.0f };
|
const ColorRGBA GCodeViewer::Wipe_Color = ColorRGBA::YELLOW();
|
||||||
const GCodeViewer::Color GCodeViewer::Neutral_Color = { 0.25f, 0.25f, 0.25f, 1.0f };
|
const ColorRGBA GCodeViewer::Neutral_Color = ColorRGBA::DARK_GRAY();
|
||||||
|
|
||||||
GCodeViewer::GCodeViewer()
|
GCodeViewer::GCodeViewer()
|
||||||
{
|
{
|
||||||
@ -761,14 +723,17 @@ void GCodeViewer::refresh(const GCodeProcessorResult& gcode_result, const std::v
|
|||||||
|
|
||||||
if (m_view_type == EViewType::Tool && !gcode_result.extruder_colors.empty())
|
if (m_view_type == EViewType::Tool && !gcode_result.extruder_colors.empty())
|
||||||
// update tool colors from config stored in the gcode
|
// update tool colors from config stored in the gcode
|
||||||
m_tool_colors = decode_colors(gcode_result.extruder_colors);
|
decode_colors(gcode_result.extruder_colors, m_tool_colors);
|
||||||
else
|
else
|
||||||
// update tool colors
|
// update tool colors
|
||||||
m_tool_colors = decode_colors(str_tool_colors);
|
decode_colors(str_tool_colors, m_tool_colors);
|
||||||
|
|
||||||
|
ColorRGBA default_color;
|
||||||
|
decode_color("#FF8000", default_color);
|
||||||
|
|
||||||
// ensure there are enough colors defined
|
// ensure there are enough colors defined
|
||||||
while (m_tool_colors.size() < std::max(size_t(1), gcode_result.extruders_count))
|
while (m_tool_colors.size() < std::max(size_t(1), gcode_result.extruders_count))
|
||||||
m_tool_colors.push_back(decode_color("#FF8000"));
|
m_tool_colors.push_back(default_color);
|
||||||
|
|
||||||
// update ranges for coloring / legend
|
// update ranges for coloring / legend
|
||||||
m_extrusions.reset_ranges();
|
m_extrusions.reset_ranges();
|
||||||
@ -850,7 +815,7 @@ void GCodeViewer::reset()
|
|||||||
m_paths_bounding_box = BoundingBoxf3();
|
m_paths_bounding_box = BoundingBoxf3();
|
||||||
m_max_bounding_box = BoundingBoxf3();
|
m_max_bounding_box = BoundingBoxf3();
|
||||||
m_max_print_height = 0.0f;
|
m_max_print_height = 0.0f;
|
||||||
m_tool_colors = std::vector<Color>();
|
m_tool_colors = std::vector<ColorRGBA>();
|
||||||
m_extruders_count = 0;
|
m_extruders_count = 0;
|
||||||
m_extruder_ids = std::vector<unsigned char>();
|
m_extruder_ids = std::vector<unsigned char>();
|
||||||
m_filament_diameters = std::vector<float>();
|
m_filament_diameters = std::vector<float>();
|
||||||
@ -1040,7 +1005,7 @@ void GCodeViewer::export_toolpaths_to_obj(const char* filename) const
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// collect color information to generate materials
|
// collect color information to generate materials
|
||||||
std::vector<Color> colors;
|
std::vector<ColorRGBA> colors;
|
||||||
for (const RenderPath& path : t_buffer.render_paths) {
|
for (const RenderPath& path : t_buffer.render_paths) {
|
||||||
colors.push_back(path.color);
|
colors.push_back(path.color);
|
||||||
}
|
}
|
||||||
@ -1062,10 +1027,10 @@ void GCodeViewer::export_toolpaths_to_obj(const char* filename) const
|
|||||||
fprintf(fp, "# Generated by %s-%s based on Slic3r\n", SLIC3R_APP_NAME, SLIC3R_VERSION);
|
fprintf(fp, "# Generated by %s-%s based on Slic3r\n", SLIC3R_APP_NAME, SLIC3R_VERSION);
|
||||||
|
|
||||||
unsigned int colors_count = 1;
|
unsigned int colors_count = 1;
|
||||||
for (const Color& color : colors) {
|
for (const ColorRGBA& color : colors) {
|
||||||
fprintf(fp, "\nnewmtl material_%d\n", colors_count++);
|
fprintf(fp, "\nnewmtl material_%d\n", colors_count++);
|
||||||
fprintf(fp, "Ka 1 1 1\n");
|
fprintf(fp, "Ka 1 1 1\n");
|
||||||
fprintf(fp, "Kd %g %g %g\n", color[0], color[1], color[2]);
|
fprintf(fp, "Kd %g %g %g\n", color.r(), color.g(), color.b());
|
||||||
fprintf(fp, "Ks 0 0 0\n");
|
fprintf(fp, "Ks 0 0 0\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1126,7 +1091,7 @@ void GCodeViewer::export_toolpaths_to_obj(const char* filename) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
for (const Color& color : colors) {
|
for (const ColorRGBA& color : colors) {
|
||||||
// save material triangles to file
|
// save material triangles to file
|
||||||
fprintf(fp, "\nusemtl material_%zu\n", i + 1);
|
fprintf(fp, "\nusemtl material_%zu\n", i + 1);
|
||||||
fprintf(fp, "# triangles material %zu\n", i + 1);
|
fprintf(fp, "# triangles material %zu\n", i + 1);
|
||||||
@ -2097,6 +2062,16 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
|
|||||||
sort_remove_duplicates(m_extruder_ids);
|
sort_remove_duplicates(m_extruder_ids);
|
||||||
m_extruder_ids.shrink_to_fit();
|
m_extruder_ids.shrink_to_fit();
|
||||||
|
|
||||||
|
#if ENABLE_SPIRAL_VASE_LAYERS
|
||||||
|
// replace layers for spiral vase mode
|
||||||
|
if (!gcode_result.spiral_vase_layers.empty()) {
|
||||||
|
m_layers.reset();
|
||||||
|
for (const auto& layer : gcode_result.spiral_vase_layers) {
|
||||||
|
m_layers.append(layer.first, { layer.second.first, layer.second.second });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // ENABLE_SPIRAL_VASE_LAYERS
|
||||||
|
|
||||||
// set layers z range
|
// set layers z range
|
||||||
if (!m_layers.empty())
|
if (!m_layers.empty())
|
||||||
m_layers_z_range = { 0, static_cast<unsigned int>(m_layers.size() - 1) };
|
m_layers_z_range = { 0, static_cast<unsigned int>(m_layers.size() - 1) };
|
||||||
@ -2178,7 +2153,7 @@ void GCodeViewer::load_shells(const Print& print, bool initialized)
|
|||||||
|
|
||||||
for (GLVolume* volume : m_shells.volumes.volumes) {
|
for (GLVolume* volume : m_shells.volumes.volumes) {
|
||||||
volume->zoom_to_volumes = false;
|
volume->zoom_to_volumes = false;
|
||||||
volume->color[3] = 0.25f;
|
volume->color.a(0.25f);
|
||||||
volume->force_native_color = true;
|
volume->force_native_color = true;
|
||||||
volume->set_render_color();
|
volume->set_render_color();
|
||||||
}
|
}
|
||||||
@ -2191,7 +2166,7 @@ void GCodeViewer::refresh_render_paths(bool keep_sequential_current_first, bool
|
|||||||
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
|
|
||||||
auto extrusion_color = [this](const Path& path) {
|
auto extrusion_color = [this](const Path& path) {
|
||||||
Color color;
|
ColorRGBA color;
|
||||||
switch (m_view_type)
|
switch (m_view_type)
|
||||||
{
|
{
|
||||||
case EViewType::FeatureType: { color = Extrusion_Role_Colors[static_cast<unsigned int>(path.role)]; break; }
|
case EViewType::FeatureType: { color = Extrusion_Role_Colors[static_cast<unsigned int>(path.role)]; break; }
|
||||||
@ -2224,13 +2199,13 @@ void GCodeViewer::refresh_render_paths(bool keep_sequential_current_first, bool
|
|||||||
case EViewType::Tool: { color = m_tool_colors[path.extruder_id]; break; }
|
case EViewType::Tool: { color = m_tool_colors[path.extruder_id]; break; }
|
||||||
case EViewType::ColorPrint: {
|
case EViewType::ColorPrint: {
|
||||||
if (path.cp_color_id >= static_cast<unsigned char>(m_tool_colors.size()))
|
if (path.cp_color_id >= static_cast<unsigned char>(m_tool_colors.size()))
|
||||||
color = { 0.5f, 0.5f, 0.5f, 1.0f };
|
color = ColorRGBA::GRAY();
|
||||||
else
|
else
|
||||||
color = m_tool_colors[path.cp_color_id];
|
color = m_tool_colors[path.cp_color_id];
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: { color = { 1.0f, 1.0f, 1.0f, 1.0f }; break; }
|
default: { color = ColorRGBA::WHITE(); break; }
|
||||||
}
|
}
|
||||||
|
|
||||||
return color;
|
return color;
|
||||||
@ -2429,7 +2404,7 @@ void GCodeViewer::refresh_render_paths(bool keep_sequential_current_first, bool
|
|||||||
if (m_sequential_view.current.last < sub_path.first.s_id || sub_path.last.s_id < m_sequential_view.current.first)
|
if (m_sequential_view.current.last < sub_path.first.s_id || sub_path.last.s_id < m_sequential_view.current.first)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Color color;
|
ColorRGBA color;
|
||||||
switch (path.type)
|
switch (path.type)
|
||||||
{
|
{
|
||||||
case EMoveType::Tool_change:
|
case EMoveType::Tool_change:
|
||||||
@ -3081,7 +3056,7 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
|
|
||||||
bool imperial_units = wxGetApp().app_config->get("use_inches") == "1";
|
bool imperial_units = wxGetApp().app_config->get("use_inches") == "1";
|
||||||
|
|
||||||
auto append_item = [icon_size, percent_bar_size, &imgui, imperial_units](EItemType type, const Color& color, const std::string& label,
|
auto append_item = [icon_size, percent_bar_size, &imgui, imperial_units](EItemType type, const ColorRGBA& color, const std::string& label,
|
||||||
bool visible = true, const std::string& time = "", float percent = 0.0f, float max_percent = 0.0f, const std::array<float, 4>& offsets = { 0.0f, 0.0f, 0.0f, 0.0f },
|
bool visible = true, const std::string& time = "", float percent = 0.0f, float max_percent = 0.0f, const std::array<float, 4>& offsets = { 0.0f, 0.0f, 0.0f, 0.0f },
|
||||||
double used_filament_m = 0.0, double used_filament_g = 0.0,
|
double used_filament_m = 0.0, double used_filament_g = 0.0,
|
||||||
std::function<void()> callback = nullptr) {
|
std::function<void()> callback = nullptr) {
|
||||||
@ -3094,21 +3069,21 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
default:
|
default:
|
||||||
case EItemType::Rect: {
|
case EItemType::Rect: {
|
||||||
draw_list->AddRectFilled({ pos.x + 1.0f, pos.y + 1.0f }, { pos.x + icon_size - 1.0f, pos.y + icon_size - 1.0f },
|
draw_list->AddRectFilled({ pos.x + 1.0f, pos.y + 1.0f }, { pos.x + icon_size - 1.0f, pos.y + icon_size - 1.0f },
|
||||||
ImGui::GetColorU32({ color[0], color[1], color[2], 1.0f }));
|
ImGuiWrapper::to_ImU32(color));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EItemType::Circle: {
|
case EItemType::Circle: {
|
||||||
ImVec2 center(0.5f * (pos.x + pos.x + icon_size), 0.5f * (pos.y + pos.y + icon_size));
|
ImVec2 center(0.5f * (pos.x + pos.x + icon_size), 0.5f * (pos.y + pos.y + icon_size));
|
||||||
draw_list->AddCircleFilled(center, 0.5f * icon_size, ImGui::GetColorU32({ color[0], color[1], color[2], 1.0f }), 16);
|
draw_list->AddCircleFilled(center, 0.5f * icon_size, ImGuiWrapper::to_ImU32(color), 16);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EItemType::Hexagon: {
|
case EItemType::Hexagon: {
|
||||||
ImVec2 center(0.5f * (pos.x + pos.x + icon_size), 0.5f * (pos.y + pos.y + icon_size));
|
ImVec2 center(0.5f * (pos.x + pos.x + icon_size), 0.5f * (pos.y + pos.y + icon_size));
|
||||||
draw_list->AddNgonFilled(center, 0.5f * icon_size, ImGui::GetColorU32({ color[0], color[1], color[2], 1.0f }), 6);
|
draw_list->AddNgonFilled(center, 0.5f * icon_size, ImGuiWrapper::to_ImU32(color), 6);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EItemType::Line: {
|
case EItemType::Line: {
|
||||||
draw_list->AddLine({ pos.x + 1, pos.y + icon_size - 1 }, { pos.x + icon_size - 1, pos.y + 1 }, ImGui::GetColorU32({ color[0], color[1], color[2], 1.0f }), 3.0f);
|
draw_list->AddLine({ pos.x + 1, pos.y + icon_size - 1 }, { pos.x + icon_size - 1, pos.y + 1 }, ImGuiWrapper::to_ImU32(color), 3.0f);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3133,12 +3108,7 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, 0.3333f);
|
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, 0.3333f);
|
||||||
|
|
||||||
// to avoid the tooltip to change size when moving the mouse
|
// to avoid the tooltip to change size when moving the mouse
|
||||||
#if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
imgui.set_requires_extra_frame();
|
imgui.set_requires_extra_frame();
|
||||||
#else
|
|
||||||
wxGetApp().plater()->get_current_canvas3D()->set_as_dirty();
|
|
||||||
wxGetApp().plater()->get_current_canvas3D()->request_extra_frame();
|
|
||||||
#endif // ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3283,7 +3253,7 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
};
|
};
|
||||||
|
|
||||||
auto color_print_ranges = [this](unsigned char extruder_id, const std::vector<CustomGCode::Item>& custom_gcode_per_print_z) {
|
auto color_print_ranges = [this](unsigned char extruder_id, const std::vector<CustomGCode::Item>& custom_gcode_per_print_z) {
|
||||||
std::vector<std::pair<Color, std::pair<double, double>>> ret;
|
std::vector<std::pair<ColorRGBA, std::pair<double, double>>> ret;
|
||||||
ret.reserve(custom_gcode_per_print_z.size());
|
ret.reserve(custom_gcode_per_print_z.size());
|
||||||
|
|
||||||
for (const auto& item : custom_gcode_per_print_z) {
|
for (const auto& item : custom_gcode_per_print_z) {
|
||||||
@ -3302,8 +3272,11 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
const double previous_z = (lower_b == zs.begin()) ? 0.0 : *(--lower_b);
|
const double previous_z = (lower_b == zs.begin()) ? 0.0 : *(--lower_b);
|
||||||
|
|
||||||
// to avoid duplicate values, check adding values
|
// to avoid duplicate values, check adding values
|
||||||
if (ret.empty() || !(ret.back().second.first == previous_z && ret.back().second.second == current_z))
|
if (ret.empty() || !(ret.back().second.first == previous_z && ret.back().second.second == current_z)) {
|
||||||
ret.push_back({ decode_color(item.color), { previous_z, current_z } });
|
ColorRGBA color;
|
||||||
|
decode_color(item.color, color);
|
||||||
|
ret.push_back({ color, { previous_z, current_z } });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@ -3562,11 +3535,10 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
if (need_scrollable)
|
if (need_scrollable)
|
||||||
ImGui::BeginChild("color_prints", { -1.0f, child_height }, false);
|
ImGui::BeginChild("color_prints", { -1.0f, child_height }, false);
|
||||||
if (m_extruders_count == 1) { // single extruder use case
|
if (m_extruders_count == 1) { // single extruder use case
|
||||||
const std::vector<std::pair<Color, std::pair<double, double>>> cp_values = color_print_ranges(0, custom_gcode_per_print_z);
|
const std::vector<std::pair<ColorRGBA, std::pair<double, double>>> cp_values = color_print_ranges(0, custom_gcode_per_print_z);
|
||||||
const int items_cnt = static_cast<int>(cp_values.size());
|
const int items_cnt = static_cast<int>(cp_values.size());
|
||||||
if (items_cnt == 0) { // There are no color changes, but there are some pause print or custom Gcode
|
if (items_cnt == 0) // There are no color changes, but there are some pause print or custom Gcode
|
||||||
append_item(EItemType::Rect, m_tool_colors.front(), _u8L("Default color"));
|
append_item(EItemType::Rect, m_tool_colors.front(), _u8L("Default color"));
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
for (int i = items_cnt; i >= 0; --i) {
|
for (int i = items_cnt; i >= 0; --i) {
|
||||||
// create label for color change item
|
// create label for color change item
|
||||||
@ -3585,11 +3557,11 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
else { // multi extruder use case
|
else { // multi extruder use case
|
||||||
// shows only extruders actually used
|
// shows only extruders actually used
|
||||||
for (unsigned char i : m_extruder_ids) {
|
for (unsigned char i : m_extruder_ids) {
|
||||||
const std::vector<std::pair<Color, std::pair<double, double>>> cp_values = color_print_ranges(i, custom_gcode_per_print_z);
|
const std::vector<std::pair<ColorRGBA, std::pair<double, double>>> cp_values = color_print_ranges(i, custom_gcode_per_print_z);
|
||||||
const int items_cnt = static_cast<int>(cp_values.size());
|
const int items_cnt = static_cast<int>(cp_values.size());
|
||||||
if (items_cnt == 0) { // There are no color changes, but there are some pause print or custom Gcode
|
if (items_cnt == 0)
|
||||||
|
// There are no color changes, but there are some pause print or custom Gcode
|
||||||
append_item(EItemType::Rect, m_tool_colors[i], _u8L("Extruder") + " " + std::to_string(i + 1) + " " + _u8L("default color"));
|
append_item(EItemType::Rect, m_tool_colors[i], _u8L("Extruder") + " " + std::to_string(i + 1) + " " + _u8L("default color"));
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
for (int j = items_cnt; j >= 0; --j) {
|
for (int j = items_cnt; j >= 0; --j) {
|
||||||
// create label for color change item
|
// create label for color change item
|
||||||
@ -3638,10 +3610,10 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
};
|
};
|
||||||
EType type;
|
EType type;
|
||||||
int extruder_id;
|
int extruder_id;
|
||||||
Color color1;
|
ColorRGBA color1;
|
||||||
Color color2;
|
ColorRGBA color2;
|
||||||
Times times;
|
Times times;
|
||||||
std::pair<double, double> used_filament {0.0f, 0.0f};
|
std::pair<double, double> used_filament{ 0.0f, 0.0f };
|
||||||
};
|
};
|
||||||
using PartialTimes = std::vector<PartialTime>;
|
using PartialTimes = std::vector<PartialTime>;
|
||||||
|
|
||||||
@ -3650,7 +3622,7 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
|
|
||||||
std::vector<CustomGCode::Item> custom_gcode_per_print_z = wxGetApp().is_editor() ? wxGetApp().plater()->model().custom_gcode_per_print_z.gcodes : m_custom_gcode_per_print_z;
|
std::vector<CustomGCode::Item> custom_gcode_per_print_z = wxGetApp().is_editor() ? wxGetApp().plater()->model().custom_gcode_per_print_z.gcodes : m_custom_gcode_per_print_z;
|
||||||
int extruders_count = wxGetApp().extruders_edited_cnt();
|
int extruders_count = wxGetApp().extruders_edited_cnt();
|
||||||
std::vector<Color> last_color(extruders_count);
|
std::vector<ColorRGBA> last_color(extruders_count);
|
||||||
for (int i = 0; i < extruders_count; ++i) {
|
for (int i = 0; i < extruders_count; ++i) {
|
||||||
last_color[i] = m_tool_colors[i];
|
last_color[i] = m_tool_colors[i];
|
||||||
}
|
}
|
||||||
@ -3662,8 +3634,8 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
case CustomGCode::PausePrint: {
|
case CustomGCode::PausePrint: {
|
||||||
auto it = std::find_if(custom_gcode_per_print_z.begin(), custom_gcode_per_print_z.end(), [time_rec](const CustomGCode::Item& item) { return item.type == time_rec.first; });
|
auto it = std::find_if(custom_gcode_per_print_z.begin(), custom_gcode_per_print_z.end(), [time_rec](const CustomGCode::Item& item) { return item.type == time_rec.first; });
|
||||||
if (it != custom_gcode_per_print_z.end()) {
|
if (it != custom_gcode_per_print_z.end()) {
|
||||||
items.push_back({ PartialTime::EType::Print, it->extruder, last_color[it->extruder - 1], Color(), time_rec.second });
|
items.push_back({ PartialTime::EType::Print, it->extruder, last_color[it->extruder - 1], ColorRGBA::BLACK(), time_rec.second });
|
||||||
items.push_back({ PartialTime::EType::Pause, it->extruder, Color(), Color(), time_rec.second });
|
items.push_back({ PartialTime::EType::Pause, it->extruder, ColorRGBA::BLACK(), ColorRGBA::BLACK(), time_rec.second });
|
||||||
custom_gcode_per_print_z.erase(it);
|
custom_gcode_per_print_z.erase(it);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -3671,14 +3643,16 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
case CustomGCode::ColorChange: {
|
case CustomGCode::ColorChange: {
|
||||||
auto it = std::find_if(custom_gcode_per_print_z.begin(), custom_gcode_per_print_z.end(), [time_rec](const CustomGCode::Item& item) { return item.type == time_rec.first; });
|
auto it = std::find_if(custom_gcode_per_print_z.begin(), custom_gcode_per_print_z.end(), [time_rec](const CustomGCode::Item& item) { return item.type == time_rec.first; });
|
||||||
if (it != custom_gcode_per_print_z.end()) {
|
if (it != custom_gcode_per_print_z.end()) {
|
||||||
items.push_back({ PartialTime::EType::Print, it->extruder, last_color[it->extruder - 1], Color(), time_rec.second, get_used_filament_from_volume(used_filaments[color_change_idx++], it->extruder-1) });
|
items.push_back({ PartialTime::EType::Print, it->extruder, last_color[it->extruder - 1], ColorRGBA::BLACK(), time_rec.second, get_used_filament_from_volume(used_filaments[color_change_idx++], it->extruder - 1) });
|
||||||
items.push_back({ PartialTime::EType::ColorChange, it->extruder, last_color[it->extruder - 1], decode_color(it->color), time_rec.second });
|
ColorRGBA color;
|
||||||
last_color[it->extruder - 1] = decode_color(it->color);
|
decode_color(it->color, color);
|
||||||
|
items.push_back({ PartialTime::EType::ColorChange, it->extruder, last_color[it->extruder - 1], color, time_rec.second });
|
||||||
|
last_color[it->extruder - 1] = color;
|
||||||
last_extruder_id = it->extruder;
|
last_extruder_id = it->extruder;
|
||||||
custom_gcode_per_print_z.erase(it);
|
custom_gcode_per_print_z.erase(it);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
items.push_back({ PartialTime::EType::Print, last_extruder_id, last_color[last_extruder_id - 1], Color(), time_rec.second, get_used_filament_from_volume(used_filaments[color_change_idx++], last_extruder_id -1) });
|
items.push_back({ PartialTime::EType::Print, last_extruder_id, last_color[last_extruder_id - 1], ColorRGBA::BLACK(), time_rec.second, get_used_filament_from_volume(used_filaments[color_change_idx++], last_extruder_id - 1) });
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -3689,7 +3663,7 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
return items;
|
return items;
|
||||||
};
|
};
|
||||||
|
|
||||||
auto append_color_change = [&imgui](const Color& color1, const Color& color2, const std::array<float, 4>& offsets, const Times& times) {
|
auto append_color_change = [&imgui](const ColorRGBA& color1, const ColorRGBA& color2, const std::array<float, 4>& offsets, const Times& times) {
|
||||||
imgui.text(_u8L("Color change"));
|
imgui.text(_u8L("Color change"));
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|
||||||
@ -3699,16 +3673,16 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
pos.x -= 0.5f * ImGui::GetStyle().ItemSpacing.x;
|
pos.x -= 0.5f * ImGui::GetStyle().ItemSpacing.x;
|
||||||
|
|
||||||
draw_list->AddRectFilled({ pos.x + 1.0f, pos.y + 1.0f }, { pos.x + icon_size - 1.0f, pos.y + icon_size - 1.0f },
|
draw_list->AddRectFilled({ pos.x + 1.0f, pos.y + 1.0f }, { pos.x + icon_size - 1.0f, pos.y + icon_size - 1.0f },
|
||||||
ImGui::GetColorU32({ color1[0], color1[1], color1[2], 1.0f }));
|
ImGuiWrapper::to_ImU32(color1));
|
||||||
pos.x += icon_size;
|
pos.x += icon_size;
|
||||||
draw_list->AddRectFilled({ pos.x + 1.0f, pos.y + 1.0f }, { pos.x + icon_size - 1.0f, pos.y + icon_size - 1.0f },
|
draw_list->AddRectFilled({ pos.x + 1.0f, pos.y + 1.0f }, { pos.x + icon_size - 1.0f, pos.y + icon_size - 1.0f },
|
||||||
ImGui::GetColorU32({ color2[0], color2[1], color2[2], 1.0f }));
|
ImGuiWrapper::to_ImU32(color2));
|
||||||
|
|
||||||
ImGui::SameLine(offsets[0]);
|
ImGui::SameLine(offsets[0]);
|
||||||
imgui.text(short_time(get_time_dhms(times.second - times.first)));
|
imgui.text(short_time(get_time_dhms(times.second - times.first)));
|
||||||
};
|
};
|
||||||
|
|
||||||
auto append_print = [&imgui, imperial_units](const Color& color, const std::array<float, 4>& offsets, const Times& times, std::pair<double, double> used_filament) {
|
auto append_print = [&imgui, imperial_units](const ColorRGBA& color, const std::array<float, 4>& offsets, const Times& times, std::pair<double, double> used_filament) {
|
||||||
imgui.text(_u8L("Print"));
|
imgui.text(_u8L("Print"));
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|
||||||
@ -3718,7 +3692,7 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
pos.x -= 0.5f * ImGui::GetStyle().ItemSpacing.x;
|
pos.x -= 0.5f * ImGui::GetStyle().ItemSpacing.x;
|
||||||
|
|
||||||
draw_list->AddRectFilled({ pos.x + 1.0f, pos.y + 1.0f }, { pos.x + icon_size - 1.0f, pos.y + icon_size - 1.0f },
|
draw_list->AddRectFilled({ pos.x + 1.0f, pos.y + 1.0f }, { pos.x + icon_size - 1.0f, pos.y + icon_size - 1.0f },
|
||||||
ImGui::GetColorU32({ color[0], color[1], color[2], 1.0f }));
|
ImGuiWrapper::to_ImU32(color));
|
||||||
|
|
||||||
ImGui::SameLine(offsets[0]);
|
ImGui::SameLine(offsets[0]);
|
||||||
imgui.text(short_time(get_time_dhms(times.second)));
|
imgui.text(short_time(get_time_dhms(times.second)));
|
||||||
@ -3994,12 +3968,7 @@ void GCodeViewer::render_legend(float& legend_height)
|
|||||||
if (m_view_type == EViewType::LayerTimeLinear || m_view_type == EViewType::LayerTimeLogarithmic)
|
if (m_view_type == EViewType::LayerTimeLinear || m_view_type == EViewType::LayerTimeLogarithmic)
|
||||||
refresh_render_paths(false, false);
|
refresh_render_paths(false, false);
|
||||||
#endif // ENABLE_PREVIEW_LAYER_TIME
|
#endif // ENABLE_PREVIEW_LAYER_TIME
|
||||||
#if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
imgui.set_requires_extra_frame();
|
imgui.set_requires_extra_frame();
|
||||||
#else
|
|
||||||
wxGetApp().plater()->get_current_canvas3D()->set_as_dirty();
|
|
||||||
wxGetApp().plater()->get_current_canvas3D()->request_extra_frame();
|
|
||||||
#endif // ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -4344,7 +4313,7 @@ void GCodeViewer::log_memory_used(const std::string& label, int64_t additional)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GCodeViewer::Color GCodeViewer::option_color(EMoveType move_type) const
|
ColorRGBA GCodeViewer::option_color(EMoveType move_type) const
|
||||||
{
|
{
|
||||||
switch (move_type)
|
switch (move_type)
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,6 @@ namespace GUI {
|
|||||||
class GCodeViewer
|
class GCodeViewer
|
||||||
{
|
{
|
||||||
using IBufferType = unsigned short;
|
using IBufferType = unsigned short;
|
||||||
using Color = std::array<float, 4>;
|
|
||||||
using VertexBuffer = std::vector<float>;
|
using VertexBuffer = std::vector<float>;
|
||||||
using MultiVertexBuffer = std::vector<VertexBuffer>;
|
using MultiVertexBuffer = std::vector<VertexBuffer>;
|
||||||
using IndexBuffer = std::vector<IBufferType>;
|
using IndexBuffer = std::vector<IBufferType>;
|
||||||
@ -31,12 +30,12 @@ class GCodeViewer
|
|||||||
using InstanceIdBuffer = std::vector<size_t>;
|
using InstanceIdBuffer = std::vector<size_t>;
|
||||||
using InstancesOffsets = std::vector<Vec3f>;
|
using InstancesOffsets = std::vector<Vec3f>;
|
||||||
|
|
||||||
static const std::vector<Color> Extrusion_Role_Colors;
|
static const std::vector<ColorRGBA> Extrusion_Role_Colors;
|
||||||
static const std::vector<Color> Options_Colors;
|
static const std::vector<ColorRGBA> Options_Colors;
|
||||||
static const std::vector<Color> Travel_Colors;
|
static const std::vector<ColorRGBA> Travel_Colors;
|
||||||
static const std::vector<Color> Range_Colors;
|
static const std::vector<ColorRGBA> Range_Colors;
|
||||||
static const Color Wipe_Color;
|
static const ColorRGBA Wipe_Color;
|
||||||
static const Color Neutral_Color;
|
static const ColorRGBA Neutral_Color;
|
||||||
|
|
||||||
enum class EOptionsColors : unsigned char
|
enum class EOptionsColors : unsigned char
|
||||||
{
|
{
|
||||||
@ -121,7 +120,7 @@ class GCodeViewer
|
|||||||
// vbo id
|
// vbo id
|
||||||
unsigned int vbo{ 0 };
|
unsigned int vbo{ 0 };
|
||||||
// Color to apply to the instances
|
// Color to apply to the instances
|
||||||
Color color;
|
ColorRGBA color;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<Range> ranges;
|
std::vector<Range> ranges;
|
||||||
@ -243,7 +242,7 @@ class GCodeViewer
|
|||||||
// Index of the parent tbuffer
|
// Index of the parent tbuffer
|
||||||
unsigned char tbuffer_id;
|
unsigned char tbuffer_id;
|
||||||
// Render path property
|
// Render path property
|
||||||
Color color;
|
ColorRGBA color;
|
||||||
// Index of the buffer in TBuffer::indices
|
// Index of the buffer in TBuffer::indices
|
||||||
unsigned int ibuffer_id;
|
unsigned int ibuffer_id;
|
||||||
// Render path content
|
// Render path content
|
||||||
@ -263,12 +262,10 @@ class GCodeViewer
|
|||||||
bool operator() (const RenderPath &l, const RenderPath &r) const {
|
bool operator() (const RenderPath &l, const RenderPath &r) const {
|
||||||
if (l.tbuffer_id < r.tbuffer_id)
|
if (l.tbuffer_id < r.tbuffer_id)
|
||||||
return true;
|
return true;
|
||||||
for (int i = 0; i < 3; ++i) {
|
if (l.color < r.color)
|
||||||
if (l.color[i] < r.color[i])
|
return true;
|
||||||
return true;
|
else if (l.color > r.color)
|
||||||
else if (l.color[i] > r.color[i])
|
return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return l.ibuffer_id < r.ibuffer_id;
|
return l.ibuffer_id < r.ibuffer_id;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -299,7 +296,7 @@ class GCodeViewer
|
|||||||
struct Model
|
struct Model
|
||||||
{
|
{
|
||||||
GLModel model;
|
GLModel model;
|
||||||
Color color;
|
ColorRGBA color;
|
||||||
InstanceVBuffer instances;
|
InstanceVBuffer instances;
|
||||||
GLModel::InitializationData data;
|
GLModel::InitializationData data;
|
||||||
|
|
||||||
@ -408,10 +405,10 @@ class GCodeViewer
|
|||||||
|
|
||||||
#if ENABLE_PREVIEW_LAYER_TIME
|
#if ENABLE_PREVIEW_LAYER_TIME
|
||||||
float step_size(EType type = EType::Linear) const;
|
float step_size(EType type = EType::Linear) const;
|
||||||
Color get_color_at(float value, EType type = EType::Linear) const;
|
ColorRGBA get_color_at(float value, EType type = EType::Linear) const;
|
||||||
#else
|
#else
|
||||||
float step_size() const { return (max - min) / (static_cast<float>(Range_Colors.size()) - 1.0f); }
|
float step_size() const { return (max - min) / (static_cast<float>(Range_Colors.size()) - 1.0f); }
|
||||||
Color get_color_at(float value) const;
|
ColorRGBA get_color_at(float value) const;
|
||||||
#endif // ENABLE_PREVIEW_LAYER_TIME
|
#endif // ENABLE_PREVIEW_LAYER_TIME
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -471,6 +468,7 @@ class GCodeViewer
|
|||||||
size_t last{ 0 };
|
size_t last{ 0 };
|
||||||
|
|
||||||
bool operator == (const Range& other) const { return first == other.first && last == other.last; }
|
bool operator == (const Range& other) const { return first == other.first && last == other.last; }
|
||||||
|
bool operator != (const Range& other) const { return !operator==(other); }
|
||||||
bool contains(size_t id) const { return first <= id && id <= last; }
|
bool contains(size_t id) const { return first <= id && id <= last; }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -500,9 +498,8 @@ class GCodeViewer
|
|||||||
bool operator != (const Layers& other) const {
|
bool operator != (const Layers& other) const {
|
||||||
if (m_zs != other.m_zs)
|
if (m_zs != other.m_zs)
|
||||||
return true;
|
return true;
|
||||||
if (!(m_ranges == other.m_ranges))
|
if (m_ranges != other.m_ranges)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -514,7 +511,7 @@ class GCodeViewer
|
|||||||
TBuffer* buffer{ nullptr };
|
TBuffer* buffer{ nullptr };
|
||||||
unsigned int ibo{ 0 };
|
unsigned int ibo{ 0 };
|
||||||
unsigned int vbo{ 0 };
|
unsigned int vbo{ 0 };
|
||||||
Color color;
|
ColorRGBA color;
|
||||||
|
|
||||||
~SequentialRangeCap();
|
~SequentialRangeCap();
|
||||||
bool is_renderable() const { return buffer != nullptr; }
|
bool is_renderable() const { return buffer != nullptr; }
|
||||||
@ -722,7 +719,7 @@ private:
|
|||||||
// bounding box of toolpaths + marker tools
|
// bounding box of toolpaths + marker tools
|
||||||
BoundingBoxf3 m_max_bounding_box;
|
BoundingBoxf3 m_max_bounding_box;
|
||||||
float m_max_print_height{ 0.0f };
|
float m_max_print_height{ 0.0f };
|
||||||
std::vector<Color> m_tool_colors;
|
std::vector<ColorRGBA> m_tool_colors;
|
||||||
Layers m_layers;
|
Layers m_layers;
|
||||||
std::array<unsigned int, 2> m_layers_z_range;
|
std::array<unsigned int, 2> m_layers_z_range;
|
||||||
std::vector<ExtrusionRole> m_roles;
|
std::vector<ExtrusionRole> m_roles;
|
||||||
@ -838,7 +835,7 @@ private:
|
|||||||
}
|
}
|
||||||
bool is_visible(const Path& path) const { return is_visible(path.role); }
|
bool is_visible(const Path& path) const { return is_visible(path.role); }
|
||||||
void log_memory_used(const std::string& label, int64_t additional = 0) const;
|
void log_memory_used(const std::string& label, int64_t additional = 0) const;
|
||||||
Color option_color(EMoveType move_type) const;
|
ColorRGBA option_color(EMoveType move_type) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace GUI
|
} // namespace GUI
|
||||||
|
@ -72,11 +72,10 @@
|
|||||||
|
|
||||||
static constexpr const float TRACKBALLSIZE = 0.8f;
|
static constexpr const float TRACKBALLSIZE = 0.8f;
|
||||||
|
|
||||||
static constexpr const float DEFAULT_BG_DARK_COLOR[3] = { 0.478f, 0.478f, 0.478f };
|
static const Slic3r::ColorRGB DEFAULT_BG_DARK_COLOR = { 0.478f, 0.478f, 0.478f };
|
||||||
static constexpr const float DEFAULT_BG_LIGHT_COLOR[3] = { 0.753f, 0.753f, 0.753f };
|
static const Slic3r::ColorRGB DEFAULT_BG_LIGHT_COLOR = { 0.753f, 0.753f, 0.753f };
|
||||||
static constexpr const float ERROR_BG_DARK_COLOR[3] = { 0.478f, 0.192f, 0.039f };
|
static const Slic3r::ColorRGB ERROR_BG_DARK_COLOR = { 0.478f, 0.192f, 0.039f };
|
||||||
static constexpr const float ERROR_BG_LIGHT_COLOR[3] = { 0.753f, 0.192f, 0.039f };
|
static const Slic3r::ColorRGB ERROR_BG_LIGHT_COLOR = { 0.753f, 0.192f, 0.039f };
|
||||||
//static constexpr const float AXES_COLOR[3][3] = { { 1.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 0.0f, 1.0f } };
|
|
||||||
|
|
||||||
// Number of floats
|
// Number of floats
|
||||||
static constexpr const size_t MAX_VERTEX_BUFFER_SIZE = 131072 * 6; // 3.15MB
|
static constexpr const size_t MAX_VERTEX_BUFFER_SIZE = 131072 * 6; // 3.15MB
|
||||||
@ -731,13 +730,8 @@ void GLCanvas3D::Labels::render(const std::vector<const ModelInstance*>& sorted_
|
|||||||
}
|
}
|
||||||
|
|
||||||
// force re-render while the windows gets to its final size (it takes several frames)
|
// force re-render while the windows gets to its final size (it takes several frames)
|
||||||
#if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
if (ImGui::GetWindowContentRegionWidth() + 2.0f * ImGui::GetStyle().WindowPadding.x != ImGui::CalcWindowNextAutoFitSize(ImGui::GetCurrentWindow()).x)
|
if (ImGui::GetWindowContentRegionWidth() + 2.0f * ImGui::GetStyle().WindowPadding.x != ImGui::CalcWindowNextAutoFitSize(ImGui::GetCurrentWindow()).x)
|
||||||
imgui.set_requires_extra_frame();
|
imgui.set_requires_extra_frame();
|
||||||
#else
|
|
||||||
if (ImGui::GetWindowContentRegionWidth() + 2.0f * ImGui::GetStyle().WindowPadding.x != ImGui::CalcWindowNextAutoFitSize(ImGui::GetCurrentWindow()).x)
|
|
||||||
m_canvas.request_extra_frame();
|
|
||||||
#endif // ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
|
|
||||||
imgui.end();
|
imgui.end();
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor();
|
||||||
@ -783,13 +777,8 @@ void GLCanvas3D::Tooltip::render(const Vec2d& mouse_position, GLCanvas3D& canvas
|
|||||||
ImGui::TextUnformatted(m_text.c_str());
|
ImGui::TextUnformatted(m_text.c_str());
|
||||||
|
|
||||||
// force re-render while the windows gets to its final size (it may take several frames) or while hidden
|
// force re-render while the windows gets to its final size (it may take several frames) or while hidden
|
||||||
#if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
if (alpha < 1.0f || ImGui::GetWindowContentRegionWidth() + 2.0f * ImGui::GetStyle().WindowPadding.x != ImGui::CalcWindowNextAutoFitSize(ImGui::GetCurrentWindow()).x)
|
if (alpha < 1.0f || ImGui::GetWindowContentRegionWidth() + 2.0f * ImGui::GetStyle().WindowPadding.x != ImGui::CalcWindowNextAutoFitSize(ImGui::GetCurrentWindow()).x)
|
||||||
imgui.set_requires_extra_frame();
|
imgui.set_requires_extra_frame();
|
||||||
#else
|
|
||||||
if (alpha < 1.0f || ImGui::GetWindowContentRegionWidth() + 2.0f * ImGui::GetStyle().WindowPadding.x != ImGui::CalcWindowNextAutoFitSize(ImGui::GetCurrentWindow()).x)
|
|
||||||
canvas.request_extra_frame();
|
|
||||||
#endif // ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
|
|
||||||
size = ImGui::GetWindowSize();
|
size = ImGui::GetWindowSize();
|
||||||
|
|
||||||
@ -859,8 +848,8 @@ void GLCanvas3D::SequentialPrintClearance::set_polygons(const Polygons& polygons
|
|||||||
|
|
||||||
void GLCanvas3D::SequentialPrintClearance::render()
|
void GLCanvas3D::SequentialPrintClearance::render()
|
||||||
{
|
{
|
||||||
std::array<float, 4> FILL_COLOR = { 1.0f, 0.0f, 0.0f, 0.5f };
|
const ColorRGBA FILL_COLOR = { 1.0f, 0.0f, 0.0f, 0.5f };
|
||||||
std::array<float, 4> NO_FILL_COLOR = { 1.0f, 1.0f, 1.0f, 0.75f };
|
const ColorRGBA NO_FILL_COLOR = { 1.0f, 1.0f, 1.0f, 0.75f };
|
||||||
|
|
||||||
GLShaderProgram* shader = wxGetApp().get_shader("gouraud_light");
|
GLShaderProgram* shader = wxGetApp().get_shader("gouraud_light");
|
||||||
if (shader == nullptr)
|
if (shader == nullptr)
|
||||||
@ -1126,10 +1115,9 @@ void GLCanvas3D::reset_volumes()
|
|||||||
|
|
||||||
ModelInstanceEPrintVolumeState GLCanvas3D::check_volumes_outside_state() const
|
ModelInstanceEPrintVolumeState GLCanvas3D::check_volumes_outside_state() const
|
||||||
{
|
{
|
||||||
assert(m_initialized);
|
ModelInstanceEPrintVolumeState state = ModelInstanceEPrintVolumeState::ModelInstancePVS_Inside;
|
||||||
|
if (m_initialized)
|
||||||
ModelInstanceEPrintVolumeState state;
|
m_volumes.check_outside_state(m_bed.build_volume(), &state);
|
||||||
m_volumes.check_outside_state(m_bed.build_volume(), &state);
|
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1303,15 +1291,6 @@ bool GLCanvas3D::is_reload_delayed() const
|
|||||||
void GLCanvas3D::enable_layers_editing(bool enable)
|
void GLCanvas3D::enable_layers_editing(bool enable)
|
||||||
{
|
{
|
||||||
m_layers_editing.set_enabled(enable);
|
m_layers_editing.set_enabled(enable);
|
||||||
#if !ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
|
||||||
const Selection::IndicesList& idxs = m_selection.get_volume_idxs();
|
|
||||||
for (unsigned int idx : idxs) {
|
|
||||||
GLVolume* v = m_volumes.volumes[idx];
|
|
||||||
if (v->is_modifier)
|
|
||||||
v->force_transparent = enable;
|
|
||||||
}
|
|
||||||
#endif // !ENABLE_MODIFIERS_ALWAYS_TRANSPARENT
|
|
||||||
|
|
||||||
set_as_dirty();
|
set_as_dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2263,29 +2242,20 @@ void GLCanvas3D::on_idle(wxIdleEvent& evt)
|
|||||||
m_dirty |= wxGetApp().plater()->get_notification_manager()->update_notifications(*this);
|
m_dirty |= wxGetApp().plater()->get_notification_manager()->update_notifications(*this);
|
||||||
auto gizmo = wxGetApp().plater()->canvas3D()->get_gizmos_manager().get_current();
|
auto gizmo = wxGetApp().plater()->canvas3D()->get_gizmos_manager().get_current();
|
||||||
if (gizmo != nullptr) m_dirty |= gizmo->update_items_state();
|
if (gizmo != nullptr) m_dirty |= gizmo->update_items_state();
|
||||||
#if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
// ImGuiWrapper::m_requires_extra_frame may have been set by a render made outside of the OnIdle mechanism
|
// ImGuiWrapper::m_requires_extra_frame may have been set by a render made outside of the OnIdle mechanism
|
||||||
bool imgui_requires_extra_frame = wxGetApp().imgui()->requires_extra_frame();
|
bool imgui_requires_extra_frame = wxGetApp().imgui()->requires_extra_frame();
|
||||||
m_dirty |= imgui_requires_extra_frame;
|
m_dirty |= imgui_requires_extra_frame;
|
||||||
#endif // ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
|
|
||||||
if (!m_dirty)
|
if (!m_dirty)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
// this needs to be done here.
|
// this needs to be done here.
|
||||||
// during the render launched by the refresh the value may be set again
|
// during the render launched by the refresh the value may be set again
|
||||||
wxGetApp().imgui()->reset_requires_extra_frame();
|
wxGetApp().imgui()->reset_requires_extra_frame();
|
||||||
#endif // ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
|
|
||||||
_refresh_if_shown_on_screen();
|
_refresh_if_shown_on_screen();
|
||||||
|
|
||||||
#if ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
if (m_extra_frame_requested || mouse3d_controller_applied || imgui_requires_extra_frame || wxGetApp().imgui()->requires_extra_frame()) {
|
if (m_extra_frame_requested || mouse3d_controller_applied || imgui_requires_extra_frame || wxGetApp().imgui()->requires_extra_frame()) {
|
||||||
#else
|
|
||||||
if (m_extra_frame_requested || mouse3d_controller_applied) {
|
|
||||||
m_dirty = true;
|
|
||||||
#endif // ENABLE_ENHANCED_IMGUI_SLIDER_FLOAT
|
|
||||||
m_extra_frame_requested = false;
|
m_extra_frame_requested = false;
|
||||||
evt.RequestMore();
|
evt.RequestMore();
|
||||||
}
|
}
|
||||||
@ -4144,9 +4114,6 @@ void GLCanvas3D::_render_thumbnail_internal(ThumbnailData& thumbnail_data, const
|
|||||||
return ret;
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const std::array<float, 4> orange = { 0.923f, 0.504f, 0.264f, 1.0f };
|
|
||||||
static const std::array<float, 4> gray = { 0.64f, 0.64f, 0.64f, 1.0f };
|
|
||||||
|
|
||||||
GLVolumePtrs visible_volumes;
|
GLVolumePtrs visible_volumes;
|
||||||
|
|
||||||
for (GLVolume* vol : volumes.volumes) {
|
for (GLVolume* vol : volumes.volumes) {
|
||||||
@ -4201,7 +4168,7 @@ void GLCanvas3D::_render_thumbnail_internal(ThumbnailData& thumbnail_data, const
|
|||||||
shader->set_uniform("emission_factor", 0.0f);
|
shader->set_uniform("emission_factor", 0.0f);
|
||||||
|
|
||||||
for (GLVolume* vol : visible_volumes) {
|
for (GLVolume* vol : visible_volumes) {
|
||||||
shader->set_uniform("uniform_color", (vol->printable && !vol->is_outside) ? (current_printer_technology() == ptSLA ? vol->color : orange) : gray);
|
shader->set_uniform("uniform_color", (vol->printable && !vol->is_outside) ? (current_printer_technology() == ptSLA ? vol->color : ColorRGBA::ORANGE()) : ColorRGBA::GRAY());
|
||||||
// the volume may have been deactivated by an active gizmo
|
// the volume may have been deactivated by an active gizmo
|
||||||
bool is_active = vol->is_active;
|
bool is_active = vol->is_active;
|
||||||
vol->is_active = true;
|
vol->is_active = true;
|
||||||
@ -4932,19 +4899,20 @@ void GLCanvas3D::_picking_pass()
|
|||||||
int volume_id = -1;
|
int volume_id = -1;
|
||||||
int gizmo_id = -1;
|
int gizmo_id = -1;
|
||||||
|
|
||||||
GLubyte color[4] = { 0, 0, 0, 0 };
|
std::array<GLubyte, 4> color = { 0, 0, 0, 0 };
|
||||||
const Size& cnv_size = get_canvas_size();
|
const Size& cnv_size = get_canvas_size();
|
||||||
bool inside = 0 <= m_mouse.position(0) && m_mouse.position(0) < cnv_size.get_width() && 0 <= m_mouse.position(1) && m_mouse.position(1) < cnv_size.get_height();
|
bool inside = 0 <= m_mouse.position(0) && m_mouse.position(0) < cnv_size.get_width() && 0 <= m_mouse.position(1) && m_mouse.position(1) < cnv_size.get_height();
|
||||||
if (inside) {
|
if (inside) {
|
||||||
glsafe(::glReadPixels(m_mouse.position(0), cnv_size.get_height() - m_mouse.position(1) - 1, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, (void*)color));
|
glsafe(::glReadPixels(m_mouse.position(0), cnv_size.get_height() - m_mouse.position.y() - 1, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, (void*)color.data()));
|
||||||
if (picking_checksum_alpha_channel(color[0], color[1], color[2]) == color[3]) {
|
if (picking_checksum_alpha_channel(color[0], color[1], color[2]) == color[3]) {
|
||||||
// Only non-interpolated colors are valid, those have their lowest three bits zeroed.
|
// Only non-interpolated colors are valid, those have their lowest three bits zeroed.
|
||||||
// we reserve color = (0,0,0) for occluders (as the printbed)
|
// we reserve color = (0,0,0) for occluders (as the printbed)
|
||||||
// volumes' id are shifted by 1
|
// volumes' id are shifted by 1
|
||||||
// see: _render_volumes_for_picking()
|
// see: _render_volumes_for_picking()
|
||||||
volume_id = color[0] + (color[1] << 8) + (color[2] << 16) - 1;
|
unsigned int id = picking_encode(color[0], color[1], color[2]);
|
||||||
|
volume_id = id - 1;
|
||||||
// gizmos' id are instead properly encoded by the color
|
// gizmos' id are instead properly encoded by the color
|
||||||
gizmo_id = color[0] + (color[1] << 8) + (color[2] << 16);
|
gizmo_id = id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (0 <= volume_id && volume_id < (int)m_volumes.volumes.size()) {
|
if (0 <= volume_id && volume_id < (int)m_volumes.volumes.size()) {
|
||||||
@ -5060,19 +5028,11 @@ void GLCanvas3D::_render_background() const
|
|||||||
glsafe(::glDisable(GL_DEPTH_TEST));
|
glsafe(::glDisable(GL_DEPTH_TEST));
|
||||||
|
|
||||||
::glBegin(GL_QUADS);
|
::glBegin(GL_QUADS);
|
||||||
if (use_error_color)
|
::glColor3fv(use_error_color ? ERROR_BG_DARK_COLOR.data(): DEFAULT_BG_DARK_COLOR.data());
|
||||||
::glColor3fv(ERROR_BG_DARK_COLOR);
|
|
||||||
else
|
|
||||||
::glColor3fv(DEFAULT_BG_DARK_COLOR);
|
|
||||||
|
|
||||||
::glVertex2f(-1.0f, -1.0f);
|
::glVertex2f(-1.0f, -1.0f);
|
||||||
::glVertex2f(1.0f, -1.0f);
|
::glVertex2f(1.0f, -1.0f);
|
||||||
|
|
||||||
if (use_error_color)
|
::glColor3fv(use_error_color ? ERROR_BG_LIGHT_COLOR.data() : DEFAULT_BG_LIGHT_COLOR.data());
|
||||||
::glColor3fv(ERROR_BG_LIGHT_COLOR);
|
|
||||||
else
|
|
||||||
::glColor3fv(DEFAULT_BG_LIGHT_COLOR);
|
|
||||||
|
|
||||||
::glVertex2f(1.0f, 1.0f);
|
::glVertex2f(1.0f, 1.0f);
|
||||||
::glVertex2f(-1.0f, 1.0f);
|
::glVertex2f(-1.0f, 1.0f);
|
||||||
glsafe(::glEnd());
|
glsafe(::glEnd());
|
||||||
@ -5355,8 +5315,6 @@ void GLCanvas3D::_render_overlays()
|
|||||||
|
|
||||||
void GLCanvas3D::_render_volumes_for_picking() const
|
void GLCanvas3D::_render_volumes_for_picking() const
|
||||||
{
|
{
|
||||||
static const GLfloat INV_255 = 1.0f / 255.0f;
|
|
||||||
|
|
||||||
// do not cull backfaces to show broken geometry, if any
|
// do not cull backfaces to show broken geometry, if any
|
||||||
glsafe(::glDisable(GL_CULL_FACE));
|
glsafe(::glDisable(GL_CULL_FACE));
|
||||||
|
|
||||||
@ -5371,13 +5329,9 @@ void GLCanvas3D::_render_volumes_for_picking() const
|
|||||||
// Object picking mode. Render the object with a color encoding the object index.
|
// Object picking mode. Render the object with a color encoding the object index.
|
||||||
// we reserve color = (0,0,0) for occluders (as the printbed)
|
// we reserve color = (0,0,0) for occluders (as the printbed)
|
||||||
// so we shift volumes' id by 1 to get the proper color
|
// so we shift volumes' id by 1 to get the proper color
|
||||||
unsigned int id = 1 + volume.second.first;
|
const unsigned int id = 1 + volume.second.first;
|
||||||
unsigned int r = (id & (0x000000FF << 0)) << 0;
|
glsafe(::glColor4fv(picking_decode(id).data()));
|
||||||
unsigned int g = (id & (0x000000FF << 8)) >> 8;
|
volume.first->render();
|
||||||
unsigned int b = (id & (0x000000FF << 16)) >> 16;
|
|
||||||
unsigned int a = picking_checksum_alpha_channel(r, g, b);
|
|
||||||
glsafe(::glColor4f((GLfloat)r * INV_255, (GLfloat)g * INV_255, (GLfloat)b * INV_255, (GLfloat)a * INV_255));
|
|
||||||
volume.first->render();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5796,7 +5750,7 @@ void GLCanvas3D::_load_print_toolpaths(const BuildVolume &build_volume)
|
|||||||
if (!print->has_skirt() && !print->has_brim())
|
if (!print->has_skirt() && !print->has_brim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const std::array<float, 4> color = { 0.5f, 1.0f, 0.5f, 1.0f }; // greenish
|
const ColorRGBA color = ColorRGBA::GREENISH();
|
||||||
|
|
||||||
// number of skirt layers
|
// number of skirt layers
|
||||||
size_t total_layer_count = 0;
|
size_t total_layer_count = 0;
|
||||||
@ -5843,7 +5797,8 @@ void GLCanvas3D::_load_print_toolpaths(const BuildVolume &build_volume)
|
|||||||
|
|
||||||
void GLCanvas3D::_load_print_object_toolpaths(const PrintObject& print_object, const BuildVolume& build_volume, const std::vector<std::string>& str_tool_colors, const std::vector<CustomGCode::Item>& color_print_values)
|
void GLCanvas3D::_load_print_object_toolpaths(const PrintObject& print_object, const BuildVolume& build_volume, const std::vector<std::string>& str_tool_colors, const std::vector<CustomGCode::Item>& color_print_values)
|
||||||
{
|
{
|
||||||
std::vector<std::array<float, 4>> tool_colors = _parse_colors(str_tool_colors);
|
std::vector<ColorRGBA> tool_colors;
|
||||||
|
decode_colors(str_tool_colors, tool_colors);
|
||||||
|
|
||||||
struct Ctxt
|
struct Ctxt
|
||||||
{
|
{
|
||||||
@ -5852,20 +5807,20 @@ void GLCanvas3D::_load_print_object_toolpaths(const PrintObject& print_object, c
|
|||||||
bool has_perimeters;
|
bool has_perimeters;
|
||||||
bool has_infill;
|
bool has_infill;
|
||||||
bool has_support;
|
bool has_support;
|
||||||
const std::vector<std::array<float, 4>>* tool_colors;
|
const std::vector<ColorRGBA>* tool_colors;
|
||||||
bool is_single_material_print;
|
bool is_single_material_print;
|
||||||
int extruders_cnt;
|
int extruders_cnt;
|
||||||
const std::vector<CustomGCode::Item>* color_print_values;
|
const std::vector<CustomGCode::Item>* color_print_values;
|
||||||
|
|
||||||
static const std::array<float, 4>& color_perimeters() { static std::array<float, 4> color = { 1.0f, 1.0f, 0.0f, 1.f }; return color; } // yellow
|
static ColorRGBA color_perimeters() { return ColorRGBA::YELLOW(); }
|
||||||
static const std::array<float, 4>& color_infill() { static std::array<float, 4> color = { 1.0f, 0.5f, 0.5f, 1.f }; return color; } // redish
|
static ColorRGBA color_infill() { return ColorRGBA::REDISH(); }
|
||||||
static const std::array<float, 4>& color_support() { static std::array<float, 4> color = { 0.5f, 1.0f, 0.5f, 1.f }; return color; } // greenish
|
static ColorRGBA color_support() { return ColorRGBA::GREENISH(); }
|
||||||
static const std::array<float, 4>& color_pause_or_custom_code() { static std::array<float, 4> color = { 0.5f, 0.5f, 0.5f, 1.f }; return color; } // gray
|
static ColorRGBA color_pause_or_custom_code() { return ColorRGBA::GRAY(); }
|
||||||
|
|
||||||
// For cloring by a tool, return a parsed color.
|
// For cloring by a tool, return a parsed color.
|
||||||
bool color_by_tool() const { return tool_colors != nullptr; }
|
bool color_by_tool() const { return tool_colors != nullptr; }
|
||||||
size_t number_tools() const { return color_by_tool() ? tool_colors->size() : 0; }
|
size_t number_tools() const { return color_by_tool() ? tool_colors->size() : 0; }
|
||||||
const std::array<float, 4>& color_tool(size_t tool) const { return (*tool_colors)[tool]; }
|
const ColorRGBA& color_tool(size_t tool) const { return (*tool_colors)[tool]; }
|
||||||
|
|
||||||
// For coloring by a color_print(M600), return a parsed color.
|
// For coloring by a color_print(M600), return a parsed color.
|
||||||
bool color_by_color_print() const { return color_print_values!=nullptr; }
|
bool color_by_color_print() const { return color_print_values!=nullptr; }
|
||||||
@ -6005,7 +5960,7 @@ void GLCanvas3D::_load_print_object_toolpaths(const PrintObject& print_object, c
|
|||||||
//FIXME Improve the heuristics for a grain size.
|
//FIXME Improve the heuristics for a grain size.
|
||||||
size_t grain_size = std::max(ctxt.layers.size() / 16, size_t(1));
|
size_t grain_size = std::max(ctxt.layers.size() / 16, size_t(1));
|
||||||
tbb::spin_mutex new_volume_mutex;
|
tbb::spin_mutex new_volume_mutex;
|
||||||
auto new_volume = [this, &new_volume_mutex](const std::array<float, 4>& color) {
|
auto new_volume = [this, &new_volume_mutex](const ColorRGBA& color) {
|
||||||
// Allocate the volume before locking.
|
// Allocate the volume before locking.
|
||||||
GLVolume *volume = new GLVolume(color);
|
GLVolume *volume = new GLVolume(color);
|
||||||
volume->is_extrusion_path = true;
|
volume->is_extrusion_path = true;
|
||||||
@ -6146,21 +6101,22 @@ void GLCanvas3D::_load_wipe_tower_toolpaths(const BuildVolume& build_volume, con
|
|||||||
if (!print->is_step_done(psWipeTower))
|
if (!print->is_step_done(psWipeTower))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::vector<std::array<float, 4>> tool_colors = _parse_colors(str_tool_colors);
|
std::vector<ColorRGBA> tool_colors;
|
||||||
|
decode_colors(str_tool_colors, tool_colors);
|
||||||
|
|
||||||
struct Ctxt
|
struct Ctxt
|
||||||
{
|
{
|
||||||
const Print *print;
|
const Print *print;
|
||||||
const std::vector<std::array<float, 4>>* tool_colors;
|
const std::vector<ColorRGBA>* tool_colors;
|
||||||
Vec2f wipe_tower_pos;
|
Vec2f wipe_tower_pos;
|
||||||
float wipe_tower_angle;
|
float wipe_tower_angle;
|
||||||
|
|
||||||
static const std::array<float, 4>& color_support() { static std::array<float, 4> color = { 0.5f, 1.0f, 0.5f, 1.f }; return color; } // greenish
|
static ColorRGBA color_support() { return ColorRGBA::GREENISH(); }
|
||||||
|
|
||||||
// For cloring by a tool, return a parsed color.
|
// For cloring by a tool, return a parsed color.
|
||||||
bool color_by_tool() const { return tool_colors != nullptr; }
|
bool color_by_tool() const { return tool_colors != nullptr; }
|
||||||
size_t number_tools() const { return this->color_by_tool() ? tool_colors->size() : 0; }
|
size_t number_tools() const { return this->color_by_tool() ? tool_colors->size() : 0; }
|
||||||
const std::array<float, 4>& color_tool(size_t tool) const { return (*tool_colors)[tool]; }
|
const ColorRGBA& color_tool(size_t tool) const { return (*tool_colors)[tool]; }
|
||||||
int volume_idx(int tool, int feature) const {
|
int volume_idx(int tool, int feature) const {
|
||||||
return this->color_by_tool() ? std::min<int>(this->number_tools() - 1, std::max<int>(tool, 0)) : feature;
|
return this->color_by_tool() ? std::min<int>(this->number_tools() - 1, std::max<int>(tool, 0)) : feature;
|
||||||
}
|
}
|
||||||
@ -6192,7 +6148,7 @@ void GLCanvas3D::_load_wipe_tower_toolpaths(const BuildVolume& build_volume, con
|
|||||||
size_t n_items = print->wipe_tower_data().tool_changes.size() + (ctxt.priming.empty() ? 0 : 1);
|
size_t n_items = print->wipe_tower_data().tool_changes.size() + (ctxt.priming.empty() ? 0 : 1);
|
||||||
size_t grain_size = std::max(n_items / 128, size_t(1));
|
size_t grain_size = std::max(n_items / 128, size_t(1));
|
||||||
tbb::spin_mutex new_volume_mutex;
|
tbb::spin_mutex new_volume_mutex;
|
||||||
auto new_volume = [this, &new_volume_mutex](const std::array<float, 4>& color) {
|
auto new_volume = [this, &new_volume_mutex](const ColorRGBA& color) {
|
||||||
auto *volume = new GLVolume(color);
|
auto *volume = new GLVolume(color);
|
||||||
volume->is_extrusion_path = true;
|
volume->is_extrusion_path = true;
|
||||||
tbb::spin_mutex::scoped_lock lock;
|
tbb::spin_mutex::scoped_lock lock;
|
||||||
@ -6311,7 +6267,7 @@ void GLCanvas3D::_load_sla_shells()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
auto add_volume = [this](const SLAPrintObject &object, int volume_id, const SLAPrintObject::Instance& instance,
|
auto add_volume = [this](const SLAPrintObject &object, int volume_id, const SLAPrintObject::Instance& instance,
|
||||||
const TriangleMesh& mesh, const std::array<float, 4>& color, bool outside_printer_detection_enabled) {
|
const TriangleMesh& mesh, const ColorRGBA& color, bool outside_printer_detection_enabled) {
|
||||||
m_volumes.volumes.emplace_back(new GLVolume(color));
|
m_volumes.volumes.emplace_back(new GLVolume(color));
|
||||||
GLVolume& v = *m_volumes.volumes.back();
|
GLVolume& v = *m_volumes.volumes.back();
|
||||||
#if ENABLE_SMOOTH_NORMALS
|
#if ENABLE_SMOOTH_NORMALS
|
||||||
@ -6373,28 +6329,6 @@ void GLCanvas3D::_set_warning_notification_if_needed(EWarning warning)
|
|||||||
_set_warning_notification(warning, show);
|
_set_warning_notification(warning, show);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::array<float, 4>> GLCanvas3D::_parse_colors(const std::vector<std::string>& colors)
|
|
||||||
{
|
|
||||||
static const float INV_255 = 1.0f / 255.0f;
|
|
||||||
|
|
||||||
std::vector<std::array<float, 4>> output(colors.size(), { 1.0f, 1.0f, 1.0f, 1.0f });
|
|
||||||
for (size_t i = 0; i < colors.size(); ++i) {
|
|
||||||
const std::string& color = colors[i];
|
|
||||||
const char* c = color.data() + 1;
|
|
||||||
if (color.size() == 7 && color.front() == '#') {
|
|
||||||
for (size_t j = 0; j < 3; ++j) {
|
|
||||||
int digit1 = hex_digit_to_int(*c++);
|
|
||||||
int digit2 = hex_digit_to_int(*c++);
|
|
||||||
if (digit1 == -1 || digit2 == -1)
|
|
||||||
break;
|
|
||||||
|
|
||||||
output[i][j] = float(digit1 * 16 + digit2) * INV_255;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return output;
|
|
||||||
}
|
|
||||||
|
|
||||||
void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
||||||
{
|
{
|
||||||
enum ErrorType{
|
enum ErrorType{
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user