mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-05 13:04:03 -06:00
Faster algorithm for rectilinear fill
This commit is contained in:
parent
33d7b8c7cf
commit
5daaf454b1
10 changed files with 242 additions and 159 deletions
|
@ -22,14 +22,14 @@ sub output {
|
|||
|
||||
my $svg = svg($print);
|
||||
|
||||
foreach my $type (qw(polygons polylines)) {
|
||||
foreach my $type (qw(polygons polylines white_polygons red_polylines)) {
|
||||
if ($things{$type}) {
|
||||
my $method = $type eq 'polygons' ? 'polygon' : 'polyline';
|
||||
my $method = $type =~ /polygons/ ? 'polygon' : 'polyline';
|
||||
my $g = $svg->group(
|
||||
style => {
|
||||
'stroke-width' => 2,
|
||||
'stroke' => 'black',
|
||||
'fill' => 'none',
|
||||
'stroke' => $type =~ /red_/ ? 'red' : 'black',
|
||||
'fill' => $type eq 'polygons' ? 'grey' : 'none',
|
||||
},
|
||||
);
|
||||
foreach my $polygon (@{$things{$type}}) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue