diff --git a/lib/Slic3r/GUI.pm b/lib/Slic3r/GUI.pm
index 4ec388c14..473fc6b90 100644
--- a/lib/Slic3r/GUI.pm
+++ b/lib/Slic3r/GUI.pm
@@ -7,9 +7,7 @@ use File::Basename qw(basename);
use FindBin;
use List::Util qw(first);
use Slic3r::GUI::2DBed;
-use Slic3r::GUI::AboutDialog;
use Slic3r::GUI::BedShapeDialog;
-use Slic3r::GUI::ConfigWizard;
use Slic3r::GUI::Controller;
use Slic3r::GUI::Controller::ManualControlDialog;
use Slic3r::GUI::Controller::PrinterPanel;
@@ -70,6 +68,8 @@ our $grey = Wx::Colour->new(200,200,200);
our $LANGUAGE_CHANGE_EVENT = Wx::NewEventType;
# 2) To inform about a change of Preferences.
our $PREFERENCES_EVENT = Wx::NewEventType;
+# To inform AppConfig about Slic3r version available online
+our $VERSION_ONLINE_EVENT = Wx::NewEventType;
sub OnInit {
my ($self) = @_;
@@ -95,12 +95,22 @@ sub OnInit {
warn $@ . "\n";
fatal_error(undef, $@);
}
- my $run_wizard = ! $self->{app_config}->exists;
+ my $app_conf_exists = $self->{app_config}->exists;
# load settings
- $self->{app_config}->load if ! $run_wizard;
+ $self->{app_config}->load if $app_conf_exists;
$self->{app_config}->set('version', $Slic3r::VERSION);
$self->{app_config}->save;
+ # my $version_check = $self->{app_config}->get('version_check');
+ $self->{preset_updater} = Slic3r::PresetUpdater->new($VERSION_ONLINE_EVENT, $self->{app_config});
+ Slic3r::GUI::set_preset_updater($self->{preset_updater});
+ eval { $self->{preset_updater}->config_update($self->{app_config}) };
+ if ($@) {
+ warn $@ . "\n";
+ fatal_error(undef, $@);
+ }
+ # my $slic3r_update = $self->{app_config}->slic3r_update_avail;
+
Slic3r::GUI::set_app_config($self->{app_config});
Slic3r::GUI::load_language();
@@ -111,11 +121,11 @@ sub OnInit {
warn $@ . "\n";
show_error(undef, $@);
}
- $run_wizard = 1 if $self->{preset_bundle}->has_defauls_only;
Slic3r::GUI::set_preset_bundle($self->{preset_bundle});
# application frame
+ print STDERR "Creating main frame...\n";
Wx::Image::FindHandlerType(wxBITMAP_TYPE_PNG) || Wx::Image::AddHandler(Wx::PNGHandler->new);
$self->{mainframe} = my $frame = Slic3r::GUI::MainFrame->new(
# If set, the "Controller" tab for the control of the printer over serial line and the serial port settings are hidden.
@@ -134,17 +144,18 @@ sub OnInit {
$self->{app_config}->save if $self->{app_config}->dirty;
});
- if ($run_wizard) {
- # On OSX the UI was not initialized correctly if the wizard was called
- # before the UI was up and running.
- $self->CallAfter(sub {
- # Run the config wizard, don't offer the "reset user profile" checkbox.
- $self->{mainframe}->config_wizard(1);
- });
- }
+ # On OSX the UI was not initialized correctly if the wizard was called
+ # before the UI was up and running.
+ $self->CallAfter(sub {
+ Slic3r::GUI::config_wizard_startup($app_conf_exists);
+
+ # TODO: call periodically?
+ $self->{preset_updater}->sync($self->{app_config}, $self->{preset_bundle});
+ });
# The following event is emited by the C++ menu implementation of application language change.
EVT_COMMAND($self, -1, $LANGUAGE_CHANGE_EVENT, sub{
+ print STDERR "LANGUAGE_CHANGE_EVENT\n";
$self->recreate_GUI;
});
@@ -153,10 +164,19 @@ sub OnInit {
$self->update_ui_from_settings;
});
+ # The following event is emited by PresetUpdater (C++)
+ EVT_COMMAND($self, -1, $VERSION_ONLINE_EVENT, sub {
+ my ($self, $event) = @_;
+ my $version = $event->GetString;
+ $self->{app_config}->set('version_online', $version);
+ $self->{app_config}->save;
+ });
+
return 1;
}
sub recreate_GUI{
+ print STDERR "recreate_GUI\n";
my ($self) = @_;
my $topwindow = $self->GetTopWindow();
$self->{mainframe} = my $frame = Slic3r::GUI::MainFrame->new(
@@ -180,22 +200,12 @@ sub recreate_GUI{
$self->{app_config}->save if $self->{app_config}->dirty;
});
- my $run_wizard = 1 if $self->{preset_bundle}->has_defauls_only;
- if ($run_wizard) {
- # On OSX the UI was not initialized correctly if the wizard was called
- # before the UI was up and running.
- $self->CallAfter(sub {
- # Run the config wizard, don't offer the "reset user profile" checkbox.
- $self->{mainframe}->config_wizard(1);
- });
- }
-}
-
-sub about {
- my ($self) = @_;
- my $about = Slic3r::GUI::AboutDialog->new(undef);
- $about->ShowModal;
- $about->Destroy;
+ # On OSX the UI was not initialized correctly if the wizard was called
+ # before the UI was up and running.
+ $self->CallAfter(sub {
+ # Run the config wizard, don't offer the "reset user profile" checkbox.
+ Slic3r::GUI::config_wizard_startup(1);
+ });
}
sub system_info {
diff --git a/lib/Slic3r/GUI/AboutDialog.pm b/lib/Slic3r/GUI/AboutDialog.pm
deleted file mode 100644
index 0879ea35b..000000000
--- a/lib/Slic3r/GUI/AboutDialog.pm
+++ /dev/null
@@ -1,122 +0,0 @@
-package Slic3r::GUI::AboutDialog;
-use strict;
-use warnings;
-use utf8;
-
-use Wx qw(:font :html :misc :dialog :sizer :systemsettings :frame :id);
-use Wx::Event qw(EVT_HTML_LINK_CLICKED EVT_LEFT_DOWN EVT_BUTTON);
-use Wx::Print;
-use Wx::Html;
-use base 'Wx::Dialog';
-
-sub new {
- my $class = shift;
- my ($parent) = @_;
- my $self = $class->SUPER::new($parent, -1, 'About Slic3r', wxDefaultPosition, [600, 340], wxCAPTION);
-
- $self->SetBackgroundColour(Wx::wxWHITE);
- my $hsizer = Wx::BoxSizer->new(wxHORIZONTAL);
- $self->SetSizer($hsizer);
-
- # logo
- my $logo = Slic3r::GUI::AboutDialog::Logo->new($self, -1, wxDefaultPosition, wxDefaultSize);
- $logo->SetBackgroundColour(Wx::wxWHITE);
- $hsizer->Add($logo, 0, wxEXPAND | wxLEFT | wxRIGHT, 30);
-
- my $vsizer = Wx::BoxSizer->new(wxVERTICAL);
- $hsizer->Add($vsizer, 1, wxEXPAND, 0);
-
- # title
- my $title = Wx::StaticText->new($self, -1, $Slic3r::FORK_NAME, wxDefaultPosition, wxDefaultSize);
- my $title_font = Wx::SystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
- $title_font->SetWeight(wxFONTWEIGHT_BOLD);
- $title_font->SetFamily(wxFONTFAMILY_ROMAN);
- $title_font->SetPointSize(24);
- $title->SetFont($title_font);
- $vsizer->Add($title, 0, wxALIGN_LEFT | wxTOP, 30);
-
- # version
- my $version = Wx::StaticText->new($self, -1, "Version $Slic3r::VERSION", wxDefaultPosition, wxDefaultSize);
- my $version_font = Wx::SystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
- $version_font->SetPointSize(&Wx::wxMSW ? 9 : 11);
- $version->SetFont($version_font);
- $vsizer->Add($version, 0, wxALIGN_LEFT | wxBOTTOM, 10);
-
- # text
- my $text =
- '' .
- '
' .
- '' .
- 'Copyright © 2016 Vojtech Bubnik, Prusa Research.
' .
- 'Copyright © 2011-2016 Alessandro Ranellucci.
' .
- 'Slic3r is licensed under the ' .
- 'GNU Affero General Public License, version 3.' .
- '
' .
- 'Contributions by Henrik Brix Andersen, Nicolas Dandrimont, Mark Hindess, Petr Ledvina, Y. Sapir, Mike Sheldrake and numerous others. ' .
- 'Manual by Gary Hodgson. Inspired by the RepRap community.
' .
- 'Slic3r logo designed by Corey Daniels, Silk Icon Set designed by Mark James. ' .
- '' .
- '' .
- '';
- my $html = Wx::HtmlWindow->new($self, -1, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_NEVER);
- my $font = Wx::SystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
- my $size = &Wx::wxMSW ? 8 : 10;
- $html->SetFonts($font->GetFaceName, $font->GetFaceName, [$size, $size, $size, $size, $size, $size, $size]);
- $html->SetBorders(2);
- $html->SetPage($text);
- $vsizer->Add($html, 1, wxEXPAND | wxALIGN_LEFT | wxRIGHT | wxBOTTOM, 20);
- EVT_HTML_LINK_CLICKED($self, $html, \&link_clicked);
-
- my $buttons = $self->CreateStdDialogButtonSizer(wxOK);
- $self->SetEscapeId(wxID_CLOSE);
- EVT_BUTTON($self, wxID_CLOSE, sub {
- $self->EndModal(wxID_CLOSE);
- $self->Close;
- });
- $vsizer->Add($buttons, 0, wxEXPAND | wxRIGHT | wxBOTTOM, 3);
-
- EVT_LEFT_DOWN($self, sub { $self->Close });
- EVT_LEFT_DOWN($logo, sub { $self->Close });
-
- return $self;
-}
-
-sub link_clicked {
- my ($self, $event) = @_;
-
- Wx::LaunchDefaultBrowser($event->GetLinkInfo->GetHref);
- $event->Skip(0);
-}
-
-package Slic3r::GUI::AboutDialog::Logo;
-use Wx qw(:bitmap :dc);
-use Wx::Event qw(EVT_PAINT);
-use base 'Wx::Panel';
-
-sub new {
- my $class = shift;
- my $self = $class->SUPER::new(@_);
-
- $self->{logo} = Wx::Bitmap->new(Slic3r::var("Slic3r_192px.png"), wxBITMAP_TYPE_PNG);
- $self->SetMinSize(Wx::Size->new($self->{logo}->GetWidth, $self->{logo}->GetHeight));
-
- EVT_PAINT($self, \&repaint);
-
- return $self;
-}
-
-sub repaint {
- my ($self, $event) = @_;
-
- my $dc = Wx::PaintDC->new($self);
- $dc->SetBackgroundMode(wxTRANSPARENT);
-
- my $size = $self->GetSize;
- my $logo_w = $self->{logo}->GetWidth;
- my $logo_h = $self->{logo}->GetHeight;
- $dc->DrawBitmap($self->{logo}, ($size->GetWidth - $logo_w) / 2, ($size->GetHeight - $logo_h) / 2, 1);
-
- $event->Skip;
-}
-
-1;
diff --git a/lib/Slic3r/GUI/ConfigWizard.pm b/lib/Slic3r/GUI/ConfigWizard.pm
deleted file mode 100644
index a32d345ed..000000000
--- a/lib/Slic3r/GUI/ConfigWizard.pm
+++ /dev/null
@@ -1,458 +0,0 @@
-# The config wizard is executed when the Slic3r is first started.
-# The wizard helps the user to specify the 3D printer properties.
-
-package Slic3r::GUI::ConfigWizard;
-use strict;
-use warnings;
-use utf8;
-
-use Wx;
-use base 'Wx::Wizard';
-
-# adhere to various human interface guidelines
-our $wizard = 'Wizard';
-$wizard = 'Assistant' if &Wx::wxMAC || &Wx::wxGTK;
-
-sub new {
- my ($class, $parent, $presets, $fresh_start) = @_;
- my $self = $class->SUPER::new($parent, -1, "Configuration $wizard");
-
- # initialize an empty repository
- $self->{config} = Slic3r::Config->new;
-
- my $welcome_page = Slic3r::GUI::ConfigWizard::Page::Welcome->new($self, $fresh_start);
- $self->add_page($welcome_page);
- $self->add_page(Slic3r::GUI::ConfigWizard::Page::Firmware->new($self));
- $self->add_page(Slic3r::GUI::ConfigWizard::Page::Bed->new($self));
- $self->add_page(Slic3r::GUI::ConfigWizard::Page::Nozzle->new($self));
- $self->add_page(Slic3r::GUI::ConfigWizard::Page::Filament->new($self));
- $self->add_page(Slic3r::GUI::ConfigWizard::Page::Temperature->new($self));
- $self->add_page(Slic3r::GUI::ConfigWizard::Page::BedTemperature->new($self));
- $self->add_page(Slic3r::GUI::ConfigWizard::Page::Finished->new($self));
-
- $_->build_index for @{$self->{pages}};
-
- $welcome_page->set_selection_presets([@{$presets}, 'Other']);
-
- return $self;
-}
-
-sub add_page {
- my ($self, $page) = @_;
-
- my $n = push @{$self->{pages}}, $page;
- # add first page to the page area sizer
- $self->GetPageAreaSizer->Add($page) if $n == 1;
- # link pages
- $self->{pages}[$n-2]->set_next_page($page) if $n >= 2;
- $page->set_previous_page($self->{pages}[$n-2]) if $n >= 2;
-}
-
-sub run {
- my ($self) = @_;
- my $result;
- if (Wx::Wizard::RunWizard($self, $self->{pages}[0])) {
- my $preset_name = $self->{pages}[0]->{preset_name};
- $result = {
- preset_name => $preset_name,
- reset_user_profile => $self->{pages}[0]->{reset_user_profile}
- };
- if ($preset_name eq 'Other') {
- # it would be cleaner to have these defined inside each page class,
- # in some event getting called before leaving the page
- # set first_layer_height + layer_height based on nozzle_diameter
- my $nozzle = $self->{config}->nozzle_diameter;
- $self->{config}->set('first_layer_height', $nozzle->[0]);
- $self->{config}->set('layer_height', $nozzle->[0] - 0.1);
-
- # set first_layer_temperature to temperature + 5
- $self->{config}->set('first_layer_temperature', [$self->{config}->temperature->[0] + 5]);
-
- # set first_layer_bed_temperature to temperature + 5
- $self->{config}->set('first_layer_bed_temperature',
- [ ($self->{config}->bed_temperature->[0] > 0) ? ($self->{config}->bed_temperature->[0] + 5) : 0 ]);
- $result->{config} = $self->{config};
- }
- }
- $self->Destroy;
- return $result;
-}
-
-package Slic3r::GUI::ConfigWizard::Index;
-use Wx qw(:bitmap :dc :font :misc :sizer :systemsettings :window);
-use Wx::Event qw(EVT_ERASE_BACKGROUND EVT_PAINT);
-use base 'Wx::Panel';
-
-sub new {
- my $class = shift;
- my ($parent, $title) = @_;
- my $self = $class->SUPER::new($parent);
-
- push @{$self->{titles}}, $title;
- $self->{own_index} = 0;
-
- $self->{bullets}->{before} = Wx::Bitmap->new(Slic3r::var("bullet_black.png"), wxBITMAP_TYPE_PNG);
- $self->{bullets}->{own} = Wx::Bitmap->new(Slic3r::var("bullet_blue.png"), wxBITMAP_TYPE_PNG);
- $self->{bullets}->{after} = Wx::Bitmap->new(Slic3r::var("bullet_white.png"), wxBITMAP_TYPE_PNG);
-
- $self->{background} = Wx::Bitmap->new(Slic3r::var("Slic3r_192px_transparent.png"), wxBITMAP_TYPE_PNG);
- $self->SetMinSize(Wx::Size->new($self->{background}->GetWidth, $self->{background}->GetHeight));
-
- EVT_PAINT($self, \&repaint);
-
- return $self;
-}
-
-sub repaint {
- my ($self, $event) = @_;
- my $size = $self->GetClientSize;
- my $gap = 5;
-
- my $dc = Wx::PaintDC->new($self);
- $dc->SetBackgroundMode(wxTRANSPARENT);
- $dc->SetFont($self->GetFont);
- $dc->SetTextForeground($self->GetForegroundColour);
-
- my $background_h = $self->{background}->GetHeight;
- my $background_w = $self->{background}->GetWidth;
- $dc->DrawBitmap($self->{background}, ($size->GetWidth - $background_w) / 2, ($size->GetHeight - $background_h) / 2, 1);
-
- my $label_h = $self->{bullets}->{own}->GetHeight;
- $label_h = $dc->GetCharHeight if $dc->GetCharHeight > $label_h;
- my $label_w = $size->GetWidth;
-
- my $i = 0;
- foreach (@{$self->{titles}}) {
- my $bullet = $self->{bullets}->{own};
- $bullet = $self->{bullets}->{before} if $i < $self->{own_index};
- $bullet = $self->{bullets}->{after} if $i > $self->{own_index};
-
- $dc->SetTextForeground(Wx::Colour->new(128, 128, 128)) if $i > $self->{own_index};
- $dc->DrawLabel($_, $bullet, Wx::Rect->new(0, $i * ($label_h + $gap), $label_w, $label_h));
- # Only show the first bullet if this is the only wizard page to be displayed.
- last if $i == 0 && $self->{just_welcome};
- $i++;
- }
-
- $event->Skip;
-}
-
-sub prepend_title {
- my $self = shift;
- my ($title) = @_;
-
- unshift @{$self->{titles}}, $title;
- $self->{own_index}++;
- $self->Refresh;
-}
-
-sub append_title {
- my $self = shift;
- my ($title) = @_;
-
- push @{$self->{titles}}, $title;
- $self->Refresh;
-}
-
-package Slic3r::GUI::ConfigWizard::Page;
-use Wx qw(:font :misc :sizer :staticline :systemsettings);
-use base 'Wx::WizardPage';
-
-sub new {
- my $class = shift;
- my ($parent, $title, $short_title) = @_;
- my $self = $class->SUPER::new($parent);
-
- my $sizer = Wx::FlexGridSizer->new(0, 2, 10, 10);
- $sizer->AddGrowableCol(1, 1);
- $sizer->AddGrowableRow(1, 1);
- $sizer->AddStretchSpacer(0);
- $self->SetSizer($sizer);
-
- # title
- my $text = Wx::StaticText->new($self, -1, $title, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
- my $bold_font = Wx::SystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
- $bold_font->SetWeight(wxFONTWEIGHT_BOLD);
- $bold_font->SetPointSize(14);
- $text->SetFont($bold_font);
- $sizer->Add($text, 0, wxALIGN_LEFT, 0);
-
- # index
- $self->{short_title} = $short_title ? $short_title : $title;
- $self->{index} = Slic3r::GUI::ConfigWizard::Index->new($self, $self->{short_title});
- $sizer->Add($self->{index}, 1, wxEXPAND | wxTOP | wxRIGHT, 10);
-
- # contents
- $self->{width} = 430;
- $self->{vsizer} = Wx::BoxSizer->new(wxVERTICAL);
- $sizer->Add($self->{vsizer}, 1);
-
- return $self;
-}
-
-sub append_text {
- my $self = shift;
- my ($text) = @_;
-
- my $para = Wx::StaticText->new($self, -1, $text, wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
- $para->Wrap($self->{width});
- $para->SetMinSize([$self->{width}, -1]);
- $self->{vsizer}->Add($para, 0, wxALIGN_LEFT | wxTOP | wxBOTTOM, 10);
-}
-
-sub append_option {
- my $self = shift;
- my ($full_key) = @_;
-
- # populate repository with the factory default
- my ($opt_key, $opt_index) = split /#/, $full_key, 2;
- $self->config->apply(Slic3r::Config::new_from_defaults_keys([$opt_key]));
-
- # draw the control
- my $optgroup = Slic3r::GUI::ConfigOptionsGroup->new(
- parent => $self,
- title => '',
- config => $self->config,
- full_labels => 1,
- );
- $optgroup->append_single_option_line($opt_key, $opt_index);
- $self->{vsizer}->Add($optgroup->sizer, 0, wxEXPAND | wxTOP | wxBOTTOM, 10);
-}
-
-sub append_panel {
- my ($self, $panel) = @_;
- $self->{vsizer}->Add($panel, 0, wxEXPAND | wxTOP | wxBOTTOM, 10);
-}
-
-sub set_previous_page {
- my $self = shift;
- my ($previous_page) = @_;
- $self->{previous_page} = $previous_page;
-}
-
-sub GetPrev {
- my $self = shift;
- return $self->{previous_page};
-}
-
-sub set_next_page {
- my $self = shift;
- my ($next_page) = @_;
- $self->{next_page} = $next_page;
-}
-
-sub GetNext {
- my $self = shift;
- return $self->{next_page};
-}
-
-sub get_short_title {
- my $self = shift;
- return $self->{short_title};
-}
-
-sub build_index {
- my $self = shift;
-
- my $page = $self;
- $self->{index}->prepend_title($page->get_short_title) while ($page = $page->GetPrev);
- $page = $self;
- $self->{index}->append_title($page->get_short_title) while ($page = $page->GetNext);
-}
-
-sub config {
- my ($self) = @_;
- return $self->GetParent->{config};
-}
-
-package Slic3r::GUI::ConfigWizard::Page::Welcome;
-use base 'Slic3r::GUI::ConfigWizard::Page';
-use Wx qw(:misc :sizer wxID_FORWARD);
-use Wx::Event qw(EVT_ACTIVATE EVT_CHOICE EVT_CHECKBOX);
-
-sub new {
- my ($class, $parent, $fresh_start) = @_;
- my $self = $class->SUPER::new($parent, "Welcome to the Slic3r Configuration $wizard", 'Welcome');
- $self->{full_wizard_workflow} = 1;
- $self->{reset_user_profile} = 0;
-
- # Test for the existence of the old config path.
- my $message_has_legacy;
- {
- my $datadir = Slic3r::data_dir;
- if ($datadir =~ /Slic3rPE/) {
- # Check for existence of the legacy Slic3r directory.
- my $datadir_legacy = substr $datadir, 0, -2;
- my $dir_enc = Slic3r::encode_path($datadir_legacy);
- if (-e $dir_enc && -d $dir_enc &&
- -e ($dir_enc . '/print') && -d ($dir_enc . '/print') &&
- -e ($dir_enc . '/filament') && -d ($dir_enc . '/filament') &&
- -e ($dir_enc . '/printer') && -d ($dir_enc . '/printer') &&
- -e ($dir_enc . '/slic3r.ini')) {
- $message_has_legacy = "Starting with Slic3r 1.38.4, the user profile directory has been renamed to $datadir. You may consider closing Slic3r and renaming $datadir_legacy to $datadir.";
- }
- }
- }
-
- $self->append_text('Hello, welcome to Slic3r Prusa Edition! This '.lc($wizard).' helps you with the initial configuration; just a few settings and you will be ready to print.');
- $self->append_text('Please select your printer vendor and printer type. If your printer is not listed, you may try your luck and select a similar one. If you select "Other", this ' . lc($wizard) . ' will let you set the basic 3D printer parameters.');
- $self->append_text($message_has_legacy) if defined $message_has_legacy;
- # To import an existing configuration instead, cancel this '.lc($wizard).' and use the Open Config menu item found in the File menu.');
- $self->append_text('If you received a configuration file or a config bundle from your 3D printer vendor, cancel this '.lc($wizard).' and use the "File->Load Config" or "File->Load Config Bundle" menu.');
-
- $self->{choice} = my $choice = Wx::Choice->new($self, -1, wxDefaultPosition, wxDefaultSize, []);
- $self->{vsizer}->Add($choice, 0, wxEXPAND | wxTOP | wxBOTTOM, 10);
- if (! $fresh_start) {
- $self->{reset_checkbox} = Wx::CheckBox->new($self, -1, "Reset user profile, install from scratch");
- $self->{vsizer}->Add($self->{reset_checkbox}, 0, wxEXPAND | wxTOP | wxBOTTOM, 10);
- }
-
- EVT_CHOICE($parent, $choice, sub {
- my $sel = $self->{choice}->GetStringSelection;
- $self->{preset_name} = $sel;
- $self->set_full_wizard_workflow(($sel eq 'Other') || ($sel eq ''));
- });
-
- if (! $fresh_start) {
- EVT_CHECKBOX($self, $self->{reset_checkbox}, sub {
- $self->{reset_user_profile} = $self->{reset_checkbox}->GetValue();
- });
- }
-
- EVT_ACTIVATE($parent, sub {
- $self->set_full_wizard_workflow($self->{preset_name} eq 'Other');
- });
-
- return $self;
-}
-
-sub set_full_wizard_workflow {
- my ($self, $full_workflow) = @_;
- $self->{full_wizard_workflow} = $full_workflow;
- $self->{index}->{just_welcome} = !$full_workflow;
- $self->{index}->Refresh;
- my $next_button = $self->GetParent->FindWindow(wxID_FORWARD);
- $next_button->SetLabel($full_workflow ? "&Next >" : "&Finish");
-}
-
-# Set the preset names, select the first item.
-sub set_selection_presets {
- my ($self, $names) = @_;
- $self->{choice}->Append($names);
- $self->{choice}->SetSelection(0);
- $self->{preset_name} = $names->[0];
-}
-
-sub GetNext {
- my $self = shift;
- return $self->{full_wizard_workflow} ? $self->{next_page} : undef;
-}
-
-package Slic3r::GUI::ConfigWizard::Page::Firmware;
-use base 'Slic3r::GUI::ConfigWizard::Page';
-
-sub new {
- my $class = shift;
- my ($parent) = @_;
- my $self = $class->SUPER::new($parent, 'Firmware Type');
-
- $self->append_text('Choose the type of firmware used by your printer, then click Next.');
- $self->append_option('gcode_flavor');
-
- return $self;
-}
-
-package Slic3r::GUI::ConfigWizard::Page::Bed;
-use base 'Slic3r::GUI::ConfigWizard::Page';
-
-sub new {
- my $class = shift;
- my ($parent) = @_;
- my $self = $class->SUPER::new($parent, 'Bed Size');
-
- $self->append_text('Set the shape of your printer\'s bed, then click Next.');
-
- $self->config->apply(Slic3r::Config::new_from_defaults_keys(['bed_shape']));
- $self->{bed_shape_panel} = my $panel = Slic3r::GUI::BedShapePanel->new($self, $self->config->bed_shape);
- $self->{bed_shape_panel}->on_change(sub {
- $self->config->set('bed_shape', $self->{bed_shape_panel}->GetValue);
- });
- $self->append_panel($self->{bed_shape_panel});
- return $self;
-}
-
-package Slic3r::GUI::ConfigWizard::Page::Nozzle;
-use base 'Slic3r::GUI::ConfigWizard::Page';
-
-sub new {
- my $class = shift;
- my ($parent) = @_;
- my $self = $class->SUPER::new($parent, 'Nozzle Diameter');
-
- $self->append_text('Enter the diameter of your printer\'s hot end nozzle, then click Next.');
- $self->append_option('nozzle_diameter#0');
-
- return $self;
-}
-
-package Slic3r::GUI::ConfigWizard::Page::Filament;
-use base 'Slic3r::GUI::ConfigWizard::Page';
-
-sub new {
- my $class = shift;
- my ($parent) = @_;
- my $self = $class->SUPER::new($parent, 'Filament Diameter');
-
- $self->append_text('Enter the diameter of your filament, then click Next.');
- $self->append_text('Good precision is required, so use a caliper and do multiple measurements along the filament, then compute the average.');
- $self->append_option('filament_diameter#0');
-
- return $self;
-}
-
-package Slic3r::GUI::ConfigWizard::Page::Temperature;
-use base 'Slic3r::GUI::ConfigWizard::Page';
-
-sub new {
- my $class = shift;
- my ($parent) = @_;
- my $self = $class->SUPER::new($parent, 'Extrusion Temperature');
-
- $self->append_text('Enter the temperature needed for extruding your filament, then click Next.');
- $self->append_text('A rule of thumb is 160 to 230 °C for PLA, and 215 to 250 °C for ABS.');
- $self->append_option('temperature#0');
-
- return $self;
-}
-
-package Slic3r::GUI::ConfigWizard::Page::BedTemperature;
-use base 'Slic3r::GUI::ConfigWizard::Page';
-
-sub new {
- my $class = shift;
- my ($parent) = @_;
- my $self = $class->SUPER::new($parent, 'Bed Temperature');
-
- $self->append_text('Enter the bed temperature needed for getting your filament to stick to your heated bed, then click Next.');
- $self->append_text('A rule of thumb is 60 °C for PLA and 110 °C for ABS. Leave zero if you have no heated bed.');
- $self->append_option('bed_temperature#0');
-
- return $self;
-}
-
-package Slic3r::GUI::ConfigWizard::Page::Finished;
-use base 'Slic3r::GUI::ConfigWizard::Page';
-
-sub new {
- my $class = shift;
- my ($parent) = @_;
- my $self = $class->SUPER::new($parent, 'Congratulations!', 'Finish');
-
- $self->append_text("You have successfully completed the Slic3r Configuration $wizard. " .
- 'Slic3r is now configured for your printer and filament.');
- $self->append_text('To close this '.lc($wizard).' and apply the newly created configuration, click Finish.');
-
- return $self;
-}
-
-1;
diff --git a/lib/Slic3r/GUI/Controller.pm b/lib/Slic3r/GUI/Controller.pm
index 6aa7b34cb..f7d90c796 100644
--- a/lib/Slic3r/GUI/Controller.pm
+++ b/lib/Slic3r/GUI/Controller.pm
@@ -7,7 +7,7 @@ use strict;
use warnings;
use utf8;
-use Wx qw(wxTheApp :frame :id :misc :sizer :bitmap :button :icon :dialog);
+use Wx qw(wxTheApp :frame :id :misc :sizer :bitmap :button :icon :dialog wxBORDER_NONE);
use Wx::Event qw(EVT_CLOSE EVT_LEFT_DOWN EVT_MENU);
use base qw(Wx::ScrolledWindow Class::Accessor);
use List::Util qw(first);
@@ -34,7 +34,7 @@ sub new {
# button for adding new printer panels
{
my $btn = $self->{btn_add} = Wx::BitmapButton->new($self, -1, Wx::Bitmap->new(Slic3r::var("add.png"), wxBITMAP_TYPE_PNG),
- wxDefaultPosition, wxDefaultSize, Wx::wxBORDER_NONE);
+ wxDefaultPosition, wxDefaultSize, wxBORDER_NONE);
$btn->SetToolTipString("Add printer…")
if $btn->can('SetToolTipString');
diff --git a/lib/Slic3r/GUI/MainFrame.pm b/lib/Slic3r/GUI/MainFrame.pm
index b2f51b9e1..886c8f419 100644
--- a/lib/Slic3r/GUI/MainFrame.pm
+++ b/lib/Slic3r/GUI/MainFrame.pm
@@ -81,7 +81,7 @@ sub new {
# declare events
EVT_CLOSE($self, sub {
my (undef, $event) = @_;
- if ($event->CanVeto && !$self->check_unsaved_changes) {
+ if ($event->CanVeto && !Slic3r::GUI::check_unsaved_changes) {
$event->Veto;
return;
}
@@ -95,7 +95,7 @@ sub new {
});
$self->update_ui_from_settings;
-
+
return $self;
}
@@ -237,12 +237,6 @@ sub _init_menubar {
$self->repair_stl;
}, undef, 'wrench.png');
$fileMenu->AppendSeparator();
- # Cmd+, is standard on OS X - what about other operating systems?
- $self->_append_menu_item($fileMenu, L("Preferences…\tCtrl+,"), L('Application preferences'), sub {
- # Opening the C++ preferences dialog.
- Slic3r::GUI::open_preferences_dialog($self->{preferences_event});
- }, wxID_PREFERENCES);
- $fileMenu->AppendSeparator();
$self->_append_menu_item($fileMenu, L("&Quit"), L('Quit Slic3r'), sub {
$self->Close(0);
}, wxID_EXIT);
@@ -319,11 +313,6 @@ sub _init_menubar {
# Help menu
my $helpMenu = Wx::Menu->new;
{
- $self->_append_menu_item($helpMenu, L("&Configuration ").$Slic3r::GUI::ConfigWizard::wizard."…", L("Run Configuration ").$Slic3r::GUI::ConfigWizard::wizard, sub {
- # Run the config wizard, offer the "reset user profile" checkbox.
- $self->config_wizard(0);
- });
- $helpMenu->AppendSeparator();
$self->_append_menu_item($helpMenu, L("Prusa 3D Drivers"), L('Open the Prusa3D drivers download page in your browser'), sub {
Wx::LaunchDefaultBrowser('http://www.prusa3d.com/drivers/');
});
@@ -348,7 +337,7 @@ sub _init_menubar {
Wx::LaunchDefaultBrowser('http://github.com/prusa3d/slic3r/issues/new');
});
$self->_append_menu_item($helpMenu, L("&About Slic3r"), L('Show about dialog'), sub {
- wxTheApp->about;
+ Slic3r::GUI::about;
});
}
@@ -362,11 +351,9 @@ sub _init_menubar {
$menubar->Append($self->{object_menu}, L("&Object")) if $self->{object_menu};
$menubar->Append($windowMenu, L("&Window"));
$menubar->Append($self->{viewMenu}, L("&View")) if $self->{viewMenu};
- # Add an optional debug menu
- # (Select application language from the list of installed languages)
- Slic3r::GUI::add_debug_menu($menubar, $self->{lang_ch_event});
+ # Add a configuration menu.
+ Slic3r::GUI::add_config_menu($menubar, $self->{preferences_event}, $self->{lang_ch_event});
$menubar->Append($helpMenu, L("&Help"));
- # Add an optional debug menu. In production code, the add_debug_menu() call should do nothing.
$self->SetMenuBar($menubar);
}
}
@@ -562,7 +549,7 @@ sub export_config {
sub load_config_file {
my ($self, $file) = @_;
if (!$file) {
- return unless $self->check_unsaved_changes;
+ return unless Slic3r::GUI::check_unsaved_changes;
my $dlg = Wx::FileDialog->new($self, L('Select configuration to load:'),
$last_config ? dirname($last_config) : wxTheApp->{app_config}->get_last_dir,
"config.ini",
@@ -581,7 +568,7 @@ sub load_config_file {
sub export_configbundle {
my ($self) = @_;
- return unless $self->check_unsaved_changes;
+ return unless Slic3r::GUI::check_unsaved_changes;
# validate current configuration in case it's dirty
eval { wxTheApp->{preset_bundle}->full_config->validate; };
Slic3r::GUI::catch_error($self) and return;
@@ -605,7 +592,7 @@ sub export_configbundle {
# but that behavior was not documented and likely buggy.
sub load_configbundle {
my ($self, $file, $reset_user_profile) = @_;
- return unless $self->check_unsaved_changes;
+ return unless Slic3r::GUI::check_unsaved_changes;
if (!$file) {
my $dlg = Wx::FileDialog->new($self, L('Select configuration to load:'),
$last_config ? dirname($last_config) : wxTheApp->{app_config}->get_last_dir,
@@ -639,70 +626,6 @@ sub load_config {
$self->{plater}->on_config_change($config) if $self->{plater};
}
-sub config_wizard {
- my ($self, $fresh_start) = @_;
- # Exit wizard if there are unsaved changes and the user cancels the action.
- return unless $self->check_unsaved_changes;
- # Enumerate the profiles bundled with the Slic3r installation under resources/profiles.
- my $directory = Slic3r::resources_dir() . "/profiles";
- my @profiles = ();
- if (opendir(DIR, Slic3r::encode_path($directory))) {
- while (my $file = readdir(DIR)) {
- if ($file =~ /\.ini$/) {
- $file =~ s/\.ini$//;
- push @profiles, Slic3r::decode_path($file);
- }
- }
- closedir(DIR);
- }
- # Open the wizard.
- if (my $result = Slic3r::GUI::ConfigWizard->new($self, \@profiles, $fresh_start)->run) {
- eval {
- if ($result->{reset_user_profile}) {
- wxTheApp->{preset_bundle}->reset(1);
- }
- if (defined $result->{config}) {
- # Load and save the settings into print, filament and printer presets.
- wxTheApp->{preset_bundle}->load_config('My Settings', $result->{config});
- } else {
- # Wizard returned a name of a preset bundle bundled with the installation. Unpack it.
- wxTheApp->{preset_bundle}->install_vendor_configbundle($directory . '/' . $result->{preset_name} . '.ini');
- # Reset the print / filament / printer selections, so that following line will select some sensible defaults.
- if ($fresh_start) {
- wxTheApp->{app_config}->reset_selections;
- }
- # Reload all presets after the vendor config bundle has been installed.
- wxTheApp->{preset_bundle}->load_presets(wxTheApp->{app_config});
- }
- };
- Slic3r::GUI::catch_error($self) and return;
- # Load the currently selected preset into the GUI, update the preset selection box.
- foreach my $tab (values %{$self->{options_tabs}}) {
- $tab->load_current_preset;
- }
- }
-}
-
-# This is called when closing the application, when loading a config file or when starting the config wizard
-# to notify the user whether he is aware that some preset changes will be lost.
-sub check_unsaved_changes {
- my $self = shift;
-
- my @dirty = ();
- foreach my $tab (values %{$self->{options_tabs}}) {
- push @dirty, $tab->title if $tab->current_preset_is_dirty;
- }
-
- if (@dirty) {
- my $titles = join ', ', @dirty;
- my $confirm = Wx::MessageDialog->new($self, L("You have unsaved changes ").($titles).L(". Discard changes and continue anyway?"),
- L('Unsaved Presets'), wxICON_QUESTION | wxYES_NO | wxNO_DEFAULT);
- return $confirm->ShowModal == wxID_YES;
- }
-
- return 1;
-}
-
sub select_tab {
my ($self, $tab) = @_;
$self->{tabpanel}->SetSelection($tab);
diff --git a/resources/icons/printers/BarBaz_M1.png b/resources/icons/printers/BarBaz_M1.png
new file mode 100644
index 000000000..5924cc88b
Binary files /dev/null and b/resources/icons/printers/BarBaz_M1.png differ
diff --git a/resources/icons/printers/BarBaz_M2.png b/resources/icons/printers/BarBaz_M2.png
new file mode 100644
index 000000000..5924cc88b
Binary files /dev/null and b/resources/icons/printers/BarBaz_M2.png differ
diff --git a/resources/icons/printers/BarBaz_M3.png b/resources/icons/printers/BarBaz_M3.png
new file mode 100644
index 000000000..5924cc88b
Binary files /dev/null and b/resources/icons/printers/BarBaz_M3.png differ
diff --git a/resources/icons/printers/Foobar_M1.png b/resources/icons/printers/Foobar_M1.png
new file mode 100644
index 000000000..61a76a63d
Binary files /dev/null and b/resources/icons/printers/Foobar_M1.png differ
diff --git a/resources/icons/printers/Foobar_M2.png b/resources/icons/printers/Foobar_M2.png
new file mode 100644
index 000000000..61a76a63d
Binary files /dev/null and b/resources/icons/printers/Foobar_M2.png differ
diff --git a/resources/icons/printers/Foobar_M3.png b/resources/icons/printers/Foobar_M3.png
new file mode 100644
index 000000000..61a76a63d
Binary files /dev/null and b/resources/icons/printers/Foobar_M3.png differ
diff --git a/resources/icons/printers/PrusaResearch_MK2S.png b/resources/icons/printers/PrusaResearch_MK2S.png
new file mode 100644
index 000000000..925447cf2
Binary files /dev/null and b/resources/icons/printers/PrusaResearch_MK2S.png differ
diff --git a/resources/icons/printers/PrusaResearch_MK2SMM.png b/resources/icons/printers/PrusaResearch_MK2SMM.png
new file mode 100644
index 000000000..d6ff16125
Binary files /dev/null and b/resources/icons/printers/PrusaResearch_MK2SMM.png differ
diff --git a/resources/icons/printers/PrusaResearch_MK3.png b/resources/icons/printers/PrusaResearch_MK3.png
new file mode 100644
index 000000000..5279ba01e
Binary files /dev/null and b/resources/icons/printers/PrusaResearch_MK3.png differ
diff --git a/resources/profiles/BarBaz.ini b/resources/profiles/BarBaz.ini
new file mode 100644
index 000000000..7c8cd3a6b
--- /dev/null
+++ b/resources/profiles/BarBaz.ini
@@ -0,0 +1,985 @@
+# Print profiles for the Prusa Research printers.
+
+[vendor]
+# Vendor name will be shown by the Config Wizard.
+name = Bar Baz
+# Configuration version of this file. Config file will only be installed, if the config_version differs.
+# This means, the server may force the Slic3r configuration to be downgraded.
+config_version = 0.1.0
+# Where to get the updates from?
+config_update_url = https://example.com
+
+# The printer models will be shown by the Configuration Wizard in this order,
+# also the first model installed & the first nozzle installed will be activated after install.
+#TODO: One day we may differentiate variants of the nozzles / hot ends,
+#for example by the melt zone size, or whether the nozzle is hardened.
+[printer_model:M1]
+name = Bar Baz Model 1
+variants = 0.4; 0.25; 0.6
+
+[printer_model:M2]
+name = Bar Baz Model 2
+variants = 0.4; 0.25; 0.6
+
+[printer_model:M3]
+# Printer model name will be shown by the installation wizard.
+name = Bar Baz Model 3
+variants = 0.4; 0.6
+
+# All presets starting with asterisk, for example *common*, are intermediate and they will
+# not make it into the user interface.
+
+# Common print preset, mostly derived from MK2 single material with a 0.4mm nozzle.
+# All other print presets will derive from the *common* print preset.
+[print:*common*]
+avoid_crossing_perimeters = 0
+bridge_acceleration = 1000
+bridge_angle = 0
+bridge_flow_ratio = 0.8
+bridge_speed = 20
+brim_width = 0
+clip_multipart_objects = 1
+compatible_printers =
+complete_objects = 0
+default_acceleration = 1000
+dont_support_bridges = 1
+elefant_foot_compensation = 0
+ensure_vertical_shell_thickness = 1
+external_fill_pattern = rectilinear
+external_perimeters_first = 0
+external_perimeter_extrusion_width = 0.45
+extra_perimeters = 0
+extruder_clearance_height = 20
+extruder_clearance_radius = 20
+extrusion_width = 0.45
+fill_angle = 45
+fill_density = 20%
+fill_pattern = cubic
+first_layer_acceleration = 1000
+first_layer_extrusion_width = 0.42
+first_layer_height = 0.2
+first_layer_speed = 30
+gap_fill_speed = 40
+gcode_comments = 0
+infill_every_layers = 1
+infill_extruder = 1
+infill_extrusion_width = 0.45
+infill_first = 0
+infill_only_where_needed = 0
+infill_overlap = 25%
+interface_shells = 0
+max_print_speed = 100
+max_volumetric_extrusion_rate_slope_negative = 0
+max_volumetric_extrusion_rate_slope_positive = 0
+max_volumetric_speed = 0
+min_skirt_length = 4
+notes =
+overhangs = 0
+only_retract_when_crossing_perimeters = 0
+ooze_prevention = 0
+output_filename_format = [input_filename_base].gcode
+perimeters = 2
+perimeter_extruder = 1
+perimeter_extrusion_width = 0.45
+post_process =
+print_settings_id =
+raft_layers = 0
+resolution = 0
+seam_position = nearest
+skirts = 1
+skirt_distance = 2
+skirt_height = 3
+small_perimeter_speed = 20
+solid_infill_below_area = 0
+solid_infill_every_layers = 0
+solid_infill_extruder = 1
+solid_infill_extrusion_width = 0.45
+spiral_vase = 0
+standby_temperature_delta = -5
+support_material = 0
+support_material_extruder = 0
+support_material_extrusion_width = 0.35
+support_material_interface_extruder = 0
+support_material_angle = 0
+support_material_buildplate_only = 0
+support_material_enforce_layers = 0
+support_material_contact_distance = 0.15
+support_material_interface_contact_loops = 0
+support_material_interface_layers = 2
+support_material_interface_spacing = 0.2
+support_material_interface_speed = 100%
+support_material_pattern = rectilinear
+support_material_spacing = 2
+support_material_speed = 50
+support_material_synchronize_layers = 0
+support_material_threshold = 45
+support_material_with_sheath = 0
+support_material_xy_spacing = 60%
+thin_walls = 0
+top_infill_extrusion_width = 0.45
+top_solid_infill_speed = 40
+travel_speed = 180
+wipe_tower = 0
+wipe_tower_per_color_wipe = 20
+wipe_tower_width = 60
+wipe_tower_x = 180
+wipe_tower_y = 140
+xy_size_compensation = 0
+
+# Print parameters common to a 0.25mm diameter nozzle.
+[print:*0.25nozzle*]
+external_perimeter_extrusion_width = 0.25
+extrusion_width = 0.25
+first_layer_extrusion_width = 0.25
+infill_extrusion_width = 0.25
+perimeter_extrusion_width = 0.25
+solid_infill_extrusion_width = 0.25
+top_infill_extrusion_width = 0.25
+support_material_extrusion_width = 0.18
+support_material_interface_layers = 0
+support_material_interface_spacing = 0.15
+support_material_spacing = 1
+support_material_xy_spacing = 150%
+
+# Print parameters common to a 0.6mm diameter nozzle.
+[print:*0.6nozzle*]
+external_perimeter_extrusion_width = 0.61
+extrusion_width = 0.67
+first_layer_extrusion_width = 0.65
+infill_extrusion_width = 0.7
+perimeter_extrusion_width = 0.65
+solid_infill_extrusion_width = 0.65
+top_infill_extrusion_width = 0.6
+
+[print:*soluble_support*]
+overhangs = 1
+skirts = 0
+support_material = 1
+support_material_contact_distance = 0
+support_material_extruder = 4
+support_material_extrusion_width = 0.45
+support_material_interface_extruder = 4
+support_material_interface_spacing = 0.1
+support_material_synchronize_layers = 1
+support_material_threshold = 80
+support_material_with_sheath = 1
+wipe_tower = 1
+
+[print:*0.05mm*]
+inherits = *common*
+bottom_solid_layers = 10
+bridge_acceleration = 300
+bridge_flow_ratio = 0.7
+default_acceleration = 500
+external_perimeter_speed = 20
+fill_density = 20%
+first_layer_acceleration = 500
+gap_fill_speed = 20
+infill_acceleration = 800
+infill_speed = 30
+max_print_speed = 80
+small_perimeter_speed = 15
+solid_infill_speed = 30
+support_material_extrusion_width = 0.3
+support_material_spacing = 1.5
+layer_height = 0.05
+perimeter_acceleration = 300
+perimeter_speed = 30
+perimeters = 3
+support_material_speed = 30
+top_solid_infill_speed = 20
+top_solid_layers = 15
+
+[print:0.05mm ULTRADETAIL]
+inherits = *0.05mm*
+infill_extrusion_width = 0.5
+
+[print:0.05mm ULTRADETAIL MK3]
+inherits = *0.05mm*
+fill_pattern = grid
+top_infill_extrusion_width = 0.4
+
+[print:0.05mm ULTRADETAIL 0.25 nozzle]
+inherits = *0.05mm*
+external_perimeter_extrusion_width = 0
+extrusion_width = 0.28
+fill_density = 20%
+first_layer_extrusion_width = 0.3
+infill_extrusion_width = 0
+infill_speed = 20
+max_print_speed = 100
+perimeter_extrusion_width = 0
+perimeter_speed = 20
+small_perimeter_speed = 10
+solid_infill_extrusion_width = 0
+solid_infill_speed = 20
+support_material_speed = 20
+top_infill_extrusion_width = 0
+
+[print:0.05mm ULTRADETAIL 0.25 nozzle MK3]
+inherits = *0.05mm*; *0.25nozzle*
+fill_pattern = grid
+top_infill_extrusion_width = 0.4
+
+[print:*0.10mm*]
+inherits = *common*
+bottom_solid_layers = 7
+bridge_flow_ratio = 0.7
+layer_height = 0.1
+perimeter_acceleration = 800
+top_solid_layers = 9
+
+[print:0.10mm DETAIL]
+inherits = *0.10mm*
+external_perimeter_speed = 40
+infill_acceleration = 2000
+infill_speed = 60
+perimeter_speed = 50
+solid_infill_speed = 50
+
+[print:0.10mm DETAIL MK3]
+inherits = *0.10mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 200
+perimeter_speed = 45
+solid_infill_speed = 170
+top_infill_extrusion_width = 0.4
+top_solid_infill_speed = 50
+
+[print:0.10mm DETAIL 0.25 nozzle]
+inherits = *0.10mm*
+bridge_acceleration = 600
+external_perimeter_speed = 20
+infill_acceleration = 1600
+infill_speed = 40
+perimeter_acceleration = 600
+perimeter_speed = 25
+small_perimeter_speed = 10
+solid_infill_speed = 40
+top_solid_infill_speed = 30
+
+[print:0.10mm DETAIL 0.25 nozzle MK3]
+inherits = *0.10mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 200
+perimeter_speed = 45
+solid_infill_speed = 170
+top_infill_extrusion_width = 0.4
+top_solid_infill_speed = 50
+
+[print:0.10mm DETAIL 0.6 nozzle MK3]
+inherits = *0.10mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 200
+perimeter_speed = 45
+solid_infill_speed = 170
+top_infill_extrusion_width = 0.4
+top_solid_infill_speed = 50
+
+[print:*0.15mm*]
+inherits = *common*
+bottom_solid_layers = 5
+external_perimeter_speed = 40
+infill_acceleration = 2000
+infill_speed = 60
+layer_height = 0.15
+perimeter_acceleration = 800
+perimeter_speed = 50
+solid_infill_speed = 50
+top_infill_extrusion_width = 0.4
+top_solid_layers = 7
+
+[print:0.15mm 100mms Linear Advance]
+inherits = *0.15mm*
+bridge_flow_ratio = 0.95
+external_perimeter_speed = 50
+infill_speed = 100
+max_print_speed = 150
+perimeter_speed = 60
+small_perimeter_speed = 30
+solid_infill_speed = 100
+support_material_speed = 60
+top_solid_infill_speed = 70
+
+[print:0.15mm OPTIMAL]
+inherits = *0.15mm*
+top_infill_extrusion_width = 0.45
+
+[print:0.15mm OPTIMAL 0.25 nozzle]
+inherits = *0.15mm*; *0.25nozzle*
+bridge_acceleration = 600
+bridge_flow_ratio = 0.7
+external_perimeter_speed = 20
+infill_acceleration = 1600
+infill_speed = 40
+perimeter_acceleration = 600
+perimeter_speed = 25
+small_perimeter_speed = 10
+solid_infill_speed = 40
+support_material_extrusion_width = 0.2
+top_solid_infill_speed = 30
+
+[print:0.15mm OPTIMAL 0.6 nozzle]
+inherits = *0.15mm*; *0.6nozzle*
+
+[print:0.15mm OPTIMAL MK3]
+inherits = *0.15mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 170
+perimeter_speed = 45
+solid_infill_speed = 170
+top_solid_infill_speed = 50
+
+[print:0.15mm OPTIMAL SOLUBLE FULL]
+inherits = *0.15mm*; *soluble_support*
+external_perimeter_speed = 25
+notes = Set your solluble extruder in Multiple Extruders > Support material/raft/skirt extruder & Support material/raft interface extruder
+perimeter_speed = 40
+solid_infill_speed = 40
+top_infill_extrusion_width = 0.45
+top_solid_infill_speed = 30
+wipe_tower = 1
+
+[print:0.15mm OPTIMAL SOLUBLE INTERFACE]
+inherits = 0.15mm OPTIMAL SOLUBLE FULL
+notes = Set your solluble extruder in Multiple Extruders > Support material/raft interface extruder
+support_material_extruder = 0
+support_material_interface_layers = 3
+support_material_with_sheath = 0
+support_material_xy_spacing = 80%
+
+[print:0.15mm OPTIMAL 0.25 nozzle MK3]
+inherits = *0.15mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 170
+perimeter_speed = 45
+solid_infill_speed = 170
+top_solid_infill_speed = 50
+[print:*0.20mm*]
+inherits = *common*
+bottom_solid_layers = 4
+bridge_flow_ratio = 0.95
+external_perimeter_speed = 40
+infill_acceleration = 2000
+infill_speed = 60
+layer_height = 0.2
+perimeter_acceleration = 800
+perimeter_speed = 50
+solid_infill_speed = 50
+top_infill_extrusion_width = 0.4
+top_solid_layers = 5
+
+[print:0.15mm OPTIMAL 0.6 nozzle MK3]
+inherits = *0.15mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 170
+perimeter_speed = 45
+solid_infill_speed = 170
+top_solid_infill_speed = 50
+
+[print:0.20mm 100mms Linear Advance]
+inherits = *0.20mm*
+external_perimeter_speed = 50
+infill_speed = 100
+max_print_speed = 150
+perimeter_speed = 60
+small_perimeter_speed = 30
+solid_infill_speed = 100
+support_material_speed = 60
+top_solid_infill_speed = 70
+
+[print:0.20mm FAST MK3]
+inherits = *0.20mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 170
+perimeter_speed = 45
+solid_infill_speed = 170
+top_solid_infill_speed = 50
+
+[print:0.20mm NORMAL]
+inherits = *0.20mm*
+
+[print:0.20mm NORMAL 0.6 nozzle]
+inherits = *0.20mm*; *0.6nozzle*
+
+[print:0.20mm NORMAL SOLUBLE FULL]
+inherits = *0.20mm*; *soluble_support*
+external_perimeter_speed = 30
+notes = Set your solluble extruder in Multiple Extruders > Support material/raft/skirt extruder & Support material/raft interface extruder
+perimeter_speed = 40
+solid_infill_speed = 40
+top_solid_infill_speed = 30
+
+[print:0.20mm NORMAL SOLUBLE INTERFACE]
+inherits = 0.20mm NORMAL SOLUBLE FULL
+notes = Set your solluble extruder in Multiple Extruders > Support material/raft interface extruder
+support_material_extruder = 0
+support_material_interface_layers = 3
+support_material_with_sheath = 0
+support_material_xy_spacing = 80%
+
+[print:0.20mm FAST 0.6 nozzle MK3]
+inherits = *0.20mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 170
+perimeter_speed = 45
+solid_infill_speed = 170
+top_solid_infill_speed = 50
+
+[print:*0.35mm*]
+inherits = *common*
+bottom_solid_layers = 3
+external_perimeter_extrusion_width = 0.6
+external_perimeter_speed = 40
+first_layer_extrusion_width = 0.75
+infill_acceleration = 2000
+infill_speed = 60
+layer_height = 0.35
+perimeter_acceleration = 800
+perimeter_extrusion_width = 0.65
+perimeter_speed = 50
+solid_infill_extrusion_width = 0.65
+solid_infill_speed = 60
+top_solid_infill_speed = 50
+top_solid_layers = 4
+
+[print:0.35mm FAST]
+inherits = *0.35mm*
+bridge_flow_ratio = 0.95
+first_layer_extrusion_width = 0.42
+perimeter_extrusion_width = 0.43
+solid_infill_extrusion_width = 0.7
+top_infill_extrusion_width = 0.43
+
+[print:0.35mm FAST 0.6 nozzle]
+inherits = *0.35mm*; *0.6nozzle*
+
+[print:0.35mm FAST sol full 0.6 nozzle]
+inherits = *0.35mm*; *0.6nozzle*; *soluble_support*
+external_perimeter_extrusion_width = 0.6
+external_perimeter_speed = 30
+notes = Set your solluble extruder in Multiple Extruders > Support material/raft interface extruder
+perimeter_speed = 40
+support_material_extrusion_width = 0.55
+support_material_interface_layers = 3
+support_material_xy_spacing = 120%
+top_infill_extrusion_width = 0.57
+
+[print:0.35mm FAST sol int 0.6 nozzle]
+inherits = 0.35mm FAST sol full 0.6 nozzle
+support_material_extruder = 0
+support_material_interface_layers = 2
+support_material_with_sheath = 0
+support_material_xy_spacing = 150%
+
+[filament:*common*]
+cooling = 1
+compatible_printers =
+end_filament_gcode = "; Filament-specific end gcode"
+extrusion_multiplier = 1
+filament_cost = 0
+filament_density = 0
+filament_diameter = 1.75
+filament_notes = ""
+filament_settings_id =
+filament_soluble = 0
+min_print_speed = 5
+slowdown_below_layer_time = 20
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}30{endif}; Filament gcode"
+
+[filament:*PLA*]
+inherits = *common*
+bed_temperature = 60
+bridge_fan_speed = 100
+disable_fan_first_layers = 1
+fan_always_on = 1
+fan_below_layer_time = 100
+filament_colour = #FF3232
+filament_max_volumetric_speed = 15
+filament_type = PLA
+first_layer_bed_temperature = 60
+first_layer_temperature = 215
+max_fan_speed = 100
+min_fan_speed = 100
+temperature = 210
+
+[filament:*PET*]
+inherits = *common*
+bed_temperature = 90
+bridge_fan_speed = 50
+disable_fan_first_layers = 3
+fan_always_on = 1
+fan_below_layer_time = 20
+filament_colour = #FF8000
+filament_max_volumetric_speed = 8
+filament_type = PET
+first_layer_bed_temperature = 85
+first_layer_temperature = 230
+max_fan_speed = 50
+min_fan_speed = 30
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}45{endif}; Filament gcode"
+temperature = 240
+
+[filament:*ABS*]
+inherits = *common*
+bed_temperature = 110
+bridge_fan_speed = 30
+cooling = 0
+disable_fan_first_layers = 3
+fan_always_on = 0
+fan_below_layer_time = 20
+filament_colour = #3A80CA
+filament_max_volumetric_speed = 11
+filament_type = ABS
+first_layer_bed_temperature = 100
+first_layer_temperature = 255
+max_fan_speed = 30
+min_fan_speed = 20
+temperature = 255
+
+[filament:*FLEX*]
+inherits = *common*
+bridge_fan_speed = 100
+cooling = 0
+disable_fan_first_layers = 1
+extrusion_multiplier = 1.2
+fan_always_on = 0
+fan_below_layer_time = 100
+filament_colour = #00CA0A
+filament_max_volumetric_speed = 1.5
+filament_type = FLEX
+first_layer_bed_temperature = 50
+first_layer_temperature = 240
+max_fan_speed = 90
+min_fan_speed = 70
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 240
+
+[filament:ColorFabb Brass Bronze]
+inherits = *PLA*
+extrusion_multiplier = 1.2
+filament_colour = #804040
+filament_max_volumetric_speed = 10
+
+[filament:ColorFabb HT]
+inherits = *PET*
+bed_temperature = 110
+bridge_fan_speed = 30
+cooling = 1
+disable_fan_first_layers = 3
+fan_always_on = 0
+fan_below_layer_time = 10
+first_layer_bed_temperature = 105
+first_layer_temperature = 270
+max_fan_speed = 20
+min_fan_speed = 10
+min_print_speed = 5
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}45{endif}; Filament gcode"
+temperature = 270
+
+[filament:ColorFabb PLA-PHA]
+inherits = *PLA*
+
+[filament:ColorFabb Woodfil]
+inherits = *PLA*
+extrusion_multiplier = 1.2
+filament_colour = #804040
+filament_max_volumetric_speed = 10
+first_layer_temperature = 200
+min_print_speed = 5
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 200
+
+[filament:ColorFabb XT]
+inherits = *PET*
+filament_type = PLA
+first_layer_bed_temperature = 90
+first_layer_temperature = 260
+temperature = 270
+
+[filament:ColorFabb XT-CF20]
+inherits = *PET*
+extrusion_multiplier = 1.2
+filament_colour = #804040
+filament_max_volumetric_speed = 1
+first_layer_bed_temperature = 90
+first_layer_temperature = 260
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}30{endif}; Filament gcode"
+temperature = 260
+
+[filament:ColorFabb nGen]
+inherits = *PET*
+bridge_fan_speed = 40
+fan_always_on = 0
+fan_below_layer_time = 10
+filament_type = NGEN
+first_layer_temperature = 240
+max_fan_speed = 35
+min_fan_speed = 20
+
+[filament:ColorFabb nGen flex]
+inherits = *FLEX*
+bed_temperature = 85
+bridge_fan_speed = 40
+cooling = 1
+disable_fan_first_layers = 3
+extrusion_multiplier = 1
+fan_below_layer_time = 10
+filament_max_volumetric_speed = 5
+first_layer_bed_temperature = 85
+first_layer_temperature = 260
+max_fan_speed = 35
+min_fan_speed = 20
+temperature = 260
+
+[filament:E3D Edge]
+inherits = *PET*
+filament_notes = "List of manufacturers tested with standart PET print settings for MK2:\n\nE3D Edge\nFillamentum CPE GH100\nPlasty Mladeč PETG"
+
+[filament:E3D PC-ABS]
+inherits = *ABS*
+first_layer_temperature = 270
+temperature = 270
+
+[filament:Fillamentum ABS]
+inherits = *ABS*
+first_layer_temperature = 240
+temperature = 240
+
+[filament:Fillamentum ASA]
+inherits = *ABS*
+fan_always_on = 1
+first_layer_temperature = 265
+temperature = 265
+
+[filament:Fillamentum CPE HG100 HM100]
+inherits = *PET*
+filament_notes = "CPE HG100 , CPE HM100"
+first_layer_bed_temperature = 90
+first_layer_temperature = 275
+max_fan_speed = 50
+min_fan_speed = 50
+temperature = 275
+
+[filament:Fillamentum Timberfil]
+inherits = *PLA*
+extrusion_multiplier = 1.2
+filament_colour = #804040
+filament_max_volumetric_speed = 10
+first_layer_temperature = 190
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 190
+
+[filament:Generic ABS]
+inherits = *ABS*
+filament_notes = "List of materials tested with standart ABS print settings for MK2:\n\nEsun ABS\nFil-A-Gehr ABS\nHatchboxABS\nPlasty Mladeč ABS"
+
+[filament:Generic PET]
+inherits = *PET*
+filament_notes = "List of manufacturers tested with standart PET print settings for MK2:\n\nE3D Edge\nFillamentum CPE GH100\nPlasty Mladeč PETG"
+
+[filament:Generic PLA]
+inherits = *PLA*
+filament_notes = "List of materials tested with standart PLA print settings for MK2:\n\nDas Filament\nEsun PLA\nEUMAKERS PLA\nFiberlogy HD-PLA\nFillamentum PLA\nFloreon3D\nHatchbox PLA\nPlasty Mladeč PLA\nPrimavalue PLA\nProto pasta Matte Fiber\nVerbatim PLA\nVerbatim BVOH"
+
+[filament:Polymaker PC-Max]
+inherits = *ABS*
+bed_temperature = 115
+filament_colour = #3A80CA
+first_layer_bed_temperature = 100
+first_layer_temperature = 270
+temperature = 270
+
+[filament:Primavalue PVA]
+inherits = *PLA*
+cooling = 0
+fan_always_on = 0
+filament_colour = #FFFFD7
+filament_max_volumetric_speed = 10
+filament_notes = "List of materials tested with standart PVA print settings for MK2:\n\nPrimaSelect PVA+\nICE FILAMENTS PVA 'NAUGHTY NATURAL'\nVerbatim BVOH"
+filament_soluble = 1
+filament_type = PVA
+first_layer_temperature = 195
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 195
+
+[filament:Prusa ABS]
+inherits = *ABS*
+filament_notes = "List of materials tested with standart ABS print settings for MK2:\n\nEsun ABS\nFil-A-Gehr ABS\nHatchboxABS\nPlasty Mladeč ABS"
+
+[filament:Prusa HIPS]
+inherits = *ABS*
+bridge_fan_speed = 50
+cooling = 1
+extrusion_multiplier = 0.9
+fan_always_on = 1
+fan_below_layer_time = 10
+filament_colour = #FFFFD7
+filament_soluble = 1
+filament_type = HIPS
+first_layer_temperature = 220
+max_fan_speed = 20
+min_fan_speed = 20
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 220
+
+[filament:Prusa PET]
+inherits = *PET*
+filament_notes = "List of manufacturers tested with standart PET print settings for MK2:\n\nE3D Edge\nFillamentum CPE GH100\nPlasty Mladeč PETG"
+
+[filament:Prusa PLA]
+inherits = *PLA*
+filament_notes = "List of materials tested with standart PLA print settings for MK2:\n\nDas Filament\nEsun PLA\nEUMAKERS PLA\nFiberlogy HD-PLA\nFillamentum PLA\nFloreon3D\nHatchbox PLA\nPlasty Mladeč PLA\nPrimavalue PLA\nProto pasta Matte Fiber\nVerbatim PLA\nVerbatim BVOH"
+
+[filament:SemiFlex or Flexfill 98A]
+inherits = *FLEX*
+
+[filament:Taulman Bridge]
+inherits = *common*
+bed_temperature = 90
+bridge_fan_speed = 40
+cooling = 0
+disable_fan_first_layers = 3
+fan_always_on = 0
+fan_below_layer_time = 20
+filament_colour = #DEE0E6
+filament_max_volumetric_speed = 10
+filament_soluble = 0
+filament_type = PET
+first_layer_bed_temperature = 60
+first_layer_temperature = 240
+max_fan_speed = 5
+min_fan_speed = 0
+min_print_speed = 5
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 250
+
+[filament:Taulman T-Glase]
+inherits = *PET*
+bridge_fan_speed = 40
+cooling = 0
+fan_always_on = 0
+first_layer_bed_temperature = 90
+first_layer_temperature = 240
+max_fan_speed = 5
+min_fan_speed = 0
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}30{endif}; Filament gcode"
+
+[filament:Verbatim BVOH]
+inherits = *common*
+bed_temperature = 60
+bridge_fan_speed = 100
+cooling = 0
+disable_fan_first_layers = 1
+extrusion_multiplier = 1
+fan_always_on = 0
+fan_below_layer_time = 100
+filament_colour = #FFFFD7
+filament_max_volumetric_speed = 10
+filament_notes = "List of materials tested with standart PLA print settings for MK2:\n\nDas Filament\nEsun PLA\nEUMAKERS PLA\nFiberlogy HD-PLA\nFillamentum PLA\nFloreon3D\nHatchbox PLA\nPlasty Mladeč PLA\nPrimavalue PLA\nProto pasta Matte Fiber\nVerbatim PLA\nVerbatim BVOH"
+filament_soluble = 1
+filament_type = PLA
+first_layer_bed_temperature = 60
+first_layer_temperature = 215
+max_fan_speed = 100
+min_fan_speed = 100
+min_print_speed = 15
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 210
+
+[filament:Verbatim PP]
+inherits = *common*
+bed_temperature = 100
+bridge_fan_speed = 100
+cooling = 1
+disable_fan_first_layers = 2
+extrusion_multiplier = 1
+fan_always_on = 1
+fan_below_layer_time = 100
+filament_colour = #DEE0E6
+filament_max_volumetric_speed = 5
+filament_notes = "List of materials tested with standart PLA print settings for MK2:\n\nEsun PLA\nFiberlogy HD-PLA\nFillamentum PLA\nFloreon3D\nHatchbox PLA\nPlasty Mladeč PLA\nPrimavalue PLA\nProto pasta Matte Fiber\nEUMAKERS PLA"
+filament_type = PLA
+first_layer_bed_temperature = 100
+first_layer_temperature = 220
+max_fan_speed = 100
+min_fan_speed = 100
+min_print_speed = 15
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 220
+
+[printer:*common*]
+bed_shape = 0x0,250x0,250x210,0x210
+before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;[layer_z]\n\n
+between_objects_gcode =
+deretract_speed = 0
+end_gcode = G4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors
+extruder_colour = #FFFF00
+extruder_offset = 0x0
+gcode_flavor = marlin
+layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z]
+max_layer_height = 0.25
+min_layer_height = 0.07
+nozzle_diameter = 0.4
+octoprint_apikey =
+octoprint_host =
+printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK2\n
+printer_settings_id =
+retract_before_travel = 1
+retract_before_wipe = 0%
+retract_layer_change = 1
+retract_length = 0.8
+retract_length_toolchange = 4
+retract_lift = 0.6
+retract_lift_above = 0
+retract_lift_below = 199
+retract_restart_extra = 0
+retract_restart_extra_toolchange = 0
+retract_speed = 35
+serial_port =
+serial_speed = 250000
+single_extruder_multi_material = 0
+start_gcode = M115 U3.1.0 ; tell printer latest fw version\nM201 X9000 Y9000 Z500 E10000 ; sets maximum accelerations, mm/sec^2\nM203 X500 Y500 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1500 T1500 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.2 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0
+toolchange_gcode =
+use_firmware_retraction = 0
+use_relative_e_distances = 1
+use_volumetric_e = 0
+variable_layer_height = 1
+wipe = 1
+z_offset = 0
+printer_model = M2
+printer_variant = 0.4
+default_print_profile = 0.15mm OPTIMAL
+default_filament_profile = Prusa PLA
+
+[printer:*multimaterial*]
+inherits = *common*
+deretract_speed = 50
+retract_before_travel = 3
+retract_before_wipe = 60%
+retract_layer_change = 0
+retract_length = 4
+retract_lift = 0.6
+retract_lift_above = 0
+retract_lift_below = 199
+retract_restart_extra = 0
+retract_restart_extra_toolchange = 0
+retract_speed = 80
+single_extruder_multi_material = 1
+printer_model = M3
+
+[printer:*mm-single*]
+inherits = *multimaterial*
+end_gcode = G1 E-4 F2100.00000\nG91\nG1 Z1 F7200.000\nG90\nG1 X245 Y1\nG1 X240 E4\nG1 F4000\nG1 X190 E2.7 \nG1 F4600\nG1 X110 E2.8\nG1 F5200\nG1 X40 E3 \nG1 E-15.0000 F5000\nG1 E-50.0000 F5400\nG1 E-15.0000 F3000\nG1 E-12.0000 F2000\nG1 F1600\nG1 X0 Y1 E3.0000\nG1 X50 Y1 E-5.0000\nG1 F2000\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-3.0000\nG4 S0\nM107 ; fan off\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nG28 X0 ; home X axis\nM84 ; disable motors\n\n
+printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK2\nPRINTER_HAS_BOWDEN
+start_gcode = M115 U3.1.0 ; tell printer latest fw version\nM201 X9000 Y9000 Z500 E10000 ; sets maximum accelerations, mm/sec^2\nM203 X500 Y500 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1500 T1500 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.2 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\n; Start G-Code sequence START\nT?\nM104 S[first_layer_temperature]\nM140 S[first_layer_bed_temperature]\nM109 S[first_layer_temperature]\nM190 S[first_layer_bed_temperature]\nG21 ; set units to millimeters\nG90 ; use absolute coordinates\nM83 ; use relative distances for extrusion\nG28 W\nG80\nG92 E0.0\nM203 E100\nM92 E140\nG1 Z0.250 F7200.000\nG1 X50.0 E80.0 F1000.0\nG1 X160.0 E20.0 F1000.0\nG1 Z0.200 F7200.000\nG1 X220.0 E13 F1000.0\nG1 X240.0 E0 F1000.0\nG1 E-4 F1000.0\nG92 E0.0
+
+[printer:*mm-multi*]
+inherits = *multimaterial*
+end_gcode = {if not has_wipe_tower}\n; Pull the filament into the cooling tubes.\nG1 E-4 F2100.00000\nG91\nG1 Z1 F7200.000\nG90\nG1 X245 Y1\nG1 X240 E4\nG1 F4000\nG1 X190 E2.7 \nG1 F4600\nG1 X110 E2.8\nG1 F5200\nG1 X40 E3 \nG1 E-15.0000 F5000\nG1 E-50.0000 F5400\nG1 E-15.0000 F3000\nG1 E-12.0000 F2000\nG1 F1600\nG1 X0 Y1 E3.0000\nG1 X50 Y1 E-5.0000\nG1 F2000\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-3.0000\nG4 S0\n{endif}\nM107 ; fan off\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nG28 X0 ; home X axis\nM84 ; disable motors
+extruder_colour = #FFAA55;#5182DB;#4ECDD3;#FB7259
+nozzle_diameter = 0.4,0.4,0.4,0.4
+printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK2\nPRINTER_HAS_BOWDEN
+start_gcode = M115 U3.1.0 ; tell printer latest fw version\nM201 X9000 Y9000 Z500 E10000 ; sets maximum accelerations, mm/sec^2\nM203 X500 Y500 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1500 T1500 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.2 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\n; Start G-Code sequence START\nT[initial_tool]\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG21 ; set units to millimeters\nG90 ; use absolute coordinates\nM83 ; use relative distances for extrusion\nG28 W\nG80\nG92 E0.0\nM203 E100 ; set max feedrate\nM92 E140 ; E-steps per filament milimeter\n{if not has_wipe_tower}\nG1 Z0.250 F7200.000\nG1 X50.0 E80.0 F1000.0\nG1 X160.0 E20.0 F1000.0\nG1 Z0.200 F7200.000\nG1 X220.0 E13 F1000.0\nG1 X240.0 E0 F1000.0\nG1 E-4 F1000.0\n{endif}\nG92 E0.0
+variable_layer_height = 0
+
+[printer:Original Prusa i3 MK2]
+inherits = *common*
+
+[printer:Original Prusa i3 MK2 0.25 nozzle]
+inherits = *common*
+max_layer_height = 0.1
+min_layer_height = 0.05
+nozzle_diameter = 0.25
+retract_length = 1
+retract_speed = 50
+variable_layer_height = 0
+printer_variant = 0.25
+default_print_profile = 0.10mm DETAIL 0.25 nozzle
+
+[printer:Original Prusa i3 MK2 0.6 nozzle]
+inherits = *common*
+max_layer_height = 0.35
+min_layer_height = 0.1
+nozzle_diameter = 0.6
+printer_variant = 0.6
+
+[printer:Original Prusa i3 MK2 MM Single Mode]
+inherits = *mm-single*
+
+[printer:Original Prusa i3 MK2 MM Single Mode 0.6 nozzle]
+inherits = *mm-single*
+nozzle_diameter = 0.6
+printer_variant = 0.6
+
+[printer:Original Prusa i3 MK2 MultiMaterial]
+inherits = *mm-multi*
+nozzle_diameter = 0.4,0.4,0.4,0.4
+
+[printer:Original Prusa i3 MK2 MultiMaterial 0.6 nozzle]
+inherits = *mm-multi*
+nozzle_diameter = 0.6,0.6,0.6,0.6
+printer_variant = 0.6
+
+[printer:Original Prusa i3 MK3]
+inherits = *common*
+end_gcode = G4 ; wait\nM221 S100\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors
+printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK3\n
+retract_lift_below = 209
+start_gcode = M115 U3.1.1-RC5 ; tell printer latest fw version\nM201 X1000 Y1000 Z200 E5000 ; sets maximum accelerations, mm/sec^2\nM203 X200 Y200 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1250 T1250 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.4 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0\nM221 S{if layer_height==0.05}100{else}95{endif}
+printer_model = M1
+default_print_profile = 0.15mm OPTIMAL MK3
+
+[printer:Original Prusa i3 MK3 0.25 nozzle]
+inherits = *common*
+nozzle_diameter = 0.25
+printer_variant = 0.25
+end_gcode = G4 ; wait\nM221 S100\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors
+printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK3\n
+retract_lift_below = 209
+start_gcode = M115 U3.1.1-RC5 ; tell printer latest fw version\nM201 X1000 Y1000 Z200 E5000 ; sets maximum accelerations, mm/sec^2\nM203 X200 Y200 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1250 T1250 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.4 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0\nM221 S{if layer_height==0.05}100{else}95{endif}
+printer_model = M1
+default_print_profile = 0.10mm DETAIL MK3
+
+[printer:Original Prusa i3 MK3 0.6 nozzle]
+inherits = *common*
+nozzle_diameter = 0.6
+printer_variant = 0.6
+end_gcode = G4 ; wait\nM221 S100\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors
+printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK3\n
+retract_lift_below = 209
+start_gcode = M115 U3.1.1-RC5 ; tell printer latest fw version\nM201 X1000 Y1000 Z200 E5000 ; sets maximum accelerations, mm/sec^2\nM203 X200 Y200 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1250 T1250 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.4 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0\nM221 S{if layer_height==0.05}100{else}95{endif}
+printer_model = M1
+default_print_profile = 0.15mm OPTIMAL MK3
diff --git a/resources/profiles/Foobar.ini b/resources/profiles/Foobar.ini
new file mode 100644
index 000000000..571aa8bb8
--- /dev/null
+++ b/resources/profiles/Foobar.ini
@@ -0,0 +1,985 @@
+# Print profiles for the Prusa Research printers.
+
+[vendor]
+# Vendor name will be shown by the Config Wizard.
+name = Foo Bar
+# Configuration version of this file. Config file will only be installed, if the config_version differs.
+# This means, the server may force the Slic3r configuration to be downgraded.
+config_version = 0.1.0
+# Where to get the updates from?
+config_update_url = https://example.com
+
+# The printer models will be shown by the Configuration Wizard in this order,
+# also the first model installed & the first nozzle installed will be activated after install.
+#TODO: One day we may differentiate variants of the nozzles / hot ends,
+#for example by the melt zone size, or whether the nozzle is hardened.
+[printer_model:M1]
+name = Foo Bar Model 1
+variants = 0.4; 0.25; 0.6
+
+[printer_model:M2]
+name = Foo Bar Model 2
+variants = 0.4; 0.25; 0.6
+
+[printer_model:M3]
+# Printer model name will be shown by the installation wizard.
+name = Foo Bar Model 3
+variants = 0.4; 0.6
+
+# All presets starting with asterisk, for example *common*, are intermediate and they will
+# not make it into the user interface.
+
+# Common print preset, mostly derived from MK2 single material with a 0.4mm nozzle.
+# All other print presets will derive from the *common* print preset.
+[print:*common*]
+avoid_crossing_perimeters = 0
+bridge_acceleration = 1000
+bridge_angle = 0
+bridge_flow_ratio = 0.8
+bridge_speed = 20
+brim_width = 0
+clip_multipart_objects = 1
+compatible_printers =
+complete_objects = 0
+default_acceleration = 1000
+dont_support_bridges = 1
+elefant_foot_compensation = 0
+ensure_vertical_shell_thickness = 1
+external_fill_pattern = rectilinear
+external_perimeters_first = 0
+external_perimeter_extrusion_width = 0.45
+extra_perimeters = 0
+extruder_clearance_height = 20
+extruder_clearance_radius = 20
+extrusion_width = 0.45
+fill_angle = 45
+fill_density = 20%
+fill_pattern = cubic
+first_layer_acceleration = 1000
+first_layer_extrusion_width = 0.42
+first_layer_height = 0.2
+first_layer_speed = 30
+gap_fill_speed = 40
+gcode_comments = 0
+infill_every_layers = 1
+infill_extruder = 1
+infill_extrusion_width = 0.45
+infill_first = 0
+infill_only_where_needed = 0
+infill_overlap = 25%
+interface_shells = 0
+max_print_speed = 100
+max_volumetric_extrusion_rate_slope_negative = 0
+max_volumetric_extrusion_rate_slope_positive = 0
+max_volumetric_speed = 0
+min_skirt_length = 4
+notes =
+overhangs = 0
+only_retract_when_crossing_perimeters = 0
+ooze_prevention = 0
+output_filename_format = [input_filename_base].gcode
+perimeters = 2
+perimeter_extruder = 1
+perimeter_extrusion_width = 0.45
+post_process =
+print_settings_id =
+raft_layers = 0
+resolution = 0
+seam_position = nearest
+skirts = 1
+skirt_distance = 2
+skirt_height = 3
+small_perimeter_speed = 20
+solid_infill_below_area = 0
+solid_infill_every_layers = 0
+solid_infill_extruder = 1
+solid_infill_extrusion_width = 0.45
+spiral_vase = 0
+standby_temperature_delta = -5
+support_material = 0
+support_material_extruder = 0
+support_material_extrusion_width = 0.35
+support_material_interface_extruder = 0
+support_material_angle = 0
+support_material_buildplate_only = 0
+support_material_enforce_layers = 0
+support_material_contact_distance = 0.15
+support_material_interface_contact_loops = 0
+support_material_interface_layers = 2
+support_material_interface_spacing = 0.2
+support_material_interface_speed = 100%
+support_material_pattern = rectilinear
+support_material_spacing = 2
+support_material_speed = 50
+support_material_synchronize_layers = 0
+support_material_threshold = 45
+support_material_with_sheath = 0
+support_material_xy_spacing = 60%
+thin_walls = 0
+top_infill_extrusion_width = 0.45
+top_solid_infill_speed = 40
+travel_speed = 180
+wipe_tower = 0
+wipe_tower_per_color_wipe = 20
+wipe_tower_width = 60
+wipe_tower_x = 180
+wipe_tower_y = 140
+xy_size_compensation = 0
+
+# Print parameters common to a 0.25mm diameter nozzle.
+[print:*0.25nozzle*]
+external_perimeter_extrusion_width = 0.25
+extrusion_width = 0.25
+first_layer_extrusion_width = 0.25
+infill_extrusion_width = 0.25
+perimeter_extrusion_width = 0.25
+solid_infill_extrusion_width = 0.25
+top_infill_extrusion_width = 0.25
+support_material_extrusion_width = 0.18
+support_material_interface_layers = 0
+support_material_interface_spacing = 0.15
+support_material_spacing = 1
+support_material_xy_spacing = 150%
+
+# Print parameters common to a 0.6mm diameter nozzle.
+[print:*0.6nozzle*]
+external_perimeter_extrusion_width = 0.61
+extrusion_width = 0.67
+first_layer_extrusion_width = 0.65
+infill_extrusion_width = 0.7
+perimeter_extrusion_width = 0.65
+solid_infill_extrusion_width = 0.65
+top_infill_extrusion_width = 0.6
+
+[print:*soluble_support*]
+overhangs = 1
+skirts = 0
+support_material = 1
+support_material_contact_distance = 0
+support_material_extruder = 4
+support_material_extrusion_width = 0.45
+support_material_interface_extruder = 4
+support_material_interface_spacing = 0.1
+support_material_synchronize_layers = 1
+support_material_threshold = 80
+support_material_with_sheath = 1
+wipe_tower = 1
+
+[print:*0.05mm*]
+inherits = *common*
+bottom_solid_layers = 10
+bridge_acceleration = 300
+bridge_flow_ratio = 0.7
+default_acceleration = 500
+external_perimeter_speed = 20
+fill_density = 20%
+first_layer_acceleration = 500
+gap_fill_speed = 20
+infill_acceleration = 800
+infill_speed = 30
+max_print_speed = 80
+small_perimeter_speed = 15
+solid_infill_speed = 30
+support_material_extrusion_width = 0.3
+support_material_spacing = 1.5
+layer_height = 0.05
+perimeter_acceleration = 300
+perimeter_speed = 30
+perimeters = 3
+support_material_speed = 30
+top_solid_infill_speed = 20
+top_solid_layers = 15
+
+[print:0.05mm ULTRADETAIL]
+inherits = *0.05mm*
+infill_extrusion_width = 0.5
+
+[print:0.05mm ULTRADETAIL MK3]
+inherits = *0.05mm*
+fill_pattern = grid
+top_infill_extrusion_width = 0.4
+
+[print:0.05mm ULTRADETAIL 0.25 nozzle]
+inherits = *0.05mm*
+external_perimeter_extrusion_width = 0
+extrusion_width = 0.28
+fill_density = 20%
+first_layer_extrusion_width = 0.3
+infill_extrusion_width = 0
+infill_speed = 20
+max_print_speed = 100
+perimeter_extrusion_width = 0
+perimeter_speed = 20
+small_perimeter_speed = 10
+solid_infill_extrusion_width = 0
+solid_infill_speed = 20
+support_material_speed = 20
+top_infill_extrusion_width = 0
+
+[print:0.05mm ULTRADETAIL 0.25 nozzle MK3]
+inherits = *0.05mm*; *0.25nozzle*
+fill_pattern = grid
+top_infill_extrusion_width = 0.4
+
+[print:*0.10mm*]
+inherits = *common*
+bottom_solid_layers = 7
+bridge_flow_ratio = 0.7
+layer_height = 0.1
+perimeter_acceleration = 800
+top_solid_layers = 9
+
+[print:0.10mm DETAIL]
+inherits = *0.10mm*
+external_perimeter_speed = 40
+infill_acceleration = 2000
+infill_speed = 60
+perimeter_speed = 50
+solid_infill_speed = 50
+
+[print:0.10mm DETAIL MK3]
+inherits = *0.10mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 200
+perimeter_speed = 45
+solid_infill_speed = 170
+top_infill_extrusion_width = 0.4
+top_solid_infill_speed = 50
+
+[print:0.10mm DETAIL 0.25 nozzle]
+inherits = *0.10mm*
+bridge_acceleration = 600
+external_perimeter_speed = 20
+infill_acceleration = 1600
+infill_speed = 40
+perimeter_acceleration = 600
+perimeter_speed = 25
+small_perimeter_speed = 10
+solid_infill_speed = 40
+top_solid_infill_speed = 30
+
+[print:0.10mm DETAIL 0.25 nozzle MK3]
+inherits = *0.10mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 200
+perimeter_speed = 45
+solid_infill_speed = 170
+top_infill_extrusion_width = 0.4
+top_solid_infill_speed = 50
+
+[print:0.10mm DETAIL 0.6 nozzle MK3]
+inherits = *0.10mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 200
+perimeter_speed = 45
+solid_infill_speed = 170
+top_infill_extrusion_width = 0.4
+top_solid_infill_speed = 50
+
+[print:*0.15mm*]
+inherits = *common*
+bottom_solid_layers = 5
+external_perimeter_speed = 40
+infill_acceleration = 2000
+infill_speed = 60
+layer_height = 0.15
+perimeter_acceleration = 800
+perimeter_speed = 50
+solid_infill_speed = 50
+top_infill_extrusion_width = 0.4
+top_solid_layers = 7
+
+[print:0.15mm 100mms Linear Advance]
+inherits = *0.15mm*
+bridge_flow_ratio = 0.95
+external_perimeter_speed = 50
+infill_speed = 100
+max_print_speed = 150
+perimeter_speed = 60
+small_perimeter_speed = 30
+solid_infill_speed = 100
+support_material_speed = 60
+top_solid_infill_speed = 70
+
+[print:0.15mm OPTIMAL]
+inherits = *0.15mm*
+top_infill_extrusion_width = 0.45
+
+[print:0.15mm OPTIMAL 0.25 nozzle]
+inherits = *0.15mm*; *0.25nozzle*
+bridge_acceleration = 600
+bridge_flow_ratio = 0.7
+external_perimeter_speed = 20
+infill_acceleration = 1600
+infill_speed = 40
+perimeter_acceleration = 600
+perimeter_speed = 25
+small_perimeter_speed = 10
+solid_infill_speed = 40
+support_material_extrusion_width = 0.2
+top_solid_infill_speed = 30
+
+[print:0.15mm OPTIMAL 0.6 nozzle]
+inherits = *0.15mm*; *0.6nozzle*
+
+[print:0.15mm OPTIMAL MK3]
+inherits = *0.15mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 170
+perimeter_speed = 45
+solid_infill_speed = 170
+top_solid_infill_speed = 50
+
+[print:0.15mm OPTIMAL SOLUBLE FULL]
+inherits = *0.15mm*; *soluble_support*
+external_perimeter_speed = 25
+notes = Set your solluble extruder in Multiple Extruders > Support material/raft/skirt extruder & Support material/raft interface extruder
+perimeter_speed = 40
+solid_infill_speed = 40
+top_infill_extrusion_width = 0.45
+top_solid_infill_speed = 30
+wipe_tower = 1
+
+[print:0.15mm OPTIMAL SOLUBLE INTERFACE]
+inherits = 0.15mm OPTIMAL SOLUBLE FULL
+notes = Set your solluble extruder in Multiple Extruders > Support material/raft interface extruder
+support_material_extruder = 0
+support_material_interface_layers = 3
+support_material_with_sheath = 0
+support_material_xy_spacing = 80%
+
+[print:0.15mm OPTIMAL 0.25 nozzle MK3]
+inherits = *0.15mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 170
+perimeter_speed = 45
+solid_infill_speed = 170
+top_solid_infill_speed = 50
+[print:*0.20mm*]
+inherits = *common*
+bottom_solid_layers = 4
+bridge_flow_ratio = 0.95
+external_perimeter_speed = 40
+infill_acceleration = 2000
+infill_speed = 60
+layer_height = 0.2
+perimeter_acceleration = 800
+perimeter_speed = 50
+solid_infill_speed = 50
+top_infill_extrusion_width = 0.4
+top_solid_layers = 5
+
+[print:0.15mm OPTIMAL 0.6 nozzle MK3]
+inherits = *0.15mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 170
+perimeter_speed = 45
+solid_infill_speed = 170
+top_solid_infill_speed = 50
+
+[print:0.20mm 100mms Linear Advance]
+inherits = *0.20mm*
+external_perimeter_speed = 50
+infill_speed = 100
+max_print_speed = 150
+perimeter_speed = 60
+small_perimeter_speed = 30
+solid_infill_speed = 100
+support_material_speed = 60
+top_solid_infill_speed = 70
+
+[print:0.20mm FAST MK3]
+inherits = *0.20mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 170
+perimeter_speed = 45
+solid_infill_speed = 170
+top_solid_infill_speed = 50
+
+[print:0.20mm NORMAL]
+inherits = *0.20mm*
+
+[print:0.20mm NORMAL 0.6 nozzle]
+inherits = *0.20mm*; *0.6nozzle*
+
+[print:0.20mm NORMAL SOLUBLE FULL]
+inherits = *0.20mm*; *soluble_support*
+external_perimeter_speed = 30
+notes = Set your solluble extruder in Multiple Extruders > Support material/raft/skirt extruder & Support material/raft interface extruder
+perimeter_speed = 40
+solid_infill_speed = 40
+top_solid_infill_speed = 30
+
+[print:0.20mm NORMAL SOLUBLE INTERFACE]
+inherits = 0.20mm NORMAL SOLUBLE FULL
+notes = Set your solluble extruder in Multiple Extruders > Support material/raft interface extruder
+support_material_extruder = 0
+support_material_interface_layers = 3
+support_material_with_sheath = 0
+support_material_xy_spacing = 80%
+
+[print:0.20mm FAST 0.6 nozzle MK3]
+inherits = *0.20mm*
+bridge_speed = 30
+external_perimeter_speed = 35
+fill_pattern = grid
+infill_acceleration = 1500
+infill_speed = 170
+max_print_speed = 170
+perimeter_speed = 45
+solid_infill_speed = 170
+top_solid_infill_speed = 50
+
+[print:*0.35mm*]
+inherits = *common*
+bottom_solid_layers = 3
+external_perimeter_extrusion_width = 0.6
+external_perimeter_speed = 40
+first_layer_extrusion_width = 0.75
+infill_acceleration = 2000
+infill_speed = 60
+layer_height = 0.35
+perimeter_acceleration = 800
+perimeter_extrusion_width = 0.65
+perimeter_speed = 50
+solid_infill_extrusion_width = 0.65
+solid_infill_speed = 60
+top_solid_infill_speed = 50
+top_solid_layers = 4
+
+[print:0.35mm FAST]
+inherits = *0.35mm*
+bridge_flow_ratio = 0.95
+first_layer_extrusion_width = 0.42
+perimeter_extrusion_width = 0.43
+solid_infill_extrusion_width = 0.7
+top_infill_extrusion_width = 0.43
+
+[print:0.35mm FAST 0.6 nozzle]
+inherits = *0.35mm*; *0.6nozzle*
+
+[print:0.35mm FAST sol full 0.6 nozzle]
+inherits = *0.35mm*; *0.6nozzle*; *soluble_support*
+external_perimeter_extrusion_width = 0.6
+external_perimeter_speed = 30
+notes = Set your solluble extruder in Multiple Extruders > Support material/raft interface extruder
+perimeter_speed = 40
+support_material_extrusion_width = 0.55
+support_material_interface_layers = 3
+support_material_xy_spacing = 120%
+top_infill_extrusion_width = 0.57
+
+[print:0.35mm FAST sol int 0.6 nozzle]
+inherits = 0.35mm FAST sol full 0.6 nozzle
+support_material_extruder = 0
+support_material_interface_layers = 2
+support_material_with_sheath = 0
+support_material_xy_spacing = 150%
+
+[filament:*common*]
+cooling = 1
+compatible_printers =
+end_filament_gcode = "; Filament-specific end gcode"
+extrusion_multiplier = 1
+filament_cost = 0
+filament_density = 0
+filament_diameter = 1.75
+filament_notes = ""
+filament_settings_id =
+filament_soluble = 0
+min_print_speed = 5
+slowdown_below_layer_time = 20
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}30{endif}; Filament gcode"
+
+[filament:*PLA*]
+inherits = *common*
+bed_temperature = 60
+bridge_fan_speed = 100
+disable_fan_first_layers = 1
+fan_always_on = 1
+fan_below_layer_time = 100
+filament_colour = #FF3232
+filament_max_volumetric_speed = 15
+filament_type = PLA
+first_layer_bed_temperature = 60
+first_layer_temperature = 215
+max_fan_speed = 100
+min_fan_speed = 100
+temperature = 210
+
+[filament:*PET*]
+inherits = *common*
+bed_temperature = 90
+bridge_fan_speed = 50
+disable_fan_first_layers = 3
+fan_always_on = 1
+fan_below_layer_time = 20
+filament_colour = #FF8000
+filament_max_volumetric_speed = 8
+filament_type = PET
+first_layer_bed_temperature = 85
+first_layer_temperature = 230
+max_fan_speed = 50
+min_fan_speed = 30
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}45{endif}; Filament gcode"
+temperature = 240
+
+[filament:*ABS*]
+inherits = *common*
+bed_temperature = 110
+bridge_fan_speed = 30
+cooling = 0
+disable_fan_first_layers = 3
+fan_always_on = 0
+fan_below_layer_time = 20
+filament_colour = #3A80CA
+filament_max_volumetric_speed = 11
+filament_type = ABS
+first_layer_bed_temperature = 100
+first_layer_temperature = 255
+max_fan_speed = 30
+min_fan_speed = 20
+temperature = 255
+
+[filament:*FLEX*]
+inherits = *common*
+bridge_fan_speed = 100
+cooling = 0
+disable_fan_first_layers = 1
+extrusion_multiplier = 1.2
+fan_always_on = 0
+fan_below_layer_time = 100
+filament_colour = #00CA0A
+filament_max_volumetric_speed = 1.5
+filament_type = FLEX
+first_layer_bed_temperature = 50
+first_layer_temperature = 240
+max_fan_speed = 90
+min_fan_speed = 70
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 240
+
+[filament:ColorFabb Brass Bronze]
+inherits = *PLA*
+extrusion_multiplier = 1.2
+filament_colour = #804040
+filament_max_volumetric_speed = 10
+
+[filament:ColorFabb HT]
+inherits = *PET*
+bed_temperature = 110
+bridge_fan_speed = 30
+cooling = 1
+disable_fan_first_layers = 3
+fan_always_on = 0
+fan_below_layer_time = 10
+first_layer_bed_temperature = 105
+first_layer_temperature = 270
+max_fan_speed = 20
+min_fan_speed = 10
+min_print_speed = 5
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}45{endif}; Filament gcode"
+temperature = 270
+
+[filament:ColorFabb PLA-PHA]
+inherits = *PLA*
+
+[filament:ColorFabb Woodfil]
+inherits = *PLA*
+extrusion_multiplier = 1.2
+filament_colour = #804040
+filament_max_volumetric_speed = 10
+first_layer_temperature = 200
+min_print_speed = 5
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 200
+
+[filament:ColorFabb XT]
+inherits = *PET*
+filament_type = PLA
+first_layer_bed_temperature = 90
+first_layer_temperature = 260
+temperature = 270
+
+[filament:ColorFabb XT-CF20]
+inherits = *PET*
+extrusion_multiplier = 1.2
+filament_colour = #804040
+filament_max_volumetric_speed = 1
+first_layer_bed_temperature = 90
+first_layer_temperature = 260
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}30{endif}; Filament gcode"
+temperature = 260
+
+[filament:ColorFabb nGen]
+inherits = *PET*
+bridge_fan_speed = 40
+fan_always_on = 0
+fan_below_layer_time = 10
+filament_type = NGEN
+first_layer_temperature = 240
+max_fan_speed = 35
+min_fan_speed = 20
+
+[filament:ColorFabb nGen flex]
+inherits = *FLEX*
+bed_temperature = 85
+bridge_fan_speed = 40
+cooling = 1
+disable_fan_first_layers = 3
+extrusion_multiplier = 1
+fan_below_layer_time = 10
+filament_max_volumetric_speed = 5
+first_layer_bed_temperature = 85
+first_layer_temperature = 260
+max_fan_speed = 35
+min_fan_speed = 20
+temperature = 260
+
+[filament:E3D Edge]
+inherits = *PET*
+filament_notes = "List of manufacturers tested with standart PET print settings for MK2:\n\nE3D Edge\nFillamentum CPE GH100\nPlasty Mladeč PETG"
+
+[filament:E3D PC-ABS]
+inherits = *ABS*
+first_layer_temperature = 270
+temperature = 270
+
+[filament:Fillamentum ABS]
+inherits = *ABS*
+first_layer_temperature = 240
+temperature = 240
+
+[filament:Fillamentum ASA]
+inherits = *ABS*
+fan_always_on = 1
+first_layer_temperature = 265
+temperature = 265
+
+[filament:Fillamentum CPE HG100 HM100]
+inherits = *PET*
+filament_notes = "CPE HG100 , CPE HM100"
+first_layer_bed_temperature = 90
+first_layer_temperature = 275
+max_fan_speed = 50
+min_fan_speed = 50
+temperature = 275
+
+[filament:Fillamentum Timberfil]
+inherits = *PLA*
+extrusion_multiplier = 1.2
+filament_colour = #804040
+filament_max_volumetric_speed = 10
+first_layer_temperature = 190
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 190
+
+[filament:Generic ABS]
+inherits = *ABS*
+filament_notes = "List of materials tested with standart ABS print settings for MK2:\n\nEsun ABS\nFil-A-Gehr ABS\nHatchboxABS\nPlasty Mladeč ABS"
+
+[filament:Generic PET]
+inherits = *PET*
+filament_notes = "List of manufacturers tested with standart PET print settings for MK2:\n\nE3D Edge\nFillamentum CPE GH100\nPlasty Mladeč PETG"
+
+[filament:Generic PLA]
+inherits = *PLA*
+filament_notes = "List of materials tested with standart PLA print settings for MK2:\n\nDas Filament\nEsun PLA\nEUMAKERS PLA\nFiberlogy HD-PLA\nFillamentum PLA\nFloreon3D\nHatchbox PLA\nPlasty Mladeč PLA\nPrimavalue PLA\nProto pasta Matte Fiber\nVerbatim PLA\nVerbatim BVOH"
+
+[filament:Polymaker PC-Max]
+inherits = *ABS*
+bed_temperature = 115
+filament_colour = #3A80CA
+first_layer_bed_temperature = 100
+first_layer_temperature = 270
+temperature = 270
+
+[filament:Primavalue PVA]
+inherits = *PLA*
+cooling = 0
+fan_always_on = 0
+filament_colour = #FFFFD7
+filament_max_volumetric_speed = 10
+filament_notes = "List of materials tested with standart PVA print settings for MK2:\n\nPrimaSelect PVA+\nICE FILAMENTS PVA 'NAUGHTY NATURAL'\nVerbatim BVOH"
+filament_soluble = 1
+filament_type = PVA
+first_layer_temperature = 195
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 195
+
+[filament:Prusa ABS]
+inherits = *ABS*
+filament_notes = "List of materials tested with standart ABS print settings for MK2:\n\nEsun ABS\nFil-A-Gehr ABS\nHatchboxABS\nPlasty Mladeč ABS"
+
+[filament:Prusa HIPS]
+inherits = *ABS*
+bridge_fan_speed = 50
+cooling = 1
+extrusion_multiplier = 0.9
+fan_always_on = 1
+fan_below_layer_time = 10
+filament_colour = #FFFFD7
+filament_soluble = 1
+filament_type = HIPS
+first_layer_temperature = 220
+max_fan_speed = 20
+min_fan_speed = 20
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 220
+
+[filament:Prusa PET]
+inherits = *PET*
+filament_notes = "List of manufacturers tested with standart PET print settings for MK2:\n\nE3D Edge\nFillamentum CPE GH100\nPlasty Mladeč PETG"
+
+[filament:Prusa PLA]
+inherits = *PLA*
+filament_notes = "List of materials tested with standart PLA print settings for MK2:\n\nDas Filament\nEsun PLA\nEUMAKERS PLA\nFiberlogy HD-PLA\nFillamentum PLA\nFloreon3D\nHatchbox PLA\nPlasty Mladeč PLA\nPrimavalue PLA\nProto pasta Matte Fiber\nVerbatim PLA\nVerbatim BVOH"
+
+[filament:SemiFlex or Flexfill 98A]
+inherits = *FLEX*
+
+[filament:Taulman Bridge]
+inherits = *common*
+bed_temperature = 90
+bridge_fan_speed = 40
+cooling = 0
+disable_fan_first_layers = 3
+fan_always_on = 0
+fan_below_layer_time = 20
+filament_colour = #DEE0E6
+filament_max_volumetric_speed = 10
+filament_soluble = 0
+filament_type = PET
+first_layer_bed_temperature = 60
+first_layer_temperature = 240
+max_fan_speed = 5
+min_fan_speed = 0
+min_print_speed = 5
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 250
+
+[filament:Taulman T-Glase]
+inherits = *PET*
+bridge_fan_speed = 40
+cooling = 0
+fan_always_on = 0
+first_layer_bed_temperature = 90
+first_layer_temperature = 240
+max_fan_speed = 5
+min_fan_speed = 0
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}30{endif}; Filament gcode"
+
+[filament:Verbatim BVOH]
+inherits = *common*
+bed_temperature = 60
+bridge_fan_speed = 100
+cooling = 0
+disable_fan_first_layers = 1
+extrusion_multiplier = 1
+fan_always_on = 0
+fan_below_layer_time = 100
+filament_colour = #FFFFD7
+filament_max_volumetric_speed = 10
+filament_notes = "List of materials tested with standart PLA print settings for MK2:\n\nDas Filament\nEsun PLA\nEUMAKERS PLA\nFiberlogy HD-PLA\nFillamentum PLA\nFloreon3D\nHatchbox PLA\nPlasty Mladeč PLA\nPrimavalue PLA\nProto pasta Matte Fiber\nVerbatim PLA\nVerbatim BVOH"
+filament_soluble = 1
+filament_type = PLA
+first_layer_bed_temperature = 60
+first_layer_temperature = 215
+max_fan_speed = 100
+min_fan_speed = 100
+min_print_speed = 15
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 210
+
+[filament:Verbatim PP]
+inherits = *common*
+bed_temperature = 100
+bridge_fan_speed = 100
+cooling = 1
+disable_fan_first_layers = 2
+extrusion_multiplier = 1
+fan_always_on = 1
+fan_below_layer_time = 100
+filament_colour = #DEE0E6
+filament_max_volumetric_speed = 5
+filament_notes = "List of materials tested with standart PLA print settings for MK2:\n\nEsun PLA\nFiberlogy HD-PLA\nFillamentum PLA\nFloreon3D\nHatchbox PLA\nPlasty Mladeč PLA\nPrimavalue PLA\nProto pasta Matte Fiber\nEUMAKERS PLA"
+filament_type = PLA
+first_layer_bed_temperature = 100
+first_layer_temperature = 220
+max_fan_speed = 100
+min_fan_speed = 100
+min_print_speed = 15
+start_filament_gcode = "M900 K{if printer_notes=~/.*PRINTER_HAS_BOWDEN.*/}200{else}10{endif}; Filament gcode"
+temperature = 220
+
+[printer:*common*]
+bed_shape = 0x0,250x0,250x210,0x210
+before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;[layer_z]\n\n
+between_objects_gcode =
+deretract_speed = 0
+end_gcode = G4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors
+extruder_colour = #FFFF00
+extruder_offset = 0x0
+gcode_flavor = marlin
+layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z]
+max_layer_height = 0.25
+min_layer_height = 0.07
+nozzle_diameter = 0.4
+octoprint_apikey =
+octoprint_host =
+printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK2\n
+printer_settings_id =
+retract_before_travel = 1
+retract_before_wipe = 0%
+retract_layer_change = 1
+retract_length = 0.8
+retract_length_toolchange = 4
+retract_lift = 0.6
+retract_lift_above = 0
+retract_lift_below = 199
+retract_restart_extra = 0
+retract_restart_extra_toolchange = 0
+retract_speed = 35
+serial_port =
+serial_speed = 250000
+single_extruder_multi_material = 0
+start_gcode = M115 U3.1.0 ; tell printer latest fw version\nM201 X9000 Y9000 Z500 E10000 ; sets maximum accelerations, mm/sec^2\nM203 X500 Y500 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1500 T1500 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.2 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0
+toolchange_gcode =
+use_firmware_retraction = 0
+use_relative_e_distances = 1
+use_volumetric_e = 0
+variable_layer_height = 1
+wipe = 1
+z_offset = 0
+printer_model = M2
+printer_variant = 0.4
+default_print_profile = 0.15mm OPTIMAL
+default_filament_profile = Prusa PLA
+
+[printer:*multimaterial*]
+inherits = *common*
+deretract_speed = 50
+retract_before_travel = 3
+retract_before_wipe = 60%
+retract_layer_change = 0
+retract_length = 4
+retract_lift = 0.6
+retract_lift_above = 0
+retract_lift_below = 199
+retract_restart_extra = 0
+retract_restart_extra_toolchange = 0
+retract_speed = 80
+single_extruder_multi_material = 1
+printer_model = M3
+
+[printer:*mm-single*]
+inherits = *multimaterial*
+end_gcode = G1 E-4 F2100.00000\nG91\nG1 Z1 F7200.000\nG90\nG1 X245 Y1\nG1 X240 E4\nG1 F4000\nG1 X190 E2.7 \nG1 F4600\nG1 X110 E2.8\nG1 F5200\nG1 X40 E3 \nG1 E-15.0000 F5000\nG1 E-50.0000 F5400\nG1 E-15.0000 F3000\nG1 E-12.0000 F2000\nG1 F1600\nG1 X0 Y1 E3.0000\nG1 X50 Y1 E-5.0000\nG1 F2000\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-3.0000\nG4 S0\nM107 ; fan off\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nG28 X0 ; home X axis\nM84 ; disable motors\n\n
+printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK2\nPRINTER_HAS_BOWDEN
+start_gcode = M115 U3.1.0 ; tell printer latest fw version\nM201 X9000 Y9000 Z500 E10000 ; sets maximum accelerations, mm/sec^2\nM203 X500 Y500 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1500 T1500 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.2 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\n; Start G-Code sequence START\nT?\nM104 S[first_layer_temperature]\nM140 S[first_layer_bed_temperature]\nM109 S[first_layer_temperature]\nM190 S[first_layer_bed_temperature]\nG21 ; set units to millimeters\nG90 ; use absolute coordinates\nM83 ; use relative distances for extrusion\nG28 W\nG80\nG92 E0.0\nM203 E100\nM92 E140\nG1 Z0.250 F7200.000\nG1 X50.0 E80.0 F1000.0\nG1 X160.0 E20.0 F1000.0\nG1 Z0.200 F7200.000\nG1 X220.0 E13 F1000.0\nG1 X240.0 E0 F1000.0\nG1 E-4 F1000.0\nG92 E0.0
+
+[printer:*mm-multi*]
+inherits = *multimaterial*
+end_gcode = {if not has_wipe_tower}\n; Pull the filament into the cooling tubes.\nG1 E-4 F2100.00000\nG91\nG1 Z1 F7200.000\nG90\nG1 X245 Y1\nG1 X240 E4\nG1 F4000\nG1 X190 E2.7 \nG1 F4600\nG1 X110 E2.8\nG1 F5200\nG1 X40 E3 \nG1 E-15.0000 F5000\nG1 E-50.0000 F5400\nG1 E-15.0000 F3000\nG1 E-12.0000 F2000\nG1 F1600\nG1 X0 Y1 E3.0000\nG1 X50 Y1 E-5.0000\nG1 F2000\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-3.0000\nG4 S0\n{endif}\nM107 ; fan off\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nG28 X0 ; home X axis\nM84 ; disable motors
+extruder_colour = #FFAA55;#5182DB;#4ECDD3;#FB7259
+nozzle_diameter = 0.4,0.4,0.4,0.4
+printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK2\nPRINTER_HAS_BOWDEN
+start_gcode = M115 U3.1.0 ; tell printer latest fw version\nM201 X9000 Y9000 Z500 E10000 ; sets maximum accelerations, mm/sec^2\nM203 X500 Y500 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1500 T1500 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.2 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\n; Start G-Code sequence START\nT[initial_tool]\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG21 ; set units to millimeters\nG90 ; use absolute coordinates\nM83 ; use relative distances for extrusion\nG28 W\nG80\nG92 E0.0\nM203 E100 ; set max feedrate\nM92 E140 ; E-steps per filament milimeter\n{if not has_wipe_tower}\nG1 Z0.250 F7200.000\nG1 X50.0 E80.0 F1000.0\nG1 X160.0 E20.0 F1000.0\nG1 Z0.200 F7200.000\nG1 X220.0 E13 F1000.0\nG1 X240.0 E0 F1000.0\nG1 E-4 F1000.0\n{endif}\nG92 E0.0
+variable_layer_height = 0
+
+[printer:Original Prusa i3 MK2]
+inherits = *common*
+
+[printer:Original Prusa i3 MK2 0.25 nozzle]
+inherits = *common*
+max_layer_height = 0.1
+min_layer_height = 0.05
+nozzle_diameter = 0.25
+retract_length = 1
+retract_speed = 50
+variable_layer_height = 0
+printer_variant = 0.25
+default_print_profile = 0.10mm DETAIL 0.25 nozzle
+
+[printer:Original Prusa i3 MK2 0.6 nozzle]
+inherits = *common*
+max_layer_height = 0.35
+min_layer_height = 0.1
+nozzle_diameter = 0.6
+printer_variant = 0.6
+
+[printer:Original Prusa i3 MK2 MM Single Mode]
+inherits = *mm-single*
+
+[printer:Original Prusa i3 MK2 MM Single Mode 0.6 nozzle]
+inherits = *mm-single*
+nozzle_diameter = 0.6
+printer_variant = 0.6
+
+[printer:Original Prusa i3 MK2 MultiMaterial]
+inherits = *mm-multi*
+nozzle_diameter = 0.4,0.4,0.4,0.4
+
+[printer:Original Prusa i3 MK2 MultiMaterial 0.6 nozzle]
+inherits = *mm-multi*
+nozzle_diameter = 0.6,0.6,0.6,0.6
+printer_variant = 0.6
+
+[printer:Original Prusa i3 MK3]
+inherits = *common*
+end_gcode = G4 ; wait\nM221 S100\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors
+printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK3\n
+retract_lift_below = 209
+start_gcode = M115 U3.1.1-RC5 ; tell printer latest fw version\nM201 X1000 Y1000 Z200 E5000 ; sets maximum accelerations, mm/sec^2\nM203 X200 Y200 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1250 T1250 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.4 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0\nM221 S{if layer_height==0.05}100{else}95{endif}
+printer_model = M1
+default_print_profile = 0.15mm OPTIMAL MK3
+
+[printer:Original Prusa i3 MK3 0.25 nozzle]
+inherits = *common*
+nozzle_diameter = 0.25
+printer_variant = 0.25
+end_gcode = G4 ; wait\nM221 S100\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors
+printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK3\n
+retract_lift_below = 209
+start_gcode = M115 U3.1.1-RC5 ; tell printer latest fw version\nM201 X1000 Y1000 Z200 E5000 ; sets maximum accelerations, mm/sec^2\nM203 X200 Y200 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1250 T1250 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.4 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0\nM221 S{if layer_height==0.05}100{else}95{endif}
+printer_model = M1
+default_print_profile = 0.10mm DETAIL MK3
+
+[printer:Original Prusa i3 MK3 0.6 nozzle]
+inherits = *common*
+nozzle_diameter = 0.6
+printer_variant = 0.6
+end_gcode = G4 ; wait\nM221 S100\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors
+printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK3\n
+retract_lift_below = 209
+start_gcode = M115 U3.1.1-RC5 ; tell printer latest fw version\nM201 X1000 Y1000 Z200 E5000 ; sets maximum accelerations, mm/sec^2\nM203 X200 Y200 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1250 T1250 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.4 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0\nM221 S{if layer_height==0.05}100{else}95{endif}
+printer_model = M1
+default_print_profile = 0.15mm OPTIMAL MK3
diff --git a/resources/profiles/PrusaResearch.idx b/resources/profiles/PrusaResearch.idx
new file mode 100644
index 000000000..3bc2aeffd
--- /dev/null
+++ b/resources/profiles/PrusaResearch.idx
@@ -0,0 +1,16 @@
+# This is an example configuration version index.
+# The index contains version numbers
+min_slic3r_version =1.39.0
+max_slic3r_version= 1.39.5
+1.1.1
+1.1.0
+0.2.0-alpha "some test comment"
+max_slic3r_version= 1.39.4
+0.1.0 another test comment
+
+# some empty lines
+
+# version without a comment
+min_slic3r_version = 1.0.0
+max_slic3r_version = 1.1.0
+0.0.1
diff --git a/resources/profiles/PrusaResearch.ini b/resources/profiles/PrusaResearch.ini
index de23bf0ad..0da7f22d1 100644
--- a/resources/profiles/PrusaResearch.ini
+++ b/resources/profiles/PrusaResearch.ini
@@ -5,23 +5,26 @@
name = Prusa Research
# Configuration version of this file. Config file will only be installed, if the config_version differs.
# This means, the server may force the Slic3r configuration to be downgraded.
-config_version = 0.1
+config_version = 0.1.0
# Where to get the updates from?
-config_update_url = https://raw.githubusercontent.com/prusa3d/Slic3r-settings/master/live/PrusaResearch.ini
+# TODO: proper URL
+config_update_url = https://raw.githubusercontent.com/vojtechkral/slic3r-settings-tmp/master/PrusaResearch
# The printer models will be shown by the Configuration Wizard in this order,
# also the first model installed & the first nozzle installed will be activated after install.
#TODO: One day we may differentiate variants of the nozzles / hot ends,
#for example by the melt zone size, or whether the nozzle is hardened.
[printer_model:MK3]
+name = Original Prusa i3 MK3
variants = 0.4; 0.25; 0.6
[printer_model:MK2S]
+name = Original Prusa i3 MK2S
variants = 0.4; 0.25; 0.6
[printer_model:MK2SMM]
# Printer model name will be shown by the installation wizard.
-name = MK2S Multi Material
+name = Original Prusa i3 MK2SMM
variants = 0.4; 0.6
# All presets starting with asterisk, for example *common*, are intermediate and they will
@@ -999,6 +1002,7 @@ default_print_profile = 0.15mm OPTIMAL MK3
[printer:Original Prusa i3 MK3 0.25 nozzle]
inherits = *common*
nozzle_diameter = 0.25
+printer_variant = 0.25
end_gcode = G4 ; wait\nM221 S100\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK3\n
retract_lift_below = 209
@@ -1009,14 +1013,10 @@ default_print_profile = 0.10mm DETAIL MK3
[printer:Original Prusa i3 MK3 0.6 nozzle]
inherits = *common*
nozzle_diameter = 0.6
+printer_variant = 0.6
end_gcode = G4 ; wait\nM221 S100\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors
printer_notes = Don't remove the following keywords! These keywords are used in the "compatible printer" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_MK3\n
retract_lift_below = 209
start_gcode = M115 U3.1.1-RC5 ; tell printer latest fw version\nM201 X1000 Y1000 Z200 E5000 ; sets maximum accelerations, mm/sec^2\nM203 X200 Y200 Z12 E120 ; sets maximum feedrates, mm/sec\nM204 S1250 T1250 ; sets acceleration (S) and retract acceleration (T)\nM205 X10 Y10 Z0.4 E2.5 ; sets the jerk limits, mm/sec\nM205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec\nM83 ; extruder relative mode\nM104 S[first_layer_temperature] ; set extruder temp\nM140 S[first_layer_bed_temperature] ; set bed temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nM109 S[first_layer_temperature] ; wait for extruder temp\nG28 W ; home all without mesh bed level\nG80 ; mesh bed leveling\nG1 Y-3.0 F1000.0 ; go outside print area\nG92 E0.0\nG1 X60.0 E9.0 F1000.0 ; intro line\nG1 X100.0 E12.5 F1000.0 ; intro line\nG92 E0.0\nM221 S{if layer_height==0.05}100{else}95{endif}
printer_model = MK3
default_print_profile = 0.15mm OPTIMAL MK3
-
-[presets]
-print = 0.15mm OPTIMAL MK3
-printer = Original Prusa i3 MK3
-filament = Prusa PLA
diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt
index abd9c3617..7798333fb 100644
--- a/xs/CMakeLists.txt
+++ b/xs/CMakeLists.txt
@@ -170,10 +170,14 @@ add_library(libslic3r STATIC
)
add_library(libslic3r_gui STATIC
+ ${LIBDIR}/slic3r/GUI/AboutDialog.cpp
+ ${LIBDIR}/slic3r/GUI/AboutDialog.hpp
${LIBDIR}/slic3r/GUI/AppConfig.cpp
${LIBDIR}/slic3r/GUI/AppConfig.hpp
${LIBDIR}/slic3r/GUI/BitmapCache.cpp
${LIBDIR}/slic3r/GUI/BitmapCache.hpp
+ ${LIBDIR}/slic3r/GUI/ConfigSnapshotDialog.cpp
+ ${LIBDIR}/slic3r/GUI/ConfigSnapshotDialog.hpp
${LIBDIR}/slic3r/GUI/3DScene.cpp
${LIBDIR}/slic3r/GUI/3DScene.hpp
${LIBDIR}/slic3r/GUI/GLShader.cpp
@@ -214,12 +218,18 @@ add_library(libslic3r_gui STATIC
${LIBDIR}/slic3r/Config/Version.hpp
${LIBDIR}/slic3r/Utils/ASCIIFolding.cpp
${LIBDIR}/slic3r/Utils/ASCIIFolding.hpp
+ ${LIBDIR}/slic3r/GUI/ConfigWizard.cpp
+ ${LIBDIR}/slic3r/GUI/ConfigWizard.hpp
${LIBDIR}/slic3r/Utils/Http.cpp
${LIBDIR}/slic3r/Utils/Http.hpp
${LIBDIR}/slic3r/Utils/OctoPrint.cpp
${LIBDIR}/slic3r/Utils/OctoPrint.hpp
${LIBDIR}/slic3r/Utils/Bonjour.cpp
${LIBDIR}/slic3r/Utils/Bonjour.hpp
+ ${LIBDIR}/slic3r/Utils/PresetUpdater.cpp
+ ${LIBDIR}/slic3r/Utils/PresetUpdater.hpp
+ ${LIBDIR}/slic3r/Utils/Time.cpp
+ ${LIBDIR}/slic3r/Utils/Time.hpp
)
add_library(admesh STATIC
@@ -365,6 +375,7 @@ set(XS_XSP_FILES
${XSP_DIR}/SurfaceCollection.xsp
${XSP_DIR}/TriangleMesh.xsp
${XSP_DIR}/Utils_OctoPrint.xsp
+ ${XSP_DIR}/Utils_PresetUpdater.xsp
${XSP_DIR}/XS.xsp
)
foreach (file ${XS_XSP_FILES})
@@ -410,7 +421,7 @@ if(APPLE)
# Ignore undefined symbols of the perl interpreter, they will be found in the caller image.
target_link_libraries(XS "-undefined dynamic_lookup")
endif()
-target_link_libraries(XS libslic3r libslic3r_gui admesh miniz clipper nowide polypartition poly2tri)
+target_link_libraries(XS libslic3r libslic3r_gui admesh miniz clipper nowide polypartition poly2tri semver)
if(SLIC3R_PROFILE)
target_link_libraries(XS Shiny)
endif()
@@ -537,13 +548,13 @@ if (SLIC3R_PRUSACONTROL)
set(wxWidgets_UseAlienWx 1)
if (wxWidgets_UseAlienWx)
set(AlienWx_DEBUG 1)
- find_package(AlienWx REQUIRED COMPONENTS base core adv)
+ find_package(AlienWx REQUIRED COMPONENTS base core adv html)
include_directories(${AlienWx_INCLUDE_DIRS})
#add_compile_options(${AlienWx_CXX_FLAGS})
add_definitions(${AlienWx_DEFINITIONS})
set(wxWidgets_LIBRARIES ${AlienWx_LIBRARIES})
else ()
- find_package(wxWidgets REQUIRED COMPONENTS base core adv)
+ find_package(wxWidgets REQUIRED COMPONENTS base core adv html)
include(${wxWidgets_USE_FILE})
endif ()
add_definitions(-DSLIC3R_GUI -DSLIC3R_PRUS)
diff --git a/xs/lib/Slic3r/XS.pm b/xs/lib/Slic3r/XS.pm
index 47a584343..06eb041df 100644
--- a/xs/lib/Slic3r/XS.pm
+++ b/xs/lib/Slic3r/XS.pm
@@ -12,7 +12,7 @@ our $VERSION = '0.01';
BEGIN {
if ($^O eq 'MSWin32') {
eval "use Wx";
-# eval "use Wx::Html";
+ eval "use Wx::Html";
eval "use Wx::Print"; # because of some Wx bug, thread creation fails if we don't have this (looks like Wx::Printout is hard-coded in some thread cleanup code)
}
}
diff --git a/xs/src/libslic3r/Config.hpp b/xs/src/libslic3r/Config.hpp
index 6eb307c5c..06db9efef 100644
--- a/xs/src/libslic3r/Config.hpp
+++ b/xs/src/libslic3r/Config.hpp
@@ -659,6 +659,7 @@ public:
ConfigOptionPoints() : ConfigOptionVector() {}
explicit ConfigOptionPoints(size_t n, const Pointf &value) : ConfigOptionVector(n, value) {}
explicit ConfigOptionPoints(std::initializer_list il) : ConfigOptionVector(std::move(il)) {}
+ explicit ConfigOptionPoints(const std::vector &values) : ConfigOptionVector(values) {}
static ConfigOptionType static_type() { return coPoints; }
ConfigOptionType type() const override { return static_type(); }
diff --git a/xs/src/libslic3r/FileParserError.hpp b/xs/src/libslic3r/FileParserError.hpp
index 82a6b328e..3f560fa4f 100644
--- a/xs/src/libslic3r/FileParserError.hpp
+++ b/xs/src/libslic3r/FileParserError.hpp
@@ -4,6 +4,7 @@
#include "libslic3r.h"
#include
+#include
#include
namespace Slic3r {
@@ -15,6 +16,9 @@ public:
file_parser_error(const std::string &msg, const std::string &file, unsigned long line = 0) :
std::runtime_error(format_what(msg, file, line)),
m_message(msg), m_filename(file), m_line(line) {}
+ file_parser_error(const std::string &msg, const boost::filesystem::path &file, unsigned long line = 0) :
+ std::runtime_error(format_what(msg, file.string(), line)),
+ m_message(msg), m_filename(file.string()), m_line(line) {}
// gcc 3.4.2 complains about lack of throw specifier on compiler
// generated dtor
~file_parser_error() throw() {}
diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp
index dcece7a9b..c19c97fae 100644
--- a/xs/src/libslic3r/Print.cpp
+++ b/xs/src/libslic3r/Print.cpp
@@ -598,6 +598,12 @@ std::string Print::validate() const
if (! this->config.use_relative_e_distances)
return "The Wipe Tower is currently only supported with the relative extruder addressing (use_relative_e_distances=1).";
SlicingParameters slicing_params0 = this->objects.front()->slicing_parameters();
+
+ const PrintObject* most_layered_object = this->objects.front(); // object with highest layer_height_profile.size() encountered so far
+ for (const auto* object : objects)
+ if (object->layer_height_profile.size() > most_layered_object->layer_height_profile.size())
+ most_layered_object = object;
+
for (PrintObject *object : this->objects) {
SlicingParameters slicing_params = object->slicing_parameters();
if (std::abs(slicing_params.first_print_layer_height - slicing_params0.first_print_layer_height) > EPSILON ||
@@ -614,12 +620,15 @@ std::string Print::validate() const
object->layer_height_profile_valid = was_layer_height_profile_valid;
if ( this->config.variable_layer_height ) {
- PrintObject* first_object = this->objects.front();
int i = 0;
- while ( i < first_object->layer_height_profile.size() && i < object->layer_height_profile.size() ) {
- if (std::abs(first_object->layer_height_profile[i] - object->layer_height_profile[i]) > EPSILON )
+ while ( i < object->layer_height_profile.size() ) {
+ if (std::abs(most_layered_object->layer_height_profile[i] - object->layer_height_profile[i]) > EPSILON)
return "The Wipe tower is only supported if all objects have the same layer height profile";
++i;
+ if (i == object->layer_height_profile.size()-2) // this element contains the objects max z, if the other object is taller,
+ // it does not have to match - we will step over it
+ if (most_layered_object->layer_height_profile[i] > object->layer_height_profile[i])
+ ++i;
}
}
diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp
index 1e7e0bacc..a851a078a 100644
--- a/xs/src/libslic3r/PrintConfig.cpp
+++ b/xs/src/libslic3r/PrintConfig.cpp
@@ -1688,7 +1688,7 @@ PrintConfigDef::PrintConfigDef()
"temperature control commands in the output.");
def->cli = "temperature=i@";
def->full_label = L("Temperature");
- def->max = 0;
+ def->min = 0;
def->max = max_temp;
def->default_value = new ConfigOptionInts { 200 };
diff --git a/xs/src/libslic3r/Utils.hpp b/xs/src/libslic3r/Utils.hpp
index 5727d6c89..f900137d3 100644
--- a/xs/src/libslic3r/Utils.hpp
+++ b/xs/src/libslic3r/Utils.hpp
@@ -3,6 +3,8 @@
#include
+#include "libslic3r.h"
+
namespace Slic3r {
extern void set_logging_level(unsigned int level);
diff --git a/xs/src/libslic3r/libslic3r.h b/xs/src/libslic3r/libslic3r.h
index 0f192c37c..4aef4d5c1 100644
--- a/xs/src/libslic3r/libslic3r.h
+++ b/xs/src/libslic3r/libslic3r.h
@@ -14,7 +14,7 @@
#include
#define SLIC3R_FORK_NAME "Slic3r Prusa Edition"
-#define SLIC3R_VERSION "1.39.0"
+#define SLIC3R_VERSION "1.40.0"
#define SLIC3R_BUILD "UNKNOWN"
typedef int32_t coord_t;
diff --git a/xs/src/perlglue.cpp b/xs/src/perlglue.cpp
index d7c9a590a..205eec218 100644
--- a/xs/src/perlglue.cpp
+++ b/xs/src/perlglue.cpp
@@ -62,8 +62,8 @@ REGISTER_CLASS(GLVolumeCollection, "GUI::_3DScene::GLVolume::Collection");
REGISTER_CLASS(Preset, "GUI::Preset");
REGISTER_CLASS(PresetCollection, "GUI::PresetCollection");
REGISTER_CLASS(PresetBundle, "GUI::PresetBundle");
-REGISTER_CLASS(PresetHints, "GUI::PresetHints");
REGISTER_CLASS(TabIface, "GUI::Tab");
+REGISTER_CLASS(PresetUpdater, "PresetUpdater");
REGISTER_CLASS(OctoPrint, "OctoPrint");
SV* ConfigBase__as_hash(ConfigBase* THIS)
diff --git a/xs/src/semver/semver.c b/xs/src/semver/semver.c
index 29bc1868d..a19354403 100644
--- a/xs/src/semver/semver.c
+++ b/xs/src/semver/semver.c
@@ -175,6 +175,9 @@ semver_parse_version (const char *str, semver_t *ver) {
slice = (char *) str;
index = 0;
+ // non mandatory
+ ver->patch = 0;
+
while (slice != NULL && index++ < 4) {
next = strchr(slice, DELIMITER[0]);
if (next == NULL)
@@ -200,7 +203,8 @@ semver_parse_version (const char *str, semver_t *ver) {
slice = next + 1;
}
- return 0;
+ // Major and minor versions are mandatory, patch version is not mandatory.
+ return (index == 2 || index == 3) ? 0 : -1;
}
static int
@@ -615,3 +619,22 @@ semver_numeric (semver_t *x) {
return num;
}
+
+static char *semver_strdup(const char *src) {
+ if (src == NULL) return NULL;
+ size_t len = strlen(src) + 1;
+ char *res = malloc(len);
+ return res != NULL ? (char *) memcpy(res, src, len) : NULL;
+}
+
+semver_t
+semver_copy(const semver_t *ver) {
+ semver_t res = *ver;
+ if (ver->metadata != NULL) {
+ res.metadata = strdup(ver->metadata);
+ }
+ if (ver->prerelease != NULL) {
+ res.prerelease = strdup(ver->prerelease);
+ }
+ return res;
+}
diff --git a/xs/src/semver/semver.h b/xs/src/semver/semver.h
index 1b48670ca..7251f51e3 100644
--- a/xs/src/semver/semver.h
+++ b/xs/src/semver/semver.h
@@ -98,6 +98,9 @@ semver_is_valid (const char *s);
int
semver_clean (char *s);
+semver_t
+semver_copy(const semver_t *ver);
+
#ifdef __cplusplus
}
#endif
diff --git a/xs/src/slic3r/Config/Snapshot.cpp b/xs/src/slic3r/Config/Snapshot.cpp
index 559e4c63c..c82169308 100644
--- a/xs/src/slic3r/Config/Snapshot.cpp
+++ b/xs/src/slic3r/Config/Snapshot.cpp
@@ -1,5 +1,6 @@
#include "Snapshot.hpp"
#include "../GUI/AppConfig.hpp"
+#include "../GUI/PresetBundle.hpp"
#include "../Utils/Time.hpp"
#include
@@ -56,6 +57,7 @@ void Snapshot::load_ini(const std::string &path)
// Parse snapshot.ini
std::string group_name_vendor = "Vendor:";
std::string key_filament = "filament";
+ std::string key_prefix_model = "model_";
for (auto §ion : tree) {
if (section.first == "snapshot") {
// Parse the common section.
@@ -106,10 +108,7 @@ void Snapshot::load_ini(const std::string &path)
VendorConfig vc;
vc.name = section.first.substr(group_name_vendor.size());
for (auto &kvp : section.second) {
- if (boost::starts_with(kvp.first, "model_")) {
- //model:MK2S = 0.4;xxx
- //model:MK3 = 0.4;xxx
- } else if (kvp.first == "version" || kvp.first == "min_slic3r_version" || kvp.first == "max_slic3r_version") {
+ if (kvp.first == "version" || kvp.first == "min_slic3r_version" || kvp.first == "max_slic3r_version") {
// Version of the vendor specific config bundle bundled with this snapshot.
auto semver = Semver::parse(kvp.second.data());
if (! semver)
@@ -120,12 +119,35 @@ void Snapshot::load_ini(const std::string &path)
vc.min_slic3r_version = *semver;
else
vc.max_slic3r_version = *semver;
- }
+ } else if (boost::starts_with(kvp.first, key_prefix_model) && kvp.first.size() > key_prefix_model.size()) {
+ // Parse the printer variants installed for the current model.
+ auto &set_variants = vc.models_variants_installed[kvp.first.substr(key_prefix_model.size())];
+ std::vector variants;
+ if (unescape_strings_cstyle(kvp.second.data(), variants))
+ for (auto &variant : variants)
+ set_variants.insert(std::move(variant));
+ }
}
+ this->vendor_configs.emplace_back(std::move(vc));
}
}
}
+static std::string reason_string(const Snapshot::Reason reason)
+{
+ switch (reason) {
+ case Snapshot::SNAPSHOT_UPGRADE:
+ return "upgrade";
+ case Snapshot::SNAPSHOT_DOWNGRADE:
+ return "downgrade";
+ case Snapshot::SNAPSHOT_USER:
+ return "user";
+ case Snapshot::SNAPSHOT_UNKNOWN:
+ default:
+ return "unknown";
+ }
+}
+
void Snapshot::save_ini(const std::string &path)
{
boost::nowide::ofstream c;
@@ -138,7 +160,7 @@ void Snapshot::save_ini(const std::string &path)
c << "time_captured = " << Slic3r::Utils::format_time_ISO8601Z(this->time_captured) << std::endl;
c << "slic3r_version_captured = " << this->slic3r_version_captured.to_string() << std::endl;
c << "comment = " << this->comment << std::endl;
- c << "reason = " << this->reason << std::endl;
+ c << "reason = " << reason_string(this->reason) << std::endl;
// Export the active presets at the time of the snapshot.
c << std::endl << "[presets]" << std::endl;
@@ -154,6 +176,14 @@ void Snapshot::save_ini(const std::string &path)
c << "version = " << vc.version.to_string() << std::endl;
c << "min_slic3r_version = " << vc.min_slic3r_version.to_string() << std::endl;
c << "max_slic3r_version = " << vc.max_slic3r_version.to_string() << std::endl;
+ // Export installed printer models and their variants.
+ for (const auto &model : vc.models_variants_installed) {
+ if (model.second.size() == 0)
+ continue;
+ const std::vector variants(model.second.begin(), model.second.end());
+ const auto escaped = escape_strings_cstyle(variants);
+ c << "model_" << model.first << " = " << escaped << std::endl;
+ }
}
c.close();
}
@@ -172,6 +202,14 @@ void Snapshot::export_selections(AppConfig &config) const
config.set("presets", "printer", printer);
}
+void Snapshot::export_vendor_configs(AppConfig &config) const
+{
+ std::map>> vendors;
+ for (const VendorConfig &vc : vendor_configs)
+ vendors[vc.name] = vc.models_variants_installed;
+ config.set_vendors(std::move(vendors));
+}
+
size_t SnapshotDB::load_db()
{
boost::filesystem::path snapshots_dir = SnapshotDB::create_db_dir();
@@ -199,12 +237,29 @@ size_t SnapshotDB::load_db()
}
m_snapshots.emplace_back(std::move(snapshot));
}
-
+ // Sort the snapshots by their date/time.
+ std::sort(m_snapshots.begin(), m_snapshots.end(), [](const Snapshot &s1, const Snapshot &s2) { return s1.time_captured < s2.time_captured; });
if (! errors_cummulative.empty())
throw std::runtime_error(errors_cummulative);
return m_snapshots.size();
}
+void SnapshotDB::update_slic3r_versions(std::vector &index_db)
+{
+ for (Snapshot &snapshot : m_snapshots) {
+ for (Snapshot::VendorConfig &vendor_config : snapshot.vendor_configs) {
+ auto it = std::find_if(index_db.begin(), index_db.end(), [&vendor_config](const Index &idx) { return idx.vendor() == vendor_config.name; });
+ if (it != index_db.end()) {
+ Index::const_iterator it_version = it->find(vendor_config.version);
+ if (it_version != it->end()) {
+ vendor_config.min_slic3r_version = it_version->min_slic3r_version;
+ vendor_config.max_slic3r_version = it_version->max_slic3r_version;
+ }
+ }
+ }
+ }
+}
+
static void copy_config_dir_single_level(const boost::filesystem::path &path_src, const boost::filesystem::path &path_dst)
{
if (! boost::filesystem::is_directory(path_dst) &&
@@ -225,7 +280,7 @@ static void delete_existing_ini_files(const boost::filesystem::path &path)
boost::filesystem::remove(dir_entry.path());
}
-const Snapshot& SnapshotDB::make_snapshot(const AppConfig &app_config, Snapshot::Reason reason, const std::string &comment)
+const Snapshot& SnapshotDB::take_snapshot(const AppConfig &app_config, Snapshot::Reason reason, const std::string &comment)
{
boost::filesystem::path data_dir = boost::filesystem::path(Slic3r::data_dir());
boost::filesystem::path snapshot_db_dir = SnapshotDB::create_db_dir();
@@ -235,7 +290,7 @@ const Snapshot& SnapshotDB::make_snapshot(const AppConfig &app_config, Snapshot:
// Snapshot header.
snapshot.time_captured = Slic3r::Utils::get_current_time_utc();
snapshot.id = Slic3r::Utils::format_time_ISO8601Z(snapshot.time_captured);
- snapshot.slic3r_version_captured = *Semver::parse(SLIC3R_VERSION);
+ snapshot.slic3r_version_captured = *Semver::parse(SLIC3R_VERSION); // XXX: have Semver Slic3r version
snapshot.comment = comment;
snapshot.reason = reason;
// Active presets at the time of the snapshot.
@@ -250,12 +305,44 @@ const Snapshot& SnapshotDB::make_snapshot(const AppConfig &app_config, Snapshot:
snapshot.filaments.emplace_back(app_config.get("presets", name));
}
// Vendor specific config bundles and installed printers.
+ for (const std::pair>> &vendor : app_config.vendors()) {
+ Snapshot::VendorConfig cfg;
+ cfg.name = vendor.first;
+ cfg.models_variants_installed = vendor.second;
+ for (auto it = cfg.models_variants_installed.begin(); it != cfg.models_variants_installed.end();)
+ if (it->second.empty())
+ cfg.models_variants_installed.erase(it ++);
+ else
+ ++ it;
+ // Read the active config bundle, parse the config version.
+ PresetBundle bundle;
+ bundle.load_configbundle((data_dir / "vendor" / (cfg.name + ".ini")).string(), PresetBundle::LOAD_CFGBUNDLE_VENDOR_ONLY);
+ for (const VendorProfile &vp : bundle.vendors)
+ if (vp.id == cfg.name)
+ cfg.version = vp.config_version;
+ // Fill-in the min/max slic3r version from the config index, if possible.
+ try {
+ // Load the config index for the vendor.
+ Index index;
+ index.load(data_dir / "vendor" / (cfg.name + ".idx"));
+ auto it = index.find(cfg.version);
+ if (it != index.end()) {
+ cfg.min_slic3r_version = it->min_slic3r_version;
+ cfg.max_slic3r_version = it->max_slic3r_version;
+ }
+ } catch (const std::runtime_error &err) {
+ }
+ snapshot.vendor_configs.emplace_back(std::move(cfg));
+ }
+
+ boost::filesystem::path snapshot_dir = snapshot_db_dir / snapshot.id;
+ boost::filesystem::create_directory(snapshot_dir);
// Backup the presets.
- boost::filesystem::path snapshot_dir = snapshot_db_dir / snapshot.id;
for (const char *subdir : { "print", "filament", "printer", "vendor" })
copy_config_dir_single_level(data_dir / subdir, snapshot_dir / subdir);
snapshot.save_ini((snapshot_dir / "snapshot.ini").string());
+ assert(m_snapshots.empty() || m_snapshots.back().time_captured <= snapshot.time_captured);
m_snapshots.emplace_back(std::move(snapshot));
return m_snapshots.back();
}
@@ -275,18 +362,15 @@ void SnapshotDB::restore_snapshot(const Snapshot &snapshot, AppConfig &app_confi
boost::filesystem::path data_dir = boost::filesystem::path(Slic3r::data_dir());
boost::filesystem::path snapshot_db_dir = SnapshotDB::create_db_dir();
boost::filesystem::path snapshot_dir = snapshot_db_dir / snapshot.id;
-
// Remove existing ini files and restore the ini files from the snapshot.
for (const char *subdir : { "print", "filament", "printer", "vendor" }) {
delete_existing_ini_files(data_dir / subdir);
copy_config_dir_single_level(snapshot_dir / subdir, data_dir / subdir);
}
-
- // Update app_config from the snapshot.
+ // Update AppConfig with the selections of the print / filament / printer profiles
+ // and about the installed printer types and variants.
snapshot.export_selections(app_config);
-
- // Store information about the snapshot.
-
+ snapshot.export_vendor_configs(app_config);
}
boost::filesystem::path SnapshotDB::create_db_dir()
@@ -303,6 +387,26 @@ boost::filesystem::path SnapshotDB::create_db_dir()
return snapshots_dir;
}
+SnapshotDB& SnapshotDB::singleton()
+{
+ static SnapshotDB instance;
+ static bool loaded = false;
+ if (! loaded) {
+ try {
+ loaded = true;
+ // Load the snapshot database.
+ instance.load_db();
+ // Load the vendor specific configuration indices.
+ std::vector index_db = Index::load_db();
+ // Update the min / max slic3r versions compatible with the configurations stored inside the snapshots
+ // based on the min / max slic3r versions defined by the vendor specific config indices.
+ instance.update_slic3r_versions(index_db);
+ } catch (std::exception &ex) {
+ }
+ }
+ return instance;
+}
+
} // namespace Config
} // namespace GUI
} // namespace Slic3r
diff --git a/xs/src/slic3r/Config/Snapshot.hpp b/xs/src/slic3r/Config/Snapshot.hpp
index 358797bf7..a7e70bb4b 100644
--- a/xs/src/slic3r/Config/Snapshot.hpp
+++ b/xs/src/slic3r/Config/Snapshot.hpp
@@ -1,11 +1,14 @@
#ifndef slic3r_GUI_Snapshot_
#define slic3r_GUI_Snapshot_
+#include