mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 14:44:19 -06:00
Merge branch 'master' into grow-narrow
This commit is contained in:
commit
0f8ca6191a
3 changed files with 22 additions and 2 deletions
|
@ -4,7 +4,7 @@ use warnings;
|
|||
|
||||
require Exporter;
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT_OK = qw(safety_offset offset offset_ex
|
||||
our @EXPORT_OK = qw(safety_offset 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);
|
||||
|
||||
|
@ -91,4 +91,13 @@ sub xor_ex {
|
|||
];
|
||||
}
|
||||
|
||||
sub collapse_ex {
|
||||
my ($polygons, $width) = @_;
|
||||
my @result = offset(
|
||||
[ offset($polygons, -$width/2,) ],
|
||||
+$width/2,
|
||||
);
|
||||
return union_ex([@result]);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue