User Tools

Site Tools


pcb:connection_lookup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
pcb:connection_lookup [2018/12/23 19:16]
cparker
pcb:connection_lookup [2019/01/27 10:34] (current)
cparker
Line 8: Line 8:
  
 In a number of places, the "​andRats"​ parameter is used. This indicates that rat lines should be considered when looking for overlaps. This way, you can highlight an entire net, even if all the pieces aren't connected with copper. It's important to preserve this functionality. In a number of places, the "​andRats"​ parameter is used. This indicates that rat lines should be considered when looking for overlaps. This way, you can highlight an entire net, even if all the pieces aren't connected with copper. It's important to preserve this functionality.
 +
 +Objects are broken into two categories, "layer objects"​ (LO) and pins and vias (PV). The tests then get split into four categories, PV to PV, LO to PV, LO to LO, and PV to LO.
  
 =====Detailed Algorithm===== =====Detailed Algorithm=====
 +
 +  - Initialize the lists
 +  - Add seed object
 +  - Initialize global variables
 +  - Search lists for new connections
 +    - Check the PV list for new PV connections (LookupPVConnectionsToPVList)
 +      - rsearch the pin tree calling pv_pv_callback
 +      - rsearch the via tree calling pv_pv_callback
 +        - check that the pvs are on intersecting layers
 +        - check that it's not already in the list
 +        - check that they touch
 +        - check that neither is just a hole
 +        - add the new pv to the list
 +    - Check the PV list for new LO connections
 +      - rsearch the pad tree calling LOCtoPVpad_callback
 +      - For each copper layer
 +        - rsearch the line tree calling LOCtoPVline_callback
 +        - rsearch the arc tree calling LOCtoPVarc_callback
 +        - rsearch the polygon tree calling LOCtoPVpoly_callback
 +
  
   - InitConnectionLookup()   - InitConnectionLookup()
Line 48: Line 70:
           - Get the current list item           - Get the current list item
           - Expand the bounding box by the global bloat for the search           - Expand the bounding box by the global bloat for the search
-          - Set a jump point, and do an r_search around the current PV (pv_pv_callback+          - Set a jump point, and do an r_search ​on the pad tree around the current PV (LOCtoPVpad_callback
-   +            - If the PV doesn'​t intersect the pad layer (top or bottom), return false (keep looking for objects) 
-   +            - If we haven'​t already flagged the pad, the PV and pad intersect, and the PV isn't just a hole, add the pad to the list, and longjmp back to LookupLOConnectionToPVList 
-  +            - Otherwise, return 0 (keep looking for objects) 
 +          - For each layer: 
 +            - if the no_drc flag is set, skip this layer 
 +            - Set a jump point, and do an r_search on the layer'​s line tree around the via (LOCtoPVline_callback) 
 +              - Repeat the pad procedure here 
 +            - If we returned via long jump, return true (abort search) 
 +            - Otherwise, set a jump point and do an r_search on the layer'​s arc tree around the via (LOCtoPVarc_callback) 
 +              - Repeat the pad procedure here 
 +            - If we returned via long jump, return true (abort search) 
 +            - Otherwise, set a jump point and do an r_search on the layer'​s polygon tree around the via (LOCtoPVpoly_callback) 
 +              - If the PV doesn'​t intersect the polygon layer, return 0 (continue search) 
 +              - If we haven'​t yet flagged the polygon and the PV isn't just a hole... 
 +                - If there'​s no thermal and the polygon is clearing, return 0 (continue search) 
 +                - Otherwise... 
 +                  - compute the width of the search box 
 +                  - if the pv has the square flag set, 
 +                    - compute the corner points 
 +                    - if the rectangle is in the polygon (IsRectangleInPolygon) add it to the list (... ends up in add_object_to_list) 
 +                    - if we're doing the drc and the object didn't have the selected flag set, long jump back to to LookupLOConnectionToPVList 
 +                    - otherwise return 0 (continue search) 
 +                  - otherwise, if the pv has the octagon flag set... 
 +                    - create a dummy octagon polygon 
 +                    - if the dummy octagon and the polygon intersect (isects), add it to the list 
 +                    - if we're doing the drc and the object didn't have the selected flag set, long jump back to to LookupLOConnectionToPVList 
 +                  - otherwise, pv is round, and if intersects the polygon (IsPointInPolygon) 
 +                    - add it to the list 
 +                    - if we're doing the drc and the object didn't have the selected flag set, long jump back to LookupLOConnectionToPVList 
 +              - return 0 (continue search) 
 +            - Move on to the next layer 
 +          - If we're following rats, set a jump point and do an r_search on the rat tree (LOCtoPVrat_callback) 
 +            - If we haven'​t already found the rat, add it to the list, and long jump back to LookupLOConnectionToPVList 
 +          - Increment the position in the list and check the next PV 
 +        - Return false (continue search) 
 +      - LookupLOConnectionsToLOList(flag,​ AndRats)
   ​   ​
   ​   ​
pcb/connection_lookup.1545610611.txt.gz · Last modified: 2018/12/23 19:16 by cparker