@typecad/typecad
Version:
🤖programmatically 💥create 🛰️hardware
1 lines • 13.1 kB
JavaScript
(function(_0x1e02d5,_0x4e3b37){const a20_0x49e444={_0x435c9c:0x318,_0x4a760b:0x309,_0x292da1:0x2fb,_0x23973d:0x2f6,_0x5f51fd:0x31b,_0x383848:0x312,_0xea08e7:0x339,_0x30b071:0x326,_0x49873e:0x335,_0x281c83:0x356};function _0x5668e0(_0x5bbb69,_0x2b6045){return a20_0x458a(_0x5bbb69-0x17b,_0x2b6045);}const _0x446c5f=_0x1e02d5();while(!![]){try{const _0x2be397=parseInt(_0x5668e0(a20_0x49e444._0x435c9c,0x32b))/(0x21bd+0x4*-0x580+-0x2*0x5de)+parseInt(_0x5668e0(0x302,a20_0x49e444._0x4a760b))/(0x1b*-0x79+-0x1fd4+0x2c99)+-parseInt(_0x5668e0(a20_0x49e444._0x292da1,0x301))/(0x14cd+0xfb*-0x9+-0xbf7)*(parseInt(_0x5668e0(0x316,a20_0x49e444._0x23973d))/(-0x1*0x1d5d+-0x854+0x563*0x7))+-parseInt(_0x5668e0(a20_0x49e444._0x5f51fd,0x2fa))/(-0x12c1*0x1+0x24cb+-0x1205)+parseInt(_0x5668e0(a20_0x49e444._0x383848,0x301))/(-0x86*0x1f+0x8*-0x33+-0x476*-0x4)+parseInt(_0x5668e0(a20_0x49e444._0xea08e7,a20_0x49e444._0x30b071))/(0xbb8+0x38*-0x81+0x1087*0x1)+-parseInt(_0x5668e0(a20_0x49e444._0x49873e,a20_0x49e444._0x281c83))/(-0xf09+0x1*0x1fff+0x1*-0x10ee)*(-parseInt(_0x5668e0(0x31d,0x33a))/(0x19b*0x6+-0x59*0x6b+0x1b9a));if(_0x2be397===_0x4e3b37)break;else _0x446c5f['push'](_0x446c5f['shift']());}catch(_0x4812b4){_0x446c5f['push'](_0x446c5f['shift']());}}}(a20_0x54f2,0x828ed+-0x99*-0xc61+-0x8e4f*0x6));import a20_0x110022 from'chalk';import{generateUuid}from'./pcb_utils';function a20_0x54f2(){const _0x31b7e8=['zxqNihbHCMfTzq','mJu0ndi0ELvrBKPM','zMLSzq','Agf0y2Hhyxa','DgHLCM1HBejYAq','mZeZmdm4nLvAB056sG','ywrPDxm','ChvZAa','ihn0ywDLzcbVDq','Bgf5zxjZ','DhjHy2TZ','m2nwDg1Qza','CKfSz29YAxrOBq','z2v0q2fSBfnPDa','Agf0y2HuAgLJAW','AgLUz1zHBhvL','DMjRu0i','C21VB3rOAw5NuG','nZy4otq0ugnNtxro','zMLSBefYy1nLzW','Aw4NigfUzcaNBG','twLU','DxvPza','BwLUvgHPy2TUzq','BNvTyMvY','Agf0y2HcB3jKzq','Agf0y2HnAw5iBW','zwXLBwvUDhm','zxjYB3i','C1rOAwnRBMvZCW','BgvbCMvH','AxnSyw5KuMvTBW','BgvUz3rO','yMX1zq','mZm1mdqXohDJDhvXqW','w1bdqIbAt05fxq','AKjtDhO','DMfStw9Kzq','ndCWnZqXmNDfqKzZEG','CMvK','ntKYmdG0AePZC2vz','DMLHCW','BMv0','mZa0mJyYnwjPzvH0wq','ig90AgvY','mtCXqMDkrMrk','BMvZCW','zM9VDhbYAw50CW','zgDLv2LKDgG','y29WCgvYCg91CG','A2vLCg91DfPVBG','CM9Tia','CgfKCW','AgvPz2H0','EM9Uzxm','Agf0y2HtDhLSzq','DMvKia','icHJywXSzwqGzG','C3rHz2vKt3v0Ba','EfrfC2G','CgLUoG','DgvYCY4GvxnLia','C21VB3rOAw5N','Aw5LCW','zMLSBgvK','Dgf0Aw9U','Cg9SEwDVBG','DNLVvKC'];a20_0x54f2=function(){return _0x31b7e8;};return a20_0x54f2();}export function zone(_0x3495c8,_0x4a8bb7){const a20_0x387277={_0x2cfdc4:0x15,_0x1147dd:0x15,_0x6af7b3:0xa,_0x55c68f:0x2,_0x400fe5:0x1e,_0x14d118:0x16,_0x18ad3e:0x44,_0x5348ed:0x0,_0x21eca6:0xc,_0x5bc265:0xd,_0x380fd8:0x29,_0xc295e6:0x13,_0x82ea67:0x12,_0x5aedaf:0xe,_0x454eb7:0xb,_0xc47911:0x9,_0xc5ccda:0x4,_0x353623:0x17,_0xed4c56:0xf,_0x1f1ef2:0x21,_0x5ebcbc:0x30,_0x333b1d:0x15,_0x27816a:0x29,_0x4d6f4a:0xf,_0x449bd7:0x7,_0x1045d5:0xf,_0x58a5d0:0x9,_0x21672b:0x17,_0x5be17f:0x22,_0x1fcd2a:0x7,_0x575b5b:0x2c,_0x943c66:0x25,_0x56e274:0x8,_0x41fa74:0x46,_0x2d55c1:0x20,_0x1877e4:0x24,_0x2be8e5:0x1f,_0x24b731:0x1b,_0x4b5268:0x5,_0xeb856e:0x4},a20_0x541c66={_0x49fad3:0x1ae},_0x1cecfa={};_0x1cecfa['XnSvr']='solid',_0x1cecfa[_0x5449d7(-a20_0x387277._0x2cfdc4,-0x33)]='edge',_0x1cecfa['xTEsh']=function(_0x5e8702,_0x2efbf0){return _0x5e8702&&_0x2efbf0;},_0x1cecfa['vyoVG']=function(_0x54c277,_0x268b89){return _0x54c277+_0x268b89;};const _0x4c7718=_0x1cecfa,{pin:_0x327afb,net:_0x2c5aa2,layers:_0x577159,x:_0x23e3b9,y:_0x547377,width:_0x3619b6,height:_0x44971d,fillMode:fillMode=_0x4c7718['XnSvr'],filled:filled=!![],priority:priority=-0x293+0x306+-0x17*0x5,locked:locked=![],name:_0x536f8c,minThickness:minThickness=-0x1038+0xb*-0x1cd+0x191*0x17+0.1778,hatchStyle:hatchStyle=_0x4c7718[_0x5449d7(-a20_0x387277._0x1147dd,a20_0x387277._0x6af7b3)],hatchPitch:hatchPitch=-0x1a8+-0x81e+0x116*0x9+0.508,clearance:clearance=0x18d1*-0x1+-0x1019+0x28ea+0.2,connectPads:_0x2a4ff4,thermalGap:thermalGap=0x21fd+-0x2cd+0x8*-0x3e6+0.254,thermalBridgeWidth:thermalBridgeWidth=0x18fe+-0x53c+-0x34b*0x6+0.4064,smoothing:_0x5e45a0,smoothingRadius:_0x47db00,islandRemovalMode:_0x1394b4,islandAreaMin:_0x39dadb,hatchThickness:_0xe35d76,hatchGap:_0x19f256,hatchOrientation:_0x36a4ae,hatchSmoothingLevel:_0x5af1f1,hatchSmoothingValue:_0x2c4a87,hatchBorderAlgorithm:_0x12b2f6,hatchMinHoleArea:_0x1e4275,fillArcSegments:fillArcSegments=0x267c+0x2064+-0x46d0,filledAreasThickness:_0x32e4d3}=_0x4a8bb7;if(_0x4c7718[_0x5449d7(a20_0x387277._0x55c68f,a20_0x387277._0x400fe5)](!_0x327afb,!_0x2c5aa2)){const _0x538b92=_0x3495c8[_0x5449d7(-0x2c,-0x30)+'e'](),_0x502f2a=_0x538b92?_0x5449d7(0x0,0x5)+'rom\x20'+_0x538b92[_0x5449d7(0xd,0x16)]+':'+_0x538b92['line']+')':'';console['error'](a20_0x110022['red'](_0x5449d7(-a20_0x387277._0x14d118,-0x29)+'\x20ERROR:\x20Mu'+'st\x20provide'+'\x20either\x20\x27p'+'in\x27\x20or\x20\x27ne'+'t\x27\x20paramet'+'er'+_0x502f2a));return;}if(_0x4c7718['xTEsh'](_0x327afb,_0x2c5aa2)){const _0x1052b7=_0x3495c8[_0x5449d7(-0x2c,-a20_0x387277._0x18ad3e)+'e'](),_0x51b3fa=_0x1052b7?_0x5449d7(a20_0x387277._0x5348ed,-a20_0x387277._0x21eca6)+_0x5449d7(-0x6,0x14)+_0x1052b7[_0x5449d7(a20_0x387277._0x5bc265,a20_0x387277._0x380fd8)]+':'+_0x1052b7['line']+')':'';console[_0x5449d7(-0x1d,-a20_0x387277._0xc295e6)](a20_0x110022[_0x5449d7(-a20_0x387277._0x82ea67,-a20_0x387277._0x5aedaf)]('[PCB\x20ZONE]'+'\x20ERROR:\x20Ca'+'nnot\x20provi'+'de\x20both\x20\x27p'+_0x5449d7(-0x25,-0x21)+_0x5449d7(a20_0x387277._0x454eb7,a20_0x387277._0xc47911)+_0x5449d7(a20_0x387277._0xc5ccda,a20_0x387277._0x353623)+'one\x20or\x20the'+_0x5449d7(-0xd,a20_0x387277._0xed4c56)+_0x51b3fa));return;}const _0x354731={};_0x354731['x']=_0x23e3b9,_0x354731['y']=_0x547377;const _0x4242f7=[_0x354731,{'x':_0x4c7718['vyoVG'](_0x23e3b9,_0x3619b6),'y':_0x547377},{'x':_0x4c7718[_0x5449d7(0xa,0x1)](_0x23e3b9,_0x3619b6),'y':_0x547377+_0x44971d},{'x':_0x23e3b9,'y':_0x547377+_0x44971d}],_0xc526c9=generateUuid();let _0x55817d;if(_0x327afb)_0x55817d=_0x5449d7(0x3,-0x1)+_0x327afb['reference']+':'+_0x327afb[_0x5449d7(-a20_0x387277._0x1f1ef2,-0x11)];else _0x2c5aa2&&(_0x55817d='net:'+_0x2c5aa2);const _0x49b31e={};_0x49b31e['uuid']=_0xc526c9,_0x49b31e[_0x5449d7(-a20_0x387277._0x5ebcbc,-a20_0x387277._0xed4c56)]=_0x577159,_0x49b31e['x']=_0x23e3b9,_0x49b31e['y']=_0x547377,_0x49b31e['width']=_0x3619b6,_0x49b31e[_0x5449d7(-0x4,a20_0x387277._0x333b1d)]=_0x44971d,_0x49b31e[_0x5449d7(0x9,a20_0x387277._0x27816a)]=_0x4242f7,_0x49b31e[_0x5449d7(-a20_0x387277._0x4d6f4a,-0x28)]=_0x55817d,_0x49b31e['fillMode']=fillMode,_0x49b31e[_0x5449d7(0x7,0x25)]=filled,_0x49b31e['priority']=priority,_0x49b31e['locked']=locked,_0x49b31e['name']=_0x536f8c,_0x49b31e[_0x5449d7(-0x22,-a20_0x387277._0x449bd7)+'ss']=minThickness,_0x49b31e[_0x5449d7(-0x2,0x18)]=hatchStyle,_0x49b31e['hatchPitch']=hatchPitch,_0x49b31e['clearance']=clearance,_0x49b31e['connectPad'+'s']=_0x2a4ff4,_0x49b31e['thermalGap']=thermalGap,_0x49b31e[_0x5449d7(a20_0x387277._0x1045d5,-a20_0x387277._0xc5ccda)+_0x5449d7(-a20_0x387277._0x58a5d0,a20_0x387277._0x449bd7)]=thermalBridgeWidth,_0x49b31e[_0x5449d7(0x5,-a20_0x387277._0x21672b)]=_0x5e45a0,_0x49b31e[_0x5449d7(-0x28,-a20_0x387277._0x5be17f)+_0x5449d7(0x11,a20_0x387277._0x1fcd2a)]=_0x47db00,_0x49b31e[_0x5449d7(-0x1a,-a20_0x387277._0x5be17f)+_0x5449d7(-0x14,-a20_0x387277._0x575b5b)]=_0x1394b4;function _0x5449d7(_0x3b39d,_0xf13205){return a20_0x458a(_0x3b39d- -a20_0x541c66._0x49fad3,_0xf13205);}_0x49b31e['islandArea'+_0x5449d7(-0x24,-0x14)]=_0x39dadb,_0x49b31e[_0x5449d7(-0x2b,-0x3e)+_0x5449d7(-a20_0x387277._0x454eb7,0xe)]=_0xe35d76,_0x49b31e[_0x5449d7(0xe,a20_0x387277._0x943c66)]=_0x19f256,_0x49b31e['hatchOrien'+_0x5449d7(a20_0x387277._0x56e274,0x1f)]=_0x36a4ae,_0x49b31e['hatchSmoot'+'hingLevel']=_0x5af1f1,_0x49b31e['hatchSmoot'+_0x5449d7(-0x2a,-a20_0x387277._0x41fa74)]=_0x2c4a87,_0x49b31e[_0x5449d7(-a20_0x387277._0x2d55c1,a20_0x387277._0x5348ed)+_0x5449d7(-0x2d,-a20_0x387277._0x1877e4)]=_0x12b2f6,_0x49b31e[_0x5449d7(-a20_0x387277._0x2be8e5,-0x27)+_0x5449d7(-a20_0x387277._0x24b731,-a20_0x387277._0x5be17f)]=_0x1e4275,_0x49b31e[_0x5449d7(-0x26,-0x1d)+'ments']=fillArcSegments,_0x49b31e['filledArea'+_0x5449d7(-0x1c,-a20_0x387277._0x4b5268)]=_0x32e4d3;const _0x4c4517=_0x49b31e;_0x3495c8[_0x5449d7(-0x3,a20_0x387277._0xeb856e)]['push'](_0x4c4517);}function a20_0x458a(_0x2771b9,_0x2329f0){const _0x12e002=a20_0x54f2();return a20_0x458a=function(_0x50cf2b,_0x330f03){_0x50cf2b=_0x50cf2b-(0x5*0x5fb+0x1f*0x125+-0x3fe6);let _0x427f32=_0x12e002[_0x50cf2b];if(a20_0x458a['UUcDTJ']===undefined){var _0x450944=function(_0x50a2de){const _0x3d9028='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4f237a='',_0x1827d3='';for(let _0x3f560a=-0x2*-0x77f+-0xe*-0xa2+-0x17da,_0x26fd45,_0x487ac5,_0x51c347=0x110c+-0x175e+0x652*0x1;_0x487ac5=_0x50a2de['charAt'](_0x51c347++);~_0x487ac5&&(_0x26fd45=_0x3f560a%(-0x1e61+-0x1*0x23b1+-0x2*-0x210b)?_0x26fd45*(-0x57*0x27+-0xc2*-0xd+-0x55*-0xb)+_0x487ac5:_0x487ac5,_0x3f560a++%(0x256+0x1b30+-0x1d82))?_0x4f237a+=String['fromCharCode'](0x9*0x381+-0x264e+0x7c4&_0x26fd45>>(-(-0xb*0x68+0x1e0b+0x1991*-0x1)*_0x3f560a&0x2018+0xebc+-0x2ece)):0x7*0xe9+0x769+-0xdc8){_0x487ac5=_0x3d9028['indexOf'](_0x487ac5);}for(let _0x437b22=-0x60b+0xb*-0x27+0x7b8,_0x4f0f64=_0x4f237a['length'];_0x437b22<_0x4f0f64;_0x437b22++){_0x1827d3+='%'+('00'+_0x4f237a['charCodeAt'](_0x437b22)['toString'](0xafa*-0x1+-0x202*-0x5+0x100))['slice'](-(0x6b0+0x11c3+-0x1*0x1871));}return decodeURIComponent(_0x1827d3);};a20_0x458a['yhovHj']=_0x450944,_0x2771b9=arguments,a20_0x458a['UUcDTJ']=!![];}const _0x3e3684=_0x12e002[-0x203*0x5+0xe0b+-0x3fc],_0x770ef8=_0x50cf2b+_0x3e3684,_0x20b946=_0x2771b9[_0x770ef8];return!_0x20b946?(_0x427f32=a20_0x458a['yhovHj'](_0x427f32),_0x2771b9[_0x770ef8]=_0x427f32):_0x427f32=_0x20b946,_0x427f32;},a20_0x458a(_0x2771b9,_0x2329f0);}export function keepout(_0x5f19bb,_0x655328){const a20_0x32b35b={_0x41c371:0x1a8,_0x1dd392:0x1c5,_0x1a5788:0x1bb,_0x853f7:0x1a6,_0x23fad3:0x19b,_0x3699e4:0x18a,_0x12c64e:0x19d,_0x496aa3:0x1a8,_0xff5ee2:0x1c8},a20_0x57b2d6={_0x2f5846:0x344},_0x1e59ce={'vbkSB':function(_0x621933,_0x3ee1e5){return _0x621933+_0x3ee1e5;},'RHRnI':function(_0x14a81){return _0x14a81();},'SKRCY':function(_0x5bd462,_0x539ff4){return _0x5bd462!==_0x539ff4;}},{layers:_0x86113c,x:_0x1687f1,y:_0x14b52b,width:_0x52a15e,height:_0x3bdde9,restrictions:restrictions={},priority:priority=-0x25de+-0x39b*0x3+0x30af,locked:locked=![],name:_0x343375,hatchStyle:hatchStyle='edge',hatchPitch:hatchPitch=-0x54d*-0x6+-0x1dbe+-0x2c*0xc+0.508,smoothing:_0x48eaf8,smoothingRadius:_0x1a85fa}=_0x655328;function _0x7fe13a(_0x458d8e,_0x239f93){return a20_0x458a(_0x458d8e- -a20_0x57b2d6._0x2f5846,_0x239f93);}const _0x458f38={};_0x458f38['x']=_0x1687f1,_0x458f38['y']=_0x14b52b;const _0xf342cb=[_0x458f38,{'x':_0x1e59ce[_0x7fe13a(-0x1bf,-a20_0x32b35b._0x41c371)](_0x1687f1,_0x52a15e),'y':_0x14b52b},{'x':_0x1687f1+_0x52a15e,'y':_0x14b52b+_0x3bdde9},{'x':_0x1687f1,'y':_0x14b52b+_0x3bdde9}],_0x490ee9=_0x1e59ce['RHRnI'](generateUuid),_0x104901={'uuid':_0x490ee9,'layers':_0x86113c,'x':_0x1687f1,'y':_0x14b52b,'width':_0x52a15e,'height':_0x3bdde9,'polygon':_0xf342cb,'priority':priority,'locked':locked,'name':_0x343375,'restrictions':{'tracks':_0x1e59ce['SKRCY'](restrictions[_0x7fe13a(-a20_0x32b35b._0x1dd392,-a20_0x32b35b._0x1a5788)],![]),'vias':restrictions[_0x7fe13a(-a20_0x32b35b._0x853f7,-0x19a)]!==![],'pads':_0x1e59ce['SKRCY'](restrictions[_0x7fe13a(-a20_0x32b35b._0x23fad3,-a20_0x32b35b._0x3699e4)],![]),'copperpour':restrictions[_0x7fe13a(-0x19e,-0x1ae)]!==![],'footprints':_0x1e59ce['SKRCY'](restrictions[_0x7fe13a(-0x1a0,-0x1b7)],![])},'hatchStyle':hatchStyle,'hatchPitch':hatchPitch,'smoothing':_0x48eaf8,'smoothingRadius':_0x1a85fa};_0x5f19bb[_0x7fe13a(-a20_0x32b35b._0x12c64e,-a20_0x32b35b._0x496aa3)+'es'][_0x7fe13a(-a20_0x32b35b._0xff5ee2,-0x1b8)](_0x104901);}export function _getStagedOutlines(_0x45fa81){return _0x45fa81['stagedOutl'+'ines'];}export function _removeStagedOutlinesByUuid(_0x20aabc,_0x302cb2){const a20_0x4bc326={_0x5017b6:0x330,_0x2c5af6:0x34f,_0x2f5dfd:0x34b,_0x5a6961:0x369,_0x5b843a:0x36e,_0x2741d9:0x366,_0x59853d:0x354,_0x253ed2:0x34f};function _0xa74988(_0x5b5e41,_0xa3e5ac){return a20_0x458a(_0xa3e5ac-0x1ba,_0x5b5e41);}const _0x1061aa=new Set(_0x302cb2),_0x3edcf7=_0x20aabc['stagedOutl'+_0xa74988(0x37c,0x36e)][_0xa74988(a20_0x4bc326._0x5017b6,a20_0x4bc326._0x2c5af6)];_0x20aabc[_0xa74988(a20_0x4bc326._0x2f5dfd,a20_0x4bc326._0x5a6961)+_0xa74988(0x35e,a20_0x4bc326._0x5b843a)]=_0x20aabc[_0xa74988(0x368,0x369)+'ines']['filter'](_0x2d5494=>{function _0x5a7845(_0x45b82d,_0x922b9c){return _0xa74988(_0x922b9c,_0x45b82d-0x55);}const _0xeae3da=_0x2d5494[_0x5a7845(0x39f,0x397)]['some'](_0x305c28=>_0x5a7845(0x39a,0x379)in _0x305c28&&_0x1061aa['has'](_0x305c28[_0x5a7845(0x39a,0x38f)]));return!_0xeae3da;}),console['log'](a20_0x110022[_0xa74988(0x349,0x350)]('[PCB]\x20Remo'+_0xa74988(0x34e,0x367)+(_0x3edcf7-_0x20aabc['stagedOutl'+_0xa74988(a20_0x4bc326._0x2741d9,a20_0x4bc326._0x5b843a)][_0xa74988(a20_0x4bc326._0x59853d,a20_0x4bc326._0x253ed2)])+(_0xa74988(0x332,0x337)+'tline(s)\x20w'+'ith\x20')+_0x302cb2['length']+'\x20UUID(s)'));}