Index: trunk/pcblib/parametric/acy =================================================================== --- trunk/pcblib/parametric/acy (nonexistent) +++ trunk/pcblib/parametric/acy (revision 345) @@ -0,0 +1,17 @@ +#!/bin/sh + +#@@example acy(300) + +#@@purpose Generate axial lead tru-hole component + +#@@desc Generate axial lead tru-hole component with 2 pins (typical use: resistor) +#@@params spacing,pol,dia + +#@@param:spacing spacing between the two pins +#@@pol: how to mark polarity (optional; default: do not mark polarity) +#@@dia: body diameter - affects the silk rectangle (optional; default: spacing/12) + +#@@include common.awk + +awk -f `dirname $0`/common.awk -f `dirname $0`/acy.awk -v "args=$*" + Property changes on: trunk/pcblib/parametric/acy ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/pcblib/parametric/acy.awk =================================================================== --- trunk/pcblib/parametric/acy.awk (nonexistent) +++ trunk/pcblib/parametric/acy.awk (revision 345) @@ -0,0 +1,20 @@ +BEGIN { + + proc_args(P, "spacing,pol,dia", "spacing") + + spacing = parse_dim(P["spacing"]) + dia = either(parse_dim(P["dia"]), spacing/12) + + offs_x = +spacing/2 + + element_begin("acy" P["spacing"], "R1", "acy" P["spacing"] ,0,0, spacing/2-spacing/5,-mil(20)) + + element_pin(-spacing/2, 0, 1) + element_pin(+spacing/2, 0, 2) + + element_rectangle(-spacing/4, -dia, +spacing/4, +dia) + element_line(-spacing/2, 0, -spacing/4, 0) + element_line(+spacing/4, 0, +spacing/2, 0) + + element_end() +}