• 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. Problem with obtaining correct bounding box

Stats

  • Replies 2
  • Subscribers 160
  • Views 14402
  • Members are here 0
More Content

Problem with obtaining correct bounding box

KetCadence
KetCadence over 14 years ago

 Hello All,

I am working on one of the module where I need to obtain bounding box for some of the components of PCB using skill script.

I have already written skill script to obtain bounding box for selected components.

I am using  "axlDBGetExtents" function for this.

However, I am facing one problem with this method.

Problem:

Bounding boxes obtained using this function are larger than what I need.

For my purpose, I need bounding box prefereably (or I would say ideally) of the size of top surface of the component.

My Current Method:

I have used "t" as second argument for axlDBGetExtents(id t) function.

According to documentation,  by using "t" as a second argument, bounding box only for visible parts of component is selected.

I am controlling visibility by using "Display->Color/Visibility" option.

I am choosing to disable all options except "Package Geometry -> Assembly_Top & Display_Top".

 

Please let me know if I am doing something wrong here as I have started using this software only a month ago.

Any suggestions that would help me in resolving this problem are welcome.

 

 

 

  • Sign in to reply
  • Cancel
Parents
  • Silver John
    Silver John over 14 years ago

    I'm using specific layers DFA_BOUND_xxx or PLACE_BOUND_xxx and bBox property.

    As I do it:

    ;
    ; Get object boundary box.
    ; First trying get Dfa_Bound_Top(Bottom)
    ; if Dfa not present trying Place_Bound_Top(Bottom)
    ; if Place not present get bBox property.
    ;
    defun( getObjectBBox (object)
        let( ( objectChildren child dfaLayer placeLayer result)
            if(object->isMirrored
                then dfaLayer = "PACKAGE GEOMETRY/DFA_BOUND_BOTTOM" placeLayer = "PACKAGE GEOMETRY/PLACE_BOUND_BOTTOM"
                else dfaLayer = "PACKAGE GEOMETRY/DFA_BOUND_TOP" placeLayer = "PACKAGE GEOMETRY/PLACE_BOUND_TOP"
            )
            objectChildren = object->children
            ; only Symbols have objectChildren
            if(objectChildren then
                ; find Dfa_Bound_ shape
                foreach( child objectChildren
                    if((child->objType == "shape" && child->layer == dfaLayer) then
                        result = child->bBox
                    )
                )
                ; find Place_Bound_ shape
                if(!result then
                    foreach( child objectChildren
                        if((child->objType == "shape" && child->layer == placeLayer) then
                            result = child->bBox
                        )
                    )
                )
            )
            if(!result then result = object->bBox)
            result
        ) ; let
    ) ; defun
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Silver John
    Silver John over 14 years ago

    I'm using specific layers DFA_BOUND_xxx or PLACE_BOUND_xxx and bBox property.

    As I do it:

    ;
    ; Get object boundary box.
    ; First trying get Dfa_Bound_Top(Bottom)
    ; if Dfa not present trying Place_Bound_Top(Bottom)
    ; if Place not present get bBox property.
    ;
    defun( getObjectBBox (object)
        let( ( objectChildren child dfaLayer placeLayer result)
            if(object->isMirrored
                then dfaLayer = "PACKAGE GEOMETRY/DFA_BOUND_BOTTOM" placeLayer = "PACKAGE GEOMETRY/PLACE_BOUND_BOTTOM"
                else dfaLayer = "PACKAGE GEOMETRY/DFA_BOUND_TOP" placeLayer = "PACKAGE GEOMETRY/PLACE_BOUND_TOP"
            )
            objectChildren = object->children
            ; only Symbols have objectChildren
            if(objectChildren then
                ; find Dfa_Bound_ shape
                foreach( child objectChildren
                    if((child->objType == "shape" && child->layer == dfaLayer) then
                        result = child->bBox
                    )
                )
                ; find Place_Bound_ shape
                if(!result then
                    foreach( child objectChildren
                        if((child->objType == "shape" && child->layer == placeLayer) then
                            result = child->bBox
                        )
                    )
                )
            )
            if(!result then result = object->bBox)
            result
        ) ; let
    ) ; defun
    • 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