schematic.js 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. /* Native vector reconstruction of 114.2.082.002 ПС.
  2. * Component terminals and net membership are explicit so the drawing can be
  3. * checked independently of its teaching animation. Coordinates follow the
  4. * supplied drawing, with extra room around labels and the transformer.
  5. */
  6. function buildLockSchematic() {
  7. const pins = {}, elements = [], wires = [], nets = [], junctions = [];
  8. const esc = value => String(value).replace(/[&<>"']/g, c => ({'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&apos;'}[c]));
  9. const line = d => `<path d="${d}"/>`;
  10. const text = (x,y,value,cls='',anchor='start') => `<text x="${x}" y="${y}" class="${cls}" text-anchor="${anchor}">${esc(value)}</text>`;
  11. const register = (id, terminals, body, label, bounds, extra='') => {
  12. pins[id] = terminals;
  13. const [x,y,w,h] = bounds;
  14. elements.push(`<g class="circuit-part ${extra}" data-part="${esc(id)}" tabindex="0" role="button" aria-label="${esc(id)}: показать описание"><title>${esc(id)} — назначение и состояние</title><rect class="part-hitbox" x="${x}" y="${y}" width="${w}" height="${h}" rx="5"/><g class="part-symbol">${body}</g>${label}</g>`);
  15. };
  16. function resistor(id,x,y,vertical=false,length=50,labelSide=1) {
  17. const terminals = {A:[x,y],B:vertical?[x,y+length]:[x+length,y]};
  18. const middle=length/2;
  19. const body=vertical
  20. ? line(`M${x} ${y}v${middle-14} M${x} ${y+middle+14}V${y+length}`)+`<rect x="${x-5}" y="${y+middle-14}" width="10" height="28"/>`
  21. : line(`M${x} ${y}h${middle-14} M${x+middle+14} ${y}H${x+length}`)+`<rect x="${x+middle-14}" y="${y-5}" width="28" height="10"/>`;
  22. const label=vertical ? text(x+labelSide*12,y+middle+4,id,'component-label',labelSide<0?'end':'start') : text(x+middle,y-13,id,'component-label','middle');
  23. register(id,terminals,body,label,vertical?[x-10,y-4,20,length+8]:[x-4,y-10,length+8,20]);
  24. }
  25. function capacitor(id,x,y,vertical=false,length=40,polar=false,labelPosition=null) {
  26. const middle=length/2, gap=4;
  27. const body=vertical
  28. ? line(`M${x} ${y}V${y+middle-gap} M${x-12} ${y+middle-gap}h24 M${x-12} ${y+middle+gap}h24 M${x} ${y+middle+gap}V${y+length}`)
  29. : line(`M${x} ${y}H${x+middle-gap} M${x+middle-gap} ${y-12}v24 M${x+middle+gap} ${y-12}v24 M${x+middle+gap} ${y}H${x+length}`);
  30. const [lx,ly] = labelPosition || (vertical?[x+18,y+middle-8]:[x+middle,y-19]);
  31. const labels=text(lx,ly,id,'component-label',vertical?'start':'middle')+(polar?text(x-15,y+middle+19,'+','polarity','end'):'');
  32. register(id,{A:[x,y],B:vertical?[x,y+length]:[x+length,y]},body,labels,vertical?[x-16,y-3,32,length+6]:[x-3,y-16,length+6,32]);
  33. }
  34. function diode(id,x,y,{vertical=false,up=false,length=45,labelPosition=null}={}) {
  35. let body, terminals;
  36. if (!vertical) {
  37. const m=x+length/2;
  38. body=line(`M${x} ${y}H${m-9} M${m-9} ${y-9}l18 9l-18 9Z M${m+9} ${y-11}v22 M${m+9} ${y}H${x+length}`);
  39. terminals={A:[x,y],K:[x+length,y]};
  40. } else {
  41. const m=y+length/2;
  42. body=up
  43. ? line(`M${x} ${y}V${m-9} M${x-10} ${m-9}h20 M${x-9} ${m+9}l9 -18l9 18Z M${x} ${m+9}V${y+length}`)
  44. : line(`M${x} ${y}V${m-9} M${x-9} ${m-9}l9 18l9 -18Z M${x-10} ${m+9}h20 M${x} ${m+9}V${y+length}`);
  45. terminals=up?{K:[x,y],A:[x,y+length]}:{A:[x,y],K:[x,y+length]};
  46. }
  47. const [lx,ly]=labelPosition || (vertical?[x+16,y+length/2+4]:[x+length/2,y-16]);
  48. register(id,terminals,body,text(lx,ly,id,'component-label',vertical?'start':'middle'),vertical?[x-14,y-3,28,length+6]:[x-3,y-14,length+6,28]);
  49. }
  50. function thyristor(id,y,stage) {
  51. const x=660, m=y+17.5;
  52. const body=line(`M${x} ${y}V${m-9} M${x-10} ${m-9}h20 M${x-9} ${m+9}l9 -18l9 18Z M${x} ${m+9}V${y+35} M638 ${y+5}h8l10 13`);
  53. register(id,{K:[x,y],A:[x,y+35],G:[638,y+5]},body,text(678,m+5,id,'component-label'),[632,y-6,66,50],`memory-device" data-stage="${stage}`);
  54. }
  55. function transistor(id,cx,cy,{upperEmitter=false,pnp=true,labelPosition=null}={}) {
  56. let body, terminals;
  57. if (upperEmitter) {
  58. // VT1 has its base on the right and its emitter at the top.
  59. terminals={B:[cx+30,cy],E:[cx-10,cy-35],C:[cx-10,cy+35]};
  60. body=`<circle cx="${cx}" cy="${cy}" r="20"/>`+line(`M${cx+10} ${cy-13}v26 M${cx+30} ${cy}H${cx+10} M${cx+10} ${cy-7}l-20 -13v-15 M${cx+10} ${cy+7}l-20 13v15`)
  61. +`<path class="arrow-fill" d="M${cx-8} ${cy-19}l8 2l-4 5Z"/>`;
  62. } else {
  63. terminals={B:[cx-25,cy],C:[cx+10,cy-35],E:[cx+10,cy+35]};
  64. body=`<circle cx="${cx}" cy="${cy}" r="20"/>`+line(`M${cx-10} ${cy-13}v26 M${cx-25} ${cy}H${cx-10} M${cx-10} ${cy-7}l20 -13v-15 M${cx-10} ${cy+7}l20 13v15`)
  65. +`<path class="arrow-fill" d="${pnp?`M${cx-3} ${cy+11}l8 1l-4 5Z`:`M${cx+8} ${cy+19}l-8 -1l4 -5Z`}"/>`;
  66. }
  67. const [lx,ly]=labelPosition||[cx+23,cy-21];
  68. register(id,terminals,body,text(lx,ly,id,'component-label'),[cx-29,cy-39,65,78],`transistor-device" data-device="${id}`);
  69. }
  70. function bridge(id,cx,cy) {
  71. const r=28;
  72. const body=line(`M${cx} ${cy-r}l${r} ${r}l-${r} ${r}l-${r} -${r}Z M${cx-9} ${cy-8}l9 16l9 -16Z M${cx-10} ${cy+9}h20`);
  73. register(id,{MINUS:[cx,cy-r],PLUS:[cx,cy+r],AC1:[cx-r,cy],AC2:[cx+r,cy]},body,
  74. text(cx-12,cy-r-13,id,'component-label')+text(cx+5,cy-r-2,'−','polarity')+text(cx+5,cy+r+13,'+','polarity')+text(cx-r-8,cy+4,'~','polarity','end')+text(cx+r+8,cy+4,'~','polarity'),[cx-38,cy-42,82,85]);
  75. }
  76. function net(id,connections,d,cls='',dots=[]) {
  77. nets.push({id,connections,d});
  78. wires.push(`<path class="net ${cls}" data-net="${id}" d="${d}"/>`);
  79. dots.forEach(([x,y])=>junctions.push(`<circle class="junction ${cls}" cx="${x}" cy="${y}" r="2.5"/>`));
  80. }
  81. // S1 and plug field are drawn as actual contacts and connectors.
  82. let keyboard='<rect class="device-outline" x="268" y="349" width="62" height="420" rx="3"/>'+text(280,370,'S1','component-label')+line('M245 385V790');
  83. const keyPins={C:[245,790]}, plugPins={C:[376,830]};
  84. let plugs='<rect class="device-outline" x="350" y="349" width="89" height="444" rx="3"/>';
  85. for(let i=0;i<10;i++) {
  86. const y=385+i*40, digit=(i+1)%10;
  87. keyboard+=`<g data-key-contact="${digit}">${line(`M245 ${y}h33l13 -10 M297 ${y}H330`)}<circle cx="297" cy="${y}" r="1.8"/>${text(308,y-7,digit,'key-digit')}</g>`;
  88. keyPins['K'+(i+1)]=[330,y]; plugPins['I'+(i+1)]=[400,y]; plugPins['O'+(i+1)]=[435,y];
  89. plugs+=line(`M400 ${y}h7 M407 ${y-6}l6 6l-6 6 M417 ${y-6}l6 6l-6 6 M423 ${y}h12`)+text(393,y-12,`XP${i+1} / XS${i+1}`,'connector-label');
  90. }
  91. keyboard+=text(253,808,'13','pin-label');
  92. plugs+=line('M376 810V830')+text(386,822,'13','pin-label');
  93. register('S1',keyPins,keyboard,'',[235,344,100,467]);
  94. register('XP/XS',plugPins,plugs,'',[343,344,99,490]);
  95. [['R1',385],['R3',425],['R5',465],['R7',505]].forEach(([id,y])=>resistor(id,450,y));
  96. [['R2',475],['R4',545],['R6',615]].forEach(([id,y])=>resistor(id,575,y));
  97. resistor('R8',729,340,true);
  98. resistor('R9',660,685,true,50,-1);
  99. resistor('R11',660,765,true,50,-1);
  100. resistor('R10',730,765,true,50,-1);
  101. resistor('R12',835,685,true,50,-1);
  102. resistor('R13',875,640,true,55,-1);
  103. resistor('R14',875,765,true,50,-1);
  104. resistor('R15',915,580,true,55);
  105. resistor('R16',945,660,true,35,-1);
  106. resistor('R17',955,765,true);
  107. resistor('R18',1020,580,true);
  108. resistor('R19',935,855);
  109. resistor('R20',920,340,true);
  110. capacitor('C1',835,745,true,60,true,[807,783]);
  111. capacitor('C2',1070,710,true,80,true);
  112. capacitor('C3',945,640,false,40,false,[968,616]);
  113. capacitor('C4',620,493); capacitor('C5',620,565); capacitor('C6',620,637);
  114. diode('VD1',555,610,{vertical:true,up:true,length:55,labelPosition:[548,647]});
  115. diode('VD2',580,585,{labelPosition:[603,572]});
  116. diode('VD3',565,680,{vertical:true,length:55,labelPosition:[582,717]});
  117. diode('VD4',580,655,{labelPosition:[603,678]});
  118. [440,510,580,650].forEach((y,i)=>thyristor('VD'+(5+i),y,i+1));
  119. diode('VD9',885,375,{vertical:true,length:40,labelPosition:[901,418]});
  120. transistor('VT1',670,390,{upperEmitter:true,pnp:false,labelPosition:[672,352]});
  121. transistor('VT5',700,720,{labelPosition:[719,685]});
  122. transistor('VT2',780,720,{labelPosition:[775,685]});
  123. transistor('VT3',900,710,{labelPosition:[883,675]});
  124. transistor('VT4',1010,710,{labelPosition:[1020,675]});
  125. register('YA1',{A:[847,375],B:[847,415]},line('M847 375V385 M847 405V415')+'<rect x="831" y="385" width="32" height="20"/>',text(830,363,'YA1','component-label'),[825,371,44,48]);
  126. register('HL1',{A:[920,435],B:[920,465]},'<circle class="lamp-bulb" cx="920" cy="450" r="15"/>'+line('M910 440l20 20 M910 460l20 -20'),text(945,454,'HL1','component-label'),[901,431,70,39]);
  127. register('S2',{A:[980,535],B:[1025,535]},'<circle cx="980" cy="535" r="2.5"/><circle cx="1025" cy="535" r="2.5"/><path id="exitContact" d="M980 535L1015 519"/>'+line('M1005 508v11 M999 508h12'),text(1010,497,'S2','component-label'),[975,493,58,48]);
  128. bridge('VD10',1160,560); bridge('VD11',1160,670);
  129. const transformer=line('M1255 514V752 M1262 514V752 M1230 525h8q16 0 16 10t-16 10q16 0 16 10t-16 10q16 0 16 10t-16 10q16 0 16 10t-16 10h-8 M1230 650h8q16 0 16 10t-16 10q16 0 16 10t-16 10q16 0 16 10t-16 10q16 0 16 10t-16 10h-8 M1287 560h-4q-14 0 -14 10t14 10q-14 0 -14 10t14 10q-14 0 -14 10t14 10q-14 0 -14 10t14 10q-14 0 -14 10t14 10q-14 0 -14 10t14 10q-14 0 -14 10t14 10h4');
  130. register('T1',{S5:[1230,525],S6:[1230,605],S4:[1230,650],S3:[1230,730],P1:[1287,560],P2:[1287,700]},transformer,text(1235,494,'T1','component-label')+text(1222,518,'5','pin-label')+text(1222,620,'6','pin-label')+text(1222,643,'4','pin-label')+text(1222,744,'3','pin-label')+text(1296,551,'1','pin-label')+text(1296,716,'2','pin-label'),[1216,489,96,273]);
  131. register('FU1',{A:[1320,560],B:[1380,560]},line('M1320 560h14 M1366 560h14 M1334 560h32')+'<rect x="1334" y="555" width="32" height="10"/>',text(1350,542,'FU1','component-label','middle'),[1316,539,68,33]);
  132. // All component terminals belong to exactly one named electrical net.
  133. for(let i=0;i<10;i++)net('key-'+i,['S1.K'+(i+1),'XP/XS.I'+(i+1)],`M330 ${385+i*40}H400`,'key-net');
  134. [['R1',385],['R3',425],['R5',465],['R7',505]].forEach(([id,y],i)=>net('plug-'+i,['XP/XS.O'+(i+1),id+'.A'],`M435 ${y}H450`));
  135. net('common',['S1.C','XP/XS.C','R2.A','R4.A','R6.A','R11.B','R10.B','VT2.E','R14.B','C1.B','R17.B','C2.B','VD10.PLUS','VD11.PLUS','S2.B'],
  136. 'M245 790H360V830H1160 M376 830V810 M540 475V830 M540 475H575 M540 545H575 M540 615H575 M660 815V830 M730 815V830 M790 755V830 M835 805V830 M875 815V830 M955 815V830 M1070 790V830 M1160 588V610H1110V830 M1160 698V830 M1025 535H1090V830','common-net',[[376,830],[540,545],[540,615],[540,830],[660,830],[730,830],[790,830],[835,830],[875,830],[955,830],[1070,830],[1090,830],[1110,830]]);
  137. net('stage-1-gate',['R1.B','VD5.G'],'M500 385H542V445H638','gate-net stage-route-1');
  138. net('stage-2-gate',['R3.B','VD6.G','C4.A'],'M500 425H525V515H638 M620 493V515','gate-net stage-route-2',[[620,515]]);
  139. net('stage-3-input',['R5.B','VD2.A','VD1.K'],'M500 465H508V585H580 M555 585V610','gate-net stage-route-3',[[555,585]]);
  140. net('stage-3-gate',['VD2.K','VD7.G','C5.A'],'M625 585H638 M620 565V585H625','gate-net stage-route-3',[[625,585]]);
  141. net('stage-4-input',['R7.B','VD4.A','VD3.A'],'M500 505H492V655H580 M565 655V680','gate-net stage-route-4',[[565,655]]);
  142. net('stage-4-gate',['VD4.K','VD8.G','C6.A'],'M625 655H638 M620 637V655H625','gate-net stage-route-4',[[625,655]]);
  143. net('memory-1',['VD5.A','VD6.K','R2.B','C4.B'],'M660 475V510 M625 475H660','memory-net',[[660,475],[660,493]]);
  144. net('memory-2',['VD6.A','VD7.K','R4.B','C5.B'],'M660 545V580 M625 545H660','memory-net',[[660,545],[660,565]]);
  145. net('memory-3',['VD7.A','VD8.K','R6.B','C6.B'],'M660 615V650 M625 615H660','memory-net',[[660,615],[660,637]]);
  146. net('chain-supply',['VT1.C','VD5.K'],'M660 425V440','chain-supply');
  147. net('full-code',['VD8.A','R9.A','R12.A'],'M660 685H675V665H835V685','full-code-net',[[660,685]]);
  148. net('key-base',['R9.B','R11.A','VT5.B'],'M660 735V765 M660 750H675V720','driver-net',[[660,750]]);
  149. net('darlington',['VT5.E','VT2.B','R10.A'],'M710 755H755V720 M730 755V765','driver-net',[[730,755]]);
  150. net('load-return',['VT5.C','VT2.C','YA1.B','HL1.B','S2.A','VD9.K'],'M710 685V690H790V535H980 M790 535V685 M847 415V535 M920 465V535 M885 415H847','load-return-net',[[790,690],[847,535],[920,535],[847,415]]);
  151. net('load-negative',['YA1.A','R20.A','VD9.A','VD10.MINUS'],'M847 375V310H1160V532 M920 310V340 M885 375H847','load-negative-net',[[920,310],[847,375]]);
  152. net('lamp',['R20.B','HL1.A'],'M920 390V435','lamp-net');
  153. net('logic-negative',['VT1.E','R8.A','R13.A','R15.A','C2.A','VD11.MINUS'],'M660 355V328H805V550H1070V710 M729 328V340 M875 550V640 M915 550V580 M1050 550V642H1160','logic-supply-net',[[729,328],[875,550],[915,550],[1050,550]]);
  154. net('vt1-base',['VT1.B','R8.B','R18.A'],'M700 390H729V580H1020','bias-net',[[729,390]]);
  155. net('timer-input',['R12.B','C1.A','R13.B','R14.A','VT3.B'],'M835 735V745H875 M875 695V765 M875 710H875','timer-net',[[835,745],[875,745],[875,710]]);
  156. net('timer-emitter',['VT3.E','VT4.E','R17.A'],'M910 745V755H1020V745 M955 755V765','timer-net',[[955,755]]);
  157. net('vt3-collector',['VT3.C','R15.B','R16.A','C3.A'],'M915 635V640H945V660 M910 675V640H915','timer-net',[[915,640],[945,640]]);
  158. net('vt4-base',['VT4.B','R16.B'],'M945 695V710H985','timer-net');
  159. net('vt4-collector',['VT4.C','R18.B'],'M1020 630V675','timer-net');
  160. net('feedback',['R19.B','C3.B'],'M985 855H995V640H985','feedback-net');
  161. net('error-bus',[...Array.from({length:6},(_,i)=>'XP/XS.O'+(i+5)),'VD1.A','VD3.K','R19.A'],'M435 545H450V855H935 M435 585H450 M435 625H450 M435 665H450 M435 705H450 M435 745H450 M555 665V855 M565 735V855','error-net',[[450,585],[450,625],[450,665],[450,705],[450,745],[555,855],[565,855]]);
  162. net('ac-load-5',['VD10.AC1','T1.S5'],'M1230 525H1115V560H1132','ac-net');
  163. net('ac-load-6',['VD10.AC2','T1.S6'],'M1230 605H1205V560H1188','ac-net');
  164. net('ac-logic-4',['VD11.AC2','T1.S4'],'M1230 650H1205V670H1188','ac-net');
  165. net('ac-logic-3',['VD11.AC1','T1.S3'],'M1230 730H1115V670H1132','ac-net');
  166. net('mains-fuse',['T1.P1','FU1.A'],'M1287 560H1320','mains-net');
  167. net('mains-19',['FU1.B'],'M1380 560H1410 M1404 555l6 5l-6 5','mains-net');
  168. net('mains-18',['T1.P2'],'M1287 700H1410 M1404 695l6 5l-6 5','mains-net');
  169. const styles=`
  170. .vector-schematic{background:var(--panel-2,#f0f1ec);color:var(--text,#242823)}
  171. .vector-schematic .net,.vector-schematic .part-symbol{fill:none;stroke:var(--wire,#7e897c);stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
  172. .vector-schematic text{font:12px monospace;fill:var(--text,#242823);stroke:var(--panel-2,#f0f1ec);stroke-width:3px;paint-order:stroke fill;stroke-linejoin:round}
  173. .vector-schematic .component-label{font-weight:700}.vector-schematic .connector-label{font-size:9px;fill:var(--muted,#656e63)}
  174. .vector-schematic .pin-label,.vector-schematic .polarity{font-size:10px}.vector-schematic .zone-label{font:10px sans-serif;letter-spacing:1px;fill:var(--muted,#656e63)}
  175. .vector-schematic .part-symbol rect,.vector-schematic .part-symbol circle{fill:var(--panel-2,#f0f1ec)}
  176. .vector-schematic .part-symbol .device-outline{fill:none;stroke:var(--line,#dddfd7)}
  177. .vector-schematic .part-symbol .arrow-fill{fill:var(--wire,#7e897c);stroke:none}
  178. .vector-schematic .part-hitbox{fill:transparent;stroke:none}.vector-schematic .junction{fill:var(--wire,#7e897c);stroke:none}
  179. .vector-schematic .current-flow,.vector-schematic .signal-overlay,.vector-schematic .fault-flow,.vector-schematic .flyback-flow{fill:none;pointer-events:none}
  180. .vector-schematic .current-flow{stroke:var(--accent,#3659d9);stroke-width:3;stroke-dasharray:3 12;opacity:0}
  181. .vector-schematic .signal-overlay{stroke:var(--signal,#986016);stroke-width:3;opacity:0}
  182. .vector-schematic .fault-flow{stroke:var(--danger,#b43f35);stroke-width:2.5;opacity:0}
  183. .vector-schematic .flyback-flow{stroke:var(--signal,#986016);stroke-width:3;stroke-dasharray:2 8;opacity:0}
  184. `;
  185. const svg=`<svg xmlns="http://www.w3.org/2000/svg" id="lockCircuit" class="schematic vector-schematic" viewBox="210 260 1240 655" aria-labelledby="circuitTitle circuitDescription" data-state="idle"><title id="circuitTitle">Принципиальная схема ЗКЭ-4-10, 114.2.082.002 ПС</title><desc id="circuitDescription">Векторная перерисовка: S1, наборное поле XP/XS, четыре тиристора, пять транзисторов, все резисторы и конденсаторы, электромагнит, лампа, кнопка выхода, трансформатор и выпрямители. Выберите деталь для пояснения.</desc><style>${styles}</style><defs><pattern id="vectorCircuitGrid" width="16" height="16" patternUnits="userSpaceOnUse"><circle cx="1" cy="1" r=".55" fill="currentColor" opacity=".13"/></pattern></defs><rect x="210" y="260" width="1240" height="655" fill="url(#vectorCircuitGrid)"/>
  186. ${text(268,285,'01 / КЛАВИАТУРА','zone-label')}${text(533,285,'02 / КОДОВАЯ ЦЕПОЧКА','zone-label')}${text(846,285,'03 / ЭЛЕКТРОМАГНИТ','zone-label')}${text(1160,285,'04 / ПИТАНИЕ','zone-label')}
  187. <g class="circuit-nets">${wires.join('')}${junctions.join('')}</g><g class="circuit-components">${elements.join('')}</g>
  188. ${text(1380,614,'~220 В','component-label','middle')}${text(1380,635,'50 Гц','connector-label','middle')}${text(1410,547,'19','pin-label','middle')}${text(1410,720,'18','pin-label','middle')}
  189. ${text(670,892,'VT5 + VT2 · СОСТАВНОЙ КЛЮЧ','zone-label')}${text(960,892,'VT3 / VT4 · ВЫДЕРЖКА','zone-label')}${text(370,878,'Общий провод (+)','pin-label')}
  190. <g class="signal-overlay" aria-hidden="true"><path id="inputTrace" d="M435 385H500H542V445H638"/></g>
  191. <g class="current-flow code-current" aria-hidden="true"><path d="M790 830V755 M790 685V535H847V415 M847 375V310H1160V532 M1160 588V610H1110V830H790"/></g>
  192. <g class="current-flow exit-current" aria-hidden="true"><path d="M1090 830V535H847V415 M847 375V310H1160V532 M1160 588V610H1110V830H1090"/></g>
  193. <g class="current-flow lamp-current" aria-hidden="true"><path d="M920 535V465 M920 435V390 M920 340V310"/></g>
  194. <g class="fault-flow" aria-hidden="true"><path d="M450 545V855H935 M985 855H995V640H985 M729 580H1020V675"/></g>
  195. <g class="flyback-flow" aria-hidden="true"><path d="M847 415V375H885V415H847"/></g>
  196. </svg>`;
  197. return {svg,pins,nets,partIds:Object.keys(pins),inputRoutes:[
  198. 'M435 385H500H542V445H638','M435 425H500H525V515H638 M620 493V515',
  199. 'M435 465H500H508V585H638 M620 565V585','M435 505H500H492V655H638 M620 637V655'
  200. ]};
  201. }
  202. if(typeof module !== 'undefined' && module.exports) module.exports=buildLockSchematic;