mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 21:27:52 -06:00
Make sure brim paths don't overlap
This commit is contained in:
parent
4aad2f6243
commit
5bf3f5f5e4
2 changed files with 14 additions and 3 deletions
|
@ -6,7 +6,7 @@ require Exporter;
|
|||
our @ISA = qw(Exporter);
|
||||
our @EXPORT_OK = qw(safety_offset safety_offset_ex offset offset_ex collapse_ex
|
||||
diff_ex diff union_ex intersection_ex xor_ex PFT_EVENODD JT_MITER JT_ROUND
|
||||
JT_SQUARE is_counter_clockwise union_pt);
|
||||
JT_SQUARE is_counter_clockwise union_pt ex_int_offset2 offset2);
|
||||
|
||||
use Math::Clipper 1.17 qw(:cliptypes :polyfilltypes :jointypes is_counter_clockwise area);
|
||||
use Slic3r::Geometry qw(scale);
|
||||
|
@ -33,6 +33,16 @@ sub offset {
|
|||
return @$offsets;
|
||||
}
|
||||
|
||||
sub offset2 {
|
||||
my ($polygons, $distance1, $distance2, $scale, $joinType, $miterLimit) = @_;
|
||||
$scale ||= 100000;
|
||||
$joinType //= JT_MITER;
|
||||
$miterLimit //= 3;
|
||||
|
||||
my $offsets = Math::Clipper::int_offset2($polygons, $distance1, $distance2, $scale, $joinType, $miterLimit);
|
||||
return @$offsets;
|
||||
}
|
||||
|
||||
sub offset_ex {
|
||||
my ($polygons, $distance, $scale, $joinType, $miterLimit) = @_;
|
||||
$scale ||= 100000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue