• 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. Via Overlapp

Stats

  • Replies 0
  • Subscribers 160
  • Views 11077
  • Members are here 0
More Content

Via Overlapp

vimaldevlpr
vimaldevlpr over 5 years ago

Hi,

Already Developed skill code via overlapped by via it checks only the through hole via in between layer's blind and buried vias if overlaps means its not showing I will attach the code below can anyone please update finding blind and buried vias if they overlapped.

defun( getDuplicateHoles (@optional netName)
 let((oldSetData, holeObjects)
  oldSetData = list(axlGetSelSet(), axlGetFindFilter(nil), axlGetFindFilter(t))
  axlClearSelSet()
  axlSetFindFilter(?enabled '("noall", "pins", "vias", "invisible"), ?onButtons '("noall", "pins", "vias"))
  axlAddSelectAll()
  holeObjects = setof(obj, axlGetSelSet(), obj ->isThrough)
  when(netName, holeObjects = setof(obj, holeObjects, obj ->net ->name == upperCase(netName)))
  axlSetFindFilter(?enabled cons("noall", cadr(oldSetData)) ?onButtons cons("noall", caddr(oldSetData)))
  axlSingleSelectObject(car(oldSetData))
  getDuplicateObjects(holeObjects)
))
defun( getDuplicateObjects (objs @key (tol axlMKSConvert(0.2 "mm")))
 let((obj, loc, closeObjs, dupes, p)
  while(objs
    obj = car(objs), objs = cdr(objs), loc = obj ->xy
    closeObjs = setof(o, objs, and((car(o ->startEnd) == car(obj ->startEnd) || cadr(o ->startEnd) == cadr(obj ->startEnd)), samePoint(o ->xy, loc, tol)))
    when(closeObjs
      dupes = cons(sprintf(nil, "%s at %L %s %s clashes with %s at %L", axlPPrint(obj ->objType), obj ->xy, car(obj->startEnd), cadr(obj->startEnd), buildString(unique(closeObjs ~>objType), ", "), closeObjs ~>xy), dupes)
    )
  )
  if(dupes then
    p = axlDMOpenFile("MISC", "duplicateHoles.txt", "w")
    fprintf(p, "Duplicate holes:\n\n")
    foreach(dupe, dupes, fprintf(p, "%s.\n", dupe))
    axlDMClose(p)
    axlUIViewFileCreate("duplicateHoles.txt", "Duplicate holes", nil)
   else
    println("No duplicates found.")
  )
  dupes
))
defun( same (x1, x2 @optional tolp, tolm)
  unless(tolp, tolp = expt(10, -2 - cadr(axlDBGetDesignUnits())))
  cond(
    (!x1 && !x2, t); Both are nil
    (!x1 || !x2, nil) ; One, and only one, is nil
    (!tolm && abs(x1 - x2) > tolp, nil)
    (tolm && x1 - x2 > tolp, nil)
    (tolm && x2 - x1 > tolm, nil)
    (t, t)
  )
)
defun( samePoint (pt1, pt2, @optional tolp, tolm)
  unless(tolp, tolp = expt(10, -2 - cadr(axlDBGetDesignUnits())))
  and(same(car(pt1), car(pt2), tolp, tolm), same(cadr(pt1), cadr(pt2), tolp, tolm))
)

  • 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