automatic routing

automatic routing

Anonymous
Not applicable
2,185 Views
10 Replies
Message 1 of 11

automatic routing

Anonymous
Not applicable

1.i select the start point (bga) and select end point (other point or bga) .

2.it will take nearest path (start to end point) to  route (polyline).

  my aim is to reduced route time.

 

i attach 9*9 bga image.

0 Likes
2,186 Views
10 Replies
Replies (10)
Message 2 of 11

Ranjit_Singh
Advisor
Advisor

Draw some samples with points and possible paths and show which is the shortest path. Help us understand the logic so we can program it.

0 Likes
Message 3 of 11

Kent1Cooper
Consultant
Consultant

ROUTING.PNG

Kent Cooper, AIA
Message 4 of 11

stevor
Collaborator
Collaborator
1. If each nearby node muct be included, Kent's display sums it up. 2. Otherwise, one straight line might be considered.
S
0 Likes
Message 5 of 11

Anonymous
Not applicable

POLYLINE SHOULD NOT BE  CONNECTED  TO  NEAREST BGA PIN.IF I CLICK ONE BGA PIN POLYLINE SHOULD COME OUT OF BGA . IT WILL  TRAVEL  AWAY FROM BGA.

    EXAMPLE.

        I SELECT FIRST POINT AS BLACK BGA AND SECOND BGA IS SKY BLUE BGA.....IT WILL JOIN SHORTEST PATH AND ALSO NOT TRAVEL INSIDE THE BGA

   

REFER IMAGE

        BLACK COLOUR IS 9*9 BGA 

         SKY BLUE COLOUR IS NEAREST CONNECTOR OR COMPONENT PIN.

 

0 Likes
Message 6 of 11

Kent1Cooper
Consultant
Consultant

Are the green Lines what you want a routine to draw?  All of them at once for an entire pair of BGAs, or [see the description in Post 1] just a single selected dot in one BGA?  If a single dot on one BGA, are you also picking a single one on the other, or the entire other BGA for the routine to find the closest dot on?  If picking a single dot on the second BGA, might it sometimes not be at the same level as the one on the first BGA, so that a straight Line between them would not be horizontal?  If so, should it connect diagonally, or make a jogged path with orthogonal segments?  What criteria would there be for how that path should run?  Should a routine somehow forbid selection of an internal dot inside a BGA?  Might you ever pick a dot on the top or bottom edge, or even the opposite edge, instead of the edge closer to the second BGA?  Should the connectors be Lines, or perhaps Polylines so they can be given width [since I assume you're talking about traces on printed circuit boards]?

 

What kind of object is a BGA?  An unassociated array of separate objects?  An Array object?  A MINSERTed Block?  A single Block containing all the dots?  Are the separate dots [however they relate to each other] Blocks, or Polylines [e.g. Donuts with zero inside radius], or Circles with Solid Hatching in them [or perhaps Solid Hatching without the defining perimeter Circles], or maybe 3D Solids, or....?

 

Would you have Snap turned on, and the BGA's positioned by means of it, so that you can pick at a dot right in the middle, and a routine could just use that pick point regardless of the nature of the dots, or would you be selecting an object for which the routine would need to find the [again, an assumption] center of the dot(s)?

 

These kinds of questions are why a sample drawing file would be much more helpful.  It should show before and after conditions, and have some notes with arrows, saying "User picks this point / Array object / Minsert / Block / location" and "then picks this / here..." and "routine draws this / these," etc.

Kent Cooper, AIA
0 Likes
Message 7 of 11

hgasty1001
Advisor
Advisor

Hi,

 

BGA routing is a very specialized area, my advice is to search for a PCB CAD package with topological routing capabilities. Anyway, you need to post the complete set of rules for the routing process with clear examples of the use cases involved.

 

Gaston Nunez

 

 

 

 

0 Likes
Message 8 of 11

stevor
Collaborator
Collaborator
For your BGA2, this seems to find the unique shortest links. It takes lists of point coordinates, not the entities. ; near point pairs w/o duplicates, of different points (Defun Near_2PL (PL1 PL2 / NATL SP1 SP2 SNP2 DSN D12 DCT NAT CP2 NST) (Foreach SP1 PL1 (setq DSN 1e16 ) (Foreach sP2 PL2 ; SS2 (setq D12 (distance SP1 SP2)) (if (< D12 DSN) (setq SNP2 SP2 DSN D12 ) ) ) ;fe (setq NST (list SP1 SNP2) ) ; the Near Selected Pt TuPLe ; depends on how 'member resolves the 'real nrs (cond ((not NATL) (setq NATL (cons NST NATL) )) ; ini ; ? member v. (PL_Equ SNP2 (mapcar 'cadr NATL) 0.001) ((member SNP2 (mapcar 'cadr NATL)) (ForEach NAT NATL ; match coord to 1e-9 (setq CP2 (cadr NAT) DCT (distance (car NAT) CP2) ) (if (and (equal SNP2 CP2 1E-9) (< DSN DCT) ) (setq NATL (vl-remove NAT NATL) ; was closer NATL (cons NST NATL) ) ; NST Closer than NAT ) ; if equ and close ) ; fe ) ; members (t (setq NATL (cons NST NATL) TruF t)) ) ; cond ) ; fe PL1/SS1 NATL ) ; def
S
0 Likes
Message 9 of 11

