Erase box from ruby script code

edited June 26 in Ruby Scripting

Hello,

It would be too basic question, but I cannot find proper solution of this.
I am making PCell by scripting.
How to erase overwrapped area with code?

layer_1 = cell.shapes(layout.layer(1000, 0))

A = RBA::Box::new(0, 0, 10, 6)
B = RBA::Box::new(0, 0, 8, 2)

If I have these two boxes, and I want to erase left middel part of A from B.
And then I want to put the box on the layer "layer_1".

The final result is shown in the picture.

Thank you very much in advance.

Comments

  • Hi,

    So why not just creating three boxes like

    a = RBA::Box::new(0, 0, 10, 2)
    b = RBA::Box::new(8, 2, 10, 3)
    c = RBA::Box::new(0, 3, 10, 5)
    

    ?

    This should combine the the "U" shape you've shown.

    Matthias

Sign In or Register to comment.