get coordinates from shape

edited June 2016 in Ruby Scripting
Hello,

I did'nt find the RBA function which get shape's coordinates..

Is it possible?

Someone have an other way?


Regards

Thomas

Comments

  • edited November -1

    Hi Thomas,

    what do you mean by "shape coordinates"?

    Like the polygon points:

    shape.polygon.each_point_hull { |p| ... }
    

    Or the bounding box center:

    shape.bbox.center
    

    Matthias

  • edited October 2016
    Thanks

    I just want the function "Compute Layer Area" from Tools

    I found this : input(1, 0).area

    but it does not work.

    Thomas
  • edited November 2016

    Hi Thomas,

    that's a DRC function. You need to use it in the context of a DRC script.

    So you need to create a DRC script (Tools/DRC/New DRC Script) and use a script like this:

    puts input(1, 0).area
    

    This will print the area in square micrometers in the console.

    Matthias

Sign In or Register to comment.