Merge pull request #361 from beanz/fix-issue-357
Fix for issue #357 - uninitialized value errors relating to facet_edge values
This commit is contained in:
commit
44c5c5be5b
1 changed files with 3 additions and 1 deletions
|
@ -196,7 +196,9 @@ sub make_loops {
|
|||
# if two lines start at this point, one being a 'top' facet edge and the other being a 'bottom' one,
|
||||
# then remove the top one and those following it (removing the top or the bottom one is an arbitrary
|
||||
# choice)
|
||||
if (@lines_starting_here == 2 && join('', sort map $_->[I_FACET_EDGE], @lines_starting_here) eq FE_TOP.FE_BOTTOM) {
|
||||
# The "// ''" on the next line avoids uninitialized value errors mentioned in issue #357 but these
|
||||
# errors occur on fixed models so the root cause still needs to be found
|
||||
if (@lines_starting_here == 2 && join('', sort map $_->[I_FACET_EDGE] // '', @lines_starting_here) eq FE_TOP.FE_BOTTOM) {
|
||||
my @to_remove = grep $_->[I_FACET_EDGE] == FE_TOP, @lines_starting_here;
|
||||
while (!grep defined $_->[I_B_ID] && $_->[I_B_ID] == $to_remove[-1]->[I_B_ID] && $_ ne $to_remove[-1], @lines) {
|
||||
push @to_remove, grep defined $_->[I_A_ID] && $_->[I_A_ID] == $to_remove[-1]->[I_B_ID], @lines;
|
||||
|
|
Loading…
Reference in a new issue