real rstlth=2mm;
int normal=0, variable=2;
-TwoTerminal resistor(pair beg, int type, real ang, string name, string val,
- bool draw=true)
+TwoTerminal resistor(pair beg=(0,0), int type=normal, real ang=(0,0),
+ string name="", string val="", bool draw=true)
{
path pLine, pMisc[]={};
TwoTerminal term;
real coil=2mm;
int Up=0, Down=1;
-TwoTerminal inductor(pair beg, int type, real ang, string name, string val,
- bool draw=true)
+TwoTerminal inductor(pair beg=(0,0), int type=Up, real ang=0, string name="",
+ string val="", bool draw=true)
{
path pLine;
TwoTerminal term;
real platsep=1mm;
int normal=0, electrolytic=1, variable=2, variant=3;
-TwoTerminal capacitor(pair beg, int type, real ang, string name, string val,
- bool draw=true)
+TwoTerminal capacitor(pair beg=(0,0), int type=normal, real ang=0,
+ string name="", string val="", bool draw=true)
{
path pLine[]={}, pMisc[]={};
TwoTerminal term;
// capacitors) are also polarized. The positioning method centerto(),
// provides enough flexibility.
-TwoTerminal diode(pair beg, int type, real ang, string name, string val,
- bool draw=true)
+TwoTerminal diode(pair beg=(0,0), int type=normal, real ang=0, string name="",
+ string val="", bool draw=true)
{
path pLine[]={}, pMisc[]={};
real lchar, lcharv;
real bsize = 6mm;
-TwoTerminal battery(pair beg, real ang, string name, string val,
+TwoTerminal battery(pair beg=(0,0), real ang=0, string name="", string val="",
bool draw=true)
{
path pLine[]={}, pMisc[]={};
/* `switch' is a Asymptote keyword (or it should be), so append SPST
* for Single Pole Single Throw.
*/
-TwoTerminal switchSPST(pair beg, int type, real ang, string name, string val,
- bool draw=true)
+TwoTerminal switchSPST(pair beg=(0,0), int type=NO, real ang=0, string name="",
+ string val="", bool draw=true)
{
path pLine[]={}, pMisc[]={};
real lchar, lcharv;
real isize=2mm;
// adjusted from makecirc original to center arrowhead under text
-TwoTerminal current(pair beg, real ang, string name, string val,
+TwoTerminal current(pair beg=(0,0), real ang=0, string name="", string val="",
bool draw=true)
{
path pLine[]={}, pMisc[]={};
real ssize=6mm;
int AC=0,DC=1,I=2,V=3;
-TwoTerminal source(pair beg, int type, real ang, string name, string val,
- bool draw=true)
+TwoTerminal source(pair beg=(0,0), int type=AC, real ang=0, string name="",
+ string val="", bool draw=true)
{
path pLine[]={}, pMisc[]={};
real len, lchar, lcharv;