1

This row:

intersection(CurrentZplaneTransRegion, Unshifted, CurrentRegion)

sometimes returns a empty region. I need to catch this situation. How can I verify if the currentRegion is empty?

sharkyenergy
  • 3,842
  • 10
  • 46
  • 97

2 Answers2

2

There are 2 possibilities for this.

First:

area_center (CurrentRegion, AreaCurrentRegion, _, _)
if (AreaCurrentRegion==0)
    * CurrentRegion is empty
else
    * CurrentRegion is not empty
endif

Second:

gen_empty_region (EmptyRegion)
if (CurrentRegion==EmptyRegion)
    * CurrentRegionn is empty
else
    * CurrentRegion is not empty
endif
Andrea Mannari
  • 982
  • 1
  • 6
  • 9
1

You can use the operator area_center(CurrentRegion, Area, Row, Column) for this and check the Area result if it is zero.

Kilian Hohm
  • 320
  • 1
  • 7