next unless $occurs_m->($ei);
#print STDERR " sea occurs_m $ei $poly->[$ei]{VxName}\n";
next unless $occurs_m->($ei-1);
- my $dleft = mkvec(-1000,0);
+ my $dleft = &mkvec(@{ $c{PA}{OuterCoastDelta} });
foreach my $which (0,-1) {
my $ej = ($ei + $which + @$poly) % @$poly;
my $ek = ($ei + +1 + 3*$which + @$poly) % @$poly;
my $dout = $$posk - $$posj;
#print STDERR " sea adj j=$ej ",prvec($$posj)," $poly->[$ej]{VxName}\n";
#print STDERR " sea adj k=$ek ",prvec($$posk)," $poly->[$ek]{VxName}\n";
- if ($poly->[$ej]{VxName} =~ /Noorderzijlvest/) {
- #print STDERR " sea adj extra\n";
- $$posk = $$posj + 10 * mkvec(100,-50);
+ foreach my $paocv (@{ $c{PA_Outercoast_Vertices} }) {
+ if ($poly->[$ej]{VxName} =~ m{$paocv->{Re}}) {
+ #print STDERR " sea adj extra\n";
+ $$posk = $$posj + 10 * &mkvec(@{ $paocv->{PA} });
+ }
}
$$posj = $$posj + $dleft + $dout*10;
$$posk = $$posk + $dout*10;
}
}
-sub afsluitdijk() {
- my ($adj) = grep { $_->{Name} eq 'NZ' } @{ $region{'ZZ'}{Adj} };
+sub dashedwithhs ($$$) {
+ my ($inner, $comment, $colour) = @_;
+ my ($adj) = grep { $_->{Name} eq $c{Sea} } @{ $region{$inner}{Adj} };
my $dash = 20;
my (@pos) = adj_ends($adj);
my $mid = 0.5 * ($pos[0] + $pos[1]);
my $r = 0.5 * ($pos[1] - $pos[0])->norm();
- o(sprintf <<'END', facepscolour('sea'), psvec($mid), $r);
- %% Afsluitdijk
+ o(sprintf <<'END', $comment, facepscolour('sea'), psvec($mid), $r);
+ %% %s
%s %s %s 0 360 arc closepath fill
END
some_edge_faces(()); # just sets the colour
stroke
[] 0 setdash
END
- one_hs('purple', $mid);
+ one_hs($colour, $mid);
+}
+
+sub dashedwithhses() {
+ dashedwithhs(
+ $_->{Inner},
+ $_->{Comment},
+ $_->{Colour}
+ ) foreach @{ $c{DashedHs} };
}
sub edge_faces() {
some_edge_faces($region{$c{Sea}});
- afsluitdijk();
+ dashedwithhses();
some_edge_faces(grep {
- $_->{Name} !~ m{^(?:L2?|NZ|ZZ)$}
+ my $n = $_->{Name};
+ $n !~ m{^$c{OuterfaceRe}$} &&
+ !grep { $n eq $_->{Inner} } @{ $c{DashedHs} }
} values %region);
}
$pos += $sz * &mkvec(@$adjust);
}
my $w = $rr->{Water};
- $w = 2 if $rr->{Special} || $rr->{Name} eq 'ZZ';
+ $w = 2 if $rr->{Name} eq $c{Sea};
if ($w) {
#print STDERR " water $w in $rr->{Name}\n";
my $down = water_cubes_sz(2) - water_cubes_sz(1) + $cube_gap;
$pos -= mkvec(0, -0.5 * $down);
my $cube_y = -($sz * @$words);
- if ($rr->{Name} eq 'Wieringermeer') {
+ if (grep { $_ eq $rr->{Name} } @{ $c{CubeAbove} }) {
$pos -= mkvec(0,+$sz);
$cube_y = 0;
$down = 0;
o(" } bind def\n");
foreach my $rr (values %region) {
next if $rr->{Special};
- next if $rr->{Name} eq 'ZZ';
+ next if grep { $_->{Inner} eq $rr->{Name} } @{ $c{DashedHs} };
next if $rr->{Colour} eq 'high';
foreach my $adj (@{ $rr->{Adj} }) {
my $neigh = $adj->{Name};