• 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 APD
  3. Merge shapes using axlShapeMerge

Stats

  • Replies 1
  • Subscribers 66
  • Views 13644
  • Members are here 0
More Content

Merge shapes using axlShapeMerge

kwlee
kwlee over 12 years ago

Hi

 Please give me anyone's advice...

1. Using below code, I expect only shapes in some layer can be picked in obj, but obj contains shapes in all layers. Is it normal??

  axlSetFindFilter(?enabled "shapes" ?onButtons "shapes")
  axlVisibleDesign(nil)
  axlVisibleLayer("some layer" t) 
  axlSingleSelectBox()
  obj=axlGetSelSet()

 2. Certain layer is filled with many of shapes, How can I merge each other.. I'd like to merge all shapes, if they are connected each other.

 - I tried below code to do.. but it took too much time and not that successful.. since when I use 'axlShapeMerge(a b nil)', members of list b should be connected to a.. unless return error and skip this function... 

 allShapes = getAllshapes(some layer)
 foreach(shape allShapes
  when(shape->bBox
   axlClearSelSet()
   axlSingleSelectBox(shape->bBox)
   slist=axlGetSelSet()
   foreach(s slist
     when(axlShapeMerge(shape s 'check) shape = axlShapeMerge(shape s 'quiet) )
    ) 
  )
 ) 

  • Sign in to reply
  • Cancel
Parents
  • aCraig
    aCraig over 12 years ago

    Try this

    shapes = axlDBGetShapes(someLayer)

    axlShapesMerge(car(shapes) cdr(shapes) t 'quiet)

    It's possible that all shapes will NOT merge. Only shapes that overlap car(shapes) will merge. So you might need to run it a couple of times which shape has the most overlapping shapes.

    Craig

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

    Try this

    shapes = axlDBGetShapes(someLayer)

    axlShapesMerge(car(shapes) cdr(shapes) t 'quiet)

    It's possible that all shapes will NOT merge. Only shapes that overlap car(shapes) will merge. So you might need to run it a couple of times which shape has the most overlapping shapes.

    Craig

    • 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