mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 10:47:50 -06:00
Fixes for hi-res STL models
This commit is contained in:
parent
6444c3d7a9
commit
794b7a99d2
8 changed files with 139 additions and 63 deletions
|
@ -10,7 +10,7 @@ use constant A => 0;
|
|||
use constant B => 1;
|
||||
use constant X => 0;
|
||||
use constant Y => 1;
|
||||
use constant epsilon => 1E-8;
|
||||
use constant epsilon => 1E-6;
|
||||
use constant epsilon2 => epsilon**2;
|
||||
our $parallel_degrees_limit = abs(deg2rad(3));
|
||||
|
||||
|
@ -170,4 +170,13 @@ sub move_points {
|
|||
return map [ $shift->[X] + $_->[X], $shift->[Y] + $_->[Y] ], @points;
|
||||
}
|
||||
|
||||
# preserves order
|
||||
sub remove_coinciding_points {
|
||||
my ($points) = @_;
|
||||
|
||||
my %p = map { sprintf('%f,%f', @$_) => "$_" } @$points;
|
||||
%p = reverse %p;
|
||||
@$points = grep $p{"$_"}, @$points;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue