Constant area polygons/rectangles

Discussion in 'Cadence' started by Partha, Dec 4, 2003.

  1. Partha

    Partha Guest

    Group,
    One of my skill customizations requires the use of constant area
    polygons/rectangles in the layout
    Is there a way to build one,
    What i am looking for is the following,
    1. Given the area and the layer build a rectangle onto the layout.
    2. Once the constant area rectangle is layed out, when one of the
    edges is stretched the other edge should shrink to maintain the
    constant area of the polygon

    Thanks,
    Partha
     
    Partha, Dec 4, 2003
    #1
  2. Partha,

    If your polygon is a rectangle, this operation is a "move".

    If your polygon has more than 4 sides orthogonal, and if you are
    stretching only one side which intersect the bBox, then it is easy
    to identify the opposite side, which is the opposite bBox side
    and make the looped snapgid streching with a loop stop on the
    area criteria.
    If the edges are not those intersecting the bBox, there are too many
    cases, and you should consider many situations ...

    If your polygon is a triangle, or has non-mahattan shapes, the work
    seems to me complicated, but it could be done depending on several
    situations ...

    ================
    Kholdoun TORKI
    http://cmp.imag.fr
    ===================
     
    Kholdoun TORKI, Dec 4, 2003
    #2
  3. I missed the case of the rectangle for which you want the
    opposite edge to be fixed.
    It can be processed in the same way as the the orthogonal
    polygons I described previously. The edges to be stretched
    are the perpendicular edges and not the opposite one.

    ================
    Kholdoun TORKI
    http://cmp.imag.fr
    ===================
     
    Kholdoun TORKI, Dec 4, 2003
    #3
  4. Partha

    fogh Guest

    I don t really know,
    but it looks like a job for the stretchable pcells , like defined in the
    ROD user guide (cf. roduser.pdf)
     
    fogh, Dec 5, 2003
    #4
  5. Yup, that's how I'd do it. Have a simple pcell which has stretch handles on both
    sides.

    Something like:

    pcDefinePCell(
    list( ddGetObj("master") "myrect" "layout")
    (
    (w 3.0)
    (l 3.0)
    (layer "metal1")
    )
    let((rect)
    rect=rodCreateRect(
    ?cvId pcCellView
    ?layer layer
    ?width w
    ?length l
    ?origin -w/2.0:-l/2.0
    ) ; rodCreateRect
    foreach(handle '("rightEdge" "leftEdge")
    rodAssignHandleToParameter(
    ?parameter "w"
    ?rodObj rect
    ?handleName handle
    ?stretchDir "X"
    ?displayName 'w
    ?updateIncrement 0.1
    ?userFunction 'abRectWidthChange
    )
    )
    foreach(handle '("upperEdge" "lowerEdge")
    rodAssignHandleToParameter(
    ?parameter "l"
    ?rodObj rect
    ?handleName handle
    ?stretchDir "Y"
    ?displayName 'l
    ?updateIncrement 0.1
    ?userFunction 'abRectLengthChange
    )
    )
    ) ; let
    ) ; pcDefinePCell

    procedure(abRectWidthChange(data)
    let((area newW)
    area=data->rodObj->width*data->rodObj->length
    newW=data->paramVal+data->increment
    data->parameters->w=newW
    data->parameters->l=area/newW
    )
    )


    procedure(abRectLengthChange(data)
    let((area newL)
    area=data->rodObj->width*data->rodObj->length
    newL=data->paramVal+data->increment
    data->parameters->l=newL
    data->parameters->w=area/newL
    )
    )

    Note, this code doesn't do any gridding - and rounding errors could cause the
    area to wander after a number of stretches, but it shows the idea.

    Andrew.
     
    Andrew Beckett, Dec 5, 2003
    #5
  6. Partha

    Partha Guest

    Andrew,
    Thankyou very much!

    Partha


     
    Partha, Dec 5, 2003
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.