the fair gds editor BoundungBoxArea

Boundung Box Area Calculation

this macro calculates the area of the bounding box.

Download: areaBoundingBox.layout

   1 #!/usr/bin/layout
   2 #name=area
   3 #help=calculates the area of the bounding box of the current cell
   4 
   5 int main(){
   6 point min=layout->drawing->currentCell->minimum();
   7 point max=layout->drawing->currentCell->maximum();
   8 double dx=(max.x()-min.x())*layout->drawing->userunits;
   9 double dy=(max.y()-min.y())*layout->drawing->userunits;
  10 
  11 double area=dx*dy;
  12 string s;s.setNum(area,3);
  13 
  14 layout->showMessage("area","bounding box area is "+s+" userunits^2");
  15 
  16 }

See also


CategoryMacro


BoundungBoxArea (last edited 2014-08-01 18:47:06 by JurgenThies)