Compare commits

..

4 Commits

Author SHA1 Message Date
Ian Chua
e9ea8a8eb7 remove diagnostic logging 2026-05-25 10:34:47 +08:00
Ian Chua
8c6f0b4b47 Merge branch 'main' into fix/cli-segfault 2026-05-25 10:15:00 +08:00
Ian Chua
1a2118f696 Merge branch 'main' into fix/cli-segfault 2026-05-21 15:38:33 +08:00
Ian Chua
899bbafc99 fix: cli painted segmentation crash with mismatched filament counts 2026-05-21 15:37:00 +08:00
7 changed files with 378 additions and 908 deletions

View File

@@ -122,7 +122,7 @@ msgid "On highlighted overhangs only"
msgstr "Nur an hervorgehobenen Überhängen" msgstr "Nur an hervorgehobenen Überhängen"
msgid "Erase all" msgid "Erase all"
msgstr "Alles löschen" msgstr ""
msgid "Highlight overhang areas" msgid "Highlight overhang areas"
msgstr "Bereiche mit Überhang hervorheben" msgstr "Bereiche mit Überhang hervorheben"
@@ -350,10 +350,10 @@ msgid "Fixed step drag"
msgstr "Fester Schritt ziehen" msgstr "Fester Schritt ziehen"
msgid "Context Menu" msgid "Context Menu"
msgstr "Kontextmenü" msgstr ""
msgid "Toggle Auto-Drop" msgid "Toggle Auto-Drop"
msgstr "Automatisches Absenken umschalten" msgstr ""
msgid "Single sided scaling" msgid "Single sided scaling"
msgstr "Einseitige Skalierung" msgstr "Einseitige Skalierung"
@@ -509,10 +509,10 @@ msgid "Multiple"
msgstr "Mehrere" msgstr "Mehrere"
msgid "Count" msgid "Count"
msgstr "Anzahl" msgstr ""
msgid "Gap" msgid "Gap"
msgstr "Spalt" msgstr ""
msgid "Spacing" msgid "Spacing"
msgstr "Abstand" msgstr "Abstand"
@@ -883,7 +883,7 @@ msgid "Advanced"
msgstr "Erweiterte Einstellungen" msgstr "Erweiterte Einstellungen"
msgid "Reset all options except the text and operation" msgid "Reset all options except the text and operation"
msgstr "Alle Optionen außer dem Text und der Operation zurücksetzen" msgstr ""
msgid "" msgid ""
"The text cannot be written using the selected font. Please try choosing a " "The text cannot be written using the selected font. Please try choosing a "
@@ -1805,16 +1805,16 @@ msgid "Info"
msgstr "Info" msgstr "Info"
msgid "Loading printer & filament profiles" msgid "Loading printer & filament profiles"
msgstr "Lade Drucker- und Filamentprofile" msgstr ""
msgid "Creating main window" msgid "Creating main window"
msgstr "Erstelle Hauptfenster" msgstr ""
msgid "Loading current preset" msgid "Loading current preset"
msgstr "Lade aktuelles Preset" msgstr ""
msgid "Showing main window" msgid "Showing main window"
msgstr "Zeige Hauptfenster" msgstr ""
msgid "" msgid ""
"The OrcaSlicer configuration file may be corrupted and cannot be parsed.\n" "The OrcaSlicer configuration file may be corrupted and cannot be parsed.\n"
@@ -1897,12 +1897,9 @@ msgid ""
"Please check your network connectivity\n" "Please check your network connectivity\n"
"(HTTP %u)" "(HTTP %u)"
msgstr "" msgstr ""
"Verbindung zu OrcaCloud fehlgeschlagen.\n"
"Bitte überprüfen Sie Ihre Netzwerkverbindung\n"
"(HTTP %u)"
msgid "Cloud Error" msgid "Cloud Error"
msgstr "Cloud-Fehler" msgstr ""
msgid "Retrieving printer information, please try again later." msgid "Retrieving printer information, please try again later."
msgstr "Empfange Druckerinformationen, bitte später erneut versuchen." msgstr "Empfange Druckerinformationen, bitte später erneut versuchen."
@@ -6103,13 +6100,13 @@ msgid "Export"
msgstr "Exportieren" msgstr "Exportieren"
msgid "Sync Presets" msgid "Sync Presets"
msgstr "Presets synchronisieren" msgstr ""
msgid "Pull and apply the latest presets from OrcaCloud" msgid "Pull and apply the latest presets from OrcaCloud"
msgstr "Die neuesten Presets von OrcaCloud abrufen und anwenden" msgstr ""
msgid "You must be logged in to sync presets from cloud." msgid "You must be logged in to sync presets from cloud."
msgstr "Sie müssen angemeldet sein, um Presets aus der Cloud zu synchronisieren." msgstr ""
msgid "Quit" msgid "Quit"
msgstr "Beenden" msgstr "Beenden"
@@ -6239,7 +6236,7 @@ msgid "Preset Bundle"
msgstr "Vorlagen-Bundle" msgstr "Vorlagen-Bundle"
msgid "Syncing presets from cloud…" msgid "Syncing presets from cloud…"
msgstr "Synchronisiere Presets aus der Cloud…" msgstr ""
msgid "Help" msgid "Help"
msgstr "Hilfe" msgstr "Hilfe"
@@ -8944,25 +8941,25 @@ msgid "If enabled, reverses the direction of zoom with mouse wheel."
msgstr "Wenn aktiviert, wird die Richtung des Zooms mit dem Mausrad umgekehrt." msgstr "Wenn aktiviert, wird die Richtung des Zooms mit dem Mausrad umgekehrt."
msgid "Pan" msgid "Pan"
msgstr "Schwenken" msgstr ""
msgid "Left Mouse Drag" msgid "Left Mouse Drag"
msgstr "Linke Maustaste drücken" msgstr ""
msgid "Set the action that dragging the left mouse button should perform." msgid "Set the action that dragging the left mouse button should perform."
msgstr "Legen Sie die Aktion fest, die das Ziehen der linken Maustaste ausführen soll." msgstr ""
msgid "Middle Mouse Drag" msgid "Middle Mouse Drag"
msgstr "Mittlere Maustaste drücken" msgstr ""
msgid "Set the action that dragging the middle mouse button should perform." msgid "Set the action that dragging the middle mouse button should perform."
msgstr "Legen Sie die Aktion fest, die das Ziehen der mittleren Maustaste ausführen soll." msgstr ""
msgid "Right Mouse Drag" msgid "Right Mouse Drag"
msgstr "Rechte Maustaste drücken" msgstr ""
msgid "Set the action that dragging the right mouse button should perform." msgid "Set the action that dragging the right mouse button should perform."
msgstr "Legen Sie die Aktion fest, die das Ziehen der rechten Maustaste ausführen soll." msgstr ""
msgid "Clear my choice on..." msgid "Clear my choice on..."
msgstr "Meine Auswahl löschen bei ..." msgstr "Meine Auswahl löschen bei ..."
@@ -8989,13 +8986,13 @@ msgstr ""
"der Datei." "der Datei."
msgid "Graphics" msgid "Graphics"
msgstr "Grafik" msgstr ""
msgid "Anti-aliasing" msgid "Anti-aliasing"
msgstr "Kantenglättung" msgstr ""
msgid "MSAA Multiplier" msgid "MSAA Multiplier"
msgstr "MSAA-Multiplikator" msgstr ""
msgid "" msgid ""
"Set the Multi-Sample Anti-Aliasing level.\n" "Set the Multi-Sample Anti-Aliasing level.\n"
@@ -9007,19 +9004,12 @@ msgid ""
"\n" "\n"
"Requires application restart." "Requires application restart."
msgstr "" msgstr ""
"Stellen Sie die Stufe der Multi-Sample-Kantenglättung ein.\n"
"Höhere Werte führen zu glatteren Kanten, aber die Auswirkungen auf die "
"Leistung sind exponentiell.\n"
"Niedrigere Werte verbessern die Leistung auf Kosten von gezackten Kanten.\n"
"Wenn deaktiviert, wird empfohlen, FXAA zu aktivieren, um gezackte Kanten mit minimalen Auswirkungen auf die Leistung zu reduzieren.\n"
"\n"
"Erfordert einen Neustart der Anwendung."
msgid "Disabled" msgid "Disabled"
msgstr "Deaktiviert" msgstr "Deaktiviert"
msgid "FXAA post-processing" msgid "FXAA post-processing"
msgstr "FXAA-Nachbearbeitung" msgstr ""
msgid "" msgid ""
"Applies Fast Approximate Anti-Aliasing as a screen-space pass.\n" "Applies Fast Approximate Anti-Aliasing as a screen-space pass.\n"
@@ -9027,34 +9017,26 @@ msgid ""
"\n" "\n"
"Takes effect immediately." "Takes effect immediately."
msgstr "" msgstr ""
"Führt Fast Approximate Anti-Aliasing als Bildschirmraum-Pass aus.\n"
"Nützlich, um die MSAA-Einstellung zu deaktivieren oder zu reduzieren, um die Leistung zu verbessern.\n"
"\n"
"ist sofort wirksam"
msgid "FPS" msgid "FPS"
msgstr "FPS" msgstr ""
msgid "FPS cap" msgid "FPS cap"
msgstr "FPS-Begrenzung" msgstr ""
msgid "(0 = unlimited)" msgid "(0 = unlimited)"
msgstr "(0 = unbegrenzt)" msgstr ""
msgid "" msgid ""
"Limits viewport frame rate to reduce GPU load and power usage.\n" "Limits viewport frame rate to reduce GPU load and power usage.\n"
"Set to 0 for unlimited frame rate." "Set to 0 for unlimited frame rate."
msgstr "" msgstr ""
"Begrenzt die Bildrate des Viewports, um die GPU-Auslastung und den "
"Energieverbrauch zu reduzieren.\n"
"Auf 0 setzen für unbegrenzte Bildrate."
msgid "Show FPS overlay" msgid "Show FPS overlay"
msgstr "FPS-Overlay anzeigen" msgstr ""
msgid "Displays current viewport FPS in the top-right corner." msgid "Displays current viewport FPS in the top-right corner."
msgstr "Zeigt die aktuelle FPS des Viewports in der oberen rechten Ecke an." msgstr ""
msgid "Login region" msgid "Login region"
msgstr "Login region" msgstr "Login region"
@@ -9225,17 +9207,13 @@ msgid "Skip AMS blacklist check"
msgstr "Überspringen der AMS Blacklist-Prüfung" msgstr "Überspringen der AMS Blacklist-Prüfung"
msgid "(Experimental) Keep painted feature after mesh change" msgid "(Experimental) Keep painted feature after mesh change"
msgstr "(Experimentell) Behalte bemalte Funktionen nach Mesh-Änderung bei" msgstr ""
msgid "" msgid ""
"Attempt to keep painted features (color/seam/support/fuzzy etc.) after " "Attempt to keep painted features (color/seam/support/fuzzy etc.) after "
"changing the object mesh (such as cut/reload from disk/simplify/fix etc.)\n" "changing the object mesh (such as cut/reload from disk/simplify/fix etc.)\n"
"Highly experimental! Slow and may create artifact." "Highly experimental! Slow and may create artifact."
msgstr "" msgstr ""
"Versuchen Sie, bemalte Funktionen (Farbe/Naht/Stütze/unscharf usw.) nach "
"Änderung des Objekt-Meshs (z. B. schneiden/neu laden von der Festplatte/vereinfachen/reparieren usw.) beizubehalten\n"
"Sehr experimentell! Langsam und kann Artefakte erzeugen."
msgid "Allow Abnormal Storage" msgid "Allow Abnormal Storage"
msgstr "Fehlerhaften Speicher zulassen" msgstr "Fehlerhaften Speicher zulassen"
@@ -10961,37 +10939,26 @@ msgid ""
" %s first layer %d %s, other layers %d %s\n" " %s first layer %d %s, other layers %d %s\n"
" %s max delta %d %s, current delta %d %s\n" " %s max delta %d %s, current delta %d %s\n"
msgstr "" msgstr ""
" - %s:\n"
" %s erste Schicht %d %s, andere Schichten %d %s\n"
" %s maximale Delta %d %s, aktuelle Delta %d %s\n"
msgid "" msgid ""
"Some first-layer and other-layer temperature pairs exceed safety limits.\n" "Some first-layer and other-layer temperature pairs exceed safety limits.\n"
msgstr "Einige Temperaturpaare für die erste und andere Schicht überschreiten die Sicherheitsgrenzen.\n" msgstr ""
msgid "" msgid ""
"\n" "\n"
"Invalid pairs:\n" "Invalid pairs:\n"
msgstr "" msgstr ""
"\n"
"Ungültige Paare:\n"
msgid "" msgid ""
"\n" "\n"
"You can go back to edit values, or continue if this is intentional." "You can go back to edit values, or continue if this is intentional."
msgstr "" msgstr ""
"\n"
"Sie können zurückgehen, um die Werte zu bearbeiten, oder fortfahren, wenn dies "
"absichtlich ist."
msgid "" msgid ""
"\n" "\n"
"\n" "\n"
"Continue anyway?" "Continue anyway?"
msgstr "" msgstr ""
"\n"
"\n"
"Trotzdem fortfahren?"
msgid "Temperature Safety Check" msgid "Temperature Safety Check"
msgstr "Temperatur-Sicherheitsprüfung" msgstr "Temperatur-Sicherheitsprüfung"
@@ -11075,10 +11042,6 @@ msgid ""
"\"%1%\"\n" "\"%1%\"\n"
"and \"%2%\" will open without any changes." "and \"%2%\" will open without any changes."
msgstr "" msgstr ""
"Alle \"Neuer Wert\" Einstellungen in\n"
"\"%1%\"\n"
"werden gespeichert und \"%2%\" wird ohne Änderungen geöffnet."
msgid "Click the right mouse button to display the full text." msgid "Click the right mouse button to display the full text."
msgstr "" msgstr ""
@@ -11684,7 +11647,7 @@ msgid "Login"
msgstr "Anmelden" msgstr "Anmelden"
msgid "Login failed. Please try again." msgid "Login failed. Please try again."
msgstr "Anmeldung fehlgeschlagen. Bitte versuchen Sie es erneut." msgstr ""
msgid "[Action Required] " msgid "[Action Required] "
msgstr "[Aktion erforderlich] " msgstr "[Aktion erforderlich] "
@@ -11724,16 +11687,16 @@ msgid "Global shortcuts"
msgstr "Globale Tastaturkürzel" msgstr "Globale Tastaturkürzel"
msgid "Pan View" msgid "Pan View"
msgstr "Ansicht verschieben" msgstr ""
msgid "Rotate View" msgid "Rotate View"
msgstr "Ansicht drehen" msgstr ""
msgid "Middle mouse button" msgid "Middle mouse button"
msgstr "Mittlere Maustaste" msgstr ""
msgid "Zoom View" msgid "Zoom View"
msgstr "Ansicht zoomen" msgstr ""
msgid "" msgid ""
"Auto orients selected objects or all objects. If there are selected objects, " "Auto orients selected objects or all objects. If there are selected objects, "
@@ -12636,8 +12599,6 @@ msgid ""
"The Hollow base pattern is not supported by this support type; Rectilinear " "The Hollow base pattern is not supported by this support type; Rectilinear "
"will be used instead." "will be used instead."
msgstr "" msgstr ""
"Das Hohl-Basis-Muster wird von diesem Stütztyp nicht unterstützt; Stattdessen "
"wird das Rechteckmuster verwendet."
msgid "" msgid ""
"Support enforcers are used but support is not enabled. Please enable support." "Support enforcers are used but support is not enabled. Please enable support."
@@ -14885,16 +14846,16 @@ msgid "Auto For Match"
msgstr "Automatisch für Übereinstimmung" msgstr "Automatisch für Übereinstimmung"
msgid "Enable filament dynamic map" msgid "Enable filament dynamic map"
msgstr "Dynamische Filamentzuordnung aktivieren" msgstr ""
msgid "Enable dynamic filament mapping during print." msgid "Enable dynamic filament mapping during print."
msgstr "Dynamische Filamentzuordnung während des Drucks aktivieren." msgstr ""
msgid "Has filament switcher" msgid "Has filament switcher"
msgstr "Hat Filamentwechsler" msgstr ""
msgid "Printer has a filament switcher hardware (e.g., AMS)." msgid "Printer has a filament switcher hardware (e.g., AMS)."
msgstr "Der Drucker verfügt über eine Filamentwechsler-Hardware (z. B. AMS)." msgstr ""
msgid "Flush temperature" msgid "Flush temperature"
msgstr "Spültemperatur" msgstr "Spültemperatur"
@@ -15415,7 +15376,7 @@ msgstr ""
"unterstützt." "unterstützt."
msgid "Z-buckling bias optimization (experimental)" msgid "Z-buckling bias optimization (experimental)"
msgstr "Z-Buckling-Bias-Optimierung (experimentell)" msgstr ""
msgid "" msgid ""
"Tightens the gyroid wave along the Z (vertical) axis at low infill density " "Tightens the gyroid wave along the Z (vertical) axis at low infill density "
@@ -15424,11 +15385,6 @@ msgid ""
"~30% sparse infill density and above. Only applies when Sparse infill " "~30% sparse infill density and above. Only applies when Sparse infill "
"pattern is set to Gyroid." "pattern is set to Gyroid."
msgstr "" msgstr ""
"Strafft die Gyroid-Welle entlang der Z-Achse (vertikal) bei geringer Fülldichte, "
"um die effektive vertikale Säulenlänge zu verkürzen und die Z-Achsen-Kompressions-"
"Knickfestigkeit zu verbessern. Der Filamentverbrauch bleibt erhalten. Keine "
"Auswirkung bei ~30% einfacher Fülldichte und darüber. Gilt nur, wenn das einfache "
"Füllmuster auf Gyroid eingestellt ist."
msgid "Sparse infill pattern" msgid "Sparse infill pattern"
msgstr "Füllmuster" msgstr "Füllmuster"
@@ -16318,7 +16274,7 @@ msgstr ""
"bringen.Setze den Wert auf 0, um diese Funktion zu deaktivieren." "bringen.Setze den Wert auf 0, um diese Funktion zu deaktivieren."
msgid "Minimum non-zero part cooling fan speed" msgid "Minimum non-zero part cooling fan speed"
msgstr "Minimale nicht-null Lüftergeschwindigkeit für die Teilekühlung" msgstr ""
msgid "" msgid ""
"Some part-cooling fans cannot start spinning when commanded below a certain " "Some part-cooling fans cannot start spinning when commanded below a certain "
@@ -16337,11 +16293,6 @@ msgid ""
"below the one you know it can actually spool at.\n" "below the one you know it can actually spool at.\n"
"Set to 0 to deactivate." "Set to 0 to deactivate."
msgstr "" msgstr ""
"Einige Teilekühlventilatoren können nicht zu drehen beginnen, wenn sie unter einem bestimmten PWM-Arbeitszyklus befehligt werden. Wenn dieser Wert über 0 eingestellt ist, wird jeder nicht-null-Teilekühlventilatorbefehl auf mindestens diesen Prozentsatz angehoben, damit der Lüfter zuverlässig startet. Ein Lüfterbefehl von 0 (Lüfter aus) wird immer genau eingehalten. Diese Begrenzung wird nach jeder anderen Lüfterberechnung angewendet (Erstschicht-Ramp-up, Schichtzeit-Interpolation, Überhangs-/Brücken-/Stützstruktur-Schnittstellen-/Glättungsüberschreibungen), sodass die Skalierung weiterhin im Bereich [dieser Wert, 100%] erfolgt.\n"
"\n"
"Wenn Ihre Firmware den Lüfter bereits unter einem Schwellenwert deaktiviert (z.B. Klipper's [fan] off_below: 0.10 schaltet den Lüfter aus, wenn der befehligte Arbeitszyklus unter 10% liegt), sollten idealerweise dieser Wert und der Firmware-Schwellenwert auf denselben Wert eingestellt werden. Wenn sie übereinstimmen (z.B. off_below: 0.10 in Klipper und 10% hier), garantiert der Slicer, dass er nie einen nicht-null-Wert emittiert, den die Firmware stillschweigend fallen lässt, und der Lüfter nie einen Wert erhält, der unter dem Wert liegt, den er tatsächlich anfahren kann.\n"
"\n"
"Setze den Wert auf 0, um diese Funktion zu deaktivieren."
msgid "%" msgid "%"
msgstr "%" msgstr "%"
@@ -18432,7 +18383,7 @@ msgid "Enable filament ramming"
msgstr "Erlaube Filamentrammen" msgstr "Erlaube Filamentrammen"
msgid "Tool change on wipe tower" msgid "Tool change on wipe tower"
msgstr "Werkzeugwechsel auf dem Reinigungsturm" msgstr ""
msgid "" msgid ""
"Force the toolhead to travel to the wipe tower before issuing the tool " "Force the toolhead to travel to the wipe tower before issuing the tool "
@@ -18443,8 +18394,6 @@ msgid ""
"this option if you want the tool change to always be issued above the wipe " "this option if you want the tool change to always be issued above the wipe "
"tower instead." "tower instead."
msgstr "" msgstr ""
"Erzwinge, dass der Werkzeugkopf zum Reinigungsturm fährt, bevor der Werkzeugwechselbefehl (Tx) ausgegeben wird. Nur relevant für Mehrfach-Extruder (Mehrfach-Werkzeugkopf) Drucker, die einen Typ-2-Reinigungsturm verwenden. Standardmäßig überspringt Orca die Fahrt auf Mehrfach-Werkzeugkopf-Maschinen, da die Firmware den Kopfwechsel übernimmt, was dazu führen kann, dass der Tx-Befehl über dem gedruckten Teil ausgegeben wird. Aktivieren Sie diese Option, wenn Sie möchten, dass der Werkzeugwechsel immer über dem Reinigungsturm ausgegeben wird."
msgid "No sparse layers (beta)" msgid "No sparse layers (beta)"
msgstr "Keine dünnen Schichten (Beta)" msgstr "Keine dünnen Schichten (Beta)"
@@ -19396,7 +19345,7 @@ msgstr ""
"verschiedene Materialien aufeinandertreffen." "verschiedene Materialien aufeinandertreffen."
msgid "Cool down from interface boost during prime tower" msgid "Cool down from interface boost during prime tower"
msgstr "Abkühlung von der Schnittstellen-Boost während des Reinigungsturms" msgstr "^"
msgid "" msgid ""
"When interface-layer temperature boost is active, set the nozzle back to " "When interface-layer temperature boost is active, set the nozzle back to "
@@ -22045,18 +21994,12 @@ msgid ""
"\n" "\n"
"Available nozzle profiles for this printer:" "Available nozzle profiles for this printer:"
msgstr "" msgstr ""
"\n"
"\n"
"Verfügbare Düsenprofile für diesen Drucker:"
msgid "" msgid ""
"\n" "\n"
"\n" "\n"
"Choose YES to switch existing preset:" "Choose YES to switch existing preset:"
msgstr "" msgstr ""
"\n"
"\n"
"Wählen Sie JA, um das vorhandene Profil zu wechseln:"
msgid "Printer Created Successfully" msgid "Printer Created Successfully"
msgstr "Drucker erfolgreich erstellt" msgstr "Drucker erfolgreich erstellt"
@@ -23265,16 +23208,16 @@ msgid "Detection radius"
msgstr "Erkennungsradius" msgstr "Erkennungsradius"
msgid "Selected" msgid "Selected"
msgstr "Ausgewählt" msgstr ""
msgid "Auto-generate" msgid "Auto-generate"
msgstr "Automatisch generieren" msgstr ""
msgid "Generate brim ears using Max angle and Detection radius" msgid "Generate brim ears using Max angle and Detection radius"
msgstr "Mausohren mit Maximalwinkel und Erkennungsradius generieren" msgstr ""
msgid "Add or Select" msgid "Add or Select"
msgstr "Hinzufügen oder auswählen" msgstr ""
msgid "" msgid ""
"Warning: The brim type is not set to \"painted\", the brim ears will not " "Warning: The brim type is not set to \"painted\", the brim ears will not "
@@ -23287,7 +23230,7 @@ msgid "Set the brim type of this object to \"painted\""
msgstr "Den Brim-Typ dieses Objekts auf \"bemalt\" setzen" msgstr "Den Brim-Typ dieses Objekts auf \"bemalt\" setzen"
msgid "invalid brim ears" msgid "invalid brim ears"
msgstr "Ungültige Mausohren" msgstr ""
msgid "Brim Ears" msgid "Brim Ears"
msgstr "Mausohren" msgstr "Mausohren"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -2195,7 +2195,7 @@ std::vector<std::vector<ExPolygons>> segmentation_by_painting(const PrintObject
// Returns multi-material segmentation based on painting in multi-material segmentation gizmo // Returns multi-material segmentation based on painting in multi-material segmentation gizmo
std::vector<std::vector<ExPolygons>> multi_material_segmentation_by_painting(const PrintObject &print_object, const std::function<void()> &throw_on_cancel_callback) { std::vector<std::vector<ExPolygons>> multi_material_segmentation_by_painting(const PrintObject &print_object, const std::function<void()> &throw_on_cancel_callback) {
const size_t num_facets_states = print_object.print()->config().filament_colour.size() + 1; const size_t num_facets_states = print_object.print()->config().filament_diameter.size() + 1;
const float max_width = float(print_object.config().mmu_segmented_region_max_width.value); const float max_width = float(print_object.config().mmu_segmented_region_max_width.value);
const float interlocking_depth = float(print_object.config().mmu_segmented_region_interlocking_depth.value); const float interlocking_depth = float(print_object.config().mmu_segmented_region_interlocking_depth.value);
const bool interlocking_beam = print_object.config().interlocking_beam.value; const bool interlocking_beam = print_object.config().interlocking_beam.value;

View File

@@ -883,7 +883,6 @@ static inline void apply_mm_segmentation(PrintObject &print_object, ThrowOnCance
double z = print_object.get_layer(int(range.begin()))->slice_z; double z = print_object.get_layer(int(range.begin()))->slice_z;
auto it_layer_range = layer_range_first(layer_ranges, z); auto it_layer_range = layer_range_first(layer_ranges, z);
// BBS // BBS
const size_t num_extruders = print_object.print()->config().filament_diameter.size();
struct ByExtruder { struct ByExtruder {
ExPolygons expolygons; ExPolygons expolygons;
@@ -903,6 +902,7 @@ static inline void apply_mm_segmentation(PrintObject &print_object, ThrowOnCance
it_layer_range = layer_range_next(layer_ranges, it_layer_range, layer.slice_z); it_layer_range = layer_range_next(layer_ranges, it_layer_range, layer.slice_z);
const PrintObjectRegions::LayerRangeRegions &layer_range = *it_layer_range; const PrintObjectRegions::LayerRangeRegions &layer_range = *it_layer_range;
// Gather per extruder expolygons. // Gather per extruder expolygons.
const size_t num_extruders = segmentation[layer_id].size();
by_extruder.assign(num_extruders, ByExtruder()); by_extruder.assign(num_extruders, ByExtruder());
by_region.assign(layer.region_count(), ByRegion()); by_region.assign(layer.region_count(), ByRegion());
bool layer_split = false; bool layer_split = false;

View File

@@ -737,50 +737,36 @@ void GUI_App::post_init()
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", init with input files, size %1%, input_gcode %2%") BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", init with input files, size %1%, input_gcode %2%")
%this->init_params->input_files.size() %this->init_params->input_gcode; %this->init_params->input_files.size() %this->init_params->input_gcode;
bool load_immediately = true; switch_to_3d = true;
if (app_config->get("sync_user_preset") == "true" && m_agent && m_agent->is_user_login()
&& !this->init_params->input_gcode
&& !(this->init_params->input_files.size() == 1 && is_supported_open_protocol(this->init_params->input_files.front()))) {
// Defer loading until after cloud sync completes, so project settings
// from the 3MF override synced presets instead of the reverse.
m_pending_input_files = std::move(this->init_params->input_files);
this->init_params->input_files.clear();
load_immediately = false;
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": deferring input file load until after cloud sync";
}
if (load_immediately) { const auto first_url = this->init_params->input_files.front();
switch_to_3d = true; if (this->init_params->input_files.size() == 1 && is_supported_open_protocol(first_url)) {
start_download(first_url);
const auto first_url = this->init_params->input_files.front(); m_open_method = "url";
if (this->init_params->input_files.size() == 1 && is_supported_open_protocol(first_url)) { } else {
start_download(first_url); if (this->init_params->input_gcode) {
m_open_method = "url"; mainframe->select_tab(size_t(MainFrame::tp3DEditor));
plater_->select_view_3D("3D");
this->plater()->load_gcode(from_u8(this->init_params->input_files.front()));
m_open_method = "gcode";
} else { } else {
if (this->init_params->input_gcode) { mainframe->select_tab(size_t(MainFrame::tp3DEditor));
mainframe->select_tab(size_t(MainFrame::tp3DEditor)); plater_->select_view_3D("3D");
plater_->select_view_3D("3D"); wxArrayString input_files;
this->plater()->load_gcode(from_u8(this->init_params->input_files.front())); for (auto& file : this->init_params->input_files) {
m_open_method = "gcode"; input_files.push_back(wxString::FromUTF8(file));
} else { }
mainframe->select_tab(size_t(MainFrame::tp3DEditor)); this->plater()->set_project_filename(_L("Untitled"));
plater_->select_view_3D("3D"); this->plater()->load_files(input_files);
wxArrayString input_files; try {
for (auto& file : this->init_params->input_files) { if (!input_files.empty()) {
input_files.push_back(wxString::FromUTF8(file)); std::string file_path = input_files.front().ToStdString();
} std::filesystem::path path(file_path);
this->plater()->set_project_filename(_L("Untitled")); m_open_method = "file_" + path.extension().string();
this->plater()->load_files(input_files);
try {
if (!input_files.empty()) {
std::string file_path = input_files.front().ToStdString();
std::filesystem::path path(file_path);
m_open_method = "file_" + path.extension().string();
}
} catch (...) {
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ", file path exception!";
m_open_method = "file";
} }
} catch (...) {
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ", file path exception!";
m_open_method = "file";
} }
} }
} }
@@ -901,9 +887,12 @@ void GUI_App::post_init()
show_network_plugin_download_dialog(false); show_network_plugin_download_dialog(false);
} }
// Start preset sync. When input files are present, loading is deferred so // Start preset sync after project opened, otherwise we could have preset change during project opening which could cause crash
// the sync runs first and the 3MF project settings override synced defaults.
if (app_config->get("sync_user_preset") == "true") { if (app_config->get("sync_user_preset") == "true") {
// BBS loading user preset
// Always async, not such startup step
// BOOST_LOG_TRIVIAL(info) << "Loading user presets...";
// scrn->SetText(_L("Loading user presets..."));
if (m_agent) { if (m_agent) {
start_sync_user_preset(); start_sync_user_preset();
} }
@@ -912,12 +901,6 @@ void GUI_App::post_init()
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " sync_user_preset: false"; BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " sync_user_preset: false";
} }
// If input files were deferred but sync wasn't started (not logged in, etc.), load them now
if (!m_pending_input_files.empty() && !m_user_sync_token) {
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": sync not started, loading deferred input files directly";
CallAfter([this]() { load_pending_input_files(); });
}
// The extra CallAfter() is needed because of Mac, where this is the only way // The extra CallAfter() is needed because of Mac, where this is the only way
// to popup a modal dialog on start without screwing combo boxes. // to popup a modal dialog on start without screwing combo boxes.
// This is ugly but I honestly found no better way to do it. // This is ugly but I honestly found no better way to do it.
@@ -5912,38 +5895,6 @@ void GUI_App::remove_user_presets()
} }
} }
void GUI_App::load_pending_input_files()
{
if (m_pending_input_files.empty() || is_closing()) return;
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": loading " << m_pending_input_files.size() << " deferred input file(s)";
mainframe->select_tab(size_t(MainFrame::tp3DEditor));
plater_->select_view_3D("3D");
wxArrayString input_files;
for (auto& file : m_pending_input_files)
input_files.push_back(wxString::FromUTF8(file));
this->plater()->set_project_filename(_L("Untitled"));
this->plater()->load_files(input_files);
try {
if (!input_files.empty()) {
std::string file_path = input_files.front().ToStdString();
std::filesystem::path path(file_path);
m_open_method = "file_" + path.extension().string();
}
} catch (...) {
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ", file path exception!";
m_open_method = "file";
}
plater_->trigger_restore_project(1);
m_pending_input_files.clear();
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": deferred input files loaded";
}
// Check if the user's OrcaCloud profile directory is empty and offer to migrate // Check if the user's OrcaCloud profile directory is empty and offer to migrate
// existing profiles from the default or BambuCloud user folder. // existing profiles from the default or BambuCloud user folder.
// Returns true if migration was performed, false otherwise. // Returns true if migration was performed, false otherwise.
@@ -6706,15 +6657,6 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg)
if (ret == 0 && m_agent && !t.expired()) if (ret == 0 && m_agent && !t.expired())
reload_settings(); reload_settings();
// After initial sync cycle, load any input files that were deferred
// so the 3MF project settings override the freshly-synced cloud defaults.
if (!m_pending_input_files.empty()) {
CallAfter([this]() {
if (!m_pending_input_files.empty())
load_pending_input_files();
});
}
// For orca specific syncing // For orca specific syncing
auto orca_agent = std::dynamic_pointer_cast<OrcaCloudServiceAgent>(m_agent->get_cloud_agent()); auto orca_agent = std::dynamic_pointer_cast<OrcaCloudServiceAgent>(m_agent->get_cloud_agent());
int tick_tock = -1, sync_count = 0; // tick_tock = -1 to immediately run sync the frist time this thread runs int tick_tock = -1, sync_count = 0; // tick_tock = -1 to immediately run sync the frist time this thread runs

View File

@@ -322,7 +322,6 @@ private:
boost::thread m_sync_update_thread; boost::thread m_sync_update_thread;
std::shared_ptr<int> m_user_sync_token; std::shared_ptr<int> m_user_sync_token;
std::atomic<bool> m_restart_sync_pending {false}; std::atomic<bool> m_restart_sync_pending {false};
std::vector<std::string> m_pending_input_files; // input files deferred until after cloud sync
bool m_is_dark_mode{ false }; bool m_is_dark_mode{ false };
bool m_adding_script_handler { false }; bool m_adding_script_handler { false };
bool m_side_popup_status{false}; bool m_side_popup_status{false};
@@ -522,7 +521,6 @@ public:
void push_notification(const MachineObject* obj, wxString msg, wxString title = wxEmptyString, UserNotificationStyle style = UserNotificationStyle::UNS_NORMAL); void push_notification(const MachineObject* obj, wxString msg, wxString title = wxEmptyString, UserNotificationStyle style = UserNotificationStyle::UNS_NORMAL);
void reload_settings(); void reload_settings();
void remove_user_presets(); void remove_user_presets();
void load_pending_input_files();
bool maybe_migrate_user_presets_on_login(); bool maybe_migrate_user_presets_on_login();