I am trying to capture all shapes on a layer that have text over them. The text is on a different layer. But when using the input() construct, It does not pull in text.
m2 = input(1502,0) # works
m2text = input(1502,4) # does not pull in any shapes or text
# 1502/4 only contains text.
myfind = m2.interacting(m2text)
I've verified that m2text is not getting populated by
m2text.output("m2 text","shape")
Comments
Hi baworth,
Text handling is not part of the DRC engine yet. DRC is a pure mask geometry feature currently. That's why you don't see text object.
But the DRC feature is based on a Ruby script. This allows extenting the language with new features to emulate the function you need:
The solution is not fast and does not cover all features of the DRC engine (such as cell tree pruning, area confinement, tiling etc). But for simple cases it should do the job.
Regards,
Matthias
I get an error message of "No overload with matching arguments in Region::insert", pointing to the line data.insert(iter.shape.bbox.enlarged(1, 1).transformed(iter.trans))
I tried various values of the regular expression to no effect.
Then I changed the line
if iter.shape.is_text? && iter.shape.text_string =~ re
to
if iter.shape.is_text?
to remove the regular expression
I get no error, but it does not create boxes around the text
I noticed this line in the class DRC::DRCSource
li = layout.layer(layer, datatype=0)
doesn't that then ignore the datatype that my text is on? my text is on 1502/4 and I use
t = texts(/./, 1502, 4) # I modified to ignore reg exp
But I get no output either
t = texts(/^S/, 1502, 4)
t.output("T")
produces nothing
Hi,
please paste your entire script. I can't help while getting only partial information and you seem to play with the code. Please also note that the forum supports Markdown. So please use it to format your code (put four blanks in front of each line to make it formatted like code).
The boxes the script produces are very small (2x2 DBU). So maybe you just missed them?
Matthias