diff options
author | Karl Berry <karl@freefriends.org> | 2020-02-17 22:15:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-02-17 22:15:57 +0000 |
commit | 1517aa8d6a39c67f54d541b55ef9b4f2b85b64d1 (patch) | |
tree | 85baa48ec3ec410b2c3d7439e4088f65dc95111d /Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 | |
parent | 4cd4f4003232c8e0e50766507fe129ec5cce8603 (diff) |
circuit-macros (17feb20)
git-svn-id: svn://tug.org/texlive/trunk@53821 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/circuit-macros/libcct.m4')
-rw-r--r-- | Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 | 427 |
1 files changed, 335 insertions, 92 deletions
diff --git a/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 b/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 index f8a98a84c08..b213af9e91f 100644 --- a/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 +++ b/Master/texmf-dist/doc/latex/circuit-macros/libcct.m4 @@ -1,12 +1,12 @@ divert(-1) libcct.m4 -* Circuit_macros Version 9.1, copyright (c) 2019 J. D. Aplevich under * -* the LaTeX Project Public License. The files of this distribution may * -* be redistributed or modified provided that this copyright notice is * -* included and provided that modifications are clearly marked to * -* distinguish them from this distribution. There is no warranty * -* whatsoever for these files. * +* Circuit_macros Version 9.2, copyright (c) 2020 J. D. Aplevich under * +* the LaTeX Project Public Licence in file Licence.txt. The files of * +* this distribution may be redistributed or modified provided that this * +* copyright notice is included and provided that modifications are clearly * +* marked to distinguish them from this distribution. There is no warranty * +* whatsoever for these files. * define(`libcct_') ifdef(`libgen_',,`include(libgen.m4)divert(-1)') @@ -826,6 +826,16 @@ define(`memristor',`eleminit_(`$1') line to rvec_(max(0,rp_len/2-m4wd/2),0) } line invis to rvec_(rp_len,0)') + `pvcell( linespec, wid, ht )' +define(`pvcell',`eleminit_(`$1') + define(`m4wd',ifelse(`$2',,`dimen_/2',`($2)'))dnl + define(`m4ht',ifelse(`$3',,`dimen_/5',`($3)'))dnl + { line to rvec_(max(0,rp_len/2-m4wd/2),0) + {[lbox(m4wd,m4ht)] at rvec_(m4wd/2,0)} + {line from rvec_(0,-m4ht/2) to rvec_(m4wd/3,0) then to rvec_(0,m4ht/2)} + move to rvec_(m4wd,0); line to rvec_(max(0,rp_len/2-m4wd/2),0) } + line invis to rvec_(rp_len,0)') + `heater( linespec, nparts, wid, ht )' define(`heater',`eleminit_(`$1') define(`m4hn',ifelse(`$2',,4,`$2'))dnl @@ -874,9 +884,9 @@ eleminit_(`$1') { [ circle rad dimen_/5 ] at rvec_(rp_len/2,m4ng`'dimen_/3.2) } line invis to rvec_(rp_len,0) ') - `cbreaker( linespec, L|R, D|T|TS ) + `cbreaker( linespec, L|R, D|Th|TS ) circuit breaker to left or right of linespec, - D=with dots; T=thermal; TS=squared thermal' + D=with dots; Th=thermal; TS=squared thermal' define(`cbreaker',`ifinstr(`$3',T, `tbreaker($@)', `mbreaker($@)')') @@ -934,6 +944,7 @@ define(`gap',`eleminit_(`$1') line with midpoint arrowhead e.g. arrowline(up 1 dotted); llabel(,I_2)' define(`arrowline',`line ifelse(`$1',,`to rvec_(elen_,0)',`$1') + { eleminit_(from last line.start to last line.end) } { arrow from last line.start to last line.end \ chop lin_leng(last line)/2-arrowht/2 [box invis ht_ arrowwid wid_ arrowht] at last line.c }') @@ -1055,8 +1066,11 @@ define(`antenna',`[ T: Here `switch( linespec,L|R,[O|C][D],L|B|D ) Wrapper for bswitch, lswitch, dswitch R=right orientation (default L=left) - if arg4=blank or L: arg3 = [O|C][D][K][A] - D=dotted points; K=closed switch; + if arg4=blank or L: + arg3 = [O|C][D][K][A] + D = circle at contact and hinge (dD = hinge + only, uD = contact only) + K=closed switch; A=arrowhead on switch blade; O=opening arrow; C=closing arrow if arg4=B (button switch): arg3 = O|C @@ -1096,8 +1110,10 @@ define(`bswitch',`eleminit_(`$1') dnl `lswitch( linespec,L|R,chars ) knife switch R=right orientation (default L=left) - chars=[O|C][D][K][A] - D=dotted points; K=closed switch; + chars=[O|C][[ud]D][K][A] + D = circle at contact and hinge (dD = hinge + only, uD = contact only) + K=closed switch; A=arrowhead on switch blade; O=opening arrow; C=closing arrow' define(`lswitch',`eleminit_(`$1') dnl @@ -1112,7 +1128,6 @@ define(`lswitch',`eleminit_(`$1') dnl line from rvec_(dimen_/3,0) to rvec_(dimen_/3,ifelse(`$2',R,-)dotrad_)}', `{ifinstr(`$3',A,arrow m4c_l,line) \ to rvec_(dimen_/4,ifelse(`$2',R,-)dimen_/4)}') - sc_draw(`dna_',D,`dot(,,1) define(`m4d',1)') sc_draw(`dna_',C,`{ arc <- m4c_l ifelse(`$2',R,,`c')cw \ from rvec_(Rect_(dimen_/4,ifelse(`$2',R,,-)m4k))\ to rvec_(Rect_(dimen_/4,ifelse(`$2',R,-)60)) \ @@ -1121,14 +1136,17 @@ define(`lswitch',`eleminit_(`$1') dnl from rvec_(Rect_(dimen_/4,ifelse(`$2',R,,-)10))\ to rvec_(Rect_(dimen_/4,ifelse(`$2',R,-)75)) \ with .c at rvec_(Rect_(-dimen_/4,ifelse(`$2',R,-)(75-10)/2)) }') } - { line from rvec_(rp_len/2+dimen_/6,0) \ - to rvec_(rp_len,0) - ifelse(m4d,-1,,`dot(at last line.start,,1)') } + {{line from rvec_(rp_len/2+dimen_/6,0) \ + to rvec_(rp_len,0) } + sc_draw(`dna_',D, + `ifelse(m4a,u,,`dot(at rvec_(rp_len/2-dimen_/6,0),,1)') + ifelse(m4a,d,,`dot(at last line.start,,1)')') } { [box invis ht_ dimen_/4+m4cs wid_ dimen_/3] \ with .c at rvec_(rp_len/2,ifelse(`$2',R,-)(m4v-(m4cs))/2)} arrowht = m4t1 ; arrowwid = m4t2; ifelse(`$4',,,`{`$4'}') line to rvec_(rp_len,0) invis ') + `dswitch(linespec,R,W[ud]B[K] chars) Comprehensive IEEE-IEC single-pole switch: arg2=R: orient to the right of drawing dir @@ -1136,14 +1154,17 @@ define(`lswitch',`eleminit_(`$1') dnl blank means WB by default W=baseline B=contact blade + Bm= mirror blade Bo=contact blade more widely open dB=contact blade to the right of direction K=vertical closing contact line use WdBK for a normally-closed switch - + Cb = circuit breaker function (IEC S00219) + Co = contactor function (IEC S00218) C = external operating mechanism D = circle at contact and hinge (dD = hinge only, uD = contact only) + DI = Disconnector; isolator (IEC S00288) E = emergency button EL = early close (or late open) LE = late close (or early open) @@ -1160,7 +1181,9 @@ define(`lswitch',`eleminit_(`$1') dnl O = hand operation button P = pushbutton R = time-delay operating arm - T = thermal control linkage + Sd = Switch-disconnector + Th = thermal control linkage + Tr = tripping Y = pull switch Z = turn switch' define(`dswitch',`eleminit_(`$1') @@ -1171,6 +1194,13 @@ define(`m4R',`ifelse(`$2',R,-)')define(`m4sc',`dimen_/24')dnl { line to tr_xy(-4,0) line from tr_xy(4,0) \ to 2nd last line.end + sc_draw(`dna_',Bm, + `define(`m4c',ifelse(m4a,d,-))dnl + M4B: line from tr_xy(-4,0) \ + to tr_xy(5.0,m4c`'4.5) + line invis from M4B.start to M4B.end chop 0 chop -m4_xyU*5/4 + m4fshade(0,circle rad m4_xyU*5/4 at last line .end) + M4Q: 2 between M4_xyO and M4B.c') sc_draw(`dna_',Bo, `define(`m4c',ifelse(m4a,d,-))dnl M4B: line from tr_xy(-4,0) \ @@ -1179,8 +1209,17 @@ define(`m4R',`ifelse(`$2',R,-)')define(`m4sc',`dimen_/24')dnl sc_draw(`dna_',B, `define(`m4c',ifelse(m4a,d,-))dnl M4B: line from tr_xy(-4,0) \ - to tr_xy(5.5,m4c`'4) + to tr_xy(5.0,m4c`'4.5) M4Q: 2 between M4_xyO and M4B.c') + sc_draw(`dna_',Cb, + `line from tr_xy(2,-2) to tr_xy(6, 2) + line from tr_xy(2, 2) to tr_xy(6,-2) + M4Q: tr_xy(0,-2) ') + sc_draw(`dna_',Co,`ifelse(m4R,-, + `M4Arc: arc ifelse(m4c,-,,c)cw from tr_xy(4,0) \ + to tr_xy(8,0) with .c at tr_xy(6,0)', + `M4Arc: arc ifelse(m4c,-,c)cw from tr_xy(4,0) \ + to tr_xy(8,0) with .c at tr_xy(6,0)') ') sc_draw(`dna_',MMR, `line from tr_xy(6,1.16) \ to tr_xy(4,0) \ @@ -1193,6 +1232,9 @@ define(`m4R',`ifelse(`$2',R,-)')define(`m4sc',`dimen_/24')dnl `line from tr_xy(5,0) \ to tr_xy(4,0) \ then to tr_xy(6,-1.16)') + sc_draw(`dna_',DI, + `line from tr_xy(4,2) to tr_xy(4,-2) + M4Q: tr_xy(0,-2) ') sc_draw(`dna_',D, `ifelse(m4a,u,,`dot(at tr_xy(-4,0),,1)') ifelse(m4a,d,,`dot(at tr_xy(4,0),,1)')') @@ -1208,7 +1250,7 @@ define(`m4R',`ifelse(`$2',R,-)')define(`m4sc',`dimen_/24')dnl `line from tr_xy(4,0) \ to tr_xy(4,m4c`'5)') sc_draw(`dna_',F, - `M4dT: 3/16 along_(M4B); M4dQ: 11/16 along_(M4B) + `M4dT: 1/8 along_(M4B); M4dQ: 5/8 along_(M4B) line from M4dT to M4dT + ta_xy(neg_(m4c)1/2,1) \ then to M4dQ + ta_xy(neg_(m4c)1/2,1) \ then to M4dQ + ta_xy(m4c`'1/2,-1) \ @@ -1219,7 +1261,12 @@ define(`m4R',`ifelse(`$2',R,-)')define(`m4sc',`dimen_/24')dnl line from 5/16 along_(M4B) \ to M4dT + ta_xy(neg_(m4e)1,ifelse(m4c,m4e,,-)2) \ then to M4dT') - sc_draw(`dna_',T, + sc_draw(`dna_',Sd, + `dot(at tr_xy(4,0),m4_xyU*3/2,1) + line from tr_xy(4,2)+vec_(m4_xyU*3/2,0) \ + to tr_xy(4,-2)+vec_(m4_xyU*3/2,0) + M4Q: tr_xy(0,-2) ') + sc_draw(`dna_',Th, `define(`m4t',ifelse(m4a,d,-))dnl M4T: M4B.c+ta_xy(0,m4t`'12) line from M4B.c to M4B.c+ta_xy(0,m4t`'4.5) \ @@ -1227,6 +1274,13 @@ define(`m4R',`ifelse(`$2',R,-)')define(`m4sc',`dimen_/24')dnl then to M4B.c+ta_xy(3,m4t`'7.5) \ then to M4B.c+ta_xy(0,m4t`'7.5) \ then to M4T ') + sc_draw(`dna_',Tr, + `m4angtmp = rp_ang; point_(lin_ang(M4B)) + M4dT1: 0.4 along_(M4B); M4dT2: 0.65 along_(M4B) + m4dTr = distance(M4dT1,M4dT2) + move to M4dT1+vec_(0,m4c`'m4dTr/2) + m4fshade(0,lbox(m4dTr,m4dTr)) + point_(m4angtmp) ') sc_draw(`dna_',M, `define(`m4t',ifelse(m4a,d,-))dnl M4T: M4B.c+ta_xy(0,m4t`'12) @@ -2238,29 +2292,31 @@ define(`m4label',`dnl `{m4lstring(`$3',"sp_`'iflatex(`$ `$3'$',`$3')`'sp_") \ at last [].e_ $5 ljust_ $6};')dnl ') - `Labels for oblique or aligned elements - dlabel(long,lateral,label,label,label,chars) - long, lateral: dispacement with respect to - drawing direction + `dlabel(long,lateral,label,label,label,chars) + Labels for oblique or aligned elements + long, lateral: dispacement from center + with respect to drawing direction chars: X displacement is from the centre of the last line rather than the centre of the last [] L,R,A,B align labels ljust, rjust, above, or below (absolute) respectively' define(`dlabel',`ifsvg(`changecom(,)')dnl + define(`m4long_',`ifelse(`$1',,`dimen_',`($1)')')dnl + define(`m4lat_',`ifelse(`$2',,`10bp__',`($2)')')dnl ifelse(`$3',,, `{m4lstring(`$3',"iflatex(`$ `$3'$',` $3')") \ - at last ifinstr(`$6',X,line,[]).c+vec_(-(`$1'),`$2') \ + at last ifinstr(`$6',X,line,[]).c+vec_(-m4long_,m4lat_) \ ifinstr(`$6',L,ljust,`$6',R,rjust) dnl ifinstr(`$6',A,above,`$6',B,below) };') dnl ifelse(`$4',,, `{m4lstring(`$4',"iflatex(`$ `$4'$',` $4')") \ - at last ifinstr(`$6',X,line,[]).c+vec_(0,`$2') \ + at last ifinstr(`$6',X,line,[]).c+vec_(0,m4lat_) \ ifinstr(`$6',L,ljust,`$6',R,rjust) dnl ifinstr(`$6',A,above,`$6',B,below) };') dnl ifelse(`$5',,, `{m4lstring(`$5',"iflatex(`$ `$5'$',` $5')") \ - at last ifinstr(`$6',X,line,[]).c+vec_(`$1',`$2') \ + at last ifinstr(`$6',X,line,[]).c+vec_(m4long_,m4lat_) \ ifinstr(`$6',L,ljust,`$6',R,rjust) dnl ifinstr(`$6',A,above,`$6',B,below) };') ifsvg(`changecom(`#',)')') @@ -2462,48 +2518,264 @@ define(`m4xR',ifinstr(`$2',R,R))define(`m4SR',ifelse(m4xR,R,-))dnl DL: line dashed to rvec_(0,m4SR`'(m4np-3/4)*dimen_/2)') `$3']') - `relay(npoles,chars,[L|R]) + + `relay(npoles,chars) arg1: Number of poles (max 10) chars: + any of the relaycoil options and: O = normally open C = normally closed - P = three position - neither = double-throw (default) - L = drawn left (default) - R = drawn right - T = thermal - arg3: deprecated, kept for compatibility + P = three-position + none of above = double-throw (default) L = drawn left (default) - R = drawn right ' -define(`relay',`[ define(`m4n',`ifinstr(`$2',R,-,`$3',R,-,0+)') -V1: Here - L1: line to rvec_(dimen_/5,0) - Box: lbox(dimen_/5,dimen_/2) - ifinstr(`$2',T,`{move to rvec_(-dimen_/10,0) - line from rvec_(-dimen_/20,dimen_/6) \ - to rvec_(-dimen_/20,dimen_/20) \ + R = drawn to right of drawing direction + Th = thermal ' +define(`relay',`[ define(`m4pm',`ifinstr(`$2',R,-)')dnl + Coil: relaycoil(`$2') define(`m4rel',rcdna_) + V1: Coil.V1 + V2: Coil.V2 + sc_draw(m4rel,Th, + `{move to Coil #rvec_(-dimen_/8,0) + line from rvec_(-dimen_/20,dimen_/6) \ + to rvec_(-dimen_/20,dimen_/20) \ then to rvec_(dimen_/20,dimen_/20) \ - then to rvec_(dimen_/20,-dimen_/20) \ + then to rvec_(dimen_/20,-dimen_/20) \ then to rvec_(-dimen_/20,-dimen_/20) \ - then to rvec_(-dimen_/20,-dimen_/6)}') - L2: line to rvec_(ifinstr(`$2',P,,2*)dimen_/5,0) -V2: Here - move to V2+vec_(0,m4n (dimen_/4+dimen_/5)) - m4_contacts(1,ifelse(`$1',,1,`$1'), - ifinstr(`$2',O,O,`$2',C,C)`'ifinstr(`$2',P,P)`'ifinstr(`$2',I,I), - ifinstr(`$3',R,R,`$2',R,R)) - ifelse(`$1',,,`ifelse(eval(`$1'>1),1,`DL: line dashed \ - from P1+vec_(dimen_*0.261,-(m4n dimen_/10)) \ - to P`'ifelse(`$1',,1,`$1')+vec_(dimen_*0.261,m4n dimen_/10)')') - `$4'] ') -define(`m4_contacts',`contact(`$3',`$4') with .O at Here - define(`m4v',`ifelse(`$1',,1,`$1')')dnl - P`$1': circle invis rad dotrad_ at last [].P - ifelse(`$3',O,,C`$1': last [].C) - ifelse(`$3',C,,O`$1': last [].O) - ifelse(m4v,`$2',, - `move to last[].C+(0,m4n dimen_/5) - ifelse(eval(m4v<11),1,`m4_contacts(incr(m4v),`$2',`$3',`$4')')')') + then to rvec_(-dimen_/20,-dimen_/6)}') + Cs: contacts(ifelse(`$1',,1,`$1'),D`'m4rel) with .O1 at Coil.B2 + \ + vec_(ifinstr(m4rel,P,-dimen_/5,0)+dimen_/4,m4pm`'(dimen_/4+dimen_/5)) + for_(1,ifelse(`$1',,1,`$1'),1, + `P`'m4x: Cs.P`'m4x + C`'m4x: Cs.C`'m4x + O`'m4x: Cs.O`'m4x') + `$3'] ') + + `contacts(npoles,chars) + chars: + P= three position + O|C= normally open, normally closed (default) + R= right orientation (default left) + I= open circles for contacts + T= T contacts + U= U contacts + D= dashed line across armatures' + `e.g. contacts(1,5,O)' +define(`contacts',`[ + define(`m4np',`ifelse(`$1',,1,`$1')')dnl + ifelse(eval(m4np>10),1,`define(`m4np',10)')dnl + for_(1,m4np,1, + `K`'m4x: contact(`$2') with .O at Here + P`'m4x: circle invis rad dotrad_ at last [].P + C`'m4x: last [].C + O`'m4x: last [].O + ifelse(m4x,m4np,,`move to last[].C+vec_(0,m4pm dimen_/4)')') + ifelse(eval(m4np>1),1,`ifinstr(`$2',D, + `DL: line dashed from K1.A.c to K`'m4np.A.c chop -dimen_/10')') + `$3'] ') + + `contact(chars [,R]) Relay contact switch + Arg 2 deprecated, kept for compatibility + chars: + O|C= normally open, normally closed (default) + I= open circles for contacts + P= three position + R= right orientation (default left) + T= T contacts + U = line contact' +define(`contact',`[ dnl + define(`m4pm',`ifelse(ifinstr(`$1',R,R,`$2',R,R),R,-)')dnl + define(`m4dr',`dotrad_')define(`m4TL',dimen_/12)dnl + P: dot(,m4dr,1) + T: P+vec_(dimen_/2-dimen_/12,0) + ifinstr(`$1',P,`ifinstr( + `$1',I, + `{C: dot(at T+vec_(0,m4pm`'(dimen_/8+m4dr*2+lthick/2)),m4dr,1)} + {O: dot(at T-vec_(0,m4pm`'(dimen_/8+m4dr*2+lthick/2)),m4dr,1)} + A: line from P to ifinstr( + `$1',O,`(LCtangent(P,O,dotrad_+lthick/2)) chop m4dr chop -m4dr', + `$1',C,`(LCtangent(P,C,dotrad_+lthick/2,R)) chop m4dr chop -m4dr', + `P+vec_(dimen_/2,0) chop m4dr chop 0')', + `$1',U, + `{C: T+vec_(m4TL*2,m4pm`'(dimen_/6)) + line from C to C-vec_(2*m4TL,0)} + {O: T+vec_(m4TL*2,m4pm`'(-dimen_/6)) + line from O to O-vec_(2*m4TL,0)} + A: line from P to ifinstr( + `$1',O,`O-vec_(2*m4TL-dimen_/27,0) chop m4dr chop -m4dr', + `$1',C,`C-vec_(2*m4TL-dimen_/27,0) chop m4dr chop -m4dr', + `P+vec_(dimen_/2,0) chop m4dr chop 0')', + `$1',T, + `{CC: T+vec_(0,m4pm`'(dimen_/8+m4TL*2/3)) + C: line from CC+vec_(0,-m4TL) to CC+vec_(0,m4TL) } + {OO: T-vec_(0,m4pm`'(dimen_/8+m4TL*2/3)) + O: line from OO+vec_(0,-m4TL) to OO+vec_(0,m4TL) } + A: line from P to ifinstr( + `$1',O,`1/6 between O.end and O.start chop m4dr chop -m4dr', + `$1',C,`1/6 between C.start and C.end chop m4dr chop -m4dr', + `P+vec_(dimen_/2,0) chop m4dr chop 0')', + `{AC: arrow m4c_l <- ht dimen_/6 wid dimen_/6 \ + from T+vec_(0,m4pm`'dimen_/8) to T+vec_(0,m4pm`'dimen_*3/8) \ + then to T+vec_(dimen_/5,m4pm`'dimen_*3/8) + C: Here} + {AO: arrow m4c_l <- ht dimen_/6 wid dimen_/6 \ + from T-vec_(0,m4pm`'dimen_/8) to T+vec_(0,-(m4pm`'dimen_*3/8)) \ + then to T+vec_(dimen_/5,-(m4pm`'dimen_*3/8)) + O: Here} + A: line from P to ifinstr( + `$1',O,`AO.start chop m4dr chop -m4dr', + `$1',C,`AC.start chop m4dr chop -m4dr', + `P+vec_(dimen_/2,0) chop m4dr chop 0')') ', # end of P + `A: line from P to P+vec_(dimen_/2,0) chop m4dr chop 0 + define(`m4CO', + `ifinstr(`$1',C,`ifinstr(`$1',O,O)C',`ifinstr(`$1',O,O,OC)')')dnl + ifinstr(m4CO,C, + `move to T + ifinstr( + `$1',I, + `{ C: dot(at rvec_(0,m4pm`'(m4dr+lthick/2)),m4dr,1) } + ifinstr(m4CO,O,,`O: Here')', + `$1',U, + `{C: T+vec_(m4TL*2,m4pm`'(dimen_/6)) + line from C to C-vec_(2*m4TL,0)} + ifinstr(m4CO,O,,`O: Here')', + `$1',T, + `CC: rvec_(0,m4pm`'(m4TL*2/3)) + { C: line from CC+vec_(0,-m4TL) to CC+(0,m4TL) } + ifinstr(m4CO,O,,`O: T') ', + `{AC: arrow m4c_l <- ht dimen_/6 wid dimen_/6 \ + to rvec_(0,m4pm`'dimen_/4) \ + then to rvec_(dimen_/5,m4pm`'dimen_/4) + C: Here } + O:rvec_(dimen_/5,0)') ') + ifinstr(m4CO,O, + `move to T+vec_(0,-(m4pm`'dimen_/8)) + ifinstr( + `$1',I, + `{O: dot(at rvec_(0,m4pm`'(-m4dr*2)),m4dr,1) } + ifinstr(m4CO,C,,`C: T ')', + `$1',U, + `{O: T+vec_(m4TL*2,m4pm`'(-dimen_/6)) + line from O to O-vec_(2*m4TL,0)} + ifinstr(m4CO,C,,`C: T ')', + `$1',T, + `{ OO: (rvec_(0,m4pm`'(-m4TL*2/3))) + O: line from OO+vec_(0,-m4TL) to OO+vec_(0,m4TL)} + ifinstr(m4CO,C,,`C: T ')', + `{AO: arrow m4c_l <- ht dimen_/6 wid dimen_/6 \ + to rvec_(0,-(m4pm`'dimen_/4)) \ + then to rvec_(dimen_/5,-(m4pm`'dimen_/4)) + O: Here } + ifinstr(m4CO,C,,`C: T+vec_(dimen_/5,0)') ') ') + ') + `$3'] ') + + + `relaycoil( chars, wid, ht, U|D|L|R|degrees ) + chars: + X or default: external lines from A2 and B2 + AX external lines at positions A1,A3 + BX external lines at positions B1,B3 + NX no lines at positions A1,A2,A3,B1,B2,B3 + SO slow operating + SOR slow operating and release + SR slow release + HS hight speed + HS hight speed + NAC unaffected by AC current + AC AC current + ML mechanically latched + PO polarized + RM remanent + RH remanent + TH thermal + EL electronic' +define(`relaycoil',`[ ifelse(`$4',,,`setdir_(`$4')') + define(`m4wd',ifelse(`$2',,`dimen_/4',`($2)'))dnl + define(`m4ht',ifelse(`$3',,`dimen_/2',`($3)'))dnl + define(`m4LL',`ifinstr(`$4',NX,0,dimen_/3)')dnl + define(`rcdna_',ifinstr(`$1',AX,,`$1',BX,,`$1',X,,X)`$1')dnl + { lbox( m4wd, m4ht ) } + { A1: rvec_(0,m4ht/4) + A2: Here; V1: A2 + A3: rvec_(0,-m4ht/4) } + { B1: rvec_(m4wd,m4ht/4) + B2: rvec_(m4wd,0); V2: B2 + B3: rvec_(m4wd,-m4ht/4) } + sc_draw(`rcdna_',AX, + `{ line from A1 to A1+vec_(-dimen_/3,0); V1: Here + line from A3 to A3+vec_(-dimen_/3,0); V2: Here }') + sc_draw(`rcdna_',BX, + `{ line from B1 to B1+vec_( dimen_/3,0); V1: Here + line from B3 to B3+vec_( dimen_/3,0); V2: Here }') + sc_draw(`rcdna_',NX) + sc_draw(`rcdna_',X, + `{ line to rvec_(-dimen_/3,0); V1: Here + move to B2; line to rvec_(dimen_/3,0); V2: Here }') + sc_draw(`rcdna_',SOR, + `{ move to rvec_(0,-(m4ht*5/8)); {lbox(m4wd,m4ht/4)} + {line from rvec_(0,-m4ht/8) to rvec_(m4wd, m4ht/8)} + {line from rvec_(0, m4ht/8) to rvec_(m4wd,-m4ht/8)} + {move to rvec_(0,-(m4ht)*3/8); m4fshade(0,lbox(m4wd,m4ht/4))} + {move to rvec_(0,-(m4ht)/8) + {line to rvec_(0,-m4ht/8)} + {line from rvec_(m4wd,0) to rvec_(m4wd,-m4ht/8)}} }') + sc_draw(`rcdna_',SO, + `{ move to rvec_(0,-(m4ht*5/8)); m4fshade(0,lbox(m4wd,m4ht/4)) }') + sc_draw(`rcdna_',SR, + `{ move to rvec_(0,-(m4ht*5/8)); {lbox(m4wd,m4ht/4)} + {line from rvec_(0,-m4ht/8) to rvec_(m4wd, m4ht/8)} + {line from rvec_(0, m4ht/8) to rvec_(m4wd,-m4ht/8)} }') + sc_draw(`rcdna_',HS, + `{ move to rvec_(0,-(m4ht*5/8)); lbox(m4wd,m4ht/4) } + { move to rvec_(m4wd/2,-(m4ht/2)); line to rvec_(0,-m4ht/4)} ') + sc_draw(`rcdna_',NAC, + `{ m4fshade(0,lbox(m4wd/4,m4ht)) } + { move to rvec_(m4wd*3/4,0); m4fshade(0,lbox(m4wd/4,m4ht)) } ') + sc_draw(`rcdna_',AC, + `{ move to rvec_(0,-(m4ht*3/4)); { lbox(m4wd,m4ht/2) } + move to rvec_(m4wd/2,0) + ifgpic( + `arc rad m4wd/3 cw from Here-(m4wd*2/3,0) \ + to Here with .c at Here-(m4wd/3,0) + arc rad m4wd/3 ccw from Here to Here+(m4wd*2/3,0) with .c \ + at Here+(m4wd/3,0)', + ` sinusoid(m4wd/3,twopi_/(m4wd*2/3),pi_/2,-m4wd/3,m4wd/3) \ + with .Origin at Here ') }') + sc_draw(`rcdna_',ML, + `{ move to rvec_(0,-(m4ht*11/16)); { lbox(m4wd,m4ht*3/8) } + line from rvec_(0,m4ht*3/16) to rvec_(m4wd/2,-m4ht*3/16) \ + then to rvec_(m4wd,m4ht*3/16) } ') + sc_draw(`rcdna_',PO, + `{ move to rvec_(0,-(m4ht*5/8)); { lbox(m4wd,m4ht/4) } + m4fshade(0, line to rvec_(0,m4ht/8) \ + then to rvec_(m4wd,m4ht/8) \ + then to rvec_(m4wd,-m4ht/8) \ + then to rvec_(m4wd*3/4,-m4ht/8) \ + then to rvec_(m4wd*3/4,0) \ + then to rvec_(m4wd/4,0) \ + then to rvec_(m4wd/4,-m4ht/8) \ + then to rvec_(0,-m4ht/8) \ + then to Here) } ') + sc_draw(`rcdna_',RM, + `{ move to rvec_(0,-(m4ht*5/8)); { lbox(m4wd,m4ht/4) } + line from rvec_(0,m4ht/8) to rvec_(m4wd,-m4ht/8) }') + sc_draw(`rcdna_',RH, + `{ move to rvec_(0,-(m4ht*11/16)); { lbox(m4wd,m4ht*3/8) } + line from rvec_(m4wd/4,m4ht/8) \ + to rvec_(m4wd/4,m4ht/32) \ + to rvec_(m4wd*3/4,-m4ht/32) \ + to rvec_(m4wd*3/4,-m4ht/8) }') + sc_draw(`rcdna_',TH, + `{ line to rvec_(m4wd/4,0) then to rvec_(m4wd/4,m4ht/4) \ + then to rvec_(m4wd*3/4,m4ht/4) \ + then to rvec_(m4wd*3/4,0) \ + then to rvec_(m4wd,0) }') + sc_draw(`rcdna_',EL, + `{ { line from rvec_(m4wd/4,0) to rvec_(m4wd*3/4,0) } + { line from rvec_(m4wd*3/8,0) to rvec_(m4wd*3/16,m4ht*3/16) } + { line from rvec_(m4wd*5/8,0) to rvec_(m4wd*13/16,m4ht*3/16) } + { line from rvec_(m4wd/2,0) to rvec_(m4wd/2,-m4ht/4) } }') + `$5'] ') `reed(linespec,wid,ht,box attributes,[R][C]) Enclosed two-terminal reed contact; @@ -2523,35 +2795,6 @@ define(`reed',`eleminit_(`$1') {[box invis ht_ m4ht wid_ m4wd] at rvec_(rp_len/2,0)} line to rvec_(rp_len,0) invis ') - `contact(chars [,R]) Relay contact switch - Arg 2 deprecated, kept for compatibility - chars: - P|O|C= three position, normally open, - normally closed - R= right orientation (default left) - I= open circles for contacts' -define(`contact',`[define(`m4n',`ifelse(ifinstr(`$1',R,R,`$2',R,R),R,-,0+)')dnl - define(`m4dr',`dotrad_')dnl - P: dot(,m4dr,1); line to rvec_(dimen_/2,0) chop m4dr chop 0 - T: P+vec_(dimen_/2-dimen_/12,0) - O: circle invis rad dotrad_ at T+vec_(dimen_/5,-(m4n dotrad_)) - C: circle invis rad dotrad_ at T+vec_(dimen_/5,m4n dotrad_) - ifinstr(`$1',O,,`move to T ifinstr(`$1',P,`+vec_(0,m4n`'dimen_/8)') - ifinstr(`$1',I, - `C: dot(at rvec_(0,m4n`'(m4dr`'ifinstr(`$1',P,*2)+lthick/2)),m4dr,1)', - `arrow m4c_l <- ht dimen_/6 wid dimen_/6 \ - to rvec_(0,m4n`'dimen_/4) \ - then to rvec_(dimen_/5,m4n`'dimen_/4) - C: Here')') - ifinstr(`$1',C,,`move to T+vec_(0,-(m4n`'dimen_/8)) - ifinstr(`$1',I, - `O: dot(at rvec_(0,m4n`'(-m4dr*2)),m4dr,1)', - `arrow m4c_l <- ht dimen_/6 wid dimen_/6 \ - to rvec_(0,-(m4n`'dimen_/4)) \ - then to rvec_(dimen_/5,-(m4n`'dimen_/4)) - O: Here')'); `$3'] ') - - `ccoax(at location,M|F,diameter)' define(`ccoax',`[define(`m4cd',ifelse(`$3',,`dimen_*0.4',`$3'))dnl S: circle diam m4cd |