AppController reachable trough Plater.pm
This commit is contained in:
parent
85474e5803
commit
d3b19382fe
@ -75,6 +75,8 @@ sub new {
|
||||
$appController->set_model($self->{plater}->{model});
|
||||
$appController->set_print($self->{plater}->{print});
|
||||
|
||||
$self->{plater}->{appController} = $appController;
|
||||
|
||||
$self->{loaded} = 1;
|
||||
|
||||
# initialize layout
|
||||
|
@ -45,6 +45,7 @@ use constant FILAMENT_CHOOSERS_SPACING => 0;
|
||||
use constant PROCESS_DELAY => 0.5 * 1000; # milliseconds
|
||||
|
||||
my $PreventListEvents = 0;
|
||||
our $appController;
|
||||
|
||||
sub new {
|
||||
my ($class, $parent) = @_;
|
||||
@ -1188,8 +1189,11 @@ sub arrange {
|
||||
|
||||
$self->pause_background_process;
|
||||
|
||||
my $bb = Slic3r::Geometry::BoundingBoxf->new_from_points($self->{config}->bed_shape);
|
||||
my $success = $self->{model}->arrange_objects(wxTheApp->{preset_bundle}->full_config->min_object_distance, $bb);
|
||||
# my $bb = Slic3r::Geometry::BoundingBoxf->new_from_points($self->{config}->bed_shape);
|
||||
# my $success = $self->{model}->arrange_objects(wxTheApp->{preset_bundle}->full_config->min_object_distance, $bb);
|
||||
|
||||
$self->{appController}->arrange_model;
|
||||
|
||||
# ignore arrange failures on purpose: user has visual feedback and we don't need to warn him
|
||||
# when parts don't fit in print bed
|
||||
|
||||
|
@ -409,6 +409,7 @@ set(XS_XSP_FILES
|
||||
${XSP_DIR}/TriangleMesh.xsp
|
||||
${XSP_DIR}/Utils_OctoPrint.xsp
|
||||
${XSP_DIR}/Utils_PresetUpdater.xsp
|
||||
${XSP_DIR}/AppController.xsp
|
||||
${XSP_DIR}/XS.xsp
|
||||
)
|
||||
foreach (file ${XS_XSP_FILES})
|
||||
|
@ -296,14 +296,17 @@ void IProgressIndicator::message_fmt(
|
||||
void AppController::arrange_model()
|
||||
{
|
||||
std::async(supports_asynch()? std::launch::async : std::launch::deferred,
|
||||
[this](){
|
||||
auto pind = progress_indicator();
|
||||
[this]()
|
||||
{
|
||||
// auto pind = progress_indicator();
|
||||
|
||||
// my $bb = Slic3r::Geometry::BoundingBoxf->new_from_points($self->{config}->bed_shape);
|
||||
// my $success = $self->{model}->arrange_objects(wxTheApp->{preset_bundle}->full_config->min_object_distance, $bb);
|
||||
double dist = GUI::get_preset_bundle()->full_config().option("min_object_distance")->getFloat();
|
||||
// double dist = GUI::get_preset_bundle()->full_config().option("min_object_distance")->getFloat();
|
||||
|
||||
std::cout << dist << std::endl;
|
||||
// std::cout << dist << std::endl;
|
||||
|
||||
std::cout << "ITTT vagyok" << std::endl;
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user