Ruby proper way to combine output and bbox.width judgement

edited May 16 in Ruby Scripting

In this discussion, we know how to realize the width of overlap part of taper. But I do not know how to write a proper script to do judgement to this bbox.width. As I understand, width checking is a function for Layer object. For a layer object, I can write it as:

l1 = (1, 0)
l1.width(0.2.um).output('Minimum width', 'some tips here')

So it seems that width checking is automatically for the minimum checking. If I want to check the maximum length, what I find from tutorial is:

l1 = (1, 0)
l1.drc(width < 2.0um).output('Maximum width', 'some tips here')

Am I right?

=================================================================================
For bbox.width, should I just write it as:

l1 = (1, 0)
if l1.data.bbox.width > 50.um
    l1.output('Maximum length', 'some tips here')
end

Is there a simplified way to realise this?

Comments

  • Hi @BigPanda,

    I'm not sure I understand.

    I think you have a number of design rules you need to implement.

    Do you have some drawing that explains these rules?

    Matthias

  • edited May 22

    Of course, here is the figure to describe this.

    See this red line on the figure? I want to judge whether the length of this line is smaller than a given value. In another words, the length of this red line has a maximum value.

  • In the solution above, where you use a width to detect the blue area, you can basically derive the bounding box of the error marker, like:

    bboxes = l1.width(0.2.um).extents
    

    Now, if the length you want to check is larger than the width, you can use

    short = bboxes.with_bbox_max(0, max_length)
    

    to select the markers with a length (or better: a maximum bounding box dimension) less that "max_length".

    Matthias

  • After a long time study, I get your idea. Thx. I must admit that I still need to read and explore more about the DRC document.

    Besides, I wonder whether we could show more DRC examples. I mean code examples. and it will be better that we could own some galleries.

Sign In or Register to comment.