• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Skill code for turn rectangle metal to mesh in the virtuoso...

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 144
  • Views 17793
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Skill code for turn rectangle metal to mesh in the virtuoso layout editor

ZhouDL
ZhouDL over 13 years ago
Hi,

I want write a skill script for turning rectangle metal to mesh or slot on the rectangle metal automatically in the virtuoso layout editor when I press a bindkey.

but I am not very familiar with cadence skill .Can anyone help me on this?

Thanks,

PS: I want to post some sort of screenshot from my computer for what I really want to do,but I do not know how to do.Anyone can teach me to do this?
  • Cancel
  • skillUser
    skillUser over 13 years ago

    Hi,

    If you reply to the message thread in a browser you should see tabs across the top ("Compose", "Options"... ) - select Options and you should be able to upload a jpg/png image of what you are wanting to do.  A picture is worth a thousand words, so this would help I think.

    Without seeing the desired result I would guess at using chop rectangles within the original rectangle to obtain a complex polygon with holes in it. Or perhaps replace it with horizontal and vertical overlapping strips and then merge into a single shape?  There might be multiple ways of doing this...

    Best regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    If using IC615, you can either create metal slotting during creation of shapes (such as rectangles), or using Edit->Advanced->Slot.

    So maybe that does what you want as a standard feature.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ZhouDL
    ZhouDL over 13 years ago

    skillUser said:

    Hi,

    If you reply to the message thread in a browser you should see tabs across the top ("Compose", "Options"... ) - select Options and you should be able to upload a jpg/png image of what you are wanting to do.  A picture is worth a thousand words, so this would help I think.

    Without seeing the desired result I would guess at using chop rectangles within the original rectangle to obtain a complex polygon with holes in it. Or perhaps replace it with horizontal and vertical overlapping strips and then merge into a single shape?  There might be multiple ways of doing this...

    Best regards,

    Lawrence.

    thanks for your suggest. But I do not know how to write skill language to implement this, can you help me this in detail?

    I have posted some sort of screenshot as follow.I want to turn solid rectangle metal (left screenshot) to mesh (right screenshot) when I press the bindkey.

    • metal.jpg
    • View
    • Hide
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ZhouDL
    ZhouDL over 13 years ago

    skillUser said:

    Hi,

    If you reply to the message thread in a browser you should see tabs across the top ("Compose", "Options"... ) - select Options and you should be able to upload a jpg/png image of what you are wanting to do.  A picture is worth a thousand words, so this would help I think.

    Without seeing the desired result I would guess at using chop rectangles within the original rectangle to obtain a complex polygon with holes in it. Or perhaps replace it with horizontal and vertical overlapping strips and then merge into a single shape?  There might be multiple ways of doing this...

    Best regards,

    Lawrence.

    thanks for your suggest. But I do not know how to write skill language to implement this, can you help me this in detail?

    I have posted some sort of screenshot as follow.I want to turn solid rectangle metal (upper screenshot) to mesh (down screenshot) when I press the bindkey.

    • mesh.jpg
    • View
    • Hide
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ZhouDL
    ZhouDL over 13 years ago

    Andrew Beckett said:

    If using IC615, you can either create metal slotting during creation of shapes (such as rectangles), or using Edit->Advanced->Slot.

    So maybe that does what you want as a standard feature.

    Regards,

    Andrew.

    Thanks a lot.But I use IC5141,so I have to write skill script.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 13 years ago

    Try this code. It will create a polygon instead of strips of metal.

    procedure(meshSelected(@key (meshWidth 1.0) (cv geGetEditCellView()))
      let((shape box innerBox rects mesh)
        shape = car(selectedSet())
        box = shape~>bBox
        innerBox = list(xCoord(lowerLeft(box))+meshWidth:yCoord(lowerLeft(box))+meshWidth
                        xCoord(upperRight(box))-meshWidth:yCoord(upperRight(box))-meshWidth)
        rects = rodFillBBoxWithRects(
            ?cvId geGetEditCellView()
            ?layer "y0"
            ?fillBBox innerBox
            ?width meshWidth
            ?length meshWidth
            ?spaceX meshWidth
            ?spaceY meshWidth
            ?gap 'minimum ;optionally 'distribute
        )

        mesh = dbLayerAndNot(cv shape~>lpp list(shape) rects 1000) ;last # is max # of vertices
        dbDeleteObject(shape)
        mapcar('dbDeleteObject rects)
        mesh
      ) ;let
    ) ;proc

    Select your piece of metal and run this command, filling in the appropriate number for the width of your holes. I coded a default of 1.0. Also, the program above keeps the holes at a minimum space (meshWidth). If your rectangle is not a perfect multiple of the meshWidth, you'll end up with wide strips at the top and right. You can change the ?gap argument to be 'distribute and the mesh will be more even.

    meshSelected(?meshWidth 2.0)

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ZhouDL
    ZhouDL over 13 years ago

    dmay said:

    Try this code. It will create a polygon instead of strips of metal.

    procedure(meshSelected(@key (meshWidth 1.0) (cv geGetEditCellView()))
      let((shape box innerBox rects mesh)
        shape = car(selectedSet())
        box = shape~>bBox
        innerBox = list(xCoord(lowerLeft(box))+meshWidth:yCoord(lowerLeft(box))+meshWidth
                        xCoord(upperRight(box))-meshWidth:yCoord(upperRight(box))-meshWidth)
        rects = rodFillBBoxWithRects(
            ?cvId geGetEditCellView()
            ?layer "y0"
            ?fillBBox innerBox
            ?width meshWidth
            ?length meshWidth
            ?spaceX meshWidth
            ?spaceY meshWidth
            ?gap 'minimum ;optionally 'distribute
        )

        mesh = dbLayerAndNot(cv shape~>lpp list(shape) rects 1000) ;last # is max # of vertices
        dbDeleteObject(shape)
        mapcar('dbDeleteObject rects)
        mesh
      ) ;let
    ) ;proc

    Select your piece of metal and run this command, filling in the appropriate number for the width of your holes. I coded a default of 1.0. Also, the program above keeps the holes at a minimum space (meshWidth). If your rectangle is not a perfect multiple of the meshWidth, you'll end up with wide strips at the top and right. You can change the ?gap argument to be 'distribute and the mesh will be more even.

    meshSelected(?meshWidth 2.0)

    Derek

    Thanks a lot,Derek.I will try it.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • cadengr
    cadengr over 12 years ago

     It works for me. Thanks for posting it.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information