Detection of optimal infill direction for bridges. Includes many fixes and improvements.

This commit is contained in:
Alessandro Ranellucci 2011-10-07 19:07:57 +02:00
parent 1cb515a8e5
commit 743f2abcf2
18 changed files with 445 additions and 68 deletions

View file

@ -22,14 +22,14 @@ sub output {
my $svg = svg($print);
foreach my $type (qw(polygons polylines white_polygons red_polylines)) {
foreach my $type (qw(polygons polylines white_polygons red_polygons red_polylines)) {
if ($things{$type}) {
my $method = $type =~ /polygons/ ? 'polygon' : 'polyline';
my $g = $svg->group(
style => {
'stroke-width' => 2,
'stroke' => $type =~ /red_/ ? 'red' : 'black',
'fill' => $type eq 'polygons' ? 'grey' : 'none',
'fill' => ($type !~ /polygons/ ? 'none' : ($type =~ /red_/ ? 'red' : 'grey')),
},
);
foreach my $polygon (@{$things{$type}}) {
@ -51,7 +51,7 @@ sub output {
my $g = $svg->group(
style => {
'stroke-width' => 2,
'stroke' => 'black',
'stroke' => $colour,
'fill' => $colour,
},
);