• 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. Detected Layer-to-Layer Polygons that overlap

Stats

  • Replies 17
  • Subscribers 164
  • Views 23165
  • Members are here 0
More Content

Detected Layer-to-Layer Polygons that overlap

maxwellj
maxwellj over 15 years ago

I was wondering if anyone has a routine that goes in and lists all polgyons that overlap each other on a layer to layer basis.  We've been directed to find a way to check all our layers 1-2, 2-3, 3-4, .... and note any voltage polygons that overlap each other and then give them a percentage of overlap for each shape.  It's overkill, but these people have no other work to do, so they make new work for us.  Any help would be appreciated.

  • Sign in to reply
  • Cancel
Parents
  • AC202502108327
    AC202502108327 7 months ago

    You can use a script in OrCAD/Allegro Skill (SKILL) to detect overlapping polygons layer by layer. The general approach is:

    1. Iterate through all layers and extract voltage polygons.
    2. Compare each polygon with others on the same layer using dbGetOverlap or similar functions.
    3. Calculate the percentage of overlap using area formulas.
    4. Output a report listing overlapping polygons and their percentage of overlap.
      Here is the Script

      procedure(checkPolygonOverlap()
      let((layers polys layerPairs overlapResults)

      ;; Get all layers in the design
      layers = axlDBGetStackupLayers()
      layerPairs = nil

      ;; Create layer pairs (1-2, 2-3, etc.)
      for(i 1 (length(layers) - 1)
      layerPairs = cons(list(nth(i layers) nth(i+1 layers)) layerPairs)
      )

      overlapResults = nil

      ;; Loop through each layer pair
      foreach(layerPair layerPairs
      let((layer1 layer2 poly1 poly2 overlapArea poly1Area poly2Area overlapPercentage)
      layer1 = car(layerPair)
      layer2 = cadr(layerPair)

      ;; Get all polygons from both layers
      polys = axlDBGetShapesByLayer(list(layer1 layer2) 'dynamic_shape)

      foreach(poly1 polys
      foreach(poly2 polys
      if(poly1 != poly2 && axlDBOverlap(poly1 poly2)
      overlapArea = axlDBGetOverlap(poly1 poly2)
      poly1Area = axlDBGetArea(poly1)
      poly2Area = axlDBGetArea(poly2)

      overlapPercentage = 100.0 * overlapArea / max(poly1Area poly2Area)

      overlapResults = cons(
      list("Layer:" layer1 "&" layer2 "Overlap:" overlapPercentage "%")
      overlapResults
      )
      )
      )
      )
      )
      )

      ;; Print results
      foreach(result overlapResults
      printf("%s\n" result)
      )
      )
      )

      checkPolygonOverlap()



    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • AC202502108327
    AC202502108327 7 months ago

    You can use a script in OrCAD/Allegro Skill (SKILL) to detect overlapping polygons layer by layer. The general approach is:

    1. Iterate through all layers and extract voltage polygons.
    2. Compare each polygon with others on the same layer using dbGetOverlap or similar functions.
    3. Calculate the percentage of overlap using area formulas.
    4. Output a report listing overlapping polygons and their percentage of overlap.
      Here is the Script

      procedure(checkPolygonOverlap()
      let((layers polys layerPairs overlapResults)

      ;; Get all layers in the design
      layers = axlDBGetStackupLayers()
      layerPairs = nil

      ;; Create layer pairs (1-2, 2-3, etc.)
      for(i 1 (length(layers) - 1)
      layerPairs = cons(list(nth(i layers) nth(i+1 layers)) layerPairs)
      )

      overlapResults = nil

      ;; Loop through each layer pair
      foreach(layerPair layerPairs
      let((layer1 layer2 poly1 poly2 overlapArea poly1Area poly2Area overlapPercentage)
      layer1 = car(layerPair)
      layer2 = cadr(layerPair)

      ;; Get all polygons from both layers
      polys = axlDBGetShapesByLayer(list(layer1 layer2) 'dynamic_shape)

      foreach(poly1 polys
      foreach(poly2 polys
      if(poly1 != poly2 && axlDBOverlap(poly1 poly2)
      overlapArea = axlDBGetOverlap(poly1 poly2)
      poly1Area = axlDBGetArea(poly1)
      poly2Area = axlDBGetArea(poly2)

      overlapPercentage = 100.0 * overlapArea / max(poly1Area poly2Area)

      overlapResults = cons(
      list("Layer:" layer1 "&" layer2 "Overlap:" overlapPercentage "%")
      overlapResults
      )
      )
      )
      )
      )
      )

      ;; Print results
      foreach(result overlapResults
      printf("%s\n" result)
      )
      )
      )

      checkPolygonOverlap()



    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • AV202505198123
    AV202505198123 1 month ago in reply to AC202502108327

    I wonder if there is an allegro function like this "axlDBGetStackupLayers"

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • DavidJHutchins
    DavidJHutchins 1 month ago in reply to AV202505198123

    I modified the original script to use the 'released' skill functions:

    <   foreach(layer _fpDrawGetXSection()
    <     layerType = cadr(layer)
    ---
    >   foreach(layer axlXSectionGet(nil 'all)
    >     ;layerType = cadr(layer)
    >     layerType = layer->layerType

    • 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