mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 11:17:51 -06:00
Merge branch 'master' into xsdata
Conflicts: lib/Slic3r/GCode.pm xs/src/Point.hpp
This commit is contained in:
commit
31809d473f
14 changed files with 127 additions and 16 deletions
|
@ -317,6 +317,7 @@ sub load_file {
|
|||
input_file => $input_file,
|
||||
input_file_object_id => $i,
|
||||
model_object => $model->objects->[$i],
|
||||
mesh_stats => $model->objects->[$i]->mesh_stats, # so that we can free model_object
|
||||
instances => [
|
||||
$model->objects->[$i]->instances
|
||||
? (map $_->offset, @{$model->objects->[$i]->instances})
|
||||
|
@ -1070,6 +1071,7 @@ sub OnDropFiles {
|
|||
package Slic3r::GUI::Plater::Object;
|
||||
use Moo;
|
||||
|
||||
use List::Util qw(first);
|
||||
use Math::ConvexHull::MonotoneChain qw();
|
||||
use Slic3r::Geometry qw(X Y Z MIN MAX deg2rad);
|
||||
|
||||
|
@ -1086,6 +1088,7 @@ has 'thumbnail' => (is => 'rw', trigger => \&_transform_thumbnail);
|
|||
has 'transformed_thumbnail' => (is => 'rw');
|
||||
has 'thumbnail_scaling_factor' => (is => 'rw', trigger => \&_transform_thumbnail);
|
||||
has 'layer_height_ranges' => (is => 'rw', default => sub { [] }); # [ z_min, z_max, layer_height ]
|
||||
has 'mesh_stats' => (is => 'rw');
|
||||
|
||||
# statistics
|
||||
has 'facets' => (is => 'rw');
|
||||
|
@ -1111,7 +1114,18 @@ sub _trigger_model_object {
|
|||
sub check_manifoldness {
|
||||
my $self = shift;
|
||||
|
||||
$self->is_manifold($self->get_model_object->check_manifoldness);
|
||||
if ($self->mesh_stats) {
|
||||
if (first { $self->mesh_stats->{$_} > 0 } qw(degenerate_facets edges_fixed facets_removed facets_added facets_reversed backwards_edges)) {
|
||||
warn "Warning: the input file contains manifoldness errors. "
|
||||
. "Slic3r repaired it successfully by guessing what the correct shape should be, "
|
||||
. "but you might still want to inspect the G-code before printing.\n";
|
||||
$self->is_manifold(0);
|
||||
} else {
|
||||
$self->is_manifold(1);
|
||||
}
|
||||
} else {
|
||||
$self->is_manifold($self->get_model_object->check_manifoldness);
|
||||
}
|
||||
return $self->is_manifold;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue