Skip to content
abetusk edited this page Nov 23, 2014 · 6 revisions

Board Tools

The board tools located in bleepsix/js/brdtool often have a lot of logic in them. This section is meant to briefly describe what the more complex tools are doing.

toolTrace

bleepsix/js/brdtoo/toolTrace.js

toolTrace

toolTrace is in charge of laying down tracks. It keeps track of the current list of track segments while the user clicks.

Things get complicated when collisions occur. The general policy is to keep the last known good state of the layed down tool trace and if a collision occurs, use that last known good state.

There is a feature called 'magnet pads' which 'grabs' the layed down track if they get close enough to a magnetized pad or track. Pads and tracks are magnetized if they are of the same net as the trace being layed down, as implied by the schematic.

toolTrace toolTrace

This is implemented by having a wider area that is considered in the collision detection. Pads and tracks not of the same net will still allow connections but the cursor must be within a smaller region.

toolTrace toolTrace

When collisions are detected, the trace 'ghosts' to allow for continued visual feedback but to give an indication that the trace placement is invalid. The last known good trace placement still appears on the board.

toolTrace

Clone this wiki locally