mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 09:25:54 +08:00
Make SLAPrintOptions available to Projector through MainFrame.
This commit is contained in:
parent
eb2a1a6dce
commit
245aac1172
@ -294,6 +294,7 @@ sub _init_menubar {
|
||||
}, undef, 'printer_empty.png');
|
||||
wxTheApp->append_menu_item($windowMenu, "DLP Projector…\tCtrl+P", 'Open projector window for DLP printing', sub {
|
||||
$self->{plater}->pause_background_process;
|
||||
$self->{slaconfig} = Slic3r::Config->new;
|
||||
Slic3r::GUI::SLAPrintOptions->new($self)->ShowModal;
|
||||
$self->{plater}->resume_background_process;
|
||||
}, undef, 'film.png');
|
||||
|
@ -50,7 +50,7 @@ sub new {
|
||||
$self->config(Slic3r::Config->new_from_defaults(
|
||||
qw(serial_port serial_speed bed_shape start_gcode end_gcode z_offset)
|
||||
));
|
||||
$self->config->apply(wxTheApp->{mainframe}->{plater}->config);
|
||||
$self->config->apply(wxTheApp->{mainframe}->{slaconfig});
|
||||
|
||||
my @optgroups = ();
|
||||
{
|
||||
@ -559,6 +559,7 @@ sub BUILD {
|
||||
{
|
||||
my $print = Slic3r::SLAPrint->new(wxTheApp->{mainframe}->{plater}->{model});
|
||||
$print->apply_config(wxTheApp->{mainframe}->{plater}->config);
|
||||
$print->apply_config(wxTheApp->{mainframe}->{slaconfig});
|
||||
$self->_print($print);
|
||||
$self->screen->print($print);
|
||||
|
||||
|
@ -107,6 +107,7 @@ sub _accept {
|
||||
return;
|
||||
}
|
||||
|
||||
wxTheApp->{mainframe}->{slaconfig}->apply_static($self->config);
|
||||
$self->EndModal(wxID_OK);
|
||||
$self->Close; # needed on Linux
|
||||
|
||||
|
@ -54,14 +54,13 @@ SLAPrint::slice()
|
||||
for (size_t i = 0; i < slices.size(); ++i)
|
||||
this->layers[i].slices.expolygons = slices[i];
|
||||
}
|
||||
this->config.get_abs_value("infill_extrusion_width", this->config.layer_height.value);
|
||||
|
||||
// generate infill
|
||||
if (this->config.fill_density < 100) {
|
||||
std::unique_ptr<Fill> fill(Fill::new_from_type(this->config.fill_pattern.value));
|
||||
fill->bounding_box.merge(Point::new_scale(bb.min.x, bb.min.y));
|
||||
fill->bounding_box.merge(Point::new_scale(bb.max.x, bb.max.y));
|
||||
fill->min_spacing = ( this->config.get_abs_value("infill_extrusion_width", this->config.layer_height.value) > 0 ? this->config.get_abs_value("infill_extrusion_width", this->config.layer_height.value) : 0.3);
|
||||
fill->min_spacing = this->config.get_abs_value("infill_extrusion_width", this->config.layer_height.value);
|
||||
fill->angle = Geometry::deg2rad(this->config.fill_angle.value);
|
||||
fill->density = this->config.fill_density.value/100;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user