It looks like you're new here. If you want to get involved, click one of these buttons!
shirly,
You say "length of a path polygon". I assume you mean "path". If it has been converted from a path to a polygon already, the problem is harder.
There is a script http://klayout.de/forum/comments.php?DiscussionID=540 but it say it is precise only for 'thin' wires. I have not tried it.
In my opinion, you should just get all the points of a path using Path.each_point and then for each pair of points you calculate the cartesian xy distance. Then keep a running sum. If you get stuck, let us know.
Note that to get each pair of points you should use Ruby's "each_cons" method.
If you get it working, post the script here for others' benefit!
David
Comments
shirly,
You say "length of a path polygon". I assume you mean "path". If it has been converted from a path to a polygon already, the problem is harder.
There is a script http://klayout.de/forum/comments.php?DiscussionID=540 but it say it is precise only for 'thin' wires. I have not tried it.
In my opinion, you should just get all the points of a path using Path.each_point and then for each pair of points you calculate the cartesian xy distance. Then keep a running sum. If you get stuck, let us know.
Note that to get each pair of points you should use Ruby's "each_cons" method.
If you get it working, post the script here for others' benefit!
David