mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Completely rewritten the slicing algorithm
It should work with any model now. There are still problems with some bridges.
This commit is contained in:
parent
ad27f25c71
commit
459577f9a2
8 changed files with 137 additions and 246 deletions
|
@ -39,14 +39,15 @@ sub output {
|
|||
|
||||
my $svg = svg($print);
|
||||
|
||||
foreach my $type (qw(polygons polylines white_polygons red_polygons red_polylines)) {
|
||||
foreach my $type (qw(polygons polylines white_polygons green_polygons red_polygons red_polylines)) {
|
||||
if ($things{$type}) {
|
||||
my $method = $type =~ /polygons/ ? 'polygon' : 'polyline';
|
||||
my ($colour) = $type =~ /^(red|green)_/;
|
||||
my $g = $svg->group(
|
||||
style => {
|
||||
'stroke-width' => 2,
|
||||
'stroke' => $type =~ /red_/ ? 'red' : 'black',
|
||||
'fill' => ($type !~ /polygons/ ? 'none' : ($type =~ /red_/ ? 'red' : 'grey')),
|
||||
'stroke' => $colour || 'black',
|
||||
'fill' => ($type !~ /polygons/ ? 'none' : ($colour || 'grey')),
|
||||
},
|
||||
);
|
||||
foreach my $polygon (@{$things{$type}}) {
|
||||
|
@ -57,7 +58,6 @@ sub output {
|
|||
);
|
||||
$g->$method(
|
||||
%$path,
|
||||
'marker-end' => "url(#endArrow)",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue