• 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. Error when void shape?????????

Stats

  • Replies 9
  • Subscribers 161
  • Views 16681
  • Members are here 0
More Content

Error when void shape?????????

ELEKVN
ELEKVN over 16 years ago

   I want to creat one shape and void it.
  I could creat shape by blow code
        
        ;*************************
        mypath = axlPathStart( list(-3200.000:5812.000))
        mypath = axlPathLine( mypath, 0.0, -3200.000:5020.000)
        mypath = axlPathLine( mypath, 0.0, -4016.000:5020.000)
        mypath = axlPathLine( mypath, 0.0, -4016.000:5812.000)
        mypath = axlPathLine( mypath, 0.0, -3200.000:5812.000)
        myshape = axlDBCreateOpenShape( mypath, t,"etch/top", "GND")
        axlDBCreateCloseShape( myshape)
        ;*****************************
 But I could't void this shape by below code:
         ;******************************
        axlSetFindFilter(?enabled (list "noall" "Shapes" "Voids") ?onButtons (list "noall" "Shapes" "Voids"))
        while((axlSelect)
        myshape = axlGetSelSet()
            foreach(myshapes myshape
            myvoidpath = axlPathStart( list(-3519.000:5586.000))
            myvoidpath = axlPathLine( myvoidpath, 0.0, -3519.000:5259.000)
            myvoidpath = axlPathLine( myvoidpath, 0.0, -3742.000:5259.000)
            myvoidpath = axlPathLine( myvoidpath, 0.0, -3742.000:5586.000)
            myvoidpath = axlPathLine( myvoidpath, 0.0, -3519.000:5586.000)
            axlDBCreateVoid(myshapes, myvoidpath)
            axlDBCreateCloseShape( myshapes)
            )
        ;****************************
I see warning in Allegro screen:

    E- Unfilled shape can not contain voids
    E- Database object is not a shape.
    
Can you  help me correct it.


Thank you.
Elek
   

  • Sign in to reply
  • Cancel
Parents
  • eDave
    eDave over 10 years ago

    Hi Luan,

    You  can only add voids to open shapes.

    Try this:

      foreach(text, textObjs

    lines = axlText2Lines(text)

    ; flatten list

    flattened = foreach(mapcan x lines x)

    text_bBox = text ->bBox

     

    ;enlarge bBox:

    ll = axlMXYSub(car(text_bBox), add_shape_value); Lower left corner

    ur = axlMXYAdd(lastelem(text_bBox), add_shape_value); Upper right corner

    ul = list(car(ll), cadr(ur)); Upper left corner

    lr = list(car(ur), cadr(ll)); Lower right corner

     

    shapePath = axlPathStart(list(ll, ul, ur, lr, ll)); Create a rectangular path.

    oShape = axlDBCreateOpenShape(shapePath, t, layer_check); Create an open shape ready to add voids.

    when(oShape

    foreach(path, flattened

    foreach(poly, axlPolyFromDB(path ?endCapType 'ROUND ?line2poly t)

    axlDBCreateVoid(oShape, poly); create voids in open shape

    );end foreach

    );end foreach

    when(car(parseString(layer_check, "/")) == "ETCH", axlDBCreateCloseShape(oShape)); This is only needed for shapes on an etch layer

    )

    );endforeach

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • eDave
    eDave over 10 years ago

    Hi Luan,

    You  can only add voids to open shapes.

    Try this:

      foreach(text, textObjs

    lines = axlText2Lines(text)

    ; flatten list

    flattened = foreach(mapcan x lines x)

    text_bBox = text ->bBox

     

    ;enlarge bBox:

    ll = axlMXYSub(car(text_bBox), add_shape_value); Lower left corner

    ur = axlMXYAdd(lastelem(text_bBox), add_shape_value); Upper right corner

    ul = list(car(ll), cadr(ur)); Upper left corner

    lr = list(car(ur), cadr(ll)); Lower right corner

     

    shapePath = axlPathStart(list(ll, ul, ur, lr, ll)); Create a rectangular path.

    oShape = axlDBCreateOpenShape(shapePath, t, layer_check); Create an open shape ready to add voids.

    when(oShape

    foreach(path, flattened

    foreach(poly, axlPolyFromDB(path ?endCapType 'ROUND ?line2poly t)

    axlDBCreateVoid(oShape, poly); create voids in open shape

    );end foreach

    );end foreach

    when(car(parseString(layer_check, "/")) == "ETCH", axlDBCreateCloseShape(oShape)); This is only needed for shapes on an etch layer

    )

    );endforeach

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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