Anonymous
Not applicable

it is not working ....if i load this lisp .....after i enter command( Near_2PL) it will automatilcally get out from  program....need help...

0 Likes
Message 10 of 11

stevor
Collaborator
Collaborator

1. The function 2PL_NearTL  is a function, not a command.

2. To use it, supply the 2 lists of coordinates to be matched;

stick to it, you will learn it all.

3. Acquiring those  coords is another task, often shown at this site and others.

4. I usually reply in Rich Text mode, which seemed to work before,

but will try the 'code feature here:

 

[code]
 ; near point pairs w/o duplicates, of different points,
 ; PL1 PL2 are lists of coordinates
 (Defun 2PL_NearTL (PL1 PL2 / NATL SP1 SP2 SNP2 DSN D12 DCT NAT CP2 NST)
   (Foreach SP1 PL1    (setq DSN 1e16 )  
     (Foreach sP2 PL2  (setq D12 (distance SP1 SP2)) ; SS2
       (if (< D12 DSN) (setq SNP2 SP2  DSN D12 ) )  ) ;fe
     (setq NST (list SP1 SNP2) ) ; the Near Selected Pt TuPLe
     ; depends on how 'member resolves the 'real nrs
     (cond  ((not NATL) (setq NATL (cons NST NATL) )) ; ini
      ; ? member v. (PL_Equ SNP2 (mapcar 'cadr NATL) 0.001)
      ((member SNP2 (mapcar 'cadr NATL))   
        (ForEach NAT NATL  ; match coord to 1e-9
         (setq CP2 (cadr NAT)  DCT (distance (car NAT) CP2) )  
         (if (and (equal SNP2 CP2 1E-9) (< DSN DCT) )
            (setq NATL (vl-remove NAT NATL) ; was closer
                  NATL (cons NST NATL) ) ; NST  Closer than NAT
         ) ; if equ and close
        ) ; fe
      ) ; members
      (t  (setq NATL (cons NST NATL)   TruF t))
     ) ; cond    
   ) ; fe PL1/SS1
  NATL ) ; def
  [/code]

S
0 Likes
Message 11 of 11

Kent1Cooper
Consultant
Consultant

@stevor wrote:

1. The function 2PL_NearTL  is a function, not a command.

2. To use it, supply the 2 lists of coordinates to be matched;

....


I'm getting a syntax error when I run that, and also with a different approach I was trying -- I suspect it may have something to do with nesting (foreach) functions, but I'm not sure, and haven't dug very deep yet.

 

But if I understand what yours is meant to do, I have a question:

 

Say it looks at the first point in the PL1 list -- I'll call it ptA.  And it steps through the PL2 list and compares the distance from ptA to each point in PL2, and finds the closest one -- I'll call that ptZ.  So a list that pairs ptA with ptZ  goes into the NATL list.

 

Now, it goes on to later points in the PL1 list.  If it finds one -- I'll call it ptB -- that's closer to ptZ than ptA was, it looks like it removes the list that pairs ptA with ptZ, and puts in its place a list that pairs ptB  with ptZ instead.  Fair-enough -- if it's closer, that should be the pairing.

 

But it doesn't look like anything else is ever done with ptA after that.  So there's no pairing of ptA with [presumably] the next-closest point to it from the PL2 list.  Am I correct that it's meant to work that way, and that ptA will not get a partner?  Or am I misunderstanding how it works?  [I wanted to test it and check the result, but haven't been able to diagnose the syntax error yet.]

 

In the OP's case, I would think every point in one list wants to end up paired with one from the other, but not having gotten answers to most of my questions about it, I'm not sure of that, either.

Kent Cooper, AIA
0 Likes