• 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. Allegro X PCB Editor
  3. axlPolyOptions

Stats

  • Replies 6
  • Subscribers 161
  • Views 14508
  • Members are here 0
More Content

axlPolyOptions

Romme
Romme over 16 years ago

Hi.

  I have some shapes that needed to be merged, so i was looking into axlPolyOptions. But no matter what i try, i can't get this working. Is there anyone who might have an "Not-from-the-help" demo of how to do this ?

 

  Is it because my input are some closed shapes (eg should i use axlPolyOptions before axlCreateShape ?).

 

  Try imagine an old :-) resistor having the house and 2 long legs. Now if i create a shape for each pin, one for each padstack and one for the house, then this gives 5 shapes. How to merge theseinto one shape ? And no this is not the task but an examble. The task is to do it automaticly in approx 1500 footprints in a library :-).

 

Sincerely

  Klavs Rommedahl.

  • Sign in to reply
  • Cancel
  • aCraig
    aCraig over 16 years ago

     Klavs,

     Get the polys of the shapes using axlPolyFromDB(shape_dbid) then use axlPolyOperations( poly1_dbid ploy2_dbid 'OR). It will be faster if you put all but 1 poly in a list and then PolyOp the single poly with the list of polys.

     Craig

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 16 years ago
    axlPolyOperations regularly return lists when you may be expecting a single object id.

    This might help:

    mergedPolys = nil
    foreach(shp, myShapes
        mergedPolys = axlPolyOperation(poly, car(axlPolyFromDB(shp)), 'OR)
    )
    when(onep(length(mergedPolys))
        when(car(axlDBCreateShape(car(mergedPolys), nil, "PACKAGE GEOMETRY/ASSEMBLY_TOP"))
            axlDeleteObject(myShapes)
        )
    )

    Dave
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Romme
    Romme over 16 years ago

    I might be a bit stupid, cause i do wanna find out before giving up :-). But running through pdf files and tutors didn't give much.

     The var MyShape, where does that come from ?

    I have :

     

      Y0 = 0.0
      Pitch  = 3.0
      Rows   = 1 ; a for loop from 1 to 12 rows
      Xtnd   = (Pitch * (Rows - 1)) / 2.0
      PkgGeoPlace = axlPathStart( list(0.0:(Y0-4.600)))
      axlPathLine( PkgGeoPlace, 0.0, (Xtnd+1.950):(Y0-4.600))
      axlPathLine( PkgGeoPlace, 0.0, (Xtnd+3.345):(Y0-2.920))
      axlPathLine( PkgGeoPlace, 0.0, (Xtnd+3.345):(Y0+5.300))
      for(rcnt 1 Rows
        posx = ((Rows - 1) * Pitch)/2 - (rcnt - 1)*Pitch
        axlPathLine( PkgGeoPlace, 0.0, (posx+0.495):(Y0+5.300))
        axlPathLine( PkgGeoPlace, 0.0, (posx+0.320):(Y0+5.155))
        axlPathLine( PkgGeoPlace, 0.0, (posx+0.320):(Y0+7.640))
        axlPathLine( PkgGeoPlace, 0.0, (posx-0.320):(Y0+7.640))
        axlPathLine( PkgGeoPlace, 0.0, (posx-0.320):(Y0+5.155))
        axlPathLine( PkgGeoPlace, 0.0, (posx-0.495):(Y0+5.300))
      ) 
      axlPathLine( PkgGeoPlace, 0.0, (-Xtnd-3.345):(Y0+5.300))
      axlPathLine( PkgGeoPlace, 0.0, (-Xtnd-3.345):(Y0-2.920))
      axlPathLine( PkgGeoPlace, 0.0, (-Xtnd-1.950):(Y0-4.600))
      axlPathLine( PkgGeoPlace, 0.0, 0.0:(Y0-4.600))
      _BoundHeight(axlDBCreateShape(PkgGeoPlace t) 8.77)
      for(rcnt 1 Rows
        posx = ((Rows - 1) * Pitch)/2 - (rcnt - 1)*Pitch
        path1 = axlDBCreateCircle( list(posx:PinY (1.95/2.0)), 0.0, "Package Geometry/Place_Bound_Top")
        _BoundHeight(axlDBCreateShape(path1 t) 8.77)
        path2 = axlDBCreateCircle( list(posx:(PinY+3.0) (1.95/2.0)), 0.0, "Package Geometry/Place_Bound_Top")
        _BoundHeight(axlDBCreateShape(path2 t) 8.77)
      )
     ; the rest is Your part rewriten
       mergedPolys = nil
      foreach(shp, myshapes
        mergedPolys = axlPolyOperation(poly, car(axlPolyFromDB(shp)), 'OR)
      )
      when(onep(length(mergedPolys))
        when(car(axlDBCreateShape(car(mergedPolys), nil, "PACKAGE GEOMETRY/Place_Bound_Top"))
          axlDeleteObject(myShapes)
        )
      )

    Sincerely

      Klavs Rommedahl

      GHDsign ApS.

    Forgot:

    Allegro answers with this:

     ** Creating pin-array = 1 **
    W- *WARNING* (axlDBCreateOpenShape): Object should be either an r_path or an o_polygon - ((dbid:147219440) nil)
    W- *WARNING* (axlDBCreateOpenShape): Object should be either an r_path or an o_polygon - ((dbid:147219552) nil)
    E- *Error* eval: unbound variable - myShapes
    E- *Error* load: error while loading file - "D:/home/kr/test/fpm/skill/ghd_conn_molex-43045-xx01.il"
    ERROR
    t
    Pick to complete the window.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Trivedi
    Trivedi over 16 years ago

     Well, I guess eDave is talking about dbid's of all the shapes present on your layer or the entire design. I can give you a SKILL command to find it. Its not tough.

     Actually I am also facing a similar problem like you, I tried to merge using the axlPolyOptions, it gives me a new dbid, but it doesn't merge the shapes it seems. What I have to do is, to merge all the shapes on a given layer. I haven't tried the code eDave has mentioned here. Will try it and let you all know. 

    Here's the command to get all the shapes on a given layer:

      myShape = (axlDBGetShapes "layer_name")

    Thanks,

    Chinmay

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • aCraig
    aCraig over 16 years ago

     myShapes is a list of shapes that you want to merge. One way of getting them is what Chinmay suggested. Or it could be a list of shapes you create. For eDave's code to work you will also need to change "poly" to "mergedPolys".

    - Craig 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
Cadence Guidelines

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