Next: , Previous: , Up: Core object functions   [Contents][Index]


2.2.3 Nets and buses

Net and bus objects are straight line segments which represent electrical connectivity. Nets represent single wires, and buses multi-wire connections of arbitrary composition.

All of the functions that work on line objects also work with nets and buses (see Lines). Note that line? will return #f if called with a net or bus argument.

Function: net? object

Returns ‘#t’ if and only if object is a net.

Function: make-net start end [color]

Creates and returns a new net object. start is the position of the start of the new net in the form (x . y) and end is the position of end of the net. If color is specified, it should be the integer color map index of the color with which to draw the net. If color is not specified, the default net color is used.

Function: bus? object

Returns ‘#t’ if and only if object is a bus.

Function: make-bus start end [color]

Creates and returns a new bus object. Arguments are as for make-net.