Making some meaningful progress feedback.
This commit is contained in:
parent
5fe83110cb
commit
fcef1b107e
4 changed files with 32 additions and 7 deletions
|
@ -476,7 +476,7 @@ sub quick_slice {
|
|||
|
||||
# show processbar dialog
|
||||
$progress_dialog = Wx::ProgressDialog->new(L('Slicing…'), L("Processing ").$input_file_basename."…",
|
||||
100, $self, 0);
|
||||
100, $self, 4);
|
||||
$progress_dialog->Pulse;
|
||||
|
||||
{
|
||||
|
|
|
@ -113,10 +113,18 @@ sub export_png {
|
|||
my $self = shift;
|
||||
my %params = @_;
|
||||
|
||||
$_->slice for @{$self->objects};
|
||||
my @sobjects = @{$self->objects};
|
||||
my $objnum = scalar @sobjects;
|
||||
for(my $oi = 0; $oi < $objnum; $oi++)
|
||||
{
|
||||
$sobjects[$oi]->slice;
|
||||
$self->status_cb->(($oi + 1)*100/$objnum - 1, "Slicing...");
|
||||
}
|
||||
|
||||
my $fh = $params{output_file};
|
||||
$self->status_cb->(90, "Exporting zipped archive...");
|
||||
$self->print_to_png($fh);
|
||||
$self->status_cb->(100, "Done.");
|
||||
}
|
||||
|
||||
# Export SVG slices for the offline SLA printing.
|
||||
|
@ -125,7 +133,13 @@ sub export_svg {
|
|||
my $self = shift;
|
||||
my %params = @_;
|
||||
|
||||
$_->slice for @{$self->objects};
|
||||
my @sobjects = @{$self->objects};
|
||||
my $objnum = scalar @sobjects;
|
||||
for(my $oi = 0; $oi < $objnum; $oi++)
|
||||
{
|
||||
$sobjects[$oi]->slice;
|
||||
$self->status_cb->(($oi + 1)*100/$objnum - 1, "Slicing...");
|
||||
}
|
||||
|
||||
my $fh = $params{output_fh};
|
||||
if (!$fh) {
|
||||
|
|
|
@ -35,7 +35,7 @@ sub slice {
|
|||
|
||||
return if $self->step_done(STEP_SLICE);
|
||||
$self->set_step_started(STEP_SLICE);
|
||||
$self->print->status_cb->(10, "Processing triangulated mesh");
|
||||
# $self->print->status_cb->(10, "Processing triangulated mesh");
|
||||
|
||||
$self->_slice;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue