mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
Little refactoring, new TriangleMesh->align_to_origin method
This commit is contained in:
parent
615bcb27dd
commit
ae35df716f
2 changed files with 10 additions and 8 deletions
|
@ -289,6 +289,15 @@ sub move {
|
|||
}
|
||||
}
|
||||
|
||||
sub align_to_origin {
|
||||
my $self = shift;
|
||||
|
||||
# calculate the displacements needed to
|
||||
# have lowest value for each axis at coordinate 0
|
||||
my @extents = $self->bounding_box;
|
||||
$self->move(map -$extents[$_][MIN], X,Y,Z);
|
||||
}
|
||||
|
||||
sub duplicate {
|
||||
my $self = shift;
|
||||
my (@shifts) = @_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue