• 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 16663
  • 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
  • fxffxf
    fxffxf over 16 years ago

     you cannot void unfilled shapes nor shapes on the keepin and keepout classes

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

    You can't void an existing shape like that. To perform that task you should:

    1/ Extract the polygon of the existing shape (Use axlPolyFromDB).

    2/ Create a new open shape from that polygon

    3/ Create your void

    4/ Create the closed shape

    5/ Delete the original shape if all the above steps are successful.

    Dave

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

     Tks, Dave

    You are good man

    Elek

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

     By the way, I want to create a shape with void by text using axlText2Lines as following code:

     

     foreach(text AllTextsInDesign

                lines = axlText2Lines(text)

                ; flatten list

                flattened = foreach(mapcan x lines x)

                text_bBox = text->bBox

                ;enlarge bBox

                shape_box = list(axlMXYSub(car(text_bBox), add_shape_value) axlMXYAdd(lastelem(text_bBox), add_shape_value))

                create_shape = axlDBCreateRectangle(shape_box, t, layer_check, nil , nil)

                shape_ID = car(create_shape)

                foreach(path flattened

                            ; may return multiple polys

                            polys = axlPolyFromDB(path ?endCapType 'ROUND ?line2poly t)

                            ; create shapes in database

                            foreach(poly polys

                                        axlDBCreateVoid(shape_ID poly)

                                        ;shape_void = axlDBCreateShape(poly t layer_check nil nil)

                            );end foreach

                );end foreach

    );end foreach

     And the result is nothing happens(no voids created), please tell me how to repair code.(My allegro = 16.6)

     Thanks.

    Luan

     

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