Home > Community > Forums > PCB SKILL > Any Way to identify double hits (Via)?

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Any Way to identify double hits (Via)? 

Last post Mon, Jun 30 2014 12:12 PM by Helen. 30 replies.
Started by Alice 17 Aug 2009 07:51 PM. Topic has 30 replies and 11480 views
Page 1 of 3 (31 items) 1 2 3 Next >
Sort Posts:
  • Mon, Aug 17 2009 7:51 PM

    • Alice
    • Top 500 Contributor
    • Joined on Wed, Oct 8 2008
    • Bayan Lepas, Pulau Pinang
    • Posts 20
    • Points 355
    Any Way to identify double hits (Via)? Reply

    If  on the same net DRC, due to the stack via design. Alot of DRC will apply also.

    Is there a way to identify this issue? Pls advice.

     Regards,

    Alice

    • Post Points: 50
  • Wed, Aug 19 2009 1:16 AM

    • Romme
    • Top 200 Contributor
    • Joined on Thu, Jul 17 2008
    • Bagsvaerd, Copenhagen
    • Posts 38
    • Points 635
    Re: Any Way to identify double hits (Via)? Reply

    Wouldn't it be easyer to setup drc rules to accept stacked via 's ?

    • Post Points: 35
  • Wed, Aug 19 2009 1:23 AM

    • Alice
    • Top 500 Contributor
    • Joined on Wed, Oct 8 2008
    • Bayan Lepas, Pulau Pinang
    • Posts 20
    • Points 355
    Re: Any Way to identify double hits (Via)? Reply

    My problem is how to detect 2 same via overlap each other but has slight different xy position at same layer?

    These 2 vias have same net. So, if I on the same net drc, I will get alot of drcs.

    • Post Points: 5
  • Wed, Aug 19 2009 1:44 AM

    • Alice
    • Top 500 Contributor
    • Joined on Wed, Oct 8 2008
    • Bayan Lepas, Pulau Pinang
    • Posts 20
    • Points 355
    Re: Any Way to identify double hits (Via)? Reply

    My problem is how to detect 2 same via overlap each other but has slight different xy position at same layer?

    These 2 vias have same net. So, if I on the same net drc, I will get alot of drcs.

    • Post Points: 20
  • Wed, Aug 19 2009 1:00 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 736
    • Points 15,930
    Re: Any Way to identify double hits (Via)? Reply

    Hi Alice,

    Here's some code for you to try:

    defun( getDuplicateHoles (locs @key blindBuried, (tol axlMKSConvert(0.2 "mm")))
     let((loc, dupes)
      while(locs
        loc = car(locs), locs = cdr(locs)
        if(blindBuried then
          when(setof(pt, locs, and(cadr(pt) == cadr(loc), samePoint(car(pt), car(loc), tol)))
            dupes = cons(loc, dupes)
          )
         else when(setof(pt, locs, samePoint(pt, loc, tol)), dupes = cons(loc, dupes))
        )
      )
      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))
    )

     Cheers, Dave

    Dave Elder, Tait Communications
    • Post Points: 20
  • Fri, Sep 4 2009 8:24 AM

    • Marathon
    • Not Ranked
    • Joined on Fri, Dec 5 2008
    • Markham, Ontario
    • Posts 4
    • Points 80
    Re: Any Way to identify double hits (Via)? Reply

    Hi Dave,

    This is exactly the type of issue that I am trying to address - duplicate drills with the exact same xy and touching drills and then create a report file for them. Fab shops desire the report file so they can modify the NC drill file so not to make double or more hits on a single hole. Is it possible for you to expand on your code slightly to create a simple report file? The duplicate drills are also counted in the drill legend, but that is another issue.

    Much appreciated!

    • Post Points: 20
  • Sun, Sep 6 2009 10:28 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 736
    • Points 15,930
    Re: Any Way to identify double hits (Via)? Reply

    defun( getDuplicateHoles (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)))
        when(closeObjs
          dupes = cons(sprintf(nil, "%s at %L clashes with %s at %L", axlPPrint(obj ->objType), obj ->xy, 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))
    )

    Dave Elder, Tait Communications
    • Post Points: 20
  • Thu, Sep 10 2009 6:33 AM

    • Marathon
    • Not Ranked
    • Joined on Fri, Dec 5 2008
    • Markham, Ontario
    • Posts 4
    • Points 80
    Re: Any Way to identify double hits (Via)? Reply
    Hi Dave,
    Thanks for the reply. The code you provided obviously needs a list to process. I have been looking at that and am having some trouble with it.The list, I would assume would be from the xy locations from all the through hole pads and vias for a net. Each net would be processed individually instead of processing the entire xy locations for all the pads and vias from the entire design. This would report the “close holes” that we are really looking for otherwise they would have a DRC marker on them from the touching nets. Any thought on how to create the input list correctly?
    • Post Points: 20
  • Thu, Sep 10 2009 12:43 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 736
    • Points 15,930
    Re: Any Way to identify double hits (Via)? Reply

    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)))
        when(closeObjs
          dupes = cons(sprintf(nil, "%s at %L clashes with %s at %L", axlPPrint(obj ->objType), obj ->xy, 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))
    )

    Someone owes me a beer!

    Dave Elder, Tait Communications
    • Post Points: 20
  • Thu, Sep 10 2009 1:01 PM

    • Marathon
    • Not Ranked
    • Joined on Fri, Dec 5 2008
    • Markham, Ontario
    • Posts 4
    • Points 80
    Re: Any Way to identify double hits (Via)? Reply

    Thanks Dave! I will ship you a case. Name your brand :)

    I will look closer as to why the report only finds pins that have the exact same xy and not ones that are slightly overlapped. Vias are also not found, but it is a tremendous start!

    Much appreciated!

     

     

    • Post Points: 20
  • Thu, Sep 10 2009 1:20 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 736
    • Points 15,930
    Re: Any Way to identify double hits (Via)? Reply

    Free stuff always has bugs;)

    I'd forgotten the tolerance. Here's the corrected function:

    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 clashes with %s at %L", axlPPrint(obj ->objType), obj ->xy, 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
    ))

     

    Dave Elder, Tait Communications
    • Post Points: 20
  • Fri, Sep 11 2009 6:15 AM

    • Geoff
    • Top 500 Contributor
    • Joined on Tue, Aug 12 2008
    • Ottawa, Ontario
    • Posts 24
    • Points 390
    Re: Any Way to identify double hits (Via)? Reply

    Incredible program Dave. I have found it useful already.

    Our boards have alot of Ground stitching which could result in duplicates if you are not paying attention.

     

    • Post Points: 20
  • Fri, Sep 11 2009 11:57 AM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 736
    • Points 15,930
    Re: Any Way to identify double hits (Via)? Reply

    OK,

    Thanks for this and other feedback.

    I'll put it together into a small Skill utility with a form - and a few other enhancements - and publish next week.

    Cheers, Dave

    Dave Elder, Tait Communications
    • Post Points: 20
  • Sat, Sep 12 2009 4:50 AM

    • Marathon
    • Not Ranked
    • Joined on Fri, Dec 5 2008
    • Markham, Ontario
    • Posts 4
    • Points 80
    Re: Any Way to identify double hits (Via)? Reply
    Hi Dave,
    I was wrong in my original thought on reporting only the pins/vias that are on a net only. The whole purpose is to show ALL the multiple drill hits regardless of being on a net or not. This way the fab shops can make adjustment to their drill setup from the report. As Geoff noted, it is an incredible program and extremely useful in eliminating questions from the fab shops regarding the mutliple drill hits.
    • Post Points: 20
  • Mon, Sep 14 2009 10:19 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 736
    • Points 15,930
    Re: Any Way to identify double hits (Via)? Reply

    Ok,

    As promised, attached is the utility. Thanks to those who provided input and feedback - especially Marathon.

    ;  Installation instructions:
    ;
    ; Install findDoubleHitHoles_public.il into your skill folder.
    ; Add load("findDoubleHitHoles_public.il") to the allegro.ilinit file in your pcbenv folder.
    ;
    ;  Running within Allegro:
    ; Type "find double hits" (without the speech marks) in the command window.

    As always, feedback is welcome. 

    Regards, Dave

    Dave Elder, Tait Communications
    • Post Points: 20
Page 1 of 3 (31 items) 1 2 3 Next >
Sort Posts:
Started by Alice at 17 Aug 2009 07:51 PM. Topic has 30 replies.