mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-08 14:34:04 -06:00
Refactored Model.cpp/hpp to C++x11 loops, simplified the mesh / bbox handling.
This commit is contained in:
parent
21ddcb8487
commit
5cae4cc614
13 changed files with 314 additions and 500 deletions
|
@ -28,9 +28,6 @@ my %opt = ();
|
|||
|
||||
{
|
||||
my $model = Slic3r::Model->read_from_file($ARGV[0]);
|
||||
|
||||
# make sure all objects have at least one defined instance
|
||||
$model->add_default_instances;
|
||||
$_->center_around_origin for @{$model->objects}; # and align to Z = 0
|
||||
|
||||
my $app = Slic3r::ViewMesh->new;
|
||||
|
|
|
@ -38,7 +38,6 @@ my %opt = (
|
|||
{
|
||||
# load model
|
||||
my $model = Slic3r::Model->read_from_file($ARGV[0]);
|
||||
$model->add_default_instances;
|
||||
$model->center_instances_around_point(Slic3r::Pointf->new(100,100));
|
||||
my $mesh = $model->mesh;
|
||||
$mesh->translate(0, 0, -$mesh->bounding_box->z_min);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue