mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-20 08:09:25 +08:00
Merge branch 'dev' of https://github.com/prusa3d/PrusaSlicer into et_copy_custom_bed_model_and_texture
This commit is contained in:
commit
82967d4447
@ -496,6 +496,8 @@ foreach(po_file ${L10N_PO_FILES})
|
||||
add_custom_command(
|
||||
TARGET gettext_merge_po_with_pot PRE_BUILD
|
||||
COMMAND msgmerge -N -o ${po_file} ${po_file} "${L10N_DIR}/PrusaSlicer.pot"
|
||||
# delete obsolete lines from resulting PO to avoid conflicts after a merging of it with wxWidgets.po
|
||||
COMMAND msgattrib --no-obsolete -o ${po_file} ${po_file}
|
||||
DEPENDS ${po_file}
|
||||
)
|
||||
endforeach()
|
||||
@ -513,7 +515,9 @@ foreach(po_file ${L10N_PO_FILES})
|
||||
#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}
|
||||
COMMAND msgcat --use-first -o ${po_file} ${po_file} ${wx_po_file}
|
||||
# delete obsolete lines from resulting PO
|
||||
COMMAND msgattrib --no-obsolete -o ${po_file} ${po_file}
|
||||
DEPENDS ${po_file}
|
||||
)
|
||||
endforeach()
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
@ECHO [-PRODUCT ^<product^>] [-DESTDIR ^<directory^>]
|
||||
@ECHO [-STEPS ^<all^|all-dirty^|app^|app-dirty^|deps^|deps-dirty^>]
|
||||
@ECHO [-RUN ^<console^|custom^|none^|viewer^|window^>]
|
||||
@ECHO [-PRIORITY ^<normal^|low^>]
|
||||
@ECHO.
|
||||
@ECHO -a -ARCH Target processor architecture
|
||||
@ECHO Default: %PS_ARCH_HOST%
|
||||
@ -38,6 +39,8 @@
|
||||
@ECHO -d -DESTDIR Deps destination directory
|
||||
@ECHO Warning: Changing destdir path will not delete the old destdir.
|
||||
@ECHO Default: %PS_DESTDIR_DEFAULT_MSG%
|
||||
@ECHO -p -PRIORITY Build CPU priority
|
||||
@ECHO Default: normal
|
||||
@ECHO.
|
||||
@ECHO Examples:
|
||||
@ECHO.
|
||||
@ -86,6 +89,7 @@ SET PS_RUN=none
|
||||
SET PS_DESTDIR=
|
||||
SET PS_VERSION=
|
||||
SET PS_PRODUCT=%PS_PRODUCT_DEFAULT%
|
||||
SET PS_PRIORITY=normal
|
||||
CALL :RESOLVE_DESTDIR_CACHE
|
||||
|
||||
REM Set up parameters used by help menu
|
||||
@ -99,7 +103,7 @@ SET EXIT_STATUS=1
|
||||
SET PS_CURRENT_STEP=arguments
|
||||
SET PARSER_STATE=
|
||||
SET PARSER_FAIL=
|
||||
FOR %%I in (%*) DO CALL :PARSE_OPTION "ARCH CONFIG DESTDIR STEPS RUN VERSION PRODUCT" PARSER_STATE "%%~I"
|
||||
FOR %%I in (%*) DO CALL :PARSE_OPTION "ARCH CONFIG DESTDIR STEPS RUN VERSION PRODUCT PRIORITY" PARSER_STATE "%%~I"
|
||||
IF "%PARSER_FAIL%" NEQ "" (
|
||||
@ECHO ERROR: Invalid switch: %PARSER_FAIL% 1>&2
|
||||
GOTO :HELP
|
||||
@ -114,6 +118,9 @@ CALL :TOLOWER PS_ARCH
|
||||
SET PS_ARCH=%PS_ARCH:amd64=x64%
|
||||
CALL :PARSE_OPTION_VALUE %PS_CONFIG_LIST:;= % PS_CONFIG
|
||||
IF "%PS_CONFIG%" EQU "" GOTO :HELP
|
||||
CALL :PARSE_OPTION_VALUE "normal low" PS_PRIORITY
|
||||
SET PS_PRIORITY=%PS_PRIORITY:normal= %
|
||||
SET PS_PRIORITY=%PS_PRIORITY:low=-low%
|
||||
REM RESOLVE_DESTDIR_CACHE must go after PS_ARCH and PS_CONFIG, but before PS STEPS
|
||||
CALL :RESOLVE_DESTDIR_CACHE
|
||||
IF "%PS_STEPS%" EQU "" SET PS_STEPS=%PS_STEPS_DEFAULT%
|
||||
@ -200,7 +207,7 @@ IF %ERRORLEVEL% NEQ 0 IF "%PS_STEPS_DIRTY%" NEQ "" (
|
||||
(del CMakeCache.txt && cmake.exe .. -DDESTDIR="%PS_DESTDIR%") || GOTO :END
|
||||
) ELSE GOTO :END
|
||||
(echo %PS_DESTDIR%)> "%PS_DEPS_PATH_FILE%"
|
||||
msbuild /m ALL_BUILD.vcxproj /p:Configuration=%PS_CONFIG% /v:quiet || GOTO :END
|
||||
msbuild /m ALL_BUILD.vcxproj /p:Configuration=%PS_CONFIG% /v:quiet %PS_PRIORITY% || GOTO :END
|
||||
cd ..\..
|
||||
IF /I "%PS_STEPS:~0,4%" EQU "deps" GOTO :RUN_APP
|
||||
|
||||
@ -223,7 +230,7 @@ IF %ERRORLEVEL% NEQ 0 IF "%PS_STEPS_DIRTY%" NEQ "" (
|
||||
(del CMakeCache.txt && cmake.exe .. -DCMAKE_PREFIX_PATH="%PS_DESTDIR%\usr\local" -DCMAKE_CONFIGURATION_TYPES=%PS_CONFIG_LIST%) || GOTO :END
|
||||
) ELSE GOTO :END
|
||||
REM Skip the build step if we're using the undocumented app-cmake to regenerate the full config from inside devenv
|
||||
IF "%PS_STEPS%" NEQ "app-cmake" msbuild /m ALL_BUILD.vcxproj /p:Configuration=%PS_CONFIG% /v:quiet || GOTO :END
|
||||
IF "%PS_STEPS%" NEQ "app-cmake" msbuild /m ALL_BUILD.vcxproj /p:Configuration=%PS_CONFIG% /v:quiet %PS_PRIORITY% || GOTO :END
|
||||
(echo %PS_DESTDIR%)> "%PS_DEPS_PATH_FILE_FOR_CONFIG%"
|
||||
|
||||
REM Run app
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -1231,7 +1231,7 @@ msgstr "Aplicar"
|
||||
msgid "Apply changes"
|
||||
msgstr "Aplicar cambios"
|
||||
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:736
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:730
|
||||
msgid "Apply color change automatically"
|
||||
msgstr "Aplicar el cambio de color automáticamente"
|
||||
|
||||
@ -1931,6 +1931,10 @@ msgstr "Capacidades"
|
||||
msgid "Capture a configuration snapshot"
|
||||
msgstr "Captura una instantánea de configuración"
|
||||
|
||||
#: src/slic3r/GUI/Tab.cpp:3995
|
||||
msgid "Case insensitive"
|
||||
msgstr "No distingue entre mayúsculas y minúsculas"
|
||||
|
||||
#: src/slic3r/GUI/ImGuiWrapper.cpp:961 src/slic3r/GUI/Search.cpp:472
|
||||
msgid "Category"
|
||||
msgstr "Categoría"
|
||||
@ -2210,12 +2214,12 @@ msgstr "Código G Cambio Color"
|
||||
msgid "Color change G-code"
|
||||
msgstr "Código G Cambio color"
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3669 src/slic3r/GUI/GUI_Preview.cpp:1061
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3669 src/slic3r/GUI/GUI_Preview.cpp:1055
|
||||
msgid "Color changes"
|
||||
msgstr "Cambios de color"
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3304 src/slic3r/GUI/GUI_Preview.cpp:225
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:963
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:957
|
||||
msgid "Color Print"
|
||||
msgstr "Color Print"
|
||||
|
||||
@ -2347,19 +2351,6 @@ msgstr "La configuración se editada desde ConfigWizard"
|
||||
msgid "Configuration notes"
|
||||
msgstr "Notas de configuración"
|
||||
|
||||
#: resources/data/hints.ini: [hint:Configuration snapshots]
|
||||
msgid ""
|
||||
"Configuration snapshots\n"
|
||||
"Did you know that roll back to a complete backup of all system and user "
|
||||
"profiles? You can view and move back and forth between snapshots using the "
|
||||
"Configuration - <a>Configuration snapshots menu</a>."
|
||||
msgstr ""
|
||||
"Instantáneas de la configuración\n"
|
||||
"¿Sabías que se puede retroceder a una copia de seguridad completa de todos "
|
||||
"los perfiles del sistema y de los usuarios? Puede ver y avanzar entre las "
|
||||
"instantáneas utilizando el menú Configuración - <a>Instantáneas de la "
|
||||
"configuración</a>."
|
||||
|
||||
#: resources/data/hints.ini: [hint:Configuration snapshots]
|
||||
msgid ""
|
||||
"Configuration snapshots\n"
|
||||
@ -2804,7 +2795,7 @@ msgstr ""
|
||||
"CURL init ha fallado. PrusaSlicer no podrá establecer conexiones de red. "
|
||||
"Consulta los registros para obtener detalles adicionales."
|
||||
|
||||
#: src/slic3r/GUI/wxExtensions.cpp:644
|
||||
#: src/slic3r/GUI/wxExtensions.cpp:645
|
||||
#, c-format, boost-format
|
||||
msgid "Current mode is %s"
|
||||
msgstr "El modo actual es %s"
|
||||
@ -2847,7 +2838,7 @@ msgstr "Código G personalizado"
|
||||
msgid "Custom G-code on current layer (%1% mm)."
|
||||
msgstr "Código G personalizado en la capa actual (%1% mm)."
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3671 src/slic3r/GUI/GUI_Preview.cpp:1063
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3671 src/slic3r/GUI/GUI_Preview.cpp:1057
|
||||
msgid "Custom G-codes"
|
||||
msgstr "Códigos G personalizados"
|
||||
|
||||
@ -3197,7 +3188,7 @@ msgstr "Dependencias"
|
||||
msgid "Deretraction Speed"
|
||||
msgstr "Velocidad de deretracción"
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3666 src/slic3r/GUI/GUI_Preview.cpp:1058
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3666 src/slic3r/GUI/GUI_Preview.cpp:1052
|
||||
msgid "Deretractions"
|
||||
msgstr "Deretracciones"
|
||||
|
||||
@ -4153,7 +4144,7 @@ msgstr ""
|
||||
"del puente), para aplicar la velocidad del puente a ellos y habilitar el "
|
||||
"ventilador."
|
||||
|
||||
#: src/slic3r/GUI/GUI_App.cpp:2240 src/slic3r/GUI/wxExtensions.cpp:710
|
||||
#: src/slic3r/GUI/GUI_App.cpp:2240 src/slic3r/GUI/wxExtensions.cpp:711
|
||||
msgid "Expert"
|
||||
msgstr "Experto"
|
||||
|
||||
@ -4562,7 +4553,7 @@ msgid "Fatal error, exception catched: %1%"
|
||||
msgstr "Error fatal, excepción detectada: %1%"
|
||||
|
||||
#: 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:964
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:217 src/slic3r/GUI/GUI_Preview.cpp:958
|
||||
msgid "Feature type"
|
||||
msgstr "Tipo de función"
|
||||
|
||||
@ -4580,7 +4571,7 @@ msgstr "Impresoras de Tecnología FFF"
|
||||
msgid "Filament"
|
||||
msgstr "Filamento"
|
||||
|
||||
#: src/slic3r/GUI/ConfigWizard.cpp:755 src/libslic3r/Preset.cpp:1338
|
||||
#: src/slic3r/GUI/ConfigWizard.cpp:755 src/libslic3r/Preset.cpp:1339
|
||||
msgid "filament"
|
||||
msgstr "filamento"
|
||||
|
||||
@ -5157,10 +5148,6 @@ msgstr "Previsualización código G"
|
||||
msgid "G-code resolution"
|
||||
msgstr "Resolución del código G"
|
||||
|
||||
#: src/slic3r/GUI/Tab.cpp:1704
|
||||
msgid "G-code Substitutions"
|
||||
msgstr "Sustituciones del código G"
|
||||
|
||||
#: src/libslic3r/PrintConfig.cpp:1361
|
||||
msgid "G-code substitutions"
|
||||
msgstr "Sustituciones del código G"
|
||||
@ -5886,17 +5873,6 @@ msgstr ""
|
||||
"PrusaSlicer existente. Anula el valor de configuración \"single_instance\" "
|
||||
"de las preferencias de la aplicación."
|
||||
|
||||
#: src/slic3r/GUI/Preferences.cpp:364
|
||||
msgid ""
|
||||
"If enabled, the descriptions of configuration parameters in settings tabs "
|
||||
"wouldn't work as hyperlinks. If disabled, the descriptions of configuration "
|
||||
"parameters in settings tabs will work as hyperlinks."
|
||||
msgstr ""
|
||||
"Si está habilitado, las descripciones de los parámetros de configuración en "
|
||||
"las pestañas de configuración no funcionarán como hipervínculos. Si está "
|
||||
"deshabilitado, las descripciones de los parámetros de configuración en las "
|
||||
"pestañas de configuración funcionarán como hipervínculos."
|
||||
|
||||
#: src/slic3r/GUI/Preferences.cpp:305
|
||||
msgid ""
|
||||
"If enabled, the legacy 3DConnexion devices settings dialog is available by "
|
||||
@ -6852,7 +6828,7 @@ msgstr "Valor del Ajuste Izquierdo"
|
||||
msgid "Left View"
|
||||
msgstr "Vista izquierda"
|
||||
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:1066
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:1060
|
||||
msgid "Legend/Estimated printing time"
|
||||
msgstr "Leyenda/Tiempo de impresión estimado"
|
||||
|
||||
@ -7156,6 +7132,10 @@ msgstr "Edición manual"
|
||||
msgid "Masked SLA file exported to %1%"
|
||||
msgstr "Archivo SLA enmascarado exportado a %1%"
|
||||
|
||||
#: src/slic3r/GUI/Tab.cpp:4004
|
||||
msgid "Match single line"
|
||||
msgstr "Coincidir con una sola línea"
|
||||
|
||||
#: src/slic3r/GUI/MainFrame.cpp:1582
|
||||
msgid "Mate&rial Settings Tab"
|
||||
msgstr "Pestaña Ajustes de Mate&rial"
|
||||
@ -7796,7 +7776,7 @@ msgstr "Reparación del modelo cancelada"
|
||||
msgid "Model repair finished"
|
||||
msgstr "Reparación del modelo terminada"
|
||||
|
||||
#: src/slic3r/GUI/GUI_App.cpp:2239 src/slic3r/GUI/wxExtensions.cpp:709
|
||||
#: src/slic3r/GUI/GUI_App.cpp:2239 src/slic3r/GUI/wxExtensions.cpp:710
|
||||
msgctxt "Mode"
|
||||
msgid "Advanced"
|
||||
msgstr "Avanzado"
|
||||
@ -8187,7 +8167,7 @@ msgstr[1] ""
|
||||
"Ten en cuenta que estas impresoras se eliminarán después de borrar el ajuste "
|
||||
"seleccionado."
|
||||
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:734
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:728
|
||||
msgid "NOTE:"
|
||||
msgstr "NOTA:"
|
||||
|
||||
@ -9481,7 +9461,7 @@ msgstr "Archivo anterior laminado ("
|
||||
msgid "Prime all printing extruders"
|
||||
msgstr "Cebar todos los extrusores de impresión"
|
||||
|
||||
#: src/slic3r/GUI/ConfigSnapshotDialog.cpp:64 src/libslic3r/Preset.cpp:1337
|
||||
#: src/slic3r/GUI/ConfigSnapshotDialog.cpp:64 src/libslic3r/Preset.cpp:1338
|
||||
msgid "print"
|
||||
msgstr "imprimir"
|
||||
|
||||
@ -9518,7 +9498,7 @@ msgstr "Cola de subida al host de impresión"
|
||||
msgid "Print mode"
|
||||
msgstr "Modo de impresión"
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3670 src/slic3r/GUI/GUI_Preview.cpp:1062
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3670 src/slic3r/GUI/GUI_Preview.cpp:1056
|
||||
msgid "Print pauses"
|
||||
msgstr "Pausas de impresión"
|
||||
|
||||
@ -9570,7 +9550,7 @@ msgstr ""
|
||||
msgid "Printer"
|
||||
msgstr "Impresora"
|
||||
|
||||
#: src/slic3r/GUI/ConfigSnapshotDialog.cpp:71 src/libslic3r/Preset.cpp:1341
|
||||
#: src/slic3r/GUI/ConfigSnapshotDialog.cpp:71 src/libslic3r/Preset.cpp:1342
|
||||
msgid "printer"
|
||||
msgstr "impresora"
|
||||
|
||||
@ -10102,6 +10082,10 @@ msgstr "Actualizar lista de impresoras"
|
||||
msgid "Regular"
|
||||
msgstr "Habitual"
|
||||
|
||||
#: src/slic3r/GUI/Tab.cpp:3991
|
||||
msgid "Regular expression"
|
||||
msgstr "Expresión regular"
|
||||
|
||||
#: src/slic3r/GUI/Preferences.cpp:435
|
||||
msgid "Release only"
|
||||
msgstr "Solo lanzamiento"
|
||||
@ -10497,7 +10481,7 @@ msgstr ""
|
||||
"Retracción cuando la herramienta está desactivada (configuraciones avanzadas "
|
||||
"para configuraciones de extrusores múltiples )"
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3665 src/slic3r/GUI/GUI_Preview.cpp:1057
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3665 src/slic3r/GUI/GUI_Preview.cpp:1051
|
||||
msgid "Retractions"
|
||||
msgstr "Retracciones"
|
||||
|
||||
@ -10818,7 +10802,7 @@ msgstr "Dirección de la costura"
|
||||
msgid "Seam preferred direction jitter"
|
||||
msgstr "Dirección preferida de unión jitter"
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3667 src/slic3r/GUI/GUI_Preview.cpp:1059
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3667 src/slic3r/GUI/GUI_Preview.cpp:1053
|
||||
msgid "Seams"
|
||||
msgstr "Costuras"
|
||||
|
||||
@ -11467,7 +11451,7 @@ msgstr ""
|
||||
"imprimibles. Haz clic con el botón derecho del ratón en el plato y "
|
||||
"selecciona<a>Añadir Forma - Galería</a>."
|
||||
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:1064
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:1058
|
||||
msgid "Shells"
|
||||
msgstr "Carcasas"
|
||||
|
||||
@ -11662,7 +11646,7 @@ msgstr "Mostrar/Ocultar Leyenda y Tiempo de impresión estimado"
|
||||
msgid "Show/Hide object/instance labels"
|
||||
msgstr "Muestra/Oculta etiquetas de pieza/repetición"
|
||||
|
||||
#: src/slic3r/GUI/GUI_App.cpp:2237 src/slic3r/GUI/wxExtensions.cpp:707
|
||||
#: src/slic3r/GUI/GUI_App.cpp:2237 src/slic3r/GUI/wxExtensions.cpp:708
|
||||
msgid "Simple"
|
||||
msgstr "Sencillo"
|
||||
|
||||
@ -11781,7 +11765,7 @@ msgstr "Herramienta de atajos de teclado SLA"
|
||||
|
||||
#: src/slic3r/GUI/ConfigSnapshotDialog.cpp:69
|
||||
#: src/slic3r/GUI/ConfigWizard.cpp:755 src/slic3r/GUI/GUI.cpp:340
|
||||
#: src/slic3r/GUI/Plater.cpp:820 src/libslic3r/Preset.cpp:1340
|
||||
#: src/slic3r/GUI/Plater.cpp:820 src/libslic3r/Preset.cpp:1341
|
||||
msgid "SLA material"
|
||||
msgstr "Material SLA"
|
||||
|
||||
@ -11801,7 +11785,7 @@ msgstr "Materiales SLA"
|
||||
msgid "SLA materials"
|
||||
msgstr "Materiales SLA"
|
||||
|
||||
#: src/slic3r/GUI/ConfigSnapshotDialog.cpp:68 src/libslic3r/Preset.cpp:1339
|
||||
#: src/slic3r/GUI/ConfigSnapshotDialog.cpp:68 src/libslic3r/Preset.cpp:1340
|
||||
msgid "SLA print"
|
||||
msgstr "Impresión SLA"
|
||||
|
||||
@ -11909,7 +11893,7 @@ msgstr ""
|
||||
msgid "Sliced Info"
|
||||
msgstr "Información del laminado"
|
||||
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:735
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:729
|
||||
#, boost-format
|
||||
msgid "Sliced object \"%1%\" looks like a logo or a sign"
|
||||
msgstr "El objeto laminado \"%1%\" parece un logotipo o un cartel"
|
||||
@ -12032,10 +12016,10 @@ msgid ""
|
||||
"section be filled with solid infill automatically? Set the<a>Solid infill "
|
||||
"threshold area</a>. (Expert mode only.)"
|
||||
msgstr ""
|
||||
"Área de umbral de relleno sólido\n"
|
||||
"¿Sabías que puede hacer que las partes de tu modelo con una sección "
|
||||
"transversal pequeña se rellenen con relleno sólido automáticamente? "
|
||||
"Establezca el <a>Área de umbral de relleno sólido</a>. (Sólo modo Experto.)"
|
||||
"Área umbral de relleno sólido\n"
|
||||
"¿Sabías que puedes hacer que las partes del modelo con una sección "
|
||||
"transversal pequeña se rellenen con relleno sólido automáticamente? Ajusta "
|
||||
"el <a>Área umbral de relleno sólido</a>. (Sólo en modo Experto.)"
|
||||
|
||||
#: src/libslic3r/PrintConfig.cpp:2313
|
||||
msgid "Solid infill threshold area"
|
||||
@ -12687,7 +12671,7 @@ msgstr "Cambiar a Previsualización"
|
||||
msgid "Switch to Settings"
|
||||
msgstr "Cambiar a Ajustes"
|
||||
|
||||
#: src/slic3r/GUI/wxExtensions.cpp:643
|
||||
#: src/slic3r/GUI/wxExtensions.cpp:644
|
||||
#, c-format, boost-format
|
||||
msgid "Switch to the %s mode"
|
||||
msgstr "Cambiar al modo %s"
|
||||
@ -14473,7 +14457,7 @@ msgid "Too many overlapping holes."
|
||||
msgstr "Demasiados agujeros superpuestos."
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3301 src/slic3r/GUI/GUI_Preview.cpp:224
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:964
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:958
|
||||
msgid "Tool"
|
||||
msgstr "Herramienta"
|
||||
|
||||
@ -14486,11 +14470,11 @@ msgstr "Herramienta nº"
|
||||
msgid "Tool change G-code"
|
||||
msgstr "Código G de cambio de herramienta"
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3668 src/slic3r/GUI/GUI_Preview.cpp:1060
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3668 src/slic3r/GUI/GUI_Preview.cpp:1054
|
||||
msgid "Tool changes"
|
||||
msgstr "Cambios de herramienta"
|
||||
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:1065
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:1059
|
||||
msgid "Tool marker"
|
||||
msgstr "Marcador de herramienta"
|
||||
|
||||
@ -14609,7 +14593,7 @@ msgstr "Traducir"
|
||||
msgid "Translation"
|
||||
msgstr "Translación"
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3605 src/slic3r/GUI/GUI_Preview.cpp:1055
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3605 src/slic3r/GUI/GUI_Preview.cpp:1049
|
||||
#: src/libslic3r/PrintConfig.cpp:2887
|
||||
msgid "Travel"
|
||||
msgstr "Recorrido"
|
||||
@ -15402,6 +15386,10 @@ msgstr ""
|
||||
"El símbolo de VIÑETA BLANCA indica que los valores son los mismos que los de "
|
||||
"los ajustes guardados la última vez."
|
||||
|
||||
#: src/slic3r/GUI/Tab.cpp:3999
|
||||
msgid "Whole word"
|
||||
msgstr "Palabra completa"
|
||||
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:219 src/libslic3r/PrintConfig.cpp:2982
|
||||
msgid "Width"
|
||||
msgstr "Ancho"
|
||||
@ -15438,7 +15426,7 @@ msgstr ""
|
||||
"la corrección."
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3627 src/slic3r/GUI/GCodeViewer.cpp:3630
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:1056
|
||||
#: src/slic3r/GUI/GUI_Preview.cpp:1050
|
||||
msgid "Wipe"
|
||||
msgstr "Limpiar"
|
||||
|
||||
@ -15754,10 +15742,6 @@ msgstr ""
|
||||
msgid "You will not be asked about it again on hyperlinks hovering."
|
||||
msgstr "No se te preguntará de nuevo sobre los hipervínculos que aparecen."
|
||||
|
||||
#: src/slic3r/GUI/OptionsGroup.cpp:994
|
||||
msgid "You will not be asked about it again on label hovering."
|
||||
msgstr "No se te preguntará de nuevo sobre la etiqueta flotante."
|
||||
|
||||
#: src/slic3r/GUI/Plater.cpp:1735
|
||||
msgid ""
|
||||
"You will not be asked about it again, when: \n"
|
||||
@ -23317,10 +23301,6 @@ msgstr "Si la fuente está subrayada."
|
||||
msgid "White"
|
||||
msgstr "Blanco"
|
||||
|
||||
#: ../src/generic/fdrepdlg.cpp:144
|
||||
msgid "Whole word"
|
||||
msgstr "Palabra completa"
|
||||
|
||||
#: ../src/html/helpwnd.cpp:534
|
||||
msgid "Whole words only"
|
||||
msgstr "Sólo palabras completas"
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
resources/localization/hu/PrusaSlicer.mo
Normal file
BIN
resources/localization/hu/PrusaSlicer.mo
Normal file
Binary file not shown.
24675
resources/localization/hu/PrusaSlicer_hu.po
Normal file
24675
resources/localization/hu/PrusaSlicer_hu.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
2
resources/profiles/Jubilee.idx
Normal file
2
resources/profiles/Jubilee.idx
Normal file
@ -0,0 +1,2 @@
|
||||
min_slic3r_version = 2.4.1-alpha
|
||||
1.0.0 Initial Jubilee bundle
|
||||
515
resources/profiles/Jubilee.ini
Normal file
515
resources/profiles/Jubilee.ini
Normal file
@ -0,0 +1,515 @@
|
||||
# Jubilee profiles
|
||||
|
||||
# Based on the profiles from: https://github.com/machineagency/jubilee/tree/main/software/slicer_settings/prusa_slic3r by yvessa
|
||||
|
||||
[vendor]
|
||||
# Vendor name will be shown by the Config Wizard.
|
||||
name = Jubilee
|
||||
# Configuration version of this file. Config file will only be installed, if the config_version differs.
|
||||
# This means, the server may force the Slic3r configuration to be downgraded.
|
||||
config_version = 1.0.0
|
||||
# Where to get the updates from?
|
||||
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/Jubilee/
|
||||
# The printer models will be shown by the Configuration Wizard in this order,
|
||||
|
||||
[printer_model:Jubilee]
|
||||
name = Jubilee
|
||||
variants = 0.4; Volcano 0.4
|
||||
technology = FFF
|
||||
bed_model = Jubilee_bed.stl
|
||||
bed_texture = Jubilee_texture.svg
|
||||
default_materials = Generic PLA @Jubilee; Generic PETG @Jubilee
|
||||
|
||||
[print:*common*]
|
||||
avoid_crossing_perimeters = 0
|
||||
bottom_fill_pattern = monotonic
|
||||
bottom_solid_layers = 3
|
||||
bridge_acceleration = 0
|
||||
bridge_angle = 0
|
||||
bridge_flow_ratio = 1
|
||||
bridge_speed = 80
|
||||
brim_width = 0
|
||||
clip_multipart_objects = 0
|
||||
compatible_printers_condition = printer_notes=~/.*V6.*/
|
||||
complete_objects = 0
|
||||
default_acceleration = 0
|
||||
dont_support_bridges = 1
|
||||
elefant_foot_compensation = 0
|
||||
ensure_vertical_shell_thickness = 0
|
||||
external_perimeter_extrusion_width = 0.45
|
||||
external_perimeter_speed = 50%
|
||||
external_perimeters_first = 0
|
||||
extra_perimeters = 1
|
||||
extruder_clearance_height = 20
|
||||
extruder_clearance_radius = 20
|
||||
extrusion_width = 0.45
|
||||
fill_angle = 45
|
||||
fill_density = 10%
|
||||
fill_pattern = rectilinear
|
||||
first_layer_acceleration = 0
|
||||
first_layer_extrusion_width = 0.45
|
||||
first_layer_height = 0.2
|
||||
first_layer_speed = 30
|
||||
gap_fill_speed = 50
|
||||
gcode_comments = 0
|
||||
gcode_label_objects = 0
|
||||
infill_acceleration = 0
|
||||
infill_every_layers = 1
|
||||
infill_extruder = 1
|
||||
infill_extrusion_width = 0.45
|
||||
infill_first = 0
|
||||
infill_only_where_needed = 0
|
||||
infill_overlap = 25%
|
||||
infill_speed = 160
|
||||
interface_shells = 0
|
||||
layer_height = 0.2
|
||||
max_print_speed = 150
|
||||
max_volumetric_speed = 0
|
||||
min_skirt_length = 12
|
||||
notes =
|
||||
only_retract_when_crossing_perimeters = 0
|
||||
ooze_prevention = 0
|
||||
output_filename_format = [input_filename_base].gcode
|
||||
overhangs = 1
|
||||
perimeter_acceleration = 0
|
||||
perimeter_extruder = 1
|
||||
perimeter_extrusion_width = 0.45
|
||||
perimeter_speed = 130
|
||||
perimeters = 2
|
||||
post_process =
|
||||
print_settings_id =
|
||||
raft_layers = 0
|
||||
resolution = 0
|
||||
seam_position = nearest
|
||||
single_extruder_multi_material_priming = 1
|
||||
skirt_distance = 6
|
||||
skirt_height = 1
|
||||
skirts = 1
|
||||
slice_closing_radius = 0.049
|
||||
small_perimeter_speed = 40
|
||||
solid_infill_below_area = 70
|
||||
solid_infill_every_layers = 0
|
||||
solid_infill_extruder = 1
|
||||
solid_infill_extrusion_width = 0.45
|
||||
solid_infill_speed = 100
|
||||
spiral_vase = 0
|
||||
standby_temperature_delta = -5
|
||||
support_material = 0
|
||||
support_material_angle = 0
|
||||
support_material_auto = 1
|
||||
support_material_buildplate_only = 0
|
||||
support_material_contact_distance = 0.2
|
||||
support_material_enforce_layers = 0
|
||||
support_material_extruder = 1
|
||||
support_material_extrusion_width = 0.35
|
||||
support_material_interface_contact_loops = 0
|
||||
support_material_interface_extruder = 1
|
||||
support_material_interface_layers = 3
|
||||
support_material_interface_spacing = 0
|
||||
support_material_interface_speed = 100%
|
||||
support_material_pattern = rectilinear
|
||||
support_material_spacing = 2.5
|
||||
support_material_speed = 50
|
||||
support_material_synchronize_layers = 0
|
||||
support_material_threshold = 0
|
||||
support_material_with_sheath = 1
|
||||
support_material_xy_spacing = 50%
|
||||
thin_walls = 1
|
||||
threads = 12
|
||||
top_fill_pattern = monotonic
|
||||
top_infill_extrusion_width = 0.45
|
||||
top_solid_infill_speed = 70
|
||||
top_solid_layers = 3
|
||||
travel_speed = 333
|
||||
wipe_tower = 0
|
||||
wipe_tower_bridging = 10
|
||||
wipe_tower_rotation_angle = 0
|
||||
wipe_tower_width = 60
|
||||
wipe_tower_x = 180
|
||||
wipe_tower_y = 140
|
||||
xy_size_compensation = 0
|
||||
|
||||
[print:0.2mm V6, aesthetic @Jubilee]
|
||||
inherits = *common*
|
||||
|
||||
[print:0.2mm V6, functional @Jubilee]
|
||||
inherits = *common*
|
||||
perimeters = 6
|
||||
fill_density = 30%
|
||||
fill_pattern = rectilinear
|
||||
perimeter_speed = 80
|
||||
small_perimeter_speed = 50
|
||||
external_perimeter_speed = 70%
|
||||
infill_speed = 120
|
||||
solid_infill_speed = 100
|
||||
top_solid_infill_speed = 60
|
||||
support_material_speed = 60
|
||||
bridge_speed = 90
|
||||
first_layer_speed = 40
|
||||
|
||||
[print:0.2mm Volcano, aesthetic @Jubilee]
|
||||
inherits = *common*
|
||||
compatible_printers_condition = printer_notes=~/.*Volcano.*/
|
||||
max_print_speed = 200
|
||||
|
||||
[print:0.2mm Volcano, functional @Jubilee]
|
||||
inherits = *common*
|
||||
compatible_printers_condition = printer_notes=~/.*Volcano.*/
|
||||
perimeters = 6
|
||||
fill_density = 30%
|
||||
fill_pattern = rectilinear
|
||||
perimeter_speed = 120
|
||||
small_perimeter_speed = 40
|
||||
external_perimeter_speed = 80
|
||||
infill_speed = 170
|
||||
solid_infill_speed = 100
|
||||
top_solid_infill_speed = 70
|
||||
support_material_speed = 70
|
||||
bridge_speed = 90
|
||||
gap_fill_speed = 50
|
||||
first_layer_speed = 40
|
||||
max_print_speed = 200
|
||||
|
||||
[filament:*common*]
|
||||
bed_temperature = 60
|
||||
bridge_fan_speed = 100
|
||||
compatible_printers =
|
||||
compatible_printers_condition =
|
||||
compatible_prints =
|
||||
compatible_prints_condition =
|
||||
cooling = 1
|
||||
disable_fan_first_layers = 1
|
||||
end_filament_gcode = "; Filament-specific end gcode \n;END gcode for filament\n"
|
||||
extrusion_multiplier = 0.92
|
||||
fan_always_on = 0
|
||||
fan_below_layer_time = 600
|
||||
filament_colour = #29B2B2
|
||||
filament_cooling_final_speed = 3.4
|
||||
filament_cooling_initial_speed = 2.2
|
||||
filament_cooling_moves = 4
|
||||
filament_cost = 24
|
||||
filament_density = 0
|
||||
filament_deretract_speed = nil
|
||||
filament_diameter = 1.75
|
||||
filament_load_time = 0
|
||||
filament_loading_speed = 28
|
||||
filament_loading_speed_start = 3
|
||||
filament_max_volumetric_speed = 0
|
||||
filament_minimal_purge_on_wipe_tower = 15
|
||||
filament_notes = ""
|
||||
filament_ramming_parameters = "120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0| 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6"
|
||||
filament_retract_before_travel = nil
|
||||
filament_retract_before_wipe = nil
|
||||
filament_retract_layer_change = nil
|
||||
filament_retract_length = nil
|
||||
filament_retract_lift = nil
|
||||
filament_retract_lift_above = nil
|
||||
filament_retract_lift_below = nil
|
||||
filament_retract_restart_extra = nil
|
||||
filament_retract_speed = nil
|
||||
filament_settings_id = ""
|
||||
filament_soluble = 0
|
||||
filament_toolchange_delay = 0
|
||||
filament_type = PLA
|
||||
filament_unload_time = 0
|
||||
filament_unloading_speed = 90
|
||||
filament_unloading_speed_start = 100
|
||||
filament_wipe = nil
|
||||
first_layer_bed_temperature = 60
|
||||
first_layer_temperature = 190
|
||||
max_fan_speed = 100
|
||||
min_fan_speed = 100
|
||||
min_print_speed = 30
|
||||
slowdown_below_layer_time = 1
|
||||
start_filament_gcode = "; Filament gcode\n"
|
||||
temperature = 190
|
||||
|
||||
[filament:*PLA*]
|
||||
inherits = *common*
|
||||
|
||||
[filament:Generic PLA @Jubilee]
|
||||
inherits = *common*
|
||||
filament_vendor = Generic
|
||||
|
||||
[filament:Hatchbox PLA @Jubilee]
|
||||
inherits = *PLA*
|
||||
filament_vendor = Hatchbox
|
||||
|
||||
[filament:Generic PETG @Jubilee]
|
||||
filament_vendor = Generic
|
||||
bed_temperature = 65
|
||||
bridge_fan_speed = 0
|
||||
compatible_printers =
|
||||
compatible_prints =
|
||||
compatible_prints_condition =
|
||||
cooling = 1
|
||||
disable_fan_first_layers = 3
|
||||
end_filament_gcode = "; Filament-specific end gcode"
|
||||
extrusion_multiplier = 1
|
||||
fan_always_on = 0
|
||||
fan_below_layer_time = 20
|
||||
filament_colour = #FF8000
|
||||
filament_cooling_final_speed = 3.4
|
||||
filament_cooling_initial_speed = 2.2
|
||||
filament_cooling_moves = 4
|
||||
filament_cost = 24.99
|
||||
filament_density = 1.27
|
||||
filament_deretract_speed = nil
|
||||
filament_diameter = 1.75
|
||||
filament_load_time = 0
|
||||
filament_loading_speed = 28
|
||||
filament_loading_speed_start = 3
|
||||
filament_max_volumetric_speed = 8
|
||||
filament_minimal_purge_on_wipe_tower = 15
|
||||
filament_notes = ""
|
||||
filament_ramming_parameters = "120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0| 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6"
|
||||
filament_retract_before_travel = nil
|
||||
filament_retract_before_wipe = nil
|
||||
filament_retract_layer_change = nil
|
||||
filament_retract_length = 2
|
||||
filament_retract_lift = 0.5
|
||||
filament_retract_lift_above = nil
|
||||
filament_retract_lift_below = nil
|
||||
filament_retract_restart_extra = nil
|
||||
filament_retract_speed = 150
|
||||
filament_settings_id = ""
|
||||
filament_soluble = 0
|
||||
filament_toolchange_delay = 0
|
||||
filament_type = PETG
|
||||
filament_unload_time = 0
|
||||
filament_unloading_speed = 90
|
||||
filament_unloading_speed_start = 100
|
||||
filament_wipe = nil
|
||||
first_layer_bed_temperature = 65
|
||||
first_layer_temperature = 230
|
||||
max_fan_speed = 50
|
||||
min_fan_speed = 0
|
||||
min_print_speed = 15
|
||||
slowdown_below_layer_time = 20
|
||||
temperature = 240
|
||||
|
||||
[filament: Proto-pasta HTPLA @Jubilee]
|
||||
filament_vendor = Proto-pasta
|
||||
bed_temperature = 50
|
||||
bridge_fan_speed = 100
|
||||
compatible_printers =
|
||||
compatible_printers_condition =
|
||||
compatible_prints =
|
||||
compatible_prints_condition =
|
||||
cooling = 1
|
||||
disable_fan_first_layers = 1
|
||||
end_filament_gcode = "; Filament-specific end gcode \n;END gcode for filament\n"
|
||||
extrusion_multiplier = 0.96
|
||||
fan_always_on = 0
|
||||
fan_below_layer_time = 600
|
||||
filament_colour = #29B2B2
|
||||
filament_cooling_final_speed = 3.4
|
||||
filament_cooling_initial_speed = 2.2
|
||||
filament_cooling_moves = 0
|
||||
filament_cost = 24
|
||||
filament_density = 0
|
||||
filament_deretract_speed = nil
|
||||
filament_diameter = 1.75
|
||||
filament_load_time = 10
|
||||
filament_loading_speed = 28
|
||||
filament_loading_speed_start = 3
|
||||
filament_max_volumetric_speed = 0
|
||||
filament_minimal_purge_on_wipe_tower = 0
|
||||
filament_notes = ""
|
||||
filament_ramming_parameters = "120 100| 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 8.87097 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6"
|
||||
filament_retract_before_travel = nil
|
||||
filament_retract_before_wipe = nil
|
||||
filament_retract_layer_change = nil
|
||||
filament_retract_length = nil
|
||||
filament_retract_lift = nil
|
||||
filament_retract_lift_above = nil
|
||||
filament_retract_lift_below = nil
|
||||
filament_retract_restart_extra = nil
|
||||
filament_retract_speed = nil
|
||||
filament_settings_id = ""
|
||||
filament_soluble = 0
|
||||
filament_toolchange_delay = 0
|
||||
filament_type = PLA
|
||||
filament_unload_time = 0
|
||||
filament_unloading_speed = 90
|
||||
filament_unloading_speed_start = 100
|
||||
filament_wipe = nil
|
||||
first_layer_bed_temperature = 50
|
||||
first_layer_temperature = 200
|
||||
max_fan_speed = 100
|
||||
min_fan_speed = 100
|
||||
min_print_speed = 30
|
||||
slowdown_below_layer_time = 1
|
||||
start_filament_gcode = "; Filament gcode\n"
|
||||
temperature = 200
|
||||
|
||||
[filament:Prusa PLA @Jubilee]
|
||||
inherits = *PLA*
|
||||
filament_vendor = Made for Prusa
|
||||
bed_temperature = 50
|
||||
bridge_fan_speed = 100
|
||||
cooling = 1
|
||||
disable_fan_first_layers = 1
|
||||
end_filament_gcode = "; Filament-specific end gcode \n;END gcode for filament\n"
|
||||
extrusion_multiplier = 0.96
|
||||
fan_always_on = 0
|
||||
fan_below_layer_time = 600
|
||||
filament_colour = #29B2B2
|
||||
filament_cooling_final_speed = 3.4
|
||||
filament_cooling_initial_speed = 2.2
|
||||
filament_cooling_moves = 4
|
||||
filament_cost = 24
|
||||
filament_density = 0
|
||||
filament_deretract_speed = nil
|
||||
filament_load_time = 0
|
||||
filament_loading_speed = 28
|
||||
filament_loading_speed_start = 3
|
||||
filament_max_volumetric_speed = 0
|
||||
filament_minimal_purge_on_wipe_tower = 15
|
||||
filament_notes = ""
|
||||
filament_ramming_parameters = "120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0| 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6"
|
||||
filament_unloading_speed = 90
|
||||
filament_unloading_speed_start = 100
|
||||
filament_wipe = nil
|
||||
first_layer_bed_temperature = 50
|
||||
first_layer_temperature = 210
|
||||
max_fan_speed = 100
|
||||
min_fan_speed = 100
|
||||
min_print_speed = 30
|
||||
slowdown_below_layer_time = 1
|
||||
start_filament_gcode = "; Filament gcode\n"
|
||||
temperature = 210
|
||||
|
||||
[filament:Solutech PLA @Jubilee]
|
||||
inherits = *PLA*
|
||||
filament_vendor = Solutech
|
||||
bed_temperature = 50
|
||||
bridge_fan_speed = 100
|
||||
extrusion_multiplier = 0.96
|
||||
fan_always_on = 0
|
||||
fan_below_layer_time = 600
|
||||
filament_colour = #29B2B2
|
||||
first_layer_bed_temperature = 50
|
||||
first_layer_temperature = 200
|
||||
max_fan_speed = 100
|
||||
min_fan_speed = 100
|
||||
min_print_speed = 30
|
||||
slowdown_below_layer_time = 1
|
||||
start_filament_gcode = "; Filament gcode\n"
|
||||
temperature = 200
|
||||
|
||||
[filament:Verbatim BVOH @Jubilee]
|
||||
filament_vendor = Verbatim
|
||||
bed_temperature = 60
|
||||
bridge_fan_speed = 100
|
||||
cooling = 0
|
||||
disable_fan_first_layers = 1
|
||||
end_filament_gcode = "; Filament-specific end gcode"
|
||||
extrusion_multiplier = 1
|
||||
fan_always_on = 0
|
||||
fan_below_layer_time = 100
|
||||
filament_colour = #FFFFD7
|
||||
filament_cooling_final_speed = 3.4
|
||||
filament_cooling_initial_speed = 2.2
|
||||
filament_cooling_moves = 4
|
||||
filament_cost = 218
|
||||
filament_density = 1.23
|
||||
filament_deretract_speed = nil
|
||||
filament_diameter = 1.75
|
||||
filament_load_time = 0
|
||||
filament_loading_speed = 28
|
||||
filament_loading_speed_start = 3
|
||||
filament_max_volumetric_speed = 4
|
||||
filament_minimal_purge_on_wipe_tower = 15
|
||||
filament_notes = "List of materials tested with standard PVA print settings:\n\nVerbatim BVOH"
|
||||
filament_ramming_parameters = "120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0| 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6"
|
||||
filament_soluble = 1
|
||||
filament_toolchange_delay = 0
|
||||
filament_type = PVA
|
||||
filament_unload_time = 0
|
||||
filament_unloading_speed = 90
|
||||
filament_unloading_speed_start = 100
|
||||
filament_wipe = nil
|
||||
first_layer_bed_temperature = 60
|
||||
first_layer_temperature = 210
|
||||
max_fan_speed = 100
|
||||
min_fan_speed = 100
|
||||
min_print_speed = 15
|
||||
slowdown_below_layer_time = 20
|
||||
temperature = 210
|
||||
|
||||
# Common printer preset
|
||||
[printer:*common*]
|
||||
bed_shape = 0x0,300x0,300x300,0x300
|
||||
cooling_tube_length = 5
|
||||
cooling_tube_retraction = 91.5
|
||||
deretract_speed = 0,0
|
||||
end_gcode = T-1 ; desect current tool\nG0 Z305 ; move bed all the way to the bottom\nM104 S0 T0; turn off extruder 0\nM104 S0 T1; turn off extruder 1\nM140 S0 ; turn off bed\nG0 X0 Y0 F30000; return home\nM84 S600; disable motors after ten mins of inactivity\n
|
||||
extra_loading_move = -2
|
||||
extruder_colour = #FF8000;#0080FF
|
||||
extruder_offset = 0x0,0x0
|
||||
gcode_flavor = marlin
|
||||
high_current_on_filament_swap = 0
|
||||
layer_gcode =
|
||||
machine_max_acceleration_e = 1500
|
||||
machine_max_acceleration_extruding = 1500
|
||||
machine_max_acceleration_retracting = 1500
|
||||
machine_max_acceleration_x = 1000
|
||||
machine_max_acceleration_y = 1000
|
||||
machine_max_acceleration_z = 20
|
||||
machine_max_feedrate_e = 8000
|
||||
machine_max_feedrate_x = 13000
|
||||
machine_max_feedrate_y = 13000
|
||||
machine_max_feedrate_z = 800
|
||||
machine_max_jerk_e = 50
|
||||
machine_max_jerk_x = 17
|
||||
machine_max_jerk_y = 17
|
||||
machine_max_jerk_z = 0.1
|
||||
machine_min_extruding_rate = 0
|
||||
machine_min_travel_rate = 0
|
||||
machine_limits_usage = time_estimate_only
|
||||
max_layer_height = 0.3,0.3
|
||||
max_print_height = 300
|
||||
min_layer_height = 0.05,0.05
|
||||
nozzle_diameter = 0.4,0.4
|
||||
parking_pos_retraction = 92
|
||||
printer_model =
|
||||
printer_technology = FFF
|
||||
remaining_times = 0
|
||||
retract_before_travel = 2,2
|
||||
retract_before_wipe = 0%,0%
|
||||
retract_layer_change = 0,0
|
||||
retract_length = 1,1
|
||||
retract_length_toolchange = 1,1
|
||||
retract_lift = 0.2,0.2
|
||||
retract_lift_above = 0,0
|
||||
retract_lift_below = 0,0
|
||||
retract_restart_extra = 0.05,0.05
|
||||
retract_restart_extra_toolchange = 0,0
|
||||
retract_speed = 133,133
|
||||
silent_mode = 0
|
||||
single_extruder_multi_material = 0
|
||||
start_gcode = G91 ; relative moves\nG1 Z1 F900 ; raise tool 1mm\nG90 ; absolute moves\nT-1 ; Make sure nothing is parked on the carriage\nG0 X150 Y150 F10000; Move to the center of the print area\nM558 F500 ; Set the probing speed\nG30 ; Do a single probe\nM558 F50 ; Set a slower probing speed\nG30 ; Do a second probe\nT[current_extruder]
|
||||
thumbnails =
|
||||
toolchange_gcode = T[next_extruder]
|
||||
use_firmware_retraction = 0
|
||||
use_relative_e_distances = 1
|
||||
use_volumetric_e = 0
|
||||
variable_layer_height = 0
|
||||
wipe = 0,0
|
||||
z_offset = 0
|
||||
default_filament_profile = "Generic PLA @Jubilee; Generic PLA @Jubilee"
|
||||
default_print_profile = 0.2mm V6, aesthetic @Jubilee
|
||||
|
||||
[printer:Jubilee]
|
||||
inherits = *common*
|
||||
printer_model = Jubilee
|
||||
printer_variant = 0.4
|
||||
printer_notes = V6
|
||||
|
||||
[printer:Jubilee Volcano 0.4mm]
|
||||
inherits = *common*
|
||||
printer_model = Jubilee
|
||||
printer_variant = Volcano 0.4
|
||||
printer_notes = Volcano
|
||||
default_print_profile = 0.2mm Volcano, aesthetic @Jubilee
|
||||
BIN
resources/profiles/Jubilee/Jubilee_bed.stl
Normal file
BIN
resources/profiles/Jubilee/Jubilee_bed.stl
Normal file
Binary file not shown.
232
resources/profiles/Jubilee/Jubilee_texture.svg
Normal file
232
resources/profiles/Jubilee/Jubilee_texture.svg
Normal file
@ -0,0 +1,232 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
version="1.1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 680.31502 680.31502"
|
||||
enable-background="new 0 0 680.3149 680.3149"
|
||||
xml:space="preserve"
|
||||
id="svg66"
|
||||
sodipodi:docname="Jubilee_texture.svg"
|
||||
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
|
||||
width="680.315"
|
||||
height="680.315"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs70" /><sodipodi:namedview
|
||||
id="namedview68"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#eeeeee"
|
||||
borderopacity="1"
|
||||
inkscape:pageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
showgrid="true"
|
||||
inkscape:zoom="0.64161465"
|
||||
inkscape:cx="225.21306"
|
||||
inkscape:cy="295.34862"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1129"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g24"><inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid4311"
|
||||
empcolor="#ffffff"
|
||||
empopacity="0.49803922"
|
||||
color="#ffffff"
|
||||
opacity="0.50196078"
|
||||
spacingx="37.795277"
|
||||
spacingy="37.795277"
|
||||
units="cm"
|
||||
dotted="false"
|
||||
originx="340.1575"
|
||||
originy="340.1575" /></sodipodi:namedview>
|
||||
|
||||
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 37.795277,0 V 680.31498"
|
||||
id="path4436" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 75.590554,680.31498 V 0"
|
||||
id="path4438" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 113.38583,0 V 680.31498"
|
||||
id="path4553" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 151.1811,680.31498 V 0"
|
||||
id="path4555" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 188.97638,0 V 680.31498"
|
||||
id="path4557" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 226.77166,680.31498 V 0"
|
||||
id="path4559" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 264.56694,0 V 680.31498"
|
||||
id="path4561" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 302.36221,680.31498 V 0"
|
||||
id="path4563" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 340.15749,0 V 680.31498"
|
||||
id="path4565" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 377.95277,680.31498 V 0"
|
||||
id="path4567" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 415.74804,0 V 680.31498"
|
||||
id="path4569" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 453.54332,680.31498 V 0"
|
||||
id="path4571" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 491.3386,0 V 680.31498"
|
||||
id="path4573" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 529.13388,680.31498 529.13387,0"
|
||||
id="path4575" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 566.92915,0 V 680.31498"
|
||||
id="path4577" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 604.72443,680.31498 V 0"
|
||||
id="path4579" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 642.51971,0 V 680.31498"
|
||||
id="path4581" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 680.31498,642.51971 H 0"
|
||||
id="path4583" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 0,604.72443 H 680.31498"
|
||||
id="path4585" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 680.31498,566.92915 H 0"
|
||||
id="path4587" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 0,529.13387 H 680.31498"
|
||||
id="path4589" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 680.31498,491.3386 H 0"
|
||||
id="path4591" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 0,453.54332 H 680.31498"
|
||||
id="path4593" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 680.31498,415.74804 H 0"
|
||||
id="path4595" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 0,377.95277 H 680.31498"
|
||||
id="path4597" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 680.31498,340.15749 H 0"
|
||||
id="path4599" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 0,302.36221 H 680.31498"
|
||||
id="path4601" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 680.31498,264.56694 H 0"
|
||||
id="path4603" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 0,226.77166 H 680.31498"
|
||||
id="path4605" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 680.31498,188.97638 H 0"
|
||||
id="path4607" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 0,151.1811 H 680.31498"
|
||||
id="path4609" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 680.31498,113.38583 H 0"
|
||||
id="path4611" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 0,75.590554 H 680.31498"
|
||||
id="path4613" /><path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 680.31498,37.795277 H 0"
|
||||
id="path4615" /><g
|
||||
id="logo"
|
||||
transform="rotate(180,347.24687,326.4726)">
|
||||
<g
|
||||
id="g24">
|
||||
<path
|
||||
d="m 280.4813,484.2325 c 18.38,7.6201 38.54,11.83 59.6801,11.83 v -14.17 c -19.22,0 -37.54,-3.82 -54.25,-10.75 h -0.01 c -17.3201,-7.18 -32.9,-17.7 -45.9599,-30.77 -13.05,-13.04 -23.5801,-28.63 -30.76,-45.96 l -13.1001,5.43 c 7.9,19.05 19.47,36.2 33.8301,50.56 14.3598,14.3601 31.5098,25.9301 50.5698,33.83 z"
|
||||
id="path2"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#d4d4d4;stroke-opacity:1" />
|
||||
<path
|
||||
d="m 196.0813,280.4726 c 7.9,-19.05 19.47,-36.2 33.8301,-50.56 l -10.02,-10.02 c -15.67,15.67 -28.29,34.37 -36.9,55.16 -8.3199,20.05 -12.91,42.04 -12.91,65.1 0,23.06 4.5901,45.06 12.91,65.11 l 13.09,-5.42 c -7.6199,-18.39 -11.83,-38.54 -11.83,-59.69 -1e-4,-21.14 4.21,-41.3 11.8299,-59.68 z"
|
||||
id="path4"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#d4d4d4;stroke-opacity:1" />
|
||||
<path
|
||||
d="m 209.1814,394.4126 13.1099,-5.4301 c -6.25,-15.04 -9.6899,-31.54 -9.6899,-48.83 h -14.1799 c -2e-4,19.2201 3.8298,37.5501 10.7599,54.2601 z"
|
||||
id="path6"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#d4d4d4;stroke-opacity:1" />
|
||||
<path
|
||||
d="m 240.9414,340.1526 c 0,-13.45 2.6799,-26.28 7.5299,-37.97 l -13.09,-5.43 c -5.55,13.37 -8.61,28.03 -8.61,43.4 z"
|
||||
id="path8"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#d4d4d4;stroke-opacity:1" />
|
||||
<path
|
||||
d="m 313.0412,405.6426 c 8.3501,3.47 17.51,5.38 27.1201,5.38 9.61,0 18.77,-1.91 27.1199,-5.38 l -5.4199,-13.09 c -6.6899,2.77 -14.02,4.3 -21.7,4.3 -7.6801,0 -15.01,-1.53 -21.7,-4.3 -6.9302,-2.87 -13.1702,-7.08 -18.3901,-12.3 v -0.01 c -5.23,-5.22 -9.4299,-11.45 -12.2999,-18.38 l -13.1,5.42 c 3.59,8.66 8.85,16.45 15.3799,22.98 6.53,6.5299 14.3301,11.8 22.99,15.38 z"
|
||||
id="path10"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#d4d4d4;stroke-opacity:1" />
|
||||
<path
|
||||
d="m 248.4813,378.1326 c 5.02,12.13 12.38,23.04 21.52,32.18 9.14,9.14 20.0499,16.51 32.1801,21.52 11.7,4.86 24.53,7.54 37.98,7.54 13.45,0 26.27,-2.68 37.97,-7.54 12.13,-5.01 23.04,-12.38 32.1799,-21.52 9.1401,-9.14 16.5,-20.05 21.52,-32.18 l -13.09,-5.42 c -4.3099,10.4 -10.63,19.75 -18.4601,27.57 -7.8298,7.84 -17.1799,14.15 -27.5698,18.45 -10.03,4.16 -21.02,6.46 -32.55,6.46 -11.53,0 -22.52,-2.29 -32.55,-6.45 -10.3999,-4.31 -19.75,-10.62 -27.5801,-18.46 -7.8298,-7.83 -14.1499,-17.19 -18.45,-27.58 -4.1599,-10.03 -6.4599,-21.02 -6.4599,-32.55 h -14.1799 c -1e-4,13.4599 2.6798,26.28 7.5398,37.98 z"
|
||||
id="path12"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#d4d4d4;stroke-opacity:1" />
|
||||
<path
|
||||
d="m 383.5623,444.9326 c -13.36,5.55 -28.02,8.61 -43.4,8.61 -15.37,0 -30.03,-3.06 -43.3999,-8.61 -13.8601,-5.74 -26.3301,-14.15 -36.78,-24.6 -10.44,-10.44 -18.8601,-22.91 -24.6001,-36.77 l -13.09,5.42 c 6.4601,15.59 15.92,29.6201 27.67,41.3701 11.75,11.75 25.78,21.21 41.37,27.68 15.0399,6.24 31.5299,9.68 48.83,9.68 17.3001,0 33.79,-3.44 48.8301,-9.68 15.58,-6.46 29.61,-15.93 41.36,-27.68 11.75,-11.7401 21.22,-25.77 27.6801,-41.36 6.25,-15.04 9.6899,-31.54 9.6899,-48.84 v -204.44 c -4.5601,-2.85 -9.23,-5.56 -13.99,-8.1 -0.0701,-0.04 -0.13,-0.08 -0.1901,-0.1 v 212.64 c 0,7.69 -0.7699,15.2 -2.22,22.46 -1.4601,7.26 -3.61,14.26 -6.39,20.95 -5.74,13.86 -14.1599,26.33 -24.6,36.77 -10.4401,10.44 -22.91,18.8599 -36.77,24.5999 z"
|
||||
id="path14"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#d4d4d4;stroke-opacity:1" />
|
||||
<path
|
||||
d="m 394.4123,471.1326 5.4301,13.1 c 19.0499,-7.9 36.2,-19.47 50.5599,-33.83 14.3601,-14.36 25.9301,-31.51 33.8301,-50.56 7.62,-18.39 11.83,-38.54 11.83,-59.68 v -183.72 c -4.49,-3.81 -9.12,-7.47 -13.89,-10.95 -0.09,-0.07 -0.1899,-0.14 -0.28,-0.2 v 194.87 c 0,9.61 -0.96,18.99 -2.78,28.06 -1.8199,9.0699 -4.5099,17.83 -7.98,26.19 -7.1799,17.33 -17.71,32.92 -30.76,45.96 -13.0501,13.07 -28.64,23.58 -45.9601,30.76 z"
|
||||
id="path16"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#d4d4d4;stroke-opacity:1" />
|
||||
<path
|
||||
d="m 510.6122,169.8626 c -0.1199,-0.12 -0.24,-0.25 -0.3699,-0.37 v 170.66 h -0.01 c 0,23.06 -4.5901,45.06 -12.91,65.11 -8.62,20.79 -21.24,39.49 -36.9,55.16 -15.6699,15.66 -34.37,28.28 -55.1599,36.9 -20.05,8.32 -42.04,12.91 -65.1001,12.91 -23.0599,0 -45.05,-4.59 -65.1,-12.91 -20.7899,-8.61 -39.5,-21.24 -55.17,-36.9 l -10.02,10.02 c 33.3401,33.35 79.4101,53.97 130.29,53.97 50.8701,0 96.9301,-20.6201 130.28,-53.97 33.3401,-33.34 53.97,-79.4 53.97,-130.28 v -155.27 c -4.3899,-5.2 -8.99,-10.22 -13.8001,-15.03 z"
|
||||
id="path18"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#d4d4d4;stroke-opacity:1" />
|
||||
<path
|
||||
d="m 439.3923,120.5326 c -4.6199,-2.09 -9.3199,-4.04 -14.1,-5.85 -0.0199,-0.01 -0.0399,-0.01 -0.0699,-0.02 v 225.5 h 14.1699 z"
|
||||
id="path20"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#d4d4d4;stroke-opacity:1" />
|
||||
<path
|
||||
d="m 405.6423,367.2826 c 3.47,-8.36 5.3801,-17.52 5.3801,-27.12 h 0.0299 v -230.35 c -4.67,-1.44 -9.4,-2.73 -14.1801,-3.88 v 234.22 h -0.0199 c 0,7.69 -1.53,15.02 -4.3,21.71 -2.87,6.93 -7.08,13.17 -12.2999,18.39 l 10.01,10.01 c 6.5299,-6.5301 11.7899,-14.32 15.3799,-22.98 z"
|
||||
id="path22"
|
||||
style="fill:#000000;fill-opacity:1;stroke:#d4d4d4;stroke-opacity:1" />
|
||||
</g>
|
||||
<path
|
||||
fill="none"
|
||||
d="m 418.7413,307.6026 c -2.1,-5.0601 -4.68,-9.88 -7.67,-14.4 v 46.95 h -0.05 c 0,9.61 -1.91,18.77 -5.38,27.13 -3.59,8.66 -8.85,16.45 -15.38,22.98 l -10.01,-10.01 c 5.22,-5.22 9.43,-11.46 12.3,-18.39 2.77,-6.69 4.3,-14.02 4.3,-21.71 v -63.37 c -7.08,-6.34 -15.23,-11.51 -24.14,-15.2 -10.03,-4.16 -21.02,-6.46 -32.55,-6.46 -11.53,0 -22.52,2.29 -32.55,6.45 -10.4,4.31 -19.75,10.62 -27.58,18.46 -7.83,7.83 -14.15,17.18 -18.45,27.57 -4.16,10.03 -6.46,21.02 -6.46,32.55 0,11.53 2.3,22.52 6.46,32.55 4.3,10.39 10.62,19.75 18.45,27.58 7.83,7.84 17.1801,14.15 27.58,18.46 10.03,4.16 21.02,6.45 32.55,6.45 11.53,0 22.52,-2.3 32.55,-6.46 10.39,-4.3 19.74,-10.61 27.5699,-18.45 7.83,-7.82 14.15,-17.17 18.46,-27.57 4.16,-10.03 6.46,-21.03 6.46,-32.56 1e-4,-11.53 -2.2999,-22.52 -6.4599,-32.55 z m -78.58,103.42 c -9.61,0 -18.77,-1.91 -27.12,-5.38 -8.66,-3.58 -16.46,-8.85 -22.99,-15.38 -6.53,-6.53 -11.79,-14.32 -15.38,-22.98 l 13.1,-5.42 c 2.87,6.93 7.0699,13.16 12.3,18.38 v 0.01 c 5.22,5.22 11.46,9.43 18.39,12.3 6.69,2.77 14.02,4.3 21.7,4.3 7.68,0 15.01,-1.53 21.7,-4.3 l 5.42,13.09 c -8.35,3.4699 -17.51,5.38 -27.12,5.38 z"
|
||||
id="path26" />
|
||||
<path
|
||||
fill="none"
|
||||
d="m 425.2913,340.1526 v -50.97 c -4.01,-6.69 -8.79,-12.86 -14.22,-18.4 v 69.37 h -0.05 c 0,9.61 -1.91,18.77 -5.38,27.13 -3.59,8.66 -8.85,16.45 -15.38,22.98 l -10.01,-10.01 c 5.22,-5.22 9.43,-11.46 12.3,-18.39 2.77,-6.69 4.3,-14.02 4.3,-21.71 v -81.42 c -5.81,-4.06 -12.08,-7.5 -18.72,-10.25 -11.7,-4.86 -24.52,-7.54 -37.97,-7.54 -13.45,0 -26.28,2.68 -37.98,7.54 -12.13,5.02 -23.04,12.38 -32.18,21.52 -9.14,9.14 -16.5,20.05 -21.53,32.18 -4.85,11.69 -7.53,24.52 -7.53,37.97 h 14.18 c 0,11.53 2.3,22.52 6.46,32.55 4.3,10.39 10.62,19.75 18.45,27.58 7.83,7.84 17.1801,14.15 27.58,18.46 10.03,4.16 21.02,6.45 32.55,6.45 11.53,0 22.52,-2.3 32.55,-6.46 10.39,-4.3 19.74,-10.61 27.5699,-18.45 7.83,-7.82 14.15,-17.17 18.46,-27.57 l 13.09,5.42 c 4.86,-11.7 7.54,-24.52 7.54,-37.98 z m -85.13,70.87 c -9.61,0 -18.77,-1.91 -27.12,-5.38 -8.66,-3.58 -16.46,-8.85 -22.99,-15.38 -6.53,-6.53 -11.79,-14.32 -15.38,-22.98 l 13.1,-5.42 c 2.87,6.93 7.0699,13.16 12.3,18.38 v 0.01 c 5.22,5.22 11.46,9.43 18.39,12.3 6.69,2.77 14.02,4.3 21.7,4.3 7.68,0 15.01,-1.53 21.7,-4.3 l 5.42,13.09 c -8.35,3.4699 -17.51,5.38 -27.12,5.38 z"
|
||||
id="path28" />
|
||||
<path
|
||||
fill="none"
|
||||
d="m 411.0713,270.7826 v 69.37 h -0.05 c 0,9.61 -1.91,18.77 -5.38,27.13 -3.59,8.66 -8.85,16.45 -15.38,22.98 l -10.01,-10.01 c 5.22,-5.22 9.43,-11.46 12.3,-18.39 2.77,-6.69 4.3,-14.02 4.3,-21.71 v -98.2 c -4.26,-2.47 -8.7,-4.67 -13.29,-6.57 -13.36,-5.55 -28.02,-8.61 -43.4,-8.61 -15.37,0 -30.03,3.06 -43.4,8.61 -13.86,5.74 -26.33,14.15 -36.78,24.6 -10.45,10.44 -18.86,22.91 -24.6,36.77 l 13.09,5.43 c -4.85,11.69 -7.53,24.52 -7.53,37.97 h 14.18 c 0,11.53 2.3,22.52 6.46,32.55 4.3,10.39 10.62,19.75 18.45,27.58 7.83,7.84 17.1801,14.15 27.58,18.46 10.03,4.16 21.02,6.45 32.55,6.45 11.53,0 22.52,-2.3 32.55,-6.46 10.39,-4.3 19.74,-10.61 27.5699,-18.45 7.83,-7.82 14.15,-17.17 18.46,-27.57 l 13.09,5.42 c -5.02,12.13 -12.38,23.04 -21.52,32.18 -9.14,9.14 -20.05,16.51 -32.18,21.52 -11.7,4.86 -24.52,7.54 -37.97,7.54 -13.45,0 -26.28,-2.68 -37.98,-7.54 -12.13,-5.01 -23.04,-12.38 -32.18,-21.52 -9.14,-9.14 -16.5,-20.05 -21.52,-32.18 -4.86,-11.7 -7.54,-24.52 -7.54,-37.98 h -14.17 c 0,15.38 3.06,30.04 8.61,43.41 5.74,13.86 14.16,26.33 24.6,36.77 10.45,10.45 22.92,18.86 36.78,24.6 13.37,5.55 28.03,8.61 43.4,8.61 15.38,0 30.04,-3.06 43.4,-8.61 13.86,-5.74 26.33,-14.16 36.77,-24.6 10.44,-10.44 18.86,-22.91 24.6,-36.77 5.55,-13.37 8.61,-28.03 8.61,-43.41 0,-15.37 -3.06,-30.03 -8.61,-43.4 -1.6,-3.86 -3.41,-7.62 -5.42,-11.25 v 54.65 h -14.22 v -74.88 c -1.6,-1.82 -3.25,-3.58 -4.96,-5.29 -2.93,-2.93 -6.02,-5.6999 -9.26,-8.29 v 17.55 m -70.9099,141.78 c -9.61,0 -18.77,-1.91 -27.12,-5.38 -8.66,-3.58 -16.46,-8.85 -22.99,-15.38 -6.53,-6.53 -11.79,-14.32 -15.38,-22.98 l 13.1,-5.42 c 2.87,6.93 7.0699,13.16 12.3,18.38 v 0.01 c 5.22,5.22 11.46,9.43 18.39,12.3 6.69,2.77 14.02,4.3 21.7,4.3 7.68,0 15.01,-1.53 21.7,-4.3 l 5.42,13.09 c -8.35,3.4699 -17.51,5.38 -27.12,5.38 z"
|
||||
id="path30" />
|
||||
<path
|
||||
fill="none"
|
||||
d="m 400.2813,400.2826 c 7.83,-7.82 14.15,-17.17 18.46,-27.57 l 13.09,5.42 c -5.02,12.13 -12.38,23.04 -21.52,32.18 -9.14,9.14 -20.05,16.51 -32.18,21.52 -11.7,4.86 -24.52,7.54 -37.97,7.54 -13.45,0 -26.28,-2.68 -37.98,-7.54 -12.13,-5.01 -23.04,-12.38 -32.18,-21.52 -9.14,-9.14 -16.5,-20.05 -21.52,-32.18 -4.86,-11.7 -7.54,-24.52 -7.54,-37.98 h -14.17 c 0,-15.37 3.06,-30.03 8.61,-43.4 l 13.09,5.43 c -4.85,11.69 -7.53,24.52 -7.53,37.97 h 14.18 c 0,11.53 2.3,22.52 6.46,32.55 4.3,10.39 10.62,19.75 18.45,27.58 7.83,7.84 17.1801,14.15 27.58,18.46 10.03,4.16 21.02,6.45 32.55,6.45 11.53,0 22.52,-2.3 32.55,-6.46 10.39,-4.3 19.74,-10.61 27.57,-18.45 z m -33,5.36 c -8.35,3.47 -17.5099,5.38 -27.12,5.38 -9.61,0 -18.77,-1.91 -27.12,-5.38 -8.66,-3.58 -16.46,-8.85 -22.99,-15.38 -6.53,-6.53 -11.79,-14.32 -15.38,-22.98 l 13.1,-5.42 c 2.87,6.93 7.0699,13.16 12.3,18.38 v 0.01 c 5.22,5.22 11.46,9.43 18.39,12.3 6.69,2.77 14.02,4.3 21.7,4.3 7.68,0 15.01,-1.53 21.7,-4.3 z"
|
||||
id="path32" />
|
||||
<path
|
||||
fill="none"
|
||||
d="m 418.7413,307.6026 c -2.1,-5.0601 -4.68,-9.88 -7.67,-14.4 v 46.95 h -0.05 c 0,9.61 -1.91,18.77 -5.38,27.13 -3.59,8.66 -8.85,16.45 -15.38,22.98 l -10.01,-10.01 c 5.22,-5.22 9.43,-11.46 12.3,-18.39 2.77,-6.69 4.3,-14.02 4.3,-21.71 v -63.37 c -7.08,-6.34 -15.23,-11.51 -24.14,-15.2 -10.03,-4.16 -21.02,-6.46 -32.55,-6.46 -11.53,0 -22.52,2.29 -32.55,6.45 -10.4,4.31 -19.75,10.62 -27.58,18.46 -7.83,7.83 -14.15,17.18 -18.45,27.57 -4.16,10.03 -6.46,21.02 -6.46,32.55 0,11.53 2.3,22.52 6.46,32.55 4.3,10.39 10.62,19.75 18.45,27.58 7.83,7.84 17.1801,14.15 27.58,18.46 10.03,4.16 21.02,6.45 32.55,6.45 11.53,0 22.52,-2.3 32.55,-6.46 10.39,-4.3 19.74,-10.61 27.5699,-18.45 7.83,-7.82 14.15,-17.17 18.46,-27.57 4.16,-10.03 6.46,-21.03 6.46,-32.56 1e-4,-11.53 -2.2999,-22.52 -6.4599,-32.55 z m -78.58,103.42 c -9.61,0 -18.77,-1.91 -27.12,-5.38 -8.66,-3.58 -16.46,-8.85 -22.99,-15.38 -6.53,-6.53 -11.79,-14.32 -15.38,-22.98 l 13.1,-5.42 c 2.87,6.93 7.0699,13.16 12.3,18.38 v 0.01 c 5.22,5.22 11.46,9.43 18.39,12.3 6.69,2.77 14.02,4.3 21.7,4.3 7.68,0 15.01,-1.53 21.7,-4.3 l 5.42,13.09 c -8.35,3.4699 -17.51,5.38 -27.12,5.38 z"
|
||||
id="path34" />
|
||||
<path
|
||||
fill="none"
|
||||
d="m 425.2913,340.1526 v -50.97 c -4.01,-6.69 -8.79,-12.86 -14.22,-18.4 v 69.37 h -0.05 c 0,9.61 -1.91,18.77 -5.38,27.13 -3.59,8.66 -8.85,16.45 -15.38,22.98 l -10.01,-10.01 c 5.22,-5.22 9.43,-11.46 12.3,-18.39 2.77,-6.69 4.3,-14.02 4.3,-21.71 v -81.42 c -5.81,-4.06 -12.08,-7.5 -18.72,-10.25 -11.7,-4.86 -24.52,-7.54 -37.97,-7.54 -13.45,0 -26.28,2.68 -37.98,7.54 -12.13,5.02 -23.04,12.38 -32.18,21.52 -9.14,9.14 -16.5,20.05 -21.53,32.18 -4.85,11.69 -7.53,24.52 -7.53,37.97 h 14.18 c 0,11.53 2.3,22.52 6.46,32.55 4.3,10.39 10.62,19.75 18.45,27.58 7.83,7.84 17.1801,14.15 27.58,18.46 10.03,4.16 21.02,6.45 32.55,6.45 11.53,0 22.52,-2.3 32.55,-6.46 10.39,-4.3 19.74,-10.61 27.5699,-18.45 7.83,-7.82 14.15,-17.17 18.46,-27.57 l 13.09,5.42 c 4.86,-11.7 7.54,-24.52 7.54,-37.98 z m -85.13,70.87 c -9.61,0 -18.77,-1.91 -27.12,-5.38 -8.66,-3.58 -16.46,-8.85 -22.99,-15.38 -6.53,-6.53 -11.79,-14.32 -15.38,-22.98 l 13.1,-5.42 c 2.87,6.93 7.0699,13.16 12.3,18.38 v 0.01 c 5.22,5.22 11.46,9.43 18.39,12.3 6.69,2.77 14.02,4.3 21.7,4.3 7.68,0 15.01,-1.53 21.7,-4.3 l 5.42,13.09 c -8.35,3.4699 -17.51,5.38 -27.12,5.38 z"
|
||||
id="path36" />
|
||||
<path
|
||||
fill="none"
|
||||
d="m 411.0713,270.7826 v 69.37 h -0.05 c 0,9.61 -1.91,18.77 -5.38,27.13 -3.59,8.66 -8.85,16.45 -15.38,22.98 l -10.01,-10.01 c 5.22,-5.22 9.43,-11.46 12.3,-18.39 2.77,-6.69 4.3,-14.02 4.3,-21.71 v -98.2 c -4.26,-2.47 -8.7,-4.67 -13.29,-6.57 -13.36,-5.55 -28.02,-8.61 -43.4,-8.61 -15.37,0 -30.03,3.06 -43.4,8.61 -13.86,5.74 -26.33,14.15 -36.78,24.6 -10.45,10.44 -18.86,22.91 -24.6,36.77 l 13.09,5.43 c -4.85,11.69 -7.53,24.52 -7.53,37.97 h 14.18 c 0,11.53 2.3,22.52 6.46,32.55 4.3,10.39 10.62,19.75 18.45,27.58 7.83,7.84 17.1801,14.15 27.58,18.46 10.03,4.16 21.02,6.45 32.55,6.45 11.53,0 22.52,-2.3 32.55,-6.46 10.39,-4.3 19.74,-10.61 27.5699,-18.45 7.83,-7.82 14.15,-17.17 18.46,-27.57 l 13.09,5.42 c -5.02,12.13 -12.38,23.04 -21.52,32.18 -9.14,9.14 -20.05,16.51 -32.18,21.52 -11.7,4.86 -24.52,7.54 -37.97,7.54 -13.45,0 -26.28,-2.68 -37.98,-7.54 -12.13,-5.01 -23.04,-12.38 -32.18,-21.52 -9.14,-9.14 -16.5,-20.05 -21.52,-32.18 -4.86,-11.7 -7.54,-24.52 -7.54,-37.98 h -14.17 c 0,15.38 3.06,30.04 8.61,43.41 5.74,13.86 14.16,26.33 24.6,36.77 10.45,10.45 22.92,18.86 36.78,24.6 13.37,5.55 28.03,8.61 43.4,8.61 15.38,0 30.04,-3.06 43.4,-8.61 13.86,-5.74 26.33,-14.16 36.77,-24.6 10.44,-10.44 18.86,-22.91 24.6,-36.77 5.55,-13.37 8.61,-28.03 8.61,-43.41 0,-15.37 -3.06,-30.03 -8.61,-43.4 -1.6,-3.86 -3.41,-7.62 -5.42,-11.25 v 54.65 h -14.22 v -74.88 c -1.6,-1.82 -3.25,-3.58 -4.96,-5.29 -2.93,-2.93 -6.02,-5.6999 -9.26,-8.29 v 17.55 m -70.9099,141.78 c -9.61,0 -18.77,-1.91 -27.12,-5.38 -8.66,-3.58 -16.46,-8.85 -22.99,-15.38 -6.53,-6.53 -11.79,-14.32 -15.38,-22.98 l 13.1,-5.42 c 2.87,6.93 7.0699,13.16 12.3,18.38 v 0.01 c 5.22,5.22 11.46,9.43 18.39,12.3 6.69,2.77 14.02,4.3 21.7,4.3 7.68,0 15.01,-1.53 21.7,-4.3 l 5.42,13.09 c -8.35,3.4699 -17.51,5.38 -27.12,5.38 z"
|
||||
id="path38" />
|
||||
</g></svg>
|
||||
|
After Width: | Height: | Size: 21 KiB |
BIN
resources/profiles/Jubilee/Jubilee_thumbnail.png
Normal file
BIN
resources/profiles/Jubilee/Jubilee_thumbnail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
@ -1,4 +1,5 @@
|
||||
min_slic3r_version = 2.4.0-rc
|
||||
1.4.2 Added SLA material profiles.
|
||||
1.4.1 Updated firmware version.
|
||||
1.4.0 Updated for the PrusaSlicer 2.4.0-rc release. Updated SLA material colors.
|
||||
min_slic3r_version = 2.4.0-beta2
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
name = Prusa Research
|
||||
# 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.
|
||||
config_version = 1.4.1
|
||||
config_version = 1.4.2
|
||||
# Where to get the updates from?
|
||||
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%
|
||||
@ -4875,6 +4875,30 @@ material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #F9DB4C
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Green @0.025]
|
||||
inherits = *common 0.025*
|
||||
exposure_time = 5
|
||||
initial_exposure_time = 35
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #1DAf5E
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Red @0.025]
|
||||
inherits = *common 0.025*
|
||||
exposure_time = 6
|
||||
initial_exposure_time = 35
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #D21B31
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Amber @0.025]
|
||||
inherits = *common 0.025*
|
||||
exposure_time = 5
|
||||
initial_exposure_time = 35
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #FCB30E
|
||||
|
||||
## Prusa 0.025
|
||||
|
||||
[sla_material:Prusa Orange Tough @0.025]
|
||||
@ -5052,6 +5076,14 @@ material_type = Casting
|
||||
material_vendor = Made for Prusa
|
||||
material_colour = #FFFF6F
|
||||
|
||||
[sla_material:Ameralabs TGM-7 LED @0.025]
|
||||
inherits = *common 0.025*
|
||||
exposure_time = 4
|
||||
initial_exposure_time = 35
|
||||
material_type = Tough
|
||||
material_vendor = Ameralabs
|
||||
material_colour = #C0C0C0
|
||||
|
||||
[sla_material:Siraya Tech Simple Clear @0.025]
|
||||
inherits = *common 0.025*
|
||||
exposure_time = 8
|
||||
@ -5190,6 +5222,14 @@ material_type = Tough
|
||||
material_vendor = Asiga
|
||||
material_colour = #C0C0C0
|
||||
|
||||
[sla_material:Ameralabs TGM-7 LED @0.05]
|
||||
inherits = *common 0.05*
|
||||
exposure_time = 7
|
||||
initial_exposure_time = 35
|
||||
material_type = Tough
|
||||
material_vendor = Ameralabs
|
||||
material_colour = #C0C0C0
|
||||
|
||||
[sla_material:Ameralabs AMD 3 LED @0.05]
|
||||
inherits = *common 0.05*
|
||||
exposure_time = 5
|
||||
@ -5728,6 +5768,30 @@ material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #F9DB4C
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Green @0.05]
|
||||
inherits = *common 0.05*
|
||||
exposure_time = 6
|
||||
initial_exposure_time = 35
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #1DAf5E
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Red @0.05]
|
||||
inherits = *common 0.05*
|
||||
exposure_time = 8
|
||||
initial_exposure_time = 35
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #D21B31
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Amber @0.05]
|
||||
inherits = *common 0.05*
|
||||
exposure_time = 6
|
||||
initial_exposure_time = 35
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #FCB30E
|
||||
|
||||
## Prusa 0.05
|
||||
|
||||
[sla_material:Prusa Beige Tough @0.05]
|
||||
@ -6018,6 +6082,14 @@ material_type = Tough
|
||||
material_vendor = BlueCast
|
||||
material_colour = #FFEEE6
|
||||
|
||||
[sla_material:Ameralabs TGM-7 LED @0.1]
|
||||
inherits = *common 0.1*
|
||||
exposure_time = 10
|
||||
initial_exposure_time = 45
|
||||
material_type = Tough
|
||||
material_vendor = Ameralabs
|
||||
material_colour = #C0C0C0
|
||||
|
||||
## Prusa Polymers 0.1
|
||||
|
||||
[sla_material:Prusament Resin Tough Prusa Orange @0.1]
|
||||
@ -6084,6 +6156,30 @@ material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #F9DB4C
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Green @0.1]
|
||||
inherits = *common 0.1*
|
||||
exposure_time = 13
|
||||
initial_exposure_time = 45
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #1DAf5E
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Red @0.1]
|
||||
inherits = *common 0.1*
|
||||
exposure_time = 13
|
||||
initial_exposure_time = 45
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #D21B31
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Amber @0.1]
|
||||
inherits = *common 0.1*
|
||||
exposure_time = 13
|
||||
initial_exposure_time = 45
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #FCB30E
|
||||
|
||||
## Prusa 0.1
|
||||
|
||||
[sla_material:Prusa Orange Tough @0.1]
|
||||
@ -6244,6 +6340,30 @@ material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #F9DB4C
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Green @0.025 SL1S]
|
||||
inherits = *0.025_sl1s*
|
||||
exposure_time = 1.8
|
||||
initial_exposure_time = 25
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #1DAf5E
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Red @0.025 SL1S]
|
||||
inherits = *0.025_sl1s*
|
||||
exposure_time = 2
|
||||
initial_exposure_time = 25
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #D21B31
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Amber @0.025 SL1S]
|
||||
inherits = *0.025_sl1s*
|
||||
exposure_time = 1.8
|
||||
initial_exposure_time = 25
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #FCB30E
|
||||
|
||||
## Made for Prusa 0.025
|
||||
|
||||
[sla_material:Prusa Orange Tough @0.025 SL1S]
|
||||
@ -6366,6 +6486,15 @@ material_type = Casting
|
||||
material_vendor = Made for Prusa
|
||||
material_colour = #00B900
|
||||
|
||||
[sla_material:Ameralabs TGM-7 LED @0.025 SL1S]
|
||||
inherits = *0.025_sl1s*
|
||||
exposure_time = 1.8
|
||||
initial_exposure_time = 25
|
||||
material_type = Tough
|
||||
material_vendor = Ameralabs
|
||||
material_colour = #C0C0C0
|
||||
material_print_speed = slow
|
||||
|
||||
[sla_material:PrimaCreator Tough Light Grey @0.025 SL1S]
|
||||
inherits = *0.025_sl1s*
|
||||
exposure_time = 1.8
|
||||
@ -6413,6 +6542,7 @@ initial_exposure_time = 15
|
||||
material_type = Dental
|
||||
material_vendor = DruckWege
|
||||
material_colour = #FFEEE6
|
||||
material_print_speed = slow
|
||||
|
||||
[sla_material:DruckWege Type D Standard White @0.025 SL1S]
|
||||
inherits = *0.025_sl1s*
|
||||
@ -6421,6 +6551,7 @@ initial_exposure_time = 15
|
||||
material_type = Tough
|
||||
material_vendor = DruckWege
|
||||
material_colour = #FFFFFF
|
||||
material_print_speed = slow
|
||||
|
||||
[sla_material:DruckWege Type D Standard Pigmentfrei Clear @0.025 SL1S]
|
||||
inherits = *0.025_sl1s*
|
||||
@ -6429,6 +6560,7 @@ initial_exposure_time = 15
|
||||
material_type = Tough
|
||||
material_vendor = DruckWege
|
||||
material_colour = #F8F8F8
|
||||
material_print_speed = slow
|
||||
|
||||
[sla_material:3DM-ABS Orange @0.025 SL1S]
|
||||
inherits = *0.025_sl1s*
|
||||
@ -6530,6 +6662,30 @@ material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #F9DB4C
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Green @0.05 SL1S]
|
||||
inherits = *0.05_sl1s*
|
||||
exposure_time = 2
|
||||
initial_exposure_time = 25
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #1DAf5E
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Red @0.05 SL1S]
|
||||
inherits = *0.05_sl1s*
|
||||
exposure_time = 2.6
|
||||
initial_exposure_time = 25
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #D21B31
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Amber @0.05 SL1S]
|
||||
inherits = *0.05_sl1s*
|
||||
exposure_time = 2.6
|
||||
initial_exposure_time = 25
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #FCB30E
|
||||
|
||||
## Made for Prusa 0.05
|
||||
|
||||
[sla_material:Prusa Orange Tough @0.05 SL1S]
|
||||
@ -6652,6 +6808,15 @@ material_type = Casting
|
||||
material_vendor = Made for Prusa
|
||||
material_colour = #00B900
|
||||
|
||||
[sla_material:Ameralabs TGM-7 LED @0.05 SL1S]
|
||||
inherits = *0.05_sl1s*
|
||||
exposure_time = 2
|
||||
initial_exposure_time = 25
|
||||
material_type = Tough
|
||||
material_vendor = Ameralabs
|
||||
material_colour = #C0C0C0
|
||||
material_print_speed = slow
|
||||
|
||||
[sla_material:PrimaCreator Tough Light Grey @0.05 SL1S]
|
||||
inherits = *0.05_sl1s*
|
||||
exposure_time = 2.4
|
||||
@ -6699,6 +6864,7 @@ initial_exposure_time = 15
|
||||
material_type = Dental
|
||||
material_vendor = DruckWege
|
||||
material_colour = #FFEEE6
|
||||
material_print_speed = slow
|
||||
|
||||
[sla_material:DruckWege Type D Standard White @0.05 SL1S]
|
||||
inherits = *0.05_sl1s*
|
||||
@ -6707,6 +6873,7 @@ initial_exposure_time = 15
|
||||
material_type = Tough
|
||||
material_vendor = DruckWege
|
||||
material_colour = #FFFFFF
|
||||
material_print_speed = slow
|
||||
|
||||
[sla_material:DruckWege Type D Standard Pigmentfrei Clear @0.05 SL1S]
|
||||
inherits = *0.05_sl1s*
|
||||
@ -6715,6 +6882,7 @@ initial_exposure_time = 15
|
||||
material_type = Tough
|
||||
material_vendor = DruckWege
|
||||
material_colour = #F8F8F8
|
||||
material_print_speed = slow
|
||||
|
||||
[sla_material:3DM-ABS Orange @0.05 SL1S]
|
||||
inherits = *0.05_sl1s*
|
||||
@ -6816,6 +6984,30 @@ material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #F9DB4C
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Green @0.1 SL1S]
|
||||
inherits = *0.1_sl1s*
|
||||
exposure_time = 2.6
|
||||
initial_exposure_time = 25
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #1DAf5E
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Red @0.1 SL1S]
|
||||
inherits = *0.1_sl1s*
|
||||
exposure_time = 3
|
||||
initial_exposure_time = 25
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #D21B31
|
||||
|
||||
[sla_material:Prusament Resin Tough Transparent Amber @0.1 SL1S]
|
||||
inherits = *0.1_sl1s*
|
||||
exposure_time = 3.6
|
||||
initial_exposure_time = 25
|
||||
material_type = Tough
|
||||
material_vendor = Prusa Polymers
|
||||
material_colour = #FCB30E
|
||||
|
||||
## Made for Prusa 0.1
|
||||
|
||||
[sla_material:Prusa Orange Tough @0.1 SL1S]
|
||||
@ -6938,6 +7130,15 @@ material_type = Casting
|
||||
material_vendor = Made for Prusa
|
||||
material_colour = #00B900
|
||||
|
||||
[sla_material:Ameralabs TGM-7 LED @0.1 SL1S]
|
||||
inherits = *0.1_sl1s*
|
||||
exposure_time = 2.6
|
||||
initial_exposure_time = 25
|
||||
material_type = Tough
|
||||
material_vendor = Ameralabs
|
||||
material_colour = #C0C0C0
|
||||
material_print_speed = slow
|
||||
|
||||
[sla_material:PrimaCreator Tough Light Grey @0.1 SL1S]
|
||||
inherits = *0.1_sl1s*
|
||||
exposure_time = 3
|
||||
@ -6985,6 +7186,7 @@ initial_exposure_time = 15
|
||||
material_type = Dental
|
||||
material_vendor = DruckWege
|
||||
material_colour = #FFEEE6
|
||||
material_print_speed = slow
|
||||
|
||||
[sla_material:3DM-ABS Orange @0.1 SL1S]
|
||||
inherits = *0.1_sl1s*
|
||||
@ -7695,7 +7897,7 @@ retract_lift_below = 179
|
||||
retract_layer_change = 1
|
||||
silent_mode = 0
|
||||
remaining_times = 1
|
||||
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S170 ; set extruder temp for bed leveling\nM140 S[first_layer_bed_temperature] ; set bed temp\nM109 R170 ; wait for bed leveling temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM204 T1250 ; set travel acceleration\nG28 ; home all without mesh bed level\nG29 ; mesh bed leveling \nM204 T[machine_max_acceleration_travel] ; restore travel acceleration\nM104 S[first_layer_temperature] ; set extruder temp\nG92 E0\nG1 Y-2 X179 F2400\nG1 Z3 F720\nM109 S[first_layer_temperature] ; wait for extruder temp\n\n; intro line\nG1 X170 F1000\nG1 Z0.2 F720\nG1 X110 E8 F900\nG1 X40 E10 F700\nG92 E0\n\nM221 S95 ; set flow
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S170 ; set extruder temp for bed leveling\nM140 S[first_layer_bed_temperature] ; set bed temp\nM109 R170 ; wait for bed leveling temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM204 T1250 ; set travel acceleration\nG28 ; home all without mesh bed level\nG29 ; mesh bed leveling \nM204 T[machine_max_acceleration_travel] ; restore travel acceleration\nM104 S[first_layer_temperature] ; set extruder temp\nG92 E0\nG1 Y-2 X179 F2400\nG1 Z3 F720\nM109 S[first_layer_temperature] ; wait for extruder temp\n\n; intro line\nG1 X170 F1000\nG1 Z0.2 F720\nG1 X110 E8 F900\nG1 X40 E10 F700\nG92 E0\n\nM221 S95 ; set flow
|
||||
end_gcode = G1 E-1 F2100 ; retract\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F720 ; Move print head up{endif}\nG1 X178 Y178 F4200 ; park print head\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+30, max_print_height)} F720 ; Move print head further up{endif}\nG4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM221 S100 ; reset flow\nM900 K0 ; reset LA\nM84 ; disable motors
|
||||
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_MINI\n
|
||||
extruder_colour =
|
||||
@ -7712,7 +7914,7 @@ default_print_profile = 0.10mm DETAIL @0.25 nozzle MINI
|
||||
retract_length = 3
|
||||
retract_lift = 0.15
|
||||
retract_before_travel = 1
|
||||
start_gcode = G90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S170 ; set extruder temp for bed leveling\nM140 S[first_layer_bed_temperature] ; set bed temp\nM109 R170 ; wait for bed leveling temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM204 T1250 ; set travel acceleration\nG28 ; home all without mesh bed level\nG29 ; mesh bed leveling \nM204 T[machine_max_acceleration_travel] ; restore travel acceleration\nM104 S[first_layer_temperature] ; set extruder temp\nG92 E0\nG1 Y-2 X179 F2400\nG1 Z3 F720\nM109 S[first_layer_temperature] ; wait for extruder temp\n\n; intro line\nG1 X170 F1000\nG1 Z0.2 F720\nG1 X110 E8 F600\nG1 X40 E10 F400\nG92 E0\n\nM221 S95 ; set flow
|
||||
start_gcode = M862.3 P \"[printer_model]\" ; printer model check\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\nM104 S170 ; set extruder temp for bed leveling\nM140 S[first_layer_bed_temperature] ; set bed temp\nM109 R170 ; wait for bed leveling temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM204 T1250 ; set travel acceleration\nG28 ; home all without mesh bed level\nG29 ; mesh bed leveling \nM204 T[machine_max_acceleration_travel] ; restore travel acceleration\nM104 S[first_layer_temperature] ; set extruder temp\nG92 E0\nG1 Y-2 X179 F2400\nG1 Z3 F720\nM109 S[first_layer_temperature] ; wait for extruder temp\n\n; intro line\nG1 X170 F1000\nG1 Z0.2 F720\nG1 X110 E8 F600\nG1 X40 E10 F400\nG92 E0\n\nM221 S95 ; set flow
|
||||
|
||||
[printer:Original Prusa MINI & MINI+ 0.6 nozzle]
|
||||
inherits = Original Prusa MINI & MINI+
|
||||
|
||||
@ -83,7 +83,7 @@ extruder_clearance_radius = 45
|
||||
extrusion_width = 0.4
|
||||
fill_angle = 45
|
||||
fill_density = 15%
|
||||
fill_pattern = adaptivecubic
|
||||
fill_pattern = cubic
|
||||
first_layer_acceleration = 1000
|
||||
first_layer_extrusion_width = 0.45
|
||||
first_layer_height = 0.2
|
||||
@ -198,7 +198,7 @@ dont_support_bridges = 1
|
||||
draft_shield = 0
|
||||
ensure_vertical_shell_thickness = 1
|
||||
external_perimeter_extrusion_width = 0.4
|
||||
external_perimeter_speed = 100
|
||||
external_perimeter_speed = 110
|
||||
extra_perimeters = 0
|
||||
extra_perimeters_overhangs = 0
|
||||
extruder_clearance_height = 25
|
||||
@ -206,7 +206,7 @@ extruder_clearance_radius = 45
|
||||
extrusion_width = 0.4
|
||||
fill_angle = 45
|
||||
fill_density = 15%
|
||||
fill_pattern = rectilinear
|
||||
fill_pattern = cubic
|
||||
first_layer_acceleration = 1000
|
||||
first_layer_extrusion_width = 0.45
|
||||
first_layer_height = 0.2
|
||||
@ -215,7 +215,7 @@ gap_fill = 1
|
||||
gap_fill_speed = 50
|
||||
gcode_comments = 0
|
||||
gcode_label_objects = 1
|
||||
infill_acceleration = 2000
|
||||
infill_acceleration = 3000
|
||||
infill_anchor = 600%
|
||||
infill_anchor_max = 5
|
||||
infill_every_layers = 1
|
||||
@ -239,13 +239,13 @@ notes =
|
||||
only_retract_when_crossing_perimeters = 0
|
||||
ooze_prevention = 0
|
||||
output_filename_format = {input_filename_base}_{layer_height}mm_{filament_type[0]}_{print_time}.gcode
|
||||
perimeter_acceleration = 1500
|
||||
perimeter_acceleration = 2500
|
||||
perimeter_bonding = 0%
|
||||
perimeter_extruder = 1
|
||||
perimeter_extrusion_width = 0.4
|
||||
perimeter_overlap = 100%
|
||||
perimeter_round_corners = 0
|
||||
perimeter_speed = 100
|
||||
perimeter_speed = 120
|
||||
perimeters = 2
|
||||
post_process =
|
||||
print_settings_id =
|
||||
@ -344,11 +344,11 @@ perimeter_speed = 160
|
||||
small_perimeter_speed = 25
|
||||
solid_infill_speed = 80%
|
||||
top_solid_infill_speed = 60%
|
||||
fill_pattern = rectilinear
|
||||
fill_pattern = cubic
|
||||
|
||||
[print:0.20mm NORMAL @RatRig]
|
||||
inherits = *common*; *0.2mm*
|
||||
fill_pattern = rectilinear
|
||||
fill_pattern = cubic
|
||||
external_perimeter_speed = 120
|
||||
infill_speed = 160
|
||||
compatible_printers_condition = printer_model=~/.*VC3_.*/ and nozzle_diameter[0]==0.4
|
||||
@ -361,7 +361,7 @@ bottom_solid_layers = 3
|
||||
[print:0.15mm QUALITY V-Minion @RatRig]
|
||||
inherits = *common_minion*; *0.15mm*
|
||||
compatible_printers_condition = printer_model=~/.*MINION.*/
|
||||
solid_infill_speed = 100
|
||||
solid_infill_speed = 120
|
||||
|
||||
[print:0.20mm HF @RatRig]
|
||||
inherits = 0.15mm HF @RatRig; *0.2mm*
|
||||
@ -436,7 +436,7 @@ retract_restart_extra_toolchange = 0
|
||||
retract_speed = 40
|
||||
silent_mode = 0
|
||||
single_extruder_multi_material = 0
|
||||
start_gcode = START_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature]\n;enable this if you have a BTT Smart Filament Sensor\n;SET_FILAMENT_SENSOR SENSOR=my_sensor ENABLE=0\n
|
||||
start_gcode = M190 S0 ; Prevents prusaslicer from prepending m190 to the gcode interfering with the macro\nM109 S0 ; Prevents prusaslicer from prepending m109 to the gcode interfering with the macro\nSTART_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature]\n;enable this if you have a BTT Smart Filament Sensor\nSET_FILAMENT_SENSOR SENSOR=my_sensor ENABLE=0\n
|
||||
thumbnails = 16x16,220x220
|
||||
toolchange_gcode =
|
||||
use_firmware_retraction = 0
|
||||
@ -499,7 +499,7 @@ retract_restart_extra_toolchange = 0
|
||||
retract_speed = 40
|
||||
silent_mode = 0
|
||||
single_extruder_multi_material = 0
|
||||
start_gcode = START_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature]\n;enable this if you have a BTT Smart Filament Sensor\n;SET_FILAMENT_SENSOR SENSOR=my_sensor ENABLE=0\n
|
||||
start_gcode = M190 S0 ; Prevents prusaslicer from prepending m190 to the gcode interfering with the macro\nM109 S0 ; Prevents prusaslicer from prepending m109 to the gcode interfering with the macro\nSTART_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature]\n;enable this if you have a BTT Smart Filament Sensor\nSET_FILAMENT_SENSOR SENSOR=my_sensor ENABLE=0\n
|
||||
start_gcode_manual = 0
|
||||
template_custom_gcode =
|
||||
thumbnails = 16x16,220x220
|
||||
|
||||
11
resources/shaders/background.fs
Normal file
11
resources/shaders/background.fs
Normal file
@ -0,0 +1,11 @@
|
||||
#version 110
|
||||
|
||||
uniform vec4 top_color;
|
||||
uniform vec4 bottom_color;
|
||||
|
||||
varying vec2 tex_coord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = mix(bottom_color, top_color, tex_coord.y);
|
||||
}
|
||||
9
resources/shaders/background.vs
Normal file
9
resources/shaders/background.vs
Normal file
@ -0,0 +1,9 @@
|
||||
#version 110
|
||||
|
||||
varying vec2 tex_coord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = gl_Vertex;
|
||||
tex_coord = gl_MultiTexCoord0.xy;
|
||||
}
|
||||
10
resources/shaders/flat_texture.fs
Normal file
10
resources/shaders/flat_texture.fs
Normal file
@ -0,0 +1,10 @@
|
||||
#version 110
|
||||
|
||||
uniform sampler2D uniform_texture;
|
||||
|
||||
varying vec2 tex_coord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = texture2D(uniform_texture, tex_coord);
|
||||
}
|
||||
9
resources/shaders/flat_texture.vs
Normal file
9
resources/shaders/flat_texture.vs
Normal file
@ -0,0 +1,9 @@
|
||||
#version 110
|
||||
|
||||
varying vec2 tex_coord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = ftransform();
|
||||
tex_coord = gl_MultiTexCoord0.xy;
|
||||
}
|
||||
@ -823,6 +823,26 @@ std::string CLI::output_filepath(const Model &model, IO::ExportFormat format) co
|
||||
return proposed_path.string();
|
||||
}
|
||||
|
||||
// __has_feature() is used later for Clang, this is for compatibility with other compilers (such as GCC and MSVC)
|
||||
#ifndef __has_feature
|
||||
# define __has_feature(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
|
||||
extern "C" {
|
||||
// Based on https://github.com/google/skia/blob/main/tools/LsanSuppressions.cpp
|
||||
const char *__lsan_default_suppressions() {
|
||||
return "leak:libfontconfig\n" // FontConfig looks like it leaks, but it doesn't.
|
||||
"leak:libfreetype\n" // Unsure, appeared upgrading Debian 9->10.
|
||||
"leak:libGLX_nvidia.so\n" // For NVidia driver.
|
||||
"leak:libnvidia-glcore.so\n" // For NVidia driver.
|
||||
"leak:libnvidia-tls.so\n" // For NVidia driver.
|
||||
"leak:terminator_CreateDevice\n" // For Intel Vulkan drivers.
|
||||
;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
extern "C" {
|
||||
__declspec(dllexport) int __stdcall slic3r_main(int argc, wchar_t **argv)
|
||||
|
||||
@ -48,12 +48,14 @@ public:
|
||||
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 CYAN() { return { 0.0f, 1.0f, 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 MAGENTA() { return { 1.0f, 0.0f, 1.0f }; }
|
||||
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 }; }
|
||||
@ -112,12 +114,14 @@ public:
|
||||
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 CYAN() { return { 0.0f, 1.0f, 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 MAGENTA() { return { 1.0f, 0.0f, 1.0f, 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 }; }
|
||||
|
||||
@ -73,7 +73,7 @@ std::string escape_strings_cstyle(const std::vector<std::string> &strs)
|
||||
bool should_quote = strs.size() == 1 && str.empty();
|
||||
for (size_t i = 0; i < str.size(); ++ i) {
|
||||
char c = str[i];
|
||||
if (c == ' ' || c == '\t' || c == '\\' || c == '"' || c == '\r' || c == '\n') {
|
||||
if (c == ' ' || c == ';' || c == '\t' || c == '\\' || c == '"' || c == '\r' || c == '\n') {
|
||||
should_quote = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -56,12 +56,9 @@ ExtrusionEntityCollection::operator ExtrusionPaths() const
|
||||
return paths;
|
||||
}
|
||||
|
||||
ExtrusionEntity* ExtrusionEntityCollection::clone() const
|
||||
ExtrusionEntity *ExtrusionEntityCollection::clone() const
|
||||
{
|
||||
ExtrusionEntityCollection* coll = new ExtrusionEntityCollection(*this);
|
||||
for (size_t i = 0; i < coll->entities.size(); ++i)
|
||||
coll->entities[i] = this->entities[i]->clone();
|
||||
return coll;
|
||||
return new ExtrusionEntityCollection(*this);
|
||||
}
|
||||
|
||||
void ExtrusionEntityCollection::reverse()
|
||||
|
||||
@ -2129,13 +2129,13 @@ GCode::LayerResult GCode::process_layer(
|
||||
// add tag for processor
|
||||
gcode += ";" + GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Layer_Change) + "\n";
|
||||
// export layer z
|
||||
char buf[64];
|
||||
sprintf(buf, ";Z:%g\n", print_z);
|
||||
gcode += buf;
|
||||
gcode += std::string(";Z:") + float_to_string_decimal_point(print_z) + "\n";
|
||||
|
||||
// export layer height
|
||||
float height = first_layer ? static_cast<float>(print_z) : static_cast<float>(print_z) - m_last_layer_z;
|
||||
sprintf(buf, ";%s%g\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Height).c_str(), height);
|
||||
gcode += buf;
|
||||
gcode += std::string(";") + GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Height)
|
||||
+ float_to_string_decimal_point(height) + "\n";
|
||||
|
||||
// update caches
|
||||
m_last_layer_z = static_cast<float>(print_z);
|
||||
m_max_layer_z = std::max(m_max_layer_z, m_last_layer_z);
|
||||
@ -3002,33 +3002,34 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||
// PrusaMultiMaterial::Writer may generate GCodeProcessor::Height_Tag lines without updating m_last_height
|
||||
// so, if the last role was erWipeTower we force export of GCodeProcessor::Height_Tag lines
|
||||
bool last_was_wipe_tower = (m_last_processor_extrusion_role == erWipeTower);
|
||||
char buf[64];
|
||||
assert(is_decimal_separator_point());
|
||||
|
||||
if (path.role() != m_last_processor_extrusion_role) {
|
||||
m_last_processor_extrusion_role = path.role();
|
||||
char buf[64];
|
||||
sprintf(buf, ";%s%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role).c_str(), ExtrusionEntity::role_to_string(m_last_processor_extrusion_role).c_str());
|
||||
gcode += buf;
|
||||
}
|
||||
|
||||
if (last_was_wipe_tower || m_last_width != path.width) {
|
||||
m_last_width = path.width;
|
||||
sprintf(buf, ";%s%g\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Width).c_str(), m_last_width);
|
||||
gcode += buf;
|
||||
gcode += std::string(";") + GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Width)
|
||||
+ float_to_string_decimal_point(m_last_width) + "\n";
|
||||
}
|
||||
|
||||
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
|
||||
if (last_was_wipe_tower || (m_last_mm3_per_mm != path.mm3_per_mm)) {
|
||||
m_last_mm3_per_mm = path.mm3_per_mm;
|
||||
sprintf(buf, ";%s%f\n", GCodeProcessor::Mm3_Per_Mm_Tag.c_str(), m_last_mm3_per_mm);
|
||||
gcode += buf;
|
||||
gcode += std::string(";") + GCodeProcessor::Mm3_Per_Mm_Tag
|
||||
+ float_to_string_decimal_point(m_last_mm3_per_mm) + "\n";
|
||||
}
|
||||
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
|
||||
|
||||
if (last_was_wipe_tower || std::abs(m_last_height - path.height) > EPSILON) {
|
||||
m_last_height = path.height;
|
||||
sprintf(buf, ";%s%g\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Height).c_str(), m_last_height);
|
||||
gcode += buf;
|
||||
|
||||
gcode += std::string(";") + GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Height)
|
||||
+ float_to_string_decimal_point(m_last_height) + "\n";
|
||||
}
|
||||
|
||||
std::string comment;
|
||||
|
||||
@ -24,11 +24,11 @@ const void unescape_extended_search_mode(std::string &s)
|
||||
|
||||
GCodeFindReplace::GCodeFindReplace(const std::vector<std::string> &gcode_substitutions)
|
||||
{
|
||||
if ((gcode_substitutions.size() % 3) != 0)
|
||||
if ((gcode_substitutions.size() % 4) != 0)
|
||||
throw RuntimeError("Invalid length of gcode_substitutions parameter");
|
||||
|
||||
m_substitutions.reserve(gcode_substitutions.size() / 3);
|
||||
for (size_t i = 0; i < gcode_substitutions.size(); i += 3) {
|
||||
m_substitutions.reserve(gcode_substitutions.size() / 4);
|
||||
for (size_t i = 0; i < gcode_substitutions.size(); i += 4) {
|
||||
Substitution out;
|
||||
try {
|
||||
out.plain_pattern = gcode_substitutions[i];
|
||||
@ -37,6 +37,7 @@ GCodeFindReplace::GCodeFindReplace(const std::vector<std::string> &gcode_substit
|
||||
out.regexp = strchr(params.c_str(), 'r') != nullptr || strchr(params.c_str(), 'R') != nullptr;
|
||||
out.case_insensitive = strchr(params.c_str(), 'i') != nullptr || strchr(params.c_str(), 'I') != nullptr;
|
||||
out.whole_word = strchr(params.c_str(), 'w') != nullptr || strchr(params.c_str(), 'W') != nullptr;
|
||||
out.single_line = strchr(params.c_str(), 's') != nullptr || strchr(params.c_str(), 'S') != nullptr;
|
||||
if (out.regexp) {
|
||||
out.regexp_pattern.assign(
|
||||
out.whole_word ?
|
||||
@ -116,7 +117,8 @@ std::string GCodeFindReplace::process_layer(const std::string &ain)
|
||||
temp.clear();
|
||||
temp.reserve(in->size());
|
||||
boost::regex_replace(ToStringIterator(temp), in->begin(), in->end(),
|
||||
substitution.regexp_pattern, substitution.format, boost::match_default | boost::match_not_dot_newline | boost::match_not_dot_null | boost::format_all);
|
||||
substitution.regexp_pattern, substitution.format,
|
||||
(substitution.single_line ? boost::match_single_line | boost::match_default : boost::match_not_dot_newline | boost::match_default) | boost::format_all);
|
||||
std::swap(out, temp);
|
||||
} else {
|
||||
if (in == &ain)
|
||||
|
||||
@ -24,6 +24,8 @@ private:
|
||||
bool regexp { false };
|
||||
bool case_insensitive { false };
|
||||
bool whole_word { false };
|
||||
// Valid for regexp only. Equivalent to Perl's /s modifier.
|
||||
bool single_line { false };
|
||||
};
|
||||
std::vector<Substitution> m_substitutions;
|
||||
};
|
||||
|
||||
@ -23,28 +23,35 @@ static constexpr float ENFORCER_CENTER_PENALTY = -10.f;
|
||||
|
||||
|
||||
|
||||
|
||||
// This function was introduced in 2016 to assign penalties to overhangs.
|
||||
// LukasM thinks that it discriminated a bit too much, so especially external
|
||||
// seams were than placed in funny places (non-overhangs were preferred too much).
|
||||
// He implemented his own version (below) which applies fixed penalty for really big overlaps.
|
||||
// static float extrudate_overlap_penalty(float nozzle_r, float weight_zero, float overlap_distance)
|
||||
// {
|
||||
// // The extrudate is not fully supported by the lower layer. Fit a polynomial penalty curve.
|
||||
// // Solved by sympy package:
|
||||
// /*
|
||||
// from sympy import *
|
||||
// (x,a,b,c,d,r,z)=symbols('x a b c d r z')
|
||||
// p = a + b*x + c*x*x + d*x*x*x
|
||||
// p2 = p.subs(solve([p.subs(x, -r), p.diff(x).subs(x, -r), p.diff(x,x).subs(x, -r), p.subs(x, 0)-z], [a, b, c, d]))
|
||||
// from sympy.plotting import plot
|
||||
// plot(p2.subs(r,0.2).subs(z,1.), (x, -1, 3), adaptive=False, nb_of_points=400)
|
||||
// */
|
||||
// if (overlap_distance < - nozzle_r) {
|
||||
// // The extrudate is fully supported by the lower layer. This is the ideal case, therefore zero penalty.
|
||||
// return 0.f;
|
||||
// } else {
|
||||
// float x = overlap_distance / nozzle_r;
|
||||
// float x2 = x * x;
|
||||
// float x3 = x2 * x;
|
||||
// return weight_zero * (1.f + 3.f * x + 3.f * x2 + x3);
|
||||
// }
|
||||
// }
|
||||
static float extrudate_overlap_penalty(float nozzle_r, float weight_zero, float overlap_distance)
|
||||
{
|
||||
// The extrudate is not fully supported by the lower layer. Fit a polynomial penalty curve.
|
||||
// Solved by sympy package:
|
||||
/*
|
||||
from sympy import *
|
||||
(x,a,b,c,d,r,z)=symbols('x a b c d r z')
|
||||
p = a + b*x + c*x*x + d*x*x*x
|
||||
p2 = p.subs(solve([p.subs(x, -r), p.diff(x).subs(x, -r), p.diff(x,x).subs(x, -r), p.subs(x, 0)-z], [a, b, c, d]))
|
||||
from sympy.plotting import plot
|
||||
plot(p2.subs(r,0.2).subs(z,1.), (x, -1, 3), adaptive=False, nb_of_points=400)
|
||||
*/
|
||||
if (overlap_distance < - nozzle_r) {
|
||||
// The extrudate is fully supported by the lower layer. This is the ideal case, therefore zero penalty.
|
||||
return 0.f;
|
||||
} else {
|
||||
float x = overlap_distance / nozzle_r;
|
||||
float x2 = x * x;
|
||||
float x3 = x2 * x;
|
||||
return weight_zero * (1.f + 3.f * x + 3.f * x2 + x3);
|
||||
}
|
||||
return overlap_distance > nozzle_r ? weight_zero : 0.f;
|
||||
}
|
||||
|
||||
|
||||
@ -313,12 +320,12 @@ void SeamPlacer::plan_perimeters(const std::vector<const ExtrusionEntity*> perim
|
||||
if (perimeters[i]->role() == erExternalPerimeter && perimeters[i]->is_loop()) {
|
||||
last_pos = this->calculate_seam(
|
||||
layer, seam_position, *dynamic_cast<const ExtrusionLoop*>(perimeters[i]), nozzle_dmr,
|
||||
po, lower_layer_edge_grid, last_pos);
|
||||
po, lower_layer_edge_grid, last_pos, false);
|
||||
m_plan[i].external = true;
|
||||
m_plan[i].seam_position = seam_position;
|
||||
m_plan[i].layer = &layer;
|
||||
m_plan[i].po = po;
|
||||
}
|
||||
m_plan[i].seam_position = seam_position;
|
||||
m_plan[i].layer = &layer;
|
||||
m_plan[i].po = po;
|
||||
m_plan[i].pt = last_pos;
|
||||
}
|
||||
}
|
||||
@ -327,7 +334,7 @@ void SeamPlacer::plan_perimeters(const std::vector<const ExtrusionEntity*> perim
|
||||
void SeamPlacer::place_seam(ExtrusionLoop& loop, const Point& last_pos, bool external_first, double nozzle_diameter,
|
||||
const EdgeGrid::Grid* lower_layer_edge_grid)
|
||||
{
|
||||
const double seam_offset = nozzle_diameter;
|
||||
// const double seam_offset = nozzle_diameter;
|
||||
|
||||
Point seam = last_pos;
|
||||
if (! m_plan.empty() && m_plan_idx < m_plan.size()) {
|
||||
@ -339,75 +346,100 @@ void SeamPlacer::place_seam(ExtrusionLoop& loop, const Point& last_pos, bool ext
|
||||
// far from each other.
|
||||
if ((seam.cast<double>() - last_pos.cast<double>()).squaredNorm() > std::pow(scale_(5.*nozzle_diameter), 2.))
|
||||
seam = this->calculate_seam(*m_plan[m_plan_idx].layer, m_plan[m_plan_idx].seam_position, loop, nozzle_diameter,
|
||||
m_plan[m_plan_idx].po, lower_layer_edge_grid, last_pos);
|
||||
}
|
||||
else if (! external_first) {
|
||||
// Internal perimeter printed before the external.
|
||||
// First get list of external seams.
|
||||
std::vector<size_t> ext_seams;
|
||||
for (size_t i = 0; i < m_plan.size(); ++i) {
|
||||
if (m_plan[i].external)
|
||||
ext_seams.emplace_back(i);
|
||||
}
|
||||
m_plan[m_plan_idx].po, lower_layer_edge_grid, last_pos, false);
|
||||
|
||||
if (! ext_seams.empty()) {
|
||||
// First find the line segment closest to an external seam:
|
||||
int path_idx = 0;
|
||||
int line_idx = 0;
|
||||
size_t ext_seam_idx = size_t(-1);
|
||||
double min_dist_sqr = std::numeric_limits<double>::max();
|
||||
std::vector<Lines> lines_vect;
|
||||
for (int i = 0; i < int(loop.paths.size()); ++i) {
|
||||
lines_vect.emplace_back(loop.paths[i].polyline.lines());
|
||||
const Lines& lines = lines_vect.back();
|
||||
for (int j = 0; j < int(lines.size()); ++j) {
|
||||
for (size_t k : ext_seams) {
|
||||
double d_sqr = lines[j].distance_to_squared(m_plan[k].pt);
|
||||
if (d_sqr < min_dist_sqr) {
|
||||
path_idx = i;
|
||||
line_idx = j;
|
||||
ext_seam_idx = k;
|
||||
min_dist_sqr = d_sqr;
|
||||
if (m_plan[m_plan_idx].seam_position == spAligned)
|
||||
m_seam_history.add_seam(m_plan[m_plan_idx].po, m_plan[m_plan_idx].pt, loop.polygon().bounding_box());
|
||||
}
|
||||
else {
|
||||
if (!external_first) {
|
||||
// Internal perimeter printed before the external.
|
||||
// First get list of external seams.
|
||||
std::vector<size_t> ext_seams;
|
||||
size_t external_cnt = 0;
|
||||
for (size_t i = 0; i < m_plan.size(); ++i) {
|
||||
if (m_plan[i].external) {
|
||||
ext_seams.emplace_back(i);
|
||||
++external_cnt;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ext_seams.empty()) {
|
||||
// First find the line segment closest to an external seam:
|
||||
//int path_idx = 0;
|
||||
//int line_idx = 0;
|
||||
size_t ext_seam_idx = size_t(-1);
|
||||
double min_dist_sqr = std::numeric_limits<double>::max();
|
||||
std::vector<Lines> lines_vect;
|
||||
for (int i = 0; i < int(loop.paths.size()); ++i) {
|
||||
lines_vect.emplace_back(loop.paths[i].polyline.lines());
|
||||
const Lines& lines = lines_vect.back();
|
||||
for (int j = 0; j < int(lines.size()); ++j) {
|
||||
for (size_t k : ext_seams) {
|
||||
double d_sqr = lines[j].distance_to_squared(m_plan[k].pt);
|
||||
if (d_sqr < min_dist_sqr) {
|
||||
//path_idx = i;
|
||||
//line_idx = j;
|
||||
ext_seam_idx = k;
|
||||
min_dist_sqr = d_sqr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Only accept seam that is reasonably close.
|
||||
double limit_dist_sqr = std::pow(double(scale_((ext_seam_idx - m_plan_idx) * nozzle_diameter * 2.)), 2.);
|
||||
if (ext_seam_idx != size_t(-1) && min_dist_sqr < limit_dist_sqr) {
|
||||
// Now find a projection of the external seam
|
||||
const Lines& lines = lines_vect[path_idx];
|
||||
Point closest = m_plan[ext_seam_idx].pt.projection_onto(lines[line_idx]);
|
||||
double dist = (closest.cast<double>() - lines[line_idx].b.cast<double>()).norm();
|
||||
// Only accept seam that is reasonably close.
|
||||
if (ext_seam_idx != size_t(-1)) {
|
||||
// How many nozzle diameters is considered "close"?
|
||||
const double nozzle_d_limit = 2. * (1. + m_plan.size() / external_cnt);
|
||||
const double limit_dist_sqr = double(scale_(scale_((unscale(m_plan[ext_seam_idx].pt) - unscale(m_plan[m_plan_idx].pt)).squaredNorm() * std::pow(nozzle_d_limit * nozzle_diameter, 2.))));
|
||||
|
||||
// And walk along the perimeter until we make enough space for
|
||||
// seams of all perimeters beforethe external one.
|
||||
double offset = (ext_seam_idx - m_plan_idx) * scale_(seam_offset);
|
||||
double last_offset = offset;
|
||||
offset -= dist;
|
||||
const Point* a = &closest;
|
||||
const Point* b = &lines[line_idx].b;
|
||||
while (++line_idx < int(lines.size()) && offset > 0.) {
|
||||
last_offset = offset;
|
||||
offset -= lines[line_idx].length();
|
||||
a = &lines[line_idx].a;
|
||||
b = &lines[line_idx].b;
|
||||
if (min_dist_sqr < limit_dist_sqr) {
|
||||
// Now find a projection of the external seam
|
||||
//const Lines& lines = lines_vect[path_idx];
|
||||
//Point closest = m_plan[ext_seam_idx].pt.projection_onto(lines[line_idx]);
|
||||
|
||||
// This code does staggering of internal perimeters, turned off for now.
|
||||
//
|
||||
// double dist = (closest.cast<double>() - lines[line_idx].b.cast<double>()).norm();
|
||||
//
|
||||
// // And walk along the perimeter until we make enough space for
|
||||
// // seams of all perimeters beforethe external one.
|
||||
// double offset = (ext_seam_idx - m_plan_idx) * scale_(seam_offset);
|
||||
// double last_offset = offset;
|
||||
// offset -= dist;
|
||||
// const Point* a = &closest;
|
||||
// const Point* b = &lines[line_idx].b;
|
||||
// while (++line_idx < int(lines.size()) && offset > 0.) {
|
||||
// last_offset = offset;
|
||||
// offset -= lines[line_idx].length();
|
||||
// a = &lines[line_idx].a;
|
||||
// b = &lines[line_idx].b;
|
||||
// }
|
||||
//
|
||||
// // We have walked far enough, too far maybe. Interpolate on the
|
||||
// // last segment to find the end precisely.
|
||||
// offset = std::min(0., offset); // In case that offset is still positive (we may have "wrapped around")
|
||||
// double ratio = last_offset / (last_offset - offset);
|
||||
// seam = (a->cast<double>() + ((b->cast<double>() - a->cast<double>()) * ratio)).cast<coord_t>();
|
||||
seam = m_plan[ext_seam_idx].pt;
|
||||
}
|
||||
}
|
||||
|
||||
// We have walked far enough, too far maybe. Interpolate on the
|
||||
// last segment to find the end precisely.
|
||||
offset = std::min(0., offset); // In case that offset is still positive (we may have "wrapped around")
|
||||
double ratio = last_offset / (last_offset - offset);
|
||||
seam = (a->cast<double>() + ((b->cast<double>() - a->cast<double>()) * ratio)).cast<coord_t>();
|
||||
}
|
||||
}
|
||||
else {
|
||||
// We should have a candidate ready from before. If not, use last_pos.
|
||||
if (m_plan_idx > 0 && m_plan[m_plan_idx - 1].precalculated)
|
||||
seam = m_plan[m_plan_idx - 1].pt;
|
||||
}
|
||||
|
||||
// seam now contains a hot candidate for internal seam. Use it unless there is a sharp corner nearby.
|
||||
// We will call the normal seam planning function, pretending that we are currently at the candidate point
|
||||
// and set to spNearest. If the ideal seam it finds is close to current candidate, use it.
|
||||
// This is to prevent having seams very close to corners, just because of external seam position.
|
||||
seam = calculate_seam(*m_plan[m_plan_idx].layer, spNearest, loop, nozzle_diameter,
|
||||
m_plan[m_plan_idx].po, lower_layer_edge_grid, seam, true);
|
||||
}
|
||||
else {
|
||||
// We should have a candidate ready from before. If not, use last_pos.
|
||||
if (m_plan_idx > 0 && m_plan[m_plan_idx - 1].precalculated)
|
||||
seam = m_plan[m_plan_idx - 1].pt;
|
||||
}
|
||||
m_plan[m_plan_idx].pt = seam;
|
||||
}
|
||||
|
||||
|
||||
@ -417,41 +449,42 @@ void SeamPlacer::place_seam(ExtrusionLoop& loop, const Point& last_pos, bool ext
|
||||
loop.split_at(seam, true);
|
||||
|
||||
if (external_first && m_plan_idx+1<m_plan.size() && ! m_plan[m_plan_idx+1].external) {
|
||||
// Next perimeter should start near this one.
|
||||
const double dist_sqr = std::pow(double(scale_(seam_offset)), 2.);
|
||||
double running_sqr = 0.;
|
||||
double running_sqr_last = 0.;
|
||||
if (!loop.paths.empty() && loop.paths.back().polyline.points.size() > 1) {
|
||||
const ExtrusionPath& last = loop.paths.back();
|
||||
auto it = last.polyline.points.crbegin() + 1;
|
||||
for (; it != last.polyline.points.crend(); ++it) {
|
||||
running_sqr += (it->cast<double>() - (it - 1)->cast<double>()).squaredNorm();
|
||||
if (running_sqr > dist_sqr)
|
||||
break;
|
||||
running_sqr_last = running_sqr;
|
||||
}
|
||||
if (running_sqr <= dist_sqr)
|
||||
it = last.polyline.points.crend() - 1;
|
||||
// Now interpolate.
|
||||
double ratio = (std::sqrt(dist_sqr) - std::sqrt(running_sqr_last)) / (std::sqrt(running_sqr) - std::sqrt(running_sqr_last));
|
||||
m_plan[m_plan_idx + 1].pt = ((it - 1)->cast<double>() + (it->cast<double>() - (it - 1)->cast<double>()) * std::min(ratio, 1.)).cast<coord_t>();
|
||||
// This code does staggering of internal perimeters, turned off for now.
|
||||
// Next perimeter should start near this one.
|
||||
// const double dist_sqr = std::pow(double(scale_(seam_offset)), 2.);
|
||||
// double running_sqr = 0.;
|
||||
// double running_sqr_last = 0.;
|
||||
// if (!loop.paths.empty() && loop.paths.back().polyline.points.size() > 1) {
|
||||
// const ExtrusionPath& last = loop.paths.back();
|
||||
// auto it = last.polyline.points.crbegin() + 1;
|
||||
// for (; it != last.polyline.points.crend(); ++it) {
|
||||
// running_sqr += (it->cast<double>() - (it - 1)->cast<double>()).squaredNorm();
|
||||
// if (running_sqr > dist_sqr)
|
||||
// break;
|
||||
// running_sqr_last = running_sqr;
|
||||
// }
|
||||
// if (running_sqr <= dist_sqr)
|
||||
// it = last.polyline.points.crend() - 1;
|
||||
// // Now interpolate.
|
||||
// double ratio = (std::sqrt(dist_sqr) - std::sqrt(running_sqr_last)) / (std::sqrt(running_sqr) - std::sqrt(running_sqr_last));
|
||||
// m_plan[m_plan_idx + 1].pt = ((it - 1)->cast<double>() + (it->cast<double>() - (it - 1)->cast<double>()) * std::min(ratio, 1.)).cast<coord_t>();
|
||||
// m_plan[m_plan_idx + 1].precalculated = true;
|
||||
m_plan[m_plan_idx + 1].pt = m_plan[m_plan_idx].pt;
|
||||
m_plan[m_plan_idx + 1].precalculated = true;
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
++m_plan_idx;
|
||||
}
|
||||
|
||||
|
||||
// Returns a seam for an EXTERNAL perimeter.
|
||||
// Returns "best" seam for a given perimeter.
|
||||
Point SeamPlacer::calculate_seam(const Layer& layer, const SeamPosition seam_position,
|
||||
const ExtrusionLoop& loop, coordf_t nozzle_dmr, const PrintObject* po,
|
||||
const EdgeGrid::Grid* lower_layer_edge_grid, Point last_pos)
|
||||
const EdgeGrid::Grid* lower_layer_edge_grid, Point last_pos, bool prefer_nearest)
|
||||
{
|
||||
assert(loop.role() == erExternalPerimeter);
|
||||
Polygon polygon = loop.polygon();
|
||||
bool was_clockwise = polygon.make_counter_clockwise();
|
||||
BoundingBox polygon_bb = polygon.bounding_box();
|
||||
const coord_t nozzle_r = coord_t(scale_(0.5 * nozzle_dmr) + 0.5);
|
||||
|
||||
size_t po_idx = std::find(m_po_list.begin(), m_po_list.end(), po) - m_po_list.begin();
|
||||
@ -462,7 +495,7 @@ Point SeamPlacer::calculate_seam(const Layer& layer, const SeamPosition seam_pos
|
||||
if (po == m_last_po && layer.print_z == m_last_print_z)
|
||||
layer_po = m_last_layer_po;
|
||||
else {
|
||||
layer_po = po->get_layer_at_printz(layer.print_z);
|
||||
layer_po = po ? po->get_layer_at_printz(layer.print_z) : nullptr;
|
||||
m_last_po = po;
|
||||
m_last_print_z = layer.print_z;
|
||||
m_last_layer_po = layer_po;
|
||||
@ -475,7 +508,9 @@ Point SeamPlacer::calculate_seam(const Layer& layer, const SeamPosition seam_pos
|
||||
|
||||
assert(layer_idx < po->layer_count());
|
||||
|
||||
if (this->is_custom_seam_on_layer(layer_idx, po_idx)) {
|
||||
const bool custom_seam = loop.role() == erExternalPerimeter && this->is_custom_seam_on_layer(layer_idx, po_idx);
|
||||
|
||||
if (custom_seam) {
|
||||
// Seam enf/blockers can begin and end in between the original vertices.
|
||||
// Let add extra points in between and update the leghths.
|
||||
polygon.densify(MINIMAL_POLYGON_SIDE);
|
||||
@ -488,7 +523,7 @@ Point SeamPlacer::calculate_seam(const Layer& layer, const SeamPosition seam_pos
|
||||
if (seam_position == spAligned) {
|
||||
// Seam is aligned to the seam at the preceding layer.
|
||||
if (po != nullptr) {
|
||||
std::optional<Point> pos = m_seam_history.get_last_seam(m_po_list[po_idx], layer_idx, polygon_bb);
|
||||
std::optional<Point> pos = m_seam_history.get_last_seam(m_po_list[po_idx], layer_idx, loop.polygon().bounding_box());
|
||||
if (pos.has_value()) {
|
||||
last_pos = *pos;
|
||||
last_pos_weight = is_custom_enforcer_on_layer(layer_idx, po_idx) ? 0.f : 1.f;
|
||||
@ -519,7 +554,7 @@ Point SeamPlacer::calculate_seam(const Layer& layer, const SeamPosition seam_pos
|
||||
std::vector<float> penalties = polygon_angles_at_vertices(polygon, lengths, float(nozzle_r));
|
||||
// No penalty for reflex points, slight penalty for convex points, high penalty for flat surfaces.
|
||||
const float penaltyConvexVertex = 1.f;
|
||||
const float penaltyFlatSurface = 5.f;
|
||||
const float penaltyFlatSurface = 3.f;
|
||||
const float penaltyOverhangHalf = 10.f;
|
||||
// Penalty for visible seams.
|
||||
for (size_t i = 0; i < polygon.points.size(); ++ i) {
|
||||
@ -548,8 +583,12 @@ Point SeamPlacer::calculate_seam(const Layer& layer, const SeamPosition seam_pos
|
||||
float dist_max = 0.1f * lengths.back(); // 5.f * nozzle_dmr
|
||||
penalty -= last_pos_weight * bspline_kernel(dist_to_last_pos_proj / dist_max);
|
||||
penalties[i] = std::max(0.f, penalty);
|
||||
if (prefer_nearest) {
|
||||
// This hack limits the search around the nearest position projection.
|
||||
penalties[i] += dist_to_last_pos_proj > 6.f * nozzle_r ? 100.f : 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Penalty for overhangs.
|
||||
if (lower_layer_edge_grid) {
|
||||
// Use the edge grid distance field structure over the lower layer to calculate overhangs.
|
||||
@ -568,10 +607,11 @@ Point SeamPlacer::calculate_seam(const Layer& layer, const SeamPosition seam_pos
|
||||
penalties[i] += extrudate_overlap_penalty(float(nozzle_r), penaltyOverhangHalf, float(dist));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Custom seam. Huge (negative) constant penalty is applied inside
|
||||
// blockers (enforcers) to rule out points that should not win.
|
||||
this->apply_custom_seam(polygon, po_idx, penalties, lengths, layer_idx, seam_position);
|
||||
if (custom_seam)
|
||||
this->apply_custom_seam(polygon, po_idx, penalties, lengths, layer_idx, seam_position);
|
||||
|
||||
// Find a point with a minimum penalty.
|
||||
size_t idx_min = std::min_element(penalties.begin(), penalties.end()) - penalties.begin();
|
||||
@ -592,9 +632,6 @@ Point SeamPlacer::calculate_seam(const Layer& layer, const SeamPosition seam_pos
|
||||
}
|
||||
}
|
||||
|
||||
if (seam_position == spAligned)
|
||||
m_seam_history.add_seam(po, polygon.points[idx_min], polygon_bb);
|
||||
|
||||
|
||||
// Export the contour into a SVG file.
|
||||
#if 0
|
||||
|
||||
@ -65,7 +65,7 @@ private:
|
||||
// When given an external perimeter (!), returns the seam.
|
||||
Point calculate_seam(const Layer& layer, const SeamPosition seam_position,
|
||||
const ExtrusionLoop& loop, coordf_t nozzle_dmr, const PrintObject* po,
|
||||
const EdgeGrid::Grid* lower_layer_edge_grid, Point last_pos);
|
||||
const EdgeGrid::Grid* lower_layer_edge_grid, Point last_pos, bool prefer_nearest);
|
||||
|
||||
struct CustomTrianglesPerLayer {
|
||||
Polygons polys;
|
||||
|
||||
@ -501,6 +501,7 @@ namespace client
|
||||
boost::throw_exception(qi::expectation_failure<Iterator>(
|
||||
lhs.it_range.begin(), rhs.it_range.end(), spirit::info("*Cannot compare the types.")));
|
||||
}
|
||||
lhs.reset();
|
||||
lhs.type = TYPE_BOOL;
|
||||
lhs.data.b = invert ? ! value : value;
|
||||
}
|
||||
|
||||
@ -349,7 +349,9 @@ bool Print::has_infinite_skirt() const
|
||||
|
||||
bool Print::has_skirt() const
|
||||
{
|
||||
return (m_config.skirt_height > 0 && m_config.skirts > 0) || m_config.draft_shield != dsDisabled;
|
||||
return (m_config.skirt_height > 0 && m_config.skirts > 0) || has_infinite_skirt();
|
||||
// case dsLimited should only be taken into account when skirt_height and skirts are positive,
|
||||
// so it is covered by the first condition.
|
||||
}
|
||||
|
||||
bool Print::has_brim() const
|
||||
|
||||
@ -346,8 +346,12 @@ private:
|
||||
friend class Print;
|
||||
|
||||
PrintObject(Print* print, ModelObject* model_object, const Transform3d& trafo, PrintInstances&& instances);
|
||||
~PrintObject() { if (m_shared_regions && -- m_shared_regions->m_ref_cnt == 0) delete m_shared_regions; }
|
||||
|
||||
~PrintObject() {
|
||||
if (m_shared_regions && --m_shared_regions->m_ref_cnt == 0)
|
||||
delete m_shared_regions;
|
||||
clear_layers();
|
||||
}
|
||||
|
||||
void config_apply(const ConfigBase &other, bool ignore_nonexistent = false) { m_config.apply(other, ignore_nonexistent); }
|
||||
void config_apply_only(const ConfigBase &other, const t_config_option_keys &keys, bool ignore_nonexistent = false) { m_config.apply_only(other, keys, ignore_nonexistent); }
|
||||
PrintBase::ApplyStatus set_instances(PrintInstances &&instances);
|
||||
|
||||
@ -110,10 +110,30 @@ public:
|
||||
void set_maj(int maj) { ver.major = maj; }
|
||||
void set_min(int min) { ver.minor = min; }
|
||||
void set_patch(int patch) { ver.patch = patch; }
|
||||
void set_metadata(boost::optional<const std::string&> meta) { ver.metadata = meta ? strdup(*meta) : nullptr; }
|
||||
void set_metadata(const char *meta) { ver.metadata = meta ? strdup(meta) : nullptr; }
|
||||
void set_prerelease(boost::optional<const std::string&> pre) { ver.prerelease = pre ? strdup(*pre) : nullptr; }
|
||||
void set_prerelease(const char *pre) { ver.prerelease = pre ? strdup(pre) : nullptr; }
|
||||
void set_metadata(boost::optional<const std::string &> meta)
|
||||
{
|
||||
if (ver.metadata)
|
||||
free(ver.metadata);
|
||||
ver.metadata = meta ? strdup(*meta) : nullptr;
|
||||
}
|
||||
void set_metadata(const char *meta)
|
||||
{
|
||||
if (ver.metadata)
|
||||
free(ver.metadata);
|
||||
ver.metadata = meta ? strdup(meta) : nullptr;
|
||||
}
|
||||
void set_prerelease(boost::optional<const std::string &> pre)
|
||||
{
|
||||
if (ver.prerelease)
|
||||
free(ver.prerelease);
|
||||
ver.prerelease = pre ? strdup(*pre) : nullptr;
|
||||
}
|
||||
void set_prerelease(const char *pre)
|
||||
{
|
||||
if (ver.prerelease)
|
||||
free(ver.prerelease);
|
||||
ver.prerelease = pre ? strdup(pre) : nullptr;
|
||||
}
|
||||
|
||||
// Comparison
|
||||
bool operator<(const Semver &b) const { return ::semver_compare(ver, b.ver) == -1; }
|
||||
|
||||
@ -101,7 +101,7 @@ const float Bed3D::Axes::DefaultStemLength = 25.0f;
|
||||
const float Bed3D::Axes::DefaultTipRadius = 2.5f * Bed3D::Axes::DefaultStemRadius;
|
||||
const float Bed3D::Axes::DefaultTipLength = 5.0f;
|
||||
|
||||
void Bed3D::Axes::render() const
|
||||
void Bed3D::Axes::render()
|
||||
{
|
||||
auto render_axis = [this](const Transform3f& transform) {
|
||||
glsafe(::glPushMatrix());
|
||||
@ -111,7 +111,7 @@ void Bed3D::Axes::render() const
|
||||
};
|
||||
|
||||
if (!m_arrow.is_initialized())
|
||||
const_cast<GLModel*>(&m_arrow)->init_from(stilized_arrow(16, DefaultTipRadius, DefaultTipLength, DefaultStemRadius, m_stem_length));
|
||||
m_arrow.init_from(stilized_arrow(16, DefaultTipRadius, DefaultTipLength, DefaultStemRadius, m_stem_length));
|
||||
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("gouraud_light");
|
||||
if (shader == nullptr)
|
||||
@ -123,15 +123,27 @@ void Bed3D::Axes::render() const
|
||||
shader->set_uniform("emission_factor", 0.0f);
|
||||
|
||||
// x axis
|
||||
const_cast<GLModel*>(&m_arrow)->set_color(-1, ColorRGBA::X());
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_arrow.set_color(ColorRGBA::X());
|
||||
#else
|
||||
m_arrow.set_color(-1, ColorRGBA::X());
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
render_axis(Geometry::assemble_transform(m_origin, { 0.0, 0.5 * M_PI, 0.0 }).cast<float>());
|
||||
|
||||
// y axis
|
||||
const_cast<GLModel*>(&m_arrow)->set_color(-1, ColorRGBA::Y());
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_arrow.set_color(ColorRGBA::Y());
|
||||
#else
|
||||
m_arrow.set_color(-1, ColorRGBA::Y());
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
render_axis(Geometry::assemble_transform(m_origin, { -0.5 * M_PI, 0.0, 0.0 }).cast<float>());
|
||||
|
||||
// z axis
|
||||
const_cast<GLModel*>(&m_arrow)->set_color(-1, ColorRGBA::Z());
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_arrow.set_color(ColorRGBA::Z());
|
||||
#else
|
||||
m_arrow.set_color(-1, ColorRGBA::Z());
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
render_axis(Geometry::assemble_transform(m_origin).cast<float>());
|
||||
|
||||
shader->stop_using();
|
||||
@ -230,15 +242,18 @@ void Bed3D::render_for_picking(GLCanvas3D& canvas, bool bottom, float scale_fact
|
||||
void Bed3D::render_internal(GLCanvas3D& canvas, bool bottom, float scale_factor,
|
||||
bool show_axes, bool show_texture, bool picking)
|
||||
{
|
||||
float* factor = const_cast<float*>(&m_scale_factor);
|
||||
*factor = scale_factor;
|
||||
m_scale_factor = scale_factor;
|
||||
|
||||
if (show_axes)
|
||||
render_axes();
|
||||
|
||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_model.set_color(picking ? PICKING_MODEL_COLOR : DEFAULT_MODEL_COLOR);
|
||||
#else
|
||||
m_model.set_color(-1, picking ? PICKING_MODEL_COLOR : DEFAULT_MODEL_COLOR);
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
switch (m_type)
|
||||
{
|
||||
@ -330,13 +345,13 @@ std::tuple<Bed3D::Type, std::string, std::string> Bed3D::detect_type(const Point
|
||||
return { Type::Custom, {}, {} };
|
||||
}
|
||||
|
||||
void Bed3D::render_axes() const
|
||||
void Bed3D::render_axes()
|
||||
{
|
||||
if (m_build_volume.valid())
|
||||
m_axes.render();
|
||||
}
|
||||
|
||||
void Bed3D::render_system(GLCanvas3D& canvas, bool bottom, bool show_texture) const
|
||||
void Bed3D::render_system(GLCanvas3D& canvas, bool bottom, bool show_texture)
|
||||
{
|
||||
if (!bottom)
|
||||
render_model();
|
||||
@ -345,26 +360,23 @@ void Bed3D::render_system(GLCanvas3D& canvas, bool bottom, bool show_texture) co
|
||||
render_texture(bottom, canvas);
|
||||
}
|
||||
|
||||
void Bed3D::render_texture(bool bottom, GLCanvas3D& canvas) const
|
||||
void Bed3D::render_texture(bool bottom, GLCanvas3D& canvas)
|
||||
{
|
||||
GLTexture* texture = const_cast<GLTexture*>(&m_texture);
|
||||
GLTexture* temp_texture = const_cast<GLTexture*>(&m_temp_texture);
|
||||
|
||||
if (m_texture_filename.empty()) {
|
||||
texture->reset();
|
||||
m_texture.reset();
|
||||
render_default(bottom, false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (texture->get_id() == 0 || texture->get_source() != m_texture_filename) {
|
||||
texture->reset();
|
||||
if (m_texture.get_id() == 0 || m_texture.get_source() != m_texture_filename) {
|
||||
m_texture.reset();
|
||||
|
||||
if (boost::algorithm::iends_with(m_texture_filename, ".svg")) {
|
||||
// use higher resolution images if graphic card and opengl version allow
|
||||
GLint max_tex_size = OpenGLManager::get_gl_info().get_max_tex_size();
|
||||
if (temp_texture->get_id() == 0 || temp_texture->get_source() != m_texture_filename) {
|
||||
if (m_temp_texture.get_id() == 0 || m_temp_texture.get_source() != m_texture_filename) {
|
||||
// generate a temporary lower resolution texture to show while no main texture levels have been compressed
|
||||
if (!temp_texture->load_from_svg_file(m_texture_filename, false, false, false, max_tex_size / 8)) {
|
||||
if (!m_temp_texture.load_from_svg_file(m_texture_filename, false, false, false, max_tex_size / 8)) {
|
||||
render_default(bottom, false);
|
||||
return;
|
||||
}
|
||||
@ -372,15 +384,15 @@ void Bed3D::render_texture(bool bottom, GLCanvas3D& canvas) const
|
||||
}
|
||||
|
||||
// starts generating the main texture, compression will run asynchronously
|
||||
if (!texture->load_from_svg_file(m_texture_filename, true, true, true, max_tex_size)) {
|
||||
if (!m_texture.load_from_svg_file(m_texture_filename, true, true, true, max_tex_size)) {
|
||||
render_default(bottom, false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (boost::algorithm::iends_with(m_texture_filename, ".png")) {
|
||||
// generate a temporary lower resolution texture to show while no main texture levels have been compressed
|
||||
if (temp_texture->get_id() == 0 || temp_texture->get_source() != m_texture_filename) {
|
||||
if (!temp_texture->load_from_file(m_texture_filename, false, GLTexture::None, false)) {
|
||||
if (m_temp_texture.get_id() == 0 || m_temp_texture.get_source() != m_texture_filename) {
|
||||
if (!m_temp_texture.load_from_file(m_texture_filename, false, GLTexture::None, false)) {
|
||||
render_default(bottom, false);
|
||||
return;
|
||||
}
|
||||
@ -388,7 +400,7 @@ void Bed3D::render_texture(bool bottom, GLCanvas3D& canvas) const
|
||||
}
|
||||
|
||||
// starts generating the main texture, compression will run asynchronously
|
||||
if (!texture->load_from_file(m_texture_filename, true, GLTexture::MultiThreaded, true)) {
|
||||
if (!m_texture.load_from_file(m_texture_filename, true, GLTexture::MultiThreaded, true)) {
|
||||
render_default(bottom, false);
|
||||
return;
|
||||
}
|
||||
@ -398,13 +410,13 @@ void Bed3D::render_texture(bool bottom, GLCanvas3D& canvas) const
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (texture->unsent_compressed_data_available()) {
|
||||
else if (m_texture.unsent_compressed_data_available()) {
|
||||
// sends to gpu the already available compressed levels of the main texture
|
||||
texture->send_compressed_data_to_gpu();
|
||||
m_texture.send_compressed_data_to_gpu();
|
||||
|
||||
// the temporary texture is not needed anymore, reset it
|
||||
if (temp_texture->get_id() != 0)
|
||||
temp_texture->reset();
|
||||
if (m_temp_texture.get_id() != 0)
|
||||
m_temp_texture.reset();
|
||||
|
||||
canvas.request_extra_frame();
|
||||
}
|
||||
@ -416,11 +428,9 @@ void Bed3D::render_texture(bool bottom, GLCanvas3D& canvas) const
|
||||
shader->set_uniform("transparent_background", bottom);
|
||||
shader->set_uniform("svg_source", boost::algorithm::iends_with(m_texture.get_source(), ".svg"));
|
||||
|
||||
unsigned int* vbo_id = const_cast<unsigned int*>(&m_vbo_id);
|
||||
|
||||
if (*vbo_id == 0) {
|
||||
glsafe(::glGenBuffers(1, vbo_id));
|
||||
glsafe(::glBindBuffer(GL_ARRAY_BUFFER, *vbo_id));
|
||||
if (m_vbo_id == 0) {
|
||||
glsafe(::glGenBuffers(1, &m_vbo_id));
|
||||
glsafe(::glBindBuffer(GL_ARRAY_BUFFER, m_vbo_id));
|
||||
glsafe(::glBufferData(GL_ARRAY_BUFFER, (GLsizeiptr)m_triangles.get_vertices_data_size(), (const GLvoid*)m_triangles.get_vertices_data(), GL_STATIC_DRAW));
|
||||
glsafe(::glBindBuffer(GL_ARRAY_BUFFER, 0));
|
||||
}
|
||||
@ -441,12 +451,12 @@ void Bed3D::render_texture(bool bottom, GLCanvas3D& canvas) const
|
||||
GLint tex_coords_id = shader->get_attrib_location("v_tex_coords");
|
||||
|
||||
// show the temporary texture while no compressed data is available
|
||||
GLuint tex_id = (GLuint)temp_texture->get_id();
|
||||
GLuint tex_id = (GLuint)m_temp_texture.get_id();
|
||||
if (tex_id == 0)
|
||||
tex_id = (GLuint)texture->get_id();
|
||||
tex_id = (GLuint)m_texture.get_id();
|
||||
|
||||
glsafe(::glBindTexture(GL_TEXTURE_2D, tex_id));
|
||||
glsafe(::glBindBuffer(GL_ARRAY_BUFFER, *vbo_id));
|
||||
glsafe(::glBindBuffer(GL_ARRAY_BUFFER, m_vbo_id));
|
||||
|
||||
if (position_id != -1) {
|
||||
glsafe(::glEnableVertexAttribArray(position_id));
|
||||
@ -480,38 +490,40 @@ void Bed3D::render_texture(bool bottom, GLCanvas3D& canvas) const
|
||||
}
|
||||
}
|
||||
|
||||
void Bed3D::render_model() const
|
||||
void Bed3D::render_model()
|
||||
{
|
||||
if (m_model_filename.empty())
|
||||
return;
|
||||
|
||||
GLModel* model = const_cast<GLModel*>(&m_model);
|
||||
|
||||
if (model->get_filename() != m_model_filename && model->init_from_file(m_model_filename)) {
|
||||
model->set_color(-1, DEFAULT_MODEL_COLOR);
|
||||
if (m_model.get_filename() != m_model_filename && m_model.init_from_file(m_model_filename)) {
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_model.set_color(DEFAULT_MODEL_COLOR);
|
||||
#else
|
||||
m_model.set_color(-1, DEFAULT_MODEL_COLOR);
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
// move the model so that its origin (0.0, 0.0, 0.0) goes into the bed shape center and a bit down to avoid z-fighting with the texture quad
|
||||
*const_cast<Vec3d*>(&m_model_offset) = to_3d(m_build_volume.bounding_volume2d().center(), -0.03);
|
||||
m_model_offset = to_3d(m_build_volume.bounding_volume2d().center(), -0.03);
|
||||
|
||||
// update extended bounding box
|
||||
const_cast<BoundingBoxf3&>(m_extended_bounding_box) = this->calc_extended_bounding_box();
|
||||
m_extended_bounding_box = this->calc_extended_bounding_box();
|
||||
}
|
||||
|
||||
if (!model->get_filename().empty()) {
|
||||
if (!m_model.get_filename().empty()) {
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("gouraud_light");
|
||||
if (shader != nullptr) {
|
||||
shader->start_using();
|
||||
shader->set_uniform("emission_factor", 0.0f);
|
||||
glsafe(::glPushMatrix());
|
||||
glsafe(::glTranslated(m_model_offset.x(), m_model_offset.y(), m_model_offset.z()));
|
||||
model->render();
|
||||
m_model.render();
|
||||
glsafe(::glPopMatrix());
|
||||
shader->stop_using();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Bed3D::render_custom(GLCanvas3D& canvas, bool bottom, bool show_texture, bool picking) const
|
||||
void Bed3D::render_custom(GLCanvas3D& canvas, bool bottom, bool show_texture, bool picking)
|
||||
{
|
||||
if (m_texture_filename.empty() && m_model_filename.empty()) {
|
||||
render_default(bottom, picking);
|
||||
@ -525,13 +537,13 @@ void Bed3D::render_custom(GLCanvas3D& canvas, bool bottom, bool show_texture, bo
|
||||
render_texture(bottom, canvas);
|
||||
}
|
||||
|
||||
void Bed3D::render_default(bool bottom, bool picking) const
|
||||
void Bed3D::render_default(bool bottom, bool picking)
|
||||
{
|
||||
const_cast<GLTexture*>(&m_texture)->reset();
|
||||
m_texture.reset();
|
||||
|
||||
unsigned int triangles_vcount = m_triangles.get_vertices_count();
|
||||
const unsigned int triangles_vcount = m_triangles.get_vertices_count();
|
||||
if (triangles_vcount > 0) {
|
||||
bool has_model = !m_model.get_filename().empty();
|
||||
const bool has_model = !m_model.get_filename().empty();
|
||||
|
||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||
glsafe(::glEnable(GL_BLEND));
|
||||
|
||||
@ -60,7 +60,7 @@ class Bed3D
|
||||
m_arrow.reset();
|
||||
}
|
||||
float get_total_length() const { return m_stem_length + DefaultTipLength; }
|
||||
void render() const;
|
||||
void render();
|
||||
};
|
||||
|
||||
public:
|
||||
@ -130,12 +130,12 @@ private:
|
||||
static std::tuple<Type, std::string, std::string> detect_type(const Pointfs& shape);
|
||||
void render_internal(GLCanvas3D& canvas, bool bottom, float scale_factor,
|
||||
bool show_axes, bool show_texture, bool picking);
|
||||
void render_axes() const;
|
||||
void render_system(GLCanvas3D& canvas, bool bottom, bool show_texture) const;
|
||||
void render_texture(bool bottom, GLCanvas3D& canvas) const;
|
||||
void render_model() const;
|
||||
void render_custom(GLCanvas3D& canvas, bool bottom, bool show_texture, bool picking) const;
|
||||
void render_default(bool bottom, bool picking) const;
|
||||
void render_axes();
|
||||
void render_system(GLCanvas3D& canvas, bool bottom, bool show_texture);
|
||||
void render_texture(bool bottom, GLCanvas3D& canvas);
|
||||
void render_model();
|
||||
void render_custom(GLCanvas3D& canvas, bool bottom, bool show_texture, bool picking);
|
||||
void render_default(bool bottom, bool picking);
|
||||
void release_VBOs();
|
||||
};
|
||||
|
||||
|
||||
@ -314,13 +314,31 @@ void GLVolume::SinkingContours::update()
|
||||
const TriangleMesh& mesh = model.objects[object_idx]->volumes[m_parent.volume_idx()]->mesh();
|
||||
|
||||
m_model.reset();
|
||||
GUI::GLModel::InitializationData init_data;
|
||||
GUI::GLModel::Geometry init_data;
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
init_data.format = { GUI::GLModel::Geometry::EPrimitiveType::Triangles, GUI::GLModel::Geometry::EVertexLayout::P3, GUI::GLModel::Geometry::EIndexType::UINT };
|
||||
init_data.color = ColorRGBA::WHITE();
|
||||
unsigned int vertices_counter = 0;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
MeshSlicingParams slicing_params;
|
||||
slicing_params.trafo = m_parent.world_matrix();
|
||||
const Polygons polygons = union_(slice_mesh(mesh.its, 0.0f, slicing_params));
|
||||
for (const ExPolygon &expoly : diff_ex(expand(polygons, float(scale_(HalfWidth))), shrink(polygons, float(scale_(HalfWidth))))) {
|
||||
GUI::GLModel::InitializationData::Entity entity;
|
||||
entity.type = GUI::GLModel::PrimitiveType::Triangles;
|
||||
for (const ExPolygon& expoly : diff_ex(expand(polygons, float(scale_(HalfWidth))), shrink(polygons, float(scale_(HalfWidth))))) {
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
const std::vector<Vec3d> triangulation = triangulate_expolygon_3d(expoly);
|
||||
init_data.vertices.reserve(init_data.vertices.size() + triangulation.size() * GUI::GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(init_data.indices.size() + triangulation.size() * GUI::GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
for (const Vec3d& v : triangulation) {
|
||||
init_data.add_vertex((Vec3f)(v.cast<float>() + 0.015f * Vec3f::UnitZ())); // add a small positive z to avoid z-fighting
|
||||
++vertices_counter;
|
||||
if (vertices_counter % 3 == 0)
|
||||
init_data.add_uint_triangle(vertices_counter - 3, vertices_counter - 2, vertices_counter - 1);
|
||||
}
|
||||
}
|
||||
m_model.init_from(std::move(init_data));
|
||||
#else
|
||||
GUI::GLModel::Geometry::Entity entity;
|
||||
entity.type = GUI::GLModel::EPrimitiveType::Triangles;
|
||||
const std::vector<Vec3d> triangulation = triangulate_expolygon_3d(expoly);
|
||||
entity.positions.reserve(entity.positions.size() + triangulation.size());
|
||||
entity.normals.reserve(entity.normals.size() + triangulation.size());
|
||||
@ -337,8 +355,8 @@ void GLVolume::SinkingContours::update()
|
||||
}
|
||||
init_data.entities.emplace_back(entity);
|
||||
}
|
||||
|
||||
m_model.init_from(init_data);
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
}
|
||||
else
|
||||
m_shift = box.center() - m_old_box.center();
|
||||
@ -355,7 +373,11 @@ void GLVolume::NonManifoldEdges::render()
|
||||
glsafe(::glLineWidth(2.0f));
|
||||
glsafe(::glPushMatrix());
|
||||
glsafe(::glMultMatrixd(m_parent.world_matrix().data()));
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_model.set_color(complementary(m_parent.render_color));
|
||||
#else
|
||||
m_model.set_color(-1, complementary(m_parent.render_color));
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_model.render();
|
||||
glsafe(::glPopMatrix());
|
||||
}
|
||||
@ -376,9 +398,24 @@ void GLVolume::NonManifoldEdges::update()
|
||||
const TriangleMesh& mesh = model_volume->mesh();
|
||||
const std::vector<std::pair<int, int>> edges = its_get_open_edges(mesh.its);
|
||||
if (!edges.empty()) {
|
||||
GUI::GLModel::InitializationData init_data;
|
||||
GUI::GLModel::InitializationData::Entity entity;
|
||||
entity.type = GUI::GLModel::PrimitiveType::Lines;
|
||||
GUI::GLModel::Geometry init_data;
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
init_data.format = { GUI::GLModel::Geometry::EPrimitiveType::Lines, GUI::GLModel::Geometry::EVertexLayout::P3, GUI::GLModel::Geometry::EIndexType::UINT };
|
||||
init_data.vertices.reserve(2 * edges.size() * GUI::GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(2 * edges.size() * GUI::GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
// vertices + indices
|
||||
unsigned int vertices_count = 0;
|
||||
for (const std::pair<int, int>& edge : edges) {
|
||||
init_data.add_vertex((Vec3f)mesh.its.vertices[edge.first].cast<float>());
|
||||
init_data.add_vertex((Vec3f)mesh.its.vertices[edge.second].cast<float>());
|
||||
vertices_count += 2;
|
||||
init_data.add_uint_line(vertices_count - 2, vertices_count - 1);
|
||||
}
|
||||
m_model.init_from(std::move(init_data));
|
||||
#else
|
||||
GUI::GLModel::Geometry::Entity entity;
|
||||
entity.type = GUI::GLModel::EPrimitiveType::Lines;
|
||||
|
||||
entity.positions.reserve(2 * edges.size());
|
||||
entity.normals.reserve(2 * edges.size());
|
||||
@ -394,6 +431,7 @@ void GLVolume::NonManifoldEdges::update()
|
||||
|
||||
init_data.entities.emplace_back(entity);
|
||||
m_model.init_from(init_data);
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -879,6 +917,11 @@ void GLVolumeCollection::render(GLVolumeCollection::ERenderType type, bool disab
|
||||
if (shader == nullptr)
|
||||
return;
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
GLShaderProgram* sink_shader = GUI::wxGetApp().get_shader("flat");
|
||||
GLShaderProgram* edges_shader = GUI::wxGetApp().get_shader("flat");
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
if (type == ERenderType::Transparent) {
|
||||
glsafe(::glEnable(GL_BLEND));
|
||||
glsafe(::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
|
||||
@ -892,13 +935,28 @@ void GLVolumeCollection::render(GLVolumeCollection::ERenderType type, bool disab
|
||||
volume.first->set_render_color(true);
|
||||
|
||||
// render sinking contours of non-hovered volumes
|
||||
if (m_show_sinking_contours)
|
||||
if (volume.first->is_sinking() && !volume.first->is_below_printbed() &&
|
||||
volume.first->hover == GLVolume::HS_None && !volume.first->force_sinking_contours) {
|
||||
shader->stop_using();
|
||||
volume.first->render_sinking_contours();
|
||||
shader->start_using();
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
shader->stop_using();
|
||||
if (sink_shader != nullptr) {
|
||||
sink_shader->start_using();
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
if (m_show_sinking_contours) {
|
||||
if (volume.first->is_sinking() && !volume.first->is_below_printbed() &&
|
||||
volume.first->hover == GLVolume::HS_None && !volume.first->force_sinking_contours) {
|
||||
#if !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
shader->stop_using();
|
||||
#endif // !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
volume.first->render_sinking_contours();
|
||||
#if !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
shader->start_using();
|
||||
#endif // !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
}
|
||||
}
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
sink_shader->stop_using();
|
||||
}
|
||||
shader->start_using();
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
glsafe(::glEnableClientState(GL_VERTEX_ARRAY));
|
||||
glsafe(::glEnableClientState(GL_NORMAL_ARRAY));
|
||||
@ -938,25 +996,49 @@ void GLVolumeCollection::render(GLVolumeCollection::ERenderType type, bool disab
|
||||
}
|
||||
|
||||
if (m_show_sinking_contours) {
|
||||
for (GLVolumeWithIdAndZ& volume : to_render) {
|
||||
// render sinking contours of hovered/displaced volumes
|
||||
if (volume.first->is_sinking() && !volume.first->is_below_printbed() &&
|
||||
(volume.first->hover != GLVolume::HS_None || volume.first->force_sinking_contours)) {
|
||||
shader->stop_using();
|
||||
glsafe(::glDepthFunc(GL_ALWAYS));
|
||||
volume.first->render_sinking_contours();
|
||||
glsafe(::glDepthFunc(GL_LESS));
|
||||
shader->start_using();
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
shader->stop_using();
|
||||
if (sink_shader != nullptr) {
|
||||
sink_shader->start_using();
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
for (GLVolumeWithIdAndZ& volume : to_render) {
|
||||
// render sinking contours of hovered/displaced volumes
|
||||
if (volume.first->is_sinking() && !volume.first->is_below_printbed() &&
|
||||
(volume.first->hover != GLVolume::HS_None || volume.first->force_sinking_contours)) {
|
||||
#if !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
shader->stop_using();
|
||||
#endif // !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
glsafe(::glDepthFunc(GL_ALWAYS));
|
||||
volume.first->render_sinking_contours();
|
||||
glsafe(::glDepthFunc(GL_LESS));
|
||||
#if !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
shader->start_using();
|
||||
#endif // !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
}
|
||||
}
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
sink_shader->start_using();
|
||||
}
|
||||
shader->start_using();
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
}
|
||||
|
||||
#if ENABLE_SHOW_NON_MANIFOLD_EDGES
|
||||
if (m_show_non_manifold_edges && GUI::wxGetApp().app_config->get("non_manifold_edges") == "1") {
|
||||
for (GLVolumeWithIdAndZ& volume : to_render) {
|
||||
volume.first->render_non_manifold_edges();
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
shader->stop_using();
|
||||
if (edges_shader != nullptr) {
|
||||
edges_shader->start_using();
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
if (m_show_non_manifold_edges && GUI::wxGetApp().app_config->get("non_manifold_edges") == "1") {
|
||||
for (GLVolumeWithIdAndZ& volume : to_render) {
|
||||
volume.first->render_non_manifold_edges();
|
||||
}
|
||||
}
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
edges_shader->stop_using();
|
||||
}
|
||||
shader->start_using();
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
#endif // ENABLE_SHOW_NON_MANIFOLD_EDGES
|
||||
|
||||
if (disable_cullface)
|
||||
|
||||
@ -18,6 +18,7 @@ namespace GUI {
|
||||
class ConfigOptionsGroup;
|
||||
|
||||
using ConfigOptionsGroupShp = std::shared_ptr<ConfigOptionsGroup>;
|
||||
using ConfigOptionsGroupWkp = std::weak_ptr<ConfigOptionsGroup>;
|
||||
|
||||
struct BedShape
|
||||
{
|
||||
|
||||
@ -1048,8 +1048,7 @@ void Choice::set_selection()
|
||||
choice_ctrl* field = dynamic_cast<choice_ctrl*>(window);
|
||||
switch (m_opt.type) {
|
||||
case coEnum:{
|
||||
int id_value = m_opt.get_default_value<ConfigOptionEnum<SeamPosition>>()->value; //!!
|
||||
field->SetSelection(id_value);
|
||||
field->SetSelection(m_opt.default_value->getInt());
|
||||
break;
|
||||
}
|
||||
case coFloat:
|
||||
|
||||
@ -221,7 +221,11 @@ void GCodeViewer::SequentialRangeCap::reset() {
|
||||
void GCodeViewer::SequentialView::Marker::init()
|
||||
{
|
||||
m_model.init_from(stilized_arrow(16, 2.0f, 4.0f, 1.0f, 8.0f));
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_model.set_color({ 1.0f, 1.0f, 1.0f, 0.5f });
|
||||
#else
|
||||
m_model.set_color(-1, { 1.0f, 1.0f, 1.0f, 0.5f });
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
}
|
||||
|
||||
void GCodeViewer::SequentialView::Marker::set_world_position(const Vec3f& position)
|
||||
@ -230,7 +234,7 @@ void GCodeViewer::SequentialView::Marker::set_world_position(const Vec3f& positi
|
||||
m_world_transform = (Geometry::assemble_transform((position + m_z_offset * Vec3f::UnitZ()).cast<double>()) * Geometry::assemble_transform(m_model.get_bounding_box().size().z() * Vec3d::UnitZ(), { M_PI, 0.0, 0.0 })).cast<float>();
|
||||
}
|
||||
|
||||
void GCodeViewer::SequentialView::Marker::render() const
|
||||
void GCodeViewer::SequentialView::Marker::render()
|
||||
{
|
||||
if (!m_visible)
|
||||
return;
|
||||
@ -260,7 +264,7 @@ void GCodeViewer::SequentialView::Marker::render() const
|
||||
static size_t last_text_length = 0;
|
||||
|
||||
ImGuiWrapper& imgui = *wxGetApp().imgui();
|
||||
Size cnv_size = wxGetApp().plater()->get_current_canvas3D()->get_canvas_size();
|
||||
const Size cnv_size = wxGetApp().plater()->get_current_canvas3D()->get_canvas_size();
|
||||
imgui.set_next_window_pos(0.5f * static_cast<float>(cnv_size.get_width()), static_cast<float>(cnv_size.get_height()), ImGuiCond_Always, 0.5f, 1.0f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
|
||||
ImGui::SetNextWindowBgAlpha(0.25f);
|
||||
@ -273,8 +277,8 @@ void GCodeViewer::SequentialView::Marker::render() const
|
||||
imgui.text(std::string(buf));
|
||||
|
||||
// force extra frame to automatically update window size
|
||||
float width = ImGui::GetWindowWidth();
|
||||
size_t length = strlen(buf);
|
||||
const float width = ImGui::GetWindowWidth();
|
||||
const size_t length = strlen(buf);
|
||||
if (width != last_window_width || length != last_text_length) {
|
||||
last_window_width = width;
|
||||
last_text_length = length;
|
||||
@ -465,7 +469,7 @@ void GCodeViewer::SequentialView::GCodeWindow::stop_mapping_file()
|
||||
m_file.close();
|
||||
}
|
||||
|
||||
void GCodeViewer::SequentialView::render(float legend_height) const
|
||||
void GCodeViewer::SequentialView::render(float legend_height)
|
||||
{
|
||||
marker.render();
|
||||
float bottom = wxGetApp().plater()->get_current_canvas3D()->get_canvas_size().get_height();
|
||||
@ -1426,13 +1430,30 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
|
||||
};
|
||||
|
||||
// format data into the buffers to be rendered as batched model
|
||||
auto add_vertices_as_model_batch = [](const GCodeProcessorResult::MoveVertex& curr, const GLModel::InitializationData& data, VertexBuffer& vertices, InstanceBuffer& instances, InstanceIdBuffer& instances_ids, size_t move_id) {
|
||||
auto add_vertices_as_model_batch = [](const GCodeProcessorResult::MoveVertex& curr, const GLModel::Geometry& data, VertexBuffer& vertices, InstanceBuffer& instances, InstanceIdBuffer& instances_ids, size_t move_id) {
|
||||
const double width = static_cast<double>(1.5f * curr.width);
|
||||
const double height = static_cast<double>(1.5f * curr.height);
|
||||
|
||||
const Transform3d trafo = Geometry::assemble_transform((curr.position - 0.5f * curr.height * Vec3f::UnitZ()).cast<double>(), Vec3d::Zero(), { width, width, height });
|
||||
const Eigen::Matrix<double, 3, 3, Eigen::DontAlign> normal_matrix = trafo.matrix().template block<3, 3>(0, 0).inverse().transpose();
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
// append vertices
|
||||
const size_t vertices_count = data.vertices_count();
|
||||
for (size_t i = 0; i < vertices_count; ++i) {
|
||||
// append position
|
||||
const Vec3d position = trafo * data.extract_position_3(i).cast<double>();
|
||||
vertices.push_back(float(position.x()));
|
||||
vertices.push_back(float(position.y()));
|
||||
vertices.push_back(float(position.z()));
|
||||
|
||||
// append normal
|
||||
const Vec3d normal = normal_matrix * data.extract_normal_3(i).cast<double>();
|
||||
vertices.push_back(float(normal.x()));
|
||||
vertices.push_back(float(normal.y()));
|
||||
vertices.push_back(float(normal.z()));
|
||||
}
|
||||
#else
|
||||
for (const auto& entity : data.entities) {
|
||||
// append vertices
|
||||
for (size_t i = 0; i < entity.positions.size(); ++i) {
|
||||
@ -1449,6 +1470,7 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
|
||||
vertices.push_back(static_cast<float>(normal.z()));
|
||||
}
|
||||
}
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
// append instance position
|
||||
instances.push_back(curr.position.x());
|
||||
@ -1458,12 +1480,19 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
|
||||
instances_ids.push_back(move_id);
|
||||
};
|
||||
|
||||
auto add_indices_as_model_batch = [](const GLModel::InitializationData& data, IndexBuffer& indices, IBufferType base_index) {
|
||||
auto add_indices_as_model_batch = [](const GLModel::Geometry& data, IndexBuffer& indices, IBufferType base_index) {
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
const size_t indices_count = data.indices_count();
|
||||
for (size_t i = 0; i < indices_count; ++i) {
|
||||
indices.push_back(static_cast<IBufferType>(data.extract_ushort_index(i) + base_index));
|
||||
}
|
||||
#else
|
||||
for (const auto& entity : data.entities) {
|
||||
for (size_t i = 0; i < entity.indices.size(); ++i) {
|
||||
indices.push_back(static_cast<IBufferType>(entity.indices[i] + base_index));
|
||||
}
|
||||
}
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
};
|
||||
|
||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||
@ -1519,14 +1548,14 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
|
||||
std::vector<float> options_zs;
|
||||
|
||||
size_t seams_count = 0;
|
||||
std::vector<size_t> seams_ids;
|
||||
std::vector<size_t> biased_seams_ids;
|
||||
|
||||
// toolpaths data -> extract vertices from result
|
||||
for (size_t i = 0; i < m_moves_count; ++i) {
|
||||
const GCodeProcessorResult::MoveVertex& curr = gcode_result.moves[i];
|
||||
if (curr.type == EMoveType::Seam) {
|
||||
++seams_count;
|
||||
seams_ids.push_back(i);
|
||||
biased_seams_ids.push_back(i - biased_seams_ids.size() - 1);
|
||||
}
|
||||
|
||||
size_t move_id = i - seams_count;
|
||||
@ -1605,7 +1634,7 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
|
||||
}
|
||||
|
||||
// smooth toolpaths corners for the given TBuffer using triangles
|
||||
auto smooth_triangle_toolpaths_corners = [&gcode_result, &seams_ids](const TBuffer& t_buffer, MultiVertexBuffer& v_multibuffer) {
|
||||
auto smooth_triangle_toolpaths_corners = [&gcode_result, &biased_seams_ids](const TBuffer& t_buffer, MultiVertexBuffer& v_multibuffer) {
|
||||
auto extract_position_at = [](const VertexBuffer& vertices, size_t offset) {
|
||||
return Vec3f(vertices[offset + 0], vertices[offset + 1], vertices[offset + 2]);
|
||||
};
|
||||
@ -1679,15 +1708,21 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
|
||||
}
|
||||
};
|
||||
|
||||
auto extract_move_id = [&seams_ids](size_t id) {
|
||||
for (int i = seams_ids.size() - 1; i >= 0; --i) {
|
||||
if (seams_ids[i] < id + i + 1)
|
||||
return id + (size_t)i + 1;
|
||||
auto extract_move_id = [&biased_seams_ids](size_t id) {
|
||||
size_t new_id = size_t(-1);
|
||||
auto it = std::lower_bound(biased_seams_ids.begin(), biased_seams_ids.end(), id);
|
||||
if (it == biased_seams_ids.end())
|
||||
new_id = id + biased_seams_ids.size();
|
||||
else {
|
||||
if (it == biased_seams_ids.begin() && *it < id)
|
||||
new_id = id;
|
||||
else if (it != biased_seams_ids.begin())
|
||||
new_id = id + std::distance(biased_seams_ids.begin(), it);
|
||||
}
|
||||
return id;
|
||||
return (new_id == size_t(-1)) ? id : new_id;
|
||||
};
|
||||
|
||||
size_t vertex_size_floats = t_buffer.vertices.vertex_size_floats();
|
||||
const size_t vertex_size_floats = t_buffer.vertices.vertex_size_floats();
|
||||
for (const Path& path : t_buffer.paths) {
|
||||
// the two segments of the path sharing the current vertex may belong
|
||||
// to two different vertex buffers
|
||||
@ -1696,8 +1731,8 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
|
||||
const size_t path_vertices_count = path.vertices_count();
|
||||
const float half_width = 0.5f * path.width;
|
||||
for (size_t j = 1; j < path_vertices_count - 1; ++j) {
|
||||
size_t curr_s_id = path.sub_paths.front().first.s_id + j;
|
||||
size_t move_id = extract_move_id(curr_s_id);
|
||||
const size_t curr_s_id = path.sub_paths.front().first.s_id + j;
|
||||
const size_t move_id = extract_move_id(curr_s_id);
|
||||
const Vec3f& prev = gcode_result.moves[move_id - 1].position;
|
||||
const Vec3f& curr = gcode_result.moves[move_id].position;
|
||||
const Vec3f& next = gcode_result.moves[move_id + 1].position;
|
||||
@ -1724,7 +1759,7 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
|
||||
float displacement = 0.0f;
|
||||
if (cos_dir > -0.9998477f) {
|
||||
// if the angle between adjacent segments is smaller than 179 degrees
|
||||
Vec3f med_dir = (prev_dir + next_dir).normalized();
|
||||
const Vec3f med_dir = (prev_dir + next_dir).normalized();
|
||||
displacement = half_width * ::tan(::acos(std::clamp(next_dir.dot(med_dir), -1.0f, 1.0f)));
|
||||
}
|
||||
|
||||
@ -1735,7 +1770,7 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
|
||||
|
||||
if (can_displace) {
|
||||
// displacement to apply to the vertices to match
|
||||
Vec3f displacement_vec = displacement * prev_dir;
|
||||
const Vec3f displacement_vec = displacement * prev_dir;
|
||||
// matches inner corner vertices
|
||||
if (is_right_turn)
|
||||
match_right_vertices(prev_sub_path, next_sub_path, curr_s_id, vertex_size_floats, -displacement_vec);
|
||||
@ -1762,13 +1797,12 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result)
|
||||
// smooth toolpaths corners for TBuffers using triangles
|
||||
for (size_t i = 0; i < m_buffers.size(); ++i) {
|
||||
const TBuffer& t_buffer = m_buffers[i];
|
||||
if (t_buffer.render_primitive_type == TBuffer::ERenderPrimitiveType::Triangle) {
|
||||
if (t_buffer.render_primitive_type == TBuffer::ERenderPrimitiveType::Triangle)
|
||||
smooth_triangle_toolpaths_corners(t_buffer, vertices[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// dismiss, no more needed
|
||||
std::vector<size_t>().swap(seams_ids);
|
||||
std::vector<size_t>().swap(biased_seams_ids);
|
||||
|
||||
for (MultiVertexBuffer& v_multibuffer : vertices) {
|
||||
for (VertexBuffer& v_buffer : v_multibuffer) {
|
||||
@ -2792,7 +2826,11 @@ void GCodeViewer::render_toolpaths()
|
||||
}
|
||||
|
||||
if (range.vbo > 0) {
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
buffer.model.model.set_color(range.color);
|
||||
#else
|
||||
buffer.model.model.set_color(-1, range.color);
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
buffer.model.model.render_instanced(range.vbo, range.count);
|
||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||
++m_statistics.gl_instanced_models_calls_count;
|
||||
@ -3980,11 +4018,11 @@ void GCodeViewer::render_legend(float& legend_height)
|
||||
|
||||
switch (m_time_estimate_mode) {
|
||||
case PrintEstimatedStatistics::ETimeMode::Normal: {
|
||||
show_mode_button(_u8L("Show stealth mode"), PrintEstimatedStatistics::ETimeMode::Stealth);
|
||||
show_mode_button(_L("Show stealth mode"), PrintEstimatedStatistics::ETimeMode::Stealth);
|
||||
break;
|
||||
}
|
||||
case PrintEstimatedStatistics::ETimeMode::Stealth: {
|
||||
show_mode_button(_u8L("Show normal mode"), PrintEstimatedStatistics::ETimeMode::Normal);
|
||||
show_mode_button(_L("Show normal mode"), PrintEstimatedStatistics::ETimeMode::Normal);
|
||||
break;
|
||||
}
|
||||
default : { assert(false); break; }
|
||||
|
||||
@ -298,7 +298,7 @@ class GCodeViewer
|
||||
GLModel model;
|
||||
ColorRGBA color;
|
||||
InstanceVBuffer instances;
|
||||
GLModel::InitializationData data;
|
||||
GLModel::Geometry data;
|
||||
|
||||
void reset();
|
||||
};
|
||||
@ -361,7 +361,11 @@ class GCodeViewer
|
||||
}
|
||||
case ERenderPrimitiveType::InstancedModel: { return model.model.is_initialized() && !model.instances.buffer.empty(); }
|
||||
case ERenderPrimitiveType::BatchedModel: {
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
return !model.data.vertices.empty() && !model.data.indices.empty() &&
|
||||
#else
|
||||
return model.data.vertices_count() > 0 && model.data.indices_count() &&
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
!vertices.vbos.empty() && vertices.vbos.front() != 0 && !indices.empty() && indices.front().ibo != 0;
|
||||
}
|
||||
default: { return false; }
|
||||
@ -632,7 +636,7 @@ public:
|
||||
bool is_visible() const { return m_visible; }
|
||||
void set_visible(bool visible) { m_visible = visible; }
|
||||
|
||||
void render() const;
|
||||
void render();
|
||||
};
|
||||
|
||||
class GCodeWindow
|
||||
@ -688,7 +692,7 @@ public:
|
||||
GCodeWindow gcode_window;
|
||||
std::vector<unsigned int> gcode_ids;
|
||||
|
||||
void render(float legend_height) const;
|
||||
void render(float legend_height);
|
||||
};
|
||||
|
||||
enum class EViewType : unsigned char
|
||||
|
||||
@ -72,10 +72,17 @@
|
||||
|
||||
static constexpr const float TRACKBALLSIZE = 0.8f;
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
static const Slic3r::ColorRGBA DEFAULT_BG_DARK_COLOR = { 0.478f, 0.478f, 0.478f, 1.0f };
|
||||
static const Slic3r::ColorRGBA DEFAULT_BG_LIGHT_COLOR = { 0.753f, 0.753f, 0.753f, 1.0f };
|
||||
static const Slic3r::ColorRGBA ERROR_BG_DARK_COLOR = { 0.478f, 0.192f, 0.039f, 1.0f };
|
||||
static const Slic3r::ColorRGBA ERROR_BG_LIGHT_COLOR = { 0.753f, 0.192f, 0.039f, 1.0f };
|
||||
#else
|
||||
static const Slic3r::ColorRGB DEFAULT_BG_DARK_COLOR = { 0.478f, 0.478f, 0.478f };
|
||||
static const Slic3r::ColorRGB DEFAULT_BG_LIGHT_COLOR = { 0.753f, 0.753f, 0.753f };
|
||||
static const Slic3r::ColorRGB ERROR_BG_DARK_COLOR = { 0.478f, 0.192f, 0.039f };
|
||||
static const Slic3r::ColorRGB ERROR_BG_LIGHT_COLOR = { 0.753f, 0.192f, 0.039f };
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
// Number of floats
|
||||
static constexpr const size_t MAX_VERTEX_BUFFER_SIZE = 131072 * 6; // 3.15MB
|
||||
@ -99,49 +106,6 @@ float RetinaHelper::get_scale_factor() { return float(m_window->GetContentScaleF
|
||||
#undef Convex
|
||||
#endif
|
||||
|
||||
Size::Size()
|
||||
: m_width(0)
|
||||
, m_height(0)
|
||||
{
|
||||
}
|
||||
|
||||
Size::Size(int width, int height, float scale_factor)
|
||||
: m_width(width)
|
||||
, m_height(height)
|
||||
, m_scale_factor(scale_factor)
|
||||
{
|
||||
}
|
||||
|
||||
int Size::get_width() const
|
||||
{
|
||||
return m_width;
|
||||
}
|
||||
|
||||
void Size::set_width(int width)
|
||||
{
|
||||
m_width = width;
|
||||
}
|
||||
|
||||
int Size::get_height() const
|
||||
{
|
||||
return m_height;
|
||||
}
|
||||
|
||||
void Size::set_height(int height)
|
||||
{
|
||||
m_height = height;
|
||||
}
|
||||
|
||||
int Size::get_scale_factor() const
|
||||
{
|
||||
return m_scale_factor;
|
||||
}
|
||||
|
||||
void Size::set_scale_factor(int scale_factor)
|
||||
{
|
||||
m_scale_factor = scale_factor;
|
||||
}
|
||||
|
||||
GLCanvas3D::LayersEditing::~LayersEditing()
|
||||
{
|
||||
if (m_z_texture_id != 0) {
|
||||
@ -210,11 +174,7 @@ void GLCanvas3D::LayersEditing::set_enabled(bool enabled)
|
||||
|
||||
float GLCanvas3D::LayersEditing::s_overlay_window_width;
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void GLCanvas3D::LayersEditing::render_overlay(const GLCanvas3D& canvas)
|
||||
#else
|
||||
void GLCanvas3D::LayersEditing::render_overlay(const GLCanvas3D& canvas) const
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
{
|
||||
if (!m_enabled)
|
||||
return;
|
||||
@ -302,8 +262,15 @@ void GLCanvas3D::LayersEditing::render_overlay(const GLCanvas3D& canvas) const
|
||||
imgui.end();
|
||||
|
||||
const Rect& bar_rect = get_bar_rect_viewport(canvas);
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_profile.dirty = m_profile.old_bar_rect != bar_rect;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
render_active_object_annotations(canvas, bar_rect);
|
||||
render_profile(bar_rect);
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_profile.old_bar_rect = bar_rect;
|
||||
m_profile.dirty = false;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
}
|
||||
|
||||
float GLCanvas3D::LayersEditing::get_cursor_z_relative(const GLCanvas3D& canvas)
|
||||
@ -377,7 +344,7 @@ std::string GLCanvas3D::LayersEditing::get_tooltip(const GLCanvas3D& canvas) con
|
||||
return ret;
|
||||
}
|
||||
|
||||
void GLCanvas3D::LayersEditing::render_active_object_annotations(const GLCanvas3D& canvas, const Rect& bar_rect) const
|
||||
void GLCanvas3D::LayersEditing::render_active_object_annotations(const GLCanvas3D& canvas, const Rect& bar_rect)
|
||||
{
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("variable_layer_height");
|
||||
if (shader == nullptr)
|
||||
@ -395,6 +362,34 @@ void GLCanvas3D::LayersEditing::render_active_object_annotations(const GLCanvas3
|
||||
glsafe(::glBindTexture(GL_TEXTURE_2D, m_z_texture_id));
|
||||
|
||||
// Render the color bar
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
if (!m_profile.background.is_initialized() || m_profile.dirty) {
|
||||
m_profile.background.reset();
|
||||
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::Triangles, GLModel::Geometry::EVertexLayout::P2T2, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.vertices.reserve(4 * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(6 * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
// vertices
|
||||
const float l = bar_rect.get_left();
|
||||
const float r = bar_rect.get_right();
|
||||
const float t = bar_rect.get_top();
|
||||
const float b = bar_rect.get_bottom();
|
||||
init_data.add_vertex(Vec2f(l, b), Vec2f(0.0f, 0.0f));
|
||||
init_data.add_vertex(Vec2f(r, b), Vec2f(1.0f, 0.0f));
|
||||
init_data.add_vertex(Vec2f(r, t), Vec2f(1.0f, 1.0f));
|
||||
init_data.add_vertex(Vec2f(l, t), Vec2f(0.0f, 1.0f));
|
||||
|
||||
// indices
|
||||
init_data.add_ushort_triangle(0, 1, 2);
|
||||
init_data.add_ushort_triangle(2, 3, 0);
|
||||
|
||||
m_profile.background.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
m_profile.background.render();
|
||||
#else
|
||||
const float l = bar_rect.get_left();
|
||||
const float r = bar_rect.get_right();
|
||||
const float t = bar_rect.get_top();
|
||||
@ -407,16 +402,14 @@ void GLCanvas3D::LayersEditing::render_active_object_annotations(const GLCanvas3
|
||||
::glTexCoord2f(1.0f, 1.0f); ::glVertex2f(r, t);
|
||||
::glTexCoord2f(0.0f, 1.0f); ::glVertex2f(l, t);
|
||||
glsafe(::glEnd());
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
glsafe(::glBindTexture(GL_TEXTURE_2D, 0));
|
||||
|
||||
shader->stop_using();
|
||||
}
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void GLCanvas3D::LayersEditing::render_profile(const Rect& bar_rect)
|
||||
#else
|
||||
void GLCanvas3D::LayersEditing::render_profile(const Rect& bar_rect) const
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
{
|
||||
//FIXME show some kind of legend.
|
||||
|
||||
@ -426,56 +419,47 @@ void GLCanvas3D::LayersEditing::render_profile(const Rect& bar_rect) const
|
||||
// Make the vertical bar a bit wider so the layer height curve does not touch the edge of the bar region.
|
||||
const float scale_x = bar_rect.get_width() / float(1.12 * m_slicing_parameters->max_layer_height);
|
||||
const float scale_y = bar_rect.get_height() / m_object_max_z;
|
||||
const float x = bar_rect.get_left() + float(m_slicing_parameters->layer_height) * scale_x;
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
bool bar_rect_changed = m_profile.old_bar_rect != bar_rect;
|
||||
m_profile.old_bar_rect = bar_rect;
|
||||
|
||||
// Baseline
|
||||
if (!m_profile.baseline.is_initialized() || bar_rect_changed) {
|
||||
m_profile.old_bar_rect = bar_rect;
|
||||
if (!m_profile.baseline.is_initialized() || m_profile.dirty) {
|
||||
m_profile.baseline.reset();
|
||||
|
||||
GLModel::InitializationData init_data;
|
||||
GLModel::InitializationData::Entity entity;
|
||||
entity.type = GLModel::PrimitiveType::Lines;
|
||||
entity.positions.reserve(2);
|
||||
entity.positions.emplace_back(x, bar_rect.get_bottom(), 0.0f);
|
||||
entity.positions.emplace_back(x, bar_rect.get_top(), 0.0f);
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::Lines, GLModel::Geometry::EVertexLayout::P2, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.color = ColorRGBA::BLACK();
|
||||
init_data.vertices.reserve(2 * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(2 * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
entity.normals.reserve(2);
|
||||
for (size_t j = 0; j < 2; ++j) {
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
}
|
||||
// vertices
|
||||
const float x = bar_rect.get_left() + float(m_slicing_parameters->layer_height) * scale_x;
|
||||
init_data.add_vertex(Vec2f(x, bar_rect.get_bottom()));
|
||||
init_data.add_vertex(Vec2f(x, bar_rect.get_top()));
|
||||
|
||||
entity.indices.reserve(2);
|
||||
entity.indices.emplace_back(0);
|
||||
entity.indices.emplace_back(1);
|
||||
// indices
|
||||
init_data.add_ushort_line(0, 1);
|
||||
|
||||
init_data.entities.emplace_back(entity);
|
||||
m_profile.baseline.init_from(init_data);
|
||||
m_profile.baseline.set_color(-1, ColorRGBA::BLACK());
|
||||
m_profile.baseline.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
if (!m_profile.profile.is_initialized() || bar_rect_changed || m_profile.old_layer_height_profile != m_layer_height_profile) {
|
||||
if (!m_profile.profile.is_initialized() || m_profile.dirty || m_profile.old_layer_height_profile != m_layer_height_profile) {
|
||||
m_profile.old_layer_height_profile = m_layer_height_profile;
|
||||
m_profile.profile.reset();
|
||||
|
||||
GLModel::InitializationData init_data;
|
||||
GLModel::InitializationData::Entity entity;
|
||||
entity.type = GLModel::PrimitiveType::LineStrip;
|
||||
entity.positions.reserve(m_layer_height_profile.size());
|
||||
entity.normals.reserve(m_layer_height_profile.size());
|
||||
entity.indices.reserve(m_layer_height_profile.size());
|
||||
for (unsigned int i = 0; i < unsigned int(m_layer_height_profile.size()); i += 2) {
|
||||
entity.positions.emplace_back(bar_rect.get_left() + float(m_layer_height_profile[i + 1]) * scale_x, bar_rect.get_bottom() + float(m_layer_height_profile[i]) * scale_y, 0.0f);
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
entity.indices.emplace_back(i / 2);
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::LineStrip, GLModel::Geometry::EVertexLayout::P2, GLModel::Geometry::EIndexType::UINT };
|
||||
init_data.color = ColorRGBA::BLUE();
|
||||
init_data.vertices.reserve(m_layer_height_profile.size() * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(m_layer_height_profile.size() * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
// vertices + indices
|
||||
for (unsigned int i = 0; i < (unsigned int)m_layer_height_profile.size(); i += 2) {
|
||||
init_data.add_vertex(Vec2f(bar_rect.get_left() + float(m_layer_height_profile[i + 1]) * scale_x,
|
||||
bar_rect.get_bottom() + float(m_layer_height_profile[i]) * scale_y));
|
||||
init_data.add_uint_index(i / 2);
|
||||
}
|
||||
|
||||
init_data.entities.emplace_back(entity);
|
||||
m_profile.profile.init_from(init_data);
|
||||
m_profile.profile.set_color(-1, ColorRGBA::BLUE());
|
||||
m_profile.profile.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("flat");
|
||||
@ -486,6 +470,8 @@ void GLCanvas3D::LayersEditing::render_profile(const Rect& bar_rect) const
|
||||
shader->stop_using();
|
||||
}
|
||||
#else
|
||||
const float x = bar_rect.get_left() + float(m_slicing_parameters->layer_height) * scale_x;
|
||||
|
||||
// Baseline
|
||||
glsafe(::glColor3f(0.0f, 0.0f, 0.0f));
|
||||
::glBegin(GL_LINE_STRIP);
|
||||
@ -817,9 +803,42 @@ void GLCanvas3D::Tooltip::render(const Vec2d& mouse_position, GLCanvas3D& canvas
|
||||
static ImVec2 size(0.0f, 0.0f);
|
||||
|
||||
auto validate_position = [](const Vec2d& position, const GLCanvas3D& canvas, const ImVec2& wnd_size) {
|
||||
auto calc_cursor_height = []() {
|
||||
float ret = 16.0f;
|
||||
#ifdef _WIN32
|
||||
// see: https://forums.codeguru.com/showthread.php?449040-get-the-system-current-cursor-size
|
||||
// this code is not perfect because it returns a maximum height equal to 31 even if the cursor bitmap shown on screen is bigger
|
||||
// but at least it gives the same result as wxWidgets in the settings tabs
|
||||
ICONINFO ii;
|
||||
if (::GetIconInfo((HICON)GetCursor(), &ii) != 0) {
|
||||
BITMAP bitmap;
|
||||
::GetObject(ii.hbmMask, sizeof(BITMAP), &bitmap);
|
||||
int width = bitmap.bmWidth;
|
||||
int height = (ii.hbmColor == nullptr) ? bitmap.bmHeight / 2 : bitmap.bmHeight;
|
||||
HDC dc = ::CreateCompatibleDC(nullptr);
|
||||
if (dc != nullptr) {
|
||||
if (::SelectObject(dc, ii.hbmMask) != nullptr) {
|
||||
for (int i = 0; i < width; ++i) {
|
||||
for (int j = 0; j < height; ++j) {
|
||||
if (::GetPixel(dc, i, j) != RGB(255, 255, 255)) {
|
||||
if (ret < float(j))
|
||||
ret = float(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
::DeleteDC(dc);
|
||||
}
|
||||
}
|
||||
::DeleteObject(ii.hbmColor);
|
||||
::DeleteObject(ii.hbmMask);
|
||||
}
|
||||
#endif // _WIN32
|
||||
return ret;
|
||||
};
|
||||
|
||||
const Size cnv_size = canvas.get_canvas_size();
|
||||
const float x = std::clamp((float)position.x(), 0.0f, (float)cnv_size.get_width() - wnd_size.x);
|
||||
const float y = std::clamp((float)position.y() + 16.0f, 0.0f, (float)cnv_size.get_height() - wnd_size.y);
|
||||
const float x = std::clamp(float(position.x()), 0.0f, float(cnv_size.get_width()) - wnd_size.x);
|
||||
const float y = std::clamp(float(position.y()) + calc_cursor_height(), 0.0f, float(cnv_size.get_height()) - wnd_size.y);
|
||||
return Vec2f(x, y);
|
||||
};
|
||||
|
||||
@ -860,16 +879,37 @@ void GLCanvas3D::SequentialPrintClearance::set_polygons(const Polygons& polygons
|
||||
if (polygons.empty())
|
||||
return;
|
||||
|
||||
#if !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
size_t triangles_count = 0;
|
||||
for (const Polygon& poly : polygons) {
|
||||
triangles_count += poly.points.size() - 2;
|
||||
}
|
||||
const size_t vertices_count = 3 * triangles_count;
|
||||
#endif // !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
if (m_render_fill) {
|
||||
GLModel::InitializationData fill_data;
|
||||
GLModel::InitializationData::Entity entity;
|
||||
entity.type = GLModel::PrimitiveType::Triangles;
|
||||
GLModel::Geometry fill_data;
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
fill_data.format = { GLModel::Geometry::EPrimitiveType::Triangles, GLModel::Geometry::EVertexLayout::P3, GLModel::Geometry::EIndexType::UINT };
|
||||
fill_data.color = { 0.3333f, 0.0f, 0.0f, 0.5f };
|
||||
|
||||
// vertices + indices
|
||||
const ExPolygons polygons_union = union_ex(polygons);
|
||||
unsigned int vertices_counter = 0;
|
||||
for (const ExPolygon& poly : polygons_union) {
|
||||
const std::vector<Vec3d> triangulation = triangulate_expolygon_3d(poly);
|
||||
for (const Vec3d& v : triangulation) {
|
||||
fill_data.add_vertex((Vec3f)(v.cast<float>() + 0.0125f * Vec3f::UnitZ())); // add a small positive z to avoid z-fighting
|
||||
++vertices_counter;
|
||||
if (vertices_counter % 3 == 0)
|
||||
fill_data.add_uint_triangle(vertices_counter - 3, vertices_counter - 2, vertices_counter - 1);
|
||||
}
|
||||
}
|
||||
|
||||
m_fill.init_from(std::move(fill_data));
|
||||
#else
|
||||
GLModel::Geometry::Entity entity;
|
||||
entity.type = GLModel::EPrimitiveType::Triangles;
|
||||
entity.color = { 0.3333f, 0.0f, 0.0f, 0.5f };
|
||||
entity.positions.reserve(vertices_count);
|
||||
entity.normals.reserve(vertices_count);
|
||||
@ -892,12 +932,16 @@ void GLCanvas3D::SequentialPrintClearance::set_polygons(const Polygons& polygons
|
||||
|
||||
fill_data.entities.emplace_back(entity);
|
||||
m_fill.init_from(fill_data);
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
}
|
||||
|
||||
GLModel::InitializationData perimeter_data;
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_perimeter.init_from(polygons, 0.025f); // add a small positive z to avoid z-fighting
|
||||
#else
|
||||
GLModel::Geometry perimeter_data;
|
||||
for (const Polygon& poly : polygons) {
|
||||
GLModel::InitializationData::Entity ent;
|
||||
ent.type = GLModel::PrimitiveType::LineLoop;
|
||||
GLModel::Geometry::Entity ent;
|
||||
ent.type = GLModel::EPrimitiveType::LineLoop;
|
||||
ent.positions.reserve(poly.points.size());
|
||||
ent.indices.reserve(poly.points.size());
|
||||
unsigned int id_count = 0;
|
||||
@ -911,6 +955,7 @@ void GLCanvas3D::SequentialPrintClearance::set_polygons(const Polygons& polygons
|
||||
}
|
||||
|
||||
m_perimeter.init_from(perimeter_data);
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
}
|
||||
|
||||
void GLCanvas3D::SequentialPrintClearance::render()
|
||||
@ -918,7 +963,11 @@ void GLCanvas3D::SequentialPrintClearance::render()
|
||||
const ColorRGBA FILL_COLOR = { 1.0f, 0.0f, 0.0f, 0.5f };
|
||||
const ColorRGBA NO_FILL_COLOR = { 1.0f, 1.0f, 1.0f, 0.75f };
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("flat");
|
||||
#else
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("gouraud_light");
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
if (shader == nullptr)
|
||||
return;
|
||||
|
||||
@ -929,7 +978,11 @@ void GLCanvas3D::SequentialPrintClearance::render()
|
||||
glsafe(::glEnable(GL_BLEND));
|
||||
glsafe(::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_perimeter.set_color(m_render_fill ? FILL_COLOR : NO_FILL_COLOR);
|
||||
#else
|
||||
m_perimeter.set_color(-1, m_render_fill ? FILL_COLOR : NO_FILL_COLOR);
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_perimeter.render();
|
||||
m_fill.render();
|
||||
|
||||
@ -1520,13 +1573,13 @@ void GLCanvas3D::render()
|
||||
wxGetApp().imgui()->new_frame();
|
||||
|
||||
if (m_picking_enabled) {
|
||||
if (m_rectangle_selection.is_dragging())
|
||||
// picking pass using rectangle selection
|
||||
_rectangular_selection_picking_pass();
|
||||
else if (!m_volumes.empty())
|
||||
// regular picking pass
|
||||
_picking_pass();
|
||||
}
|
||||
if (m_rectangle_selection.is_dragging())
|
||||
// picking pass using rectangle selection
|
||||
_rectangular_selection_picking_pass();
|
||||
else if (!m_volumes.empty())
|
||||
// regular picking pass
|
||||
_picking_pass();
|
||||
}
|
||||
|
||||
#if ENABLE_RENDER_PICKING_PASS
|
||||
if (!m_picking_enabled || !m_show_picking_texture) {
|
||||
@ -4968,15 +5021,17 @@ BoundingBoxf3 GLCanvas3D::_max_bounding_box(bool include_gizmos, bool include_be
|
||||
bb.merge(m_gcode_viewer.get_max_bounding_box());
|
||||
|
||||
// clamp max bb size with respect to bed bb size
|
||||
static const double max_scale_factor = 1.5;
|
||||
const Vec3d bb_size = bb.size();
|
||||
const Vec3d bed_bb_size = bed_bb.size();
|
||||
if (bb_size.x() > max_scale_factor * bed_bb_size.x() ||
|
||||
bb_size.y() > max_scale_factor * bed_bb_size.y() ||
|
||||
bb_size.z() > max_scale_factor * bed_bb_size.z()) {
|
||||
const Vec3d bed_bb_center = bed_bb.center();
|
||||
const Vec3d extend_by = max_scale_factor * bed_bb_size;
|
||||
bb = BoundingBoxf3(bed_bb_center - extend_by, bed_bb_center + extend_by);
|
||||
if (!m_picking_enabled) {
|
||||
static const double max_scale_factor = 1.5;
|
||||
const Vec3d bb_size = bb.size();
|
||||
const Vec3d bed_bb_size = bed_bb.size();
|
||||
if (bb_size.x() > max_scale_factor * bed_bb_size.x() ||
|
||||
bb_size.y() > max_scale_factor * bed_bb_size.y() ||
|
||||
bb_size.z() > max_scale_factor * bed_bb_size.z()) {
|
||||
const Vec3d bed_bb_center = bed_bb.center();
|
||||
const Vec3d extend_by = max_scale_factor * bed_bb_size;
|
||||
bb = BoundingBoxf3(bed_bb_center - extend_by, bed_bb_center + extend_by);
|
||||
}
|
||||
}
|
||||
|
||||
return bb;
|
||||
@ -5149,7 +5204,7 @@ void GLCanvas3D::_rectangular_selection_picking_pass()
|
||||
_update_volumes_hover_state();
|
||||
}
|
||||
|
||||
void GLCanvas3D::_render_background() const
|
||||
void GLCanvas3D::_render_background()
|
||||
{
|
||||
bool use_error_color = false;
|
||||
if (wxGetApp().is_editor()) {
|
||||
@ -5171,6 +5226,40 @@ void GLCanvas3D::_render_background() const
|
||||
// Draws a bottom to top gradient over the complete screen.
|
||||
glsafe(::glDisable(GL_DEPTH_TEST));
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
const ColorRGBA bottom_color = use_error_color ? ERROR_BG_DARK_COLOR : DEFAULT_BG_DARK_COLOR;
|
||||
|
||||
if (!m_background.is_initialized()) {
|
||||
m_background.reset();
|
||||
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::Triangles, GLModel::Geometry::EVertexLayout::P2T2, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.vertices.reserve(4 * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(6 * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
// vertices
|
||||
init_data.add_vertex(Vec2f(-1.0f, -1.0f), Vec2f(0.0f, 0.0f));
|
||||
init_data.add_vertex(Vec2f(1.0f, -1.0f), Vec2f(1.0f, 0.0f));
|
||||
init_data.add_vertex(Vec2f(1.0f, 1.0f), Vec2f(1.0f, 1.0f));
|
||||
init_data.add_vertex(Vec2f(-1.0f, 1.0f), Vec2f(0.0f, 1.0f));
|
||||
|
||||
// indices
|
||||
init_data.add_ushort_triangle(0, 1, 2);
|
||||
init_data.add_ushort_triangle(2, 3, 0);
|
||||
|
||||
m_background.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("background");
|
||||
if (shader != nullptr) {
|
||||
shader->start_using();
|
||||
shader->set_uniform("top_color", use_error_color ? ERROR_BG_LIGHT_COLOR : DEFAULT_BG_LIGHT_COLOR);
|
||||
shader->set_uniform("bottom_color", bottom_color);
|
||||
|
||||
m_background.render();
|
||||
shader->stop_using();
|
||||
}
|
||||
#else
|
||||
::glBegin(GL_QUADS);
|
||||
::glColor3fv(use_error_color ? ERROR_BG_DARK_COLOR.data(): DEFAULT_BG_DARK_COLOR.data());
|
||||
::glVertex2f(-1.0f, -1.0f);
|
||||
@ -5180,6 +5269,7 @@ void GLCanvas3D::_render_background() const
|
||||
::glVertex2f(1.0f, 1.0f);
|
||||
::glVertex2f(-1.0f, 1.0f);
|
||||
glsafe(::glEnd());
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||
|
||||
@ -5298,11 +5388,7 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type)
|
||||
// before transparent objects are rendered. Otherwise they would not be
|
||||
// visible when inside modifier meshes etc.
|
||||
{
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
GLGizmosManager& gm = get_gizmos_manager();
|
||||
#else
|
||||
const GLGizmosManager& gm = get_gizmos_manager();
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
// GLGizmosManager::EType type = gm.get_current_type();
|
||||
if (dynamic_cast<GLGizmoPainterBase*>(gm.get_current())) {
|
||||
shader->stop_using();
|
||||
@ -5329,11 +5415,7 @@ void GLCanvas3D::_render_gcode()
|
||||
m_gcode_viewer.render();
|
||||
}
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void GLCanvas3D::_render_selection()
|
||||
#else
|
||||
void GLCanvas3D::_render_selection() const
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
{
|
||||
float scale_factor = 1.0;
|
||||
#if ENABLE_RETINA_GL
|
||||
@ -5608,11 +5690,7 @@ void GLCanvas3D::_render_view_toolbar() const
|
||||
}
|
||||
|
||||
#if ENABLE_SHOW_CAMERA_TARGET
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void GLCanvas3D::_render_camera_target()
|
||||
#else
|
||||
void GLCanvas3D::_render_camera_target() const
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
{
|
||||
static const double half_length = 5.0;
|
||||
|
||||
@ -5805,11 +5883,7 @@ void GLCanvas3D::_render_sla_slices()
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void GLCanvas3D::_render_selection_sidebar_hints()
|
||||
#else
|
||||
void GLCanvas3D::_render_selection_sidebar_hints() const
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
{
|
||||
m_selection.render_sidebar_hints(m_sidebar_field);
|
||||
}
|
||||
@ -6292,10 +6366,14 @@ void GLCanvas3D::_load_print_object_toolpaths(const PrintObject& print_object, c
|
||||
|
||||
BOOST_LOG_TRIVIAL(debug) << "Loading print object toolpaths in parallel - finalizing results" << m_volumes.log_memory_info() << log_memory_info();
|
||||
// Remove empty volumes from the newly added volumes.
|
||||
m_volumes.volumes.erase(
|
||||
std::remove_if(m_volumes.volumes.begin() + volumes_cnt_initial, m_volumes.volumes.end(),
|
||||
[](const GLVolume *volume) { return volume->empty(); }),
|
||||
m_volumes.volumes.end());
|
||||
{
|
||||
for (auto ptr_it = m_volumes.volumes.begin() + volumes_cnt_initial; ptr_it != m_volumes.volumes.end(); ++ptr_it)
|
||||
if ((*ptr_it)->empty()) {
|
||||
delete *ptr_it;
|
||||
*ptr_it = nullptr;
|
||||
}
|
||||
m_volumes.volumes.erase(std::remove(m_volumes.volumes.begin() + volumes_cnt_initial, m_volumes.volumes.end(), nullptr), m_volumes.volumes.end());
|
||||
}
|
||||
for (size_t i = volumes_cnt_initial; i < m_volumes.volumes.size(); ++i) {
|
||||
GLVolume* v = m_volumes.volumes[i];
|
||||
v->is_outside = ! build_volume.all_paths_inside_vertices_and_normals_interleaved(v->indexed_vertex_array.vertices_and_normals_interleaved, v->indexed_vertex_array.bounding_box());
|
||||
@ -6453,10 +6531,14 @@ void GLCanvas3D::_load_wipe_tower_toolpaths(const BuildVolume& build_volume, con
|
||||
|
||||
BOOST_LOG_TRIVIAL(debug) << "Loading wipe tower toolpaths in parallel - finalizing results" << m_volumes.log_memory_info() << log_memory_info();
|
||||
// Remove empty volumes from the newly added volumes.
|
||||
m_volumes.volumes.erase(
|
||||
std::remove_if(m_volumes.volumes.begin() + volumes_cnt_initial, m_volumes.volumes.end(),
|
||||
[](const GLVolume *volume) { return volume->empty(); }),
|
||||
m_volumes.volumes.end());
|
||||
{
|
||||
for (auto ptr_it = m_volumes.volumes.begin() + volumes_cnt_initial; ptr_it != m_volumes.volumes.end(); ++ptr_it)
|
||||
if ((*ptr_it)->empty()) {
|
||||
delete *ptr_it;
|
||||
*ptr_it = nullptr;
|
||||
}
|
||||
m_volumes.volumes.erase(std::remove(m_volumes.volumes.begin() + volumes_cnt_initial, m_volumes.volumes.end(), nullptr), m_volumes.volumes.end());
|
||||
}
|
||||
for (size_t i = volumes_cnt_initial; i < m_volumes.volumes.size(); ++i) {
|
||||
GLVolume* v = m_volumes.volumes[i];
|
||||
v->is_outside = ! build_volume.all_paths_inside_vertices_and_normals_interleaved(v->indexed_vertex_array.vertices_and_normals_interleaved, v->indexed_vertex_array.bounding_box());
|
||||
|
||||
@ -59,25 +59,24 @@ class RetinaHelper;
|
||||
|
||||
class Size
|
||||
{
|
||||
int m_width;
|
||||
int m_height;
|
||||
float m_scale_factor;
|
||||
int m_width{ 0 };
|
||||
int m_height{ 0 };
|
||||
float m_scale_factor{ 1.0f };
|
||||
|
||||
public:
|
||||
Size();
|
||||
Size(int width, int height, float scale_factor = 1.0);
|
||||
Size() = default;
|
||||
Size(int width, int height, float scale_factor = 1.0f) : m_width(width), m_height(height), m_scale_factor(scale_factor) {}
|
||||
|
||||
int get_width() const;
|
||||
void set_width(int width);
|
||||
int get_width() const { return m_width; }
|
||||
void set_width(int width) { m_width = width; }
|
||||
|
||||
int get_height() const;
|
||||
void set_height(int height);
|
||||
int get_height() const { return m_height; }
|
||||
void set_height(int height) { m_height = height; }
|
||||
|
||||
int get_scale_factor() const;
|
||||
void set_scale_factor(int height);
|
||||
float get_scale_factor() const { return m_scale_factor; }
|
||||
void set_scale_factor(float factor) { m_scale_factor = factor; }
|
||||
};
|
||||
|
||||
|
||||
class RenderTimerEvent : public wxEvent
|
||||
{
|
||||
public:
|
||||
@ -245,8 +244,10 @@ class GLCanvas3D
|
||||
{
|
||||
GLModel baseline;
|
||||
GLModel profile;
|
||||
GLModel background;
|
||||
Rect old_bar_rect;
|
||||
std::vector<double> old_layer_height_profile;
|
||||
bool dirty{ false };
|
||||
};
|
||||
Profile m_profile;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
@ -264,11 +265,7 @@ class GLCanvas3D
|
||||
bool is_enabled() const;
|
||||
void set_enabled(bool enabled);
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void render_overlay(const GLCanvas3D& canvas);
|
||||
#else
|
||||
void render_overlay(const GLCanvas3D& canvas) const;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void render_volumes(const GLCanvas3D& canvas, const GLVolumeCollection& volumes);
|
||||
|
||||
void adjust_layer_height_profile();
|
||||
@ -290,12 +287,8 @@ class GLCanvas3D
|
||||
private:
|
||||
bool is_initialized() const;
|
||||
void generate_layer_height_texture();
|
||||
void render_active_object_annotations(const GLCanvas3D& canvas, const Rect& bar_rect) const;
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void render_active_object_annotations(const GLCanvas3D& canvas, const Rect& bar_rect);
|
||||
void render_profile(const Rect& bar_rect);
|
||||
#else
|
||||
void render_profile(const Rect& bar_rect) const;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void update_slicing_parameters();
|
||||
|
||||
static float thickness_bar_width(const GLCanvas3D &canvas);
|
||||
@ -628,6 +621,7 @@ private:
|
||||
|
||||
CameraTarget m_camera_target;
|
||||
#endif // ENABLE_SHOW_CAMERA_TARGET
|
||||
GLModel m_background;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
public:
|
||||
@ -939,16 +933,12 @@ private:
|
||||
|
||||
void _picking_pass();
|
||||
void _rectangular_selection_picking_pass();
|
||||
void _render_background() const;
|
||||
void _render_background();
|
||||
void _render_bed(bool bottom, bool show_axes);
|
||||
void _render_bed_for_picking(bool bottom);
|
||||
void _render_objects(GLVolumeCollection::ERenderType type);
|
||||
void _render_gcode();
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void _render_selection();
|
||||
#else
|
||||
void _render_selection() const;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void _render_sequential_clearance();
|
||||
#if ENABLE_RENDER_SELECTION_CENTER
|
||||
void _render_selection_center();
|
||||
@ -963,18 +953,10 @@ private:
|
||||
void _render_collapse_toolbar() const;
|
||||
void _render_view_toolbar() const;
|
||||
#if ENABLE_SHOW_CAMERA_TARGET
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void _render_camera_target();
|
||||
#else
|
||||
void _render_camera_target() const;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
#endif // ENABLE_SHOW_CAMERA_TARGET
|
||||
void _render_sla_slices();
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void _render_selection_sidebar_hints();
|
||||
#else
|
||||
void _render_selection_sidebar_hints() const;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
bool _render_undo_redo_stack(const bool is_undo, float pos_x);
|
||||
bool _render_search_list(float pos_x);
|
||||
bool _render_arrange_menu(float pos_x);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -20,7 +20,8 @@ namespace GUI {
|
||||
class GLModel
|
||||
{
|
||||
public:
|
||||
enum class PrimitiveType : unsigned char
|
||||
#if !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
enum class EPrimitiveType : unsigned char
|
||||
{
|
||||
Triangles,
|
||||
Lines,
|
||||
@ -30,18 +31,110 @@ namespace GUI {
|
||||
|
||||
struct RenderData
|
||||
{
|
||||
PrimitiveType type;
|
||||
EPrimitiveType type;
|
||||
unsigned int vbo_id{ 0 };
|
||||
unsigned int ibo_id{ 0 };
|
||||
size_t indices_count{ 0 };
|
||||
ColorRGBA color;
|
||||
};
|
||||
#endif // !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
struct InitializationData
|
||||
struct Geometry
|
||||
{
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
enum class EPrimitiveType : unsigned char
|
||||
{
|
||||
Points,
|
||||
Triangles,
|
||||
TriangleStrip,
|
||||
TriangleFan,
|
||||
Lines,
|
||||
LineStrip,
|
||||
LineLoop
|
||||
};
|
||||
|
||||
enum class EVertexLayout : unsigned char
|
||||
{
|
||||
P2, // position 2 floats
|
||||
P2T2, // position 2 floats + texture coords 2 floats
|
||||
P3, // position 3 floats
|
||||
P3N3, // position 3 floats + normal 3 floats
|
||||
};
|
||||
|
||||
enum class EIndexType : unsigned char
|
||||
{
|
||||
UINT, // unsigned int
|
||||
USHORT // unsigned short
|
||||
};
|
||||
|
||||
struct Format
|
||||
{
|
||||
EPrimitiveType type{ EPrimitiveType::Triangles };
|
||||
EVertexLayout vertex_layout{ EVertexLayout::P3N3 };
|
||||
EIndexType index_type{ EIndexType::UINT };
|
||||
};
|
||||
|
||||
Format format;
|
||||
std::vector<float> vertices;
|
||||
std::vector<unsigned char> indices;
|
||||
ColorRGBA color{ ColorRGBA::BLACK() };
|
||||
|
||||
void add_vertex(const Vec2f& position);
|
||||
void add_vertex(const Vec2f& position, const Vec2f& tex_coord);
|
||||
void add_vertex(const Vec3f& position);
|
||||
void add_vertex(const Vec3f& position, const Vec3f& normal);
|
||||
|
||||
void add_ushort_index(unsigned short id);
|
||||
void add_uint_index(unsigned int id);
|
||||
|
||||
void add_ushort_line(unsigned short id1, unsigned short id2);
|
||||
void add_uint_line(unsigned int id1, unsigned int id2);
|
||||
|
||||
void add_ushort_triangle(unsigned short id1, unsigned short id2, unsigned short id3);
|
||||
void add_uint_triangle(unsigned int id1, unsigned int id2, unsigned int id3);
|
||||
|
||||
Vec2f extract_position_2(size_t id) const;
|
||||
Vec3f extract_position_3(size_t id) const;
|
||||
Vec3f extract_normal_3(size_t id) const;
|
||||
Vec2f extract_tex_coord_2(size_t id) const;
|
||||
|
||||
unsigned int extract_uint_index(size_t id) const;
|
||||
unsigned short extract_ushort_index(size_t id) const;
|
||||
|
||||
size_t vertices_count() const { return vertices.size() / vertex_stride_floats(format); }
|
||||
size_t indices_count() const { return indices.size() / index_stride_bytes(format); }
|
||||
|
||||
size_t vertices_size_floats() const { return vertices.size(); }
|
||||
size_t vertices_size_bytes() const { return vertices_size_floats() * sizeof(float); }
|
||||
size_t indices_size_bytes() const { return indices.size(); }
|
||||
|
||||
static size_t vertex_stride_floats(const Format& format);
|
||||
static size_t vertex_stride_bytes(const Format& format) { return vertex_stride_floats(format) * sizeof(float); }
|
||||
|
||||
static size_t position_stride_floats(const Format& format);
|
||||
static size_t position_stride_bytes(const Format& format) { return position_stride_floats(format) * sizeof(float); }
|
||||
static size_t position_offset_floats(const Format& format);
|
||||
static size_t position_offset_bytes(const Format& format) { return position_offset_floats(format) * sizeof(float); }
|
||||
|
||||
static size_t normal_stride_floats(const Format& format);
|
||||
static size_t normal_stride_bytes(const Format& format) { return normal_stride_floats(format) * sizeof(float); }
|
||||
static size_t normal_offset_floats(const Format& format);
|
||||
static size_t normal_offset_bytes(const Format& format) { return normal_offset_floats(format) * sizeof(float); }
|
||||
|
||||
static size_t tex_coord_stride_floats(const Format& format);
|
||||
static size_t tex_coord_stride_bytes(const Format& format) { return tex_coord_stride_floats(format) * sizeof(float); }
|
||||
static size_t tex_coord_offset_floats(const Format& format);
|
||||
static size_t tex_coord_offset_bytes(const Format& format) { return tex_coord_offset_floats(format) * sizeof(float); }
|
||||
|
||||
static size_t index_stride_bytes(const Format& format);
|
||||
|
||||
static bool has_position(const Format& format);
|
||||
static bool has_normal(const Format& format);
|
||||
static bool has_tex_coord(const Format& format);
|
||||
#else
|
||||
struct Entity
|
||||
{
|
||||
PrimitiveType type;
|
||||
EPrimitiveType type;
|
||||
std::vector<Vec3f> positions;
|
||||
std::vector<Vec3f> normals;
|
||||
std::vector<unsigned int> indices;
|
||||
@ -56,10 +149,26 @@ namespace GUI {
|
||||
|
||||
size_t indices_count() const;
|
||||
size_t indices_size_bytes() const { return indices_count() * sizeof(unsigned int); }
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
};
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
struct RenderData
|
||||
{
|
||||
Geometry geometry;
|
||||
unsigned int vbo_id{ 0 };
|
||||
unsigned int ibo_id{ 0 };
|
||||
size_t vertices_count{ 0 };
|
||||
size_t indices_count{ 0 };
|
||||
};
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
private:
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
RenderData m_render_data;
|
||||
#else
|
||||
std::vector<RenderData> m_render_data;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
BoundingBoxf3 m_bounding_box;
|
||||
std::string m_filename;
|
||||
@ -68,51 +177,82 @@ namespace GUI {
|
||||
GLModel() = default;
|
||||
virtual ~GLModel() { reset(); }
|
||||
|
||||
void init_from(const InitializationData& data);
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
size_t vertices_count() const { return m_render_data.vertices_count > 0 ?
|
||||
m_render_data.vertices_count : m_render_data.geometry.vertices_count(); }
|
||||
size_t indices_count() const { return m_render_data.indices_count > 0 ?
|
||||
m_render_data.indices_count : m_render_data.geometry.indices_count(); }
|
||||
|
||||
size_t vertices_size_floats() const { return vertices_count() * Geometry::vertex_stride_floats(m_render_data.geometry.format); }
|
||||
size_t vertices_size_bytes() const { return vertices_size_floats() * sizeof(float); }
|
||||
|
||||
size_t indices_size_bytes() const { return indices_count() * Geometry::index_stride_bytes(m_render_data.geometry.format); }
|
||||
|
||||
void init_from(Geometry&& data);
|
||||
void init_from(const TriangleMesh& mesh);
|
||||
#else
|
||||
void init_from(const Geometry& data);
|
||||
void init_from(const indexed_triangle_set& its, const BoundingBoxf3& bbox);
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void init_from(const indexed_triangle_set& its);
|
||||
void init_from(const Polygons& polygons, float z);
|
||||
bool init_from_file(const std::string& filename);
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void set_color(const ColorRGBA& color) { m_render_data.geometry.color = color; }
|
||||
const ColorRGBA& get_color() const { return m_render_data.geometry.color; }
|
||||
#else
|
||||
// if entity_id == -1 set the color of all entities
|
||||
void set_color(int entity_id, const ColorRGBA& color);
|
||||
ColorRGBA get_color(size_t entity_id = 0U) const;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
void reset();
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void render();
|
||||
void render_instanced(unsigned int instances_vbo, unsigned int instances_count);
|
||||
|
||||
bool is_initialized() const { return vertices_count() > 0 && indices_count() > 0; }
|
||||
#else
|
||||
void render() const;
|
||||
void render_instanced(unsigned int instances_vbo, unsigned int instances_count) const;
|
||||
|
||||
bool is_initialized() const { return !m_render_data.empty(); }
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
const BoundingBoxf3& get_bounding_box() const { return m_bounding_box; }
|
||||
const std::string& get_filename() const { return m_filename; }
|
||||
|
||||
private:
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
bool send_to_gpu();
|
||||
#else
|
||||
void send_to_gpu(RenderData& data, const std::vector<float>& vertices, const std::vector<unsigned int>& indices);
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
};
|
||||
|
||||
// create an arrow with cylindrical stem and conical tip, with the given dimensions and resolution
|
||||
// the origin of the arrow is in the center of the stem cap
|
||||
// the arrow has its axis of symmetry along the Z axis and is pointing upward
|
||||
// used to render bed axes and sequential marker
|
||||
GLModel::InitializationData stilized_arrow(int resolution, float tip_radius, float tip_height, float stem_radius, float stem_height);
|
||||
GLModel::Geometry stilized_arrow(unsigned short resolution, float tip_radius, float tip_height, float stem_radius, float stem_height);
|
||||
|
||||
// create an arrow whose stem is a quarter of circle, with the given dimensions and resolution
|
||||
// the origin of the arrow is in the center of the circle
|
||||
// the arrow is contained in the 1st quadrant of the XY plane and is pointing counterclockwise
|
||||
// used to render sidebar hints for rotations
|
||||
GLModel::InitializationData circular_arrow(int resolution, float radius, float tip_height, float tip_width, float stem_width, float thickness);
|
||||
GLModel::Geometry circular_arrow(unsigned short resolution, float radius, float tip_height, float tip_width, float stem_width, float thickness);
|
||||
|
||||
// create an arrow with the given dimensions
|
||||
// the origin of the arrow is in the center of the stem cap
|
||||
// the arrow is contained in XY plane and has its main axis along the Y axis
|
||||
// used to render sidebar hints for position and scale
|
||||
GLModel::InitializationData straight_arrow(float tip_width, float tip_height, float stem_width, float stem_height, float thickness);
|
||||
GLModel::Geometry straight_arrow(float tip_width, float tip_height, float stem_width, float stem_height, float thickness);
|
||||
|
||||
// create a diamond with the given resolution
|
||||
// the origin of the diamond is in its center
|
||||
// the diamond is contained into a box with size [1, 1, 1]
|
||||
GLModel::InitializationData diamond(int resolution);
|
||||
GLModel::Geometry diamond(unsigned short resolution);
|
||||
|
||||
} // namespace GUI
|
||||
} // namespace Slic3r
|
||||
|
||||
@ -69,11 +69,7 @@ namespace GUI {
|
||||
m_state = Off;
|
||||
}
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void GLSelectionRectangle::render(const GLCanvas3D& canvas)
|
||||
#else
|
||||
void GLSelectionRectangle::render(const GLCanvas3D& canvas) const
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
{
|
||||
if (!is_dragging())
|
||||
return;
|
||||
@ -84,16 +80,16 @@ namespace GUI {
|
||||
Size cnv_size = canvas.get_canvas_size();
|
||||
float cnv_half_width = 0.5f * (float)cnv_size.get_width();
|
||||
float cnv_half_height = 0.5f * (float)cnv_size.get_height();
|
||||
if ((cnv_half_width == 0.0f) || (cnv_half_height == 0.0f))
|
||||
if (cnv_half_width == 0.0f || cnv_half_height == 0.0f)
|
||||
return;
|
||||
|
||||
Vec2d start(m_start_corner(0) - cnv_half_width, cnv_half_height - m_start_corner(1));
|
||||
Vec2d end(m_end_corner(0) - cnv_half_width, cnv_half_height - m_end_corner(1));
|
||||
|
||||
float left = (float)std::min(start(0), end(0)) * inv_zoom;
|
||||
float top = (float)std::max(start(1), end(1)) * inv_zoom;
|
||||
float right = (float)std::max(start(0), end(0)) * inv_zoom;
|
||||
float bottom = (float)std::min(start(1), end(1)) * inv_zoom;
|
||||
const float left = (float)std::min(start(0), end(0)) * inv_zoom;
|
||||
const float top = (float)std::max(start(1), end(1)) * inv_zoom;
|
||||
const float right = (float)std::max(start(0), end(0)) * inv_zoom;
|
||||
const float bottom = (float)std::min(start(1), end(1)) * inv_zoom;
|
||||
|
||||
glsafe(::glLineWidth(1.5f));
|
||||
#if !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
@ -111,7 +107,7 @@ namespace GUI {
|
||||
// ensure that the rectangle is renderered inside the frustrum
|
||||
glsafe(::glTranslated(0.0, 0.0, -(camera.get_near_z() + 0.5)));
|
||||
// ensure that the overlay fits the frustrum near z plane
|
||||
double gui_scale = camera.get_gui_scale();
|
||||
const double gui_scale = camera.get_gui_scale();
|
||||
glsafe(::glScaled(gui_scale, gui_scale, 1.0));
|
||||
|
||||
glsafe(::glPushAttrib(GL_ENABLE_BIT));
|
||||
@ -128,37 +124,31 @@ namespace GUI {
|
||||
m_old_end_corner = m_end_corner;
|
||||
m_rectangle.reset();
|
||||
|
||||
GLModel::InitializationData init_data;
|
||||
GLModel::InitializationData::Entity entity;
|
||||
entity.type = GLModel::PrimitiveType::LineLoop;
|
||||
entity.positions.reserve(4);
|
||||
entity.positions.emplace_back(left, bottom, 0.0f);
|
||||
entity.positions.emplace_back(right, bottom, 0.0f);
|
||||
entity.positions.emplace_back(right, top, 0.0f);
|
||||
entity.positions.emplace_back(left, top, 0.0f);
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::LineLoop, GLModel::Geometry::EVertexLayout::P2, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.vertices.reserve(4 * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(4 * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
entity.normals.reserve(4);
|
||||
for (size_t j = 0; j < 5; ++j) {
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
}
|
||||
// vertices
|
||||
init_data.add_vertex(Vec2f(left, bottom));
|
||||
init_data.add_vertex(Vec2f(right, bottom));
|
||||
init_data.add_vertex(Vec2f(right, top));
|
||||
init_data.add_vertex(Vec2f(left, top));
|
||||
|
||||
entity.indices.reserve(6);
|
||||
entity.indices.emplace_back(0);
|
||||
entity.indices.emplace_back(1);
|
||||
entity.indices.emplace_back(2);
|
||||
entity.indices.emplace_back(2);
|
||||
entity.indices.emplace_back(3);
|
||||
entity.indices.emplace_back(0);
|
||||
// indices
|
||||
init_data.add_ushort_index(0);
|
||||
init_data.add_ushort_index(1);
|
||||
init_data.add_ushort_index(2);
|
||||
init_data.add_ushort_index(3);
|
||||
|
||||
init_data.entities.emplace_back(entity);
|
||||
m_rectangle.init_from(init_data);
|
||||
m_rectangle.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
ColorRGBA color(
|
||||
const ColorRGBA color(
|
||||
(m_state == Select) ? 0.3f : 1.0f,
|
||||
(m_state == Select) ? 1.0f : 0.3f,
|
||||
0.3f, 1.0f);
|
||||
m_rectangle.set_color(-1, color);
|
||||
m_rectangle.set_color(color);
|
||||
m_rectangle.render();
|
||||
shader->stop_using();
|
||||
}
|
||||
|
||||
@ -33,11 +33,7 @@ public:
|
||||
// Disables the rectangle.
|
||||
void stop_dragging();
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void render(const GLCanvas3D& canvas);
|
||||
#else
|
||||
void render(const GLCanvas3D& canvas) const;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
bool is_dragging() const { return m_state != Off; }
|
||||
EState get_state() const { return m_state; }
|
||||
|
||||
@ -34,9 +34,12 @@ std::pair<bool, std::string> GLShadersManager::init()
|
||||
bool valid = true;
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
// basic shader, used to render selection bbox, gizmo cut plane and grabbers connections,
|
||||
// gizmo move grabbers connections, gizmo scale grabbers connections
|
||||
// basic shader, used to render all what was previously rendered using the immediate mode
|
||||
valid &= append_shader("flat", { "flat.vs", "flat.fs" });
|
||||
// basic shader for textures, used to render textures
|
||||
valid &= append_shader("flat_texture", { "flat_texture.vs", "flat_texture.fs" });
|
||||
// used to render 3D scene background
|
||||
valid &= append_shader("background", { "background.vs", "background.fs" });
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
// used to render bed axes and model, selection hints, gcode sequential view marker model, preview shells, options in gcode preview
|
||||
valid &= append_shader("gouraud_light", { "gouraud_light.vs", "gouraud_light.fs" });
|
||||
|
||||
@ -3,6 +3,10 @@
|
||||
|
||||
#include "3DScene.hpp"
|
||||
#include "OpenGLManager.hpp"
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
#include "GUI_App.hpp"
|
||||
#include "GLModel.hpp"
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
#include <GL/glew.h>
|
||||
|
||||
@ -120,11 +124,7 @@ void GLTexture::Compressor::compress()
|
||||
GLTexture::Quad_UVs GLTexture::FullTextureUVs = { { 0.0f, 1.0f }, { 1.0f, 1.0f }, { 1.0f, 0.0f }, { 0.0f, 0.0f } };
|
||||
|
||||
GLTexture::GLTexture()
|
||||
: m_id(0)
|
||||
, m_width(0)
|
||||
, m_height(0)
|
||||
, m_source("")
|
||||
, m_compressor(*this)
|
||||
: m_compressor(*this)
|
||||
{
|
||||
}
|
||||
|
||||
@ -339,12 +339,39 @@ void GLTexture::render_sub_texture(unsigned int tex_id, float left, float right,
|
||||
|
||||
glsafe(::glBindTexture(GL_TEXTURE_2D, (GLuint)tex_id));
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::Triangles, GLModel::Geometry::EVertexLayout::P2T2, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.vertices.reserve(4 * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(6 * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
// vertices
|
||||
init_data.add_vertex(Vec2f(left, bottom), Vec2f(uvs.left_bottom.u, uvs.left_bottom.v));
|
||||
init_data.add_vertex(Vec2f(right, bottom), Vec2f(uvs.right_bottom.u, uvs.right_bottom.v));
|
||||
init_data.add_vertex(Vec2f(right, top), Vec2f(uvs.right_top.u, uvs.right_top.v));
|
||||
init_data.add_vertex(Vec2f(left, top), Vec2f(uvs.left_top.u, uvs.left_top.v));
|
||||
|
||||
// indices
|
||||
init_data.add_ushort_triangle(0, 1, 2);
|
||||
init_data.add_ushort_triangle(2, 3, 0);
|
||||
|
||||
GLModel model;
|
||||
model.init_from(std::move(init_data));
|
||||
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("flat_texture");
|
||||
if (shader != nullptr) {
|
||||
shader->start_using();
|
||||
model.render();
|
||||
shader->stop_using();
|
||||
}
|
||||
#else
|
||||
::glBegin(GL_QUADS);
|
||||
::glTexCoord2f(uvs.left_bottom.u, uvs.left_bottom.v); ::glVertex2f(left, bottom);
|
||||
::glTexCoord2f(uvs.right_bottom.u, uvs.right_bottom.v); ::glVertex2f(right, bottom);
|
||||
::glTexCoord2f(uvs.right_top.u, uvs.right_top.v); ::glVertex2f(right, top);
|
||||
::glTexCoord2f(uvs.left_top.u, uvs.left_top.v); ::glVertex2f(left, top);
|
||||
glsafe(::glEnd());
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
glsafe(::glBindTexture(GL_TEXTURE_2D, 0));
|
||||
|
||||
|
||||
@ -64,8 +64,8 @@ namespace GUI {
|
||||
|
||||
struct UV
|
||||
{
|
||||
float u;
|
||||
float v;
|
||||
float u{ 0.0f };
|
||||
float v{ 0.0f };
|
||||
};
|
||||
|
||||
struct Quad_UVs
|
||||
@ -79,9 +79,9 @@ namespace GUI {
|
||||
static Quad_UVs FullTextureUVs;
|
||||
|
||||
protected:
|
||||
unsigned int m_id;
|
||||
int m_width;
|
||||
int m_height;
|
||||
unsigned int m_id{ 0 };
|
||||
int m_width{ 0 };
|
||||
int m_height{ 0 };
|
||||
std::string m_source;
|
||||
Compressor m_compressor;
|
||||
|
||||
|
||||
@ -770,7 +770,9 @@ void GUI_App::post_init()
|
||||
// This is ugly but I honestly found no better way to do it.
|
||||
// Neither wxShowEvent nor wxWindowCreateEvent work reliably.
|
||||
if (this->preset_updater) { // G-Code Viewer does not initialize preset_updater.
|
||||
this->check_updates(false);
|
||||
if (! this->check_updates(false))
|
||||
// Configuration is not compatible and reconfigure was refused by the user. Application is closing.
|
||||
return;
|
||||
CallAfter([this] {
|
||||
bool cw_showed = this->config_wizard_startup();
|
||||
this->preset_updater->sync(preset_bundle);
|
||||
@ -789,6 +791,10 @@ void GUI_App::post_init()
|
||||
});
|
||||
}
|
||||
|
||||
// Set PrusaSlicer version and save to PrusaSlicer.ini or PrusaSlicerGcodeViewer.ini.
|
||||
app_config->set("version", SLIC3R_VERSION);
|
||||
app_config->save();
|
||||
|
||||
#ifdef _WIN32
|
||||
// Sets window property to mainframe so other instances can indentify it.
|
||||
OtherInstanceMessageHandler::init_windows_properties(mainframe, m_instance_hash_int);
|
||||
@ -1033,6 +1039,8 @@ bool GUI_App::OnInit()
|
||||
}
|
||||
}
|
||||
|
||||
static bool update_gui_after_init = true;
|
||||
|
||||
bool GUI_App::on_init_inner()
|
||||
{
|
||||
// Set initialization of image handlers before any UI actions - See GH issue #7469
|
||||
@ -1178,12 +1186,10 @@ bool GUI_App::on_init_inner()
|
||||
// supplied as argument to --datadir; in that case we should still run the wizard
|
||||
preset_bundle->setup_directories();
|
||||
|
||||
if (! older_data_dir_path.empty())
|
||||
if (! older_data_dir_path.empty()) {
|
||||
preset_bundle->import_newer_configs(older_data_dir_path);
|
||||
|
||||
// Save PrusaSlicer.ini after possibly copying the config from the alternate location and after all the configs from the alternate location were copied.
|
||||
app_config->set("version", SLIC3R_VERSION);
|
||||
app_config->save();
|
||||
app_config->save();
|
||||
}
|
||||
|
||||
if (is_editor()) {
|
||||
#ifdef __WXMSW__
|
||||
@ -1299,13 +1305,8 @@ bool GUI_App::on_init_inner()
|
||||
if (! plater_)
|
||||
return;
|
||||
|
||||
if (app_config->dirty() && app_config->get("autosave") == "1")
|
||||
app_config->save();
|
||||
|
||||
this->obj_manipul()->update_if_dirty();
|
||||
|
||||
static bool update_gui_after_init = true;
|
||||
|
||||
// An ugly solution to GH #5537 in which GUI_App::init_opengl (normally called from events wxEVT_PAINT
|
||||
// and wxEVT_SET_FOCUS before GUI_App::post_init is called) wasn't called before GUI_App::post_init and OpenGL wasn't initialized.
|
||||
#ifdef __linux__
|
||||
@ -1319,6 +1320,9 @@ bool GUI_App::on_init_inner()
|
||||
#endif
|
||||
this->post_init();
|
||||
}
|
||||
|
||||
if (! update_gui_after_init && app_config->dirty() && app_config->get("autosave") == "1")
|
||||
app_config->save();
|
||||
});
|
||||
|
||||
m_initialized = true;
|
||||
@ -1349,6 +1353,7 @@ bool GUI_App::on_init_inner()
|
||||
app_config->set("restore_win_position", "0");
|
||||
else if (answer == wxID_NO)
|
||||
app_config->set("restore_win_position", "1");
|
||||
app_config->save();
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -1403,6 +1408,7 @@ void GUI_App::init_label_colours()
|
||||
m_color_highlight_label_default = is_dark_mode ? wxColour(230, 230, 230): wxSystemSettings::GetColour(/*wxSYS_COLOUR_HIGHLIGHTTEXT*/wxSYS_COLOUR_WINDOWTEXT);
|
||||
m_color_highlight_default = is_dark_mode ? wxColour(78, 78, 78) : wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT);
|
||||
m_color_hovered_btn_label = is_dark_mode ? wxColour(253, 111, 40) : wxColour(252, 77, 1);
|
||||
m_color_default_btn_label = is_dark_mode ? wxColour(255, 181, 100): wxColour(203, 61, 0);
|
||||
m_color_selected_btn_bg = is_dark_mode ? wxColour(95, 73, 62) : wxColour(228, 220, 216);
|
||||
#else
|
||||
m_color_label_default = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
|
||||
@ -1437,12 +1443,22 @@ static bool is_focused(HWND hWnd)
|
||||
HWND hFocusedWnd = ::GetFocus();
|
||||
return hFocusedWnd && hWnd == hFocusedWnd;
|
||||
}
|
||||
|
||||
static bool is_default(wxWindow* win)
|
||||
{
|
||||
wxTopLevelWindow* tlw = find_toplevel_parent(win);
|
||||
if (!tlw)
|
||||
return false;
|
||||
|
||||
return win == tlw->GetDefaultItem();
|
||||
}
|
||||
#endif
|
||||
|
||||
void GUI_App::UpdateDarkUI(wxWindow* window, bool highlited/* = false*/, bool just_font/* = false*/)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
bool is_focused_button = false;
|
||||
bool is_default_button = false;
|
||||
if (wxButton* btn = dynamic_cast<wxButton*>(window)) {
|
||||
if (!(btn->GetWindowStyle() & wxNO_BORDER)) {
|
||||
btn->SetWindowStyle(btn->GetWindowStyle() | wxNO_BORDER);
|
||||
@ -1454,7 +1470,7 @@ void GUI_App::UpdateDarkUI(wxWindow* window, bool highlited/* = false*/, bool ju
|
||||
if (btn->GetLabel().IsEmpty())
|
||||
btn->SetBackgroundColour(mark ? m_color_selected_btn_bg : highlited ? m_color_highlight_default : m_color_window_default);
|
||||
else
|
||||
btn->SetForegroundColour(mark ? m_color_hovered_btn_label : m_color_label_default);
|
||||
btn->SetForegroundColour(mark ? m_color_hovered_btn_label : (is_default(btn) ? m_color_default_btn_label : m_color_label_default));
|
||||
btn->Refresh();
|
||||
btn->Update();
|
||||
};
|
||||
@ -1466,8 +1482,10 @@ void GUI_App::UpdateDarkUI(wxWindow* window, bool highlited/* = false*/, bool ju
|
||||
btn->Bind(wxEVT_SET_FOCUS, [mark_button](wxFocusEvent& event) { mark_button(true); event.Skip(); });
|
||||
btn->Bind(wxEVT_KILL_FOCUS, [mark_button](wxFocusEvent& event) { mark_button(false); event.Skip(); });
|
||||
|
||||
if (is_focused_button = is_focused(btn->GetHWND()))
|
||||
mark_button(true);
|
||||
is_focused_button = is_focused(btn->GetHWND());
|
||||
is_default_button = is_default(btn);
|
||||
if (is_focused_button || is_default_button)
|
||||
mark_button(is_focused_button);
|
||||
}
|
||||
}
|
||||
else if (wxTextCtrl* text = dynamic_cast<wxTextCtrl*>(window)) {
|
||||
@ -1489,7 +1507,7 @@ void GUI_App::UpdateDarkUI(wxWindow* window, bool highlited/* = false*/, bool ju
|
||||
|
||||
if (!just_font)
|
||||
window->SetBackgroundColour(highlited ? m_color_highlight_default : m_color_window_default);
|
||||
if (!is_focused_button)
|
||||
if (!is_focused_button && !is_default_button)
|
||||
window->SetForegroundColour(m_color_label_default);
|
||||
#endif
|
||||
}
|
||||
@ -2958,6 +2976,7 @@ void GUI_App::window_pos_restore(wxTopLevelWindow* window, const std::string &na
|
||||
|
||||
// revert "restore_win_position" value if application wasn't crashed
|
||||
app_config->set("restore_win_position", "1");
|
||||
app_config->save();
|
||||
}
|
||||
else
|
||||
window->CenterOnScreen();
|
||||
@ -3001,13 +3020,15 @@ bool GUI_App::config_wizard_startup()
|
||||
return false;
|
||||
}
|
||||
|
||||
void GUI_App::check_updates(const bool verbose)
|
||||
bool GUI_App::check_updates(const bool verbose)
|
||||
{
|
||||
PresetUpdater::UpdateResult updater_result;
|
||||
try {
|
||||
updater_result = preset_updater->config_update(app_config->orig_version(), verbose ? PresetUpdater::UpdateParams::SHOW_TEXT_BOX : PresetUpdater::UpdateParams::SHOW_NOTIFICATION);
|
||||
if (updater_result == PresetUpdater::R_INCOMPAT_EXIT) {
|
||||
mainframe->Close();
|
||||
// Applicaiton is closing.
|
||||
return false;
|
||||
}
|
||||
else if (updater_result == PresetUpdater::R_INCOMPAT_CONFIGURED) {
|
||||
m_app_conf_exists = true;
|
||||
@ -3020,6 +3041,8 @@ void GUI_App::check_updates(const bool verbose)
|
||||
catch (const std::exception & ex) {
|
||||
show_error(nullptr, ex.what());
|
||||
}
|
||||
// Applicaiton will continue.
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GUI_App::open_browser_with_warning_dialog(const wxString& url, wxWindow* parent/* = nullptr*/, bool force_remember_choice /*= true*/, int flags/* = 0*/)
|
||||
|
||||
@ -124,6 +124,7 @@ private:
|
||||
#ifdef _WIN32
|
||||
wxColour m_color_highlight_label_default;
|
||||
wxColour m_color_hovered_btn_label;
|
||||
wxColour m_color_default_btn_label;
|
||||
wxColour m_color_highlight_default;
|
||||
wxColour m_color_selected_btn_bg;
|
||||
bool m_force_colors_update { false };
|
||||
@ -352,7 +353,9 @@ private:
|
||||
bool select_language();
|
||||
|
||||
bool config_wizard_startup();
|
||||
void check_updates(const bool verbose);
|
||||
// Returns true if the configuration is fine.
|
||||
// Returns true if the configuration is not compatible and the user decided to rather close the slicer instead of reconfiguring.
|
||||
bool check_updates(const bool verbose);
|
||||
|
||||
bool m_datadir_redefined { false };
|
||||
};
|
||||
|
||||
@ -239,6 +239,7 @@ ObjectList::ObjectList(wxWindow* parent) :
|
||||
|
||||
ObjectList::~ObjectList()
|
||||
{
|
||||
delete m_objects_model;
|
||||
}
|
||||
|
||||
void ObjectList::set_min_height()
|
||||
|
||||
@ -191,7 +191,7 @@ private:
|
||||
|
||||
public:
|
||||
ObjectList(wxWindow* parent);
|
||||
~ObjectList();
|
||||
~ObjectList() override;
|
||||
|
||||
void set_min_height();
|
||||
void update_min_height();
|
||||
|
||||
@ -14,22 +14,9 @@ const float GLGizmoBase::Grabber::SizeFactor = 0.05f;
|
||||
const float GLGizmoBase::Grabber::MinHalfSize = 1.5f;
|
||||
const float GLGizmoBase::Grabber::DraggingScaleFactor = 1.25f;
|
||||
|
||||
GLGizmoBase::Grabber::Grabber()
|
||||
: center(Vec3d::Zero())
|
||||
, angles(Vec3d::Zero())
|
||||
, dragging(false)
|
||||
, enabled(true)
|
||||
void GLGizmoBase::Grabber::render(bool hover, float size)
|
||||
{
|
||||
color = { 1.0f, 1.0f, 1.0f, 1.0f };
|
||||
}
|
||||
|
||||
void GLGizmoBase::Grabber::render(bool hover, float size) const
|
||||
{
|
||||
ColorRGBA render_color = color;
|
||||
if (hover)
|
||||
render_color = complementary(render_color);
|
||||
|
||||
render(size, render_color, false);
|
||||
render(size, hover ? complementary(color) : color, false);
|
||||
}
|
||||
|
||||
float GLGizmoBase::Grabber::get_half_size(float size) const
|
||||
@ -42,19 +29,27 @@ float GLGizmoBase::Grabber::get_dragging_half_size(float size) const
|
||||
return get_half_size(size) * DraggingScaleFactor;
|
||||
}
|
||||
|
||||
void GLGizmoBase::Grabber::render(float size, const ColorRGBA& render_color, bool picking) const
|
||||
void GLGizmoBase::Grabber::render(float size, const ColorRGBA& render_color, bool picking)
|
||||
{
|
||||
if (!cube.is_initialized()) {
|
||||
if (!m_cube.is_initialized()) {
|
||||
// This cannot be done in constructor, OpenGL is not yet
|
||||
// initialized at that point (on Linux at least).
|
||||
indexed_triangle_set mesh = its_make_cube(1., 1., 1.);
|
||||
its_translate(mesh, Vec3f(-0.5, -0.5, -0.5));
|
||||
const_cast<GLModel&>(cube).init_from(mesh, BoundingBoxf3{ { -0.5, -0.5, -0.5 }, { 0.5, 0.5, 0.5 } });
|
||||
indexed_triangle_set its = its_make_cube(1., 1., 1.);
|
||||
its_translate(its, Vec3f(-0.5, -0.5, -0.5));
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_cube.init_from(its);
|
||||
#else
|
||||
m_cube.init_from(its, BoundingBoxf3{ { -0.5, -0.5, -0.5 }, { 0.5, 0.5, 0.5 } });
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
}
|
||||
|
||||
float fullsize = 2 * (dragging ? get_dragging_half_size(size) : get_half_size(size));
|
||||
const float fullsize = 2.0f * (dragging ? get_dragging_half_size(size) : get_half_size(size));
|
||||
|
||||
const_cast<GLModel*>(&cube)->set_color(-1, render_color);
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_cube.set_color(render_color);
|
||||
#else
|
||||
m_cube.set_color(-1, render_color);
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
glsafe(::glPushMatrix());
|
||||
glsafe(::glTranslated(center.x(), center.y(), center.z()));
|
||||
@ -62,11 +57,10 @@ void GLGizmoBase::Grabber::render(float size, const ColorRGBA& render_color, boo
|
||||
glsafe(::glRotated(Geometry::rad2deg(angles.y()), 0.0, 1.0, 0.0));
|
||||
glsafe(::glRotated(Geometry::rad2deg(angles.x()), 1.0, 0.0, 0.0));
|
||||
glsafe(::glScaled(fullsize, fullsize, fullsize));
|
||||
cube.render();
|
||||
m_cube.render();
|
||||
glsafe(::glPopMatrix());
|
||||
}
|
||||
|
||||
|
||||
GLGizmoBase::GLGizmoBase(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id)
|
||||
: m_parent(parent)
|
||||
, m_group_id(-1)
|
||||
@ -176,14 +170,23 @@ void GLGizmoBase::render_grabbers(float size) const
|
||||
|
||||
void GLGizmoBase::render_grabbers_for_picking(const BoundingBoxf3& box) const
|
||||
{
|
||||
float mean_size = (float)((box.size().x() + box.size().y() + box.size().z()) / 3.0);
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("flat");
|
||||
if (shader != nullptr) {
|
||||
shader->start_using();
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
const float mean_size = float((box.size().x() + box.size().y() + box.size().z()) / 3.0);
|
||||
|
||||
for (unsigned int i = 0; i < (unsigned int)m_grabbers.size(); ++i) {
|
||||
if (m_grabbers[i].enabled) {
|
||||
m_grabbers[i].color = picking_color_component(i);
|
||||
m_grabbers[i].render_for_picking(mean_size);
|
||||
for (unsigned int i = 0; i < (unsigned int)m_grabbers.size(); ++i) {
|
||||
if (m_grabbers[i].enabled) {
|
||||
m_grabbers[i].color = picking_color_component(i);
|
||||
m_grabbers[i].render_for_picking(mean_size);
|
||||
}
|
||||
}
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
shader->stop_using();
|
||||
}
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
}
|
||||
|
||||
std::string GLGizmoBase::format(float value, unsigned int decimals) const
|
||||
|
||||
@ -45,24 +45,24 @@ protected:
|
||||
static const float MinHalfSize;
|
||||
static const float DraggingScaleFactor;
|
||||
|
||||
Vec3d center;
|
||||
Vec3d angles;
|
||||
ColorRGBA color;
|
||||
bool enabled;
|
||||
bool dragging;
|
||||
bool enabled{ true };
|
||||
bool dragging{ false };
|
||||
Vec3d center{ Vec3d::Zero() };
|
||||
Vec3d angles{ Vec3d::Zero() };
|
||||
ColorRGBA color{ ColorRGBA::WHITE() };
|
||||
|
||||
Grabber();
|
||||
Grabber() = default;
|
||||
|
||||
void render(bool hover, float size) const;
|
||||
void render_for_picking(float size) const { render(size, color, true); }
|
||||
void render(bool hover, float size);
|
||||
void render_for_picking(float size) { render(size, color, true); }
|
||||
|
||||
float get_half_size(float size) const;
|
||||
float get_dragging_half_size(float size) const;
|
||||
|
||||
private:
|
||||
void render(float size, const ColorRGBA& render_color, bool picking) const;
|
||||
void render(float size, const ColorRGBA& render_color, bool picking);
|
||||
|
||||
GLModel cube;
|
||||
GLModel m_cube;
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
@ -24,7 +24,6 @@ namespace GUI {
|
||||
const double GLGizmoCut::Offset = 10.0;
|
||||
const double GLGizmoCut::Margin = 20.0;
|
||||
static const ColorRGBA GRABBER_COLOR = ColorRGBA::ORANGE();
|
||||
static const ColorRGBA PLANE_COLOR = { 0.8f, 0.8f, 0.8f, 0.5f };
|
||||
|
||||
GLGizmoCut::GLGizmoCut(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id)
|
||||
: GLGizmoBase(parent, icon_filename, sprite_id)
|
||||
@ -104,48 +103,39 @@ void GLGizmoCut::on_render()
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("flat");
|
||||
if (shader == nullptr)
|
||||
return;
|
||||
shader->start_using();
|
||||
if (shader != nullptr) {
|
||||
shader->start_using();
|
||||
|
||||
bool z_changed = std::abs(plane_center.z() - m_old_z) > EPSILON;
|
||||
m_old_z = plane_center.z();
|
||||
const bool z_changed = std::abs(plane_center.z() - m_old_z) > EPSILON;
|
||||
m_old_z = plane_center.z();
|
||||
|
||||
if (!m_plane.is_initialized() || z_changed) {
|
||||
m_plane.reset();
|
||||
if (!m_plane.is_initialized() || z_changed) {
|
||||
m_plane.reset();
|
||||
|
||||
GLModel::InitializationData init_data;
|
||||
GLModel::InitializationData::Entity entity;
|
||||
entity.type = GLModel::PrimitiveType::Triangles;
|
||||
entity.positions.reserve(4);
|
||||
entity.positions.emplace_back(Vec3f(min_x, min_y, plane_center.z()));
|
||||
entity.positions.emplace_back(Vec3f(max_x, min_y, plane_center.z()));
|
||||
entity.positions.emplace_back(Vec3f(max_x, max_y, plane_center.z()));
|
||||
entity.positions.emplace_back(Vec3f(min_x, max_y, plane_center.z()));
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::Triangles, GLModel::Geometry::EVertexLayout::P3, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.color = { 0.8f, 0.8f, 0.8f, 0.5f };
|
||||
init_data.vertices.reserve(4 * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(6 * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
entity.normals.reserve(4);
|
||||
for (size_t i = 0; i < 4; ++i) {
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
// vertices
|
||||
init_data.add_vertex(Vec3f(min_x, min_y, plane_center.z()));
|
||||
init_data.add_vertex(Vec3f(max_x, min_y, plane_center.z()));
|
||||
init_data.add_vertex(Vec3f(max_x, max_y, plane_center.z()));
|
||||
init_data.add_vertex(Vec3f(min_x, max_y, plane_center.z()));
|
||||
|
||||
// indices
|
||||
init_data.add_ushort_triangle(0, 1, 2);
|
||||
init_data.add_ushort_triangle(2, 3, 0);
|
||||
|
||||
m_plane.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
entity.indices.reserve(6);
|
||||
entity.indices.emplace_back(0);
|
||||
entity.indices.emplace_back(1);
|
||||
entity.indices.emplace_back(2);
|
||||
entity.indices.emplace_back(2);
|
||||
entity.indices.emplace_back(3);
|
||||
entity.indices.emplace_back(0);
|
||||
|
||||
init_data.entities.emplace_back(entity);
|
||||
m_plane.init_from(init_data);
|
||||
m_plane.set_color(-1, PLANE_COLOR);
|
||||
}
|
||||
|
||||
m_plane.render();
|
||||
m_plane.render();
|
||||
#else
|
||||
// Draw the cutting plane
|
||||
::glBegin(GL_QUADS);
|
||||
::glColor4fv(PLANE_COLOR.data());
|
||||
::glColor4f(0.8f, 0.8f, 0.8f, 0.5f);
|
||||
::glVertex3f(min_x, min_y, plane_center.z());
|
||||
::glVertex3f(max_x, min_y, plane_center.z());
|
||||
::glVertex3f(max_x, max_y, plane_center.z());
|
||||
@ -153,47 +143,41 @@ void GLGizmoCut::on_render()
|
||||
glsafe(::glEnd());
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
glsafe(::glEnable(GL_CULL_FACE));
|
||||
glsafe(::glDisable(GL_BLEND));
|
||||
glsafe(::glEnable(GL_CULL_FACE));
|
||||
glsafe(::glDisable(GL_BLEND));
|
||||
|
||||
// TODO: draw cut part contour?
|
||||
// Draw the grabber and the connecting line
|
||||
m_grabbers[0].center = plane_center;
|
||||
m_grabbers[0].center.z() = plane_center.z() + Offset;
|
||||
|
||||
// Draw the grabber and the connecting line
|
||||
m_grabbers[0].center = plane_center;
|
||||
m_grabbers[0].center.z() = plane_center.z() + Offset;
|
||||
glsafe(::glClear(GL_DEPTH_BUFFER_BIT));
|
||||
|
||||
glsafe(::glClear(GL_DEPTH_BUFFER_BIT));
|
||||
|
||||
glsafe(::glLineWidth(m_hover_id != -1 ? 2.0f : 1.5f));
|
||||
glsafe(::glLineWidth(m_hover_id != -1 ? 2.0f : 1.5f));
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
if (!m_grabber_connection.is_initialized() || z_changed) {
|
||||
m_grabber_connection.reset();
|
||||
if (!m_grabber_connection.is_initialized() || z_changed) {
|
||||
m_grabber_connection.reset();
|
||||
|
||||
GLModel::InitializationData init_data;
|
||||
GLModel::InitializationData::Entity entity;
|
||||
entity.type = GLModel::PrimitiveType::Lines;
|
||||
entity.positions.reserve(2);
|
||||
entity.positions.emplace_back(plane_center.cast<float>());
|
||||
entity.positions.emplace_back(m_grabbers[0].center.cast<float>());
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::Lines, GLModel::Geometry::EVertexLayout::P3, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.color = ColorRGBA::YELLOW();
|
||||
init_data.vertices.reserve(2 * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(2 * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
entity.normals.reserve(2);
|
||||
for (size_t i = 0; i < 2; ++i) {
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
// vertices
|
||||
init_data.add_vertex((Vec3f)plane_center.cast<float>());
|
||||
init_data.add_vertex((Vec3f)m_grabbers[0].center.cast<float>());
|
||||
|
||||
// indices
|
||||
init_data.add_ushort_line(0, 1);
|
||||
|
||||
m_grabber_connection.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
entity.indices.reserve(2);
|
||||
entity.indices.emplace_back(0);
|
||||
entity.indices.emplace_back(1);
|
||||
m_grabber_connection.render();
|
||||
|
||||
init_data.entities.emplace_back(entity);
|
||||
m_grabber_connection.init_from(init_data);
|
||||
m_grabber_connection.set_color(-1, ColorRGBA::YELLOW());
|
||||
shader->stop_using();
|
||||
}
|
||||
|
||||
m_grabber_connection.render();
|
||||
|
||||
shader->stop_using();
|
||||
|
||||
shader = wxGetApp().get_shader("gouraud_light");
|
||||
#else
|
||||
glsafe(::glColor3f(1.0, 1.0, 0.0));
|
||||
@ -204,23 +188,31 @@ void GLGizmoCut::on_render()
|
||||
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("gouraud_light");
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
if (shader != nullptr) {
|
||||
shader->start_using();
|
||||
shader->set_uniform("emission_factor", 0.1f);
|
||||
|
||||
if (shader == nullptr)
|
||||
return;
|
||||
shader->start_using();
|
||||
shader->set_uniform("emission_factor", 0.1f);
|
||||
m_grabbers[0].color = GRABBER_COLOR;
|
||||
m_grabbers[0].render(m_hover_id == 0, float((box.size().x() + box.size().y() + box.size().z()) / 3.0));
|
||||
|
||||
m_grabbers[0].color = GRABBER_COLOR;
|
||||
m_grabbers[0].render(m_hover_id == 0, (float)((box.size().x() + box.size().y() + box.size().z()) / 3.0));
|
||||
shader->stop_using();
|
||||
}
|
||||
|
||||
shader->stop_using();
|
||||
|
||||
glsafe(::glPushMatrix());
|
||||
glsafe(::glTranslated(m_cut_contours.shift.x(), m_cut_contours.shift.y(), m_cut_contours.shift.z()));
|
||||
glsafe(::glLineWidth(2.0f));
|
||||
m_cut_contours.contours.render();
|
||||
glsafe(::glPopMatrix());
|
||||
}
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
shader = wxGetApp().get_shader("flat");
|
||||
if (shader != nullptr) {
|
||||
shader->start_using();
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
glsafe(::glPushMatrix());
|
||||
glsafe(::glTranslated(m_cut_contours.shift.x(), m_cut_contours.shift.y(), m_cut_contours.shift.z()));
|
||||
glsafe(::glLineWidth(2.0f));
|
||||
m_cut_contours.contours.render();
|
||||
glsafe(::glPopMatrix());
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
shader->stop_using();
|
||||
}
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
}
|
||||
|
||||
void GLGizmoCut::on_render_for_picking()
|
||||
{
|
||||
@ -353,18 +345,24 @@ void GLGizmoCut::update_contours()
|
||||
|
||||
const ModelObject* model_object = wxGetApp().model().objects[selection.get_object_idx()];
|
||||
const int instance_idx = selection.get_instance_idx();
|
||||
std::vector<ObjectID> volumes_idxs = std::vector<ObjectID>(model_object->volumes.size());
|
||||
for (size_t i = 0; i < model_object->volumes.size(); ++i) {
|
||||
volumes_idxs[i] = model_object->volumes[i]->id();
|
||||
}
|
||||
|
||||
if (0.0 < m_cut_z && m_cut_z < m_max_z) {
|
||||
if (m_cut_contours.cut_z != m_cut_z || m_cut_contours.object_id != model_object->id() || m_cut_contours.instance_idx != instance_idx) {
|
||||
if (m_cut_contours.cut_z != m_cut_z || m_cut_contours.object_id != model_object->id() ||
|
||||
m_cut_contours.instance_idx != instance_idx || m_cut_contours.volumes_idxs != volumes_idxs) {
|
||||
m_cut_contours.cut_z = m_cut_z;
|
||||
|
||||
if (m_cut_contours.object_id != model_object->id())
|
||||
if (m_cut_contours.object_id != model_object->id() || m_cut_contours.volumes_idxs != volumes_idxs)
|
||||
m_cut_contours.mesh = model_object->raw_mesh();
|
||||
|
||||
m_cut_contours.position = box.center();
|
||||
m_cut_contours.shift = Vec3d::Zero();
|
||||
m_cut_contours.object_id = model_object->id();
|
||||
m_cut_contours.instance_idx = instance_idx;
|
||||
m_cut_contours.volumes_idxs = volumes_idxs;
|
||||
m_cut_contours.contours.reset();
|
||||
|
||||
MeshSlicingParams slicing_params;
|
||||
@ -372,7 +370,11 @@ void GLGizmoCut::update_contours()
|
||||
const Polygons polys = slice_mesh(m_cut_contours.mesh.its, m_cut_z, slicing_params);
|
||||
if (!polys.empty()) {
|
||||
m_cut_contours.contours.init_from(polys, static_cast<float>(m_cut_z));
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_cut_contours.contours.set_color(ColorRGBA::WHITE());
|
||||
#else
|
||||
m_cut_contours.contours.set_color(-1, { 1.0f, 1.0f, 1.0f, 1.0f });
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
}
|
||||
}
|
||||
else if (box.center() != m_cut_contours.position) {
|
||||
|
||||
@ -37,6 +37,7 @@ class GLGizmoCut : public GLGizmoBase
|
||||
Vec3d shift{ Vec3d::Zero() };
|
||||
ObjectID object_id;
|
||||
int instance_idx{ -1 };
|
||||
std::vector<ObjectID> volumes_idxs;
|
||||
};
|
||||
|
||||
CutContours m_cut_contours;
|
||||
|
||||
@ -69,11 +69,7 @@ bool GLGizmoFdmSupports::on_init()
|
||||
return true;
|
||||
}
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void GLGizmoFdmSupports::render_painter_gizmo()
|
||||
#else
|
||||
void GLGizmoFdmSupports::render_painter_gizmo() const
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
{
|
||||
const Selection& selection = m_parent.get_selection();
|
||||
|
||||
|
||||
@ -11,11 +11,7 @@ public:
|
||||
GLGizmoFdmSupports(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id)
|
||||
: GLGizmoPainterBase(parent, icon_filename, sprite_id) {}
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void render_painter_gizmo() override;
|
||||
#else
|
||||
void render_painter_gizmo() const override;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
protected:
|
||||
void on_render_input_window(float x, float y, float bottom_limit) override;
|
||||
|
||||
@ -101,12 +101,21 @@ void GLGizmoHollow::on_render_for_picking()
|
||||
render_points(selection, true);
|
||||
}
|
||||
|
||||
void GLGizmoHollow::render_points(const Selection& selection, bool picking) const
|
||||
void GLGizmoHollow::render_points(const Selection& selection, bool picking)
|
||||
{
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
GLShaderProgram* shader = picking ? wxGetApp().get_shader("flat") : wxGetApp().get_shader("gouraud_light");
|
||||
if (shader == nullptr)
|
||||
return;
|
||||
|
||||
shader->start_using();
|
||||
ScopeGuard guard([shader]() { shader->stop_using(); });
|
||||
#else
|
||||
GLShaderProgram* shader = picking ? nullptr : wxGetApp().get_shader("gouraud_light");
|
||||
if (shader)
|
||||
shader->start_using();
|
||||
ScopeGuard guard([shader]() { if (shader) shader->stop_using(); });
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
const GLVolume* vol = selection.get_volume(*selection.get_volume_idxs().begin());
|
||||
const Transform3d& instance_scaling_matrix_inverse = vol->get_instance_transformation().get_matrix(true, true, false, true).inverse();
|
||||
@ -132,17 +141,21 @@ void GLGizmoHollow::render_points(const Selection& selection, bool picking) cons
|
||||
render_color = picking_color_component(i);
|
||||
else {
|
||||
if (size_t(m_hover_id) == i)
|
||||
render_color = {0.0f, 1.0f, 1.0f, 1.0f};
|
||||
render_color = ColorRGBA::CYAN();
|
||||
else if (m_c->hollowed_mesh() &&
|
||||
i < m_c->hollowed_mesh()->get_drainholes().size() &&
|
||||
m_c->hollowed_mesh()->get_drainholes()[i].failed) {
|
||||
render_color = {1.0f, 0.0f, 0.0f, 0.5f};
|
||||
render_color = { 1.0f, 0.0f, 0.0f, 0.5f };
|
||||
}
|
||||
else // neither hover nor picking
|
||||
render_color = point_selected ? ColorRGBA(1.0f, 0.3f, 0.3f, 0.5f) : ColorRGBA(1.0f, 1.0f, 1.0f, 0.5f);
|
||||
}
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_cylinder.set_color(render_color);
|
||||
#else
|
||||
const_cast<GLModel*>(&m_cylinder)->set_color(-1, render_color);
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
// Inverse matrix of the instance scaling is applied so that the mark does not scale with the object.
|
||||
glsafe(::glPushMatrix());
|
||||
@ -154,9 +167,9 @@ void GLGizmoHollow::render_points(const Selection& selection, bool picking) cons
|
||||
|
||||
// Matrices set, we can render the point mark now.
|
||||
Eigen::Quaterniond q;
|
||||
q.setFromTwoVectors(Vec3d{0., 0., 1.}, instance_scaling_matrix_inverse * (-drain_hole.normal).cast<double>());
|
||||
q.setFromTwoVectors(Vec3d::UnitZ(), instance_scaling_matrix_inverse * (-drain_hole.normal).cast<double>());
|
||||
Eigen::AngleAxisd aa(q);
|
||||
glsafe(::glRotated(aa.angle() * (180. / M_PI), aa.axis()(0), aa.axis()(1), aa.axis()(2)));
|
||||
glsafe(::glRotated(aa.angle() * (180. / M_PI), aa.axis().x(), aa.axis().y(), aa.axis().z()));
|
||||
glsafe(::glPushMatrix());
|
||||
glsafe(::glTranslated(0., 0., -drain_hole.height));
|
||||
glsafe(::glScaled(drain_hole.radius, drain_hole.radius, drain_hole.height + sla::HoleStickOutLength));
|
||||
@ -171,8 +184,6 @@ void GLGizmoHollow::render_points(const Selection& selection, bool picking) cons
|
||||
glsafe(::glPopMatrix());
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool GLGizmoHollow::is_mesh_point_clipped(const Vec3d& point) const
|
||||
{
|
||||
if (m_c->object_clipper()->get_position() == 0.)
|
||||
|
||||
@ -42,7 +42,7 @@ private:
|
||||
void on_render() override;
|
||||
void on_render_for_picking() override;
|
||||
|
||||
void render_points(const Selection& selection, bool picking = false) const;
|
||||
void render_points(const Selection& selection, bool picking = false);
|
||||
void hollow_mesh(bool postpone_error_messages = false);
|
||||
bool unsaved_changes() const;
|
||||
|
||||
|
||||
@ -130,11 +130,7 @@ bool GLGizmoMmuSegmentation::on_init()
|
||||
return true;
|
||||
}
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void GLGizmoMmuSegmentation::render_painter_gizmo()
|
||||
#else
|
||||
void GLGizmoMmuSegmentation::render_painter_gizmo() const
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
{
|
||||
const Selection& selection = m_parent.get_selection();
|
||||
|
||||
|
||||
@ -85,11 +85,7 @@ public:
|
||||
: GLGizmoPainterBase(parent, icon_filename, sprite_id) {}
|
||||
~GLGizmoMmuSegmentation() override = default;
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void render_painter_gizmo() override;
|
||||
#else
|
||||
void render_painter_gizmo() const override;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
void set_painter_gizmo_data(const Selection& selection) override;
|
||||
|
||||
|
||||
@ -114,25 +114,20 @@ void GLGizmoMove3D::on_render()
|
||||
m_grabber_connections[id].old_center = center;
|
||||
m_grabber_connections[id].model.reset();
|
||||
|
||||
GLModel::InitializationData init_data;
|
||||
GLModel::InitializationData::Entity entity;
|
||||
entity.type = GLModel::PrimitiveType::Lines;
|
||||
entity.positions.reserve(2);
|
||||
entity.positions.emplace_back(center.cast<float>());
|
||||
entity.positions.emplace_back(m_grabbers[id].center.cast<float>());
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::Lines, GLModel::Geometry::EVertexLayout::P3, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.color = AXES_COLOR[id];
|
||||
init_data.vertices.reserve(2 * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(2 * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
entity.normals.reserve(2);
|
||||
for (size_t j = 0; j < 2; ++j) {
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
}
|
||||
// vertices
|
||||
init_data.add_vertex((Vec3f)center.cast<float>());
|
||||
init_data.add_vertex((Vec3f)m_grabbers[id].center.cast<float>());
|
||||
|
||||
entity.indices.reserve(2);
|
||||
entity.indices.emplace_back(0);
|
||||
entity.indices.emplace_back(1);
|
||||
// indices
|
||||
init_data.add_ushort_line(0, 1);
|
||||
|
||||
init_data.entities.emplace_back(entity);
|
||||
m_grabber_connections[id].model.init_from(init_data);
|
||||
m_grabber_connections[id].model.set_color(-1, AXES_COLOR[id]);
|
||||
m_grabber_connections[id].model.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
m_grabber_connections[id].model.render();
|
||||
@ -243,24 +238,30 @@ double GLGizmoMove3D::calc_projection(const UpdateData& data) const
|
||||
return projection;
|
||||
}
|
||||
|
||||
void GLGizmoMove3D::render_grabber_extension(Axis axis, const BoundingBoxf3& box, bool picking) const
|
||||
void GLGizmoMove3D::render_grabber_extension(Axis axis, const BoundingBoxf3& box, bool picking)
|
||||
{
|
||||
float mean_size = (float)((box.size().x() + box.size().y() + box.size().z()) / 3.0);
|
||||
double size = m_dragging ? (double)m_grabbers[axis].get_dragging_half_size(mean_size) : (double)m_grabbers[axis].get_half_size(mean_size);
|
||||
|
||||
ColorRGBA color = m_grabbers[axis].color;
|
||||
if (!picking && m_hover_id != -1)
|
||||
color = complementary(color);
|
||||
float mean_size = float((box.size().x() + box.size().y() + box.size().z()) / 3.0);
|
||||
double size = m_dragging ? double(m_grabbers[axis].get_dragging_half_size(mean_size)) : double(m_grabbers[axis].get_half_size(mean_size));
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
GLShaderProgram* shader = wxGetApp().get_shader(picking ? "flat" : "gouraud_light");
|
||||
#else
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("gouraud_light");
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
if (shader == nullptr)
|
||||
return;
|
||||
|
||||
const_cast<GLModel*>(&m_cone)->set_color(-1, color);
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
m_cone.set_color((!picking && m_hover_id != -1) ? complementary(m_grabbers[axis].color) : m_grabbers[axis].color);
|
||||
shader->start_using();
|
||||
shader->set_uniform("emission_factor", 0.1f);
|
||||
#else
|
||||
m_cone.set_color(-1, (!picking && m_hover_id != -1) ? complementary(m_grabbers[axis].color) : m_grabbers[axis].color);
|
||||
if (!picking) {
|
||||
shader->start_using();
|
||||
shader->set_uniform("emission_factor", 0.1f);
|
||||
}
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
glsafe(::glPushMatrix());
|
||||
glsafe(::glTranslated(m_grabbers[axis].center.x(), m_grabbers[axis].center.y(), m_grabbers[axis].center.z()));
|
||||
@ -274,11 +275,11 @@ void GLGizmoMove3D::render_grabber_extension(Axis axis, const BoundingBoxf3& box
|
||||
m_cone.render();
|
||||
glsafe(::glPopMatrix());
|
||||
|
||||
#if !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
if (! picking)
|
||||
#endif // !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
shader->stop_using();
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace GUI
|
||||
} // namespace Slic3r
|
||||
|
||||
@ -50,7 +50,7 @@ protected:
|
||||
|
||||
private:
|
||||
double calc_projection(const UpdateData& data) const;
|
||||
void render_grabber_extension(Axis axis, const BoundingBoxf3& box, bool picking) const;
|
||||
void render_grabber_extension(Axis axis, const BoundingBoxf3& box, bool picking);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -113,11 +113,7 @@ void GLGizmoPainterBase::render_triangles(const Selection& selection) const
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void GLGizmoPainterBase::render_cursor()
|
||||
#else
|
||||
void GLGizmoPainterBase::render_cursor() const
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
{
|
||||
// First check that the mouse pointer is on an object.
|
||||
const ModelObject* mo = m_c->selection_info()->model_object();
|
||||
@ -144,11 +140,7 @@ void GLGizmoPainterBase::render_cursor() const
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void GLGizmoPainterBase::render_cursor_circle()
|
||||
#else
|
||||
void GLGizmoPainterBase::render_cursor_circle() const
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
{
|
||||
const Camera &camera = wxGetApp().plater()->get_camera();
|
||||
const float zoom = float(camera.get_zoom());
|
||||
@ -188,27 +180,30 @@ void GLGizmoPainterBase::render_cursor_circle() const
|
||||
m_old_cursor_radius = m_cursor_radius;
|
||||
m_circle.reset();
|
||||
|
||||
GLModel::InitializationData init_data;
|
||||
GLModel::InitializationData::Entity entity;
|
||||
entity.type = GLModel::PrimitiveType::LineLoop;
|
||||
GLModel::Geometry init_data;
|
||||
static const unsigned int StepsCount = 32;
|
||||
static const float StepSize = 2.0f * float(PI) / float(StepsCount);
|
||||
entity.positions.reserve(StepsCount);
|
||||
entity.normals.reserve(StepsCount);
|
||||
entity.indices.reserve(StepsCount);
|
||||
for (unsigned int i = 0; i < StepsCount; ++i) {
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::LineLoop, GLModel::Geometry::EVertexLayout::P3, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.color = { 0.0f, 1.0f, 0.3f, 1.0f };
|
||||
init_data.vertices.reserve(StepsCount * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(StepsCount * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
// vertices + indices
|
||||
for (unsigned short i = 0; i < StepsCount; ++i) {
|
||||
const float angle = float(i * StepSize);
|
||||
entity.positions.emplace_back(center.x() + ::cos(angle) * m_cursor_radius, center.y() + ::sin(angle) * m_cursor_radius, 0.0f);
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
entity.indices.emplace_back(i);
|
||||
init_data.add_vertex(Vec3f(center.x() + ::cos(angle) * m_cursor_radius, center.y() + ::sin(angle) * m_cursor_radius, 0.0f));
|
||||
init_data.add_ushort_index(i);
|
||||
}
|
||||
|
||||
init_data.entities.emplace_back(entity);
|
||||
m_circle.init_from(init_data);
|
||||
m_circle.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
m_circle.set_color(-1, { 0.0f, 1.0f, 0.3f, 1.0f });
|
||||
m_circle.render();
|
||||
GLShaderProgram* shader = GUI::wxGetApp().get_shader("flat");
|
||||
if (shader != nullptr) {
|
||||
shader->start_using();
|
||||
m_circle.render();
|
||||
shader->stop_using();
|
||||
}
|
||||
#else
|
||||
::glBegin(GL_LINE_LOOP);
|
||||
for (double angle=0; angle<2*M_PI; angle+=M_PI/20.)
|
||||
|
||||
@ -121,11 +121,7 @@ public:
|
||||
// from usual on_render method allows to render them before transparent
|
||||
// objects, so they can be seen inside them. The usual on_render is called
|
||||
// after all volumes (including transparent ones) are rendered.
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
virtual void render_painter_gizmo() = 0;
|
||||
#else
|
||||
virtual void render_painter_gizmo() const = 0;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
virtual const float get_cursor_radius_min() const { return CursorRadiusMin; }
|
||||
virtual const float get_cursor_radius_max() const { return CursorRadiusMax; }
|
||||
@ -133,13 +129,8 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void render_triangles(const Selection& selection) const;
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void render_cursor();
|
||||
void render_cursor_circle();
|
||||
#else
|
||||
void render_cursor() const;
|
||||
void render_cursor_circle() const;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void render_cursor_sphere(const Transform3d& trafo) const;
|
||||
virtual void update_model_object() const = 0;
|
||||
virtual void update_from_model_object() = 0;
|
||||
@ -236,7 +227,7 @@ private:
|
||||
Vec3f hit;
|
||||
size_t facet;
|
||||
};
|
||||
mutable RaycastResult m_rr;
|
||||
mutable RaycastResult m_rr = {Vec2d::Zero(), -1, Vec3f::Zero(), 0};
|
||||
|
||||
protected:
|
||||
void on_set_state() override;
|
||||
|
||||
@ -233,24 +233,22 @@ void GLGizmoRotate::render_circle() const
|
||||
if (!m_circle.is_initialized() || radius_changed) {
|
||||
m_circle.reset();
|
||||
|
||||
GLModel::InitializationData init_data;
|
||||
GLModel::InitializationData::Entity entity;
|
||||
entity.type = GLModel::PrimitiveType::LineLoop;
|
||||
entity.positions.reserve(ScaleStepsCount);
|
||||
entity.normals.reserve(ScaleStepsCount);
|
||||
entity.indices.reserve(ScaleStepsCount);
|
||||
for (unsigned int i = 0; i < ScaleStepsCount; ++i) {
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::LineLoop, GLModel::Geometry::EVertexLayout::P3, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.vertices.reserve(ScaleStepsCount * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(ScaleStepsCount * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
// vertices + indices
|
||||
for (unsigned short i = 0; i < ScaleStepsCount; ++i) {
|
||||
const float angle = float(i * ScaleStepRad);
|
||||
entity.positions.emplace_back(::cos(angle) * m_radius, ::sin(angle) * m_radius, 0.0f);
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
entity.indices.emplace_back(i);
|
||||
init_data.add_vertex(Vec3f(::cos(angle) * m_radius, ::sin(angle) * m_radius, 0.0f));
|
||||
init_data.add_ushort_index(i);
|
||||
}
|
||||
|
||||
init_data.entities.emplace_back(entity);
|
||||
m_circle.init_from(init_data);
|
||||
m_circle.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
m_circle.set_color(-1, color);
|
||||
m_circle.set_color(color);
|
||||
m_circle.render();
|
||||
#else
|
||||
::glBegin(GL_LINE_LOOP);
|
||||
@ -278,13 +276,13 @@ void GLGizmoRotate::render_scale() const
|
||||
if (!m_scale.is_initialized() || radius_changed) {
|
||||
m_scale.reset();
|
||||
|
||||
GLModel::InitializationData init_data;
|
||||
GLModel::InitializationData::Entity entity;
|
||||
entity.type = GLModel::PrimitiveType::Lines;
|
||||
entity.positions.reserve(2 * ScaleStepsCount);
|
||||
entity.normals.reserve(2 * ScaleStepsCount);
|
||||
entity.indices.reserve(2 * ScaleStepsCount);
|
||||
for (unsigned int i = 0; i < ScaleStepsCount; ++i) {
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::Lines, GLModel::Geometry::EVertexLayout::P3, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.vertices.reserve(2 * ScaleStepsCount * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(2 * ScaleStepsCount * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
// vertices + indices
|
||||
for (unsigned short i = 0; i < ScaleStepsCount; ++i) {
|
||||
const float angle = float(i * ScaleStepRad);
|
||||
const float cosa = ::cos(angle);
|
||||
const float sina = ::sin(angle);
|
||||
@ -293,19 +291,16 @@ void GLGizmoRotate::render_scale() const
|
||||
const float out_x = (i % ScaleLongEvery == 0) ? cosa * out_radius_long : cosa * out_radius_short;
|
||||
const float out_y = (i % ScaleLongEvery == 0) ? sina * out_radius_long : sina * out_radius_short;
|
||||
|
||||
entity.positions.emplace_back(in_x, in_y, 0.0f);
|
||||
entity.positions.emplace_back(out_x, out_y, 0.0f);
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
entity.indices.emplace_back(i * 2 + 0);
|
||||
entity.indices.emplace_back(i * 2 + 1);
|
||||
init_data.add_vertex(Vec3f(in_x, in_y, 0.0f));
|
||||
init_data.add_vertex(Vec3f(out_x, out_y, 0.0f));
|
||||
init_data.add_ushort_index(i * 2);
|
||||
init_data.add_ushort_index(i * 2 + 1);
|
||||
}
|
||||
|
||||
init_data.entities.emplace_back(entity);
|
||||
m_scale.init_from(init_data);
|
||||
}
|
||||
m_scale.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
m_scale.set_color(-1, color);
|
||||
m_scale.set_color(color);
|
||||
m_scale.render();
|
||||
#else
|
||||
::glBegin(GL_LINES);
|
||||
@ -340,13 +335,13 @@ void GLGizmoRotate::render_snap_radii() const
|
||||
if (!m_snap_radii.is_initialized() || radius_changed) {
|
||||
m_snap_radii.reset();
|
||||
|
||||
GLModel::InitializationData init_data;
|
||||
GLModel::InitializationData::Entity entity;
|
||||
entity.type = GLModel::PrimitiveType::Lines;
|
||||
entity.positions.reserve(2 * ScaleStepsCount);
|
||||
entity.normals.reserve(2 * ScaleStepsCount);
|
||||
entity.indices.reserve(2 * ScaleStepsCount);
|
||||
for (unsigned int i = 0; i < ScaleStepsCount; ++i) {
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::Lines, GLModel::Geometry::EVertexLayout::P3, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.vertices.reserve(2 * ScaleStepsCount * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(2 * ScaleStepsCount * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
// vertices + indices
|
||||
for (unsigned short i = 0; i < ScaleStepsCount; ++i) {
|
||||
const float angle = float(i * step);
|
||||
const float cosa = ::cos(angle);
|
||||
const float sina = ::sin(angle);
|
||||
@ -355,19 +350,16 @@ void GLGizmoRotate::render_snap_radii() const
|
||||
const float out_x = cosa * out_radius;
|
||||
const float out_y = sina * out_radius;
|
||||
|
||||
entity.positions.emplace_back(in_x, in_y, 0.0f);
|
||||
entity.positions.emplace_back(out_x, out_y, 0.0f);
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
entity.indices.emplace_back(i * 2 + 0);
|
||||
entity.indices.emplace_back(i * 2 + 1);
|
||||
init_data.add_vertex(Vec3f(in_x, in_y, 0.0f));
|
||||
init_data.add_vertex(Vec3f(out_x, out_y, 0.0f));
|
||||
init_data.add_ushort_index(i * 2);
|
||||
init_data.add_ushort_index(i * 2 + 1);
|
||||
}
|
||||
|
||||
init_data.entities.emplace_back(entity);
|
||||
m_snap_radii.init_from(init_data);
|
||||
m_snap_radii.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
m_snap_radii.set_color(-1, color);
|
||||
m_snap_radii.set_color(color);
|
||||
m_snap_radii.render();
|
||||
#else
|
||||
::glBegin(GL_LINES);
|
||||
@ -394,24 +386,22 @@ void GLGizmoRotate::render_reference_radius(const ColorRGBA& color, bool radius_
|
||||
if (!m_reference_radius.is_initialized() || radius_changed) {
|
||||
m_reference_radius.reset();
|
||||
|
||||
GLModel::InitializationData init_data;
|
||||
GLModel::InitializationData::Entity entity;
|
||||
entity.type = GLModel::PrimitiveType::Lines;
|
||||
entity.positions.reserve(2);
|
||||
entity.positions.emplace_back(0.0f, 0.0f, 0.0f);
|
||||
entity.positions.emplace_back(m_radius * (1.0f + GrabberOffset), 0.0f, 0.0f);
|
||||
entity.normals.reserve(2);
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
entity.indices.reserve(2);
|
||||
entity.indices.emplace_back(0);
|
||||
entity.indices.emplace_back(1);
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::Lines, GLModel::Geometry::EVertexLayout::P3, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.vertices.reserve(2 * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(2 * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
init_data.entities.emplace_back(entity);
|
||||
m_reference_radius.init_from(init_data);
|
||||
// vertices
|
||||
init_data.add_vertex(Vec3f(0.0f, 0.0f, 0.0f));
|
||||
init_data.add_vertex(Vec3f(m_radius * (1.0f + GrabberOffset), 0.0f, 0.0f));
|
||||
|
||||
// indices
|
||||
init_data.add_ushort_line(0, 1);
|
||||
|
||||
m_reference_radius.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
m_reference_radius.set_color(-1, color);
|
||||
m_reference_radius.set_color(color);
|
||||
m_reference_radius.render();
|
||||
}
|
||||
#else
|
||||
@ -437,24 +427,22 @@ void GLGizmoRotate::render_angle() const
|
||||
if (!m_angle_arc.is_initialized() || radius_changed) {
|
||||
m_angle_arc.reset();
|
||||
|
||||
GLModel::InitializationData init_data;
|
||||
GLModel::InitializationData::Entity entity;
|
||||
entity.type = GLModel::PrimitiveType::LineStrip;
|
||||
entity.positions.reserve(1 + AngleResolution);
|
||||
entity.normals.reserve(1 + AngleResolution);
|
||||
entity.indices.reserve(1 + AngleResolution);
|
||||
for (unsigned int i = 0; i <= AngleResolution; ++i) {
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::LineStrip, GLModel::Geometry::EVertexLayout::P3, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.vertices.reserve((1 + AngleResolution) * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve((1 + AngleResolution) * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
// vertices + indices
|
||||
for (unsigned short i = 0; i <= AngleResolution; ++i) {
|
||||
const float angle = float(i) * step_angle;
|
||||
entity.positions.emplace_back(::cos(angle) * ex_radius, ::sin(angle) * ex_radius, 0.0f);
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
entity.indices.emplace_back(i);
|
||||
init_data.add_vertex(Vec3f(::cos(angle) * ex_radius, ::sin(angle) * ex_radius, 0.0f));
|
||||
init_data.add_ushort_index(i);
|
||||
}
|
||||
|
||||
init_data.entities.emplace_back(entity);
|
||||
m_angle_arc.init_from(init_data);
|
||||
m_angle_arc.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
m_angle_arc.set_color(-1, color);
|
||||
m_angle_arc.set_color(color);
|
||||
m_angle_arc.render();
|
||||
#else
|
||||
::glBegin(GL_LINE_STRIP);
|
||||
@ -476,32 +464,30 @@ void GLGizmoRotate::render_grabber_connection(const ColorRGBA& color, bool radiu
|
||||
m_grabber_connection.model.reset();
|
||||
m_grabber_connection.old_center = m_grabbers.front().center;
|
||||
|
||||
GLModel::InitializationData init_data;
|
||||
GLModel::InitializationData::Entity entity;
|
||||
entity.type = GLModel::PrimitiveType::Lines;
|
||||
entity.positions.reserve(2);
|
||||
entity.positions.emplace_back(0.0f, 0.0f, 0.0f);
|
||||
entity.positions.emplace_back(m_grabbers.front().center.cast<float>());
|
||||
entity.normals.reserve(2);
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
entity.indices.reserve(2);
|
||||
entity.indices.emplace_back(0);
|
||||
entity.indices.emplace_back(1);
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::Lines, GLModel::Geometry::EVertexLayout::P3, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.vertices.reserve(2 * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(2 * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
init_data.entities.emplace_back(entity);
|
||||
m_grabber_connection.model.init_from(init_data);
|
||||
// vertices
|
||||
init_data.add_vertex(Vec3f(0.0f, 0.0f, 0.0f));
|
||||
init_data.add_vertex((Vec3f)m_grabbers.front().center.cast<float>());
|
||||
|
||||
// indices
|
||||
init_data.add_ushort_line(0, 1);
|
||||
|
||||
m_grabber_connection.model.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
m_grabber_connection.model.set_color(-1, color);
|
||||
m_grabber_connection.model.set_color(color);
|
||||
m_grabber_connection.model.render();
|
||||
}
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
void GLGizmoRotate::render_grabber(const BoundingBoxf3& box) const
|
||||
void GLGizmoRotate::render_grabber(const BoundingBoxf3& box)
|
||||
{
|
||||
#if !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
const double grabber_radius = (double)m_radius * (1.0 + (double)GrabberOffset);
|
||||
const double grabber_radius = double(m_radius) * (1.0 + double(GrabberOffset));
|
||||
m_grabbers[0].center = Vec3d(::cos(m_angle) * grabber_radius, ::sin(m_angle) * grabber_radius, 0.0);
|
||||
m_grabbers[0].angles.z() = m_angle;
|
||||
|
||||
@ -522,19 +508,26 @@ void GLGizmoRotate::render_grabber_extension(const BoundingBoxf3& box, bool pick
|
||||
const float mean_size = float((box.size().x() + box.size().y() + box.size().z()) / 3.0);
|
||||
const double size = m_dragging ? double(m_grabbers.front().get_dragging_half_size(mean_size)) : double(m_grabbers.front().get_half_size(mean_size));
|
||||
|
||||
ColorRGBA color = m_grabbers.front().color;
|
||||
if (!picking && m_hover_id != -1)
|
||||
color = complementary(color);
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
GLShaderProgram* shader = wxGetApp().get_shader(picking ? "flat" : "gouraud_light");
|
||||
if (shader == nullptr)
|
||||
return;
|
||||
|
||||
m_cone.set_color((!picking && m_hover_id != -1) ? complementary(m_grabbers.front().color) : m_grabbers.front().color);
|
||||
|
||||
shader->start_using();
|
||||
shader->set_uniform("emission_factor", 0.1f);
|
||||
#else
|
||||
GLShaderProgram* shader = wxGetApp().get_shader("gouraud_light");
|
||||
if (shader == nullptr)
|
||||
return;
|
||||
|
||||
m_cone.set_color(-1, color);
|
||||
m_cone.set_color(-1, (!picking && m_hover_id != -1) ? complementary(m_grabbers.front().color) : m_grabbers.front().color);
|
||||
if (!picking) {
|
||||
shader->start_using();
|
||||
shader->set_uniform("emission_factor", 0.1f);
|
||||
}
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
|
||||
const Vec3d& center = m_grabbers.front().center;
|
||||
|
||||
@ -555,13 +548,15 @@ void GLGizmoRotate::render_grabber_extension(const BoundingBoxf3& box, bool pick
|
||||
m_cone.render();
|
||||
glsafe(::glPopMatrix());
|
||||
|
||||
#if !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
if (! picking)
|
||||
#endif // !ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
shader->stop_using();
|
||||
}
|
||||
|
||||
void GLGizmoRotate::transform_to_local(const Selection& selection) const
|
||||
{
|
||||
glsafe(::glTranslated(m_center(0), m_center(1), m_center(2)));
|
||||
glsafe(::glTranslated(m_center.x(), m_center.y(), m_center.z()));
|
||||
|
||||
if (selection.is_single_volume() || selection.is_single_modifier() || selection.requires_local_axes()) {
|
||||
const Transform3d orient_matrix = selection.get_volume(*selection.get_volume_idxs().begin())->get_instance_transformation().get_matrix(true, false, true, true);
|
||||
|
||||
@ -84,7 +84,7 @@ private:
|
||||
void render_reference_radius() const;
|
||||
void render_angle() const;
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void render_grabber(const BoundingBoxf3& box) const;
|
||||
void render_grabber(const BoundingBoxf3& box);
|
||||
void render_grabber_extension(const BoundingBoxf3& box, bool picking);
|
||||
|
||||
void transform_to_local(const Selection& selection) const;
|
||||
|
||||
@ -390,7 +390,7 @@ void GLGizmoScale3D::render_grabbers_connection(unsigned int id_1, unsigned int
|
||||
return -1;
|
||||
};
|
||||
|
||||
int id = grabber_connection(id_1, id_2);
|
||||
const int id = grabber_connection(id_1, id_2);
|
||||
if (id == -1)
|
||||
return;
|
||||
|
||||
@ -401,27 +401,22 @@ void GLGizmoScale3D::render_grabbers_connection(unsigned int id_1, unsigned int
|
||||
m_grabber_connections[id].old_v2 = m_grabbers[id_2].center;
|
||||
m_grabber_connections[id].model.reset();
|
||||
|
||||
GLModel::InitializationData init_data;
|
||||
GLModel::InitializationData::Entity entity;
|
||||
entity.type = GLModel::PrimitiveType::Lines;
|
||||
entity.positions.reserve(2);
|
||||
entity.positions.emplace_back(m_grabbers[id_1].center.cast<float>());
|
||||
entity.positions.emplace_back(m_grabbers[id_2].center.cast<float>());
|
||||
GLModel::Geometry init_data;
|
||||
init_data.format = { GLModel::Geometry::EPrimitiveType::Lines, GLModel::Geometry::EVertexLayout::P3, GLModel::Geometry::EIndexType::USHORT };
|
||||
init_data.vertices.reserve(2 * GLModel::Geometry::vertex_stride_floats(init_data.format));
|
||||
init_data.indices.reserve(2 * GLModel::Geometry::index_stride_bytes(init_data.format));
|
||||
|
||||
entity.normals.reserve(2);
|
||||
for (size_t j = 0; j < 2; ++j) {
|
||||
entity.normals.emplace_back(Vec3f::UnitZ());
|
||||
}
|
||||
// vertices
|
||||
init_data.add_vertex((Vec3f)m_grabbers[id_1].center.cast<float>());
|
||||
init_data.add_vertex((Vec3f)m_grabbers[id_2].center.cast<float>());
|
||||
|
||||
entity.indices.reserve(2);
|
||||
entity.indices.emplace_back(0);
|
||||
entity.indices.emplace_back(1);
|
||||
// indices
|
||||
init_data.add_ushort_line(0, 1);
|
||||
|
||||
init_data.entities.emplace_back(entity);
|
||||
m_grabber_connections[id].model.init_from(init_data);
|
||||
m_grabber_connections[id].model.init_from(std::move(init_data));
|
||||
}
|
||||
|
||||
m_grabber_connections[id].model.set_color(-1, color);
|
||||
m_grabber_connections[id].model.set_color(color);
|
||||
m_grabber_connections[id].model.render();
|
||||
}
|
||||
#else
|
||||
|
||||
@ -52,11 +52,7 @@ std::string GLGizmoSeam::on_get_name() const
|
||||
return _u8L("Seam painting");
|
||||
}
|
||||
|
||||
#if ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
void GLGizmoSeam::render_painter_gizmo()
|
||||
#else
|
||||
void GLGizmoSeam::render_painter_gizmo() const
|
||||
#endif // ENABLE_GLBEGIN_GLEND_REMOVAL
|
||||
{
|
||||
const Selection& selection = m_parent.get_selection();
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user