Akiha-board draws printed wiring board pattern by ASCII-art.

How to use

Node.js

Install Akiha-board:

npm install -g akiha-board

To obtain a SVG file of printed wiring board pattern, you type the below command.

akiha-board [--option=value ...] akiha-board-file

The options are avaibale described later.

Browser

Write this HTML fragment in your HTML file.

<script src="akiha-board.js"></script>

To output printed wiring board pattern, you surround the source of the pattern in script tag whose type attribute is text/x-akiha-board.

Element

Akiha-board has the elements shown as follows.

Table 1. Available elements
Element Description

| or -

wire

o

node

p or

node; if the nodes is neighbored, the nodes will be shorted

+

branch of wire

#

fill the box

*

fill the box and branches the wires

Option

You can specify options by writing the line which begins ;#option=value. The value is optional. If you do not specify the value, the value true is specified.

Table 2. Available options
Option Description

dpi

dot per inch

lineWidth

width of wire by inch

outerRadius

radius of outer node by inch

innerRadius

radius of inner node by inch

positive

output positive pattern

negative

output negative pattern

Example

Input:

;#positive
############
#*##########
 |        ##
 +-----+  ##
 | +-+ |  ##
 ooooooo  ##
          ##
          ##
 opppppo--*#
 +-----+  ##

Output:

svg