Xorn
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Classes | Functions | Variables
xorn.geda.netlist.conn Namespace Reference

Find and track the connections between net segments. More...

Classes

class  ConnectionMap
 Tracks the connections of the net segments in a revision at a time. More...
 

Functions

def endpoints
 Return the absolute coordinates of the endpoints of a net instance. More...
 
def s_conn_check_midpoint
 Checks if a point is on an orthogonal net segment and between its endpoints. More...
 
def all_net_instances_in_revision
 Returns all net instances in a given revision. More...
 
def all_net_instances_in_object
 Returns all net instances in a given object. More...
 
def s_conn_update_line_object
 Return all connections of a net instance. More...
 

Variables

tuple Connection
 A single connection between two objects. More...
 

Detailed Description

Find and track the connections between net segments.

Instances of net segments (including bus segments and pins) are represented by a pair (path, ob) where path is a sequence of component objects, the symbol of each containing the next component or (in the case of the last component) the net, and ob is the actual net object.

Function Documentation

def xorn.geda.netlist.conn.all_net_instances_in_object (   ob,
  path = () 
)

Returns all net instances in a given object.

If ob is a net, returns the appropriate net segment. If is a component, returns net objects inside its symbol.

Definition at line 119 of file conn.py.

def xorn.geda.netlist.conn.all_net_instances_in_revision (   rev,
  path = () 
)

Returns all net instances in a given revision.

This includes all net objects in the revision as well as net objects inside symbols.

Definition at line 109 of file conn.py.

def xorn.geda.netlist.conn.endpoints (   path,
  ob 
)

Return the absolute coordinates of the endpoints of a net instance.

Returns
a pair of pairs ((x0, x1), (y0, y1))
Exceptions
ValueErrorif path contains an object which is not a component
ValueErrorif ob is not a net

Definition at line 53 of file conn.py.

def xorn.geda.netlist.conn.s_conn_check_midpoint (   instance,
  x,
  y 
)

Checks if a point is on an orthogonal net segment and between its endpoints.

Returns
whether the net segment has horizontal or vertical orientation, the point is on the net segment, and it is not identical with one of its endpoints
Exceptions
ValueErrorif path contains an object which is not a component
ValueErrorif ob is not a net

Definition at line 99 of file conn.py.

def xorn.geda.netlist.conn.s_conn_update_line_object (   path,
  ob,
  instances_by_endpoint,
  horizontal_instances,
  vertical_instances 
)

Return all connections of a net instance.

This function searches for all geometrical conections of the net instance (path, ob) to all other connectable objects in the revision.

Definition at line 138 of file conn.py.

Variable Documentation

tuple xorn.geda.netlist.conn.Connection
Initial value:
1 = collections.namedtuple('Connection', [
2  'x', 'y', 'type', 'path0', 'ob0', 'path1', 'ob1', 'whichend0', 'whichend1'
3 ])

A single connection between two objects.

Each instance represents a single unidirectional connection between two objects. The connection type is always in reference to how ob1 is connected to ob0.

Definition at line 42 of file conn.py.