mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
Merge branch 'main' into feature/multitool
This commit is contained in:
commit
5e2f145c34
210 changed files with 2326 additions and 1605 deletions
38
.github/workflows/update-translation.yml
vendored
Normal file
38
.github/workflows/update-translation.yml
vendored
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
name: Update Translation Catalog
|
||||||
|
on:
|
||||||
|
# schedule:
|
||||||
|
# - cron: 0 0 * * 1
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update_translation:
|
||||||
|
name: Update translation
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.12'
|
||||||
|
|
||||||
|
- name: Install gettext
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y gettext
|
||||||
|
|
||||||
|
- name: Update translation catalog
|
||||||
|
run: |
|
||||||
|
./run_gettext.sh --full
|
||||||
|
git add localization/i18n/*
|
||||||
|
|
||||||
|
- name: Commit translation catalog updates
|
||||||
|
uses: qoomon/actions--create-commit@v1
|
||||||
|
id: commit
|
||||||
|
with:
|
||||||
|
message: Update translation catalog
|
||||||
|
skip-empty: true
|
||||||
|
|
||||||
|
- name: Push changes
|
||||||
|
run: git push
|
|
@ -121,6 +121,9 @@ if (MSVC)
|
||||||
# C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data. An integer type is converted to a smaller integer type.
|
# C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data. An integer type is converted to a smaller integer type.
|
||||||
# C4267: The compiler detected a conversion from size_t to a smaller type.
|
# C4267: The compiler detected a conversion from size_t to a smaller type.
|
||||||
add_compile_options(/wd4244 /wd4267)
|
add_compile_options(/wd4244 /wd4267)
|
||||||
|
# Disable warnings on comparison of unsigned and signed
|
||||||
|
# C4018: signed/unsigned mismatch
|
||||||
|
add_compile_options(/wd4018)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 15)
|
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 15)
|
||||||
|
@ -249,6 +252,20 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMP
|
||||||
# On GCC and Clang, no return from a non-void function is a warning only. Here, we make it an error.
|
# On GCC and Clang, no return from a non-void function is a warning only. Here, we make it an error.
|
||||||
add_compile_options(-Werror=return-type)
|
add_compile_options(-Werror=return-type)
|
||||||
|
|
||||||
|
# Ignore unused functions warnings
|
||||||
|
add_compile_options(-Wno-unused-function)
|
||||||
|
|
||||||
|
# Ignore signed/unsigned comparison warnings
|
||||||
|
add_compile_options(-Wno-sign-compare)
|
||||||
|
|
||||||
|
# The mismatch of tabs and spaces throughout the project can sometimes
|
||||||
|
# cause this warning to appear even though the indentation is fine.
|
||||||
|
# Some includes also cause the warning
|
||||||
|
add_compile_options(-Wno-misleading-indentation)
|
||||||
|
|
||||||
|
# Disable warning if enum value does not have a corresponding case in switch statement
|
||||||
|
add_compile_options(-Wno-switch)
|
||||||
|
|
||||||
# removes LOTS of extraneous Eigen warnings (GCC only supports it since 6.1)
|
# removes LOTS of extraneous Eigen warnings (GCC only supports it since 6.1)
|
||||||
# https://eigen.tuxfamily.org/bz/show_bug.cgi?id=1221
|
# https://eigen.tuxfamily.org/bz/show_bug.cgi?id=1221
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0)
|
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -346,7 +346,7 @@ msgid "Groove Angle"
|
||||||
msgstr "Kąt rowka"
|
msgstr "Kąt rowka"
|
||||||
|
|
||||||
msgid "Part"
|
msgid "Part"
|
||||||
msgstr "Part"
|
msgstr "Wydruk"
|
||||||
|
|
||||||
msgid "Object"
|
msgid "Object"
|
||||||
msgstr "Obiekt"
|
msgstr "Obiekt"
|
||||||
|
@ -2433,7 +2433,7 @@ msgid "Load"
|
||||||
msgstr "Ładuj"
|
msgstr "Ładuj"
|
||||||
|
|
||||||
msgid "Unload"
|
msgid "Unload"
|
||||||
msgstr "Wyładuj"
|
msgstr "Rozładuj"
|
||||||
|
|
||||||
msgid "Ext Spool"
|
msgid "Ext Spool"
|
||||||
msgstr "zew.szpula"
|
msgstr "zew.szpula"
|
||||||
|
@ -2498,8 +2498,8 @@ msgid ""
|
||||||
"Choose an AMS slot then press \"Load\" or \"Unload\" button to automatically "
|
"Choose an AMS slot then press \"Load\" or \"Unload\" button to automatically "
|
||||||
"load or unload filaments."
|
"load or unload filaments."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Wybierz gniazdo AMS, a następnie naciśnij przycisk \"Ładuj\" lub \"Wyładuj"
|
"Wybierz gniazdo AMS, a następnie naciśnij przycisk \"Ładuj\" lub "
|
||||||
"\" ,aby automatycznie załadować lub wyładować filamenty."
|
"\"Rozładuj\" ,aby automatycznie załadować lub wyładować filamenty."
|
||||||
|
|
||||||
msgid "Edit"
|
msgid "Edit"
|
||||||
msgstr "Edytuj"
|
msgstr "Edytuj"
|
||||||
|
@ -2840,7 +2840,8 @@ msgid "SN"
|
||||||
msgstr "Numer seryjny"
|
msgstr "Numer seryjny"
|
||||||
|
|
||||||
msgid "Setting AMS slot information while printing is not supported"
|
msgid "Setting AMS slot information while printing is not supported"
|
||||||
msgstr "Ustawianie informacji o slocie AMS podczas druku nie jest obsługiwane"
|
msgstr ""
|
||||||
|
"Ustawianie informacji o gnieździe AMS podczas druku nie jest obsługiwane"
|
||||||
|
|
||||||
msgid "Factors of Flow Dynamics Calibration"
|
msgid "Factors of Flow Dynamics Calibration"
|
||||||
msgstr "współczynnik kalibracji dynamiki przepływu"
|
msgstr "współczynnik kalibracji dynamiki przepływu"
|
||||||
|
@ -2975,7 +2976,7 @@ msgid "Disable AMS"
|
||||||
msgstr "Wyłącz AMS"
|
msgstr "Wyłącz AMS"
|
||||||
|
|
||||||
msgid "Print with the filament mounted on the back of chassis"
|
msgid "Print with the filament mounted on the back of chassis"
|
||||||
msgstr "Drukuj z filamentem zamontowanym na tylnej części obudowy"
|
msgstr "Drukukowanie filamentem zamontowanym na tylnej części obudowy"
|
||||||
|
|
||||||
msgid "Current Cabin humidity"
|
msgid "Current Cabin humidity"
|
||||||
msgstr "Aktualna wilgotność w komorze"
|
msgstr "Aktualna wilgotność w komorze"
|
||||||
|
@ -3760,8 +3761,8 @@ msgid ""
|
||||||
"layers is 0, sparse infill density is 0 and timelapse type is traditional."
|
"layers is 0, sparse infill density is 0 and timelapse type is traditional."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Tryb Wazy działa tylko wtedy gdy liczba pętli ściany wynosi 1, wyłączone są "
|
"Tryb Wazy działa tylko wtedy gdy liczba pętli ściany wynosi 1, wyłączone są "
|
||||||
"podpory, ilość warstw górnej powłoki wynosi 0, gęstość wypełnienia wynosi 0, "
|
"podpory, liczba warstw górnej powłoki wynosi 0, gęstość wypełnienia wynosi "
|
||||||
"a tryb Timelaps ustawiony jest na Tradycyjny."
|
"0, a tryb Timelaps ustawiony jest na Tradycyjny."
|
||||||
|
|
||||||
msgid " But machines with I3 structure will not generate timelapse videos."
|
msgid " But machines with I3 structure will not generate timelapse videos."
|
||||||
msgstr " Jednak maszyny z budową I3 nie będą generować filmów timelapse."
|
msgstr " Jednak maszyny z budową I3 nie będą generować filmów timelapse."
|
||||||
|
@ -5397,7 +5398,7 @@ msgid "Aux"
|
||||||
msgstr "Aux"
|
msgstr "Aux"
|
||||||
|
|
||||||
msgid "Cham"
|
msgid "Cham"
|
||||||
msgstr "Cham"
|
msgstr "Komora"
|
||||||
|
|
||||||
msgid "Bed"
|
msgid "Bed"
|
||||||
msgstr "Stół"
|
msgstr "Stół"
|
||||||
|
@ -5439,7 +5440,7 @@ msgid ""
|
||||||
"Please heat the nozzle to above 170 degree before loading or unloading "
|
"Please heat the nozzle to above 170 degree before loading or unloading "
|
||||||
"filament."
|
"filament."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Przed załadowaniem lub wyładunkiem filamentu, podgrzej dyszę do temperatury "
|
"Przed załadowaniem lub rozładunkiem filamentu, podgrzej dyszę do temperatury "
|
||||||
"powyżej 170 stopni."
|
"powyżej 170 stopni."
|
||||||
|
|
||||||
msgid "Still unload"
|
msgid "Still unload"
|
||||||
|
@ -6088,9 +6089,7 @@ msgid "Please correct them in the param tabs"
|
||||||
msgstr "Proszę poprawić je na kartach parametrów"
|
msgstr "Proszę poprawić je na kartach parametrów"
|
||||||
|
|
||||||
msgid "The 3mf has following modified G-codes in filament or printer presets:"
|
msgid "The 3mf has following modified G-codes in filament or printer presets:"
|
||||||
msgstr ""
|
msgstr "Plik 3MF ma zmodyfikowane G-code w profilach filamentu lub drukarki:"
|
||||||
"Plik 3MF ma następujące zmodyfikowane G-code w profilach filamentu lub "
|
|
||||||
"drukarki:"
|
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Please confirm that these modified G-codes are safe to prevent any damage to "
|
"Please confirm that these modified G-codes are safe to prevent any damage to "
|
||||||
|
@ -6103,13 +6102,13 @@ msgid "Modified G-codes"
|
||||||
msgstr "Zmodyfikowane G-codes"
|
msgstr "Zmodyfikowane G-codes"
|
||||||
|
|
||||||
msgid "The 3mf has following customized filament or printer presets:"
|
msgid "The 3mf has following customized filament or printer presets:"
|
||||||
msgstr "Plik 3MF ma następujące dostosowane profile filamentu lub drukarki:"
|
msgstr "Plik 3MF ma już dostosowane profile filamentu lub drukarki:"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Please confirm that the G-codes within these presets are safe to prevent any "
|
"Please confirm that the G-codes within these presets are safe to prevent any "
|
||||||
"damage to the machine!"
|
"damage to the machine!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Proszę potwierdzić, że G-code w tych profilach są bezpieczne, aby zapobiec "
|
"Proszę potwierdź, że G-code w tych profilach jest bezpieczny, aby zapobiec "
|
||||||
"ewentualnym uszkodzeniom maszyny!"
|
"ewentualnym uszkodzeniom maszyny!"
|
||||||
|
|
||||||
msgid "Customized Preset"
|
msgid "Customized Preset"
|
||||||
|
@ -7681,8 +7680,8 @@ msgstr ""
|
||||||
msgid ""
|
msgid ""
|
||||||
"When recording timelapse without toolhead, it is recommended to add a "
|
"When recording timelapse without toolhead, it is recommended to add a "
|
||||||
"\"Timelapse Wipe Tower\" \n"
|
"\"Timelapse Wipe Tower\" \n"
|
||||||
"by right-click the empty position of build plate and choose \"Add Primitive"
|
"by right-click the empty position of build plate and choose \"Add "
|
||||||
"\"->\"Timelapse Wipe Tower\"."
|
"Primitive\"->\"Timelapse Wipe Tower\"."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Podczas nagrywania timelapse'a bez głowicy drukującej zaleca się dodanie "
|
"Podczas nagrywania timelapse'a bez głowicy drukującej zaleca się dodanie "
|
||||||
"\"Timelaps - Wieża Czyszcząca\" \n"
|
"\"Timelaps - Wieża Czyszcząca\" \n"
|
||||||
|
@ -9537,10 +9536,10 @@ msgid ""
|
||||||
"the next layers will be linearly shrunk less, up to the layer indicated by "
|
"the next layers will be linearly shrunk less, up to the layer indicated by "
|
||||||
"this value."
|
"this value."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Ilość warstw, na które będzie rozciągać się kompensacja \"stopy słonia\". "
|
"Liczba warstw, na które będzie rozciągać się kompensacja \"stopy słonia\". "
|
||||||
"Pierwsza warstwa zostanie zmniejszona o wartość kompensacji 'stopy słonia', "
|
"Pierwsza warstwa zostanie zmniejszona o wartość kompensacji 'stopy słonia', "
|
||||||
"a następne warstwy będą liniowo zmniejszane mniej, aż do warstwy wskazanej "
|
"a następne warstwy będą zmniejszane liniowo, aż do warstwy wskazanej przez "
|
||||||
"przez tę wartość."
|
"tę wartość."
|
||||||
|
|
||||||
msgid "layers"
|
msgid "layers"
|
||||||
msgstr "warstwy"
|
msgstr "warstwy"
|
||||||
|
@ -9676,10 +9675,10 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Unikaj ruchów nad obrysami-\n"
|
"Unikaj ruchów nad obrysami-\n"
|
||||||
"Maksymalna długość objazdu przy unikaniu przejeżdżania nad obrysami. Jeśli "
|
"Maksymalna długość objazdu przy unikaniu przejeżdżania nad obrysami. Jeśli "
|
||||||
"objazd miałby wykroczyć poza tę wartość, funkcja \"unikaj ruchów nad obrysami"
|
"objazd miałby wykroczyć poza tę wartość, funkcja \"unikaj ruchów nad "
|
||||||
"\" zostanie zignorowana dla tej ścieżki. Długość objazdu można zdefiniować "
|
"obrysami\" zostanie zignorowana dla tej ścieżki. Długość objazdu można "
|
||||||
"jako wartość absolutna lub obliczona procentowo (np. 50%) z długości ruchu "
|
"zdefiniować jako wartość absolutna lub obliczona procentowo (np. 50%) z "
|
||||||
"bezpośredniego."
|
"długości ruchu bezpośredniego."
|
||||||
|
|
||||||
msgid "mm or %"
|
msgid "mm or %"
|
||||||
msgstr "mm lub %"
|
msgstr "mm lub %"
|
||||||
|
@ -9768,7 +9767,7 @@ msgid "Other layers print sequence"
|
||||||
msgstr "Inna kolejność druku warstw"
|
msgstr "Inna kolejność druku warstw"
|
||||||
|
|
||||||
msgid "The number of other layers print sequence"
|
msgid "The number of other layers print sequence"
|
||||||
msgstr "Ilość warstw ze zmienioną kolejnością drukowania"
|
msgstr "Liczba warstw ze zmienioną kolejnością drukowania"
|
||||||
|
|
||||||
msgid "Other layers filament sequence"
|
msgid "Other layers filament sequence"
|
||||||
msgstr "Kolejność filamenu dla pozostałych warstw"
|
msgstr "Kolejność filamenu dla pozostałych warstw"
|
||||||
|
@ -9806,7 +9805,7 @@ msgstr ""
|
||||||
"jest mniejsza niż ta wartość. Dzięki temu można uniknąć zbyt cienkiej "
|
"jest mniejsza niż ta wartość. Dzięki temu można uniknąć zbyt cienkiej "
|
||||||
"powłoki, gdy wysokość warstwy jest niska. Wartość 0 oznacza wyłączenie tego "
|
"powłoki, gdy wysokość warstwy jest niska. Wartość 0 oznacza wyłączenie tego "
|
||||||
"ustawienia, a grubość dolnej powłoki jest wówczas wyznaczana wyłącznie przez "
|
"ustawienia, a grubość dolnej powłoki jest wówczas wyznaczana wyłącznie przez "
|
||||||
"ilość warstw dolnej powłoki"
|
"liczbę warstw dolnej powłoki"
|
||||||
|
|
||||||
msgid "Apply gap fill"
|
msgid "Apply gap fill"
|
||||||
msgstr "Zastosuj wypełnienie szczelin"
|
msgstr "Zastosuj wypełnienie szczelin"
|
||||||
|
@ -11424,7 +11423,7 @@ msgid "Travel speed of initial layer"
|
||||||
msgstr "Prędkość jałowa dla pierwszej warstwy"
|
msgstr "Prędkość jałowa dla pierwszej warstwy"
|
||||||
|
|
||||||
msgid "Number of slow layers"
|
msgid "Number of slow layers"
|
||||||
msgstr "Ilość warstw o niższej prędkości"
|
msgstr "Liczba warstw o niższej prędkości"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"The first few layers are printed slower than normal. The speed is gradually "
|
"The first few layers are printed slower than normal. The speed is gradually "
|
||||||
|
@ -11445,10 +11444,10 @@ msgstr "Pełna prędkość wentylatora na warstwie"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Fan speed will be ramped up linearly from zero at layer "
|
"Fan speed will be ramped up linearly from zero at layer "
|
||||||
"\"close_fan_the_first_x_layers\" to maximum at layer \"full_fan_speed_layer"
|
"\"close_fan_the_first_x_layers\" to maximum at layer "
|
||||||
"\". \"full_fan_speed_layer\" will be ignored if lower than "
|
"\"full_fan_speed_layer\". \"full_fan_speed_layer\" will be ignored if lower "
|
||||||
"\"close_fan_the_first_x_layers\", in which case the fan will be running at "
|
"than \"close_fan_the_first_x_layers\", in which case the fan will be running "
|
||||||
"maximum allowed speed at layer \"close_fan_the_first_x_layers\" + 1."
|
"at maximum allowed speed at layer \"close_fan_the_first_x_layers\" + 1."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Prędkość wentylatora będzie stopniowo zwiększana liniowo od zera na warstwie "
|
"Prędkość wentylatora będzie stopniowo zwiększana liniowo od zera na warstwie "
|
||||||
"\"close_fan_the_first_x_layers\" do maksymalnej na warstwie "
|
"\"close_fan_the_first_x_layers\" do maksymalnej na warstwie "
|
||||||
|
@ -11863,52 +11862,63 @@ msgstr "Głębokość zazębiania się podzielonego na segmenty obszaru"
|
||||||
|
|
||||||
msgid "Interlocking depth of a segmented region. Zero disables this feature."
|
msgid "Interlocking depth of a segmented region. Zero disables this feature."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Głębokość blokowania obszaru segmentowego. Wartość zero wyłącza tę funkcję."
|
"Głębokość zazębiania się podzielonego na segmenty regionu. Wartość zero "
|
||||||
|
"wyłącza tę funkcję."
|
||||||
|
|
||||||
msgid "Use beam interlocking"
|
msgid "Use beam interlocking"
|
||||||
msgstr ""
|
msgstr "Użyj struktury zazębiającej"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Generate interlocking beam structure at the locations where different "
|
"Generate interlocking beam structure at the locations where different "
|
||||||
"filaments touch. This improves the adhesion between filaments, especially "
|
"filaments touch. This improves the adhesion between filaments, especially "
|
||||||
"models printed in different materials."
|
"models printed in different materials."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Wygeneruj strukturę zazębiającą się w miejscach, gdzie stykają się różne "
|
||||||
|
"filamenty. Poprawia to przyczepność między filamentami, szczególnie w "
|
||||||
|
"modelach drukowanych z różnych materiałów."
|
||||||
|
|
||||||
msgid "Interlocking beam width"
|
msgid "Interlocking beam width"
|
||||||
msgstr ""
|
msgstr "Szerokość zazębiania"
|
||||||
|
|
||||||
msgid "The width of the interlocking structure beams."
|
msgid "The width of the interlocking structure beams."
|
||||||
msgstr ""
|
msgstr "Określa szerokość struktury zazębiającej"
|
||||||
|
|
||||||
msgid "Interlocking direction"
|
msgid "Interlocking direction"
|
||||||
msgstr ""
|
msgstr "Kierunek zazębiania"
|
||||||
|
|
||||||
msgid "Orientation of interlock beams."
|
msgid "Orientation of interlock beams."
|
||||||
msgstr ""
|
msgstr "Orientacja struktury zatrzaskowej"
|
||||||
|
|
||||||
msgid "Interlocking beam layers"
|
msgid "Interlocking beam layers"
|
||||||
msgstr ""
|
msgstr "Liczba warstw zazębienia"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"The height of the beams of the interlocking structure, measured in number of "
|
"The height of the beams of the interlocking structure, measured in number of "
|
||||||
"layers. Less layers is stronger, but more prone to defects."
|
"layers. Less layers is stronger, but more prone to defects."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Wysokość struktury zazębiającej wyrażona w liczbie warstw. Mniejsza liczba "
|
||||||
|
"warstw oznacza większą wytrzymałość, ale większą podatność na wady."
|
||||||
|
|
||||||
msgid "Interlocking depth"
|
msgid "Interlocking depth"
|
||||||
msgstr ""
|
msgstr "Głębokość zazębiania"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"The distance from the boundary between filaments to generate interlocking "
|
"The distance from the boundary between filaments to generate interlocking "
|
||||||
"structure, measured in cells. Too few cells will result in poor adhesion."
|
"structure, measured in cells. Too few cells will result in poor adhesion."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Odległość od granicy między filamentami potrzebna do generowania struktur "
|
||||||
|
"zazębiających, mierzona w komórkach. Zbyt mało komórek skutkuje słabą "
|
||||||
|
"adhezją."
|
||||||
|
|
||||||
msgid "Interlocking boundary avoidance"
|
msgid "Interlocking boundary avoidance"
|
||||||
msgstr ""
|
msgstr "Odległość zapobiegająca zazębieniu"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"The distance from the outside of a model where interlocking structures will "
|
"The distance from the outside of a model where interlocking structures will "
|
||||||
"not be generated, measured in cells."
|
"not be generated, measured in cells."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Odległość od zewnętrznej strony modelu, gdzie struktury zazębiające nie będą "
|
||||||
|
"generowane, mierzona w komórkach."
|
||||||
|
|
||||||
msgid "Ironing Type"
|
msgid "Ironing Type"
|
||||||
msgstr "Rodzaj prasowania"
|
msgstr "Rodzaj prasowania"
|
||||||
|
@ -13212,10 +13222,10 @@ msgid ""
|
||||||
"triangle mesh slicing. The gap closing operation may reduce the final print "
|
"triangle mesh slicing. The gap closing operation may reduce the final print "
|
||||||
"resolution, therefore it is advisable to keep the value reasonably low."
|
"resolution, therefore it is advisable to keep the value reasonably low."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Szpary mniejsze niż dwukrotność wartości parametru \"promień zamykania szpar"
|
"Szpary mniejsze niż dwukrotność wartości parametru \"promień zamykania "
|
||||||
"\" zostaną zamknięte przy cięciu. Operacja zamykania szpar może zmniejszyć "
|
"szpar\" zostaną zamknięte przy cięciu. Operacja zamykania szpar może "
|
||||||
"finalną rozdzielczość wydruku, więc zalecane jest ustawienie tej wartości na "
|
"zmniejszyć finalną rozdzielczość wydruku, więc zalecane jest ustawienie tej "
|
||||||
"rozsądnie niskim poziomie."
|
"wartości na rozsądnie niskim poziomie."
|
||||||
|
|
||||||
msgid "Slicing Mode"
|
msgid "Slicing Mode"
|
||||||
msgstr "Tryb cięcia"
|
msgstr "Tryb cięcia"
|
||||||
|
@ -14365,7 +14375,7 @@ msgid "Total layer count"
|
||||||
msgstr "Całkowita liczba warstw"
|
msgstr "Całkowita liczba warstw"
|
||||||
|
|
||||||
msgid "Number of layers in the entire print."
|
msgid "Number of layers in the entire print."
|
||||||
msgstr "Ilość warstw w całym procesie drukowania"
|
msgstr "Liczba warstw w całym procesie drukowania"
|
||||||
|
|
||||||
msgid "Number of objects"
|
msgid "Number of objects"
|
||||||
msgstr "Liczba obiektów"
|
msgstr "Liczba obiektów"
|
||||||
|
@ -15601,8 +15611,8 @@ msgstr ""
|
||||||
"Czy chcesz go zastąpić?"
|
"Czy chcesz go zastąpić?"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"We would rename the presets as \"Vendor Type Serial @printer you selected"
|
"We would rename the presets as \"Vendor Type Serial @printer you "
|
||||||
"\". \n"
|
"selected\". \n"
|
||||||
"To add preset for more printers, Please go to printer selection"
|
"To add preset for more printers, Please go to printer selection"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Nazwa profilu zostanie zmieniona na \"Dostawca Typ Seria @nazwa drukarki, "
|
"Nazwa profilu zostanie zmieniona na \"Dostawca Typ Seria @nazwa drukarki, "
|
||||||
|
@ -18213,8 +18223,8 @@ msgstr ""
|
||||||
#~ "Elevation is too low for object. Use the \"Pad around object\" feature to "
|
#~ "Elevation is too low for object. Use the \"Pad around object\" feature to "
|
||||||
#~ "print the object without elevation."
|
#~ "print the object without elevation."
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "Podniesienie zbyt małe dla modelu. Użyj funkcji \"Podkładka wokół modelu"
|
#~ "Podniesienie zbyt małe dla modelu. Użyj funkcji \"Podkładka wokół "
|
||||||
#~ "\", aby wydrukować model bez podniesienia."
|
#~ "modelu\", aby wydrukować model bez podniesienia."
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "The endings of the support pillars will be deployed on the gap between "
|
#~ "The endings of the support pillars will be deployed on the gap between "
|
||||||
|
|
|
@ -7,8 +7,8 @@ msgstr ""
|
||||||
"Project-Id-Version: Slic3rPE\n"
|
"Project-Id-Version: Slic3rPE\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2024-06-30 15:44+0200\n"
|
"POT-Creation-Date: 2024-06-30 15:44+0200\n"
|
||||||
"PO-Revision-Date: 2023-04-01 13:21+0800\n"
|
"PO-Revision-Date: 2024-07-28 07:12+0000\n"
|
||||||
"Last-Translator: SoftFever <softfeverever@gmail.com>\n"
|
"Last-Translator: Handle <mail@bysb.net>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Language: zh_CN\n"
|
"Language: zh_CN\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
|
@ -355,6 +355,8 @@ msgid ""
|
||||||
"Click to flip the cut plane\n"
|
"Click to flip the cut plane\n"
|
||||||
"Drag to move the cut plane"
|
"Drag to move the cut plane"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"单击以翻转剖切面\n"
|
||||||
|
"拖动以移动剖切面"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Click to flip the cut plane\n"
|
"Click to flip the cut plane\n"
|
||||||
|
@ -372,7 +374,7 @@ msgid "Mode"
|
||||||
msgstr "模式"
|
msgstr "模式"
|
||||||
|
|
||||||
msgid "Change cut mode"
|
msgid "Change cut mode"
|
||||||
msgstr ""
|
msgstr "更改切割模式"
|
||||||
|
|
||||||
msgid "Tolerance"
|
msgid "Tolerance"
|
||||||
msgstr "容差"
|
msgstr "容差"
|
||||||
|
@ -381,7 +383,7 @@ msgid "Drag"
|
||||||
msgstr "拖拽"
|
msgstr "拖拽"
|
||||||
|
|
||||||
msgid "Draw cut line"
|
msgid "Draw cut line"
|
||||||
msgstr ""
|
msgstr "绘制切线"
|
||||||
|
|
||||||
msgid "Left click"
|
msgid "Left click"
|
||||||
msgstr "左击"
|
msgstr "左击"
|
||||||
|
@ -423,7 +425,7 @@ msgid "Bulge proportion related to radius"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Space"
|
msgid "Space"
|
||||||
msgstr "空格键"
|
msgstr "间隔"
|
||||||
|
|
||||||
msgid "Space proportion related to radius"
|
msgid "Space proportion related to radius"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -441,14 +443,14 @@ msgid "Flip cut plane"
|
||||||
msgstr "翻转剖切面"
|
msgstr "翻转剖切面"
|
||||||
|
|
||||||
msgid "Groove change"
|
msgid "Groove change"
|
||||||
msgstr ""
|
msgstr "槽变化"
|
||||||
|
|
||||||
msgid "Reset"
|
msgid "Reset"
|
||||||
msgstr "重置"
|
msgstr "重置"
|
||||||
|
|
||||||
#. TRN: This is an entry in the Undo/Redo stack. The whole line will be 'Edited: (name of whatever was edited)'.
|
#. TRN: This is an entry in the Undo/Redo stack. The whole line will be 'Edited: (name of whatever was edited)'.
|
||||||
msgid "Edited"
|
msgid "Edited"
|
||||||
msgstr ""
|
msgstr "已编辑"
|
||||||
|
|
||||||
msgid "Cut position"
|
msgid "Cut position"
|
||||||
msgstr "切割位置"
|
msgstr "切割位置"
|
||||||
|
@ -498,12 +500,12 @@ msgstr "检测到无效连接件"
|
||||||
#, c-format, boost-format
|
#, c-format, boost-format
|
||||||
msgid "%1$d connector is out of cut contour"
|
msgid "%1$d connector is out of cut contour"
|
||||||
msgid_plural "%1$d connectors are out of cut contour"
|
msgid_plural "%1$d connectors are out of cut contour"
|
||||||
msgstr[0] ""
|
msgstr[0] "%1$d 个连接件超出了切割轮廓"
|
||||||
|
|
||||||
#, c-format, boost-format
|
#, c-format, boost-format
|
||||||
msgid "%1$d connector is out of object"
|
msgid "%1$d connector is out of object"
|
||||||
msgid_plural "%1$d connectors are out of object"
|
msgid_plural "%1$d connectors are out of object"
|
||||||
msgstr[0] ""
|
msgstr[0] "%1$d 个连接件超出了对象"
|
||||||
|
|
||||||
msgid "Some connectors are overlapped"
|
msgid "Some connectors are overlapped"
|
||||||
msgstr "存在连接件相互重叠"
|
msgstr "存在连接件相互重叠"
|
||||||
|
@ -515,7 +517,7 @@ msgid "Cut plane is placed out of object"
|
||||||
msgstr "剖切面放置在对象之外"
|
msgstr "剖切面放置在对象之外"
|
||||||
|
|
||||||
msgid "Cut plane with groove is invalid"
|
msgid "Cut plane with groove is invalid"
|
||||||
msgstr ""
|
msgstr "槽所在的切割平面无效"
|
||||||
|
|
||||||
msgid "Connector"
|
msgid "Connector"
|
||||||
msgstr "连接件"
|
msgstr "连接件"
|
||||||
|
@ -666,11 +668,11 @@ msgstr "文本形状"
|
||||||
|
|
||||||
#. TRN - Title in Undo/Redo stack after rotate with text around emboss axe
|
#. TRN - Title in Undo/Redo stack after rotate with text around emboss axe
|
||||||
msgid "Text rotate"
|
msgid "Text rotate"
|
||||||
msgstr ""
|
msgstr "旋转文字"
|
||||||
|
|
||||||
#. TRN - Title in Undo/Redo stack after move with text along emboss axe - From surface
|
#. TRN - Title in Undo/Redo stack after move with text along emboss axe - From surface
|
||||||
msgid "Text move"
|
msgid "Text move"
|
||||||
msgstr ""
|
msgstr "移动文字"
|
||||||
|
|
||||||
msgid "Set Mirror"
|
msgid "Set Mirror"
|
||||||
msgstr "设置镜像"
|
msgstr "设置镜像"
|
||||||
|
@ -900,44 +902,44 @@ msgid "Revert using of model surface."
|
||||||
msgstr "恢复使用模型曲面。"
|
msgstr "恢复使用模型曲面。"
|
||||||
|
|
||||||
msgid "Revert Transformation per glyph."
|
msgid "Revert Transformation per glyph."
|
||||||
msgstr ""
|
msgstr "恢复按字符变形选项。"
|
||||||
|
|
||||||
msgid "Set global orientation for whole text."
|
msgid "Set global orientation for whole text."
|
||||||
msgstr ""
|
msgstr "为整段文本使用同一基准。"
|
||||||
|
|
||||||
msgid "Set position and orientation per glyph."
|
msgid "Set position and orientation per glyph."
|
||||||
msgstr ""
|
msgstr "为每个字符独立计算位置和方向。"
|
||||||
|
|
||||||
msgctxt "Alignment"
|
msgctxt "Alignment"
|
||||||
msgid "Left"
|
msgid "Left"
|
||||||
msgstr "左面"
|
msgstr "左对齐"
|
||||||
|
|
||||||
msgctxt "Alignment"
|
msgctxt "Alignment"
|
||||||
msgid "Center"
|
msgid "Center"
|
||||||
msgstr "居中"
|
msgstr "水平居中"
|
||||||
|
|
||||||
msgctxt "Alignment"
|
msgctxt "Alignment"
|
||||||
msgid "Right"
|
msgid "Right"
|
||||||
msgstr "右面"
|
msgstr "右对齐"
|
||||||
|
|
||||||
msgctxt "Alignment"
|
msgctxt "Alignment"
|
||||||
msgid "Top"
|
msgid "Top"
|
||||||
msgstr "顶部"
|
msgstr "顶对齐"
|
||||||
|
|
||||||
msgctxt "Alignment"
|
msgctxt "Alignment"
|
||||||
msgid "Middle"
|
msgid "Middle"
|
||||||
msgstr ""
|
msgstr "垂直居中"
|
||||||
|
|
||||||
msgctxt "Alignment"
|
msgctxt "Alignment"
|
||||||
msgid "Bottom"
|
msgid "Bottom"
|
||||||
msgstr "底部"
|
msgstr "底对齐"
|
||||||
|
|
||||||
msgid "Revert alignment."
|
msgid "Revert alignment."
|
||||||
msgstr ""
|
msgstr "还原对齐。"
|
||||||
|
|
||||||
#. TRN EmbossGizmo: font units
|
#. TRN EmbossGizmo: font units
|
||||||
msgid "points"
|
msgid "points"
|
||||||
msgstr ""
|
msgstr "点"
|
||||||
|
|
||||||
msgid "Revert gap between characters"
|
msgid "Revert gap between characters"
|
||||||
msgstr "恢复字间距"
|
msgstr "恢复字间距"
|
||||||
|
@ -952,13 +954,13 @@ msgid "Distance between lines"
|
||||||
msgstr "行间距"
|
msgstr "行间距"
|
||||||
|
|
||||||
msgid "Undo boldness"
|
msgid "Undo boldness"
|
||||||
msgstr ""
|
msgstr "撤销粗细调整"
|
||||||
|
|
||||||
msgid "Tiny / Wide glyphs"
|
msgid "Tiny / Wide glyphs"
|
||||||
msgstr "细小/宽大的字形"
|
msgstr "细小/粗大的字形"
|
||||||
|
|
||||||
msgid "Undo letter's skew"
|
msgid "Undo letter's skew"
|
||||||
msgstr "撤消字母的歪斜"
|
msgstr "撤消字母的斜体效果"
|
||||||
|
|
||||||
msgid "Italic strength ratio"
|
msgid "Italic strength ratio"
|
||||||
msgstr "倾斜强度比"
|
msgstr "倾斜强度比"
|
||||||
|
@ -1039,12 +1041,12 @@ msgstr "行间距"
|
||||||
|
|
||||||
#. TRN - Input label. Be short as possible
|
#. TRN - Input label. Be short as possible
|
||||||
msgid "Boldness"
|
msgid "Boldness"
|
||||||
msgstr "粗细"
|
msgstr "仿字重"
|
||||||
|
|
||||||
#. TRN - Input label. Be short as possible
|
#. TRN - Input label. Be short as possible
|
||||||
#. Like Font italic
|
#. Like Font italic
|
||||||
msgid "Skew ratio"
|
msgid "Skew ratio"
|
||||||
msgstr "斜率"
|
msgstr "仿斜体"
|
||||||
|
|
||||||
#. TRN - Input label. Be short as possible
|
#. TRN - Input label. Be short as possible
|
||||||
#. Distance from model surface to be able
|
#. Distance from model surface to be able
|
||||||
|
@ -1067,11 +1069,11 @@ msgstr "收集"
|
||||||
|
|
||||||
#. TRN - Title in Undo/Redo stack after rotate with SVG around emboss axe
|
#. TRN - Title in Undo/Redo stack after rotate with SVG around emboss axe
|
||||||
msgid "SVG rotate"
|
msgid "SVG rotate"
|
||||||
msgstr ""
|
msgstr "旋转SVG图形"
|
||||||
|
|
||||||
#. TRN - Title in Undo/Redo stack after move with SVG along emboss axe - From surface
|
#. TRN - Title in Undo/Redo stack after move with SVG along emboss axe - From surface
|
||||||
msgid "SVG move"
|
msgid "SVG move"
|
||||||
msgstr ""
|
msgstr "移动SVG图形"
|
||||||
|
|
||||||
msgid "Enter SVG gizmo"
|
msgid "Enter SVG gizmo"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1087,26 +1089,26 @@ msgstr "SVG矢量图"
|
||||||
|
|
||||||
#, boost-format
|
#, boost-format
|
||||||
msgid "Opacity (%1%)"
|
msgid "Opacity (%1%)"
|
||||||
msgstr ""
|
msgstr "不透明度 (%1%)"
|
||||||
|
|
||||||
#, boost-format
|
#, boost-format
|
||||||
msgid "Color gradient (%1%)"
|
msgid "Color gradient (%1%)"
|
||||||
msgstr ""
|
msgstr "渐变 (%1%)"
|
||||||
|
|
||||||
msgid "Undefined fill type"
|
msgid "Undefined fill type"
|
||||||
msgstr ""
|
msgstr "未定义的填充类型"
|
||||||
|
|
||||||
msgid "Linear gradient"
|
msgid "Linear gradient"
|
||||||
msgstr ""
|
msgstr "线性渐变"
|
||||||
|
|
||||||
msgid "Radial gradient"
|
msgid "Radial gradient"
|
||||||
msgstr ""
|
msgstr "径向渐变"
|
||||||
|
|
||||||
msgid "Open filled path"
|
msgid "Open filled path"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Undefined stroke type"
|
msgid "Undefined stroke type"
|
||||||
msgstr ""
|
msgstr "未定义的描边类型"
|
||||||
|
|
||||||
msgid "Path can't be healed from selfintersection and multiple points."
|
msgid "Path can't be healed from selfintersection and multiple points."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1118,7 +1120,7 @@ msgstr ""
|
||||||
|
|
||||||
#, boost-format
|
#, boost-format
|
||||||
msgid "Shape is marked as invisible (%1%)."
|
msgid "Shape is marked as invisible (%1%)."
|
||||||
msgstr ""
|
msgstr "形状已被标记为不可见 (%1%)."
|
||||||
|
|
||||||
#. TRN: The first placeholder is shape identifier, the second one is text describing the problem.
|
#. TRN: The first placeholder is shape identifier, the second one is text describing the problem.
|
||||||
#, boost-format
|
#, boost-format
|
||||||
|
@ -1127,25 +1129,25 @@ msgstr ""
|
||||||
|
|
||||||
#, boost-format
|
#, boost-format
|
||||||
msgid "Stroke of shape (%1%) is too thin (minimal width is %2% mm)."
|
msgid "Stroke of shape (%1%) is too thin (minimal width is %2% mm)."
|
||||||
msgstr ""
|
msgstr "形状 (%1%) 的描边太细了(不小于 %2% mm)。"
|
||||||
|
|
||||||
#, boost-format
|
#, boost-format
|
||||||
msgid "Stroke of shape (%1%) contains unsupported: %2%."
|
msgid "Stroke of shape (%1%) contains unsupported: %2%."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Face the camera"
|
msgid "Face the camera"
|
||||||
msgstr ""
|
msgstr "面向摄像机"
|
||||||
|
|
||||||
#. TRN - Preview of filename after clear local filepath.
|
#. TRN - Preview of filename after clear local filepath.
|
||||||
msgid "Unknown filename"
|
msgid "Unknown filename"
|
||||||
msgstr ""
|
msgstr "未知文件名"
|
||||||
|
|
||||||
#, boost-format
|
#, boost-format
|
||||||
msgid "SVG file path is \"%1%\""
|
msgid "SVG file path is \"%1%\""
|
||||||
msgstr ""
|
msgstr "SVG文件路径:\"%1%\""
|
||||||
|
|
||||||
msgid "Reload SVG file from disk."
|
msgid "Reload SVG file from disk."
|
||||||
msgstr ""
|
msgstr "从磁盘重新加载SVG文件。"
|
||||||
|
|
||||||
msgid "Change file"
|
msgid "Change file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1173,10 +1175,10 @@ msgid "Save as"
|
||||||
msgstr "另存为"
|
msgstr "另存为"
|
||||||
|
|
||||||
msgid "Save SVG file"
|
msgid "Save SVG file"
|
||||||
msgstr ""
|
msgstr "保存SVG文件"
|
||||||
|
|
||||||
msgid "Save as '.svg' file"
|
msgid "Save as '.svg' file"
|
||||||
msgstr ""
|
msgstr "另存为“.svg”文件"
|
||||||
|
|
||||||
msgid "Size in emboss direction."
|
msgid "Size in emboss direction."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1406,6 +1408,8 @@ msgid ""
|
||||||
"features.\n"
|
"features.\n"
|
||||||
"Click Yes to install it now."
|
"Click Yes to install it now."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Orca Slicer 依赖 Microsoft WebView2 运行时以运行部分功能。\n"
|
||||||
|
"请点击 Yes 进行安装。"
|
||||||
|
|
||||||
msgid "WebView2 Runtime"
|
msgid "WebView2 Runtime"
|
||||||
msgstr "WebView2 运行库"
|
msgstr "WebView2 运行库"
|
||||||
|
@ -1441,6 +1445,9 @@ msgid ""
|
||||||
"Please note, application settings will be lost, but printer profiles will "
|
"Please note, application settings will be lost, but printer profiles will "
|
||||||
"not be affected."
|
"not be affected."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"OrcaSlicer 配置文件无法解析,可能已经损坏。\n"
|
||||||
|
"OrcaSlicer 已尝试重新创建配置文件。\n"
|
||||||
|
"请注意,您的程序设置会丢失,但打印机配置文件不会受到影响。"
|
||||||
|
|
||||||
msgid "Rebuild"
|
msgid "Rebuild"
|
||||||
msgstr "重新构建"
|
msgstr "重新构建"
|
||||||
|
@ -1695,6 +1702,13 @@ msgid ""
|
||||||
"Yes - Change these settings automatically\n"
|
"Yes - Change these settings automatically\n"
|
||||||
"No - Do not change these settings for me"
|
"No - Do not change these settings for me"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"该模型顶面具有文字浮雕。\n"
|
||||||
|
"为了获得最佳效果,我们推荐您将“单层墙阈值”设置为 0 "
|
||||||
|
"以使“仅首层单层墙”效果最佳。\n"
|
||||||
|
"\n"
|
||||||
|
"自动调整这些设置?\n"
|
||||||
|
"是 - 自动调整这些设置\n"
|
||||||
|
"否 - 不用为我调整这些设置"
|
||||||
|
|
||||||
msgid "Text"
|
msgid "Text"
|
||||||
msgstr "文字浮雕"
|
msgstr "文字浮雕"
|
||||||
|
@ -1899,7 +1913,7 @@ msgid "arrange current plate"
|
||||||
msgstr "在当前盘执行自动摆放"
|
msgstr "在当前盘执行自动摆放"
|
||||||
|
|
||||||
msgid "Reload All"
|
msgid "Reload All"
|
||||||
msgstr ""
|
msgstr "重新加载全部"
|
||||||
|
|
||||||
msgid "reload all from disk"
|
msgid "reload all from disk"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -2306,7 +2320,7 @@ msgid "Check the status of current system services"
|
||||||
msgstr "请检查当前系统服务状态"
|
msgstr "请检查当前系统服务状态"
|
||||||
|
|
||||||
msgid "code"
|
msgid "code"
|
||||||
msgstr ""
|
msgstr "代码"
|
||||||
|
|
||||||
msgid "Failed to connect to cloud service"
|
msgid "Failed to connect to cloud service"
|
||||||
msgstr "无法连接到云服务"
|
msgstr "无法连接到云服务"
|
||||||
|
@ -2477,7 +2491,7 @@ msgid "Orienting"
|
||||||
msgstr "自动朝向中..."
|
msgstr "自动朝向中..."
|
||||||
|
|
||||||
msgid "Orienting canceled."
|
msgid "Orienting canceled."
|
||||||
msgstr ""
|
msgstr "自动朝向已取消。"
|
||||||
|
|
||||||
msgid "Filling"
|
msgid "Filling"
|
||||||
msgstr "正在填充"
|
msgstr "正在填充"
|
||||||
|
@ -2654,7 +2668,7 @@ msgid "GNU Affero General Public License, version 3"
|
||||||
msgstr "GNU Affero 通用公共许可证,版本 3下授权的"
|
msgstr "GNU Affero 通用公共许可证,版本 3下授权的"
|
||||||
|
|
||||||
msgid "Orca Slicer is based on PrusaSlicer and BambuStudio"
|
msgid "Orca Slicer is based on PrusaSlicer and BambuStudio"
|
||||||
msgstr ""
|
msgstr "Orca Slicer 基于 PrusaSlicer 以及 BambuStudio 开发"
|
||||||
|
|
||||||
msgid "Libraries"
|
msgid "Libraries"
|
||||||
msgstr "库"
|
msgstr "库"
|
||||||
|
@ -2672,10 +2686,10 @@ msgid "Orca Slicer "
|
||||||
msgstr "逆戟鲸切片"
|
msgstr "逆戟鲸切片"
|
||||||
|
|
||||||
msgid "OrcaSlicer is based on BambuStudio, PrusaSlicer, and SuperSlicer."
|
msgid "OrcaSlicer is based on BambuStudio, PrusaSlicer, and SuperSlicer."
|
||||||
msgstr ""
|
msgstr "OrcaSlicer基于BambuStudio、PrusaSlicer 以及SuperSlicer开发。"
|
||||||
|
|
||||||
msgid "BambuStudio is originally based on PrusaSlicer by PrusaResearch."
|
msgid "BambuStudio is originally based on PrusaSlicer by PrusaResearch."
|
||||||
msgstr ""
|
msgstr "BambuStudio基于PrusaResearch的PrusaSlicer开发而来。"
|
||||||
|
|
||||||
msgid "PrusaSlicer is originally based on Slic3r by Alessandro Ranellucci."
|
msgid "PrusaSlicer is originally based on Slic3r by Alessandro Ranellucci."
|
||||||
msgstr "PrusaSlicer最初是基于Alessandro Ranellucci的Slic3r。"
|
msgstr "PrusaSlicer最初是基于Alessandro Ranellucci的Slic3r。"
|
||||||
|
@ -2713,7 +2727,7 @@ msgstr "最小"
|
||||||
|
|
||||||
#, boost-format
|
#, boost-format
|
||||||
msgid "The input value should be greater than %1% and less than %2%"
|
msgid "The input value should be greater than %1% and less than %2%"
|
||||||
msgstr "输入的范围在 %1% 和 %2% 之间"
|
msgstr "输入的范围应当在 %1% 和 %2% 之间"
|
||||||
|
|
||||||
msgid "SN"
|
msgid "SN"
|
||||||
msgstr "序列号"
|
msgstr "序列号"
|
||||||
|
@ -2851,7 +2865,7 @@ msgid "Print with the filament mounted on the back of chassis"
|
||||||
msgstr "使用机箱背后挂载的材料打印"
|
msgstr "使用机箱背后挂载的材料打印"
|
||||||
|
|
||||||
msgid "Current Cabin humidity"
|
msgid "Current Cabin humidity"
|
||||||
msgstr ""
|
msgstr "当前舱内湿度"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Please change the desiccant when it is too wet. The indicator may not "
|
"Please change the desiccant when it is too wet. The indicator may not "
|
||||||
|
@ -2912,10 +2926,10 @@ msgstr ""
|
||||||
"(目前支持品牌、材料种类、颜色相同的耗材的自动补给)"
|
"(目前支持品牌、材料种类、颜色相同的耗材的自动补给)"
|
||||||
|
|
||||||
msgid "DRY"
|
msgid "DRY"
|
||||||
msgstr ""
|
msgstr "干燥"
|
||||||
|
|
||||||
msgid "WET"
|
msgid "WET"
|
||||||
msgstr ""
|
msgstr "潮湿"
|
||||||
|
|
||||||
msgid "AMS Settings"
|
msgid "AMS Settings"
|
||||||
msgstr "AMS 设置"
|
msgstr "AMS 设置"
|
||||||
|
@ -3300,13 +3314,13 @@ msgid "Timelapse"
|
||||||
msgstr "延时摄影"
|
msgstr "延时摄影"
|
||||||
|
|
||||||
msgid "Flow Dynamic Calibration"
|
msgid "Flow Dynamic Calibration"
|
||||||
msgstr ""
|
msgstr "动态流量校准"
|
||||||
|
|
||||||
msgid "Send Options"
|
msgid "Send Options"
|
||||||
msgstr "发送选项"
|
msgstr "发送选项"
|
||||||
|
|
||||||
msgid "Send to"
|
msgid "Send to"
|
||||||
msgstr ""
|
msgstr "发送至"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"printers at the same time.(It depends on how many devices can undergo "
|
"printers at the same time.(It depends on how many devices can undergo "
|
||||||
|
@ -3770,7 +3784,7 @@ msgstr "缺省"
|
||||||
|
|
||||||
#, boost-format
|
#, boost-format
|
||||||
msgid "Edit Custom G-code (%1%)"
|
msgid "Edit Custom G-code (%1%)"
|
||||||
msgstr ""
|
msgstr "编辑自定义G-code (%1%)"
|
||||||
|
|
||||||
msgid "Built-in placeholders (Double click item to add to G-code)"
|
msgid "Built-in placeholders (Double click item to add to G-code)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -3809,7 +3823,7 @@ msgid "Temperatures"
|
||||||
msgstr "温度"
|
msgstr "温度"
|
||||||
|
|
||||||
msgid "Timestamps"
|
msgid "Timestamps"
|
||||||
msgstr ""
|
msgstr "时间戳"
|
||||||
|
|
||||||
#, boost-format
|
#, boost-format
|
||||||
msgid "Specific for %1%"
|
msgid "Specific for %1%"
|
||||||
|
@ -4302,10 +4316,10 @@ msgid "Enable"
|
||||||
msgstr "开启"
|
msgstr "开启"
|
||||||
|
|
||||||
msgid "Hostname or IP"
|
msgid "Hostname or IP"
|
||||||
msgstr ""
|
msgstr "主机名或IP地址"
|
||||||
|
|
||||||
msgid "Custom camera source"
|
msgid "Custom camera source"
|
||||||
msgstr ""
|
msgstr "自定义摄像机源"
|
||||||
|
|
||||||
msgid "Show \"Live Video\" guide page."
|
msgid "Show \"Live Video\" guide page."
|
||||||
msgstr "显示\"直播视频流\"指南"
|
msgstr "显示\"直播视频流\"指南"
|
||||||
|
@ -4425,38 +4439,38 @@ msgstr "默认视图"
|
||||||
|
|
||||||
#. TRN To be shown in the main menu View->Top
|
#. TRN To be shown in the main menu View->Top
|
||||||
msgid "Top"
|
msgid "Top"
|
||||||
msgstr "顶部"
|
msgstr "上"
|
||||||
|
|
||||||
msgid "Top View"
|
msgid "Top View"
|
||||||
msgstr "顶部视图"
|
msgstr "顶部视图"
|
||||||
|
|
||||||
#. TRN To be shown in the main menu View->Bottom
|
#. TRN To be shown in the main menu View->Bottom
|
||||||
msgid "Bottom"
|
msgid "Bottom"
|
||||||
msgstr "底部"
|
msgstr "下"
|
||||||
|
|
||||||
msgid "Bottom View"
|
msgid "Bottom View"
|
||||||
msgstr "底部视图"
|
msgstr "底部视图"
|
||||||
|
|
||||||
msgid "Front"
|
msgid "Front"
|
||||||
msgstr "前面"
|
msgstr "前"
|
||||||
|
|
||||||
msgid "Front View"
|
msgid "Front View"
|
||||||
msgstr "前视图"
|
msgstr "前视图"
|
||||||
|
|
||||||
msgid "Rear"
|
msgid "Rear"
|
||||||
msgstr "后面"
|
msgstr "后"
|
||||||
|
|
||||||
msgid "Rear View"
|
msgid "Rear View"
|
||||||
msgstr "后视图"
|
msgstr "后视图"
|
||||||
|
|
||||||
msgid "Left"
|
msgid "Left"
|
||||||
msgstr "左面"
|
msgstr "左"
|
||||||
|
|
||||||
msgid "Left View"
|
msgid "Left View"
|
||||||
msgstr "左视图"
|
msgstr "左视图"
|
||||||
|
|
||||||
msgid "Right"
|
msgid "Right"
|
||||||
msgstr "右面"
|
msgstr "右"
|
||||||
|
|
||||||
msgid "Right View"
|
msgid "Right View"
|
||||||
msgstr "右视图"
|
msgstr "右视图"
|
||||||
|
@ -4498,10 +4512,10 @@ msgid "Load a model"
|
||||||
msgstr "加载模型"
|
msgstr "加载模型"
|
||||||
|
|
||||||
msgid "Import Zip Archive"
|
msgid "Import Zip Archive"
|
||||||
msgstr ""
|
msgstr "导入 ZIP 压缩文件"
|
||||||
|
|
||||||
msgid "Load models contained within a zip archive"
|
msgid "Load models contained within a zip archive"
|
||||||
msgstr ""
|
msgstr "从 ZIP 压缩文件中导入一个或多个模型"
|
||||||
|
|
||||||
msgid "Import Configs"
|
msgid "Import Configs"
|
||||||
msgstr "导入预设"
|
msgstr "导入预设"
|
||||||
|
@ -4769,6 +4783,8 @@ msgid ""
|
||||||
"Hint: Make sure you have added the corresponding printer before importing "
|
"Hint: Make sure you have added the corresponding printer before importing "
|
||||||
"the configs."
|
"the configs."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"\n"
|
||||||
|
"注意:请确保您在导入配置前,已经添加了相应的打印机。"
|
||||||
|
|
||||||
msgid "Import result"
|
msgid "Import result"
|
||||||
msgstr "导入结果"
|
msgstr "导入结果"
|
||||||
|
@ -5122,7 +5138,7 @@ msgid "Camera Setting"
|
||||||
msgstr "相机设置"
|
msgstr "相机设置"
|
||||||
|
|
||||||
msgid "Switch Camera View"
|
msgid "Switch Camera View"
|
||||||
msgstr ""
|
msgstr "切换相机视图"
|
||||||
|
|
||||||
msgid "Control"
|
msgid "Control"
|
||||||
msgstr "控制"
|
msgstr "控制"
|
||||||
|
@ -5380,7 +5396,7 @@ msgid "Latest Version: "
|
||||||
msgstr "最新版本:"
|
msgstr "最新版本:"
|
||||||
|
|
||||||
msgid "Not for now"
|
msgid "Not for now"
|
||||||
msgstr ""
|
msgstr "暂不"
|
||||||
|
|
||||||
msgid "3D Mouse disconnected."
|
msgid "3D Mouse disconnected."
|
||||||
msgstr "3D鼠标断连。"
|
msgstr "3D鼠标断连。"
|
||||||
|
@ -5594,7 +5610,7 @@ msgid "View all object's settings"
|
||||||
msgstr "查看所有对象的配置"
|
msgstr "查看所有对象的配置"
|
||||||
|
|
||||||
msgid "Material settings"
|
msgid "Material settings"
|
||||||
msgstr ""
|
msgstr "材料设置"
|
||||||
|
|
||||||
msgid "Remove current plate (if not last one)"
|
msgid "Remove current plate (if not last one)"
|
||||||
msgstr "移除当前板(如果不是最后一个)"
|
msgstr "移除当前板(如果不是最后一个)"
|
||||||
|
@ -5612,7 +5628,7 @@ msgid "Lock current plate"
|
||||||
msgstr "锁定当前板"
|
msgstr "锁定当前板"
|
||||||
|
|
||||||
msgid "Edit current plate name"
|
msgid "Edit current plate name"
|
||||||
msgstr ""
|
msgstr "编辑当前盘名"
|
||||||
|
|
||||||
msgid "Customize current plate"
|
msgid "Customize current plate"
|
||||||
msgstr "自定义当前板"
|
msgstr "自定义当前板"
|
||||||
|
@ -6285,7 +6301,8 @@ msgstr "局域网模式"
|
||||||
msgid ""
|
msgid ""
|
||||||
"This stops the transmission of data to Bambu's cloud services. Users who "
|
"This stops the transmission of data to Bambu's cloud services. Users who "
|
||||||
"don't use BBL machines or use LAN mode only can safely turn on this function."
|
"don't use BBL machines or use LAN mode only can safely turn on this function."
|
||||||
msgstr ""
|
msgstr "停止向拓竹科技服务器发送数据。如果您不使用Bambu "
|
||||||
|
"Lab的打印机或仅使用局域网模式,则可以安全地启用此功能。"
|
||||||
|
|
||||||
msgid "Enable network plugin"
|
msgid "Enable network plugin"
|
||||||
msgstr "启用网络插件"
|
msgstr "启用网络插件"
|
||||||
|
@ -6303,7 +6320,7 @@ msgid "Units"
|
||||||
msgstr "单位"
|
msgstr "单位"
|
||||||
|
|
||||||
msgid "Allow only one OrcaSlicer instance"
|
msgid "Allow only one OrcaSlicer instance"
|
||||||
msgstr ""
|
msgstr "同时仅运行一个 OrcaSlicer 实例"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"On OSX there is always only one instance of app running by default. However "
|
"On OSX there is always only one instance of app running by default. However "
|
||||||
|
@ -6317,28 +6334,32 @@ msgid ""
|
||||||
"If this is enabled, when starting OrcaSlicer and another instance of the "
|
"If this is enabled, when starting OrcaSlicer and another instance of the "
|
||||||
"same OrcaSlicer is already running, that instance will be reactivated "
|
"same OrcaSlicer is already running, that instance will be reactivated "
|
||||||
"instead."
|
"instead."
|
||||||
msgstr ""
|
msgstr "如果启用,当您在已经启动一个 OrcaSlicer 实例时再次启动 OrcaSlicer ,"
|
||||||
|
"将会激活您已经启动的 OrcaSlicer 实例。"
|
||||||
|
|
||||||
msgid "Home"
|
msgid "Home"
|
||||||
msgstr "首页"
|
msgstr "首页"
|
||||||
|
|
||||||
msgid "Default Page"
|
msgid "Default Page"
|
||||||
msgstr ""
|
msgstr "起始页"
|
||||||
|
|
||||||
msgid "Set the page opened on startup."
|
msgid "Set the page opened on startup."
|
||||||
msgstr ""
|
msgstr "设置启动OrcaSlicer时首先显示的页面。"
|
||||||
|
|
||||||
msgid "Touchpad"
|
msgid "Touchpad"
|
||||||
msgstr ""
|
msgstr "触控板"
|
||||||
|
|
||||||
msgid "Camera style"
|
msgid "Camera style"
|
||||||
msgstr ""
|
msgstr "视角控制模式"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Select camera navigation style.\n"
|
"Select camera navigation style.\n"
|
||||||
"Default: LMB+move for rotation, RMB/MMB+move for panning.\n"
|
"Default: LMB+move for rotation, RMB/MMB+move for panning.\n"
|
||||||
"Touchpad: Alt+move for rotation, Shift+move for panning."
|
"Touchpad: Alt+move for rotation, Shift+move for panning."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"选择摄像机的导航模式。\n"
|
||||||
|
"缺省:鼠标左键+拖动 旋转,鼠标右键+拖动 平移;\n"
|
||||||
|
"触控板:Alt+拖动 旋转,Shift+拖动 平移。"
|
||||||
|
|
||||||
msgid "Zoom to mouse position"
|
msgid "Zoom to mouse position"
|
||||||
msgstr "放大到鼠标位置"
|
msgstr "放大到鼠标位置"
|
||||||
|
@ -6355,10 +6376,10 @@ msgid "If enabled, use free camera. If not enabled, use constrained camera."
|
||||||
msgstr "如果启用,使用自由视角。如果未启用,使用约束视角。"
|
msgstr "如果启用,使用自由视角。如果未启用,使用约束视角。"
|
||||||
|
|
||||||
msgid "Reverse mouse zoom"
|
msgid "Reverse mouse zoom"
|
||||||
msgstr ""
|
msgstr "反转鼠标缩放"
|
||||||
|
|
||||||
msgid "If enabled, reverses the direction of zoom with mouse wheel."
|
msgid "If enabled, reverses the direction of zoom with mouse wheel."
|
||||||
msgstr ""
|
msgstr "如果启用,使用鼠标滚轮缩放的方向会反转。"
|
||||||
|
|
||||||
msgid "Show splash screen"
|
msgid "Show splash screen"
|
||||||
msgstr "显示启动画面"
|
msgstr "显示启动画面"
|
||||||
|
@ -6386,15 +6407,15 @@ msgid "If enabled, auto-calculate every time when filament is changed"
|
||||||
msgstr "如果启用,会在每一次更换材料时自动计算。"
|
msgstr "如果启用,会在每一次更换材料时自动计算。"
|
||||||
|
|
||||||
msgid "Remember printer configuration"
|
msgid "Remember printer configuration"
|
||||||
msgstr ""
|
msgstr "记住打印机选项"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"If enabled, Orca will remember and switch filament/process configuration for "
|
"If enabled, Orca will remember and switch filament/process configuration for "
|
||||||
"each printer automatically."
|
"each printer automatically."
|
||||||
msgstr ""
|
msgstr "如果启用,Orca会自动记录并切换您不同打印机之间的耗材配置与打印参数。"
|
||||||
|
|
||||||
msgid "Multi-device Management(Take effect after restarting Orca)."
|
msgid "Multi-device Management(Take effect after restarting Orca)."
|
||||||
msgstr ""
|
msgstr "多设备管理 (重启Orca后生效)"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"With this option enabled, you can send a task to multiple devices at the "
|
"With this option enabled, you can send a task to multiple devices at the "
|
||||||
|
@ -6787,22 +6808,22 @@ msgid "Busy"
|
||||||
msgstr "忙碌"
|
msgstr "忙碌"
|
||||||
|
|
||||||
msgid "Bambu Cool Plate"
|
msgid "Bambu Cool Plate"
|
||||||
msgstr "低温打印热床"
|
msgstr "低温打印板"
|
||||||
|
|
||||||
msgid "PLA Plate"
|
msgid "PLA Plate"
|
||||||
msgstr "PLA打印板"
|
msgstr "PLA打印板"
|
||||||
|
|
||||||
msgid "Bambu Engineering Plate"
|
msgid "Bambu Engineering Plate"
|
||||||
msgstr "工程打印热床"
|
msgstr "工程材料打印板"
|
||||||
|
|
||||||
msgid "Bambu Smooth PEI Plate"
|
msgid "Bambu Smooth PEI Plate"
|
||||||
msgstr ""
|
msgstr "光面PEI打印板"
|
||||||
|
|
||||||
msgid "High temperature Plate"
|
msgid "High temperature Plate"
|
||||||
msgstr "高温打印热床"
|
msgstr "高温打印板"
|
||||||
|
|
||||||
msgid "Bambu Textured PEI Plate"
|
msgid "Bambu Textured PEI Plate"
|
||||||
msgstr ""
|
msgstr "纹理PEI打印板"
|
||||||
|
|
||||||
msgid "Send print job to"
|
msgid "Send print job to"
|
||||||
msgstr "发送打印任务至"
|
msgstr "发送打印任务至"
|
||||||
|
@ -7750,6 +7771,8 @@ msgid ""
|
||||||
"You can discard the preset values you have modified, or choose to transfer "
|
"You can discard the preset values you have modified, or choose to transfer "
|
||||||
"the modified values to the new project"
|
"the modified values to the new project"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"\n"
|
||||||
|
"您可以放弃已修改的预设值,或者将修改后的值转移到新项目"
|
||||||
|
|
||||||
msgid "Extruders count"
|
msgid "Extruders count"
|
||||||
msgstr "挤出机数量"
|
msgstr "挤出机数量"
|
||||||
|
@ -8177,7 +8200,7 @@ msgid "Camera view - Bottom"
|
||||||
msgstr "摄像机视角 - 底部"
|
msgstr "摄像机视角 - 底部"
|
||||||
|
|
||||||
msgid "Camera view - Front"
|
msgid "Camera view - Front"
|
||||||
msgstr "摄像机视角 - 前面"
|
msgstr "摄像机视角 - 正面"
|
||||||
|
|
||||||
msgid "Camera view - Behind"
|
msgid "Camera view - Behind"
|
||||||
msgstr "摄像机视角 - 后面"
|
msgstr "摄像机视角 - 后面"
|
||||||
|
@ -9435,7 +9458,7 @@ msgid "Slow down for overhang"
|
||||||
msgstr "悬垂降速"
|
msgstr "悬垂降速"
|
||||||
|
|
||||||
msgid "Enable this option to slow printing down for different overhang degree"
|
msgid "Enable this option to slow printing down for different overhang degree"
|
||||||
msgstr "打开这个选项将降低不同悬垂程度的走线的打印速度"
|
msgstr "启用此选项将降低不同悬垂程度的走线的打印速度"
|
||||||
|
|
||||||
msgid "Slow down for curled perimeters"
|
msgid "Slow down for curled perimeters"
|
||||||
msgstr "翘边降速"
|
msgstr "翘边降速"
|
||||||
|
@ -10691,12 +10714,18 @@ msgid ""
|
||||||
"quality as line segments are converted to arcs by the slicer and then back "
|
"quality as line segments are converted to arcs by the slicer and then back "
|
||||||
"to line segments by the firmware."
|
"to line segments by the firmware."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"启用此设置,导出的G-code将包含G2 G3指令。圆弧拟合的容许值和精度相同。\n"
|
||||||
|
"\n"
|
||||||
|
"请注意:对于使用Klipper的打印机,建议禁用此选项。\n"
|
||||||
|
"Klipper打印机并不会从圆弧拟合中受益,因为这些命令会被固件\n"
|
||||||
|
"重新分割为线段。由于切片软件将线段转换为圆弧后再次被转换为\n"
|
||||||
|
"线段进行打印,这样操作会导致打印件表面质量下降。"
|
||||||
|
|
||||||
msgid "Add line number"
|
msgid "Add line number"
|
||||||
msgstr "标注行号"
|
msgstr "标注行号"
|
||||||
|
|
||||||
msgid "Enable this to add line number(Nx) at the beginning of each G-Code line"
|
msgid "Enable this to add line number(Nx) at the beginning of each G-Code line"
|
||||||
msgstr "打开这个设置,G-code的每一行的开头会增加Nx标注行号。"
|
msgstr "启用该设置,G-code的每一行的开头会增加Nx标注行号。"
|
||||||
|
|
||||||
msgid "Scan first layer"
|
msgid "Scan first layer"
|
||||||
msgstr "首层扫描"
|
msgstr "首层扫描"
|
||||||
|
@ -10744,16 +10773,16 @@ msgid "The physical arrangement and components of a printing device"
|
||||||
msgstr "打印设备的物理结构和组件"
|
msgstr "打印设备的物理结构和组件"
|
||||||
|
|
||||||
msgid "CoreXY"
|
msgid "CoreXY"
|
||||||
msgstr ""
|
msgstr "CoreXY"
|
||||||
|
|
||||||
msgid "I3"
|
msgid "I3"
|
||||||
msgstr ""
|
msgstr "I3"
|
||||||
|
|
||||||
msgid "Hbot"
|
msgid "Hbot"
|
||||||
msgstr ""
|
msgstr "Hbot"
|
||||||
|
|
||||||
msgid "Delta"
|
msgid "Delta"
|
||||||
msgstr ""
|
msgstr "Delta(三角洲)"
|
||||||
|
|
||||||
msgid "Best object position"
|
msgid "Best object position"
|
||||||
msgstr "最佳对象位置"
|
msgstr "最佳对象位置"
|
||||||
|
@ -10806,7 +10835,7 @@ msgid "The printer cost per hour"
|
||||||
msgstr "打印机每小时的成本"
|
msgstr "打印机每小时的成本"
|
||||||
|
|
||||||
msgid "money/h"
|
msgid "money/h"
|
||||||
msgstr ""
|
msgstr "元/时"
|
||||||
|
|
||||||
msgid "Support control chamber temperature"
|
msgid "Support control chamber temperature"
|
||||||
msgstr "支持仓温控制"
|
msgstr "支持仓温控制"
|
||||||
|
@ -11309,7 +11338,8 @@ msgid ""
|
||||||
"The minimum printing speed that the printer will slow down to to attempt to "
|
"The minimum printing speed that the printer will slow down to to attempt to "
|
||||||
"maintain the minimum layer time above, when slow down for better layer "
|
"maintain the minimum layer time above, when slow down for better layer "
|
||||||
"cooling is enabled."
|
"cooling is enabled."
|
||||||
msgstr ""
|
msgstr "在您启用“降低打印速度 "
|
||||||
|
"以得到更好的冷却”选项时最小的打印速度,以尝试保持上方设置的最小层时间。"
|
||||||
|
|
||||||
msgid "Nozzle diameter"
|
msgid "Nozzle diameter"
|
||||||
msgstr "喷嘴直径"
|
msgstr "喷嘴直径"
|
||||||
|
@ -11485,6 +11515,10 @@ msgid ""
|
||||||
"argument, and they can access the Orca Slicer config settings by reading "
|
"argument, and they can access the Orca Slicer config settings by reading "
|
||||||
"environment variables."
|
"environment variables."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"如果您希望使用自定义脚本来处理输出的 "
|
||||||
|
"G-code,只需要在此列出这些脚本的绝对路径,使用分号来分割多个脚本。"
|
||||||
|
"脚本执行的第一个参数将会被设置为 G-code 文件的绝对路径,"
|
||||||
|
"并支持脚本通过全局变量来读取 Orca Slicer 的设置。"
|
||||||
|
|
||||||
msgid "Printer notes"
|
msgid "Printer notes"
|
||||||
msgstr "打印机注释"
|
msgstr "打印机注释"
|
||||||
|
@ -11710,7 +11744,7 @@ msgstr "禁用M73剩余打印时间"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Disable generating of the M73: Set remaining print time in the final gcode"
|
"Disable generating of the M73: Set remaining print time in the final gcode"
|
||||||
msgstr ""
|
msgstr "在最终生成的G-code中禁用M73命令:设置剩余打印时间"
|
||||||
|
|
||||||
msgid "Seam position"
|
msgid "Seam position"
|
||||||
msgstr "接缝位置"
|
msgstr "接缝位置"
|
||||||
|
@ -11932,12 +11966,21 @@ msgid ""
|
||||||
"distance from the object. Therefore, if brims are active it may intersect "
|
"distance from the object. Therefore, if brims are active it may intersect "
|
||||||
"with them. To avoid this, increase the skirt distance value.\n"
|
"with them. To avoid this, increase the skirt distance value.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"打印风挡有助于保护ABS或ASA材料的打印件,避免因气流流动产生变形或从打印床上脱"
|
||||||
|
"落。通常只有在开放式框架打印机上需要使用它,即没有封箱的打印机。\n"
|
||||||
|
"\n"
|
||||||
|
"选项:\n"
|
||||||
|
"启用 = Skirt和您的打印物体一样高。\n"
|
||||||
|
"限制 = Skirt高度将由Skirt高度选项指定。\n"
|
||||||
|
"\n"
|
||||||
|
"注意:当风挡功能启用时,Skirt将在远离物体自身的Skirt一定距离处打印。因此,如"
|
||||||
|
"果同时启用了Brims,则可能与Skirt相交。为避免这种情况,请增加Skirt距离值。\n"
|
||||||
|
|
||||||
msgid "Limited"
|
msgid "Limited"
|
||||||
msgstr "限制"
|
msgstr "限制"
|
||||||
|
|
||||||
msgid "Enabled"
|
msgid "Enabled"
|
||||||
msgstr "打开"
|
msgstr "启用"
|
||||||
|
|
||||||
msgid "Skirt loops"
|
msgid "Skirt loops"
|
||||||
msgstr "Skirt圈数"
|
msgstr "Skirt圈数"
|
||||||
|
@ -12061,6 +12104,10 @@ msgid ""
|
||||||
"printing, where we use M600/PAUSE to trigger the manual filament change "
|
"printing, where we use M600/PAUSE to trigger the manual filament change "
|
||||||
"action."
|
"action."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"启用该选项可以在打印开始时省略自定义更换耗材丝的 "
|
||||||
|
"G-code。整个打印过程中的工具头指令(如 "
|
||||||
|
"T0)将会被跳过。这对于手动多材料打印十分有用,其将会使用 M600/PAUSE "
|
||||||
|
"指令来使您可以进行手动对耗材丝进行更换。"
|
||||||
|
|
||||||
msgid "Purge in prime tower"
|
msgid "Purge in prime tower"
|
||||||
msgstr "冲刷进擦拭塔"
|
msgstr "冲刷进擦拭塔"
|
||||||
|
@ -12072,7 +12119,7 @@ msgid "Enable filament ramming"
|
||||||
msgstr "启用耗材尖端成型"
|
msgstr "启用耗材尖端成型"
|
||||||
|
|
||||||
msgid "No sparse layers (beta)"
|
msgid "No sparse layers (beta)"
|
||||||
msgstr ""
|
msgstr "无稀疏层 (实验)"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"If enabled, the wipe tower will not be printed on layers with no "
|
"If enabled, the wipe tower will not be printed on layers with no "
|
||||||
|
@ -12319,6 +12366,11 @@ msgid ""
|
||||||
"style will create similar structure to normal support under large flat "
|
"style will create similar structure to normal support under large flat "
|
||||||
"overhangs."
|
"overhangs."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"支撑物的样式和形状。对于普通支撑,将支撑投射到一个规则的网格中,将创建更稳定"
|
||||||
|
"的支撑(默认),而紧贴的支撑塔将节省材料并减少物体的瑕疵。\n"
|
||||||
|
"对于树形支撑,苗条树将更激进地合并树枝,并节省大量的材料;粗壮树会产生更大更"
|
||||||
|
"强壮的支撑结构,但用料更多;而混合树是苗条树和普通支撑的结合,它会在大的平面"
|
||||||
|
"悬垂下创建与正常支撑类似的结构(默认)。"
|
||||||
|
|
||||||
msgid "Snug"
|
msgid "Snug"
|
||||||
msgstr "紧贴"
|
msgstr "紧贴"
|
||||||
|
@ -12481,6 +12533,9 @@ msgid ""
|
||||||
"added before \"machine_start_gcode\"\n"
|
"added before \"machine_start_gcode\"\n"
|
||||||
"G-code commands: M141/M191 S(0-255)"
|
"G-code commands: M141/M191 S(0-255)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"启用该选项以控制打印仓温度,这将会在\"machine_start_gcode"
|
||||||
|
"\"之前添加一个M191命令。\n"
|
||||||
|
"G-code命令:M141/M191 S(0-255)"
|
||||||
|
|
||||||
msgid "Chamber temperature"
|
msgid "Chamber temperature"
|
||||||
msgstr "机箱温度"
|
msgstr "机箱温度"
|
||||||
|
@ -12583,6 +12638,13 @@ msgid ""
|
||||||
"Setting a value in the retract amount before wipe setting below will perform "
|
"Setting a value in the retract amount before wipe setting below will perform "
|
||||||
"any excess retraction before the wipe, else it will be performed after."
|
"any excess retraction before the wipe, else it will be performed after."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"喷嘴在回抽时将沿着最后路径移动的距离\n"
|
||||||
|
"\n"
|
||||||
|
"根据擦拭操作的距离以及挤出机/耗材丝回抽的速度和长度,可能需要执行额外的回抽动"
|
||||||
|
"作以收回剩余的丝材。\n"
|
||||||
|
"\n"
|
||||||
|
"在下方的擦拭前回抽量设置中输入一个数值,将在擦拭动作之前执行任何超出部分的回"
|
||||||
|
"抽,否则超出部分的回抽将在擦拭之后执行。"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"The wiping tower can be used to clean up the residue on the nozzle and "
|
"The wiping tower can be used to clean up the residue on the nozzle and "
|
||||||
|
@ -13806,7 +13868,7 @@ msgid "To k Value"
|
||||||
msgstr "结束k值"
|
msgstr "结束k值"
|
||||||
|
|
||||||
msgid "Step value"
|
msgid "Step value"
|
||||||
msgstr ""
|
msgstr "步进长度"
|
||||||
|
|
||||||
msgid "The nozzle diameter has been synchronized from the printer Settings"
|
msgid "The nozzle diameter has been synchronized from the printer Settings"
|
||||||
msgstr "喷嘴直径已从打印机设置同步"
|
msgstr "喷嘴直径已从打印机设置同步"
|
||||||
|
@ -13931,25 +13993,25 @@ msgid "Temperature calibration"
|
||||||
msgstr "温度校准"
|
msgstr "温度校准"
|
||||||
|
|
||||||
msgid "PLA"
|
msgid "PLA"
|
||||||
msgstr ""
|
msgstr "PLA"
|
||||||
|
|
||||||
msgid "ABS/ASA"
|
msgid "ABS/ASA"
|
||||||
msgstr ""
|
msgstr "ABS/ASA"
|
||||||
|
|
||||||
msgid "PETG"
|
msgid "PETG"
|
||||||
msgstr ""
|
msgstr "PETG"
|
||||||
|
|
||||||
msgid "PCTG"
|
msgid "PCTG"
|
||||||
msgstr ""
|
msgstr "PCTG"
|
||||||
|
|
||||||
msgid "TPU"
|
msgid "TPU"
|
||||||
msgstr ""
|
msgstr "TPU"
|
||||||
|
|
||||||
msgid "PA-CF"
|
msgid "PA-CF"
|
||||||
msgstr ""
|
msgstr "PA-CF"
|
||||||
|
|
||||||
msgid "PET-CF"
|
msgid "PET-CF"
|
||||||
msgstr ""
|
msgstr "PET-CF"
|
||||||
|
|
||||||
msgid "Filament type"
|
msgid "Filament type"
|
||||||
msgstr "耗材类型"
|
msgstr "耗材类型"
|
||||||
|
@ -14263,6 +14325,8 @@ msgid ""
|
||||||
"\". \n"
|
"\". \n"
|
||||||
"To add preset for more printers, Please go to printer selection"
|
"To add preset for more printers, Please go to printer selection"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"我们将会把预设重命名为“供应商类型名 @ 您选择的打印机”\n"
|
||||||
|
"如果您希望为更多打印机添加预设,请前往打印机选择页面"
|
||||||
|
|
||||||
msgid "Create Printer/Nozzle"
|
msgid "Create Printer/Nozzle"
|
||||||
msgstr "创建打印机/喷嘴"
|
msgstr "创建打印机/喷嘴"
|
||||||
|
@ -14453,6 +14517,11 @@ msgid ""
|
||||||
"page. \n"
|
"page. \n"
|
||||||
"Click \"Sync user presets\" to enable the synchronization function."
|
"Click \"Sync user presets\" to enable the synchronization function."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
"Orca 检测到您没有启用同步用户预设功能,这可能会导致您在设备页面上无法成功设置"
|
||||||
|
"耗材丝。\n"
|
||||||
|
"点击“同步用户预设”以启用同步功能。"
|
||||||
|
|
||||||
msgid "Printer Setting"
|
msgid "Printer Setting"
|
||||||
msgstr "打印机设置"
|
msgstr "打印机设置"
|
||||||
|
@ -14552,7 +14621,7 @@ msgid "Please select a type you want to export"
|
||||||
msgstr "请选择一个你想导出的类型"
|
msgstr "请选择一个你想导出的类型"
|
||||||
|
|
||||||
msgid "Failed to create temporary folder, please try Export Configs again."
|
msgid "Failed to create temporary folder, please try Export Configs again."
|
||||||
msgstr ""
|
msgstr "创建临时文件夹失败,请尝试重新导出配置文件。"
|
||||||
|
|
||||||
msgid "Edit Filament"
|
msgid "Edit Filament"
|
||||||
msgstr "编辑材料"
|
msgstr "编辑材料"
|
||||||
|
@ -14663,16 +14732,16 @@ msgid "Success!"
|
||||||
msgstr "成功!"
|
msgstr "成功!"
|
||||||
|
|
||||||
msgid "Are you sure to log out?"
|
msgid "Are you sure to log out?"
|
||||||
msgstr ""
|
msgstr "您确定要登出吗?"
|
||||||
|
|
||||||
msgid "Refresh Printers"
|
msgid "Refresh Printers"
|
||||||
msgstr "刷新打印机"
|
msgstr "刷新打印机"
|
||||||
|
|
||||||
msgid "View print host webui in Device tab"
|
msgid "View print host webui in Device tab"
|
||||||
msgstr ""
|
msgstr "在设备标签页中,查看打印机主机的WebUI"
|
||||||
|
|
||||||
msgid "Replace the BambuLab's device tab with print host webui"
|
msgid "Replace the BambuLab's device tab with print host webui"
|
||||||
msgstr ""
|
msgstr "使用打印机主机的WebUI替换BambuLab设备页面"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"HTTPS CA file is optional. It is only needed if you use HTTPS with a self-"
|
"HTTPS CA file is optional. It is only needed if you use HTTPS with a self-"
|
||||||
|
@ -15048,43 +15117,43 @@ msgstr ""
|
||||||
"耗时较长。"
|
"耗时较长。"
|
||||||
|
|
||||||
msgid "Connected to Obico successfully!"
|
msgid "Connected to Obico successfully!"
|
||||||
msgstr ""
|
msgstr "已成功连接到Obico"
|
||||||
|
|
||||||
msgid "Could not connect to Obico"
|
msgid "Could not connect to Obico"
|
||||||
msgstr ""
|
msgstr "无法连接到Obico"
|
||||||
|
|
||||||
msgid "Connected to SimplyPrint successfully!"
|
msgid "Connected to SimplyPrint successfully!"
|
||||||
msgstr ""
|
msgstr "已成功连接到SimplyPrint"
|
||||||
|
|
||||||
msgid "Could not connect to SimplyPrint"
|
msgid "Could not connect to SimplyPrint"
|
||||||
msgstr ""
|
msgstr "无法连接到SimplyPrint"
|
||||||
|
|
||||||
msgid "Internal error"
|
msgid "Internal error"
|
||||||
msgstr ""
|
msgstr "内部错误"
|
||||||
|
|
||||||
msgid "Unknown error"
|
msgid "Unknown error"
|
||||||
msgstr ""
|
msgstr "未知错误"
|
||||||
|
|
||||||
msgid "SimplyPrint account not linked. Go to Connect options to set it up."
|
msgid "SimplyPrint account not linked. Go to Connect options to set it up."
|
||||||
msgstr ""
|
msgstr "尚未连接到SimplyPrint账户,前往连接选项来进行配置。"
|
||||||
|
|
||||||
msgid "Connection to Flashforge works correctly."
|
msgid "Connection to Flashforge works correctly."
|
||||||
msgstr ""
|
msgstr "与Flashforge的连接工作正常。"
|
||||||
|
|
||||||
msgid "Could not connect to Flashforge"
|
msgid "Could not connect to Flashforge"
|
||||||
msgstr ""
|
msgstr "无法连接至Flashforge"
|
||||||
|
|
||||||
msgid "The provided state is not correct."
|
msgid "The provided state is not correct."
|
||||||
msgstr ""
|
msgstr "提供的状态不正确。"
|
||||||
|
|
||||||
msgid "Please give the required permissions when authorizing this application."
|
msgid "Please give the required permissions when authorizing this application."
|
||||||
msgstr ""
|
msgstr "在您为此应用程序进行授权时,请允许所需的权限。"
|
||||||
|
|
||||||
msgid "Something unexpected happened when trying to log in, please try again."
|
msgid "Something unexpected happened when trying to log in, please try again."
|
||||||
msgstr ""
|
msgstr "在尝试登录时发生了异常,请重试。"
|
||||||
|
|
||||||
msgid "User cancelled."
|
msgid "User cancelled."
|
||||||
msgstr ""
|
msgstr "用户已取消。"
|
||||||
|
|
||||||
#: resources/data/hints.ini: [hint:Precise wall]
|
#: resources/data/hints.ini: [hint:Precise wall]
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -15092,6 +15161,8 @@ msgid ""
|
||||||
"Did you know that turning on precise wall can improve precision and layer "
|
"Did you know that turning on precise wall can improve precision and layer "
|
||||||
"consistency?"
|
"consistency?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"精准外墙尺寸\n"
|
||||||
|
"您知道吗?您可以启用精准外墙尺寸选项,提高精度和层一致性。"
|
||||||
|
|
||||||
#: resources/data/hints.ini: [hint:Sandwich mode]
|
#: resources/data/hints.ini: [hint:Sandwich mode]
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -15452,7 +15523,7 @@ msgstr ""
|
||||||
#~ "Enable this to get a G-code file which has G2 and G3 moves. And the "
|
#~ "Enable this to get a G-code file which has G2 and G3 moves. And the "
|
||||||
#~ "fitting tolerance is same with resolution"
|
#~ "fitting tolerance is same with resolution"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "打开这个设置,导出的G-code将包含G2 G3指令。圆弧拟合的容许值和精度相同。"
|
#~ "启用此设置,导出的G-code将包含G2 G3指令。圆弧拟合的容许值和精度相同。"
|
||||||
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "Infill area is enlarged slightly to overlap with wall for better bonding. "
|
#~ "Infill area is enlarged slightly to overlap with wall for better bonding. "
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
"220x220",
|
"220x220",
|
||||||
"0x220"
|
"0x220"
|
||||||
],
|
],
|
||||||
"printable_height": "240",
|
"printable_height": "245",
|
||||||
"nozzle_type": "brass",
|
"nozzle_type": "brass",
|
||||||
"auxiliary_fan": "0",
|
"auxiliary_fan": "0",
|
||||||
"machine_max_acceleration_extruding": [
|
"machine_max_acceleration_extruding": [
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
"Creality Generic PLA @Ender-3V3-all"
|
"Creality Generic PLA @Ender-3V3-all"
|
||||||
],
|
],
|
||||||
"machine_start_gcode": "SET_GCODE_VARIABLE MACRO=PRINTER_PARAM VARIABLE=fan0_min VALUE=30 ;compensate for fan speed\nSET_VELOCITY_LIMIT ACCEL_TO_DECEL=2500 ;revert accel_to_decel back to 2500\nM220 S100 ;Reset Feedrate\nM221 S100 ;Reset Flowrate\n\nM140 S[bed_temperature_initial_layer_single] ;Set bed temp\nG28 X Y ;Home XY axes\nM190 S[bed_temperature_initial_layer_single] ;Wait for bed temp to stabilize\nG28 Z ;Home Z axis & load bed mesh\nBED_MESH_CALIBRATE PROBE_COUNT=6,6 ;Auto bed level\n\nM104 S[nozzle_temperature_initial_layer] ;Set nozzle temp\nG92 E0 ;Reset Extruder\nG1 X-2.0 Y20 Z0.3 F5000.0 ;Move to start position\nM109 S[nozzle_temperature_initial_layer] ;Wait for nozzle temp to stabilize\nG1 Z0.2 ;Lower nozzle to printing height\nG1 Y145.0 F1500.0 E15 ;Draw the first line\nG1 X-1.7 F5000.0 ;Move to side a little\nG1 Y30 F1500.0 E15 ;Draw the second line\nG92 E0 ;Reset Extruder",
|
"machine_start_gcode": "SET_GCODE_VARIABLE MACRO=PRINTER_PARAM VARIABLE=fan0_min VALUE=30 ;compensate for fan speed\nSET_VELOCITY_LIMIT ACCEL_TO_DECEL=2500 ;revert accel_to_decel back to 2500\nM220 S100 ;Reset Feedrate\nM221 S100 ;Reset Flowrate\n\nM140 S[bed_temperature_initial_layer_single] ;Set bed temp\nG28 X Y ;Home XY axes\nM190 S[bed_temperature_initial_layer_single] ;Wait for bed temp to stabilize\nG28 Z ;Home Z axis & load bed mesh\nBED_MESH_CALIBRATE PROBE_COUNT=6,6 ;Auto bed level\n\nM104 S[nozzle_temperature_initial_layer] ;Set nozzle temp\nG92 E0 ;Reset Extruder\nG1 X-2.0 Y20 Z0.3 F5000.0 ;Move to start position\nM109 S[nozzle_temperature_initial_layer] ;Wait for nozzle temp to stabilize\nG1 Z0.2 ;Lower nozzle to printing height\nG1 Y145.0 F1500.0 E15 ;Draw the first line\nG1 X-1.7 F5000.0 ;Move to side a little\nG1 Y30 F1500.0 E15 ;Draw the second line\nG92 E0 ;Reset Extruder",
|
||||||
"machine_end_gcode": "G91 ;Relative positionning\nG1 E-2 F2700 ;Retract a bit\nG1 E-2 Z0.2 F2400 ;Retract and raise Z\nG1 X5 Y5 F3000 ;Wipe out\nG1 Z{if max_layer_z < 50}25{else}5{endif} ;Raise Z more\nG90 ;Absolute positionning\nG1 X2 Y218 F3000 ;Present print\nM106 S0 ;Turn-off fan\nM104 S0 ;Turn-off hotend\nM140 S0 ;Turn-off bed\nM84 X Y E ;Disable all steppers but Z",
|
"machine_end_gcode": "G92 E0 ;Reset Extruder\nG1 E-1.2 Z{max_layer_z + 0.5} F1800 ;Retract and raise Z\n{if max_layer_z < 50}\nG1 Z{max_layer_z + 25} F900 ;Raise Z more\n{endif}\n\nG1 X2 Y218 F3000 ;Present print\nM106 S0 ;Turn-off fan\nM104 S0 ;Turn-off hotend\nM140 S0 ;Turn-off bed\n\nM84 X Y E ;Disable all steppers but Z",
|
||||||
"scan_first_layer": "0",
|
"scan_first_layer": "0",
|
||||||
"thumbnails": [
|
"thumbnails": [
|
||||||
"96x96",
|
"96x96",
|
||||||
|
|
|
@ -323,8 +323,8 @@ var LangText = {
|
||||||
t111: "Crear nuevo",
|
t111: "Crear nuevo",
|
||||||
t112: "Unirse al programa",
|
t112: "Unirse al programa",
|
||||||
t113: "Puede cambiar su elección en preferencias en cualquier momento.",
|
t113: "Puede cambiar su elección en preferencias en cualquier momento.",
|
||||||
orca1: "Edit Project Info",
|
orca1: "Editar información del proyecto",
|
||||||
orca2: "no model information",
|
orca2: "No hay información sobre el modelo",
|
||||||
},
|
},
|
||||||
de_DE: {
|
de_DE: {
|
||||||
t1: "Willkommen im Orca Slicer",
|
t1: "Willkommen im Orca Slicer",
|
||||||
|
|
|
@ -10,7 +10,7 @@ for %%a in (%*) do (
|
||||||
|
|
||||||
if %FULL_MODE%==1 (
|
if %FULL_MODE%==1 (
|
||||||
.\tools\xgettext.exe --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost -f ./localization/i18n/list.txt -o ./localization/i18n/OrcaSlicer.pot
|
.\tools\xgettext.exe --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost -f ./localization/i18n/list.txt -o ./localization/i18n/OrcaSlicer.pot
|
||||||
build\\src\\hints\\Release\\hintsToPot ./resources ./localization/i18n
|
python3 scripts/HintsToPot.py ./resources ./localization/i18n
|
||||||
)
|
)
|
||||||
REM Print the current directory
|
REM Print the current directory
|
||||||
echo %cd%
|
echo %cd%
|
||||||
|
|
|
@ -15,7 +15,7 @@ done
|
||||||
|
|
||||||
if $FULL_MODE; then
|
if $FULL_MODE; then
|
||||||
xgettext --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost -f ./localization/i18n/list.txt -o ./localization/i18n/OrcaSlicer.pot
|
xgettext --keyword=L --keyword=_L --keyword=_u8L --keyword=L_CONTEXT:1,2c --keyword=_L_PLURAL:1,2 --add-comments=TRN --from-code=UTF-8 --no-location --debug --boost -f ./localization/i18n/list.txt -o ./localization/i18n/OrcaSlicer.pot
|
||||||
./build_arm64/src/hints/Release/hintsToPot.app/Contents/MacOS/hintsToPot ./resources ./localization/i18n
|
python3 scripts/HintsToPot.py ./resources ./localization/i18n
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
37
scripts/HintsToPot.py
Normal file
37
scripts/HintsToPot.py
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# Helps converting hints.ini into POT
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from configparser import ConfigParser
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
def write_to_pot(path: Path, data: dict[str, str]):
|
||||||
|
with open(path, "a+t") as pot_file:
|
||||||
|
for key in data.keys():
|
||||||
|
print(
|
||||||
|
f"\n#: resources/data/hints.ini: [{ key }]\nmsgid \"{ data[key]['text'] }\"\nmsgstr \"\"",
|
||||||
|
file=pot_file,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
if len(sys.argv) != 3:
|
||||||
|
print("HINTS_TO_POT FAILED: WRONG NUM OF ARGS")
|
||||||
|
exit(-1)
|
||||||
|
path_to_ini = Path(sys.argv[1]).parent / "resources" / "data" / "hints.ini"
|
||||||
|
path_to_pot = Path(sys.argv[2]).parent / "i18n" / "OrcaSlicer.pot"
|
||||||
|
if not path_to_ini.exists():
|
||||||
|
print("HINTS_TO_POT FAILED: PATH TO INI DOES NOT EXISTS")
|
||||||
|
print(str(path_to_ini))
|
||||||
|
exit(-1)
|
||||||
|
config = ConfigParser()
|
||||||
|
with open(path_to_ini) as hints_file:
|
||||||
|
config.read_file(hints_file)
|
||||||
|
write_to_pot(path_to_pot, config._sections)
|
||||||
|
print("HINTS_TO_POT SUCCESS")
|
||||||
|
exit(0)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
|
@ -358,7 +358,7 @@ void CBaseException::ShowExceptionInformation()
|
||||||
|
|
||||||
OutputString(_T("Exception Flag :0x%x "), m_pEp->ExceptionRecord->ExceptionFlags);
|
OutputString(_T("Exception Flag :0x%x "), m_pEp->ExceptionRecord->ExceptionFlags);
|
||||||
OutputString(_T("NumberParameters :%ld \n"), m_pEp->ExceptionRecord->NumberParameters);
|
OutputString(_T("NumberParameters :%ld \n"), m_pEp->ExceptionRecord->NumberParameters);
|
||||||
for (int i = 0; i < m_pEp->ExceptionRecord->NumberParameters; i++)
|
for (unsigned int i = 0; i < m_pEp->ExceptionRecord->NumberParameters; i++)
|
||||||
{
|
{
|
||||||
OutputString(_T("Param %d :0x%x \n"), i, m_pEp->ExceptionRecord->ExceptionInformation[i]);
|
OutputString(_T("Param %d :0x%x \n"), i, m_pEp->ExceptionRecord->ExceptionInformation[i]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1190,9 +1190,8 @@ int CLI::run(int argc, char **argv)
|
||||||
//BBS: add plate data related logic
|
//BBS: add plate data related logic
|
||||||
PlateDataPtrs plate_data_src;
|
PlateDataPtrs plate_data_src;
|
||||||
std::vector<plate_obj_size_info_t> plate_obj_size_infos;
|
std::vector<plate_obj_size_info_t> plate_obj_size_infos;
|
||||||
int arrange_option;
|
|
||||||
int plate_to_slice = 0, filament_count = 0, duplicate_count = 0, real_duplicate_count = 0;
|
int plate_to_slice = 0, filament_count = 0, duplicate_count = 0, real_duplicate_count = 0;
|
||||||
bool first_file = true, is_bbl_3mf = false, need_arrange = true, has_thumbnails = false, up_config_to_date = false, normative_check = true, duplicate_single_object = false, use_first_fila_as_default = false, minimum_save = false, enable_timelapse = false;
|
bool first_file = true, is_bbl_3mf = false, need_arrange = true, up_config_to_date = false, normative_check = true, duplicate_single_object = false, use_first_fila_as_default = false, minimum_save = false, enable_timelapse = false;
|
||||||
bool allow_rotations = true, skip_modified_gcodes = false, avoid_extrusion_cali_region = false, skip_useless_pick = false, allow_newer_file = false;
|
bool allow_rotations = true, skip_modified_gcodes = false, avoid_extrusion_cali_region = false, skip_useless_pick = false, allow_newer_file = false;
|
||||||
Semver file_version;
|
Semver file_version;
|
||||||
std::map<size_t, bool> orients_requirement;
|
std::map<size_t, bool> orients_requirement;
|
||||||
|
@ -1546,7 +1545,7 @@ int CLI::run(int argc, char **argv)
|
||||||
{
|
{
|
||||||
ModelObject* object = model.objects[obj_index];
|
ModelObject* object = model.objects[obj_index];
|
||||||
|
|
||||||
for (unsigned int clone_index = 1; clone_index < clone_count; clone_index++)
|
for (int clone_index = 1; clone_index < clone_count; clone_index++)
|
||||||
{
|
{
|
||||||
ModelObject* newObj = model.add_object(*object);
|
ModelObject* newObj = model.add_object(*object);
|
||||||
newObj->name = object->name +"_"+ std::to_string(clone_index+1);
|
newObj->name = object->name +"_"+ std::to_string(clone_index+1);
|
||||||
|
@ -1619,7 +1618,7 @@ int CLI::run(int argc, char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (std::exception& e) {
|
catch (std::exception& e) {
|
||||||
boost::nowide::cerr << construct_assemble_list << ": " << e.what() << std::endl;
|
boost::nowide::cerr << "construct_assemble_list: " << e.what() << std::endl;
|
||||||
record_exit_reson(outfile_dir, CLI_DATA_FILE_ERROR, 0, cli_errors[CLI_DATA_FILE_ERROR], sliced_info);
|
record_exit_reson(outfile_dir, CLI_DATA_FILE_ERROR, 0, cli_errors[CLI_DATA_FILE_ERROR], sliced_info);
|
||||||
flush_and_exit(CLI_DATA_FILE_ERROR);
|
flush_and_exit(CLI_DATA_FILE_ERROR);
|
||||||
}
|
}
|
||||||
|
@ -2103,7 +2102,7 @@ int CLI::run(int argc, char **argv)
|
||||||
record_exit_reson(outfile_dir, CLI_INVALID_PARAMS, 0, cli_errors[CLI_INVALID_PARAMS], sliced_info);
|
record_exit_reson(outfile_dir, CLI_INVALID_PARAMS, 0, cli_errors[CLI_INVALID_PARAMS], sliced_info);
|
||||||
flush_and_exit(CLI_INVALID_PARAMS);
|
flush_and_exit(CLI_INVALID_PARAMS);
|
||||||
}
|
}
|
||||||
for (unsigned int index = 0; index < filament_count; index ++)
|
for (int index = 0; index < filament_count; index ++)
|
||||||
{
|
{
|
||||||
std::string file = uptodate_filaments[index];
|
std::string file = uptodate_filaments[index];
|
||||||
DynamicPrintConfig config;
|
DynamicPrintConfig config;
|
||||||
|
@ -2220,7 +2219,7 @@ int CLI::run(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
//upwards check
|
//upwards check
|
||||||
bool process_compatible = false, machine_upwards = false, machine_switch = false;
|
bool process_compatible = false, /* machine_upwards = false, */ machine_switch = false;
|
||||||
BOOST_LOG_TRIVIAL(info) << boost::format("current printer %1%, new printer %2%, current process %3%, new process %4%")%current_printer_name %new_printer_name %current_process_name %new_process_name;
|
BOOST_LOG_TRIVIAL(info) << boost::format("current printer %1%, new printer %2%, current process %3%, new process %4%")%current_printer_name %new_printer_name %current_process_name %new_process_name;
|
||||||
BOOST_LOG_TRIVIAL(info) << boost::format("current printer inherits %1%, new printer inherits %2%, current process inherits %3%, new process inherits %4%")
|
BOOST_LOG_TRIVIAL(info) << boost::format("current printer inherits %1%, new printer inherits %2%, current process inherits %3%, new process inherits %4%")
|
||||||
%current_printer_system_name %new_printer_system_name %current_process_system_name %new_process_system_name;
|
%current_printer_system_name %new_printer_system_name %current_process_system_name %new_process_system_name;
|
||||||
|
@ -2290,7 +2289,7 @@ int CLI::run(int argc, char **argv)
|
||||||
for (int index = 0; index < upward_compatible_printers.size(); index++) {
|
for (int index = 0; index < upward_compatible_printers.size(); index++) {
|
||||||
if (upward_compatible_printers[index] == new_printer_system_name) {
|
if (upward_compatible_printers[index] == new_printer_system_name) {
|
||||||
process_compatible = true;
|
process_compatible = true;
|
||||||
machine_upwards = true;
|
// machine_upwards = true;
|
||||||
BOOST_LOG_TRIVIAL(info) << boost::format("new printer is upward_compatible");
|
BOOST_LOG_TRIVIAL(info) << boost::format("new printer is upward_compatible");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2900,7 +2899,8 @@ int CLI::run(int argc, char **argv)
|
||||||
for (auto& model : m_models)
|
for (auto& model : m_models)
|
||||||
for (ModelObject* o : model.objects)
|
for (ModelObject* o : model.objects)
|
||||||
{
|
{
|
||||||
ModelObject* new_object = m.add_object(*o);
|
/* ModelObject* new_object = */
|
||||||
|
m.add_object(*o);
|
||||||
//BOOST_LOG_TRIVIAL(info) << "object "<<o->name <<", id :" << o->id().id << "\n";
|
//BOOST_LOG_TRIVIAL(info) << "object "<<o->name <<", id :" << o->id().id << "\n";
|
||||||
//orients_requirement.emplace(new_object->id().id, orients_requirement[o->id().id]);
|
//orients_requirement.emplace(new_object->id().id, orients_requirement[o->id().id]);
|
||||||
//orients_requirement.erase(o->id().id);
|
//orients_requirement.erase(o->id().id);
|
||||||
|
@ -3343,7 +3343,6 @@ int CLI::run(int argc, char **argv)
|
||||||
BOOST_LOG_TRIVIAL(info) << boost::format("downward_check: all failed, size %1%")%downward_check_size;
|
BOOST_LOG_TRIVIAL(info) << boost::format("downward_check: all failed, size %1%")%downward_check_size;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Slic3r::GUI::PartPlate* cur_plate = (Slic3r::GUI::PartPlate *)partplate_list.get_plate(index);
|
|
||||||
Vec3d size = plate_obj_size_infos[index].obj_bbox.size();
|
Vec3d size = plate_obj_size_infos[index].obj_bbox.size();
|
||||||
|
|
||||||
for (int index2 = 0; index2 < downward_check_size; index2 ++)
|
for (int index2 = 0; index2 < downward_check_size; index2 ++)
|
||||||
|
@ -3393,7 +3392,6 @@ int CLI::run(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loop through transform options.
|
// Loop through transform options.
|
||||||
bool user_center_specified = false;
|
|
||||||
Points beds = get_bed_shape(m_print_config);
|
Points beds = get_bed_shape(m_print_config);
|
||||||
ArrangeParams arrange_cfg;
|
ArrangeParams arrange_cfg;
|
||||||
|
|
||||||
|
@ -3417,7 +3415,6 @@ int CLI::run(int argc, char **argv)
|
||||||
ModelObject* new_object = m.add_object();
|
ModelObject* new_object = m.add_object();
|
||||||
new_object->name = _u8L("Assembly");
|
new_object->name = _u8L("Assembly");
|
||||||
new_object->add_instance();
|
new_object->add_instance();
|
||||||
int idx = 0;
|
|
||||||
for (auto& model : m_models)
|
for (auto& model : m_models)
|
||||||
for (ModelObject* o : model.objects) {
|
for (ModelObject* o : model.objects) {
|
||||||
for (auto volume : o->volumes) {
|
for (auto volume : o->volumes) {
|
||||||
|
@ -3519,7 +3516,6 @@ int CLI::run(int argc, char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (opt_key == "center") {
|
} else if (opt_key == "center") {
|
||||||
user_center_specified = true;
|
|
||||||
for (auto &model : m_models) {
|
for (auto &model : m_models) {
|
||||||
model.add_default_instances();
|
model.add_default_instances();
|
||||||
// this affects instances:
|
// this affects instances:
|
||||||
|
@ -3819,7 +3815,6 @@ int CLI::run(int argc, char **argv)
|
||||||
{
|
{
|
||||||
//do arrange for plate
|
//do arrange for plate
|
||||||
ArrangePolygons selected, unselected;
|
ArrangePolygons selected, unselected;
|
||||||
Model& model = m_models[0];
|
|
||||||
arrange_cfg = ArrangeParams(); // reset all params
|
arrange_cfg = ArrangeParams(); // reset all params
|
||||||
get_print_sequence(cur_plate, m_print_config, arrange_cfg.is_seq_print);
|
get_print_sequence(cur_plate, m_print_config, arrange_cfg.is_seq_print);
|
||||||
|
|
||||||
|
@ -3845,7 +3840,6 @@ int CLI::run(int argc, char **argv)
|
||||||
if (!arrange_cfg.is_seq_print && assemble_plate.filaments_count > 1)
|
if (!arrange_cfg.is_seq_print && assemble_plate.filaments_count > 1)
|
||||||
{
|
{
|
||||||
//prepare the wipe tower
|
//prepare the wipe tower
|
||||||
int plate_count = partplate_list.get_plate_count();
|
|
||||||
|
|
||||||
auto printer_structure_opt = m_print_config.option<ConfigOptionEnum<PrinterStructure>>("printer_structure");
|
auto printer_structure_opt = m_print_config.option<ConfigOptionEnum<PrinterStructure>>("printer_structure");
|
||||||
const float tower_brim_width = m_print_config.option<ConfigOptionFloat>("prime_tower_width", true)->value;
|
const float tower_brim_width = m_print_config.option<ConfigOptionFloat>("prime_tower_width", true)->value;
|
||||||
|
@ -4231,7 +4225,6 @@ int CLI::run(int argc, char **argv)
|
||||||
//float depth = v * (filaments_cnt - 1) / (layer_height * w);
|
//float depth = v * (filaments_cnt - 1) / (layer_height * w);
|
||||||
|
|
||||||
Vec3d wipe_tower_size = cur_plate->estimate_wipe_tower_size(m_print_config, w, v, filaments_cnt);
|
Vec3d wipe_tower_size = cur_plate->estimate_wipe_tower_size(m_print_config, w, v, filaments_cnt);
|
||||||
Vec3d plate_origin = cur_plate->get_origin();
|
|
||||||
int plate_width, plate_depth, plate_height;
|
int plate_width, plate_depth, plate_height;
|
||||||
partplate_list.get_plate_size(plate_width, plate_depth, plate_height);
|
partplate_list.get_plate_size(plate_width, plate_depth, plate_height);
|
||||||
float depth = wipe_tower_size(1);
|
float depth = wipe_tower_size(1);
|
||||||
|
@ -4610,7 +4603,7 @@ int CLI::run(int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
// loop through action options
|
// loop through action options
|
||||||
bool export_to_3mf = false, load_slicedata = false, export_slicedata = false, export_slicedata_error = false;
|
bool export_to_3mf = false, load_slicedata = false, export_slicedata = false;
|
||||||
bool no_check = false;
|
bool no_check = false;
|
||||||
std::string export_3mf_file, load_slice_data_dir, export_slice_data_dir, export_stls_dir;
|
std::string export_3mf_file, load_slice_data_dir, export_slice_data_dir, export_stls_dir;
|
||||||
std::vector<ThumbnailData*> calibration_thumbnails;
|
std::vector<ThumbnailData*> calibration_thumbnails;
|
||||||
|
@ -5099,7 +5092,6 @@ int CLI::run(int argc, char **argv)
|
||||||
int ret = print->export_cached_data(plate_dir, with_space);
|
int ret = print->export_cached_data(plate_dir, with_space);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
BOOST_LOG_TRIVIAL(error) << "plate "<< index+1<< ": export Slicing data error, ret=" << ret;
|
BOOST_LOG_TRIVIAL(error) << "plate "<< index+1<< ": export Slicing data error, ret=" << ret;
|
||||||
export_slicedata_error = true;
|
|
||||||
if (fs::exists(plate_dir))
|
if (fs::exists(plate_dir))
|
||||||
fs::remove_all(plate_dir);
|
fs::remove_all(plate_dir);
|
||||||
record_exit_reson(outfile_dir, ret, index+1, cli_errors[ret], sliced_info);
|
record_exit_reson(outfile_dir, ret, index+1, cli_errors[ret], sliced_info);
|
||||||
|
@ -5226,8 +5218,7 @@ int CLI::run(int argc, char **argv)
|
||||||
bool need_regenerate_top_thumbnail = oriented_or_arranged || regenerate_thumbnails;
|
bool need_regenerate_top_thumbnail = oriented_or_arranged || regenerate_thumbnails;
|
||||||
bool need_create_thumbnail_group = false, need_create_no_light_group = false, need_create_top_group = false;
|
bool need_create_thumbnail_group = false, need_create_no_light_group = false, need_create_top_group = false;
|
||||||
|
|
||||||
// get type and color for platedata
|
// get color for platedata
|
||||||
auto* filament_types = dynamic_cast<const ConfigOptionStrings*>(m_print_config.option("filament_type"));
|
|
||||||
const ConfigOptionStrings* filament_color = dynamic_cast<const ConfigOptionStrings *>(m_print_config.option("filament_colour"));
|
const ConfigOptionStrings* filament_color = dynamic_cast<const ConfigOptionStrings *>(m_print_config.option("filament_colour"));
|
||||||
auto* filament_id = dynamic_cast<const ConfigOptionStrings*>(m_print_config.option("filament_ids"));
|
auto* filament_id = dynamic_cast<const ConfigOptionStrings*>(m_print_config.option("filament_ids"));
|
||||||
const ConfigOptionFloats* nozzle_diameter_option = dynamic_cast<const ConfigOptionFloats *>(m_print_config.option("nozzle_diameter"));
|
const ConfigOptionFloats* nozzle_diameter_option = dynamic_cast<const ConfigOptionFloats *>(m_print_config.option("nozzle_diameter"));
|
||||||
|
|
|
@ -216,7 +216,7 @@ private:
|
||||||
// This is a match. Record result in neighbors list.
|
// This is a match. Record result in neighbors list.
|
||||||
match_neighbors(edge, *link->next);
|
match_neighbors(edge, *link->next);
|
||||||
// Delete the matched edge from the list.
|
// Delete the matched edge from the list.
|
||||||
HashEdge *temp = link->next;
|
// HashEdge *temp = link->next;
|
||||||
link->next = link->next->next;
|
link->next = link->next->next;
|
||||||
// pool.destroy(temp);
|
// pool.destroy(temp);
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
|
|
@ -193,7 +193,7 @@ void stl_fix_normal_directions(stl_file *stl)
|
||||||
norm_sw[facet_num] = 1; // Record this one as being fixed.
|
norm_sw[facet_num] = 1; // Record this one as being fixed.
|
||||||
++ checked;
|
++ checked;
|
||||||
}
|
}
|
||||||
stl_normal *temp = head->next; // Delete this facet from the list.
|
// stl_normal *temp = head->next; // Delete this facet from the list.
|
||||||
head->next = head->next->next;
|
head->next = head->next->next;
|
||||||
// pool.destroy(temp);
|
// pool.destroy(temp);
|
||||||
} else { // If we ran out of facets to fix: All of the facets in this part have been fixed.
|
} else { // If we ran out of facets to fix: All of the facets in this part have been fixed.
|
||||||
|
|
|
@ -768,11 +768,9 @@ bool ImGui::BBLButtonEx(const char* label, const ImVec2& size_arg, ImGuiButtonFl
|
||||||
bool hovered, held;
|
bool hovered, held;
|
||||||
bool pressed = ButtonBehavior(bb, id, &hovered, &held, flags);
|
bool pressed = ButtonBehavior(bb, id, &hovered, &held, flags);
|
||||||
|
|
||||||
bool b_hover = false;
|
|
||||||
if (hovered)
|
if (hovered)
|
||||||
{
|
{
|
||||||
PushStyleColor(ImGuiCol_Text,GetColorU32(ImGuiCol_CheckMark));
|
PushStyleColor(ImGuiCol_Text,GetColorU32(ImGuiCol_CheckMark));
|
||||||
b_hover = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
|
@ -4167,8 +4165,6 @@ bool ImGui::BBLInputScalar(const char *label, ImGuiDataType data_type, void *p_d
|
||||||
const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y * 2.0f));
|
const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y * 2.0f));
|
||||||
// Tabbing or CTRL-clicking on Drag turns it into an InputText
|
// Tabbing or CTRL-clicking on Drag turns it into an InputText
|
||||||
const bool hovered = ItemHoverable(frame_bb, id);
|
const bool hovered = ItemHoverable(frame_bb, id);
|
||||||
// We are only allowed to access the state if we are already the active widget.
|
|
||||||
ImGuiInputTextState *state = GetInputTextState(id);
|
|
||||||
|
|
||||||
bool push_color_count = 0;
|
bool push_color_count = 0;
|
||||||
if (hovered || g.ActiveId == id) {
|
if (hovered || g.ActiveId == id) {
|
||||||
|
@ -6298,9 +6294,9 @@ bool ImGui::ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFl
|
||||||
RenderFrameBorder(bb.Min, bb.Max, rounding);
|
RenderFrameBorder(bb.Min, bb.Max, rounding);
|
||||||
else
|
else
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
window->DrawList->AddRect(bb.Min - ImVec2(3, 3), bb.Max + ImVec2(3, 3), GetColorU32(ImGuiCol_FrameBg), rounding * 2,NULL,4.0f);; // Color button are often in need of some sort of border
|
window->DrawList->AddRect(bb.Min - ImVec2(3, 3), bb.Max + ImVec2(3, 3), GetColorU32(ImGuiCol_FrameBg), rounding * 2,0,4.0f);; // Color button are often in need of some sort of border
|
||||||
#else
|
#else
|
||||||
window->DrawList->AddRect(bb.Min - ImVec2(2, 2), bb.Max + ImVec2(2, 2), GetColorU32(ImGuiCol_FrameBg), rounding * 2,NULL,3.0f); // Color button are often in need of some sort of border
|
window->DrawList->AddRect(bb.Min - ImVec2(2, 2), bb.Max + ImVec2(2, 2), GetColorU32(ImGuiCol_FrameBg), rounding * 2,0,3.0f); // Color button are often in need of some sort of border
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7097,7 +7093,6 @@ bool ImGui::BBLImageSelectable(ImTextureID user_texture_id, const ImVec2& size_a
|
||||||
|
|
||||||
// Text stays at the submission position, but bounding box may be extended on both sides
|
// Text stays at the submission position, but bounding box may be extended on both sides
|
||||||
const float arrow_size = (flags & ImGuiComboFlags_NoArrowButton) ? 0.0f : GetFrameHeight();
|
const float arrow_size = (flags & ImGuiComboFlags_NoArrowButton) ? 0.0f : GetFrameHeight();
|
||||||
const ImVec2 text_min = ImVec2(pos.x + arrow_size, pos.y);
|
|
||||||
const ImVec2 text_max(min_x + size.x, pos.y + size.y);
|
const ImVec2 text_max(min_x + size.x, pos.y + size.y);
|
||||||
|
|
||||||
// Selectables are meant to be tightly packed together with no click-gap, so we extend their box to cover spacing between selectable.
|
// Selectables are meant to be tightly packed together with no click-gap, so we extend their box to cover spacing between selectable.
|
||||||
|
@ -7209,7 +7204,6 @@ bool ImGui::BBLImageSelectable(ImTextureID user_texture_id, const ImVec2& size_a
|
||||||
if (flags & ImGuiSelectableFlags_Disabled) PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]);
|
if (flags & ImGuiSelectableFlags_Disabled) PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]);
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
|
|
||||||
ImVec2 p_min = bb.Min + ImVec2(style.ItemInnerSpacing.x, (bb.Max.y - bb.Min.y - font_size.y) / 2);
|
ImVec2 p_min = bb.Min + ImVec2(style.ItemInnerSpacing.x, (bb.Max.y - bb.Min.y - font_size.y) / 2);
|
||||||
ImVec2 p_max = p_min + font_size;
|
ImVec2 p_max = p_min + font_size;
|
||||||
window->DrawList->AddImage(user_texture_id, p_min, p_max, uv0, uv1, selected || (held && hovered) ? GetColorU32(ImVec4(1.f, 1.f, 1.f, 1.f)) : GetColorU32(tint_col));
|
window->DrawList->AddImage(user_texture_id, p_min, p_max, uv0, uv1, selected || (held && hovered) ? GetColorU32(ImVec4(1.f, 1.f, 1.f, 1.f)) : GetColorU32(tint_col));
|
||||||
|
|
|
@ -2807,7 +2807,6 @@ namespace IMGUIZMO_NAMESPACE
|
||||||
{
|
{
|
||||||
static bool isDraging = false;
|
static bool isDraging = false;
|
||||||
static bool isClicking = false;
|
static bool isClicking = false;
|
||||||
static bool isInside = false;
|
|
||||||
static vec_t interpolationUp;
|
static vec_t interpolationUp;
|
||||||
static vec_t interpolationDir;
|
static vec_t interpolationDir;
|
||||||
static int interpolationFrames = 0;
|
static int interpolationFrames = 0;
|
||||||
|
@ -3055,7 +3054,6 @@ namespace IMGUIZMO_NAMESPACE
|
||||||
LookAt(&newEye.x, &camTarget.x, &newUp.x, view);
|
LookAt(&newEye.x, &camTarget.x, &newUp.x, view);
|
||||||
viewUpdated = true;
|
viewUpdated = true;
|
||||||
}
|
}
|
||||||
isInside = gContext.mbMouseOver && ImRect(position, position + size).Contains(io.MousePos);
|
|
||||||
|
|
||||||
if (io.MouseDown[0] && (fabsf(io.MouseDelta[0]) || fabsf(io.MouseDelta[1])) && isClicking)
|
if (io.MouseDown[0] && (fabsf(io.MouseDelta[0]) || fabsf(io.MouseDelta[1])) && isClicking)
|
||||||
{
|
{
|
||||||
|
|
|
@ -182,7 +182,6 @@ inline TPoint<RawShape> referenceVertex(const RawShape& sh)
|
||||||
template<class RawBox, class RawShape, class Ratio = double> inline NfpResult<RawShape> nfpInnerRectBed(const RawBox &bed, const RawShape &other)
|
template<class RawBox, class RawShape, class Ratio = double> inline NfpResult<RawShape> nfpInnerRectBed(const RawBox &bed, const RawShape &other)
|
||||||
{
|
{
|
||||||
using Vertex = TPoint<RawShape>;
|
using Vertex = TPoint<RawShape>;
|
||||||
using Edge = _Segment<Vertex>;
|
|
||||||
namespace sl = shapelike;
|
namespace sl = shapelike;
|
||||||
|
|
||||||
auto sbox = sl::boundingBox(other);
|
auto sbox = sl::boundingBox(other);
|
||||||
|
|
|
@ -1119,7 +1119,6 @@ private:
|
||||||
for (const Item& item : items_) {
|
for (const Item& item : items_) {
|
||||||
if (!item.is_virt_object) { extruders.insert(item.extrude_ids.begin(), item.extrude_ids.end()); }
|
if (!item.is_virt_object) { extruders.insert(item.extrude_ids.begin(), item.extrude_ids.end()); }
|
||||||
}
|
}
|
||||||
bool need_wipe_tower = extruders.size() > 1;
|
|
||||||
|
|
||||||
std::vector<RawShape> objs,excludes;
|
std::vector<RawShape> objs,excludes;
|
||||||
for (const Item &item : items_) {
|
for (const Item &item : items_) {
|
||||||
|
|
|
@ -18,9 +18,7 @@
|
||||||
#include <boost/nowide/cenv.hpp>
|
#include <boost/nowide/cenv.hpp>
|
||||||
#include <boost/nowide/fstream.hpp>
|
#include <boost/nowide/fstream.hpp>
|
||||||
#include <boost/property_tree/ini_parser.hpp>
|
#include <boost/property_tree/ini_parser.hpp>
|
||||||
#include <boost/property_tree/ptree_fwd.hpp>
|
|
||||||
#include <boost/algorithm/string/predicate.hpp>
|
#include <boost/algorithm/string/predicate.hpp>
|
||||||
#include <boost/format/format_fwd.hpp>
|
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
#include <boost/uuid/uuid.hpp>
|
#include <boost/uuid/uuid.hpp>
|
||||||
#include <boost/uuid/uuid_generators.hpp>
|
#include <boost/uuid/uuid_generators.hpp>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
//Copyright (c) 2022 Ultimaker B.V.
|
//Copyright (c) 2022 Ultimaker B.V.
|
||||||
//CuraEngine is released under the terms of the AGPLv3 or higher.
|
//CuraEngine is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
#include <cassert>
|
|
||||||
|
|
||||||
#include "BeadingStrategy.hpp"
|
#include "BeadingStrategy.hpp"
|
||||||
#include "Point.hpp"
|
#include "Point.hpp"
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include "RedistributeBeadingStrategy.hpp"
|
#include "RedistributeBeadingStrategy.hpp"
|
||||||
#include "OuterWallInsetBeadingStrategy.hpp"
|
#include "OuterWallInsetBeadingStrategy.hpp"
|
||||||
|
|
||||||
#include <limits>
|
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
|
|
||||||
namespace Slic3r::Arachne
|
namespace Slic3r::Arachne
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
#include "RedistributeBeadingStrategy.hpp"
|
#include "RedistributeBeadingStrategy.hpp"
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
|
||||||
namespace Slic3r::Arachne
|
namespace Slic3r::Arachne
|
||||||
|
|
|
@ -1595,7 +1595,6 @@ SkeletalTrapezoidation::edge_t* SkeletalTrapezoidation::getQuadMaxRedgeTo(edge_t
|
||||||
|
|
||||||
void SkeletalTrapezoidation::propagateBeadingsUpward(std::vector<edge_t*>& upward_quad_mids, ptr_vector_t<BeadingPropagation>& node_beadings)
|
void SkeletalTrapezoidation::propagateBeadingsUpward(std::vector<edge_t*>& upward_quad_mids, ptr_vector_t<BeadingPropagation>& node_beadings)
|
||||||
{
|
{
|
||||||
const auto _central_filter_dist = central_filter_dist();
|
|
||||||
for (auto upward_quad_mids_it = upward_quad_mids.rbegin(); upward_quad_mids_it != upward_quad_mids.rend(); ++upward_quad_mids_it)
|
for (auto upward_quad_mids_it = upward_quad_mids.rbegin(); upward_quad_mids_it != upward_quad_mids.rend(); ++upward_quad_mids_it)
|
||||||
{
|
{
|
||||||
edge_t* upward_edge = *upward_quad_mids_it;
|
edge_t* upward_edge = *upward_quad_mids_it;
|
||||||
|
@ -1612,7 +1611,7 @@ void SkeletalTrapezoidation::propagateBeadingsUpward(std::vector<edge_t*>& upwar
|
||||||
{ // Only propagate to places where there is place
|
{ // Only propagate to places where there is place
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
assert((upward_edge->from->data.distance_to_boundary != upward_edge->to->data.distance_to_boundary || shorter_then(upward_edge->to->p - upward_edge->from->p, _central_filter_dist)) && "zero difference R edges should always be central");
|
assert((upward_edge->from->data.distance_to_boundary != upward_edge->to->data.distance_to_boundary || shorter_then(upward_edge->to->p - upward_edge->from->p, central_filter_dist())) && "zero difference R edges should always be central");
|
||||||
coord_t length = (upward_edge->to->p - upward_edge->from->p).cast<int64_t>().norm();
|
coord_t length = (upward_edge->to->p - upward_edge->from->p).cast<int64_t>().norm();
|
||||||
BeadingPropagation upper_beading = lower_beading;
|
BeadingPropagation upper_beading = lower_beading;
|
||||||
upper_beading.dist_to_bottom_source += length;
|
upper_beading.dist_to_bottom_source += length;
|
||||||
|
|
|
@ -7,9 +7,6 @@
|
||||||
|
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
|
|
||||||
#include "utils/linearAlg2D.hpp"
|
|
||||||
#include "../Line.hpp"
|
|
||||||
|
|
||||||
namespace Slic3r::Arachne
|
namespace Slic3r::Arachne
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "ExtrusionLine.hpp"
|
#include "ExtrusionLine.hpp"
|
||||||
#include "linearAlg2D.hpp"
|
|
||||||
#include "../../VariableWidth.hpp"
|
#include "../../VariableWidth.hpp"
|
||||||
|
|
||||||
namespace Slic3r::Arachne
|
namespace Slic3r::Arachne
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
//CuraEngine is released under the terms of the AGPLv3 or higher.
|
//CuraEngine is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
#include "SquareGrid.hpp"
|
#include "SquareGrid.hpp"
|
||||||
#include "../../Point.hpp"
|
|
||||||
|
|
||||||
using namespace Slic3r::Arachne;
|
using namespace Slic3r::Arachne;
|
||||||
|
|
||||||
|
|
|
@ -199,23 +199,19 @@ void update_selected_items_axis_align(ArrangePolygons& selected, const DynamicPr
|
||||||
}
|
}
|
||||||
|
|
||||||
if (std::abs(a00) > EPSILON) {
|
if (std::abs(a00) > EPSILON) {
|
||||||
double db1_2, db1_6, db1_12, db1_24, db1_20, db1_60;
|
double db1_2, db1_6, db1_12, db1_24;
|
||||||
double m00, m10, m01, m20, m11, m02, m30, m21, m12, m03;
|
double m00, m10, m01, m20, m11, m02;
|
||||||
if (a00 > 0) {
|
if (a00 > 0) {
|
||||||
db1_2 = 0.5;
|
db1_2 = 0.5;
|
||||||
db1_6 = 0.16666666666666666666666666666667;
|
db1_6 = 0.16666666666666666666666666666667;
|
||||||
db1_12 = 0.083333333333333333333333333333333;
|
db1_12 = 0.083333333333333333333333333333333;
|
||||||
db1_24 = 0.041666666666666666666666666666667;
|
db1_24 = 0.041666666666666666666666666666667;
|
||||||
db1_20 = 0.05;
|
|
||||||
db1_60 = 0.016666666666666666666666666666667;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
db1_2 = -0.5;
|
db1_2 = -0.5;
|
||||||
db1_6 = -0.16666666666666666666666666666667;
|
db1_6 = -0.16666666666666666666666666666667;
|
||||||
db1_12 = -0.083333333333333333333333333333333;
|
db1_12 = -0.083333333333333333333333333333333;
|
||||||
db1_24 = -0.041666666666666666666666666666667;
|
db1_24 = -0.041666666666666666666666666666667;
|
||||||
db1_20 = -0.05;
|
|
||||||
db1_60 = -0.016666666666666666666666666666667;
|
|
||||||
}
|
}
|
||||||
m00 = a00 * db1_2;
|
m00 = a00 * db1_2;
|
||||||
m10 = a10 * db1_6;
|
m10 = a10 * db1_6;
|
||||||
|
@ -223,10 +219,6 @@ void update_selected_items_axis_align(ArrangePolygons& selected, const DynamicPr
|
||||||
m20 = a20 * db1_12;
|
m20 = a20 * db1_12;
|
||||||
m11 = a11 * db1_24;
|
m11 = a11 * db1_24;
|
||||||
m02 = a02 * db1_12;
|
m02 = a02 * db1_12;
|
||||||
m30 = a30 * db1_20;
|
|
||||||
m21 = a21 * db1_60;
|
|
||||||
m12 = a12 * db1_60;
|
|
||||||
m03 = a03 * db1_20;
|
|
||||||
|
|
||||||
double cx = m10 / m00;
|
double cx = m10 / m00;
|
||||||
double cy = m01 / m00;
|
double cy = m01 / m00;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include "BlacklistedLibraryCheck.hpp"
|
#include "BlacklistedLibraryCheck.hpp"
|
||||||
|
|
||||||
#include <cstdio>
|
|
||||||
#include <boost/nowide/convert.hpp>
|
#include <boost/nowide/convert.hpp>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
|
@ -576,7 +576,6 @@ double getadhesionCoeff(const PrintObject* printObject)
|
||||||
auto& insts = printObject->instances();
|
auto& insts = printObject->instances();
|
||||||
auto objectVolumes = insts[0].model_instance->get_object()->volumes;
|
auto objectVolumes = insts[0].model_instance->get_object()->volumes;
|
||||||
|
|
||||||
auto print = printObject->print();
|
|
||||||
std::vector<size_t> extrudersFirstLayer;
|
std::vector<size_t> extrudersFirstLayer;
|
||||||
auto firstLayerRegions = printObject->layers().front()->regions();
|
auto firstLayerRegions = printObject->layers().front()->regions();
|
||||||
if (!firstLayerRegions.empty()) {
|
if (!firstLayerRegions.empty()) {
|
||||||
|
@ -901,7 +900,6 @@ static ExPolygons outer_inner_brim_area(const Print& print,
|
||||||
Polygons holes_object;
|
Polygons holes_object;
|
||||||
Polygons holes_support;
|
Polygons holes_support;
|
||||||
if (objectWithExtruder.second == extruderNo && brimToWrite.at(object->id()).obj) {
|
if (objectWithExtruder.second == extruderNo && brimToWrite.at(object->id()).obj) {
|
||||||
double deltaT = getTemperatureFromExtruder(object);
|
|
||||||
double adhesion = getadhesionCoeff(object);
|
double adhesion = getadhesionCoeff(object);
|
||||||
double maxSpeed = Model::findMaxSpeed(object->model_object());
|
double maxSpeed = Model::findMaxSpeed(object->model_object());
|
||||||
// BBS: brims are generated by volume groups
|
// BBS: brims are generated by volume groups
|
||||||
|
@ -1585,7 +1583,6 @@ static void make_inner_brim(const Print& print, const ConstPrintObjectPtrs& top_
|
||||||
//BBS: generate out brim by offseting ExPolygons 'islands_area_ex'
|
//BBS: generate out brim by offseting ExPolygons 'islands_area_ex'
|
||||||
Polygons tryExPolygonOffset(const ExPolygons islandAreaEx, const Print& print)
|
Polygons tryExPolygonOffset(const ExPolygons islandAreaEx, const Print& print)
|
||||||
{
|
{
|
||||||
const auto scaled_resolution = scaled<double>(print.config().resolution.value);
|
|
||||||
Polygons loops;
|
Polygons loops;
|
||||||
ExPolygons islands_ex;
|
ExPolygons islands_ex;
|
||||||
Flow flow = print.brim_flow();
|
Flow flow = print.brim_flow();
|
||||||
|
@ -1660,7 +1657,6 @@ void make_brim(const Print& print, PrintTryCancel try_cancel, Polygons& islands_
|
||||||
std::map<ObjectID, ExPolygons> brimAreaMap;
|
std::map<ObjectID, ExPolygons> brimAreaMap;
|
||||||
std::map<ObjectID, ExPolygons> supportBrimAreaMap;
|
std::map<ObjectID, ExPolygons> supportBrimAreaMap;
|
||||||
Flow flow = print.brim_flow();
|
Flow flow = print.brim_flow();
|
||||||
const auto scaled_resolution = scaled<double>(print.config().resolution.value);
|
|
||||||
ExPolygons islands_area_ex = outer_inner_brim_area(print,
|
ExPolygons islands_area_ex = outer_inner_brim_area(print,
|
||||||
float(flow.scaled_spacing()), brimAreaMap, supportBrimAreaMap, objPrintVec, printExtruders);
|
float(flow.scaled_spacing()), brimAreaMap, supportBrimAreaMap, objPrintVec, printExtruders);
|
||||||
|
|
||||||
|
|
|
@ -156,6 +156,12 @@ set(lisbslic3r_sources
|
||||||
GCode/RetractWhenCrossingPerimeters.hpp
|
GCode/RetractWhenCrossingPerimeters.hpp
|
||||||
GCode/SmallAreaInfillFlowCompensator.cpp
|
GCode/SmallAreaInfillFlowCompensator.cpp
|
||||||
GCode/SmallAreaInfillFlowCompensator.hpp
|
GCode/SmallAreaInfillFlowCompensator.hpp
|
||||||
|
GCode/PchipInterpolatorHelper.cpp
|
||||||
|
GCode/PchipInterpolatorHelper.hpp
|
||||||
|
GCode/AdaptivePAInterpolator.cpp
|
||||||
|
GCode/AdaptivePAInterpolator.hpp
|
||||||
|
GCode/AdaptivePAProcessor.cpp
|
||||||
|
GCode/AdaptivePAProcessor.hpp
|
||||||
GCode/SpiralVase.cpp
|
GCode/SpiralVase.cpp
|
||||||
GCode/SpiralVase.hpp
|
GCode/SpiralVase.hpp
|
||||||
GCode/SeamPlacer.cpp
|
GCode/SeamPlacer.cpp
|
||||||
|
|
|
@ -28,7 +28,7 @@ bool model_to_csgmesh(const ModelObject &mo,
|
||||||
{
|
{
|
||||||
bool do_positives = parts_to_include & mpartsPositive;
|
bool do_positives = parts_to_include & mpartsPositive;
|
||||||
bool do_negatives = parts_to_include & mpartsNegative;
|
bool do_negatives = parts_to_include & mpartsNegative;
|
||||||
bool do_drillholes = parts_to_include & mpartsDrillHoles;
|
// bool do_drillholes = parts_to_include & mpartsDrillHoles;
|
||||||
bool do_splits = parts_to_include & mpartsDoSplits;
|
bool do_splits = parts_to_include & mpartsDoSplits;
|
||||||
bool has_splitable_volume = false;
|
bool has_splitable_volume = false;
|
||||||
|
|
||||||
|
|
|
@ -775,10 +775,9 @@ ConfigSubstitutions ConfigBase::load(const std::string &file, ForwardCompatibili
|
||||||
//BBS: add json support
|
//BBS: add json support
|
||||||
ConfigSubstitutions ConfigBase::load_from_json(const std::string &file, ForwardCompatibilitySubstitutionRule compatibility_rule, std::map<std::string, std::string>& key_values, std::string& reason)
|
ConfigSubstitutions ConfigBase::load_from_json(const std::string &file, ForwardCompatibilitySubstitutionRule compatibility_rule, std::map<std::string, std::string>& key_values, std::string& reason)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
ConfigSubstitutionContext substitutions_ctxt(compatibility_rule);
|
ConfigSubstitutionContext substitutions_ctxt(compatibility_rule);
|
||||||
|
|
||||||
ret = load_from_json(file, substitutions_ctxt, true, key_values, reason);
|
load_from_json(file, substitutions_ctxt, true, key_values, reason);
|
||||||
return std::move(substitutions_ctxt.substitutions);
|
return std::move(substitutions_ctxt.substitutions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
#include "ShortestPath.hpp"
|
#include "ShortestPath.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <map>
|
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
#include "../ClipperUtils.hpp"
|
|
||||||
#include "../ExPolygon.hpp"
|
|
||||||
#include "../Surface.hpp"
|
|
||||||
#include "../VariableWidth.hpp"
|
#include "../VariableWidth.hpp"
|
||||||
#include "Arachne/WallToolPaths.hpp"
|
#include "Arachne/WallToolPaths.hpp"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
#include "../ClipperUtils.hpp"
|
|
||||||
#include "../ShortestPath.hpp"
|
#include "../ShortestPath.hpp"
|
||||||
#include "../Surface.hpp"
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#include "FillCrossHatch.hpp"
|
#include "FillCrossHatch.hpp"
|
||||||
|
@ -65,7 +63,6 @@ static Polylines generate_transform_pattern(double inprogress, int direction, co
|
||||||
odd_poly.points.reserve(num_of_cycle * one_cycle.size());
|
odd_poly.points.reserve(num_of_cycle * one_cycle.size());
|
||||||
|
|
||||||
// replicate to odd line
|
// replicate to odd line
|
||||||
Point translate = Point(0, 0);
|
|
||||||
for (size_t i = 0; i < num_of_cycle; i++) {
|
for (size_t i = 0; i < num_of_cycle; i++) {
|
||||||
Polyline odd_points;
|
Polyline odd_points;
|
||||||
odd_points = Polyline(one_cycle);
|
odd_points = Polyline(one_cycle);
|
||||||
|
@ -152,7 +149,6 @@ static Polylines generate_infill_layers(coordf_t z_height, double repeat_ratio,
|
||||||
coordf_t period = trans_layer_size + repeat_layer_size;
|
coordf_t period = trans_layer_size + repeat_layer_size;
|
||||||
coordf_t remains = z_height - std::floor(z_height / period) * period;
|
coordf_t remains = z_height - std::floor(z_height / period) * period;
|
||||||
coordf_t trans_z = remains - repeat_layer_size; // put repeat layer first.
|
coordf_t trans_z = remains - repeat_layer_size; // put repeat layer first.
|
||||||
coordf_t repeat_z = remains;
|
|
||||||
|
|
||||||
int phase = fmod(z_height, period * 2) - (period - 1); // add epsilon
|
int phase = fmod(z_height, period * 2) - (period - 1); // add epsilon
|
||||||
int direction = phase <= 0 ? -1 : 1;
|
int direction = phase <= 0 ? -1 : 1;
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#include "Generator.hpp"
|
#include "Generator.hpp"
|
||||||
#include "TreeNode.hpp"
|
#include "TreeNode.hpp"
|
||||||
|
|
||||||
#include "../../ClipperUtils.hpp"
|
|
||||||
#include "../../Layer.hpp"
|
#include "../../Layer.hpp"
|
||||||
#include "../../Print.hpp"
|
#include "../../Print.hpp"
|
||||||
|
|
||||||
|
@ -35,7 +34,7 @@ static std::string get_svg_filename(std::string layer_nr_or_z, std::string tag
|
||||||
rand_init = true;
|
rand_init = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int rand_num = rand() % 1000000;
|
// int rand_num = rand() % 1000000;
|
||||||
//makedir("./SVG");
|
//makedir("./SVG");
|
||||||
std::string prefix = "./SVG/";
|
std::string prefix = "./SVG/";
|
||||||
std::string suffix = ".svg";
|
std::string suffix = ".svg";
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <assert.h>
|
|
||||||
#include "slic3r/Utils/ColorSpaceConvert.hpp"
|
#include "slic3r/Utils/ColorSpaceConvert.hpp"
|
||||||
|
|
||||||
#include "FlushVolCalc.hpp"
|
#include "FlushVolCalc.hpp"
|
||||||
|
|
|
@ -298,7 +298,6 @@ bool PrusaFileParser::check_3mf_from_prusa(const std::string filename)
|
||||||
const std::string model_file = "3D/3dmodel.model";
|
const std::string model_file = "3D/3dmodel.model";
|
||||||
int model_file_index = mz_zip_reader_locate_file(&archive, model_file.c_str(), nullptr, 0);
|
int model_file_index = mz_zip_reader_locate_file(&archive, model_file.c_str(), nullptr, 0);
|
||||||
if (model_file_index != -1) {
|
if (model_file_index != -1) {
|
||||||
int depth = 0;
|
|
||||||
m_parser = XML_ParserCreate(nullptr);
|
m_parser = XML_ParserCreate(nullptr);
|
||||||
XML_SetUserData(m_parser, (void *) this);
|
XML_SetUserData(m_parser, (void *) this);
|
||||||
XML_SetElementHandler(m_parser, start_element_handler, nullptr);
|
XML_SetElementHandler(m_parser, start_element_handler, nullptr);
|
||||||
|
|
|
@ -100,7 +100,6 @@ bool load_obj(const char *path, TriangleMesh *meshptr, ObjInfo& obj_info, std::s
|
||||||
obj_info.is_single_mtl = data.usemtls.size() == 1 && mtl_data.new_mtl_unmap.size() == 1;
|
obj_info.is_single_mtl = data.usemtls.size() == 1 && mtl_data.new_mtl_unmap.size() == 1;
|
||||||
obj_info.face_colors.reserve(num_faces + num_quads);
|
obj_info.face_colors.reserve(num_faces + num_quads);
|
||||||
}
|
}
|
||||||
bool has_color = data.has_vertex_color;
|
|
||||||
for (size_t i = 0; i < num_vertices; ++ i) {
|
for (size_t i = 0; i < num_vertices; ++ i) {
|
||||||
size_t j = i * OBJ_VERTEX_LENGTH;
|
size_t j = i * OBJ_VERTEX_LENGTH;
|
||||||
its.vertices.emplace_back(data.coordinates[j], data.coordinates[j + 1], data.coordinates[j + 2]);
|
its.vertices.emplace_back(data.coordinates[j], data.coordinates[j + 1], data.coordinates[j + 2]);
|
||||||
|
|
|
@ -878,7 +878,6 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||||
bool extract_object_model()
|
bool extract_object_model()
|
||||||
{
|
{
|
||||||
mz_zip_archive archive;
|
mz_zip_archive archive;
|
||||||
mz_zip_archive_file_stat stat;
|
|
||||||
mz_zip_zero_struct(&archive);
|
mz_zip_zero_struct(&archive);
|
||||||
|
|
||||||
if (!open_zip_reader(&archive, zip_path)) {
|
if (!open_zip_reader(&archive, zip_path)) {
|
||||||
|
@ -1617,9 +1616,9 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_extract_xml_from_archive(archive, sub_rels, _handle_start_relationships_element, _handle_end_relationships_element);
|
_extract_xml_from_archive(archive, sub_rels, _handle_start_relationships_element, _handle_end_relationships_element);
|
||||||
int index = 0;
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
int index = 0;
|
||||||
for (auto path : m_sub_model_paths) {
|
for (auto path : m_sub_model_paths) {
|
||||||
if (proFn) {
|
if (proFn) {
|
||||||
proFn(IMPORT_STAGE_READ_FILES, ++index, 3 + m_sub_model_paths.size(), cb_cancel);
|
proFn(IMPORT_STAGE_READ_FILES, ++index, 3 + m_sub_model_paths.size(), cb_cancel);
|
||||||
|
@ -2219,7 +2218,6 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||||
|
|
||||||
bool _BBS_3MF_Importer::_extract_from_archive(mz_zip_archive& archive, std::string const & path, std::function<bool (mz_zip_archive& archive, const mz_zip_archive_file_stat& stat)> extract, bool restore)
|
bool _BBS_3MF_Importer::_extract_from_archive(mz_zip_archive& archive, std::string const & path, std::function<bool (mz_zip_archive& archive, const mz_zip_archive_file_stat& stat)> extract, bool restore)
|
||||||
{
|
{
|
||||||
mz_uint num_entries = mz_zip_reader_get_num_files(&archive);
|
|
||||||
mz_zip_archive_file_stat stat;
|
mz_zip_archive_file_stat stat;
|
||||||
std::string path2 = path;
|
std::string path2 = path;
|
||||||
if (path2.front() == '/') path2 = path2.substr(1);
|
if (path2.front() == '/') path2 = path2.substr(1);
|
||||||
|
@ -3319,9 +3317,9 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||||
// Adjust backup object/volume id
|
// Adjust backup object/volume id
|
||||||
std::istringstream iss(m_curr_object->uuid);
|
std::istringstream iss(m_curr_object->uuid);
|
||||||
int backup_id;
|
int backup_id;
|
||||||
bool need_replace = false;
|
// bool need_replace = false;
|
||||||
if (iss >> std::hex >> backup_id) {
|
if (iss >> std::hex >> backup_id) {
|
||||||
need_replace = (m_curr_object->id != backup_id);
|
// need_replace = (m_curr_object->id != backup_id);
|
||||||
m_curr_object->id = backup_id;
|
m_curr_object->id = backup_id;
|
||||||
}
|
}
|
||||||
if (!m_curr_object->components.empty())
|
if (!m_curr_object->components.empty())
|
||||||
|
@ -4994,9 +4992,9 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||||
if (is_bbl_3mf && boost::ends_with(current_object->uuid, OBJECT_UUID_SUFFIX) && top_importer->m_load_restore) {
|
if (is_bbl_3mf && boost::ends_with(current_object->uuid, OBJECT_UUID_SUFFIX) && top_importer->m_load_restore) {
|
||||||
std::istringstream iss(current_object->uuid);
|
std::istringstream iss(current_object->uuid);
|
||||||
int backup_id;
|
int backup_id;
|
||||||
bool need_replace = false;
|
// bool need_replace = false;
|
||||||
if (iss >> std::hex >> backup_id) {
|
if (iss >> std::hex >> backup_id) {
|
||||||
need_replace = (current_object->id != backup_id);
|
// need_replace = (current_object->id != backup_id);
|
||||||
current_object->id = backup_id;
|
current_object->id = backup_id;
|
||||||
}
|
}
|
||||||
//if (need_replace)
|
//if (need_replace)
|
||||||
|
@ -5991,8 +5989,6 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||||
auto src_gcode_file = plate_data->gcode_file;
|
auto src_gcode_file = plate_data->gcode_file;
|
||||||
boost::filesystem::ifstream ifs(src_gcode_file, std::ios::binary);
|
boost::filesystem::ifstream ifs(src_gcode_file, std::ios::binary);
|
||||||
std::string buf(64 * 1024, 0);
|
std::string buf(64 * 1024, 0);
|
||||||
const std::size_t & size = boost::filesystem::file_size(src_gcode_file);
|
|
||||||
std::size_t left_size = size;
|
|
||||||
while (ifs) {
|
while (ifs) {
|
||||||
ifs.read(buf.data(), buf.size());
|
ifs.read(buf.data(), buf.size());
|
||||||
int read_bytes = ifs.gcount();
|
int read_bytes = ifs.gcount();
|
||||||
|
@ -6230,7 +6226,6 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||||
|
|
||||||
bool _BBS_3MF_Exporter::_add_bbox_file_to_archive(mz_zip_archive& archive, const PlateBBoxData& id_bboxes, int index)
|
bool _BBS_3MF_Exporter::_add_bbox_file_to_archive(mz_zip_archive& archive, const PlateBBoxData& id_bboxes, int index)
|
||||||
{
|
{
|
||||||
bool res = false;
|
|
||||||
nlohmann::json j;
|
nlohmann::json j;
|
||||||
id_bboxes.to_json(j);
|
id_bboxes.to_json(j);
|
||||||
std::string out = j.dump();
|
std::string out = j.dump();
|
||||||
|
@ -6620,7 +6615,6 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||||
auto iter = objects_data.find(objects[i]);
|
auto iter = objects_data.find(objects[i]);
|
||||||
ObjectToObjectDataMap objects_data2;
|
ObjectToObjectDataMap objects_data2;
|
||||||
objects_data2.insert(*iter);
|
objects_data2.insert(*iter);
|
||||||
auto & object = *iter->second.object;
|
|
||||||
mz_zip_archive archive;
|
mz_zip_archive archive;
|
||||||
mz_zip_zero_struct(&archive);
|
mz_zip_zero_struct(&archive);
|
||||||
mz_zip_writer_init_heap(&archive, 0, 1024 * 1024);
|
mz_zip_writer_init_heap(&archive, 0, 1024 * 1024);
|
||||||
|
@ -7537,7 +7531,7 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||||
|
|
||||||
if (!m_skip_model && instance_size > 0)
|
if (!m_skip_model && instance_size > 0)
|
||||||
{
|
{
|
||||||
for (unsigned int j = 0; j < instance_size; ++j)
|
for (int j = 0; j < instance_size; ++j)
|
||||||
{
|
{
|
||||||
stream << " <" << INSTANCE_TAG << ">\n";
|
stream << " <" << INSTANCE_TAG << ">\n";
|
||||||
int obj_id = plate_data->objects_and_instances[j].first;
|
int obj_id = plate_data->objects_and_instances[j].first;
|
||||||
|
|
|
@ -113,9 +113,6 @@ double get_profile_area(std::vector<std::pair<gp_Pnt, gp_Pnt>> profile_line_poin
|
||||||
|
|
||||||
double area = 0;
|
double area = 0;
|
||||||
for (auto line_points : profile_line_points) {
|
for (auto line_points : profile_line_points) {
|
||||||
bool flag = true;
|
|
||||||
if (line_points.second.Y() < line_points.first.Y()) flag = false;
|
|
||||||
|
|
||||||
area += (line_points.second.X() + line_points.first.X() - 2 * min_x) * (line_points.second.Y() - line_points.first.Y()) / 2;
|
area += (line_points.second.X() + line_points.first.X() - 2 * min_x) * (line_points.second.Y() - line_points.first.Y()) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,8 +134,6 @@ bool get_svg_profile(const char *path, std::vector<Element_Info> &element_infos,
|
||||||
|
|
||||||
int name_index = 1;
|
int name_index = 1;
|
||||||
for (NSVGshape *shape = svg_data->shapes; shape; shape = shape->next) {
|
for (NSVGshape *shape = svg_data->shapes; shape; shape = shape->next) {
|
||||||
char * id = shape->id;
|
|
||||||
|
|
||||||
int interpolation_precision = 10; // Number of interpolation points
|
int interpolation_precision = 10; // Number of interpolation points
|
||||||
float step = 1.0f / float(interpolation_precision - 1);
|
float step = 1.0f / float(interpolation_precision - 1);
|
||||||
|
|
||||||
|
@ -384,7 +379,6 @@ bool load_svg(const char *path, Model *model, std::string &message)
|
||||||
ModelObject *new_object = model->add_object();
|
ModelObject *new_object = model->add_object();
|
||||||
// new_object->name ?
|
// new_object->name ?
|
||||||
new_object->input_file = path;
|
new_object->input_file = path;
|
||||||
auto stage_unit3 = stl.size() / LOAD_STEP_STAGE_UNIT_NUM + 1;
|
|
||||||
for (size_t i = 0; i < stl.size(); i++) {
|
for (size_t i = 0; i < stl.size(); i++) {
|
||||||
// BBS: maybe mesh is empty from step file. Don't add
|
// BBS: maybe mesh is empty from step file. Don't add
|
||||||
if (stl[i].stats.number_of_facets > 0) {
|
if (stl[i].stats.number_of_facets > 0) {
|
||||||
|
|
|
@ -116,7 +116,6 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||||
if (excluse_area.size() != 4)
|
if (excluse_area.size() != 4)
|
||||||
return out_points;
|
return out_points;
|
||||||
|
|
||||||
double cutter_area_x = excluse_area[2].x() + 2;
|
|
||||||
double cutter_area_y = excluse_area[2].y() + 2;
|
double cutter_area_y = excluse_area[2].y() + 2;
|
||||||
|
|
||||||
double start_x_position = start_point.x();
|
double start_x_position = start_point.x();
|
||||||
|
@ -666,6 +665,9 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||||
// SoftFever: set new PA for new filament
|
// SoftFever: set new PA for new filament
|
||||||
if (gcodegen.config().enable_pressure_advance.get_at(new_extruder_id)) {
|
if (gcodegen.config().enable_pressure_advance.get_at(new_extruder_id)) {
|
||||||
gcode += gcodegen.writer().set_pressure_advance(gcodegen.config().pressure_advance.get_at(new_extruder_id));
|
gcode += gcodegen.writer().set_pressure_advance(gcodegen.config().pressure_advance.get_at(new_extruder_id));
|
||||||
|
// Orca: Adaptive PA
|
||||||
|
// Reset Adaptive PA processor last PA value
|
||||||
|
gcodegen.m_pa_processor->resetPreviousPA(gcodegen.config().pressure_advance.get_at(new_extruder_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
// A phony move to the end position at the wipe tower.
|
// A phony move to the end position at the wipe tower.
|
||||||
|
@ -859,6 +861,9 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||||
// SoftFever: set new PA for new filament
|
// SoftFever: set new PA for new filament
|
||||||
if (new_extruder_id != -1 && gcodegen.config().enable_pressure_advance.get_at(new_extruder_id)) {
|
if (new_extruder_id != -1 && gcodegen.config().enable_pressure_advance.get_at(new_extruder_id)) {
|
||||||
gcode += gcodegen.writer().set_pressure_advance(gcodegen.config().pressure_advance.get_at(new_extruder_id));
|
gcode += gcodegen.writer().set_pressure_advance(gcodegen.config().pressure_advance.get_at(new_extruder_id));
|
||||||
|
// Orca: Adaptive PA
|
||||||
|
// Reset Adaptive PA processor last PA value
|
||||||
|
gcodegen.m_pa_processor->resetPreviousPA(gcodegen.config().pressure_advance.get_at(new_extruder_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
// A phony move to the end position at the wipe tower.
|
// A phony move to the end position at the wipe tower.
|
||||||
|
@ -1957,6 +1962,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||||
if (!print.config().small_area_infill_flow_compensation_model.empty())
|
if (!print.config().small_area_infill_flow_compensation_model.empty())
|
||||||
m_small_area_infill_flow_compensator = make_unique<SmallAreaInfillFlowCompensator>(print.config());
|
m_small_area_infill_flow_compensator = make_unique<SmallAreaInfillFlowCompensator>(print.config());
|
||||||
|
|
||||||
|
|
||||||
file.write_format("; HEADER_BLOCK_START\n");
|
file.write_format("; HEADER_BLOCK_START\n");
|
||||||
// Write information on the generator.
|
// Write information on the generator.
|
||||||
file.write_format("; generated by %s on %s\n", Slic3r::header_slic3r_generated().c_str(), Slic3r::Utils::local_timestamp().c_str());
|
file.write_format("; generated by %s on %s\n", Slic3r::header_slic3r_generated().c_str(), Slic3r::Utils::local_timestamp().c_str());
|
||||||
|
@ -2202,6 +2208,9 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||||
m_cooling_buffer = make_unique<CoolingBuffer>(*this);
|
m_cooling_buffer = make_unique<CoolingBuffer>(*this);
|
||||||
m_cooling_buffer->set_current_extruder(initial_extruder_id);
|
m_cooling_buffer->set_current_extruder(initial_extruder_id);
|
||||||
|
|
||||||
|
// Orca: Initialise AdaptivePA processor filter
|
||||||
|
m_pa_processor = std::make_unique<AdaptivePAProcessor>(*this, tool_ordering.all_extruders());
|
||||||
|
|
||||||
// Emit machine envelope limits for the Marlin firmware.
|
// Emit machine envelope limits for the Marlin firmware.
|
||||||
this->print_machine_envelope(file, print);
|
this->print_machine_envelope(file, print);
|
||||||
|
|
||||||
|
@ -2555,7 +2564,6 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||||
m_avoid_crossing_perimeters.use_external_mp_once();
|
m_avoid_crossing_perimeters.use_external_mp_once();
|
||||||
// BBS. change tool before moving to origin point.
|
// BBS. change tool before moving to origin point.
|
||||||
if (m_writer.need_toolchange(initial_extruder_id)) {
|
if (m_writer.need_toolchange(initial_extruder_id)) {
|
||||||
const PrintObjectConfig& object_config = object.config();
|
|
||||||
coordf_t initial_layer_print_height = print.config().initial_layer_print_height.value;
|
coordf_t initial_layer_print_height = print.config().initial_layer_print_height.value;
|
||||||
file.write(this->set_extruder(initial_extruder_id, initial_layer_print_height, true));
|
file.write(this->set_extruder(initial_extruder_id, initial_layer_print_height, true));
|
||||||
prime_extruder = true;
|
prime_extruder = true;
|
||||||
|
@ -2846,6 +2854,12 @@ void GCode::process_layers(
|
||||||
return in.gcode;
|
return in.gcode;
|
||||||
return cooling_buffer.process_layer(std::move(in.gcode), in.layer_id, in.cooling_buffer_flush);
|
return cooling_buffer.process_layer(std::move(in.gcode), in.layer_id, in.cooling_buffer_flush);
|
||||||
});
|
});
|
||||||
|
const auto pa_processor_filter = tbb::make_filter<std::string, std::string>(slic3r_tbb_filtermode::serial_in_order,
|
||||||
|
[&pa_processor = *this->m_pa_processor](std::string in) -> std::string {
|
||||||
|
return pa_processor.process_layer(std::move(in));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const auto output = tbb::make_filter<std::string, void>(slic3r_tbb_filtermode::serial_in_order,
|
const auto output = tbb::make_filter<std::string, void>(slic3r_tbb_filtermode::serial_in_order,
|
||||||
[&output_stream](std::string s) { output_stream.write(s); }
|
[&output_stream](std::string s) { output_stream.write(s); }
|
||||||
);
|
);
|
||||||
|
@ -2876,9 +2890,9 @@ void GCode::process_layers(
|
||||||
else if (m_spiral_vase)
|
else if (m_spiral_vase)
|
||||||
tbb::parallel_pipeline(12, generator & spiral_mode & cooling & fan_mover & output);
|
tbb::parallel_pipeline(12, generator & spiral_mode & cooling & fan_mover & output);
|
||||||
else if (m_pressure_equalizer)
|
else if (m_pressure_equalizer)
|
||||||
tbb::parallel_pipeline(12, generator & pressure_equalizer & cooling & fan_mover & output);
|
tbb::parallel_pipeline(12, generator & pressure_equalizer & cooling & fan_mover & pa_processor_filter & output);
|
||||||
else
|
else
|
||||||
tbb::parallel_pipeline(12, generator & cooling & fan_mover & output);
|
tbb::parallel_pipeline(12, generator & cooling & fan_mover & pa_processor_filter & output);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process all layers of a single object instance (sequential mode) with a parallel pipeline:
|
// Process all layers of a single object instance (sequential mode) with a parallel pipeline:
|
||||||
|
@ -3334,14 +3348,17 @@ namespace ProcessLayer
|
||||||
const PrintConfig &config)
|
const PrintConfig &config)
|
||||||
{
|
{
|
||||||
std::string gcode;
|
std::string gcode;
|
||||||
// BBS
|
|
||||||
bool single_filament_print = config.filament_diameter.size() == 1;
|
|
||||||
|
|
||||||
if (custom_gcode != nullptr) {
|
if (custom_gcode != nullptr) {
|
||||||
// Extruder switches are processed by LayerTools, they should be filtered out.
|
// Extruder switches are processed by LayerTools, they should be filtered out.
|
||||||
assert(custom_gcode->type != CustomGCode::ToolChange);
|
assert(custom_gcode->type != CustomGCode::ToolChange);
|
||||||
|
|
||||||
CustomGCode::Type gcode_type = custom_gcode->type;
|
CustomGCode::Type gcode_type = custom_gcode->type;
|
||||||
|
|
||||||
|
//BBS: inserting color gcode is removed
|
||||||
|
#if 0
|
||||||
|
// BBS
|
||||||
|
bool single_filament_print = config.filament_diameter.size() == 1;
|
||||||
bool color_change = gcode_type == CustomGCode::ColorChange;
|
bool color_change = gcode_type == CustomGCode::ColorChange;
|
||||||
bool tool_change = gcode_type == CustomGCode::ToolChange;
|
bool tool_change = gcode_type == CustomGCode::ToolChange;
|
||||||
// Tool Change is applied as Color Change for a single extruder printer only.
|
// Tool Change is applied as Color Change for a single extruder printer only.
|
||||||
|
@ -3353,8 +3370,7 @@ namespace ProcessLayer
|
||||||
m600_extruder_before_layer = custom_gcode->extruder - 1;
|
m600_extruder_before_layer = custom_gcode->extruder - 1;
|
||||||
else if (gcode_type == CustomGCode::PausePrint)
|
else if (gcode_type == CustomGCode::PausePrint)
|
||||||
pause_print_msg = custom_gcode->extra;
|
pause_print_msg = custom_gcode->extra;
|
||||||
//BBS: inserting color gcode is removed
|
|
||||||
#if 0
|
|
||||||
// we should add or not colorprint_change in respect to nozzle_diameter count instead of really used extruders count
|
// we should add or not colorprint_change in respect to nozzle_diameter count instead of really used extruders count
|
||||||
if (color_change || tool_change)
|
if (color_change || tool_change)
|
||||||
{
|
{
|
||||||
|
@ -3417,8 +3433,8 @@ namespace Skirt {
|
||||||
{
|
{
|
||||||
// Prime all extruders printing over the 1st layer over the skirt lines.
|
// Prime all extruders printing over the 1st layer over the skirt lines.
|
||||||
size_t n_loops = print.skirt().entities.size();
|
size_t n_loops = print.skirt().entities.size();
|
||||||
size_t n_tools = layer_tools.extruders.size();
|
// size_t n_tools = layer_tools.extruders.size();
|
||||||
size_t lines_per_extruder = (n_loops + n_tools - 1) / n_tools;
|
// size_t lines_per_extruder = (n_loops + n_tools - 1) / n_tools;
|
||||||
|
|
||||||
// BBS. Extrude skirt with first extruder if min_skirt_length is zero
|
// BBS. Extrude skirt with first extruder if min_skirt_length is zero
|
||||||
//ORCA: Always extrude skirt with first extruder, independantly of if the minimum skirt length is zero or not. The code below
|
//ORCA: Always extrude skirt with first extruder, independantly of if the minimum skirt length is zero or not. The code below
|
||||||
|
@ -3774,7 +3790,8 @@ LayerResult GCode::process_layer(
|
||||||
Skirt::make_skirt_loops_per_extruder_other_layers(print, layer_tools, m_skirt_done);
|
Skirt::make_skirt_loops_per_extruder_other_layers(print, layer_tools, m_skirt_done);
|
||||||
|
|
||||||
// BBS: get next extruder according to flush and soluble
|
// BBS: get next extruder according to flush and soluble
|
||||||
auto get_next_extruder = [&](int current_extruder,const std::vector<unsigned int>&extruders) {
|
// Orca: Left unused due to removed code below
|
||||||
|
/* auto get_next_extruder = [&](int current_extruder,const std::vector<unsigned int>&extruders) {
|
||||||
std::vector<float> flush_matrix(cast<float>(m_config.flush_volumes_matrix.values));
|
std::vector<float> flush_matrix(cast<float>(m_config.flush_volumes_matrix.values));
|
||||||
const unsigned int number_of_extruders = (unsigned int)(sqrt(flush_matrix.size()) + EPSILON);
|
const unsigned int number_of_extruders = (unsigned int)(sqrt(flush_matrix.size()) + EPSILON);
|
||||||
// Extract purging volumes for each extruder pair:
|
// Extract purging volumes for each extruder pair:
|
||||||
|
@ -3792,7 +3809,7 @@ LayerResult GCode::process_layer(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return next_extruder;
|
return next_extruder;
|
||||||
};
|
}; */
|
||||||
|
|
||||||
if (m_config.enable_overhang_speed && !m_config.overhang_speed_classic) {
|
if (m_config.enable_overhang_speed && !m_config.overhang_speed_classic) {
|
||||||
for (const auto &layer_to_print : layers) {
|
for (const auto &layer_to_print : layers) {
|
||||||
|
@ -4045,7 +4062,7 @@ LayerResult GCode::process_layer(
|
||||||
m_avoid_crossing_perimeters.use_external_mp();
|
m_avoid_crossing_perimeters.use_external_mp();
|
||||||
Flow layer_skirt_flow = print.skirt_flow().with_height(float(m_skirt_done.back() - (m_skirt_done.size() == 1 ? 0. : m_skirt_done[m_skirt_done.size() - 2])));
|
Flow layer_skirt_flow = print.skirt_flow().with_height(float(m_skirt_done.back() - (m_skirt_done.size() == 1 ? 0. : m_skirt_done[m_skirt_done.size() - 2])));
|
||||||
double mm3_per_mm = layer_skirt_flow.mm3_per_mm();
|
double mm3_per_mm = layer_skirt_flow.mm3_per_mm();
|
||||||
for (size_t i = loops.first; i < loops.second; ++i) {
|
for (size_t i = (layer.id() == 0) ? loops.first : loops.second - 1; i < loops.second; ++i) {
|
||||||
// Adjust flow according to this layer's layer height.
|
// Adjust flow according to this layer's layer height.
|
||||||
ExtrusionLoop loop = *dynamic_cast<const ExtrusionLoop*>(print.skirt().entities[i]);
|
ExtrusionLoop loop = *dynamic_cast<const ExtrusionLoop*>(print.skirt().entities[i]);
|
||||||
for (ExtrusionPath &path : loop.paths) {
|
for (ExtrusionPath &path : loop.paths) {
|
||||||
|
@ -4529,6 +4546,7 @@ static std::unique_ptr<EdgeGrid::Grid> calculate_layer_edge_grid(const Layer& la
|
||||||
|
|
||||||
std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, double speed, const ExtrusionEntitiesPtr& region_perimeters)
|
std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, double speed, const ExtrusionEntitiesPtr& region_perimeters)
|
||||||
{
|
{
|
||||||
|
|
||||||
// get a copy; don't modify the orientation of the original loop object otherwise
|
// get a copy; don't modify the orientation of the original loop object otherwise
|
||||||
// next copies (if any) would not detect the correct orientation
|
// next copies (if any) would not detect the correct orientation
|
||||||
|
|
||||||
|
@ -4538,6 +4556,8 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou
|
||||||
// if spiral vase, we have to ensure that all contour are in the same orientation.
|
// if spiral vase, we have to ensure that all contour are in the same orientation.
|
||||||
loop.make_counter_clockwise();
|
loop.make_counter_clockwise();
|
||||||
}
|
}
|
||||||
|
if (loop.loop_role() == elrSkirt && (this->m_layer->id() % 2 == 1))
|
||||||
|
loop.reverse();
|
||||||
|
|
||||||
// find the point of the loop that is closest to the current extruder position
|
// find the point of the loop that is closest to the current extruder position
|
||||||
// or randomize if requested
|
// or randomize if requested
|
||||||
|
@ -4654,7 +4674,9 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou
|
||||||
if(discoveredTouchingLines > 1){
|
if(discoveredTouchingLines > 1){
|
||||||
// use extrude instead of travel_to_xy to trigger the unretract
|
// use extrude instead of travel_to_xy to trigger the unretract
|
||||||
ExtrusionPath fake_path_wipe(Polyline{pt, current_point}, paths.front());
|
ExtrusionPath fake_path_wipe(Polyline{pt, current_point}, paths.front());
|
||||||
|
fake_path_wipe.set_force_no_extrusion(true);
|
||||||
fake_path_wipe.mm3_per_mm = 0;
|
fake_path_wipe.mm3_per_mm = 0;
|
||||||
|
//fake_path_wipe.set_extrusion_role(erExternalPerimeter);
|
||||||
gcode += extrude_path(fake_path_wipe, "move inwards before retraction/seam", speed);
|
gcode += extrude_path(fake_path_wipe, "move inwards before retraction/seam", speed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4666,9 +4688,32 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou
|
||||||
return is_small_peri ? small_peri_speed : speed;
|
return is_small_peri ? small_peri_speed : speed;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//Orca: Adaptive PA: calculate average mm3_per_mm value over the length of the loop.
|
||||||
|
//This is used for adaptive PA
|
||||||
|
m_multi_flow_segment_path_pa_set = false; // always emit PA on the first path of the loop
|
||||||
|
m_multi_flow_segment_path_average_mm3_per_mm = 0;
|
||||||
|
double weighted_sum_mm3_per_mm = 0.0;
|
||||||
|
double total_multipath_length = 0.0;
|
||||||
|
for (const ExtrusionPath& path : paths) {
|
||||||
|
if(!path.is_force_no_extrusion()){
|
||||||
|
double path_length = unscale<double>(path.length()); //path length in mm
|
||||||
|
weighted_sum_mm3_per_mm += path.mm3_per_mm * path_length;
|
||||||
|
total_multipath_length += path_length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (total_multipath_length > 0.0)
|
||||||
|
m_multi_flow_segment_path_average_mm3_per_mm = weighted_sum_mm3_per_mm / total_multipath_length;
|
||||||
|
// Orca: end of multipath average mm3_per_mm value calculation
|
||||||
|
|
||||||
if (!enable_seam_slope) {
|
if (!enable_seam_slope) {
|
||||||
for (ExtrusionPaths::iterator path = paths.begin(); path != paths.end(); ++path) {
|
for (ExtrusionPaths::iterator path = paths.begin(); path != paths.end(); ++path) {
|
||||||
gcode += this->_extrude(*path, description, speed_for_path(*path));
|
gcode += this->_extrude(*path, description, speed_for_path(*path));
|
||||||
|
// Orca: Adaptive PA - dont adapt PA after the first pultipath extrusion is completed
|
||||||
|
// as we have already set the PA value to the average flow over the totality of the path
|
||||||
|
// in the first extrude move
|
||||||
|
// TODO: testing is needed with slope seams and adaptive PA.
|
||||||
|
m_multi_flow_segment_path_pa_set = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Create seam slope
|
// Create seam slope
|
||||||
|
@ -4700,6 +4745,10 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou
|
||||||
// Then extrude it
|
// Then extrude it
|
||||||
for (const auto& p : new_loop.get_all_paths()) {
|
for (const auto& p : new_loop.get_all_paths()) {
|
||||||
gcode += this->_extrude(*p, description, speed_for_path(*p));
|
gcode += this->_extrude(*p, description, speed_for_path(*p));
|
||||||
|
// Orca: Adaptive PA - dont adapt PA after the first pultipath extrusion is completed
|
||||||
|
// as we have already set the PA value to the average flow over the totality of the path
|
||||||
|
// in the first extrude move
|
||||||
|
m_multi_flow_segment_path_pa_set = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fix path for wipe
|
// Fix path for wipe
|
||||||
|
@ -4771,8 +4820,31 @@ std::string GCode::extrude_multi_path(ExtrusionMultiPath multipath, std::string
|
||||||
{
|
{
|
||||||
// extrude along the path
|
// extrude along the path
|
||||||
std::string gcode;
|
std::string gcode;
|
||||||
for (ExtrusionPath path : multipath.paths)
|
|
||||||
|
//Orca: calculate multipath average mm3_per_mm value over the length of the path.
|
||||||
|
//This is used for adaptive PA
|
||||||
|
m_multi_flow_segment_path_pa_set = false; // always emit PA on the first path of the multi-path
|
||||||
|
m_multi_flow_segment_path_average_mm3_per_mm = 0;
|
||||||
|
double weighted_sum_mm3_per_mm = 0.0;
|
||||||
|
double total_multipath_length = 0.0;
|
||||||
|
for (const ExtrusionPath& path : multipath.paths) {
|
||||||
|
if(!path.is_force_no_extrusion()){
|
||||||
|
double path_length = unscale<double>(path.length()); //path length in mm
|
||||||
|
weighted_sum_mm3_per_mm += path.mm3_per_mm * path_length;
|
||||||
|
total_multipath_length += path_length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (total_multipath_length > 0.0)
|
||||||
|
m_multi_flow_segment_path_average_mm3_per_mm = weighted_sum_mm3_per_mm / total_multipath_length;
|
||||||
|
// Orca: end of multipath average mm3_per_mm value calculation
|
||||||
|
|
||||||
|
for (ExtrusionPath path : multipath.paths){
|
||||||
gcode += this->_extrude(path, description, speed);
|
gcode += this->_extrude(path, description, speed);
|
||||||
|
// Orca: Adaptive PA - dont adapt PA after the first pultipath extrusion is completed
|
||||||
|
// as we have already set the PA value to the average flow over the totality of the path
|
||||||
|
// in the first extrude move.
|
||||||
|
m_multi_flow_segment_path_pa_set = true;
|
||||||
|
}
|
||||||
|
|
||||||
// BBS
|
// BBS
|
||||||
if (m_wipe.enable) {
|
if (m_wipe.enable) {
|
||||||
|
@ -4806,6 +4878,9 @@ std::string GCode::extrude_entity(const ExtrusionEntity &entity, std::string des
|
||||||
|
|
||||||
std::string GCode::extrude_path(ExtrusionPath path, std::string description, double speed)
|
std::string GCode::extrude_path(ExtrusionPath path, std::string description, double speed)
|
||||||
{
|
{
|
||||||
|
// Orca: Reset average multipath flow as this is a single line, single extrude volumetric speed path
|
||||||
|
m_multi_flow_segment_path_pa_set = false;
|
||||||
|
m_multi_flow_segment_path_average_mm3_per_mm = 0;
|
||||||
// description += ExtrusionEntity::role_to_string(path.role());
|
// description += ExtrusionEntity::role_to_string(path.role());
|
||||||
std::string gcode = this->_extrude(path, description, speed);
|
std::string gcode = this->_extrude(path, description, speed);
|
||||||
if (m_wipe.enable) {
|
if (m_wipe.enable) {
|
||||||
|
@ -4867,8 +4942,8 @@ std::string GCode::extrude_support(const ExtrusionEntityCollection &support_fill
|
||||||
|
|
||||||
std::string gcode;
|
std::string gcode;
|
||||||
if (! support_fills.entities.empty()) {
|
if (! support_fills.entities.empty()) {
|
||||||
const double support_speed = m_config.support_speed.value;
|
// const double support_speed = m_config.support_speed.value;
|
||||||
const double support_interface_speed = m_config.get_abs_value("support_interface_speed");
|
// const double support_interface_speed = m_config.get_abs_value("support_interface_speed");
|
||||||
for (const ExtrusionEntity *ee : support_fills.entities) {
|
for (const ExtrusionEntity *ee : support_fills.entities) {
|
||||||
ExtrusionRole role = ee->role();
|
ExtrusionRole role = ee->role();
|
||||||
assert(role == erSupportMaterial || role == erSupportMaterialInterface || role == erSupportTransition);
|
assert(role == erSupportMaterial || role == erSupportMaterialInterface || role == erSupportTransition);
|
||||||
|
@ -5273,6 +5348,27 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||||
|
|
||||||
double F = speed * 60; // convert mm/sec to mm/min
|
double F = speed * 60; // convert mm/sec to mm/min
|
||||||
|
|
||||||
|
// Orca: Dynamic PA
|
||||||
|
// If adaptive PA is enabled, by default evaluate PA on all extrusion moves
|
||||||
|
bool evaluate_adaptive_pa = false;
|
||||||
|
bool role_change = (m_last_extrusion_role != path.role());
|
||||||
|
if(EXTRUDER_CONFIG(adaptive_pressure_advance) && EXTRUDER_CONFIG(enable_pressure_advance)){
|
||||||
|
evaluate_adaptive_pa = true;
|
||||||
|
// If we have already emmited a PA change because the m_multi_flow_segment_path_pa_set is set
|
||||||
|
// skip re-issuing the PA change tag.
|
||||||
|
if (m_multi_flow_segment_path_pa_set && evaluate_adaptive_pa)
|
||||||
|
evaluate_adaptive_pa = false;
|
||||||
|
// TODO: Explore forcing evaluation of PA if a role change is happening mid extrusion.
|
||||||
|
// TODO: This would enable adapting PA for overhang perimeters as they are part of the current loop
|
||||||
|
// TODO: The issue with simply enabling PA evaluation on a role change is that the speed change
|
||||||
|
// TODO: is issued before the overhang perimeter role change is triggered
|
||||||
|
// TODO: because for some reason (maybe path segmentation upstream?) there is a short path extruded
|
||||||
|
// TODO: with the overhang speed and flow before the role change is flagged in the path.role() function.
|
||||||
|
if(role_change)
|
||||||
|
evaluate_adaptive_pa = true;
|
||||||
|
}
|
||||||
|
// Orca: End of dynamic PA trigger flag segment
|
||||||
|
|
||||||
//Orca: process custom gcode for extrusion role change
|
//Orca: process custom gcode for extrusion role change
|
||||||
if (path.role() != m_last_extrusion_role && !m_config.change_extrusion_role_gcode.value.empty()) {
|
if (path.role() != m_last_extrusion_role && !m_config.change_extrusion_role_gcode.value.empty()) {
|
||||||
DynamicConfig config;
|
DynamicConfig config;
|
||||||
|
@ -5329,6 +5425,45 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||||
gcode += buf;
|
gcode += buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Orca: Dynamic PA
|
||||||
|
// Post processor flag generation code segment when option to emit only at role changes is enabled
|
||||||
|
// Variables published to the post processor:
|
||||||
|
// 1) Tag to trigger a PA evaluation (because a role change was identified and the user has requested dynamic PA adjustments)
|
||||||
|
// 2) Current extruder ID (to identify the PA model for the currently used extruder)
|
||||||
|
// 3) mm3_per_mm value (to then multiply by the final model print speed after slowdown for cooling is applied)
|
||||||
|
// 4) the current acceleration (to pass to the model for evaluation)
|
||||||
|
// 5) whether this is an external perimeter (for future use)
|
||||||
|
// 6) whether this segment is triggered because of a role change (to aid in calculation of average speed for the role)
|
||||||
|
// This tag simplifies the creation of the gcode post processor while also keeping the feature decoupled from other tags.
|
||||||
|
if (evaluate_adaptive_pa) {
|
||||||
|
bool isOverhangPerimeter = (path.role() == erOverhangPerimeter);
|
||||||
|
if (m_multi_flow_segment_path_average_mm3_per_mm > 0) {
|
||||||
|
sprintf(buf, ";%sT%u MM3MM:%g ACCEL:%u BR:%d RC:%d OV:%d\n",
|
||||||
|
GCodeProcessor::reserved_tag(GCodeProcessor::ETags::PA_Change).c_str(),
|
||||||
|
m_writer.extruder()->id(),
|
||||||
|
m_multi_flow_segment_path_average_mm3_per_mm,
|
||||||
|
acceleration_i,
|
||||||
|
((path.role() == erBridgeInfill) ||(path.role() == erOverhangPerimeter)),
|
||||||
|
role_change,
|
||||||
|
isOverhangPerimeter);
|
||||||
|
gcode += buf;
|
||||||
|
} else if(_mm3_per_mm >0 ){ // Triggered when extruding a single segment path (like a line).
|
||||||
|
// Check if mm3_mm value is greater than zero as the wipe before external perimeter
|
||||||
|
// is a zero mm3_mm path to force de-retraction to happen and we dont want
|
||||||
|
// to issue a zero flow PA change command for this
|
||||||
|
sprintf(buf, ";%sT%u MM3MM:%g ACCEL:%u BR:%d RC:%d OV:%d\n",
|
||||||
|
GCodeProcessor::reserved_tag(GCodeProcessor::ETags::PA_Change).c_str(),
|
||||||
|
m_writer.extruder()->id(),
|
||||||
|
_mm3_per_mm,
|
||||||
|
acceleration_i,
|
||||||
|
((path.role() == erBridgeInfill) ||(path.role() == erOverhangPerimeter)),
|
||||||
|
role_change,
|
||||||
|
isOverhangPerimeter);
|
||||||
|
gcode += buf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
auto overhang_fan_threshold = EXTRUDER_CONFIG(overhang_fan_threshold);
|
auto overhang_fan_threshold = EXTRUDER_CONFIG(overhang_fan_threshold);
|
||||||
auto enable_overhang_bridge_fan = EXTRUDER_CONFIG(enable_overhang_bridge_fan);
|
auto enable_overhang_bridge_fan = EXTRUDER_CONFIG(enable_overhang_bridge_fan);
|
||||||
|
|
||||||
|
@ -5378,6 +5513,54 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||||
|
|
||||||
if (!variable_speed) {
|
if (!variable_speed) {
|
||||||
// F is mm per minute.
|
// F is mm per minute.
|
||||||
|
if( (std::abs(writer().get_current_speed() - F) > EPSILON) || (std::abs(_mm3_per_mm - m_last_mm3_mm) > EPSILON) ){
|
||||||
|
// ORCA: Adaptive PA code segment when adjusting PA within the same feature
|
||||||
|
// There is a speed change coming out of an overhang region
|
||||||
|
// or a flow change, so emit the flag to evaluate PA for the upcomming extrusion
|
||||||
|
// Emit tag before new speed is set so the post processor reads the next speed immediately and uses it.
|
||||||
|
// Dont emit tag if it has just already been emitted from a role change above
|
||||||
|
if(_mm3_per_mm >0 &&
|
||||||
|
EXTRUDER_CONFIG(adaptive_pressure_advance) &&
|
||||||
|
EXTRUDER_CONFIG(enable_pressure_advance) &&
|
||||||
|
EXTRUDER_CONFIG(adaptive_pressure_advance_overhangs) &&
|
||||||
|
!evaluate_adaptive_pa){
|
||||||
|
if(writer().get_current_speed() > F){ // Ramping down speed - use overhang logic where the minimum speed is used between current and upcoming extrusion
|
||||||
|
if(m_config.gcode_comments){
|
||||||
|
sprintf(buf, "; Ramp down-non-variable\n");
|
||||||
|
gcode += buf;
|
||||||
|
}
|
||||||
|
sprintf(buf, ";%sT%u MM3MM:%g ACCEL:%u BR:%d RC:%d OV:%d\n",
|
||||||
|
GCodeProcessor::reserved_tag(GCodeProcessor::ETags::PA_Change).c_str(),
|
||||||
|
m_writer.extruder()->id(),
|
||||||
|
_mm3_per_mm,
|
||||||
|
acceleration_i,
|
||||||
|
((path.role() == erBridgeInfill) ||(path.role() == erOverhangPerimeter)),
|
||||||
|
1, // Force a dummy "role change" & "overhang perimeter" for the post processor, as, while technically it is not a role change,
|
||||||
|
// the properties of the extrusion in the overhang are different so it behaves similarly to a role
|
||||||
|
// change for the Adaptive PA post processor.
|
||||||
|
1);
|
||||||
|
}else{ // Ramping up speed - use baseline logic where max speed is used between current and upcoming extrusion
|
||||||
|
if(m_config.gcode_comments){
|
||||||
|
sprintf(buf, "; Ramp up-non-variable\n");
|
||||||
|
gcode += buf;
|
||||||
|
}
|
||||||
|
sprintf(buf, ";%sT%u MM3MM:%g ACCEL:%u BR:%d RC:%d OV:%d\n",
|
||||||
|
GCodeProcessor::reserved_tag(GCodeProcessor::ETags::PA_Change).c_str(),
|
||||||
|
m_writer.extruder()->id(),
|
||||||
|
_mm3_per_mm,
|
||||||
|
acceleration_i,
|
||||||
|
((path.role() == erBridgeInfill) ||(path.role() == erOverhangPerimeter)),
|
||||||
|
1, // Force a dummy "role change" & "overhang perimeter" for the post processor, as, while technically it is not a role change,
|
||||||
|
// the properties of the extrusion in the overhang are different so it is technically similar to a role
|
||||||
|
// change for the Adaptive PA post processor.
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
gcode += buf;
|
||||||
|
m_last_mm3_mm = _mm3_per_mm;
|
||||||
|
}
|
||||||
|
// ORCA: End of adaptive PA code segment
|
||||||
|
}
|
||||||
|
|
||||||
gcode += m_writer.set_speed(F, "", comment);
|
gcode += m_writer.set_speed(F, "", comment);
|
||||||
{
|
{
|
||||||
if (m_enable_cooling_markers) {
|
if (m_enable_cooling_markers) {
|
||||||
|
@ -5572,6 +5755,52 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||||
continue;
|
continue;
|
||||||
path_length += line_length;
|
path_length += line_length;
|
||||||
double new_speed = pre_processed_point.speed * 60.0;
|
double new_speed = pre_processed_point.speed * 60.0;
|
||||||
|
|
||||||
|
if ((std::abs(last_set_speed - new_speed) > EPSILON) || (std::abs(_mm3_per_mm - m_last_mm3_mm) > EPSILON)) {
|
||||||
|
// ORCA: Adaptive PA code segment when adjusting PA within the same feature
|
||||||
|
// There is a speed change or flow change so emit the flag to evaluate PA for the upcomming extrusion
|
||||||
|
// Emit tag before new speed is set so the post processor reads the next speed immediately and uses it.
|
||||||
|
if(_mm3_per_mm >0 &&
|
||||||
|
EXTRUDER_CONFIG(adaptive_pressure_advance) &&
|
||||||
|
EXTRUDER_CONFIG(enable_pressure_advance) &&
|
||||||
|
EXTRUDER_CONFIG(adaptive_pressure_advance_overhangs) ){
|
||||||
|
if(last_set_speed > new_speed){ // Ramping down speed - use overhang logic where the minimum speed is used between current and upcoming extrusion
|
||||||
|
if(m_config.gcode_comments) {
|
||||||
|
sprintf(buf, "; Ramp up-variable\n");
|
||||||
|
gcode += buf;
|
||||||
|
}
|
||||||
|
sprintf(buf, ";%sT%u MM3MM:%g ACCEL:%u BR:%d RC:%d OV:%d\n",
|
||||||
|
GCodeProcessor::reserved_tag(GCodeProcessor::ETags::PA_Change).c_str(),
|
||||||
|
m_writer.extruder()->id(),
|
||||||
|
_mm3_per_mm,
|
||||||
|
acceleration_i,
|
||||||
|
((path.role() == erBridgeInfill) ||(path.role() == erOverhangPerimeter)),
|
||||||
|
1, // Force a dummy "role change" & "overhang perimeter" for the post processor, as, while technically it is not a role change,
|
||||||
|
// the properties of the extrusion in the overhang are different so it is technically similar to a role
|
||||||
|
// change for the Adaptive PA post processor.
|
||||||
|
1);
|
||||||
|
}else{ // Ramping up speed - use baseline logic where max speed is used between current and upcoming extrusion
|
||||||
|
if(m_config.gcode_comments) {
|
||||||
|
sprintf(buf, "; Ramp down-variable\n");
|
||||||
|
gcode += buf;
|
||||||
|
}
|
||||||
|
sprintf(buf, ";%sT%u MM3MM:%g ACCEL:%u BR:%d RC:%d OV:%d\n",
|
||||||
|
GCodeProcessor::reserved_tag(GCodeProcessor::ETags::PA_Change).c_str(),
|
||||||
|
m_writer.extruder()->id(),
|
||||||
|
_mm3_per_mm,
|
||||||
|
acceleration_i,
|
||||||
|
((path.role() == erBridgeInfill) ||(path.role() == erOverhangPerimeter)),
|
||||||
|
1, // Force a dummy "role change" & "overhang perimeter" for the post processor, as, while technically it is not a role change,
|
||||||
|
// the properties of the extrusion in the overhang are different so it is technically similar to a role
|
||||||
|
// change for the Adaptive PA post processor.
|
||||||
|
0);
|
||||||
|
}
|
||||||
|
gcode += buf;
|
||||||
|
m_last_mm3_mm = _mm3_per_mm;
|
||||||
|
}
|
||||||
|
}// ORCA: End of adaptive PA code segment
|
||||||
|
|
||||||
|
|
||||||
if (last_set_speed != new_speed) {
|
if (last_set_speed != new_speed) {
|
||||||
gcode += m_writer.set_speed(new_speed, "", comment);
|
gcode += m_writer.set_speed(new_speed, "", comment);
|
||||||
last_set_speed = new_speed;
|
last_set_speed = new_speed;
|
||||||
|
@ -5880,7 +6109,6 @@ bool GCode::needs_retraction(const Polyline &travel, ExtrusionRole role, LiftTyp
|
||||||
for (int i = 0; i < m_config.z_hop.size(); i++)
|
for (int i = 0; i < m_config.z_hop.size(); i++)
|
||||||
max_z_hop = std::max(max_z_hop, (float)m_config.z_hop.get_at(i));
|
max_z_hop = std::max(max_z_hop, (float)m_config.z_hop.get_at(i));
|
||||||
float travel_len_thresh = scale_(max_z_hop / tan(this->writer().extruder()->travel_slope()));
|
float travel_len_thresh = scale_(max_z_hop / tan(this->writer().extruder()->travel_slope()));
|
||||||
float accum_len = 0.f;
|
|
||||||
Polyline clipped_travel;
|
Polyline clipped_travel;
|
||||||
|
|
||||||
clipped_travel.append(Polyline(travel.points[0], travel.points[1]));
|
clipped_travel.append(Polyline(travel.points[0], travel.points[1]));
|
||||||
|
@ -5982,7 +6210,6 @@ std::string GCode::retract(bool toolchange, bool is_last_retraction, LiftType li
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needs_lift && can_lift) {
|
if (needs_lift && can_lift) {
|
||||||
size_t extruder_id = m_writer.extruder()->id();
|
|
||||||
gcode += m_writer.lift(!m_spiral_vase ? lift_type : LiftType::NormalLift);
|
gcode += m_writer.lift(!m_spiral_vase ? lift_type : LiftType::NormalLift);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6017,6 +6244,9 @@ std::string GCode::set_extruder(unsigned int extruder_id, double print_z, bool b
|
||||||
}
|
}
|
||||||
if (m_config.enable_pressure_advance.get_at(extruder_id)) {
|
if (m_config.enable_pressure_advance.get_at(extruder_id)) {
|
||||||
gcode += m_writer.set_pressure_advance(m_config.pressure_advance.get_at(extruder_id));
|
gcode += m_writer.set_pressure_advance(m_config.pressure_advance.get_at(extruder_id));
|
||||||
|
// Orca: Adaptive PA
|
||||||
|
// Reset Adaptive PA processor last PA value
|
||||||
|
m_pa_processor->resetPreviousPA(m_config.pressure_advance.get_at(extruder_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
gcode += m_writer.toolchange(extruder_id);
|
gcode += m_writer.toolchange(extruder_id);
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
|
|
||||||
#include "GCode/PressureEqualizer.hpp"
|
#include "GCode/PressureEqualizer.hpp"
|
||||||
#include "GCode/SmallAreaInfillFlowCompensator.hpp"
|
#include "GCode/SmallAreaInfillFlowCompensator.hpp"
|
||||||
|
// ORCA: post processor below used for Dynamic Pressure advance
|
||||||
|
#include "GCode/AdaptivePAProcessor.hpp"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -358,6 +360,19 @@ private:
|
||||||
std::string extrude_multi_path(ExtrusionMultiPath multipath, std::string description = "", double speed = -1.);
|
std::string extrude_multi_path(ExtrusionMultiPath multipath, std::string description = "", double speed = -1.);
|
||||||
std::string extrude_path(ExtrusionPath path, std::string description = "", double speed = -1.);
|
std::string extrude_path(ExtrusionPath path, std::string description = "", double speed = -1.);
|
||||||
|
|
||||||
|
// Orca: Adaptive PA variables
|
||||||
|
// Used for adaptive PA when extruding paths with multiple, varying flow segments.
|
||||||
|
// This contains the sum of the mm3_per_mm values weighted by the length of each path segment.
|
||||||
|
// The m_multi_flow_segment_path_pa_set constrains the PA change request to the first extrusion segment.
|
||||||
|
// It sets the mm3_mm value for the adaptive PA post processor to be the average of that path
|
||||||
|
// as calculated and stored in the m_multi_segment_path_average_mm3_per_mm value
|
||||||
|
double m_multi_flow_segment_path_average_mm3_per_mm = 0;
|
||||||
|
bool m_multi_flow_segment_path_pa_set = false;
|
||||||
|
// Adaptive PA last set flow to enable issuing of PA change commands when adaptive PA for overhangs
|
||||||
|
// is enabled
|
||||||
|
double m_last_mm3_mm = 0;
|
||||||
|
// Orca: Adaptive PA code segment end
|
||||||
|
|
||||||
// Extruding multiple objects with soluble / non-soluble / combined supports
|
// Extruding multiple objects with soluble / non-soluble / combined supports
|
||||||
// on a multi-material printer, trying to minimize tool switches.
|
// on a multi-material printer, trying to minimize tool switches.
|
||||||
// Following structures sort extrusions by the extruder ID, by an order of objects and object islands.
|
// Following structures sort extrusions by the extruder ID, by an order of objects and object islands.
|
||||||
|
@ -540,6 +555,8 @@ private:
|
||||||
|
|
||||||
std::unique_ptr<PressureEqualizer> m_pressure_equalizer;
|
std::unique_ptr<PressureEqualizer> m_pressure_equalizer;
|
||||||
|
|
||||||
|
std::unique_ptr<AdaptivePAProcessor> m_pa_processor;
|
||||||
|
|
||||||
std::unique_ptr<WipeTowerIntegration> m_wipe_tower;
|
std::unique_ptr<WipeTowerIntegration> m_wipe_tower;
|
||||||
|
|
||||||
std::unique_ptr<SmallAreaInfillFlowCompensator> m_small_area_infill_flow_compensator;
|
std::unique_ptr<SmallAreaInfillFlowCompensator> m_small_area_infill_flow_compensator;
|
||||||
|
|
114
src/libslic3r/GCode/AdaptivePAInterpolator.cpp
Normal file
114
src/libslic3r/GCode/AdaptivePAInterpolator.cpp
Normal file
|
@ -0,0 +1,114 @@
|
||||||
|
// AdaptivePAInterpolator.cpp
|
||||||
|
// OrcaSlicer
|
||||||
|
//
|
||||||
|
// Implementation file for the AdaptivePAInterpolator class, providing methods to parse data and perform PA interpolation.
|
||||||
|
|
||||||
|
#include "AdaptivePAInterpolator.hpp"
|
||||||
|
#include <stdexcept>
|
||||||
|
#include <cmath>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Parses the input data and sets up the interpolators.
|
||||||
|
* @param data A string containing the data in CSV format (PA, flow rate, acceleration).
|
||||||
|
* @return 0 on success, -1 on error.
|
||||||
|
*/
|
||||||
|
int AdaptivePAInterpolator::parseAndSetData(const std::string& data) {
|
||||||
|
flow_interpolators_.clear();
|
||||||
|
accelerations_.clear();
|
||||||
|
|
||||||
|
try {
|
||||||
|
std::istringstream ss(data);
|
||||||
|
std::string line;
|
||||||
|
std::map<double, std::vector<std::pair<double, double>>> acc_to_flow_pa;
|
||||||
|
|
||||||
|
while (std::getline(ss, line)) {
|
||||||
|
std::istringstream lineStream(line);
|
||||||
|
std::string value;
|
||||||
|
double paValue, flowRate, acceleration;
|
||||||
|
paValue = flowRate = acceleration = 0.f; // initialize all to zero.
|
||||||
|
|
||||||
|
// Parse PA value
|
||||||
|
if (std::getline(lineStream, value, ',')) {
|
||||||
|
paValue = std::stod(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse flow rate value
|
||||||
|
if (std::getline(lineStream, value, ',')) {
|
||||||
|
flowRate = std::stod(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Parse acceleration value
|
||||||
|
if (std::getline(lineStream, value, ',')) {
|
||||||
|
acceleration = std::stod(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store the parsed values in a map with acceleration as the key
|
||||||
|
acc_to_flow_pa[acceleration].emplace_back(flowRate, paValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Iterate through the map to set up the interpolators
|
||||||
|
for (const auto& kv : acc_to_flow_pa) {
|
||||||
|
double acceleration = kv.first;
|
||||||
|
const auto& data = kv.second;
|
||||||
|
|
||||||
|
std::vector<double> flowRates;
|
||||||
|
std::vector<double> paValues;
|
||||||
|
|
||||||
|
for (const auto& pair : data) {
|
||||||
|
flowRates.push_back(pair.first);
|
||||||
|
paValues.push_back(pair.second);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only set up the interpolator if there are enough data points
|
||||||
|
if (flowRates.size() > 1) {
|
||||||
|
PchipInterpolatorHelper interpolator(flowRates, paValues);
|
||||||
|
flow_interpolators_[acceleration] = interpolator;
|
||||||
|
accelerations_.push_back(acceleration);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (const std::exception&) {
|
||||||
|
m_isInitialised = false;
|
||||||
|
return -1; // Error: Exception during parsing
|
||||||
|
}
|
||||||
|
m_isInitialised = true;
|
||||||
|
return 0; // Success
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Interpolates the PA value for the given flow rate and acceleration.
|
||||||
|
* @param flow_rate The flow rate at which to interpolate.
|
||||||
|
* @param acceleration The acceleration at which to interpolate.
|
||||||
|
* @return The interpolated PA value, or -1 if interpolation fails.
|
||||||
|
*/
|
||||||
|
double AdaptivePAInterpolator::operator()(double flow_rate, double acceleration) {
|
||||||
|
std::vector<double> pa_values;
|
||||||
|
std::vector<double> acc_values;
|
||||||
|
|
||||||
|
// Estimate PA value for every flow to PA model for the given flow rate
|
||||||
|
for (const auto& kv : flow_interpolators_) {
|
||||||
|
double pa_value = kv.second.interpolate(flow_rate);
|
||||||
|
|
||||||
|
// Check if the interpolated PA value is valid
|
||||||
|
if (pa_value != -1) {
|
||||||
|
pa_values.push_back(pa_value);
|
||||||
|
acc_values.push_back(kv.first);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if there are enough acceleration values for interpolation
|
||||||
|
if (acc_values.size() < 2) {
|
||||||
|
// Special case: Only one acceleration value
|
||||||
|
if (acc_values.size() == 1) {
|
||||||
|
return std::round(pa_values[0] * 1000.0) / 1000.0; // Rounded to 3 decimal places
|
||||||
|
}
|
||||||
|
return -1; // Error: Not enough data points for interpolation
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a new PchipInterpolatorHelper for PA-acceleration interpolation
|
||||||
|
// Use the estimated PA values from the for loop above and their corresponding accelerations to
|
||||||
|
// generate the new PCHIP model. Then run this model to interpolate the PA value for the given acceleration value.
|
||||||
|
PchipInterpolatorHelper pa_accel_interpolator(acc_values, pa_values);
|
||||||
|
return std::round(pa_accel_interpolator.interpolate(acceleration) * 1000.0) / 1000.0; // Rounded to 3 decimal places
|
||||||
|
}
|
54
src/libslic3r/GCode/AdaptivePAInterpolator.hpp
Normal file
54
src/libslic3r/GCode/AdaptivePAInterpolator.hpp
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
// AdaptivePAInterpolator.hpp
|
||||||
|
// OrcaSlicer
|
||||||
|
//
|
||||||
|
// Header file for the AdaptivePAInterpolator class, responsible for interpolating pressure advance (PA) values based on flow rate and acceleration using PCHIP interpolation.
|
||||||
|
|
||||||
|
#ifndef ADAPTIVEPAINTERPOLATOR_HPP
|
||||||
|
#define ADAPTIVEPAINTERPOLATOR_HPP
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
#include <map>
|
||||||
|
#include "PchipInterpolatorHelper.hpp"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class AdaptivePAInterpolator
|
||||||
|
* @brief A class to interpolate pressure advance (PA) values based on flow rate and acceleration using Piecewise Cubic Hermite Interpolating Polynomial (PCHIP) interpolation.
|
||||||
|
*/
|
||||||
|
class AdaptivePAInterpolator {
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* @brief Default constructor.
|
||||||
|
*/
|
||||||
|
AdaptivePAInterpolator() : m_isInitialised(false) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Parses the input data and sets up the interpolators.
|
||||||
|
* @param data A string containing the data in CSV format (PA, flow rate, acceleration).
|
||||||
|
* @return 0 on success, -1 on error.
|
||||||
|
*/
|
||||||
|
int parseAndSetData(const std::string& data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Interpolates the PA value for the given flow rate and acceleration.
|
||||||
|
* @param flow_rate The flow rate at which to interpolate.
|
||||||
|
* @param acceleration The acceleration at which to interpolate.
|
||||||
|
* @return The interpolated PA value, or -1 if interpolation fails.
|
||||||
|
*/
|
||||||
|
double operator()(double flow_rate, double acceleration);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the initialization status.
|
||||||
|
* @return The value of m_isInitialised.
|
||||||
|
*/
|
||||||
|
bool isInitialised() const {
|
||||||
|
return m_isInitialised;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::map<double, PchipInterpolatorHelper> flow_interpolators_; ///< Map each acceleration to a flow-rate-to-PA interpolator.
|
||||||
|
std::vector<double> accelerations_; ///< Store unique accelerations.
|
||||||
|
bool m_isInitialised;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // ADAPTIVEPAINTERPOLATOR_HPP
|
285
src/libslic3r/GCode/AdaptivePAProcessor.cpp
Normal file
285
src/libslic3r/GCode/AdaptivePAProcessor.cpp
Normal file
|
@ -0,0 +1,285 @@
|
||||||
|
// AdaptivePAProcessor.cpp
|
||||||
|
// OrcaSlicer
|
||||||
|
//
|
||||||
|
// Implementation of the AdaptivePAProcessor class, responsible for processing G-code layers with adaptive pressure advance.
|
||||||
|
|
||||||
|
#include "../GCode.hpp"
|
||||||
|
#include "AdaptivePAProcessor.hpp"
|
||||||
|
#include <sstream>
|
||||||
|
#include <iostream>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
|
namespace Slic3r {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Constructor for AdaptivePAProcessor.
|
||||||
|
*
|
||||||
|
* This constructor initializes the AdaptivePAProcessor with a reference to a GCode object.
|
||||||
|
* It also initializes the configuration reference, pressure advance interpolation object,
|
||||||
|
* and regular expression patterns used for processing the G-code.
|
||||||
|
*
|
||||||
|
* @param gcodegen A reference to the GCode object that generates the G-code.
|
||||||
|
*/
|
||||||
|
AdaptivePAProcessor::AdaptivePAProcessor(GCode &gcodegen, const std::vector<unsigned int> &tools_used)
|
||||||
|
: m_gcodegen(gcodegen),
|
||||||
|
m_config(gcodegen.config()),
|
||||||
|
m_last_predicted_pa(0.0),
|
||||||
|
m_max_next_feedrate(0.0),
|
||||||
|
m_next_feedrate(0.0),
|
||||||
|
m_current_feedrate(0.0),
|
||||||
|
m_last_extruder_id(-1),
|
||||||
|
m_pa_change_pattern(R"(; PA_CHANGE:T(\d+) MM3MM:([0-9]*\.[0-9]+) ACCEL:(\d+) BR:(\d+) RC:(\d+) OV:(\d+))"),
|
||||||
|
m_g1_f_pattern(R"(G1 F([0-9]+))")
|
||||||
|
{
|
||||||
|
// Constructor body can be used for further initialization if necessary
|
||||||
|
for (unsigned int tool : tools_used) {
|
||||||
|
// Only enable model for the tool if both PA and adaptive PA options are enabled
|
||||||
|
if(m_config.adaptive_pressure_advance.get_at(tool) && m_config.enable_pressure_advance.get_at(tool)){
|
||||||
|
auto interpolator = std::make_unique<AdaptivePAInterpolator>();
|
||||||
|
// Get calibration values from extruder
|
||||||
|
std::string pa_calibration_values = m_config.adaptive_pressure_advance_model.get_at(tool);
|
||||||
|
// Setup the model and store it in the tool-interpolation model map
|
||||||
|
interpolator->parseAndSetData(pa_calibration_values);
|
||||||
|
m_AdaptivePAInterpolators[tool] = std::move(interpolator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Method to get the interpolator for a specific tool ID
|
||||||
|
AdaptivePAInterpolator* AdaptivePAProcessor::getInterpolator(unsigned int tool_id) {
|
||||||
|
auto it = m_AdaptivePAInterpolators.find(tool_id);
|
||||||
|
if (it != m_AdaptivePAInterpolators.end()) {
|
||||||
|
return it->second.get();
|
||||||
|
}
|
||||||
|
return nullptr; // Handle the case where the tool_id is not found
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Processes a layer of G-code and applies adaptive pressure advance.
|
||||||
|
*
|
||||||
|
* This method processes the G-code for a single layer, identifying the appropriate
|
||||||
|
* pressure advance settings and applying them based on the current state and configurations.
|
||||||
|
*
|
||||||
|
* @param gcode A string containing the G-code for the layer.
|
||||||
|
* @return A string containing the processed G-code with adaptive pressure advance applied.
|
||||||
|
*/
|
||||||
|
std::string AdaptivePAProcessor::process_layer(std::string &&gcode) {
|
||||||
|
std::istringstream stream(gcode);
|
||||||
|
std::string line;
|
||||||
|
std::ostringstream output;
|
||||||
|
double mm3mm_value = 0.0;
|
||||||
|
unsigned int accel_value = 0;
|
||||||
|
std::string pa_change_line;
|
||||||
|
bool wipe_command = false;
|
||||||
|
|
||||||
|
// Iterate through each line of the layer G-code
|
||||||
|
while (std::getline(stream, line)) {
|
||||||
|
|
||||||
|
// If a wipe start command is found, ignore all speed changes till the wipe end part is found
|
||||||
|
if (line.find("WIPE_START") != std::string::npos) {
|
||||||
|
wipe_command = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update current feed rate (this is preceding an extrude or wipe command only). Ignore any speed changes that are emitted during a wipe move.
|
||||||
|
// Travel feedrate is output as part of a G1 X Y (Z) F command
|
||||||
|
if ( (line.find("G1 F") == 0) && (!wipe_command) ) { // prune lines quickly before running pattern matching
|
||||||
|
std::size_t pos = line.find('F');
|
||||||
|
if (pos != std::string::npos){
|
||||||
|
m_current_feedrate = std::stod(line.substr(pos + 1)) / 60.0; // Convert from mm/min to mm/s
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wipe end found, continue searching for current feed rate.
|
||||||
|
if (line.find("WIPE_END") != std::string::npos) {
|
||||||
|
wipe_command = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reset next feedrate to zero enable searching for the first encountered
|
||||||
|
// feedrate change command after the PA change tag.
|
||||||
|
m_next_feedrate = 0;
|
||||||
|
|
||||||
|
// Check for PA_CHANGE pattern in the line
|
||||||
|
// We will only find this pattern for extruders where adaptive PA is enabled.
|
||||||
|
// If there is mixed extruders in the layer (i.e. with adaptive PA on and off
|
||||||
|
// this will only update the extruders where the adaptive PA is enabled
|
||||||
|
// as these are the only ones where the PA pattern is output
|
||||||
|
// For a mixed extruder layer with both adaptive PA enabled and disabled when the new tool is selected
|
||||||
|
// the PA for that material is set. As no tag below will be found for this extruder, the original PA is retained.
|
||||||
|
if (line.find("; PA_CHANGE") == 0) { // prune lines quickly before running regex check as regex is more expensive to run
|
||||||
|
if (std::regex_search(line, m_match, m_pa_change_pattern)) {
|
||||||
|
int extruder_id = std::stoi(m_match[1].str());
|
||||||
|
mm3mm_value = std::stod(m_match[2].str());
|
||||||
|
accel_value = std::stod(m_match[3].str());
|
||||||
|
int isBridge = std::stoi(m_match[4].str());
|
||||||
|
int roleChange = std::stoi(m_match[5].str());
|
||||||
|
int isOverhang = std::stoi(m_match[6].str());
|
||||||
|
|
||||||
|
// Check if the extruder ID has changed
|
||||||
|
bool extruder_changed = (extruder_id != m_last_extruder_id);
|
||||||
|
m_last_extruder_id = extruder_id;
|
||||||
|
|
||||||
|
// Save the PA_CHANGE line to output later after finding feedrate
|
||||||
|
pa_change_line = line;
|
||||||
|
|
||||||
|
// Look ahead for feedrate before any line containing both G and E commands
|
||||||
|
std::streampos current_pos = stream.tellg();
|
||||||
|
std::string next_line;
|
||||||
|
double temp_feed_rate = 0;
|
||||||
|
bool extrude_move_found = false;
|
||||||
|
int line_counter = 0;
|
||||||
|
|
||||||
|
// Carry on searching on the layer gcode lines to find the print speed
|
||||||
|
// If a G1 Fxxxx pattern is found, the new speed is identified
|
||||||
|
// Carry on searching for feedrates to find the maximum print speed
|
||||||
|
// until a feature change pattern or a wipe command is detected
|
||||||
|
while (std::getline(stream, next_line)) {
|
||||||
|
line_counter++;
|
||||||
|
// Found an extrude move, set extrude move found flag and move to the next line
|
||||||
|
if ((!extrude_move_found) && next_line.find("G1 ") == 0 &&
|
||||||
|
next_line.find('X') != std::string::npos &&
|
||||||
|
next_line.find('Y') != std::string::npos &&
|
||||||
|
next_line.find('E') != std::string::npos) {
|
||||||
|
// Pattern matched, break the loop
|
||||||
|
extrude_move_found = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Found a travel move after we've found at least one extrude move
|
||||||
|
// We now need to stop searching for speeds as we're done printing this island
|
||||||
|
if (next_line.find("G1 ") == 0 &&
|
||||||
|
next_line.find('X') != std::string::npos && // X is present
|
||||||
|
next_line.find('Y') != std::string::npos && // Y is present
|
||||||
|
next_line.find('E') == std::string::npos && // no "E" present
|
||||||
|
extrude_move_found) { // An extrude move has happened already
|
||||||
|
// First travel move after extrude move found. Stop searching
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Found a WIPE command
|
||||||
|
// If we have a wipe command, usually the wipe speed is different (larger) than the max print speed
|
||||||
|
// for that feature. So stop searching if a wipe command is found because we do not want to overwrite the
|
||||||
|
// speed used for PA calculation by the Wipe speed.
|
||||||
|
if (next_line.find("WIPE") != std::string::npos) {
|
||||||
|
break; // Stop searching if wipe command is found
|
||||||
|
}
|
||||||
|
|
||||||
|
// Found another PA_CHANGE pattern
|
||||||
|
// If RC = 1, it means we have a role change, so stop trying to find the max speed for the feature.
|
||||||
|
// This is possibly redundant as a new feature would always have a travel move preceding it
|
||||||
|
// but check anyway. However check last so to not invoke it without reason...
|
||||||
|
if (next_line.find("; PA_CHANGE") == 0) { // prune lines quickly before running pattern matching
|
||||||
|
std::size_t rc_pos = next_line.rfind("RC:");
|
||||||
|
if (rc_pos != std::string::npos) {
|
||||||
|
int rc_value = std::stoi(next_line.substr(rc_pos + 3));
|
||||||
|
if (rc_value == 1) {
|
||||||
|
break; // Role change found, stop searching
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Found a Feedrate change command
|
||||||
|
// If the new feedrate is greater than any feedrate encountered so far after the PA change command, use that to calculate the PA value
|
||||||
|
// Also if this is the first feedrate we encounter, store it as the next feedrate.
|
||||||
|
if (next_line.find("G1 F") == 0) { // prune lines quickly before running pattern matching
|
||||||
|
std::size_t pos = next_line.find('F');
|
||||||
|
if (pos != std::string::npos) {
|
||||||
|
double feedrate = std::stod(next_line.substr(pos + 1)) / 60.0; // Convert from mm/min to mm/s
|
||||||
|
if(line_counter==1){ // this is the first command after the PA change pattern, and hence before any extrusion has happened. Reset
|
||||||
|
// the current speed to this one
|
||||||
|
m_current_feedrate = feedrate;
|
||||||
|
}
|
||||||
|
if (temp_feed_rate < feedrate) {
|
||||||
|
temp_feed_rate = feedrate;
|
||||||
|
}
|
||||||
|
if(m_next_feedrate < EPSILON){ // This the first feedrate found after the PA Change command
|
||||||
|
m_next_feedrate = feedrate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we found a new maximum feedrate after the PA change command, use it
|
||||||
|
if (temp_feed_rate > 0) {
|
||||||
|
m_max_next_feedrate = temp_feed_rate;
|
||||||
|
} else // If we didnt find a new feedrate at all after the PA change command, use the current feedrate.
|
||||||
|
m_max_next_feedrate = m_current_feedrate;
|
||||||
|
|
||||||
|
// Restore stream position
|
||||||
|
stream.clear();
|
||||||
|
stream.seekg(current_pos);
|
||||||
|
|
||||||
|
// Calculate the predicted PA using the upcomming feature maximum feedrate
|
||||||
|
// Get the interpolator for the active tool
|
||||||
|
AdaptivePAInterpolator* interpolator = getInterpolator(m_last_extruder_id);
|
||||||
|
|
||||||
|
double predicted_pa = 0;
|
||||||
|
double adaptive_PA_speed = 0;
|
||||||
|
|
||||||
|
if(!interpolator){ // Tool not found in the interpolator map
|
||||||
|
// Tool not found in the PA interpolator to tool map
|
||||||
|
predicted_pa = m_config.enable_pressure_advance.get_at(m_last_extruder_id) ? m_config.pressure_advance.get_at(m_last_extruder_id) : 0;
|
||||||
|
if(m_config.gcode_comments) output << "; APA: Tool doesnt have APA enabled\n";
|
||||||
|
} else if (!interpolator->isInitialised() || (!m_config.adaptive_pressure_advance.get_at(m_last_extruder_id)) )
|
||||||
|
// Check if the model is not initialised by the constructor for the active extruder
|
||||||
|
// Also check that adaptive PA is enabled for that extruder. This should not be needed
|
||||||
|
// as the PA change flag should not be set upstream (in the GCode.cpp file) if adaptive PA is disabled
|
||||||
|
// however check for robustness sake.
|
||||||
|
{
|
||||||
|
// Model failed or adaptive pressure advance not enabled - use default value from m_config
|
||||||
|
predicted_pa = m_config.enable_pressure_advance.get_at(m_last_extruder_id) ? m_config.pressure_advance.get_at(m_last_extruder_id) : 0;
|
||||||
|
if(m_config.gcode_comments) output << "; APA: Interpolator setup failed, using default pressure advance\n";
|
||||||
|
} else { // Model setup succeeded
|
||||||
|
// Proceed to identify the print speed to use to calculate the adaptive PA value
|
||||||
|
if(isOverhang > 0){ // If we are in an overhang area, use the minimum between current print speed
|
||||||
|
// and any speed immediately after
|
||||||
|
// In most cases the current speed is the minimum one;
|
||||||
|
// however if slowdown for layer cooling is enabled, the overhang
|
||||||
|
// may be slowed down more than the current speed.
|
||||||
|
adaptive_PA_speed = (m_current_feedrate == 0 || m_next_feedrate == 0) ?
|
||||||
|
std::max(m_current_feedrate, m_next_feedrate) :
|
||||||
|
std::min(m_current_feedrate, m_next_feedrate);
|
||||||
|
}else{ // If this is not an overhang area, use the maximum speed from the current and
|
||||||
|
// upcomming speeds for the island.
|
||||||
|
adaptive_PA_speed = std::max(m_max_next_feedrate,m_current_feedrate);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculate the adaptive PA value
|
||||||
|
predicted_pa = (*interpolator)(mm3mm_value * adaptive_PA_speed, accel_value);
|
||||||
|
|
||||||
|
// This is a bridge, use the dedicated PA setting.
|
||||||
|
if(isBridge && m_config.adaptive_pressure_advance_bridges.get_at(m_last_extruder_id) > EPSILON)
|
||||||
|
predicted_pa = m_config.adaptive_pressure_advance_bridges.get_at(m_last_extruder_id);
|
||||||
|
|
||||||
|
if (predicted_pa < 0) { // If extrapolation fails, fall back to the default PA for the extruder.
|
||||||
|
predicted_pa = m_config.enable_pressure_advance.get_at(m_last_extruder_id) ? m_config.pressure_advance.get_at(m_last_extruder_id) : 0;
|
||||||
|
if(m_config.gcode_comments) output << "; APA: Interpolation failed, using fallback pressure advance value\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(m_config.gcode_comments) {
|
||||||
|
// Output debug GCode comments
|
||||||
|
output << pa_change_line << '\n'; // Output PA change command tag
|
||||||
|
if(isBridge && m_config.adaptive_pressure_advance_bridges.get_at(m_last_extruder_id) > EPSILON)
|
||||||
|
output << "; APA Model Override (bridge)\n";
|
||||||
|
output << "; APA Current Speed: " << std::to_string(m_current_feedrate) << "\n";
|
||||||
|
output << "; APA Next Speed: " << std::to_string(m_next_feedrate) << "\n";
|
||||||
|
output << "; APA Max Next Speed: " << std::to_string(m_max_next_feedrate) << "\n";
|
||||||
|
output << "; APA Speed Used: " << std::to_string(adaptive_PA_speed) << "\n";
|
||||||
|
output << "; APA Flow rate: " << std::to_string(mm3mm_value * m_max_next_feedrate) << "\n";
|
||||||
|
output << "; APA Prev PA: " << std::to_string(m_last_predicted_pa) << " New PA: " << std::to_string(predicted_pa) << "\n";
|
||||||
|
}
|
||||||
|
if (extruder_changed || std::fabs(predicted_pa - m_last_predicted_pa) > EPSILON) {
|
||||||
|
output << m_gcodegen.writer().set_pressure_advance(predicted_pa); // Use m_writer to set pressure advance
|
||||||
|
m_last_predicted_pa = predicted_pa; // Update the last predicted PA value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
// Output the current line as this isn't a PA change tag
|
||||||
|
output << line << '\n';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return output.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Slic3r
|
85
src/libslic3r/GCode/AdaptivePAProcessor.hpp
Normal file
85
src/libslic3r/GCode/AdaptivePAProcessor.hpp
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
// AdaptivePAProcessor.hpp
|
||||||
|
// OrcaSlicer
|
||||||
|
//
|
||||||
|
// Header file for the AdaptivePAProcessor class, responsible for processing G-code layers for the purposes of applying adaptive pressure advance.
|
||||||
|
|
||||||
|
#ifndef ADAPTIVEPAPROCESSOR_H
|
||||||
|
#define ADAPTIVEPAPROCESSOR_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <sstream>
|
||||||
|
#include <regex>
|
||||||
|
#include <memory>
|
||||||
|
#include <map>
|
||||||
|
#include <vector>
|
||||||
|
#include "AdaptivePAInterpolator.hpp"
|
||||||
|
|
||||||
|
namespace Slic3r {
|
||||||
|
|
||||||
|
// Forward declaration of GCode class
|
||||||
|
class GCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Class for processing G-code layers with adaptive pressure advance.
|
||||||
|
*/
|
||||||
|
class AdaptivePAProcessor {
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* @brief Constructor for AdaptivePAProcessor.
|
||||||
|
*
|
||||||
|
* This constructor initializes the AdaptivePAProcessor with a reference to a GCode object.
|
||||||
|
* It also initializes the configuration reference, pressure advance interpolation object,
|
||||||
|
* and regular expression patterns used for processing the G-code.
|
||||||
|
*
|
||||||
|
* @param gcodegen A reference to the GCode object that generates the G-code.
|
||||||
|
*/
|
||||||
|
AdaptivePAProcessor(GCode &gcodegen, const std::vector<unsigned int> &tools_used);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Processes a layer of G-code and applies adaptive pressure advance.
|
||||||
|
*
|
||||||
|
* This method processes the G-code for a single layer, identifying the appropriate
|
||||||
|
* pressure advance settings and applying them based on the current state and configurations.
|
||||||
|
*
|
||||||
|
* @param gcode A string containing the G-code for the layer.
|
||||||
|
* @return A string containing the processed G-code with adaptive pressure advance applied.
|
||||||
|
*/
|
||||||
|
std::string process_layer(std::string &&gcode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Manually sets adaptive PA internal value.
|
||||||
|
*
|
||||||
|
* This method manually sets the adaptive PA internally held value.
|
||||||
|
* Call this when changing tools or in any other case where the internally assumed last PA value may be incorrect
|
||||||
|
*/
|
||||||
|
void resetPreviousPA(double PA){ m_last_predicted_pa = PA; };
|
||||||
|
|
||||||
|
private:
|
||||||
|
GCode &m_gcodegen; ///< Reference to the GCode object.
|
||||||
|
std::unordered_map<unsigned int, std::unique_ptr<AdaptivePAInterpolator>> m_AdaptivePAInterpolators; ///< Map between Interpolator objects and tool ID's
|
||||||
|
const PrintConfig &m_config; ///< Reference to the print configuration.
|
||||||
|
double m_last_predicted_pa; ///< Last predicted pressure advance value.
|
||||||
|
double m_max_next_feedrate; ///< Maximum feed rate (speed) for the upcomming island. If no speed is found, the previous island speed is used.
|
||||||
|
double m_next_feedrate; ///< First feed rate (speed) for the upcomming island.
|
||||||
|
double m_current_feedrate; ///< Current, latest feedrate.
|
||||||
|
int m_last_extruder_id; ///< Last used extruder ID.
|
||||||
|
|
||||||
|
std::regex m_pa_change_pattern; ///< Regular expression to detect PA_CHANGE pattern.
|
||||||
|
std::regex m_g1_f_pattern; ///< Regular expression to detect G1 F pattern.
|
||||||
|
std::smatch m_match; ///< Match results for regular expressions.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the PA interpolator attached to the specified tool ID.
|
||||||
|
*
|
||||||
|
* This method manually sets the adaptive PA internally held value.
|
||||||
|
* Call this when changing tools or in any other case where the internally assumed last PA value may be incorrect
|
||||||
|
*
|
||||||
|
* @param An integer with the tool ID for which the PA interpolation model is to be returned.
|
||||||
|
* @return The Adaptive PA Interpolator object corresponding to that tool.
|
||||||
|
*/
|
||||||
|
AdaptivePAInterpolator* getInterpolator(unsigned int tool_id);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Slic3r
|
||||||
|
|
||||||
|
#endif // ADAPTIVEPAPROCESSOR_H
|
|
@ -28,7 +28,6 @@ inline Grids line_rasterization(const Line &line, int64_t xdist = scale_(1), int
|
||||||
Point rayStart = line.a;
|
Point rayStart = line.a;
|
||||||
Point rayEnd = line.b;
|
Point rayEnd = line.b;
|
||||||
IndexPair currentVoxel = point_map_grid_index(rayStart, xdist, ydist);
|
IndexPair currentVoxel = point_map_grid_index(rayStart, xdist, ydist);
|
||||||
IndexPair firstVoxel = currentVoxel;
|
|
||||||
IndexPair lastVoxel = point_map_grid_index(rayEnd, xdist, ydist);
|
IndexPair lastVoxel = point_map_grid_index(rayEnd, xdist, ydist);
|
||||||
|
|
||||||
Point ray = rayEnd - rayStart;
|
Point ray = rayEnd - rayStart;
|
||||||
|
|
|
@ -70,7 +70,8 @@ const std::vector<std::string> GCodeProcessor::Reserved_Tags = {
|
||||||
" MANUAL_TOOL_CHANGE ",
|
" MANUAL_TOOL_CHANGE ",
|
||||||
"_DURING_PRINT_EXHAUST_FAN",
|
"_DURING_PRINT_EXHAUST_FAN",
|
||||||
" WIPE_TOWER_START",
|
" WIPE_TOWER_START",
|
||||||
" WIPE_TOWER_END"
|
" WIPE_TOWER_END",
|
||||||
|
" PA_CHANGE:"
|
||||||
};
|
};
|
||||||
|
|
||||||
const std::vector<std::string> GCodeProcessor::Reserved_Tags_compatible = {
|
const std::vector<std::string> GCodeProcessor::Reserved_Tags_compatible = {
|
||||||
|
@ -90,7 +91,8 @@ const std::vector<std::string> GCodeProcessor::Reserved_Tags_compatible = {
|
||||||
" MANUAL_TOOL_CHANGE ",
|
" MANUAL_TOOL_CHANGE ",
|
||||||
"_DURING_PRINT_EXHAUST_FAN",
|
"_DURING_PRINT_EXHAUST_FAN",
|
||||||
" WIPE_TOWER_START",
|
" WIPE_TOWER_START",
|
||||||
" WIPE_TOWER_END"
|
" WIPE_TOWER_END",
|
||||||
|
" PA_CHANGE:"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -695,7 +697,9 @@ void GCodeProcessor::TimeProcessor::post_process(const std::string& filename, st
|
||||||
if (!disable_m73 && !processed &&!is_temporary_decoration(gcode_line) &&
|
if (!disable_m73 && !processed &&!is_temporary_decoration(gcode_line) &&
|
||||||
(GCodeReader::GCodeLine::cmd_is(gcode_line, "G1") ||
|
(GCodeReader::GCodeLine::cmd_is(gcode_line, "G1") ||
|
||||||
GCodeReader::GCodeLine::cmd_is(gcode_line, "G2") ||
|
GCodeReader::GCodeLine::cmd_is(gcode_line, "G2") ||
|
||||||
GCodeReader::GCodeLine::cmd_is(gcode_line, "G3"))) {
|
GCodeReader::GCodeLine::cmd_is(gcode_line, "G3") ||
|
||||||
|
GCodeReader::GCodeLine::cmd_is(gcode_line, "G10")||
|
||||||
|
GCodeReader::GCodeLine::cmd_is(gcode_line, "G11"))) {
|
||||||
// remove temporary lines, add lines M73 where needed
|
// remove temporary lines, add lines M73 where needed
|
||||||
unsigned int extra_lines_count = process_line_move(g1_lines_counter ++);
|
unsigned int extra_lines_count = process_line_move(g1_lines_counter ++);
|
||||||
if (extra_lines_count > 0)
|
if (extra_lines_count > 0)
|
||||||
|
@ -3477,7 +3481,6 @@ void GCodeProcessor::process_G2_G3(const GCodeReader::GCodeLine& line)
|
||||||
arc_length = ((int)line.p()) * 2 * PI * (start_point - m_arc_center).norm();
|
arc_length = ((int)line.p()) * 2 * PI * (start_point - m_arc_center).norm();
|
||||||
//BBS: Attention! arc_onterpolation does not support P mode while P is not 1.
|
//BBS: Attention! arc_onterpolation does not support P mode while P is not 1.
|
||||||
arc_interpolation(start_point, end_point, m_arc_center, (m_move_path_type == EMovePathType::Arc_move_ccw));
|
arc_interpolation(start_point, end_point, m_arc_center, (m_move_path_type == EMovePathType::Arc_move_ccw));
|
||||||
float radian = ArcSegment::calc_arc_radian(start_point, end_point, m_arc_center, (m_move_path_type == EMovePathType::Arc_move_ccw));
|
|
||||||
Vec3f start_dir = Circle::calc_tangential_vector(start_point, m_arc_center, (m_move_path_type == EMovePathType::Arc_move_ccw));
|
Vec3f start_dir = Circle::calc_tangential_vector(start_point, m_arc_center, (m_move_path_type == EMovePathType::Arc_move_ccw));
|
||||||
Vec3f end_dir = Circle::calc_tangential_vector(end_point, m_arc_center, (m_move_path_type == EMovePathType::Arc_move_ccw));
|
Vec3f end_dir = Circle::calc_tangential_vector(end_point, m_arc_center, (m_move_path_type == EMovePathType::Arc_move_ccw));
|
||||||
|
|
||||||
|
@ -3838,14 +3841,18 @@ void GCodeProcessor::process_G29(const GCodeReader::GCodeLine& line)
|
||||||
|
|
||||||
void GCodeProcessor::process_G10(const GCodeReader::GCodeLine& line)
|
void GCodeProcessor::process_G10(const GCodeReader::GCodeLine& line)
|
||||||
{
|
{
|
||||||
// stores retract move
|
GCodeReader::GCodeLine g10;
|
||||||
store_move_vertex(EMoveType::Retract);
|
g10.set(Axis::E, -this->m_parser.config().retraction_length.get_at(m_extruder_id));
|
||||||
|
g10.set(Axis::F, this->m_parser.config().retraction_speed.get_at(m_extruder_id) * 60);
|
||||||
|
process_G1(g10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GCodeProcessor::process_G11(const GCodeReader::GCodeLine& line)
|
void GCodeProcessor::process_G11(const GCodeReader::GCodeLine& line)
|
||||||
{
|
{
|
||||||
// stores unretract move
|
GCodeReader::GCodeLine g11;
|
||||||
store_move_vertex(EMoveType::Unretract);
|
g11.set(Axis::E, this->m_parser.config().retraction_length.get_at(m_extruder_id) + this->m_parser.config().retract_restart_extra.get_at(m_extruder_id));
|
||||||
|
g11.set(Axis::F, this->m_parser.config().deretraction_speed.get_at(m_extruder_id) * 60);
|
||||||
|
process_G1(g11);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GCodeProcessor::process_G20(const GCodeReader::GCodeLine& line)
|
void GCodeProcessor::process_G20(const GCodeReader::GCodeLine& line)
|
||||||
|
|
|
@ -294,6 +294,7 @@ class Print;
|
||||||
During_Print_Exhaust_Fan,
|
During_Print_Exhaust_Fan,
|
||||||
Wipe_Tower_Start,
|
Wipe_Tower_Start,
|
||||||
Wipe_Tower_End,
|
Wipe_Tower_End,
|
||||||
|
PA_Change,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const std::string& reserved_tag(ETags tag) { return s_IsBBLPrinter ? Reserved_Tags[static_cast<unsigned char>(tag)] : Reserved_Tags_compatible[static_cast<unsigned char>(tag)]; }
|
static const std::string& reserved_tag(ETags tag) { return s_IsBBLPrinter ? Reserved_Tags[static_cast<unsigned char>(tag)] : Reserved_Tags_compatible[static_cast<unsigned char>(tag)]; }
|
||||||
|
|
100
src/libslic3r/GCode/PchipInterpolatorHelper.cpp
Normal file
100
src/libslic3r/GCode/PchipInterpolatorHelper.cpp
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
// PchipInterpolatorHelper.cpp
|
||||||
|
// OrcaSlicer
|
||||||
|
//
|
||||||
|
// Implementation file for the PchipInterpolatorHelper class
|
||||||
|
|
||||||
|
#include "PchipInterpolatorHelper.hpp"
|
||||||
|
#include <stdexcept>
|
||||||
|
#include <cmath>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Constructs the PCHIP interpolator with given data points.
|
||||||
|
* @param x The x-coordinates of the data points.
|
||||||
|
* @param y The y-coordinates of the data points.
|
||||||
|
*/
|
||||||
|
PchipInterpolatorHelper::PchipInterpolatorHelper(const std::vector<double>& x, const std::vector<double>& y) {
|
||||||
|
setData(x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the data points for the interpolator.
|
||||||
|
* @param x The x-coordinates of the data points.
|
||||||
|
* @param y The y-coordinates of the data points.
|
||||||
|
* @throw std::invalid_argument if x and y have different sizes or if they contain fewer than two points.
|
||||||
|
*/
|
||||||
|
void PchipInterpolatorHelper::setData(const std::vector<double>& x, const std::vector<double>& y) {
|
||||||
|
if (x.size() != y.size() || x.size() < 2) {
|
||||||
|
throw std::invalid_argument("Input vectors must have the same size and contain at least two points.");
|
||||||
|
}
|
||||||
|
x_ = x;
|
||||||
|
y_ = y;
|
||||||
|
sortData();
|
||||||
|
computePCHIP();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sorts the data points by x-coordinate.
|
||||||
|
*/
|
||||||
|
void PchipInterpolatorHelper::sortData() {
|
||||||
|
std::vector<std::pair<double, double>> data;
|
||||||
|
for (size_t i = 0; i < x_.size(); ++i) {
|
||||||
|
data.emplace_back(x_[i], y_[i]);
|
||||||
|
}
|
||||||
|
std::sort(data.begin(), data.end());
|
||||||
|
|
||||||
|
for (size_t i = 0; i < data.size(); ++i) {
|
||||||
|
x_[i] = data[i].first;
|
||||||
|
y_[i] = data[i].second;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Computes the PCHIP coefficients.
|
||||||
|
*/
|
||||||
|
void PchipInterpolatorHelper::computePCHIP() {
|
||||||
|
size_t n = x_.size() - 1;
|
||||||
|
h_.resize(n);
|
||||||
|
delta_.resize(n);
|
||||||
|
d_.resize(n+1);
|
||||||
|
|
||||||
|
for (size_t i = 0; i < n; ++i) {
|
||||||
|
h_[i] = h(i);
|
||||||
|
delta_[i] = delta(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
d_[0] = delta_[0];
|
||||||
|
d_[n] = delta_[n-1];
|
||||||
|
for (size_t i = 1; i < n; ++i) {
|
||||||
|
if (delta_[i-1] * delta_[i] > 0) {
|
||||||
|
double w1 = 2 * h_[i] + h_[i-1];
|
||||||
|
double w2 = h_[i] + 2 * h_[i-1];
|
||||||
|
d_[i] = (w1 + w2) / (w1 / delta_[i-1] + w2 / delta_[i]);
|
||||||
|
} else {
|
||||||
|
d_[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Interpolates the value at a given point.
|
||||||
|
*/
|
||||||
|
double PchipInterpolatorHelper::interpolate(double xi) const {
|
||||||
|
if (xi <= x_.front()) return y_.front();
|
||||||
|
if (xi >= x_.back()) return y_.back();
|
||||||
|
|
||||||
|
auto it = std::lower_bound(x_.begin(), x_.end(), xi);
|
||||||
|
size_t i = std::distance(x_.begin(), it) - 1;
|
||||||
|
|
||||||
|
double h_i = h_[i];
|
||||||
|
double t = (xi - x_[i]) / h_i;
|
||||||
|
double t2 = t * t;
|
||||||
|
double t3 = t2 * t;
|
||||||
|
|
||||||
|
double h00 = 2 * t3 - 3 * t2 + 1;
|
||||||
|
double h10 = t3 - 2 * t2 + t;
|
||||||
|
double h01 = -2 * t3 + 3 * t2;
|
||||||
|
double h11 = t3 - t2;
|
||||||
|
|
||||||
|
return h00 * y_[i] + h10 * h_i * d_[i] + h01 * y_[i+1] + h11 * h_i * d_[i+1];
|
||||||
|
}
|
76
src/libslic3r/GCode/PchipInterpolatorHelper.hpp
Normal file
76
src/libslic3r/GCode/PchipInterpolatorHelper.hpp
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
// PchipInterpolatorHelper.hpp
|
||||||
|
// OrcaSlicer
|
||||||
|
//
|
||||||
|
// Header file for the PchipInterpolatorHelper class, responsible for performing Piecewise Cubic Hermite Interpolating Polynomial (PCHIP) interpolation on given data points.
|
||||||
|
|
||||||
|
#ifndef PCHIPINTERPOLATORHELPER_HPP
|
||||||
|
#define PCHIPINTERPOLATORHELPER_HPP
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class PchipInterpolatorHelper
|
||||||
|
* @brief A helper class to perform Piecewise Cubic Hermite Interpolating Polynomial (PCHIP) interpolation.
|
||||||
|
*/
|
||||||
|
class PchipInterpolatorHelper {
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* @brief Default constructor.
|
||||||
|
*/
|
||||||
|
PchipInterpolatorHelper() = default;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Constructs the PCHIP interpolator with given data points.
|
||||||
|
* @param x The x-coordinates of the data points.
|
||||||
|
* @param y The y-coordinates of the data points.
|
||||||
|
*/
|
||||||
|
PchipInterpolatorHelper(const std::vector<double>& x, const std::vector<double>& y);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the data points for the interpolator.
|
||||||
|
* @param x The x-coordinates of the data points.
|
||||||
|
* @param y The y-coordinates of the data points.
|
||||||
|
* @throw std::invalid_argument if x and y have different sizes or if they contain fewer than two points.
|
||||||
|
*/
|
||||||
|
void setData(const std::vector<double>& x, const std::vector<double>& y);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Interpolates the value at a given point.
|
||||||
|
* @param xi The x-coordinate at which to interpolate.
|
||||||
|
* @return The interpolated y-coordinate.
|
||||||
|
*/
|
||||||
|
double interpolate(double xi) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::vector<double> x_; ///< The x-coordinates of the data points.
|
||||||
|
std::vector<double> y_; ///< The y-coordinates of the data points.
|
||||||
|
std::vector<double> h_; ///< The differences between successive x-coordinates.
|
||||||
|
std::vector<double> delta_; ///< The slopes of the segments between successive data points.
|
||||||
|
std::vector<double> d_; ///< The derivatives at the data points.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Computes the PCHIP coefficients.
|
||||||
|
*/
|
||||||
|
void computePCHIP();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sorts the data points by x-coordinate.
|
||||||
|
*/
|
||||||
|
void sortData();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Computes the difference between successive x-coordinates.
|
||||||
|
* @param i The index of the x-coordinate.
|
||||||
|
* @return The difference between x_[i+1] and x_[i].
|
||||||
|
*/
|
||||||
|
double h(int i) const { return x_[i+1] - x_[i]; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Computes the slope of the segment between successive data points.
|
||||||
|
* @param i The index of the segment.
|
||||||
|
* @return The slope of the segment between y_[i] and y_[i+1].
|
||||||
|
*/
|
||||||
|
double delta(int i) const { return (y_[i+1] - y_[i]) / h(i); }
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // PCHIPINTERPOLATORHELPER_HPP
|
|
@ -1,6 +1,4 @@
|
||||||
#include "../ClipperUtils.hpp"
|
|
||||||
#include "../Layer.hpp"
|
#include "../Layer.hpp"
|
||||||
#include "../Polyline.hpp"
|
|
||||||
|
|
||||||
#include "RetractWhenCrossingPerimeters.hpp"
|
#include "RetractWhenCrossingPerimeters.hpp"
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,14 @@
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
// Currently on Linux/macOS, this class spits out large amounts of subobject linkage
|
||||||
|
// warnings because of the flowModel field. tk::spline is in an anonymous namespace which
|
||||||
|
// causes this issue. Until the issue can be solved, this is a temporary solution.
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
|
||||||
|
#endif
|
||||||
|
|
||||||
class SmallAreaInfillFlowCompensator
|
class SmallAreaInfillFlowCompensator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -31,6 +39,10 @@ private:
|
||||||
double max_modified_length() { return eLengths.back(); }
|
double max_modified_length() { return eLengths.back(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace Slic3r
|
} // namespace Slic3r
|
||||||
|
|
||||||
#endif /* slic3r_GCode_SmallAreaInfillFlowCompensator_hpp_ */
|
#endif /* slic3r_GCode_SmallAreaInfillFlowCompensator_hpp_ */
|
||||||
|
|
|
@ -131,7 +131,7 @@ std::string SpiralVase::process_layer(const std::string &gcode, bool last_layer)
|
||||||
if (line.has_z() && !line.retracting(reader)) {
|
if (line.has_z() && !line.retracting(reader)) {
|
||||||
// If this is the initial Z move of the layer, replace it with a
|
// If this is the initial Z move of the layer, replace it with a
|
||||||
// (redundant) move to the last Z of previous layer.
|
// (redundant) move to the last Z of previous layer.
|
||||||
line.set(reader, Z, z);
|
line.set(Z, z);
|
||||||
new_gcode += line.raw() + '\n';
|
new_gcode += line.raw() + '\n';
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
@ -142,17 +142,17 @@ std::string SpiralVase::process_layer(const std::string &gcode, bool last_layer)
|
||||||
float factor = len / total_layer_length;
|
float factor = len / total_layer_length;
|
||||||
if (transition_in)
|
if (transition_in)
|
||||||
// Transition layer, interpolate the amount of extrusion from zero to the final value.
|
// Transition layer, interpolate the amount of extrusion from zero to the final value.
|
||||||
line.set(reader, E, line.e() * factor, 5 /*decimal_digits*/);
|
line.set(E, line.e() * factor, 5 /*decimal_digits*/);
|
||||||
else if (transition_out) {
|
else if (transition_out) {
|
||||||
// We want the last layer to ramp down extrusion, but without changing z height!
|
// We want the last layer to ramp down extrusion, but without changing z height!
|
||||||
// So clone the line before we mess with its Z and duplicate it into a new layer that ramps down E
|
// So clone the line before we mess with its Z and duplicate it into a new layer that ramps down E
|
||||||
// We add this new layer at the very end
|
// We add this new layer at the very end
|
||||||
GCodeReader::GCodeLine transitionLine(line);
|
GCodeReader::GCodeLine transitionLine(line);
|
||||||
transitionLine.set(reader, E, line.e() * (1 - factor), 5 /*decimal_digits*/);
|
transitionLine.set(E, line.e() * (1 - factor), 5 /*decimal_digits*/);
|
||||||
transition_gcode += transitionLine.raw() + '\n';
|
transition_gcode += transitionLine.raw() + '\n';
|
||||||
}
|
}
|
||||||
// This line is the core of Spiral Vase mode, ramp up the Z smoothly
|
// This line is the core of Spiral Vase mode, ramp up the Z smoothly
|
||||||
line.set(reader, Z, z + factor * layer_height);
|
line.set(Z, z + factor * layer_height);
|
||||||
if (smooth_spiral) {
|
if (smooth_spiral) {
|
||||||
// Now we also need to try to interpolate X and Y
|
// Now we also need to try to interpolate X and Y
|
||||||
SpiralVase::SpiralPoint p(line.x(), line.y()); // Get current x/y coordinates
|
SpiralVase::SpiralPoint p(line.x(), line.y()); // Get current x/y coordinates
|
||||||
|
@ -171,10 +171,10 @@ std::string SpiralVase::process_layer(const std::string &gcode, bool last_layer)
|
||||||
if (modified_dist_XY < 0.001)
|
if (modified_dist_XY < 0.001)
|
||||||
line.clear();
|
line.clear();
|
||||||
else {
|
else {
|
||||||
line.set(reader, X, target.x);
|
line.set(X, target.x);
|
||||||
line.set(reader, Y, target.y);
|
line.set(Y, target.y);
|
||||||
// Scale the extrusion amount according to change in length
|
// Scale the extrusion amount according to change in length
|
||||||
line.set(reader, E, line.e() * modified_dist_XY / dist_XY, 5 /*decimal_digits*/);
|
line.set(E, line.e() * modified_dist_XY / dist_XY, 5 /*decimal_digits*/);
|
||||||
last_point = target;
|
last_point = target;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -307,7 +307,6 @@ ToolOrdering::ToolOrdering(const Print &print, unsigned int first_extruder, bool
|
||||||
std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const Print& print)
|
std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const Print& print)
|
||||||
{
|
{
|
||||||
std::vector<unsigned int> tool_order;
|
std::vector<unsigned int> tool_order;
|
||||||
int initial_extruder_id = -1;
|
|
||||||
std::map<int, double> min_areas_per_extruder;
|
std::map<int, double> min_areas_per_extruder;
|
||||||
|
|
||||||
for (auto object : print.objects()) {
|
for (auto object : print.objects()) {
|
||||||
|
@ -336,7 +335,6 @@ std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const Pr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double max_minimal_area = 0.;
|
|
||||||
for (auto ape : min_areas_per_extruder) {
|
for (auto ape : min_areas_per_extruder) {
|
||||||
auto iter = tool_order.begin();
|
auto iter = tool_order.begin();
|
||||||
for (; iter != tool_order.end(); iter++) {
|
for (; iter != tool_order.end(); iter++) {
|
||||||
|
@ -369,7 +367,6 @@ std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const Pr
|
||||||
std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const PrintObject& object)
|
std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const PrintObject& object)
|
||||||
{
|
{
|
||||||
std::vector<unsigned int> tool_order;
|
std::vector<unsigned int> tool_order;
|
||||||
int initial_extruder_id = -1;
|
|
||||||
std::map<int, double> min_areas_per_extruder;
|
std::map<int, double> min_areas_per_extruder;
|
||||||
auto first_layer = object.get_layer(0);
|
auto first_layer = object.get_layer(0);
|
||||||
for (auto layerm : first_layer->regions()) {
|
for (auto layerm : first_layer->regions()) {
|
||||||
|
@ -394,7 +391,6 @@ std::vector<unsigned int> ToolOrdering::generate_first_layer_tool_order(const Pr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double max_minimal_area = 0.;
|
|
||||||
for (auto ape : min_areas_per_extruder) {
|
for (auto ape : min_areas_per_extruder) {
|
||||||
auto iter = tool_order.begin();
|
auto iter = tool_order.begin();
|
||||||
for (; iter != tool_order.end(); iter++) {
|
for (; iter != tool_order.end(); iter++) {
|
||||||
|
|
|
@ -1072,8 +1072,6 @@ void WipeTower::toolchange_Wipe(
|
||||||
const float target_speed = is_first_layer() ? std::min(m_first_layer_speed * 60.f, 4800.f) : 4800.f;
|
const float target_speed = is_first_layer() ? std::min(m_first_layer_speed * 60.f, 4800.f) : 4800.f;
|
||||||
float wipe_speed = 0.33f * target_speed;
|
float wipe_speed = 0.33f * target_speed;
|
||||||
|
|
||||||
float start_y = writer.y();
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// if there is less than 2.5*m_perimeter_width to the edge, advance straightaway (there is likely a blob anyway)
|
// if there is less than 2.5*m_perimeter_width to the edge, advance straightaway (there is likely a blob anyway)
|
||||||
if ((m_left_to_right ? xr-writer.x() : writer.x()-xl) < 2.5f*m_perimeter_width) {
|
if ((m_left_to_right ? xr-writer.x() : writer.x()-xl) < 2.5f*m_perimeter_width) {
|
||||||
|
@ -1132,8 +1130,6 @@ void WipeTower::toolchange_Wipe(
|
||||||
m_left_to_right = !m_left_to_right;
|
m_left_to_right = !m_left_to_right;
|
||||||
}
|
}
|
||||||
|
|
||||||
float end_y = writer.y();
|
|
||||||
|
|
||||||
// We may be going back to the model - wipe the nozzle. If this is followed
|
// We may be going back to the model - wipe the nozzle. If this is followed
|
||||||
// by finish_layer, this wipe path will be overwritten.
|
// by finish_layer, this wipe path will be overwritten.
|
||||||
//writer.add_wipe_point(writer.x(), writer.y())
|
//writer.add_wipe_point(writer.x(), writer.y())
|
||||||
|
@ -1422,7 +1418,6 @@ void WipeTower::plan_tower()
|
||||||
// If wipe tower height is between the current and next member, set the min_depth as linear interpolation between them
|
// If wipe tower height is between the current and next member, set the min_depth as linear interpolation between them
|
||||||
auto next_height_to_depth = *iter;
|
auto next_height_to_depth = *iter;
|
||||||
if (next_height_to_depth.first > m_wipe_tower_height) {
|
if (next_height_to_depth.first > m_wipe_tower_height) {
|
||||||
float height_base = curr_height_to_depth.first;
|
|
||||||
float height_diff = next_height_to_depth.first - curr_height_to_depth.first;
|
float height_diff = next_height_to_depth.first - curr_height_to_depth.first;
|
||||||
float min_depth_base = curr_height_to_depth.second;
|
float min_depth_base = curr_height_to_depth.second;
|
||||||
float depth_diff = next_height_to_depth.second - curr_height_to_depth.second;
|
float depth_diff = next_height_to_depth.second - curr_height_to_depth.second;
|
||||||
|
|
|
@ -275,7 +275,7 @@ bool GCodeReader::GCodeLine::has_value(char axis, float &value) const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GCodeReader::GCodeLine::set(const GCodeReader &reader, const Axis axis, const float new_value, const int decimal_digits)
|
void GCodeReader::GCodeLine::set(const Axis axis, const float new_value, const int decimal_digits)
|
||||||
{
|
{
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
ss << std::fixed << std::setprecision(decimal_digits) << new_value;
|
ss << std::fixed << std::setprecision(decimal_digits) << new_value;
|
||||||
|
|
|
@ -50,7 +50,7 @@ public:
|
||||||
bool extruding(const GCodeReader &reader) const { return (this->cmd_is("G1") || this->cmd_is("G2") || this->cmd_is("G3")) && this->dist_E(reader) > 0; }
|
bool extruding(const GCodeReader &reader) const { return (this->cmd_is("G1") || this->cmd_is("G2") || this->cmd_is("G3")) && this->dist_E(reader) > 0; }
|
||||||
bool retracting(const GCodeReader &reader) const { return (this->cmd_is("G1") || this->cmd_is("G2") || this->cmd_is("G3")) && this->dist_E(reader) < 0; }
|
bool retracting(const GCodeReader &reader) const { return (this->cmd_is("G1") || this->cmd_is("G2") || this->cmd_is("G3")) && this->dist_E(reader) < 0; }
|
||||||
bool travel() const { return (this->cmd_is("G1") || this->cmd_is("G2") || this->cmd_is("G3")) && ! this->has(E); }
|
bool travel() const { return (this->cmd_is("G1") || this->cmd_is("G2") || this->cmd_is("G3")) && ! this->has(E); }
|
||||||
void set(const GCodeReader &reader, const Axis axis, const float new_value, const int decimal_digits = 3);
|
void set(const Axis axis, const float new_value, const int decimal_digits = 3);
|
||||||
|
|
||||||
bool has_x() const { return this->has(X); }
|
bool has_x() const { return this->has(X); }
|
||||||
bool has_y() const { return this->has(Y); }
|
bool has_y() const { return this->has(Y); }
|
||||||
|
@ -103,6 +103,7 @@ public:
|
||||||
void reset() { memset(m_position, 0, sizeof(m_position)); }
|
void reset() { memset(m_position, 0, sizeof(m_position)); }
|
||||||
void apply_config(const GCodeConfig &config);
|
void apply_config(const GCodeConfig &config);
|
||||||
void apply_config(const DynamicPrintConfig &config);
|
void apply_config(const DynamicPrintConfig &config);
|
||||||
|
const GCodeConfig& config() { return m_config; };
|
||||||
|
|
||||||
template<typename Callback>
|
template<typename Callback>
|
||||||
void parse_buffer(const std::string &buffer, Callback callback)
|
void parse_buffer(const std::string &buffer, Callback callback)
|
||||||
|
|
|
@ -4,21 +4,14 @@
|
||||||
#include "ClipperUtils.hpp"
|
#include "ClipperUtils.hpp"
|
||||||
#include "ExPolygon.hpp"
|
#include "ExPolygon.hpp"
|
||||||
#include "Line.hpp"
|
#include "Line.hpp"
|
||||||
#include "clipper.hpp"
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <list>
|
|
||||||
#include <map>
|
|
||||||
#include <numeric>
|
|
||||||
#include <set>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <boost/algorithm/string/classification.hpp>
|
#include <boost/algorithm/string/classification.hpp>
|
||||||
#include <boost/algorithm/string/split.hpp>
|
#include <boost/algorithm/string/split.hpp>
|
||||||
#include <boost/log/trivial.hpp>
|
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(__clang__)
|
#if defined(_MSC_VER) && defined(__clang__)
|
||||||
#define BOOST_NO_CXX17_HDR_STRING_VIEW
|
#define BOOST_NO_CXX17_HDR_STRING_VIEW
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "Circle.hpp"
|
#include "Circle.hpp"
|
||||||
|
|
||||||
#include "../Polygon.hpp"
|
|
||||||
|
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
#include "libslic3r/Arachne/utils/PolygonsSegmentIndex.hpp"
|
#include "libslic3r/Arachne/utils/PolygonsSegmentIndex.hpp"
|
||||||
#include "libslic3r/Geometry/VoronoiUtils.hpp"
|
#include "libslic3r/Geometry/VoronoiUtils.hpp"
|
||||||
#include "libslic3r/Geometry/VoronoiUtilsCgal.hpp"
|
|
||||||
#include "libslic3r/MultiMaterialSegmentation.hpp"
|
#include "libslic3r/MultiMaterialSegmentation.hpp"
|
||||||
|
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#include <boost/next_prior.hpp>
|
|
||||||
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
|
||||||
#include <CGAL/Arr_segment_traits_2.h>
|
#include <CGAL/Arr_segment_traits_2.h>
|
||||||
#include <CGAL/Surface_sweep_2_algorithms.h>
|
#include <CGAL/Surface_sweep_2_algorithms.h>
|
||||||
|
|
|
@ -1,26 +1,18 @@
|
||||||
#include "JumpPointSearch.hpp"
|
#include "JumpPointSearch.hpp"
|
||||||
#include "BoundingBox.hpp"
|
#include "BoundingBox.hpp"
|
||||||
#include "ExPolygon.hpp"
|
|
||||||
#include "Point.hpp"
|
#include "Point.hpp"
|
||||||
#include "libslic3r/AStar.hpp"
|
#include "libslic3r/AStar.hpp"
|
||||||
#include "libslic3r/KDTreeIndirect.hpp"
|
#include "libslic3r/KDTreeIndirect.hpp"
|
||||||
#include "libslic3r/Polygon.hpp"
|
|
||||||
#include "libslic3r/Polyline.hpp"
|
#include "libslic3r/Polyline.hpp"
|
||||||
#include "libslic3r/libslic3r.h"
|
#include "libslic3r/libslic3r.h"
|
||||||
#include <algorithm>
|
|
||||||
#include <cmath>
|
|
||||||
#include <cstddef>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <string>
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <oneapi/tbb/scalable_allocator.h>
|
|
||||||
|
|
||||||
//#define DEBUG_FILES
|
//#define DEBUG_FILES
|
||||||
#ifdef DEBUG_FILES
|
#ifdef DEBUG_FILES
|
||||||
#include "libslic3r/SVG.hpp"
|
#include "libslic3r/SVG.hpp"
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
#include "Geometry.hpp"
|
#include "Geometry.hpp"
|
||||||
#include "Line.hpp"
|
#include "Line.hpp"
|
||||||
#include "Polyline.hpp"
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <sstream>
|
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|
|
@ -330,7 +330,7 @@ void segment(CGALMesh& src, std::vector<CGALMesh>& dst, double smoothing_alpha =
|
||||||
|
|
||||||
// fill holes
|
// fill holes
|
||||||
typedef boost::graph_traits<_EpicMesh>::halfedge_descriptor halfedge_descriptor;
|
typedef boost::graph_traits<_EpicMesh>::halfedge_descriptor halfedge_descriptor;
|
||||||
typedef boost::graph_traits<_EpicMesh>::vertex_descriptor vertex_descriptor;
|
// typedef boost::graph_traits<_EpicMesh>::vertex_descriptor vertex_descriptor;
|
||||||
std::vector<halfedge_descriptor> border_cycles;
|
std::vector<halfedge_descriptor> border_cycles;
|
||||||
CGAL::Polygon_mesh_processing::extract_boundary_cycles(out, std::back_inserter(border_cycles));
|
CGAL::Polygon_mesh_processing::extract_boundary_cycles(out, std::back_inserter(border_cycles));
|
||||||
for (halfedge_descriptor h : border_cycles)
|
for (halfedge_descriptor h : border_cycles)
|
||||||
|
@ -693,7 +693,7 @@ bool do_boolean_single(McutMesh &srcMesh, const McutMesh &cutMesh, const std::st
|
||||||
McutMesh outMesh;
|
McutMesh outMesh;
|
||||||
int N_vertices = 0;
|
int N_vertices = 0;
|
||||||
// traversal of all connected components
|
// traversal of all connected components
|
||||||
for (int n = 0; n < numConnComps; ++n) {
|
for (unsigned int n = 0; n < numConnComps; ++n) {
|
||||||
// query the data of each connected component from MCUT
|
// query the data of each connected component from MCUT
|
||||||
McConnectedComponent connComp = connectedComponents[n];
|
McConnectedComponent connComp = connectedComponents[n];
|
||||||
|
|
||||||
|
|
|
@ -442,7 +442,7 @@ ModelObject* Model::add_object(const ModelObject &other)
|
||||||
this->objects.push_back(new_object);
|
this->objects.push_back(new_object);
|
||||||
// BBS: backup
|
// BBS: backup
|
||||||
if (need_backup) {
|
if (need_backup) {
|
||||||
if (auto model = other.get_model()) {
|
if (other.get_model()) {
|
||||||
auto iter = object_backup_id_map.find(other.id().id);
|
auto iter = object_backup_id_map.find(other.id().id);
|
||||||
if (iter != object_backup_id_map.end()) {
|
if (iter != object_backup_id_map.end()) {
|
||||||
object_backup_id_map.emplace(new_object->id().id, iter->second);
|
object_backup_id_map.emplace(new_object->id().id, iter->second);
|
||||||
|
@ -2615,7 +2615,7 @@ size_t ModelVolume::split(unsigned int max_extruders)
|
||||||
size_t ivolume = std::find(this->object->volumes.begin(), this->object->volumes.end(), this) - this->object->volumes.begin();
|
size_t ivolume = std::find(this->object->volumes.begin(), this->object->volumes.end(), this) - this->object->volumes.begin();
|
||||||
const std::string name = this->name;
|
const std::string name = this->name;
|
||||||
|
|
||||||
unsigned int extruder_counter = 0;
|
// unsigned int extruder_counter = 0;
|
||||||
const Vec3d offset = this->get_offset();
|
const Vec3d offset = this->get_offset();
|
||||||
|
|
||||||
for (TriangleMesh &mesh : meshes) {
|
for (TriangleMesh &mesh : meshes) {
|
||||||
|
@ -2930,9 +2930,6 @@ bool Model::obj_import_vertex_color_deal(const std::vector<unsigned char> &verte
|
||||||
std::cout << "error";
|
std::cout << "error";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
auto calc_tri_area = [](const Vec3f &v0, const Vec3f &v1, const Vec3f &v2) {
|
|
||||||
return std::abs((v0 - v1).cross(v0 - v2).norm()) / 2;
|
|
||||||
};
|
|
||||||
auto volume = obj->volumes[0];
|
auto volume = obj->volumes[0];
|
||||||
volume->config.set("extruder", first_extruder_id);
|
volume->config.set("extruder", first_extruder_id);
|
||||||
auto face_count = volume->mesh().its.indices.size();
|
auto face_count = volume->mesh().its.indices.size();
|
||||||
|
@ -3032,7 +3029,6 @@ bool Model::obj_import_face_color_deal(const std::vector<unsigned char> &face_fi
|
||||||
volume->mmu_segmentation_facets.reserve(face_count);
|
volume->mmu_segmentation_facets.reserve(face_count);
|
||||||
if (volume->mesh().its.indices.size() != face_filament_ids.size()) { return false; }
|
if (volume->mesh().its.indices.size() != face_filament_ids.size()) { return false; }
|
||||||
for (size_t i = 0; i < volume->mesh().its.indices.size(); i++) {
|
for (size_t i = 0; i < volume->mesh().its.indices.size(); i++) {
|
||||||
auto face = volume->mesh().its.indices[i];
|
|
||||||
auto filament_id = face_filament_ids[i];
|
auto filament_id = face_filament_ids[i];
|
||||||
if (filament_id <= 1) { continue; }
|
if (filament_id <= 1) { continue; }
|
||||||
std::string result;
|
std::string result;
|
||||||
|
|
|
@ -167,7 +167,6 @@ ArrangePolygon get_instance_arrange_poly(ModelInstance* instance, const Slic3r::
|
||||||
auto support_type_ptr = obj->get_config_value<ConfigOptionEnum<SupportType>>(config, "support_type");
|
auto support_type_ptr = obj->get_config_value<ConfigOptionEnum<SupportType>>(config, "support_type");
|
||||||
auto support_type = support_type_ptr->value;
|
auto support_type = support_type_ptr->value;
|
||||||
auto enable_support = supp_type_ptr->getBool();
|
auto enable_support = supp_type_ptr->getBool();
|
||||||
int support_int = support_type_ptr->getInt();
|
|
||||||
|
|
||||||
if (enable_support && (support_type == stNormalAuto || support_type == stNormal))
|
if (enable_support && (support_type == stNormalAuto || support_type == stNormal))
|
||||||
ap.brim_width = 6.0;
|
ap.brim_width = 6.0;
|
||||||
|
|
|
@ -338,7 +338,6 @@ static std::vector<std::vector<const MMU_Graph::Arc *>> get_all_next_arcs(
|
||||||
|
|
||||||
if (arc.type == MMU_Graph::ARC_TYPE::BORDER && arc.color != color) continue;
|
if (arc.type == MMU_Graph::ARC_TYPE::BORDER && arc.color != color) continue;
|
||||||
|
|
||||||
Vec2d arc_line = graph.nodes[arc.to_idx].point - graph.nodes[arc.from_idx].point;
|
|
||||||
next_continue_arc.emplace_back(&arc);
|
next_continue_arc.emplace_back(&arc);
|
||||||
all_next_arcs.emplace_back(next_continue_arc);
|
all_next_arcs.emplace_back(next_continue_arc);
|
||||||
}
|
}
|
||||||
|
@ -1286,7 +1285,6 @@ static void cut_segmented_layers(const std::vector<ExPolygons> &input_exp
|
||||||
const std::function<void()> &throw_on_cancel_callback)
|
const std::function<void()> &throw_on_cancel_callback)
|
||||||
{
|
{
|
||||||
BOOST_LOG_TRIVIAL(debug) << "MM segmentation - cutting segmented layers in parallel - begin";
|
BOOST_LOG_TRIVIAL(debug) << "MM segmentation - cutting segmented layers in parallel - begin";
|
||||||
const float interlocking_cut_width = interlocking_depth > 0.f ? std::max(cut_width - interlocking_depth, 0.f) : 0.f;
|
|
||||||
tbb::parallel_for(tbb::blocked_range<size_t>(0, segmented_regions.size()),
|
tbb::parallel_for(tbb::blocked_range<size_t>(0, segmented_regions.size()),
|
||||||
[&segmented_regions, &input_expolygons, &cut_width, &interlocking_depth, &throw_on_cancel_callback](const tbb::blocked_range<size_t> &range) {
|
[&segmented_regions, &input_expolygons, &cut_width, &interlocking_depth, &throw_on_cancel_callback](const tbb::blocked_range<size_t> &range) {
|
||||||
for (size_t layer_idx = range.begin(); layer_idx < range.end(); ++layer_idx) {
|
for (size_t layer_idx = range.begin(); layer_idx < range.end(); ++layer_idx) {
|
||||||
|
|
|
@ -138,8 +138,6 @@ public:
|
||||||
|
|
||||||
auto cost_items = get_features(orientation, params.min_volume);
|
auto cost_items = get_features(orientation, params.min_volume);
|
||||||
|
|
||||||
float unprintability = target_function(cost_items, params.min_volume);
|
|
||||||
|
|
||||||
results[orientation] = cost_items;
|
results[orientation] = cost_items;
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << std::fixed << std::setprecision(4) << "orientation:" << orientation.transpose() << ", cost:" << std::fixed << std::setprecision(4) << cost_items.field_values();
|
BOOST_LOG_TRIVIAL(info) << std::fixed << std::setprecision(4) << "orientation:" << orientation.transpose() << ", cost:" << std::fixed << std::setprecision(4) << cost_items.field_values();
|
||||||
|
@ -230,10 +228,10 @@ public:
|
||||||
{
|
{
|
||||||
std::unordered_map<stl_normal, float, VecHash> alignments;
|
std::unordered_map<stl_normal, float, VecHash> alignments;
|
||||||
// init to 0
|
// init to 0
|
||||||
for (size_t i = 0; i < areas_.size(); i++)
|
for (Eigen::Index i = 0; i < areas_.size(); i++)
|
||||||
alignments.insert(std::pair(normals_.row(i), 0));
|
alignments.insert(std::pair(normals_.row(i), 0));
|
||||||
// cumulate areas
|
// cumulate areas
|
||||||
for (size_t i = 0; i < areas_.size(); i++)
|
for (Eigen::Index i = 0; i < areas_.size(); i++)
|
||||||
{
|
{
|
||||||
alignments[normals_.row(i)] += areas_(i);
|
alignments[normals_.row(i)] += areas_(i);
|
||||||
}
|
}
|
||||||
|
@ -257,11 +255,11 @@ public:
|
||||||
Vec3f n1 = { 0, 0, 0 };
|
Vec3f n1 = { 0, 0, 0 };
|
||||||
std::vector<float> current_areas = {0, 0};
|
std::vector<float> current_areas = {0, 0};
|
||||||
// init to 0
|
// init to 0
|
||||||
for (size_t i = 0; i < areas_.size(); i++) {
|
for (Eigen::Index i = 0; i < areas_.size(); i++) {
|
||||||
alignments_.insert(std::pair(quantize_normals_.row(i), std::pair(current_areas, n1)));
|
alignments_.insert(std::pair(quantize_normals_.row(i), std::pair(current_areas, n1)));
|
||||||
}
|
}
|
||||||
// cumulate areas
|
// cumulate areas
|
||||||
for (size_t i = 0; i < areas_.size(); i++)
|
for (Eigen::Index i = 0; i < areas_.size(); i++)
|
||||||
{
|
{
|
||||||
alignments_[quantize_normals_.row(i)].first[1] += areas_(i);
|
alignments_[quantize_normals_.row(i)].first[1] += areas_(i);
|
||||||
if (areas_(i) > alignments_[quantize_normals_.row(i)].first[0]){
|
if (areas_(i) > alignments_[quantize_normals_.row(i)].first[0]){
|
||||||
|
@ -339,7 +337,7 @@ public:
|
||||||
|
|
||||||
z_max_hull.resize(mesh_convex_hull.facets_count(), 1);
|
z_max_hull.resize(mesh_convex_hull.facets_count(), 1);
|
||||||
its = mesh_convex_hull.its;
|
its = mesh_convex_hull.its;
|
||||||
for (size_t i = 0; i < z_max_hull.rows(); i++)
|
for (Eigen::Index i = 0; i < z_max_hull.rows(); i++)
|
||||||
{
|
{
|
||||||
float z0 = its.get_vertex(i,0).dot(orientation);
|
float z0 = its.get_vertex(i,0).dot(orientation);
|
||||||
float z1 = its.get_vertex(i,1).dot(orientation);
|
float z1 = its.get_vertex(i,1).dot(orientation);
|
||||||
|
@ -393,7 +391,7 @@ public:
|
||||||
|
|
||||||
// filter overhang
|
// filter overhang
|
||||||
Eigen::VectorXf normal_projection(normals.rows(), 1);// = this->normals.dot(orientation);
|
Eigen::VectorXf normal_projection(normals.rows(), 1);// = this->normals.dot(orientation);
|
||||||
for (size_t i = 0; i < normals.rows(); i++)
|
for (Eigen::Index i = 0; i < normals.rows(); i++)
|
||||||
{
|
{
|
||||||
normal_projection(i) = normals.row(i).dot(orientation);
|
normal_projection(i) = normals.row(i).dot(orientation);
|
||||||
}
|
}
|
||||||
|
@ -459,7 +457,6 @@ public:
|
||||||
cost = params.TAR_A * (overhang + params.TAR_B) + params.RELATIVE_F * (/*costs.volume/100*/overhang*params.TAR_C + params.TAR_D + params.TAR_LAF * costs.area_laf * params.use_low_angle_face) / (params.TAR_D + params.CONTOUR_F * costs.contour + params.BOTTOM_F * bottom + params.BOTTOM_HULL_F * bottom_hull + params.TAR_E * overhang + params.TAR_PROJ_AREA * costs.area_projected);
|
cost = params.TAR_A * (overhang + params.TAR_B) + params.RELATIVE_F * (/*costs.volume/100*/overhang*params.TAR_C + params.TAR_D + params.TAR_LAF * costs.area_laf * params.use_low_angle_face) / (params.TAR_D + params.CONTOUR_F * costs.contour + params.BOTTOM_F * bottom + params.BOTTOM_HULL_F * bottom_hull + params.TAR_E * overhang + params.TAR_PROJ_AREA * costs.area_projected);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
float overhang = costs.overhang;
|
|
||||||
cost = params.RELATIVE_F * (costs.overhang * params.TAR_C + params.TAR_D + params.TAR_LAF * costs.area_laf * params.use_low_angle_face) / (params.TAR_D + params.CONTOUR_F * costs.contour + params.BOTTOM_F * bottom + params.BOTTOM_HULL_F * bottom_hull + params.TAR_PROJ_AREA * costs.area_projected);
|
cost = params.RELATIVE_F * (costs.overhang * params.TAR_C + params.TAR_D + params.TAR_LAF * costs.area_laf * params.use_low_angle_face) / (params.TAR_D + params.CONTOUR_F * costs.contour + params.BOTTOM_F * bottom + params.BOTTOM_HULL_F * bottom_hull + params.TAR_PROJ_AREA * costs.area_projected);
|
||||||
}
|
}
|
||||||
cost += (costs.bottom < params.BOTTOM_MIN) * 100;// +(costs.height_to_bottom_hull_ratio > params.height_to_bottom_hull_ratio_MIN) * 110;
|
cost += (costs.bottom < params.BOTTOM_MIN) * 100;// +(costs.height_to_bottom_hull_ratio > params.height_to_bottom_hull_ratio_MIN) * 110;
|
||||||
|
|
|
@ -242,12 +242,10 @@ static std::deque<PolylineWithDegree> split_polyline_by_degree(const Polyline &p
|
||||||
Polyline right;
|
Polyline right;
|
||||||
Polyline temp_copy = polyline_with_insert_points;
|
Polyline temp_copy = polyline_with_insert_points;
|
||||||
|
|
||||||
size_t poly_size = polyline_with_insert_points.size();
|
|
||||||
// BBS: merge degree in limited range
|
// BBS: merge degree in limited range
|
||||||
//find first degee base
|
//find first degee base
|
||||||
double degree_base = int(points_overhang[points_overhang.size() - 1] / min_degree_gap) * min_degree_gap + min_degree_gap;
|
double degree_base = int(points_overhang[points_overhang.size() - 1] / min_degree_gap) * min_degree_gap + min_degree_gap;
|
||||||
degree_base = degree_base > max_overhang_degree ? max_overhang_degree : degree_base;
|
degree_base = degree_base > max_overhang_degree ? max_overhang_degree : degree_base;
|
||||||
double short_poly_len = 0;
|
|
||||||
for (int point_idx = points_overhang.size() - 2; point_idx > 0; --point_idx) {
|
for (int point_idx = points_overhang.size() - 2; point_idx > 0; --point_idx) {
|
||||||
|
|
||||||
double degree = points_overhang[point_idx];
|
double degree = points_overhang[point_idx];
|
||||||
|
@ -940,7 +938,6 @@ static ExtrusionEntityCollection traverse_extrusions(const PerimeterGenerator& p
|
||||||
|
|
||||||
if (perimeter_generator.config->overhang_speed_classic && perimeter_generator.config->enable_overhang_speed && perimeter_generator.config->fuzzy_skin == FuzzySkinType::None) {
|
if (perimeter_generator.config->overhang_speed_classic && perimeter_generator.config->enable_overhang_speed && perimeter_generator.config->fuzzy_skin == FuzzySkinType::None) {
|
||||||
|
|
||||||
Flow flow = is_external ? perimeter_generator.ext_perimeter_flow : perimeter_generator.perimeter_flow;
|
|
||||||
std::map<double, std::vector<Polygons>> clipper_serise;
|
std::map<double, std::vector<Polygons>> clipper_serise;
|
||||||
|
|
||||||
std::map<double,ExtrusionPaths> recognization_paths;
|
std::map<double,ExtrusionPaths> recognization_paths;
|
||||||
|
@ -2253,7 +2250,6 @@ void PerimeterGenerator::process_no_bridge(Surfaces& all_surfaces, coord_t perim
|
||||||
if (!unsupported.empty()) {
|
if (!unsupported.empty()) {
|
||||||
//only consider the part that can be bridged (really, by the bridge algorithm)
|
//only consider the part that can be bridged (really, by the bridge algorithm)
|
||||||
//first, separate into islands (ie, each ExPlolygon)
|
//first, separate into islands (ie, each ExPlolygon)
|
||||||
int numploy = 0;
|
|
||||||
//only consider the bottom layer that intersect unsupported, to be sure it's only on our island.
|
//only consider the bottom layer that intersect unsupported, to be sure it's only on our island.
|
||||||
ExPolygonCollection lower_island(support);
|
ExPolygonCollection lower_island(support);
|
||||||
//a detector per island
|
//a detector per island
|
||||||
|
@ -2371,7 +2367,6 @@ void PerimeterGenerator::process_no_bridge(Surfaces& all_surfaces, coord_t perim
|
||||||
//ExPolygons no_bridge = diff_ex(offset_ex(unbridgeable, ext_perimeter_width * 3 / 2), last);
|
//ExPolygons no_bridge = diff_ex(offset_ex(unbridgeable, ext_perimeter_width * 3 / 2), last);
|
||||||
//bridges_temp = diff_ex(bridges_temp, no_bridge);
|
//bridges_temp = diff_ex(bridges_temp, no_bridge);
|
||||||
coordf_t offset_to_do = bridged_infill_margin;
|
coordf_t offset_to_do = bridged_infill_margin;
|
||||||
bool first = true;
|
|
||||||
unbridgeable = diff_ex(unbridgeable, offset_ex(bridges_temp, ext_perimeter_width));
|
unbridgeable = diff_ex(unbridgeable, offset_ex(bridges_temp, ext_perimeter_width));
|
||||||
while (offset_to_do > ext_perimeter_width * 1.5) {
|
while (offset_to_do > ext_perimeter_width * 1.5) {
|
||||||
unbridgeable = offset2_ex(unbridgeable, -ext_perimeter_width / 4, ext_perimeter_width * 2.25, ClipperLib::jtSquare);
|
unbridgeable = offset2_ex(unbridgeable, -ext_perimeter_width / 4, ext_perimeter_width * 2.25, ClipperLib::jtSquare);
|
||||||
|
@ -2379,7 +2374,6 @@ void PerimeterGenerator::process_no_bridge(Surfaces& all_surfaces, coord_t perim
|
||||||
bridges_temp = offset_ex(bridges_temp, ext_perimeter_width, ClipperLib::jtMiter, 6.);
|
bridges_temp = offset_ex(bridges_temp, ext_perimeter_width, ClipperLib::jtMiter, 6.);
|
||||||
unbridgeable = diff_ex(unbridgeable, offset_ex(bridges_temp, ext_perimeter_width));
|
unbridgeable = diff_ex(unbridgeable, offset_ex(bridges_temp, ext_perimeter_width));
|
||||||
offset_to_do -= ext_perimeter_width;
|
offset_to_do -= ext_perimeter_width;
|
||||||
first = false;
|
|
||||||
}
|
}
|
||||||
unbridgeable = offset_ex(unbridgeable, ext_perimeter_width + offset_to_do, ClipperLib::jtSquare);
|
unbridgeable = offset_ex(unbridgeable, ext_perimeter_width + offset_to_do, ClipperLib::jtSquare);
|
||||||
bridges_temp = diff_ex(bridges_temp, unbridgeable);
|
bridges_temp = diff_ex(bridges_temp, unbridgeable);
|
||||||
|
|
|
@ -355,8 +355,6 @@ Polygon Polygon::transform(const Transform3d& trafo) const
|
||||||
if (vertices_count == 0)
|
if (vertices_count == 0)
|
||||||
return dstpoly;
|
return dstpoly;
|
||||||
|
|
||||||
unsigned int data_size = 3 * vertices_count * sizeof(float);
|
|
||||||
|
|
||||||
Eigen::MatrixXd src(3, vertices_count);
|
Eigen::MatrixXd src(3, vertices_count);
|
||||||
for (size_t i = 0; i < vertices_count; i++)
|
for (size_t i = 0; i < vertices_count; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -51,7 +51,6 @@ void Polyline::reverse()
|
||||||
// removes the given distance from the end of the polyline
|
// removes the given distance from the end of the polyline
|
||||||
void Polyline::clip_end(double distance)
|
void Polyline::clip_end(double distance)
|
||||||
{
|
{
|
||||||
bool last_point_inserted = false;
|
|
||||||
size_t remove_after_index = MultiPoint::size();
|
size_t remove_after_index = MultiPoint::size();
|
||||||
while (distance > 0) {
|
while (distance > 0) {
|
||||||
Vec2d last_point = this->last_point().cast<double>();
|
Vec2d last_point = this->last_point().cast<double>();
|
||||||
|
@ -65,7 +64,6 @@ void Polyline::clip_end(double distance)
|
||||||
double lsqr = v.squaredNorm();
|
double lsqr = v.squaredNorm();
|
||||||
if (lsqr > distance * distance) {
|
if (lsqr > distance * distance) {
|
||||||
this->points.emplace_back((last_point + v * (distance / sqrt(lsqr))).cast<coord_t>());
|
this->points.emplace_back((last_point + v * (distance / sqrt(lsqr))).cast<coord_t>());
|
||||||
last_point_inserted = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
distance -= sqrt(lsqr);
|
distance -= sqrt(lsqr);
|
||||||
|
|
|
@ -840,7 +840,7 @@ static std::vector<std::string> s_Preset_filament_options {
|
||||||
"filament_wipe_distance", "additional_cooling_fan_speed",
|
"filament_wipe_distance", "additional_cooling_fan_speed",
|
||||||
"nozzle_temperature_range_low", "nozzle_temperature_range_high",
|
"nozzle_temperature_range_low", "nozzle_temperature_range_high",
|
||||||
//SoftFever
|
//SoftFever
|
||||||
"enable_pressure_advance", "pressure_advance","chamber_temperature", "filament_shrink", "support_material_interface_fan_speed", "filament_notes" /*,"filament_seam_gap"*/,
|
"enable_pressure_advance", "pressure_advance","adaptive_pressure_advance","adaptive_pressure_advance_model","adaptive_pressure_advance_overhangs", "adaptive_pressure_advance_bridges","chamber_temperature", "filament_shrink", "support_material_interface_fan_speed", "filament_notes" /*,"filament_seam_gap"*/,
|
||||||
"filament_loading_speed", "filament_loading_speed_start", "filament_load_time",
|
"filament_loading_speed", "filament_loading_speed_start", "filament_load_time",
|
||||||
"filament_unloading_speed", "filament_unloading_speed_start", "filament_unload_time", "filament_toolchange_delay", "filament_cooling_moves", "filament_stamping_loading_speed", "filament_stamping_distance",
|
"filament_unloading_speed", "filament_unloading_speed_start", "filament_unload_time", "filament_toolchange_delay", "filament_cooling_moves", "filament_stamping_loading_speed", "filament_stamping_distance",
|
||||||
"filament_cooling_initial_speed", "filament_cooling_final_speed", "filament_ramming_parameters",
|
"filament_cooling_initial_speed", "filament_cooling_final_speed", "filament_ramming_parameters",
|
||||||
|
@ -1572,7 +1572,6 @@ bool PresetCollection::load_user_preset(std::string name, std::map<std::string,
|
||||||
// Store the loaded presets into a new vector, otherwise the binary search for already existing presets would be broken.
|
// Store the loaded presets into a new vector, otherwise the binary search for already existing presets would be broken.
|
||||||
// (see the "Preset already present, not loading" message).
|
// (see the "Preset already present, not loading" message).
|
||||||
//std::deque<Preset> presets_loaded;
|
//std::deque<Preset> presets_loaded;
|
||||||
int count = 0;
|
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(" enter, name %1% , total value counts %2%")%name %preset_values.size();
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(" enter, name %1% , total value counts %2%")%name %preset_values.size();
|
||||||
|
|
||||||
|
|
|
@ -1853,7 +1853,7 @@ void PresetBundle::export_selections(AppConfig &config)
|
||||||
// BBS
|
// BBS
|
||||||
void PresetBundle::set_num_filaments(unsigned int n, std::string new_color)
|
void PresetBundle::set_num_filaments(unsigned int n, std::string new_color)
|
||||||
{
|
{
|
||||||
int old_filament_count = this->filament_presets.size();
|
size_t old_filament_count = this->filament_presets.size();
|
||||||
if (n > old_filament_count && old_filament_count != 0)
|
if (n > old_filament_count && old_filament_count != 0)
|
||||||
filament_presets.resize(n, filament_presets.back());
|
filament_presets.resize(n, filament_presets.back());
|
||||||
else {
|
else {
|
||||||
|
@ -1867,7 +1867,7 @@ void PresetBundle::set_num_filaments(unsigned int n, std::string new_color)
|
||||||
//BBS set new filament color to new_color
|
//BBS set new filament color to new_color
|
||||||
if (old_filament_count < n) {
|
if (old_filament_count < n) {
|
||||||
if (!new_color.empty()) {
|
if (!new_color.empty()) {
|
||||||
for (int i = old_filament_count; i < n; i++) {
|
for (size_t i = old_filament_count; i < n; i++) {
|
||||||
filament_color->values[i] = new_color;
|
filament_color->values[i] = new_color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2054,7 +2054,7 @@ bool PresetBundle::check_filament_temp_equation_by_printer_type_and_nozzle_for_m
|
||||||
//BBS: check whether this is the only edited filament
|
//BBS: check whether this is the only edited filament
|
||||||
bool PresetBundle::is_the_only_edited_filament(unsigned int filament_index)
|
bool PresetBundle::is_the_only_edited_filament(unsigned int filament_index)
|
||||||
{
|
{
|
||||||
int n = this->filament_presets.size();
|
size_t n = this->filament_presets.size();
|
||||||
if (filament_index >= n)
|
if (filament_index >= n)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -2117,7 +2117,6 @@ DynamicPrintConfig PresetBundle::full_fff_config() const
|
||||||
|
|
||||||
// BBS
|
// BBS
|
||||||
size_t num_filaments = this->filament_presets.size();
|
size_t num_filaments = this->filament_presets.size();
|
||||||
auto* extruder_diameter = dynamic_cast<const ConfigOptionFloats*>(out.option("nozzle_diameter"));
|
|
||||||
// Collect the "compatible_printers_condition" and "inherits" values over all presets (print, filaments, printers) into a single vector.
|
// Collect the "compatible_printers_condition" and "inherits" values over all presets (print, filaments, printers) into a single vector.
|
||||||
std::vector<std::string> compatible_printers_condition;
|
std::vector<std::string> compatible_printers_condition;
|
||||||
std::vector<std::string> compatible_prints_condition;
|
std::vector<std::string> compatible_prints_condition;
|
||||||
|
@ -2472,7 +2471,7 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool
|
||||||
std::vector<std::string> filament_ids = std::move(config.option<ConfigOptionStrings>("filament_ids", true)->values);
|
std::vector<std::string> filament_ids = std::move(config.option<ConfigOptionStrings>("filament_ids", true)->values);
|
||||||
std::vector<std::string> print_compatible_printers = std::move(config.option<ConfigOptionStrings>("print_compatible_printers", true)->values);
|
std::vector<std::string> print_compatible_printers = std::move(config.option<ConfigOptionStrings>("print_compatible_printers", true)->values);
|
||||||
//BBS: add different settings check logic
|
//BBS: add different settings check logic
|
||||||
bool has_different_settings_to_system = config.option("different_settings_to_system")?true:false;
|
// bool has_different_settings_to_system = config.option("different_settings_to_system")?true:false;
|
||||||
std::vector<std::string> different_values = std::move(config.option<ConfigOptionStrings>("different_settings_to_system", true)->values);
|
std::vector<std::string> different_values = std::move(config.option<ConfigOptionStrings>("different_settings_to_system", true)->values);
|
||||||
std::string &compatible_printers_condition = Preset::compatible_printers_condition(config);
|
std::string &compatible_printers_condition = Preset::compatible_printers_condition(config);
|
||||||
std::string &compatible_prints_condition = Preset::compatible_prints_condition(config);
|
std::string &compatible_prints_condition = Preset::compatible_prints_condition(config);
|
||||||
|
|
|
@ -832,7 +832,6 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
||||||
|
|
||||||
for (int i = k+1; i < print_instance_count; i++)
|
for (int i = k+1; i < print_instance_count; i++)
|
||||||
{
|
{
|
||||||
auto& p = print_instance_with_bounding_box[i].print_instance;
|
|
||||||
auto bbox2 = print_instance_with_bounding_box[i].bounding_box;
|
auto bbox2 = print_instance_with_bounding_box[i].bounding_box;
|
||||||
auto py1 = bbox2.min.y();
|
auto py1 = bbox2.min.y();
|
||||||
auto py2 = bbox2.max.y();
|
auto py2 = bbox2.max.y();
|
||||||
|
@ -1405,7 +1404,6 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||||
|
|
||||||
if (is_BBL_printer()) {
|
if (is_BBL_printer()) {
|
||||||
const t_config_enum_values* bed_type_keys_map = bed_type_def->enum_keys_map;
|
const t_config_enum_values* bed_type_keys_map = bed_type_def->enum_keys_map;
|
||||||
for (unsigned int extruder_id : extruders) {
|
|
||||||
const ConfigOptionInts* bed_temp_opt = m_config.option<ConfigOptionInts>(get_bed_temp_key(m_config.curr_bed_type));
|
const ConfigOptionInts* bed_temp_opt = m_config.option<ConfigOptionInts>(get_bed_temp_key(m_config.curr_bed_type));
|
||||||
for (unsigned int extruder_id : extruders) {
|
for (unsigned int extruder_id : extruders) {
|
||||||
int curr_bed_temp = bed_temp_opt->get_at(extruder_id);
|
int curr_bed_temp = bed_temp_opt->get_at(extruder_id);
|
||||||
|
@ -1430,7 +1428,6 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// check if print speed/accel/jerk is higher than the maximum speed of the printer
|
// check if print speed/accel/jerk is higher than the maximum speed of the printer
|
||||||
if (warning) {
|
if (warning) {
|
||||||
|
@ -1445,7 +1442,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||||
}
|
}
|
||||||
return warning_key;
|
return warning_key;
|
||||||
};
|
};
|
||||||
auto check_motion_ability_region_setting = [&](const std::vector<std::string>& keys_to_check, double limit) -> std::string {
|
/* auto check_motion_ability_region_setting = [&](const std::vector<std::string>& keys_to_check, double limit) -> std::string {
|
||||||
std::string warning_key;
|
std::string warning_key;
|
||||||
for (const auto& key : keys_to_check) {
|
for (const auto& key : keys_to_check) {
|
||||||
if (m_default_region_config.get_abs_value(key) > limit) {
|
if (m_default_region_config.get_abs_value(key) > limit) {
|
||||||
|
@ -1454,7 +1451,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return warning_key;
|
return warning_key;
|
||||||
};
|
}; */
|
||||||
std::string warning_key;
|
std::string warning_key;
|
||||||
|
|
||||||
// check jerk
|
// check jerk
|
||||||
|
@ -2661,7 +2658,7 @@ void Print::_make_wipe_tower()
|
||||||
for (auto &layer_tools : m_wipe_tower_data.tool_ordering.layer_tools()) { // for all layers
|
for (auto &layer_tools : m_wipe_tower_data.tool_ordering.layer_tools()) { // for all layers
|
||||||
if (!layer_tools.has_wipe_tower)
|
if (!layer_tools.has_wipe_tower)
|
||||||
continue;
|
continue;
|
||||||
bool first_layer = &layer_tools == &m_wipe_tower_data.tool_ordering.front();
|
// bool first_layer = &layer_tools == &m_wipe_tower_data.tool_ordering.front();
|
||||||
wipe_tower.plan_toolchange((float) layer_tools.print_z, (float) layer_tools.wipe_tower_layer_height, current_extruder_id,
|
wipe_tower.plan_toolchange((float) layer_tools.print_z, (float) layer_tools.wipe_tower_layer_height, current_extruder_id,
|
||||||
current_extruder_id);
|
current_extruder_id);
|
||||||
|
|
||||||
|
@ -2755,7 +2752,7 @@ void Print::_make_wipe_tower()
|
||||||
for (auto &layer_tools : m_wipe_tower_data.tool_ordering.layer_tools()) { // for all layers
|
for (auto &layer_tools : m_wipe_tower_data.tool_ordering.layer_tools()) { // for all layers
|
||||||
if (!layer_tools.has_wipe_tower)
|
if (!layer_tools.has_wipe_tower)
|
||||||
continue;
|
continue;
|
||||||
bool first_layer = &layer_tools == &m_wipe_tower_data.tool_ordering.front();
|
// bool first_layer = &layer_tools == &m_wipe_tower_data.tool_ordering.front();
|
||||||
wipe_tower.plan_toolchange((float) layer_tools.print_z, (float) layer_tools.wipe_tower_layer_height, current_extruder_id,
|
wipe_tower.plan_toolchange((float) layer_tools.print_z, (float) layer_tools.wipe_tower_layer_height, current_extruder_id,
|
||||||
current_extruder_id, false);
|
current_extruder_id, false);
|
||||||
for (const auto extruder_id : layer_tools.extruders) {
|
for (const auto extruder_id : layer_tools.extruders) {
|
||||||
|
|
|
@ -1682,6 +1682,60 @@ void PrintConfigDef::init_fff_params()
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionFloats { 0.02 });
|
def->set_default_value(new ConfigOptionFloats { 0.02 });
|
||||||
|
|
||||||
|
// Orca: Adaptive pressure advance option and calibration values
|
||||||
|
def = this->add("adaptive_pressure_advance", coBools);
|
||||||
|
def->label = L("Enable adaptive pressure advance (beta)");
|
||||||
|
def->tooltip = L("With increasing print speeds (and hence increasing volumetric flow through the nozzle) and increasing accelerations, "
|
||||||
|
"it has been observed that the effective PA value typically decreases. "
|
||||||
|
"This means that a single PA value is not always 100% optimal for all features and a compromise value is usually used "
|
||||||
|
"that does not cause too much bulging on features with lower flow speed and accelerations while also not causing gaps on faster features.\n\n"
|
||||||
|
"This feature aims to address this limitation by modeling the response of your printer's extrusion system depending "
|
||||||
|
"on the volumetric flow speed and acceleration it is printing at. Internally, it generates a fitted model that can extrapolate the needed pressure "
|
||||||
|
"advance for any given volumetric flow speed and acceleration, which is then emmited to the printer depending on the current print conditions.\n\n"
|
||||||
|
"When enabled, the pressure advance value above is overriden. However, a reasonable default value above is "
|
||||||
|
"strongly recomended to act as a fallback and for when tool changing.\n\n");
|
||||||
|
def->mode = comAdvanced;
|
||||||
|
def->set_default_value(new ConfigOptionBools{ false });
|
||||||
|
|
||||||
|
// Orca: Adaptive pressure advance option and calibration values
|
||||||
|
def = this->add("adaptive_pressure_advance_model", coStrings);
|
||||||
|
def->label = L("Adaptive pressure advance measurements (beta)");
|
||||||
|
def->tooltip = L("Add sets of pressure advance (PA) values, the volumetric flow speeds and accelerations they were measured at, separated by a comma. "
|
||||||
|
"One set of values per line. For example\n"
|
||||||
|
"0.04,3.96,3000\n0.033,3.96,10000\n0.029,7.91,3000\n0.026,7.91,10000\n\n"
|
||||||
|
"How to calibrate:\n"
|
||||||
|
"1. Run the pressure advance test for at least 3 speeds per acceleration value. It is recommended that the test is run "
|
||||||
|
"for at least the speed of the external perimeters, the speed of the internal perimeters and the fastest feature "
|
||||||
|
"print speed in your profile (usually its the sparse or solid infill). Then run them for the same speeds for the slowest and fastest print accelerations,"
|
||||||
|
"and no faster than the recommended maximum acceleration as given by the klipper input shaper.\n"
|
||||||
|
"2. Take note of the optimal PA value for each volumetric flow speed and acceleration. You can find the flow number by selecting "
|
||||||
|
"flow from the color scheme drop down and move the horizontal slider over the PA pattern lines. The number should be visible "
|
||||||
|
"at the bottom of the page. The ideal PA value should be decreasing the higher the volumetric flow is. If it is not, confirm that your extruder is functioning correctly."
|
||||||
|
"The slower and with less acceleration you print, the larger the range of acceptable PA values. If no difference is visible, use the PA value from the faster test."
|
||||||
|
"3. Enter the triplets of PA values, Flow and Accelerations in the text box here and save your filament profile\n\n"
|
||||||
|
"");
|
||||||
|
def->mode = comAdvanced;
|
||||||
|
//def->gui_flags = "serialized";
|
||||||
|
def->multiline = true;
|
||||||
|
def->full_width = true;
|
||||||
|
def->height = 15;
|
||||||
|
def->set_default_value(new ConfigOptionStrings{"0,0,0\n0,0,0"});
|
||||||
|
|
||||||
|
def = this->add("adaptive_pressure_advance_overhangs", coBools);
|
||||||
|
def->label = L("Enable adaptive pressure advance for overhangs (beta)");
|
||||||
|
def->tooltip = L("Enable adaptive PA for overhangs as well as when flow changes within the same feature. This is an experimental option, "
|
||||||
|
"as if the PA profile is not set accurately, it will cause uniformity issues on the external surfaces before and after overhangs.\n");
|
||||||
|
def->mode = comAdvanced;
|
||||||
|
def->set_default_value(new ConfigOptionBools{ false });
|
||||||
|
|
||||||
|
def = this->add("adaptive_pressure_advance_bridges", coFloats);
|
||||||
|
def->label = L("Pressure advance for bridges");
|
||||||
|
def->tooltip = L("Pressure advance value for bridges. Set to 0 to disable. \n\n A lower PA value when printing bridges helps reduce the appearance of slight under extrusion "
|
||||||
|
"immediately after bridges. This is caused by the pressure drop in the nozzle when printing in the air and a lower PA helps counteract this.");
|
||||||
|
def->max = 2;
|
||||||
|
def->mode = comAdvanced;
|
||||||
|
def->set_default_value(new ConfigOptionFloats { 0.0 });
|
||||||
|
|
||||||
def = this->add("line_width", coFloatOrPercent);
|
def = this->add("line_width", coFloatOrPercent);
|
||||||
def->label = L("Default");
|
def->label = L("Default");
|
||||||
def->category = L("Quality");
|
def->category = L("Quality");
|
||||||
|
|
|
@ -1031,6 +1031,12 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||||
((ConfigOptionFloats, filament_flow_ratio))
|
((ConfigOptionFloats, filament_flow_ratio))
|
||||||
((ConfigOptionBools, enable_pressure_advance))
|
((ConfigOptionBools, enable_pressure_advance))
|
||||||
((ConfigOptionFloats, pressure_advance))
|
((ConfigOptionFloats, pressure_advance))
|
||||||
|
// Orca: adaptive pressure advance and calibration model
|
||||||
|
((ConfigOptionBools, adaptive_pressure_advance))
|
||||||
|
((ConfigOptionBools, adaptive_pressure_advance_overhangs))
|
||||||
|
((ConfigOptionStrings, adaptive_pressure_advance_model))
|
||||||
|
((ConfigOptionFloats, adaptive_pressure_advance_bridges))
|
||||||
|
//
|
||||||
((ConfigOptionFloat, fan_kickstart))
|
((ConfigOptionFloat, fan_kickstart))
|
||||||
((ConfigOptionBool, fan_speedup_overhangs))
|
((ConfigOptionBool, fan_speedup_overhangs))
|
||||||
((ConfigOptionFloat, fan_speedup_time))
|
((ConfigOptionFloat, fan_speedup_time))
|
||||||
|
|
|
@ -677,7 +677,6 @@ void PrintObject::estimate_curled_extrusions()
|
||||||
[](const PrintRegion *region) { return region->config().enable_overhang_speed.getBool(); })) {
|
[](const PrintRegion *region) { return region->config().enable_overhang_speed.getBool(); })) {
|
||||||
|
|
||||||
// Estimate curling of support material and add it to the malformaition lines of each layer
|
// Estimate curling of support material and add it to the malformaition lines of each layer
|
||||||
float support_flow_width = support_material_flow(this, this->config().layer_height).width();
|
|
||||||
SupportSpotsGenerator::Params params{this->print()->m_config.filament_type.values,
|
SupportSpotsGenerator::Params params{this->print()->m_config.filament_type.values,
|
||||||
float(this->print()->default_object_config().inner_wall_acceleration.getFloat()),
|
float(this->print()->default_object_config().inner_wall_acceleration.getFloat()),
|
||||||
this->config().raft_layers.getInt(), this->config().brim_type.value,
|
this->config().raft_layers.getInt(), this->config().brim_type.value,
|
||||||
|
@ -2949,16 +2948,16 @@ struct POProfiler
|
||||||
|
|
||||||
void PrintObject::generate_support_preview()
|
void PrintObject::generate_support_preview()
|
||||||
{
|
{
|
||||||
POProfiler profiler;
|
// POProfiler profiler;
|
||||||
|
|
||||||
boost::posix_time::ptime ts1 = boost::posix_time::microsec_clock::local_time();
|
// boost::posix_time::ptime ts1 = boost::posix_time::microsec_clock::local_time();
|
||||||
this->slice();
|
this->slice();
|
||||||
boost::posix_time::ptime ts2 = boost::posix_time::microsec_clock::local_time();
|
// boost::posix_time::ptime ts2 = boost::posix_time::microsec_clock::local_time();
|
||||||
profiler.duration1 = (ts2 - ts1).total_milliseconds();
|
// profiler.duration1 = (ts2 - ts1).total_milliseconds();
|
||||||
|
|
||||||
this->generate_support_material();
|
this->generate_support_material();
|
||||||
boost::posix_time::ptime ts3 = boost::posix_time::microsec_clock::local_time();
|
// boost::posix_time::ptime ts3 = boost::posix_time::microsec_clock::local_time();
|
||||||
profiler.duration2 = (ts3 - ts2).total_milliseconds();
|
// profiler.duration2 = (ts3 - ts2).total_milliseconds();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrintObject::update_slicing_parameters()
|
void PrintObject::update_slicing_parameters()
|
||||||
|
@ -3668,7 +3667,6 @@ template void PrintObject::remove_bridges_from_contacts<Polygons>(
|
||||||
|
|
||||||
SupportNecessaryType PrintObject::is_support_necessary()
|
SupportNecessaryType PrintObject::is_support_necessary()
|
||||||
{
|
{
|
||||||
static const double super_overhang_area_threshold = SQ(scale_(5.0));
|
|
||||||
const double cantilevel_dist_thresh = scale_(6);
|
const double cantilevel_dist_thresh = scale_(6);
|
||||||
#if 0
|
#if 0
|
||||||
double threshold_rad = (m_config.support_threshold_angle.value < EPSILON ? 30 : m_config.support_threshold_angle.value + 1) * M_PI / 180.;
|
double threshold_rad = (m_config.support_threshold_angle.value < EPSILON ? 30 : m_config.support_threshold_angle.value + 1) * M_PI / 180.;
|
||||||
|
|
|
@ -151,8 +151,8 @@ static std::vector<VolumeSlices> slice_volumes_inner(
|
||||||
params_base.mode_below = params_base.mode;
|
params_base.mode_below = params_base.mode;
|
||||||
|
|
||||||
// BBS
|
// BBS
|
||||||
const size_t num_extruders = print_config.filament_diameter.size();
|
// const size_t num_extruders = print_config.filament_diameter.size();
|
||||||
const bool is_mm_painted = num_extruders > 1 && std::any_of(model_volumes.cbegin(), model_volumes.cend(), [](const ModelVolume *mv) { return mv->is_mm_painted(); });
|
// const bool is_mm_painted = num_extruders > 1 && std::any_of(model_volumes.cbegin(), model_volumes.cend(), [](const ModelVolume *mv) { return mv->is_mm_painted(); });
|
||||||
// BBS: don't do size compensation when slice volume.
|
// BBS: don't do size compensation when slice volume.
|
||||||
// Will handle contour and hole size compensation seperately later.
|
// Will handle contour and hole size compensation seperately later.
|
||||||
//const auto extra_offset = is_mm_painted ? 0.f : std::max(0.f, float(print_object_config.xy_contour_compensation.value));
|
//const auto extra_offset = is_mm_painted ? 0.f : std::max(0.f, float(print_object_config.xy_contour_compensation.value));
|
||||||
|
@ -336,7 +336,8 @@ static std::vector<std::vector<ExPolygons>> slices_to_regions(
|
||||||
};
|
};
|
||||||
|
|
||||||
// BBS
|
// BBS
|
||||||
auto trim_overlap = [](ExPolygons& expolys_a, ExPolygons& expolys_b) {
|
// Orca: unused
|
||||||
|
/* auto trim_overlap = [](ExPolygons& expolys_a, ExPolygons& expolys_b) {
|
||||||
ExPolygons trimming_a;
|
ExPolygons trimming_a;
|
||||||
ExPolygons trimming_b;
|
ExPolygons trimming_b;
|
||||||
|
|
||||||
|
@ -361,7 +362,7 @@ static std::vector<std::vector<ExPolygons>> slices_to_regions(
|
||||||
|
|
||||||
expolys_a = diff_ex(expolys_a, trimming_a);
|
expolys_a = diff_ex(expolys_a, trimming_a);
|
||||||
expolys_b = diff_ex(expolys_b, trimming_b);
|
expolys_b = diff_ex(expolys_b, trimming_b);
|
||||||
};
|
}; */
|
||||||
|
|
||||||
std::vector<RegionSlice> temp_slices;
|
std::vector<RegionSlice> temp_slices;
|
||||||
for (size_t zs_complex_idx = range.begin(); zs_complex_idx < range.end(); ++ zs_complex_idx) {
|
for (size_t zs_complex_idx = range.begin(); zs_complex_idx < range.end(); ++ zs_complex_idx) {
|
||||||
|
|
|
@ -99,8 +99,6 @@ std::vector<std::string> init_occt_fonts()
|
||||||
|
|
||||||
static bool TextToBRep(const char* text, const char* font, const float theTextHeight, Font_FontAspect& theFontAspect, TopoDS_Shape& theShape, double& text_width)
|
static bool TextToBRep(const char* text, const char* font, const float theTextHeight, Font_FontAspect& theFontAspect, TopoDS_Shape& theShape, double& text_width)
|
||||||
{
|
{
|
||||||
Standard_Integer anArgIt = 1;
|
|
||||||
Standard_CString aName = "text_shape";
|
|
||||||
Standard_CString aText = text;
|
Standard_CString aText = text;
|
||||||
|
|
||||||
Font_BRepFont aFont;
|
Font_BRepFont aFont;
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
#include "libslic3r/NormalUtils.hpp"
|
#include "libslic3r/NormalUtils.hpp"
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
#include <numeric>
|
|
||||||
|
|
||||||
#include "SlicesToTriangleMesh.hpp"
|
#include "SlicesToTriangleMesh.hpp"
|
||||||
|
|
||||||
//#include "libslic3r/MTUtils.hpp"
|
|
||||||
#include "libslic3r/Execution/ExecutionTBB.hpp"
|
#include "libslic3r/Execution/ExecutionTBB.hpp"
|
||||||
#include "libslic3r/ClipperUtils.hpp"
|
#include "libslic3r/ClipperUtils.hpp"
|
||||||
#include "libslic3r/Tesselate.hpp"
|
#include "libslic3r/Tesselate.hpp"
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
#include "OrganicSupport.hpp"
|
#include "OrganicSupport.hpp"
|
||||||
#include "SupportCommon.hpp"
|
#include "SupportCommon.hpp"
|
||||||
|
|
||||||
#include "../AABBTreeLines.hpp"
|
|
||||||
#include "../ClipperUtils.hpp"
|
|
||||||
#include "../Polygon.hpp"
|
|
||||||
#include "../Polyline.hpp"
|
|
||||||
#include "../MutablePolygon.hpp"
|
#include "../MutablePolygon.hpp"
|
||||||
#include "../TriangleMeshSlicer.hpp"
|
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
#include "../Print.hpp"
|
#include "../Print.hpp"
|
||||||
#include "../PrintConfig.hpp"
|
|
||||||
#include "../Slicing.hpp"
|
|
||||||
#include "SupportParameters.hpp"
|
#include "SupportParameters.hpp"
|
||||||
|
|
||||||
namespace Slic3r::FFFSupport {
|
namespace Slic3r::FFFSupport {
|
||||||
|
|
|
@ -338,7 +338,7 @@ static std::string get_svg_filename(std::string layer_nr_or_z, std::string tag
|
||||||
rand_init = true;
|
rand_init = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int rand_num = rand() % 1000000;
|
// int rand_num = rand() % 1000000;
|
||||||
//makedir("./SVG");
|
//makedir("./SVG");
|
||||||
std::string prefix = "./SVG/";
|
std::string prefix = "./SVG/";
|
||||||
std::string suffix = ".svg";
|
std::string suffix = ".svg";
|
||||||
|
@ -1554,7 +1554,6 @@ static inline ExPolygons detect_overhangs(
|
||||||
double thresh_angle = object_config.support_threshold_angle.value > 0 ? object_config.support_threshold_angle.value + 1 : 0;
|
double thresh_angle = object_config.support_threshold_angle.value > 0 ? object_config.support_threshold_angle.value + 1 : 0;
|
||||||
thresh_angle = std::min(thresh_angle, 89.); // BBS should be smaller than 90
|
thresh_angle = std::min(thresh_angle, 89.); // BBS should be smaller than 90
|
||||||
const double threshold_rad = Geometry::deg2rad(thresh_angle);
|
const double threshold_rad = Geometry::deg2rad(thresh_angle);
|
||||||
const coordf_t max_bridge_length = scale_(object_config.max_bridge_length.value);
|
|
||||||
const bool bridge_no_support = object_config.bridge_no_support.value;
|
const bool bridge_no_support = object_config.bridge_no_support.value;
|
||||||
const coordf_t xy_expansion = scale_(object_config.support_expansion.value);
|
const coordf_t xy_expansion = scale_(object_config.support_expansion.value);
|
||||||
|
|
||||||
|
@ -1577,7 +1576,6 @@ static inline ExPolygons detect_overhangs(
|
||||||
{
|
{
|
||||||
// Generate overhang / contact_polygons for non-raft layers.
|
// Generate overhang / contact_polygons for non-raft layers.
|
||||||
const Layer &lower_layer = *layer.lower_layer;
|
const Layer &lower_layer = *layer.lower_layer;
|
||||||
const bool has_enforcer = !annotations.enforcers_layers.empty() && !annotations.enforcers_layers[layer_id].empty();
|
|
||||||
// Can't directly use lower_layer.lslices, or we'll miss some very sharp tails.
|
// Can't directly use lower_layer.lslices, or we'll miss some very sharp tails.
|
||||||
// Filter out areas whose diameter that is smaller than extrusion_width. Do not use offset2() for this purpose!
|
// Filter out areas whose diameter that is smaller than extrusion_width. Do not use offset2() for this purpose!
|
||||||
// FIXME if there are multiple regions with different extrusion width, the following code may not be right.
|
// FIXME if there are multiple regions with different extrusion width, the following code may not be right.
|
||||||
|
@ -1689,7 +1687,6 @@ static inline ExPolygons detect_overhangs(
|
||||||
// check cantilever
|
// check cantilever
|
||||||
if (layer.lower_layer) {
|
if (layer.lower_layer) {
|
||||||
for (ExPolygon& poly : overhang_areas) {
|
for (ExPolygon& poly : overhang_areas) {
|
||||||
float fw = float(layer.regions().front()->flow(frExternalPerimeter).scaled_width());
|
|
||||||
auto cluster_boundary_ex = intersection_ex(poly, offset_ex(layer.lower_layer->lslices, scale_(0.5)));
|
auto cluster_boundary_ex = intersection_ex(poly, offset_ex(layer.lower_layer->lslices, scale_(0.5)));
|
||||||
Polygons cluster_boundary = to_polygons(cluster_boundary_ex);
|
Polygons cluster_boundary = to_polygons(cluster_boundary_ex);
|
||||||
if (cluster_boundary.empty()) continue;
|
if (cluster_boundary.empty()) continue;
|
||||||
|
@ -1734,7 +1731,6 @@ static inline std::tuple<Polygons, Polygons, double> detect_contacts(
|
||||||
Polygons enforcer_polygons;
|
Polygons enforcer_polygons;
|
||||||
|
|
||||||
// BBS.
|
// BBS.
|
||||||
const bool auto_normal_support = object_config.support_type.value == stNormalAuto;
|
|
||||||
const bool buildplate_only = !annotations.buildplate_covered.empty();
|
const bool buildplate_only = !annotations.buildplate_covered.empty();
|
||||||
float no_interface_offset = 0.f;
|
float no_interface_offset = 0.f;
|
||||||
|
|
||||||
|
@ -1748,8 +1744,6 @@ static inline std::tuple<Polygons, Polygons, double> detect_contacts(
|
||||||
// Generate overhang / contact_polygons for non-raft layers.
|
// Generate overhang / contact_polygons for non-raft layers.
|
||||||
const Layer& lower_layer = *layer.lower_layer;
|
const Layer& lower_layer = *layer.lower_layer;
|
||||||
const bool has_enforcer = !annotations.enforcers_layers.empty() && !annotations.enforcers_layers[layer_id].empty();
|
const bool has_enforcer = !annotations.enforcers_layers.empty() && !annotations.enforcers_layers[layer_id].empty();
|
||||||
const ExPolygons& lower_layer_expolys = lower_layer.lslices;
|
|
||||||
const ExPolygons& lower_layer_sharptails = lower_layer.sharp_tails;
|
|
||||||
|
|
||||||
// Cache support trimming polygons derived from lower layer polygons, possible merged with "on build plate only" trimming polygons.
|
// Cache support trimming polygons derived from lower layer polygons, possible merged with "on build plate only" trimming polygons.
|
||||||
auto slices_margin_update =
|
auto slices_margin_update =
|
||||||
|
@ -2187,7 +2181,6 @@ struct OverhangCluster {
|
||||||
|
|
||||||
static OverhangCluster* add_overhang(std::vector<OverhangCluster>& clusters, ExPolygon* overhang, int layer_nr, coordf_t offset_scaled) {
|
static OverhangCluster* add_overhang(std::vector<OverhangCluster>& clusters, ExPolygon* overhang, int layer_nr, coordf_t offset_scaled) {
|
||||||
OverhangCluster* cluster = nullptr;
|
OverhangCluster* cluster = nullptr;
|
||||||
bool found = false;
|
|
||||||
for (int i = 0; i < clusters.size(); i++) {
|
for (int i = 0; i < clusters.size(); i++) {
|
||||||
auto cluster_i = &clusters[i];
|
auto cluster_i = &clusters[i];
|
||||||
if (cluster_i->intersects(*overhang, layer_nr)) {
|
if (cluster_i->intersects(*overhang, layer_nr)) {
|
||||||
|
@ -3546,13 +3539,13 @@ std::pair<PrintObjectSupportMaterial::MyLayersPtr, PrintObjectSupportMaterial::M
|
||||||
// distinguish between interface and base interface layers
|
// distinguish between interface and base interface layers
|
||||||
// Contact layer is considered an interface layer, therefore run the following block only if support_interface_top_layers > 1.
|
// Contact layer is considered an interface layer, therefore run the following block only if support_interface_top_layers > 1.
|
||||||
// Contact layer needs a base_interface layer, therefore run the following block if support_interface_top_layers > 0, has soluble support and extruders are different.
|
// Contact layer needs a base_interface layer, therefore run the following block if support_interface_top_layers > 0, has soluble support and extruders are different.
|
||||||
bool soluble_interface_non_soluble_base =
|
// bool soluble_interface_non_soluble_base =
|
||||||
// Zero z-gap between the overhangs and the support interface.
|
// // Zero z-gap between the overhangs and the support interface.
|
||||||
m_slicing_params.soluble_interface &&
|
// m_slicing_params.soluble_interface &&
|
||||||
// Interface extruder soluble.
|
// // Interface extruder soluble.
|
||||||
m_object_config->support_interface_filament.value > 0 && m_print_config->filament_soluble.get_at(m_object_config->support_interface_filament.value - 1) &&
|
// m_object_config->support_interface_filament.value > 0 && m_print_config->filament_soluble.get_at(m_object_config->support_interface_filament.value - 1) &&
|
||||||
// Base extruder: Either "print with active extruder" not soluble.
|
// // Base extruder: Either "print with active extruder" not soluble.
|
||||||
(m_object_config->support_filament.value == 0 || ! m_print_config->filament_soluble.get_at(m_object_config->support_filament.value - 1));
|
// (m_object_config->support_filament.value == 0 || ! m_print_config->filament_soluble.get_at(m_object_config->support_filament.value - 1));
|
||||||
bool snug_supports = m_object_config->support_style.value == smsSnug;
|
bool snug_supports = m_object_config->support_style.value == smsSnug;
|
||||||
// BBS: if support interface and support base do not use the same filament, add a base layer to improve their adhesion
|
// BBS: if support interface and support base do not use the same filament, add a base layer to improve their adhesion
|
||||||
bool differnt_support_interface_filament = m_object_config->support_interface_filament.value != m_object_config->support_filament.value;
|
bool differnt_support_interface_filament = m_object_config->support_interface_filament.value != m_object_config->support_filament.value;
|
||||||
|
@ -4628,7 +4621,6 @@ void PrintObjectSupportMaterial::generate_toolpaths(
|
||||||
|
|
||||||
if (object_layer != nullptr) {
|
if (object_layer != nullptr) {
|
||||||
float biggest_bridge_area = 0.f;
|
float biggest_bridge_area = 0.f;
|
||||||
const Polygons& top_contact_polys = top_contact_layer.polygons_to_extrude();
|
|
||||||
for (auto layerm : object_layer->regions()) {
|
for (auto layerm : object_layer->regions()) {
|
||||||
for (auto bridge_surface : layerm->fill_surfaces.filter_by_type(stBottomBridge)) {
|
for (auto bridge_surface : layerm->fill_surfaces.filter_by_type(stBottomBridge)) {
|
||||||
float bs_area = bridge_surface->area();
|
float bs_area = bridge_surface->area();
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#include "Print.hpp"
|
#include "Print.hpp"
|
||||||
#include "Layer.hpp"
|
#include "Layer.hpp"
|
||||||
#include "Fill/FillBase.hpp"
|
#include "Fill/FillBase.hpp"
|
||||||
#include "Fill/FillConcentric.hpp"
|
|
||||||
#include "CurveAnalyzer.hpp"
|
#include "CurveAnalyzer.hpp"
|
||||||
#include "SVG.hpp"
|
#include "SVG.hpp"
|
||||||
#include "ShortestPath.hpp"
|
#include "ShortestPath.hpp"
|
||||||
|
@ -13,7 +12,6 @@
|
||||||
#include <libnest2d/backends/libslic3r/geometries.hpp>
|
#include <libnest2d/backends/libslic3r/geometries.hpp>
|
||||||
|
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
#include <tbb/blocked_range.h>
|
|
||||||
#include <tbb/parallel_for.h>
|
#include <tbb/parallel_for.h>
|
||||||
|
|
||||||
#define _L(s) Slic3r::I18N::translate(s)
|
#define _L(s) Slic3r::I18N::translate(s)
|
||||||
|
@ -469,7 +467,6 @@ static bool move_inside_expolys(const ExPolygons& polygons, Point& from, double
|
||||||
Point ret = from;
|
Point ret = from;
|
||||||
std::vector<Point> valid_pts;
|
std::vector<Point> valid_pts;
|
||||||
double bestDist2 = std::numeric_limits<double>::max();
|
double bestDist2 = std::numeric_limits<double>::max();
|
||||||
unsigned int bestPoly = NO_INDEX;
|
|
||||||
bool is_already_on_correct_side_of_boundary = false; // whether [from] is already on the right side of the boundary
|
bool is_already_on_correct_side_of_boundary = false; // whether [from] is already on the right side of the boundary
|
||||||
Point inward_dir;
|
Point inward_dir;
|
||||||
for (unsigned int poly_idx = 0; poly_idx < polygons.size(); poly_idx++)
|
for (unsigned int poly_idx = 0; poly_idx < polygons.size(); poly_idx++)
|
||||||
|
@ -510,7 +507,6 @@ static bool move_inside_expolys(const ExPolygons& polygons, Point& from, double
|
||||||
if (dist2 < bestDist2)
|
if (dist2 < bestDist2)
|
||||||
{
|
{
|
||||||
bestDist2 = dist2;
|
bestDist2 = dist2;
|
||||||
bestPoly = poly_idx;
|
|
||||||
if (distance == 0) { ret = x; }
|
if (distance == 0) { ret = x; }
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -547,7 +543,6 @@ static bool move_inside_expolys(const ExPolygons& polygons, Point& from, double
|
||||||
if (dist2 < bestDist2)
|
if (dist2 < bestDist2)
|
||||||
{
|
{
|
||||||
bestDist2 = dist2;
|
bestDist2 = dist2;
|
||||||
bestPoly = poly_idx;
|
|
||||||
if (distance == 0) { ret = x; }
|
if (distance == 0) { ret = x; }
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -632,7 +627,6 @@ static bool is_inside_ex(const ExPolygons &polygons, const Point &pt)
|
||||||
|
|
||||||
static bool move_out_expolys(const ExPolygons& polygons, Point& from, double distance, double max_move_distance)
|
static bool move_out_expolys(const ExPolygons& polygons, Point& from, double distance, double max_move_distance)
|
||||||
{
|
{
|
||||||
Point from0 = from;
|
|
||||||
ExPolygons polys_dilated = union_ex(offset_ex(polygons, scale_(distance)));
|
ExPolygons polys_dilated = union_ex(offset_ex(polygons, scale_(distance)));
|
||||||
Point pt = projection_onto(polys_dilated, from);// find_closest_ex(from, polys_dilated);
|
Point pt = projection_onto(polys_dilated, from);// find_closest_ex(from, polys_dilated);
|
||||||
Point outward_dir = pt - from;
|
Point outward_dir = pt - from;
|
||||||
|
@ -734,16 +728,12 @@ void TreeSupport::detect_overhangs(bool detect_first_sharp_tail_only)
|
||||||
const coordf_t extrusion_width = config.get_abs_value("line_width", nozzle_diameter);
|
const coordf_t extrusion_width = config.get_abs_value("line_width", nozzle_diameter);
|
||||||
const coordf_t extrusion_width_scaled = scale_(extrusion_width);
|
const coordf_t extrusion_width_scaled = scale_(extrusion_width);
|
||||||
const coordf_t max_bridge_length = scale_(config.max_bridge_length.value);
|
const coordf_t max_bridge_length = scale_(config.max_bridge_length.value);
|
||||||
const bool bridge_no_support = max_bridge_length > 0;
|
|
||||||
const bool support_critical_regions_only = config.support_critical_regions_only.value;
|
const bool support_critical_regions_only = config.support_critical_regions_only.value;
|
||||||
const bool config_remove_small_overhangs = config.support_remove_small_overhang.value;
|
const bool config_remove_small_overhangs = config.support_remove_small_overhang.value;
|
||||||
const int enforce_support_layers = config.enforce_support_layers.value;
|
const int enforce_support_layers = config.enforce_support_layers.value;
|
||||||
const double area_thresh_well_supported = SQ(scale_(6));
|
const double area_thresh_well_supported = SQ(scale_(6));
|
||||||
const double length_thresh_well_supported = scale_(6);
|
const double length_thresh_well_supported = scale_(6);
|
||||||
static const double sharp_tail_max_support_height = 16.f;
|
static const double sharp_tail_max_support_height = 16.f;
|
||||||
// a region is considered well supported if the number of layers below it exceeds this threshold
|
|
||||||
const int thresh_layers_below = 10 / config.layer_height;
|
|
||||||
double obj_height = m_object->size().z();
|
|
||||||
// +1 makes the threshold inclusive
|
// +1 makes the threshold inclusive
|
||||||
double thresh_angle = config.support_threshold_angle.value > EPSILON ? config.support_threshold_angle.value + 1 : 30;
|
double thresh_angle = config.support_threshold_angle.value > EPSILON ? config.support_threshold_angle.value + 1 : 30;
|
||||||
thresh_angle = std::min(thresh_angle, 89.); // should be smaller than 90
|
thresh_angle = std::min(thresh_angle, 89.); // should be smaller than 90
|
||||||
|
@ -1406,7 +1396,6 @@ void TreeSupport::generate_toolpaths()
|
||||||
const PrintObjectConfig &object_config = m_object->config();
|
const PrintObjectConfig &object_config = m_object->config();
|
||||||
coordf_t support_extrusion_width = m_support_params.support_extrusion_width;
|
coordf_t support_extrusion_width = m_support_params.support_extrusion_width;
|
||||||
coordf_t nozzle_diameter = print_config.nozzle_diameter.get_at(object_config.support_filament - 1);
|
coordf_t nozzle_diameter = print_config.nozzle_diameter.get_at(object_config.support_filament - 1);
|
||||||
coordf_t layer_height = object_config.layer_height.value;
|
|
||||||
const size_t wall_count = object_config.tree_support_wall_count.value;
|
const size_t wall_count = object_config.tree_support_wall_count.value;
|
||||||
|
|
||||||
// Check if set to zero, use default if so.
|
// Check if set to zero, use default if so.
|
||||||
|
@ -1420,8 +1409,6 @@ void TreeSupport::generate_toolpaths()
|
||||||
coordf_t interface_density = std::min(1., m_support_material_interface_flow.spacing() / interface_spacing);
|
coordf_t interface_density = std::min(1., m_support_material_interface_flow.spacing() / interface_spacing);
|
||||||
coordf_t bottom_interface_density = std::min(1., m_support_material_interface_flow.spacing() / bottom_interface_spacing);
|
coordf_t bottom_interface_density = std::min(1., m_support_material_interface_flow.spacing() / bottom_interface_spacing);
|
||||||
|
|
||||||
const coordf_t branch_radius = object_config.tree_support_branch_diameter.value / 2;
|
|
||||||
const coordf_t branch_radius_scaled = scale_(branch_radius);
|
|
||||||
|
|
||||||
if (m_object->support_layers().empty())
|
if (m_object->support_layers().empty())
|
||||||
return;
|
return;
|
||||||
|
@ -2126,7 +2113,6 @@ void TreeSupport::draw_circles(const std::vector<std::vector<Node*>>& contact_no
|
||||||
|
|
||||||
const bool with_lightning_infill = m_support_params.base_fill_pattern == ipLightning;
|
const bool with_lightning_infill = m_support_params.base_fill_pattern == ipLightning;
|
||||||
coordf_t support_extrusion_width = m_support_params.support_extrusion_width;
|
coordf_t support_extrusion_width = m_support_params.support_extrusion_width;
|
||||||
const size_t wall_count = config.tree_support_wall_count.value;
|
|
||||||
|
|
||||||
const PrintObjectConfig& object_config = m_object->config();
|
const PrintObjectConfig& object_config = m_object->config();
|
||||||
BOOST_LOG_TRIVIAL(info) << "draw_circles for object: " << m_object->model_object()->name;
|
BOOST_LOG_TRIVIAL(info) << "draw_circles for object: " << m_object->model_object()->name;
|
||||||
|
@ -2377,7 +2363,7 @@ void TreeSupport::draw_circles(const std::vector<std::vector<Node*>>& contact_no
|
||||||
ExPolygons& base_areas = ts_layer->base_areas;
|
ExPolygons& base_areas = ts_layer->base_areas;
|
||||||
|
|
||||||
int layer_nr_lower = layer_nr - 1;
|
int layer_nr_lower = layer_nr - 1;
|
||||||
for (layer_nr_lower; layer_nr_lower >= 0; layer_nr_lower--) {
|
for (;layer_nr_lower >= 0; layer_nr_lower--) {
|
||||||
if (!m_object->get_support_layer(layer_nr_lower + m_raft_layers)->area_groups.empty()) break;
|
if (!m_object->get_support_layer(layer_nr_lower + m_raft_layers)->area_groups.empty()) break;
|
||||||
}
|
}
|
||||||
if (layer_nr_lower <= 0) continue;
|
if (layer_nr_lower <= 0) continue;
|
||||||
|
@ -2467,7 +2453,7 @@ void TreeSupport::draw_circles(const std::vector<std::vector<Node*>>& contact_no
|
||||||
if (ts_layer->area_groups.empty()) continue;
|
if (ts_layer->area_groups.empty()) continue;
|
||||||
|
|
||||||
int layer_nr_lower = layer_nr - 1;
|
int layer_nr_lower = layer_nr - 1;
|
||||||
for (layer_nr_lower; layer_nr_lower >= 0; layer_nr_lower--) {
|
for (;layer_nr_lower >= 0; layer_nr_lower--) {
|
||||||
if (!m_object->get_support_layer(layer_nr_lower + m_raft_layers)->area_groups.empty()) break;
|
if (!m_object->get_support_layer(layer_nr_lower + m_raft_layers)->area_groups.empty()) break;
|
||||||
}
|
}
|
||||||
if (layer_nr_lower < 0) continue;
|
if (layer_nr_lower < 0) continue;
|
||||||
|
@ -2582,15 +2568,10 @@ void TreeSupport::drop_nodes(std::vector<std::vector<Node*>>& contact_nodes)
|
||||||
const coordf_t radius_sample_resolution = m_ts_data->m_radius_sample_resolution;
|
const coordf_t radius_sample_resolution = m_ts_data->m_radius_sample_resolution;
|
||||||
const bool support_on_buildplate_only = config.support_on_build_plate_only.value;
|
const bool support_on_buildplate_only = config.support_on_build_plate_only.value;
|
||||||
const size_t bottom_interface_layers = config.support_interface_bottom_layers.value;
|
const size_t bottom_interface_layers = config.support_interface_bottom_layers.value;
|
||||||
const size_t top_interface_layers = config.support_interface_top_layers.value;
|
|
||||||
float DO_NOT_MOVER_UNDER_MM = is_slim ? 0 : 5; // do not move contact points under 5mm
|
float DO_NOT_MOVER_UNDER_MM = is_slim ? 0 : 5; // do not move contact points under 5mm
|
||||||
const auto nozzle_diameter = m_object->print()->config().nozzle_diameter.get_at(m_object->config().support_interface_filament-1);
|
const auto nozzle_diameter = m_object->print()->config().nozzle_diameter.get_at(m_object->config().support_interface_filament-1);
|
||||||
const auto support_line_width = config.support_line_width.get_abs_value(nozzle_diameter);
|
const auto support_line_width = config.support_line_width.get_abs_value(nozzle_diameter);
|
||||||
|
|
||||||
auto get_branch_angle = [this,&config](coordf_t radius) {
|
|
||||||
if (config.tree_support_branch_angle.value < 30.0) return config.tree_support_branch_angle.value;
|
|
||||||
return (radius - MIN_BRANCH_RADIUS) / (MAX_BRANCH_RADIUS - MIN_BRANCH_RADIUS) * (config.tree_support_branch_angle.value - 30.0) + 30.0;
|
|
||||||
};
|
|
||||||
auto get_max_move_dist = [this, &config, branch_radius, tip_layers, diameter_angle_scale_factor, wall_count, support_extrusion_width, support_line_width](const Node *node, int power = 1) {
|
auto get_max_move_dist = [this, &config, branch_radius, tip_layers, diameter_angle_scale_factor, wall_count, support_extrusion_width, support_line_width](const Node *node, int power = 1) {
|
||||||
double move_dist = node->max_move_dist;
|
double move_dist = node->max_move_dist;
|
||||||
if (node->max_move_dist == 0) {
|
if (node->max_move_dist == 0) {
|
||||||
|
@ -3202,7 +3183,6 @@ void TreeSupport::adjust_layer_heights(std::vector<std::vector<Node*>>& contact_
|
||||||
const coordf_t layer_height = config.layer_height.value;
|
const coordf_t layer_height = config.layer_height.value;
|
||||||
const coordf_t max_layer_height = m_slicing_params.max_layer_height;
|
const coordf_t max_layer_height = m_slicing_params.max_layer_height;
|
||||||
const size_t bot_intf_layers = config.support_interface_bottom_layers.value;
|
const size_t bot_intf_layers = config.support_interface_bottom_layers.value;
|
||||||
const size_t top_intf_layers = config.support_interface_top_layers.value;
|
|
||||||
|
|
||||||
// if already using max layer height, no need to adjust
|
// if already using max layer height, no need to adjust
|
||||||
if (layer_height == max_layer_height) return;
|
if (layer_height == max_layer_height) return;
|
||||||
|
@ -3324,7 +3304,6 @@ std::vector<LayerHeightData> TreeSupport::plan_layer_heights(std::vector<std::ve
|
||||||
|
|
||||||
// Insert intermediate layers.
|
// Insert intermediate layers.
|
||||||
size_t n_layers_extra = size_t(ceil(dist / (m_slicing_params.max_suport_layer_height + EPSILON)));
|
size_t n_layers_extra = size_t(ceil(dist / (m_slicing_params.max_suport_layer_height + EPSILON)));
|
||||||
int actual_internel_layers = extr2_layer_nr - extr1_layer_nr - 1;
|
|
||||||
int extr_layers_left = extr2_layer_nr - extr1_layer_nr - n_layers_extra - 1;
|
int extr_layers_left = extr2_layer_nr - extr1_layer_nr - n_layers_extra - 1;
|
||||||
if (n_layers_extra < 1)
|
if (n_layers_extra < 1)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -173,7 +173,7 @@ static FacetSliceType slice_facet(
|
||||||
// (external on the right of the line)
|
// (external on the right of the line)
|
||||||
for (int j = 0; j < 3; ++ j) { // loop through facet edges
|
for (int j = 0; j < 3; ++ j) { // loop through facet edges
|
||||||
int edge_id;
|
int edge_id;
|
||||||
const stl_vertex *a, *b, *c;
|
const stl_vertex *a, *b/* , *c */;
|
||||||
int a_id, b_id;
|
int a_id, b_id;
|
||||||
{
|
{
|
||||||
int k = (idx_vertex_lowest + j) % 3;
|
int k = (idx_vertex_lowest + j) % 3;
|
||||||
|
@ -183,7 +183,7 @@ static FacetSliceType slice_facet(
|
||||||
a = vertices + k;
|
a = vertices + k;
|
||||||
b_id = indices[l];
|
b_id = indices[l];
|
||||||
b = vertices + l;
|
b = vertices + l;
|
||||||
c = vertices + (k + 2) % 3;
|
// c = vertices + (k + 2) % 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is edge or face aligned with the cutting plane?
|
// Is edge or face aligned with the cutting plane?
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <tbb/parallel_for.h>
|
#include <tbb/parallel_for.h>
|
||||||
#include <tbb/blocked_range.h>
|
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "TriangulateWall.hpp"
|
//#include "TriangulateWall.hpp"
|
||||||
#include "MTUtils.hpp"
|
//#include "MTUtils.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#include "Triangulation.hpp"
|
#include "Triangulation.hpp"
|
||||||
#include "IntersectionPoints.hpp"
|
#include "IntersectionPoints.hpp"
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
// On linux and macOS, this include is required
|
||||||
#include <boost/next_prior.hpp>
|
#include <boost/next_prior.hpp>
|
||||||
|
#endif // _WIN32
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
|
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
|
||||||
#include <CGAL/Triangulation_vertex_base_with_info_2.h>
|
#include <CGAL/Triangulation_vertex_base_with_info_2.h>
|
||||||
|
|
|
@ -465,8 +465,9 @@ std::string CalibPressureAdvanceLine::print_pa_lines(double start_x, double star
|
||||||
|
|
||||||
const double e_per_mm = CalibPressureAdvance::e_per_mm(m_line_width, m_height_layer, m_nozzle_diameter, filament_diameter,
|
const double e_per_mm = CalibPressureAdvance::e_per_mm(m_line_width, m_height_layer, m_nozzle_diameter, filament_diameter,
|
||||||
print_flow_ratio);
|
print_flow_ratio);
|
||||||
const double thin_e_per_mm = CalibPressureAdvance::e_per_mm(m_thin_line_width, m_height_layer, m_nozzle_diameter, filament_diameter,
|
// Orca: Unused due to skip drawing indicator lines
|
||||||
print_flow_ratio);
|
// const double thin_e_per_mm = CalibPressureAdvance::e_per_mm(m_thin_line_width, m_height_layer, m_nozzle_diameter, filament_diameter,
|
||||||
|
// print_flow_ratio);
|
||||||
const double number_e_per_mm = CalibPressureAdvance::e_per_mm(m_number_line_width, m_height_layer, m_nozzle_diameter, filament_diameter,
|
const double number_e_per_mm = CalibPressureAdvance::e_per_mm(m_number_line_width, m_height_layer, m_nozzle_diameter, filament_diameter,
|
||||||
print_flow_ratio);
|
print_flow_ratio);
|
||||||
|
|
||||||
|
|
|
@ -3,19 +3,12 @@
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <locale>
|
#include <locale>
|
||||||
#include <ctime>
|
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "format.hpp"
|
#include "format.hpp"
|
||||||
#include "Platform.hpp"
|
|
||||||
#include "Time.hpp"
|
|
||||||
#include "libslic3r.h"
|
#include "libslic3r.h"
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
#include "MacUtils.hpp"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <psapi.h>
|
#include <psapi.h>
|
||||||
|
@ -32,6 +25,7 @@
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <mach/mach.h>
|
#include <mach/mach.h>
|
||||||
#include <libproc.h>
|
#include <libproc.h>
|
||||||
|
#include "MacUtils.hpp"
|
||||||
#endif
|
#endif
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -39,6 +33,7 @@
|
||||||
#include <sys/sendfile.h>
|
#include <sys/sendfile.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include "Platform.hpp"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -59,7 +54,6 @@
|
||||||
#include <boost/filesystem/path.hpp>
|
#include <boost/filesystem/path.hpp>
|
||||||
#include <boost/nowide/fstream.hpp>
|
#include <boost/nowide/fstream.hpp>
|
||||||
#include <boost/nowide/convert.hpp>
|
#include <boost/nowide/convert.hpp>
|
||||||
#include <boost/nowide/cstdio.hpp>
|
|
||||||
|
|
||||||
// We are using quite an old TBB 2017 U7, which does not support global control API officially.
|
// We are using quite an old TBB 2017 U7, which does not support global control API officially.
|
||||||
// Before we update our build servers, let's use the old API, which is deprecated in up to date TBB.
|
// Before we update our build servers, let's use the old API, which is deprecated in up to date TBB.
|
||||||
|
@ -1489,8 +1483,6 @@ bool bbl_calc_md5(std::string &filename, std::string &md5_out)
|
||||||
MD5_Init(&ctx);
|
MD5_Init(&ctx);
|
||||||
boost::nowide::ifstream ifs(filename, std::ios::binary);
|
boost::nowide::ifstream ifs(filename, std::ios::binary);
|
||||||
std::string buf(64 * 1024, 0);
|
std::string buf(64 * 1024, 0);
|
||||||
const std::size_t & size = boost::filesystem::file_size(filename);
|
|
||||||
std::size_t left_size = size;
|
|
||||||
while (ifs) {
|
while (ifs) {
|
||||||
ifs.read(buf.data(), buf.size());
|
ifs.read(buf.data(), buf.size());
|
||||||
int read_bytes = ifs.gcount();
|
int read_bytes = ifs.gcount();
|
||||||
|
|
|
@ -241,7 +241,7 @@ float GLVolume::last_explosion_ratio = 1.0;
|
||||||
|
|
||||||
void GLVolume::set_render_color()
|
void GLVolume::set_render_color()
|
||||||
{
|
{
|
||||||
bool outside = is_outside || is_below_printbed();
|
// bool outside = is_outside || is_below_printbed();
|
||||||
|
|
||||||
if (force_native_color || force_neutral_color) {
|
if (force_native_color || force_neutral_color) {
|
||||||
#ifdef ENABBLE_OUTSIDE_COLOR
|
#ifdef ENABBLE_OUTSIDE_COLOR
|
||||||
|
@ -859,7 +859,6 @@ void GLVolumeCollection::render(GLVolumeCollection::ERenderType type, bool disab
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GLShaderProgram* sink_shader = GUI::wxGetApp().get_shader("flat");
|
GLShaderProgram* sink_shader = GUI::wxGetApp().get_shader("flat");
|
||||||
GLShaderProgram* edges_shader = GUI::wxGetApp().get_shader("flat");
|
|
||||||
|
|
||||||
if (type == ERenderType::Transparent) {
|
if (type == ERenderType::Transparent) {
|
||||||
glsafe(::glEnable(GL_BLEND));
|
glsafe(::glEnable(GL_BLEND));
|
||||||
|
@ -1023,7 +1022,6 @@ bool GLVolumeCollection::check_outside_state(const BuildVolume &build_volume, Mo
|
||||||
GUI::PartPlate* curr_plate = GUI::wxGetApp().plater()->get_partplate_list().get_selected_plate();
|
GUI::PartPlate* curr_plate = GUI::wxGetApp().plater()->get_partplate_list().get_selected_plate();
|
||||||
const Pointfs& pp_bed_shape = curr_plate->get_shape();
|
const Pointfs& pp_bed_shape = curr_plate->get_shape();
|
||||||
BuildVolume plate_build_volume(pp_bed_shape, build_volume.printable_height());
|
BuildVolume plate_build_volume(pp_bed_shape, build_volume.printable_height());
|
||||||
const std::vector<BoundingBoxf3>& exclude_areas = curr_plate->get_exclude_areas();
|
|
||||||
|
|
||||||
for (GLVolume* volume : this->volumes)
|
for (GLVolume* volume : this->volumes)
|
||||||
{
|
{
|
||||||
|
|
|
@ -331,7 +331,6 @@ void AMSMaterialsSetting::create_panel_kn(wxWindow* parent)
|
||||||
kn_val_sizer->Add(m_input_k_val, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, FromDIP(0));
|
kn_val_sizer->Add(m_input_k_val, 0, wxALL | wxEXPAND | wxALIGN_CENTER_VERTICAL, FromDIP(0));
|
||||||
|
|
||||||
// n params input
|
// n params input
|
||||||
wxBoxSizer* n_sizer = new wxBoxSizer(wxHORIZONTAL);
|
|
||||||
m_n_param = new wxStaticText(parent, wxID_ANY, _L("Factor N"), wxDefaultPosition, wxDefaultSize, 0);
|
m_n_param = new wxStaticText(parent, wxID_ANY, _L("Factor N"), wxDefaultPosition, wxDefaultSize, 0);
|
||||||
m_n_param->SetFont(::Label::Body_13);
|
m_n_param->SetFont(::Label::Body_13);
|
||||||
m_n_param->SetForegroundColour(wxColour(50, 58, 61));
|
m_n_param->SetForegroundColour(wxColour(50, 58, 61));
|
||||||
|
@ -357,7 +356,7 @@ void AMSMaterialsSetting::paintEvent(wxPaintEvent &evt)
|
||||||
{
|
{
|
||||||
auto size = GetSize();
|
auto size = GetSize();
|
||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
dc.SetPen(wxPen(StateColor::darkModeColorFor(wxColour("#000000")), 1, wxSOLID));
|
dc.SetPen(wxPen(StateColor::darkModeColorFor(wxColour("#000000")), 1, wxPENSTYLE_SOLID));
|
||||||
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
dc.SetBrush(wxBrush(*wxTRANSPARENT_BRUSH));
|
||||||
dc.DrawRectangle(0, 0, size.x, size.y);
|
dc.DrawRectangle(0, 0, size.x, size.y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -366,7 +366,6 @@ void MaterialItem::doRender(wxDC &dc)
|
||||||
|
|
||||||
wxString out_txt = m_msg;
|
wxString out_txt = m_msg;
|
||||||
wxString count_txt = "";
|
wxString count_txt = "";
|
||||||
int new_line_pos = 0;
|
|
||||||
|
|
||||||
for (int i = 0; i < m_msg.length(); i++) {
|
for (int i = 0; i < m_msg.length(); i++) {
|
||||||
auto text_size = m_warning_text->GetTextExtent(count_txt);
|
auto text_size = m_warning_text->GetTextExtent(count_txt);
|
||||||
|
@ -402,7 +401,6 @@ void AmsMapingPopup::on_left_down(wxMouseEvent &evt)
|
||||||
auto pos = ClientToScreen(evt.GetPosition());
|
auto pos = ClientToScreen(evt.GetPosition());
|
||||||
for (MappingItem *item : m_mapping_item_list) {
|
for (MappingItem *item : m_mapping_item_list) {
|
||||||
auto p_rect = item->ClientToScreen(wxPoint(0, 0));
|
auto p_rect = item->ClientToScreen(wxPoint(0, 0));
|
||||||
auto left = item->GetSize();
|
|
||||||
|
|
||||||
if (pos.x > p_rect.x && pos.y > p_rect.y && pos.x < (p_rect.x + item->GetSize().x) && pos.y < (p_rect.y + item->GetSize().y)) {
|
if (pos.x > p_rect.x && pos.y > p_rect.y && pos.x < (p_rect.x + item->GetSize().x) && pos.y < (p_rect.y + item->GetSize().y)) {
|
||||||
if (item->m_tray_data.type == TrayType::NORMAL && !is_match_material(item->m_tray_data.filament_type)) return;
|
if (item->m_tray_data.type == TrayType::NORMAL && !is_match_material(item->m_tray_data.filament_type)) return;
|
||||||
|
@ -1524,9 +1522,6 @@ void AmsRMGroup::on_mouse_move(wxMouseEvent& evt)
|
||||||
std::string tray_name = iter->first;
|
std::string tray_name = iter->first;
|
||||||
wxColour tray_color = iter->second;
|
wxColour tray_color = iter->second;
|
||||||
|
|
||||||
int x = size.x / 2;
|
|
||||||
int y = size.y / 2;
|
|
||||||
int radius = size.x / 2;
|
|
||||||
endAngle += ev_angle;
|
endAngle += ev_angle;
|
||||||
|
|
||||||
if (click_angle >= startAngle && click_angle < endAngle) {
|
if (click_angle >= startAngle && click_angle < endAngle) {
|
||||||
|
|
|
@ -989,7 +989,7 @@ void AuxiliaryPanel::create_folder(wxString name)
|
||||||
fs::path bfs_path((m_root_dir + "/" + folder_name).ToStdWstring());
|
fs::path bfs_path((m_root_dir + "/" + folder_name).ToStdWstring());
|
||||||
if (fs::exists(bfs_path)) {
|
if (fs::exists(bfs_path)) {
|
||||||
try {
|
try {
|
||||||
bool is_done = fs::remove_all(bfs_path);
|
fs::remove_all(bfs_path);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
BOOST_LOG_TRIVIAL(error) << "Failed removing the auxiliary directory " << m_root_dir.c_str();
|
BOOST_LOG_TRIVIAL(error) << "Failed removing the auxiliary directory " << m_root_dir.c_str();
|
||||||
}
|
}
|
||||||
|
|
|
@ -337,7 +337,7 @@ wxDataViewItemArray AuxiliaryModel::ImportFile(AuxiliaryModelNode* sel, wxArrayS
|
||||||
dir_path += "\\" + src_bfs_path.filename().generic_wstring();
|
dir_path += "\\" + src_bfs_path.filename().generic_wstring();
|
||||||
|
|
||||||
boost::system::error_code ec;
|
boost::system::error_code ec;
|
||||||
if (!fs::copy_file(src_bfs_path, fs::path(dir_path.ToStdWstring()), fs::copy_option::overwrite_if_exists, ec))
|
if (!fs::copy_file(src_bfs_path, fs::path(dir_path.ToStdWstring()), fs::copy_options::overwrite_existing, ec))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Update model data
|
// Update model data
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
#include <wx/timer.h>
|
#include <wx/timer.h>
|
||||||
#include <wx/gauge.h>
|
#include <wx/gauge.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include <wx/statusbr.h>
|
|
||||||
#include <wx/frame.h>
|
|
||||||
|
|
||||||
#include "GUI_App.hpp"
|
#include "GUI_App.hpp"
|
||||||
|
|
||||||
|
|
|
@ -230,7 +230,7 @@ void BBLTopbar::Init(wxFrame* parent)
|
||||||
this->AddSpacer(FromDIP(10));
|
this->AddSpacer(FromDIP(10));
|
||||||
|
|
||||||
wxBitmap save_bitmap = create_scaled_bitmap("topbar_save", nullptr, TOPBAR_ICON_SIZE);
|
wxBitmap save_bitmap = create_scaled_bitmap("topbar_save", nullptr, TOPBAR_ICON_SIZE);
|
||||||
wxAuiToolBarItem* save_btn = this->AddTool(wxID_SAVE, "", save_bitmap);
|
this->AddTool(wxID_SAVE, "", save_bitmap);
|
||||||
|
|
||||||
this->AddSpacer(FromDIP(10));
|
this->AddSpacer(FromDIP(10));
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ void BBLTopbar::Init(wxFrame* parent)
|
||||||
this->AddSpacer(FromDIP(4));
|
this->AddSpacer(FromDIP(4));
|
||||||
|
|
||||||
wxBitmap iconize_bitmap = create_scaled_bitmap("topbar_min", nullptr, TOPBAR_ICON_SIZE);
|
wxBitmap iconize_bitmap = create_scaled_bitmap("topbar_min", nullptr, TOPBAR_ICON_SIZE);
|
||||||
wxAuiToolBarItem* iconize_btn = this->AddTool(wxID_ICONIZE_FRAME, "", iconize_bitmap);
|
this->AddTool(wxID_ICONIZE_FRAME, "", iconize_bitmap);
|
||||||
|
|
||||||
this->AddSpacer(FromDIP(4));
|
this->AddSpacer(FromDIP(4));
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ void BBLTopbar::Init(wxFrame* parent)
|
||||||
this->AddSpacer(FromDIP(4));
|
this->AddSpacer(FromDIP(4));
|
||||||
|
|
||||||
wxBitmap close_bitmap = create_scaled_bitmap("topbar_close", nullptr, TOPBAR_ICON_SIZE);
|
wxBitmap close_bitmap = create_scaled_bitmap("topbar_close", nullptr, TOPBAR_ICON_SIZE);
|
||||||
wxAuiToolBarItem* close_btn = this->AddTool(wxID_CLOSE_FRAME, "", close_bitmap);
|
this->AddTool(wxID_CLOSE_FRAME, "", close_bitmap);
|
||||||
|
|
||||||
Realize();
|
Realize();
|
||||||
// m_toolbar_h = this->GetSize().GetHeight();
|
// m_toolbar_h = this->GetSize().GetHeight();
|
||||||
|
@ -466,7 +466,6 @@ void BBLTopbar::UpdateToolbarWidth(int width)
|
||||||
}
|
}
|
||||||
|
|
||||||
void BBLTopbar::Rescale() {
|
void BBLTopbar::Rescale() {
|
||||||
int em = em_unit(this);
|
|
||||||
wxAuiToolBarItem* item;
|
wxAuiToolBarItem* item;
|
||||||
|
|
||||||
/*item = this->FindTool(ID_LOGO);
|
/*item = this->FindTool(ID_LOGO);
|
||||||
|
@ -496,7 +495,7 @@ void BBLTopbar::Rescale() {
|
||||||
item->SetBitmap(create_scaled_bitmap("calib_sf", nullptr, TOPBAR_ICON_SIZE));
|
item->SetBitmap(create_scaled_bitmap("calib_sf", nullptr, TOPBAR_ICON_SIZE));
|
||||||
item->SetDisabledBitmap(create_scaled_bitmap("calib_sf_inactive", nullptr, TOPBAR_ICON_SIZE));
|
item->SetDisabledBitmap(create_scaled_bitmap("calib_sf_inactive", nullptr, TOPBAR_ICON_SIZE));
|
||||||
|
|
||||||
item = this->FindTool(ID_TITLE);
|
// item = this->FindTool(ID_TITLE);
|
||||||
|
|
||||||
/*item = this->FindTool(ID_PUBLISH);
|
/*item = this->FindTool(ID_PUBLISH);
|
||||||
item->SetBitmap(create_scaled_bitmap("topbar_publish", this, TOPBAR_ICON_SIZE));
|
item->SetBitmap(create_scaled_bitmap("topbar_publish", this, TOPBAR_ICON_SIZE));
|
||||||
|
@ -548,14 +547,14 @@ void BBLTopbar::OnCloseFrame(wxAuiToolBarEvent& event)
|
||||||
|
|
||||||
void BBLTopbar::OnMouseLeftDClock(wxMouseEvent& mouse)
|
void BBLTopbar::OnMouseLeftDClock(wxMouseEvent& mouse)
|
||||||
{
|
{
|
||||||
wxPoint mouse_pos = ::wxGetMousePosition();
|
|
||||||
// check whether mouse is not on any tool item
|
// check whether mouse is not on any tool item
|
||||||
if (this->FindToolByCurrentPosition() != NULL &&
|
if (this->FindToolByCurrentPosition() != NULL &&
|
||||||
this->FindToolByCurrentPosition() != m_title_item) {
|
this->FindToolByCurrentPosition() != m_title_item) {
|
||||||
mouse.Skip();
|
mouse.Skip();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef __W1XMSW__
|
#ifdef __WXMSW__
|
||||||
|
wxPoint mouse_pos = ::wxGetMousePosition();
|
||||||
::PostMessage((HWND) m_frame->GetHandle(), WM_NCLBUTTONDBLCLK, HTCAPTION, MAKELPARAM(mouse_pos.x, mouse_pos.y));
|
::PostMessage((HWND) m_frame->GetHandle(), WM_NCLBUTTONDBLCLK, HTCAPTION, MAKELPARAM(mouse_pos.x, mouse_pos.y));
|
||||||
return;
|
return;
|
||||||
#endif // __WXMSW__
|
#endif // __WXMSW__
|
||||||
|
@ -637,7 +636,6 @@ void BBLTopbar::OnMouseLeftDown(wxMouseEvent& event)
|
||||||
|
|
||||||
void BBLTopbar::OnMouseLeftUp(wxMouseEvent& event)
|
void BBLTopbar::OnMouseLeftUp(wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
wxPoint mouse_pos = ::wxGetMousePosition();
|
|
||||||
if (HasCapture())
|
if (HasCapture())
|
||||||
{
|
{
|
||||||
ReleaseMouse();
|
ReleaseMouse();
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue