Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Piece of code that crashed
- for @!corner_points -> $pt {
- push @all_points,$pt;
- if $pt.hasflag('RECTANGLE') {
- my Point $rect = $pt.rect;
- push @all_points, $rect;
- next unless $rect.hasflag('MIS');
- for %vmis_pts.keys -> $k {
- my $match = $k.match(/^ \d+ '_' (\d+) '-' \d+ '_' (\d+) $/);
- if $match {
- my Str ($y1,$y2) = ($match)>>.Str;
- if $rect.y > $y1.Str and $rect.y < $y2.Str {
- %vmis_pts{$rect.x.Str ~ '_' ~ $rect.y.Str} = 1;
- }
- }
- }
- }
- }
- #Piece of code the solved the problem
- my @toadd;
- for @!corner_points -> $pt {
- push @all_points,$pt;
- if $pt.hasflag('RECTANGLE') {
- my Point $rect = $pt.rect;
- push @all_points, $rect;
- next unless $rect.hasflag('MIS');
- for %vmis_pts.keys -> $k {
- my $match = $k.match(/^ \d+ '_' (\d+) '-' \d+ '_' (\d+) $/);
- if $match {
- my Str ($y1,$y2) = ($match)>>.Str;
- if $rect.y > $y1.Str and $rect.y < $y2.Str {
- push @toadd, $rect.x.Str ~ '_' ~ $rect.y.Str;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment