• 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 17796
  • 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
Parents
  • 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
Reply
  • 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
Children
No Data

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