mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 06:33:57 -06:00
Unfinished work for decoupling GUI from the Print object (goal = more speed for manipulation, less memory usage)
This commit is contained in:
parent
f29d455319
commit
191de5d078
5 changed files with 223 additions and 166 deletions
|
@ -4,7 +4,7 @@ use warnings;
|
|||
|
||||
use Math::Clipper qw();
|
||||
use Scalar::Util qw(reftype);
|
||||
use Slic3r::Geometry qw(A B polyline_remove_parallel_continuous_edges polyline_remove_acute_vertices
|
||||
use Slic3r::Geometry qw(A B X Y MIN MAX polyline_remove_parallel_continuous_edges polyline_remove_acute_vertices
|
||||
polyline_lines move_points same_point);
|
||||
|
||||
# the constructor accepts an array(ref) of points
|
||||
|
@ -140,6 +140,13 @@ sub bounding_box {
|
|||
return Slic3r::Geometry::bounding_box($self);
|
||||
}
|
||||
|
||||
sub size {
|
||||
my $self = shift;
|
||||
|
||||
my @extents = $self->bounding_box;
|
||||
return map $extents[$_][MAX] - $extents[$_][MIN], (X,Y);
|
||||
}
|
||||
|
||||
sub rotate {
|
||||
my $self = shift;
|
||||
my ($angle, $center) = @_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue