diff options
Diffstat (limited to 'OpenPLC_modules/openplc_modules/motor/bom')
-rw-r--r-- | OpenPLC_modules/openplc_modules/motor/bom/ibom.html | 2388 |
1 files changed, 2388 insertions, 0 deletions
diff --git a/OpenPLC_modules/openplc_modules/motor/bom/ibom.html b/OpenPLC_modules/openplc_modules/motor/bom/ibom.html new file mode 100644 index 0000000..0004e8d --- /dev/null +++ b/OpenPLC_modules/openplc_modules/motor/bom/ibom.html @@ -0,0 +1,2388 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Interactive BOM for KiCAD</title> + <style type="text/css"> +:root { + --pcb-edge-color: black; + --pad-color: #878787; + --pad-color-highlight: #D04040; + --pin1-outline-color: #ffb629; + --pin1-outline-color-highlight: #b4ff03; +} + +html, body { + margin: 0px; + height: 100%; + font-family: Verdana, sans-serif; +} + +.dark { + --pcb-edge-color: #eee; + --pad-color: #808080; + --pin1-outline-color: #ffa800; + --pin1-outline-color-highlight: #ccff00; + background-color: #252c30; + color: #eee; +} + +button { + background-color: #eee; + border: 1px solid #888; + color: black; + height: 44px; + width: 44px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 14px; + font-weight: bolder; +} + +.dark button { + /* This will be inverted */ + background-color: #c3b7b5; +} + +button.depressed { + background-color: #0a0; + color: white; +} + +.dark button.depressed { + /* This will be inverted */ + background-color: #b3b; +} + +button:focus { + outline: 0; +} + +button#tb-btn { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.47 8.47'%3E%3Crect transform='translate(0 -288.53)' ry='1.17' y='288.8' x='.27' height='7.94' width='7.94' fill='%23f9f9f9'/%3E%3Cg transform='translate(0 -288.53)'%3E%3Crect width='7.94' height='7.94' x='.27' y='288.8' ry='1.17' fill='none' stroke='%23000' stroke-width='.4' stroke-linejoin='round'/%3E%3Cpath d='M1.32 290.12h5.82M1.32 291.45h5.82' fill='none' stroke='%23000' stroke-width='.4'/%3E%3Cpath d='M4.37 292.5v4.23M.26 292.63H8.2' fill='none' stroke='%23000' stroke-width='.3'/%3E%3Ctext font-weight='700' font-size='3.17' font-family='sans-serif'%3E%3Ctspan x='1.35' y='295.73'%3EF%3C/tspan%3E%3Ctspan x='5.03' y='295.68'%3EB%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E%0A"); + background-size: 32px 32px; + background-position: 5px 5px; + background-repeat: no-repeat; +} + +button#lr-btn { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.47 8.47'%3E%3Crect transform='translate(0 -288.53)' ry='1.17' y='288.8' x='.27' height='7.94' width='7.94' fill='%23f9f9f9'/%3E%3Cg transform='translate(0 -288.53)'%3E%3Crect width='7.94' height='7.94' x='.27' y='288.8' ry='1.17' fill='none' stroke='%23000' stroke-width='.4' stroke-linejoin='round'/%3E%3Cpath d='M1.06 290.12H3.7m-2.64 1.33H3.7m-2.64 1.32H3.7m-2.64 1.3H3.7m-2.64 1.33H3.7' fill='none' stroke='%23000' stroke-width='.4'/%3E%3Cpath d='M4.37 288.8v7.94m0-4.11h3.96' fill='none' stroke='%23000' stroke-width='.3'/%3E%3Ctext font-weight='700' font-size='3.17' font-family='sans-serif'%3E%3Ctspan x='5.11' y='291.96'%3EF%3C/tspan%3E%3Ctspan x='5.03' y='295.68'%3EB%3C/tspan%3E%3C/text%3E%3C/g%3E%3C/svg%3E%0A"); + background-size: 32px 32px; + background-position: 5px 5px; + background-repeat: no-repeat; +} + +button#bom-btn { + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8.47 8.47'%3E%3Crect transform='translate(0 -288.53)' ry='1.17' y='288.8' x='.27' height='7.94' width='7.94' fill='%23f9f9f9'/%3E%3Cg transform='translate(0 -288.53)' fill='none' stroke='%23000' stroke-width='.4'%3E%3Crect width='7.94' height='7.94' x='.27' y='288.8' ry='1.17' stroke-linejoin='round'/%3E%3Cpath d='M1.59 290.12h5.29M1.59 291.45h5.33M1.59 292.75h5.33M1.59 294.09h5.33M1.59 295.41h5.33'/%3E%3C/g%3E%3C/svg%3E"); + background-size: 32px 32px; + background-position: 5px 5px; + background-repeat: no-repeat; +} + +button#copy { + background-image: url("data:image/svg+xml,%3Csvg height='48' viewBox='0 0 48 48' width='48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h48v48h-48z' fill='none'/%3E%3Cpath d='M32 2h-24c-2.21 0-4 1.79-4 4v28h4v-28h24v-4zm6 8h-22c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h22c2.21 0 4-1.79 4-4v-28c0-2.21-1.79-4-4-4zm0 32h-22v-28h22v28z'/%3E%3C/svg%3E"); + background-position: 6px 6px; + background-repeat: no-repeat; + background-size: 26px 26px; + border-radius: 6px; + height: 40px; + width: 40px; + margin: 10px 5px; +} + +button#copy:active { + box-shadow: inset 0px 0px 5px #6c6c6c; +} + +textarea.clipboard-temp { + position: fixed; + top: 0; + left: 0; + width: 2em; + height: 2em; + padding: 0; + border: None; + outline: None; + box-shadow: None; + background: transparent; +} + +.left-most-button { + border-right: 0; + border-top-left-radius: 6px; + border-bottom-left-radius: 6px; +} + +.middle-button { + border-right: 0; +} + +.right-most-button { + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; +} + +.button-container { + font-size: 0; +} + +.dark .button-container { + filter: invert(1); +} + +@media print { + .hideonprint { + display: none; + } +} + +canvas { + cursor: crosshair; +} + +canvas:active { + cursor: grabbing; +} + +.fileinfo { + width: 100%; + max-width: 1000px; + border: none; + padding: 5px; +} + +.fileinfo .title { + font-size: 20pt; + font-weight: bold; +} + +.fileinfo td { + overflow: hidden; + white-space: nowrap; + max-width: 1px; + width: 50%; + text-overflow: ellipsis; +} + +.bom { + border-collapse: collapse; + font-family: Consolas, "DejaVu Sans Mono", Monaco, monospace; + font-size: 10pt; + table-layout: fixed; + width: 100%; + margin-top: 1px; +} + +.bom th, .bom td { + border: 1px solid black; + padding: 5px; + word-wrap: break-word; + text-align: center; + position: relative; +} + +.dark .bom th, .dark .bom td { + border: 1px solid #777; +} + +.bom th { + background-color: #CCCCCC; + background-clip: padding-box; +} + +.dark .bom th { + background-color: #3b4749; +} + +.bom tr.highlighted:nth-child(n) { + background-color: #cfc; +} + +.dark .bom tr.highlighted:nth-child(n) { + background-color: #226022; +} + +.bom tr:nth-child(even) { + background-color: #f2f2f2; +} + +.dark .bom tr:nth-child(even) { + background-color: #313b40; +} + +.bom tr { + transition: background-color 0.2s; +} + +.bom .numCol { + width: 25px; +} + +.bom .Description { + width: 10%; +} + +.bom .Part { + width: 10%; +} + +.bom .Value { + width: 15%; +} + +.bom .Quantity { + width: 65px; +} + +.bom th .sortmark { + position: absolute; + right: 1px; + top: 1px; + margin-top: -5px; + border-width: 5px; + border-style: solid; + border-color: transparent transparent #221 transparent; + transform-origin: 50% 85%; + transition: opacity 0.2s, transform 0.4s; +} + +.dark .bom th .sortmark { + filter: invert(1); +} + +.bom th .sortmark.none { + opacity: 0; +} + +.bom th .sortmark.desc { + transform: rotate(180deg); +} + +.bom th:hover .sortmark.none { + opacity: 0.5; +} + +.bom .bom-checkbox { + width: 30px; + position: relative; + user-select: none; + -moz-user-select: none; +} + +.bom .bom-checkbox:before { + content: ""; + position: absolute; + border-width: 15px; + border-style: solid; + border-color: #51829f transparent transparent transparent; + visibility: hidden; + top: -15px; +} + +.bom .bom-checkbox:after { + content: "Double click to set/unset all"; + position: absolute; + color: white; + top: -35px; + left: -26px; + background: #51829f; + padding: 5px 15px; + border-radius: 8px; + white-space: nowrap; + visibility: hidden; +} + +.bom .bom-checkbox:hover:before, .bom .bom-checkbox:hover:after { + visibility: visible; + transition: visibility 0.2s linear 1s; +} + +.split { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + overflow-y: auto; + overflow-x: hidden; + background-color: inherit; +} + +.split.split-horizontal, .gutter.gutter-horizontal { + height: 100%; + float: left; +} + +.gutter { + background-color: #ddd; + background-repeat: no-repeat; + background-position: 50%; + transition: background-color 0.3s; +} + +.dark .gutter { + background-color: #777; +} + +.gutter.gutter-horizontal { + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg=='); + cursor: ew-resize; + width: 5px; +} + +.gutter.gutter-vertical { + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII='); + cursor: ns-resize; + height: 5px; +} + +.searchbox { + float: left; + height: 40px; + margin: 10px 5px; + padding: 12px 32px; + font-family: Consolas, "DejaVu Sans Mono", Monaco, monospace; + font-size: 18px; + box-sizing: border-box; + border: 1px solid #888; + border-radius: 6px; + outline: none; + background-color: #eee; + transition: background-color 0.2s, border 0.2s; + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABNklEQVQ4T8XSMUvDQBQH8P/LElFa/AIZHcTBQSz0I/gFstTBRR2KUC4ldDxw7h0Bl3RRUATxi4iiODgoiLNrbQYp5J6cpJJqomkX33Z37/14d/dIa33MzDuYI4johOI4XhyNRteO46zNYjDzAxE1yBZprVeZ+QbAUhXEGJMA2Ox2u4+fQIa0mPmsCgCgJYQ4t7lfgF0opQYAdv9ABkKI/UnOFCClXKjX61cA1osQY8x9kiRNKeV7IWA3oyhaSdP0FkAtjxhj3hzH2RBCPOf3pzqYHCilfAAX+URm9oMguPzeWSGQvUcMYC8rOBJCHBRdqxTo9/vbRHRqi8bj8XKv1xvODbiuW2u32/bvf0SlDv4XYOY7z/Mavu+nM1+BmQ+NMc0wDF/LprP0DbTWW0T00ul0nn4b7Q87+X4Qmfiq2wAAAABJRU5ErkJggg=='); + background-position: 10px 10px; + background-repeat: no-repeat; +} + +.dark .searchbox { + background-color: #111; + color: #eee; +} + +.searchbox::placeholder { + color: #ccc; +} + +.dark .searchbox::placeholder { + color: #666; +} + +.filter { + width: calc(60% - 64px); +} + +.reflookup { + width: calc(40% - 10px); +} + +input[type=text]:focus { + background-color: white; + border: 1px solid #333; +} + +.dark input[type=text]:focus { + background-color: #333; + border: 1px solid #ccc; +} + +mark.highlight { + background-color: #5050ff; + color: #fff; + padding: 2px; + border-radius: 6px; +} + +.dark mark.highlight { + background-color: #76a6da; + color: #111; +} + +.menubtn { + background-color: white; + font-size: 16px; + border: none; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 20 20'%3E%3Cpath fill='none' d='M0 0h20v20H0V0z'/%3E%3Cpath d='M15.95 10.78c.03-.25.05-.51.05-.78s-.02-.53-.06-.78l1.69-1.32c.15-.12.19-.34.1-.51l-1.6-2.77c-.1-.18-.31-.24-.49-.18l-1.99.8c-.42-.32-.86-.58-1.35-.78L12 2.34c-.03-.2-.2-.34-.4-.34H8.4c-.2 0-.36.14-.39.34l-.3 2.12c-.49.2-.94.47-1.35.78l-1.99-.8c-.18-.07-.39 0-.49.18l-1.6 2.77c-.1.18-.06.39.1.51l1.69 1.32c-.04.25-.07.52-.07.78s.02.53.06.78L2.37 12.1c-.15.12-.19.34-.1.51l1.6 2.77c.1.18.31.24.49.18l1.99-.8c.42.32.86.58 1.35.78l.3 2.12c.04.2.2.34.4.34h3.2c.2 0 .37-.14.39-.34l.3-2.12c.49-.2.94-.47 1.35-.78l1.99.8c.18.07.39 0 .49-.18l1.6-2.77c.1-.18.06-.39-.1-.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z'/%3E%3C/svg%3E%0A"); + background-position: center; + background-repeat: no-repeat; +} + +.dark .menubtn { + filter: invert(1); +} + +.menu { + position: relative; + display: inline-block; +} + +.menu-content { + display: none; + position: absolute; + background-color: white; + right: 0; + min-width: 300px; + box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); + z-index: 100; + padding: 8px; +} + +.dark .menu-content { + background-color: #111; +} + +.menu:hover .menu-content { + display: block; +} + +.menu:hover .menubtn { + background-color: #eee; +} + +.dark .menu:hover .menubtn {} + +.menu-label { + display: inline-block; + padding: 8px; + border: 1px solid #ccc; + border-top: 0; + width: calc(100% - 18px); +} + +.menu-label-top { + border-top: 1px solid #ccc; +} + +.menu-textbox { + float: left; + height: 24px; + margin: 10px 5px; + padding: 5px 5px; + font-family: Consolas, "DejaVu Sans Mono", Monaco, monospace; + font-size: 14px; + box-sizing: border-box; + border: 1px solid #888; + border-radius: 4px; + outline: none; + background-color: #eee; + transition: background-color 0.2s, border 0.2s; + width: calc(100% - 10px); +} + +.dark .menu-textbox { + background-color: #222; + color: #eee; +} + +#topmostdiv { + transition: background-color 0.3s; +} + +#top { + height: 78px; + border-bottom: 2px solid black; +} + +.dark #top { + border-bottom: 2px solid #ccc; +} + +#dbg { + display: block; +} + +::-webkit-scrollbar { + width: 8px; +} + +::-webkit-scrollbar-track { + background: #aaa; +} + +::-webkit-scrollbar-thumb { + background: #666; + border-radius: 3px; +} + +::-webkit-scrollbar-thumb:hover { + background: #555; +} + +.slider { + -webkit-appearance: none; + width: 100%; + margin: 3px 0; + padding: 0; + outline: none; + opacity: 0.7; + -webkit-transition: .2s; + transition: opacity .2s; + border-radius: 3px; +} + +.slider:hover { + opacity: 1; +} + +.slider:focus { + outline: none; +} + +.slider::-webkit-slider-runnable-track { + -webkit-appearance: none; + width: 100%; + height: 8px; + background: #d3d3d3; + border-radius: 3px; + border: none; +} + +.slider::-webkit-slider-thumb { + -webkit-appearance: none; + width: 15px; + height: 15px; + border-radius: 50%; + background: #0a0; + cursor: pointer; + margin-top: -4px; +} + +.dark .slider::-webkit-slider-thumb { + background: #3d3; +} + +.slider::-moz-range-thumb { + width: 15px; + height: 15px; + border-radius: 50%; + background: #0a0; + cursor: pointer; +} + +.slider::-moz-range-track { + height: 8px; + background: #d3d3d3; + border-radius: 3px; +} + +.dark .slider::-moz-range-thumb { + background: #3d3; +} + +.slider::-ms-track { + width: 100%; + height: 8px; + border-width: 3px 0; + background: transparent; + border-color: transparent; + color: transparent; + transition: opacity .2s; +} + +.slider::-ms-fill-lower { + background: #d3d3d3; + border: none; + border-radius: 3px; +} + +.slider::-ms-fill-upper { + background: #d3d3d3; + border: none; + border-radius: 3px; +} + +.slider::-ms-thumb { + width: 15px; + height: 15px; + border-radius: 50%; + background: #0a0; + cursor: pointer; + margin: 0; +} + +.shameless-plug { + font-size: 0.8em; + text-align: center; + display: block; +} + +.shameless-plug a { + color: #0278a4; +} + +.dark .shameless-plug a { + color: #00b9fd; +} + + </style> + <script type="text/javascript" > +/////////////////////////////////////////////// +/* + Split.js - v1.3.5 + MIT License + https://github.com/nathancahill/Split.js +*/ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Split=t()}(this,function(){"use strict";var e=window,t=e.document,n="addEventListener",i="removeEventListener",r="getBoundingClientRect",s=function(){return!1},o=e.attachEvent&&!e[n],a=["","-webkit-","-moz-","-o-"].filter(function(e){var n=t.createElement("div");return n.style.cssText="width:"+e+"calc(9px)",!!n.style.length}).shift()+"calc",l=function(e){return"string"==typeof e||e instanceof String?t.querySelector(e):e};return function(u,c){function z(e,t,n){var i=A(y,t,n);Object.keys(i).forEach(function(t){return e.style[t]=i[t]})}function h(e,t){var n=B(y,t);Object.keys(n).forEach(function(t){return e.style[t]=n[t]})}function f(e){var t=E[this.a],n=E[this.b],i=t.size+n.size;t.size=e/this.size*i,n.size=i-e/this.size*i,z(t.element,t.size,this.aGutterSize),z(n.element,n.size,this.bGutterSize)}function m(e){var t;this.dragging&&((t="touches"in e?e.touches[0][b]-this.start:e[b]-this.start)<=E[this.a].minSize+M+this.aGutterSize?t=E[this.a].minSize+this.aGutterSize:t>=this.size-(E[this.b].minSize+M+this.bGutterSize)&&(t=this.size-(E[this.b].minSize+this.bGutterSize)),f.call(this,t),c.onDrag&&c.onDrag())}function g(){var e=E[this.a].element,t=E[this.b].element;this.size=e[r]()[y]+t[r]()[y]+this.aGutterSize+this.bGutterSize,this.start=e[r]()[G]}function d(){var t=this,n=E[t.a].element,r=E[t.b].element;t.dragging&&c.onDragEnd&&c.onDragEnd(),t.dragging=!1,e[i]("mouseup",t.stop),e[i]("touchend",t.stop),e[i]("touchcancel",t.stop),t.parent[i]("mousemove",t.move),t.parent[i]("touchmove",t.move),delete t.stop,delete t.move,n[i]("selectstart",s),n[i]("dragstart",s),r[i]("selectstart",s),r[i]("dragstart",s),n.style.userSelect="",n.style.webkitUserSelect="",n.style.MozUserSelect="",n.style.pointerEvents="",r.style.userSelect="",r.style.webkitUserSelect="",r.style.MozUserSelect="",r.style.pointerEvents="",t.gutter.style.cursor="",t.parent.style.cursor=""}function S(t){var i=this,r=E[i.a].element,o=E[i.b].element;!i.dragging&&c.onDragStart&&c.onDragStart(),t.preventDefault(),i.dragging=!0,i.move=m.bind(i),i.stop=d.bind(i),e[n]("mouseup",i.stop),e[n]("touchend",i.stop),e[n]("touchcancel",i.stop),i.parent[n]("mousemove",i.move),i.parent[n]("touchmove",i.move),r[n]("selectstart",s),r[n]("dragstart",s),o[n]("selectstart",s),o[n]("dragstart",s),r.style.userSelect="none",r.style.webkitUserSelect="none",r.style.MozUserSelect="none",r.style.pointerEvents="none",o.style.userSelect="none",o.style.webkitUserSelect="none",o.style.MozUserSelect="none",o.style.pointerEvents="none",i.gutter.style.cursor=j,i.parent.style.cursor=j,g.call(i)}function v(e){e.forEach(function(t,n){if(n>0){var i=F[n-1],r=E[i.a],s=E[i.b];r.size=e[n-1],s.size=t,z(r.element,r.size,i.aGutterSize),z(s.element,s.size,i.bGutterSize)}})}function p(){F.forEach(function(e){e.parent.removeChild(e.gutter),E[e.a].element.style[y]="",E[e.b].element.style[y]=""})}void 0===c&&(c={});var y,b,G,E,w=l(u[0]).parentNode,D=e.getComputedStyle(w).flexDirection,U=c.sizes||u.map(function(){return 100/u.length}),k=void 0!==c.minSize?c.minSize:100,x=Array.isArray(k)?k:u.map(function(){return k}),L=void 0!==c.gutterSize?c.gutterSize:10,M=void 0!==c.snapOffset?c.snapOffset:30,O=c.direction||"horizontal",j=c.cursor||("horizontal"===O?"ew-resize":"ns-resize"),C=c.gutter||function(e,n){var i=t.createElement("div");return i.className="gutter gutter-"+n,i},A=c.elementStyle||function(e,t,n){var i={};return"string"==typeof t||t instanceof String?i[e]=t:i[e]=o?t+"%":a+"("+t+"% - "+n+"px)",i},B=c.gutterStyle||function(e,t){return n={},n[e]=t+"px",n;var n};"horizontal"===O?(y="width","clientWidth",b="clientX",G="left","paddingLeft"):"vertical"===O&&(y="height","clientHeight",b="clientY",G="top","paddingTop");var F=[];return E=u.map(function(e,t){var i,s={element:l(e),size:U[t],minSize:x[t]};if(t>0&&(i={a:t-1,b:t,dragging:!1,isFirst:1===t,isLast:t===u.length-1,direction:O,parent:w},i.aGutterSize=L,i.bGutterSize=L,i.isFirst&&(i.aGutterSize=L/2),i.isLast&&(i.bGutterSize=L/2),"row-reverse"===D||"column-reverse"===D)){var a=i.a;i.a=i.b,i.b=a}if(!o&&t>0){var c=C(t,O);h(c,L),c[n]("mousedown",S.bind(i)),c[n]("touchstart",S.bind(i)),w.insertBefore(c,s.element),i.gutter=c}0===t||t===u.length-1?z(s.element,s.size,L/2):z(s.element,s.size,L);var f=s.element[r]()[y];return f<s.minSize&&(s.minSize=f),t>0&&F.push(i),s}),o?{setSizes:v,destroy:p}:{setSizes:v,getSizes:function(){return E.map(function(e){return e.size})},collapse:function(e){if(e===F.length){var t=F[e-1];g.call(t),o||f.call(t,t.size-t.bGutterSize)}else{var n=F[e];g.call(n),o||f.call(n,n.aGutterSize)}},destroy:p}}}); + +/////////////////////////////////////////////// + +/////////////////////////////////////////////// +var config = {"redraw_on_drag": true, "highlight_pin1": false, "extra_fields": [], "dark_mode": false, "bom_view": "left-right", "board_rotation": 0.0, "checkboxes": "Sourced,Placed", "show_silkscreen": true, "layer_view": "FB"} +/////////////////////////////////////////////// + +/////////////////////////////////////////////// +var pcbdata = {"font_data": {" ": {"l": [], "w": 0.7619047619047619}, "1": {"l": [[[0.7619047619047619, -0.047619047619047616], [0.19047619047619047, -0.047619047619047616]], [[0.47619047619047616, -0.047619047619047616], [0.47619047619047616, -1.0476190476190474], [0.38095238095238093, -0.9047619047619047], [0.2857142857142857, -0.8095238095238095], [0.19047619047619047, -0.7619047619047619]]], "w": 0.9523809523809523}, "0": {"l": [[[0.42857142857142855, -1.0476190476190474], [0.5238095238095237, -1.0476190476190474], [0.6190476190476191, -1.0], [0.6666666666666666, -0.9523809523809523], [0.7142857142857142, -0.8571428571428571], [0.7619047619047619, -0.6666666666666666], [0.7619047619047619, -0.42857142857142855], [0.7142857142857142, -0.23809523809523808], [0.6666666666666666, -0.14285714285714285], [0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.42857142857142855, -0.047619047619047616], [0.3333333333333333, -0.09523809523809523], [0.2857142857142857, -0.14285714285714285], [0.23809523809523808, -0.23809523809523808], [0.19047619047619047, -0.42857142857142855], [0.19047619047619047, -0.6666666666666666], [0.23809523809523808, -0.8571428571428571], [0.2857142857142857, -0.9523809523809523], [0.3333333333333333, -1.0], [0.42857142857142855, -1.0476190476190474]]], "w": 0.9523809523809523}, "3": {"l": [[[0.14285714285714285, -1.0476190476190474], [0.7619047619047619, -1.0476190476190474], [0.42857142857142855, -0.6666666666666666], [0.5714285714285714, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.7619047619047619, -0.47619047619047616], [0.7619047619047619, -0.23809523809523808], [0.7142857142857142, -0.14285714285714285], [0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.2857142857142857, -0.047619047619047616], [0.19047619047619047, -0.09523809523809523], [0.14285714285714285, -0.14285714285714285]]], "w": 0.9523809523809523}, "2": {"l": [[[0.19047619047619047, -0.9523809523809523], [0.23809523809523808, -1.0], [0.3333333333333333, -1.0476190476190474], [0.5714285714285714, -1.0476190476190474], [0.6666666666666666, -1.0], [0.7142857142857142, -0.9523809523809523], [0.7619047619047619, -0.8571428571428571], [0.7619047619047619, -0.7619047619047619], [0.7142857142857142, -0.6190476190476191], [0.14285714285714285, -0.047619047619047616], [0.7619047619047619, -0.047619047619047616]]], "w": 0.9523809523809523}, "5": {"l": [[[0.7142857142857142, -1.0476190476190474], [0.23809523809523808, -1.0476190476190474], [0.19047619047619047, -0.5714285714285714], [0.23809523809523808, -0.6190476190476191], [0.3333333333333333, -0.6666666666666666], [0.5714285714285714, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.7619047619047619, -0.47619047619047616], [0.7619047619047619, -0.23809523809523808], [0.7142857142857142, -0.14285714285714285], [0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523], [0.19047619047619047, -0.14285714285714285]]], "w": 0.9523809523809523}, "4": {"l": [[[0.6666666666666666, -0.7142857142857142], [0.6666666666666666, -0.047619047619047616]], [[0.42857142857142855, -1.0952380952380951], [0.19047619047619047, -0.38095238095238093], [0.8095238095238095, -0.38095238095238093]]], "w": 0.9523809523809523}, "7": {"l": [[[0.14285714285714285, -1.0476190476190474], [0.8095238095238095, -1.0476190476190474], [0.38095238095238093, -0.047619047619047616]]], "w": 0.9523809523809523}, "9": {"l": [[[0.2857142857142857, -0.047619047619047616], [0.47619047619047616, -0.047619047619047616], [0.5714285714285714, -0.09523809523809523], [0.6190476190476191, -0.14285714285714285], [0.7142857142857142, -0.2857142857142857], [0.7619047619047619, -0.47619047619047616], [0.7619047619047619, -0.8571428571428571], [0.7142857142857142, -0.9523809523809523], [0.6666666666666666, -1.0], [0.5714285714285714, -1.0476190476190474], [0.38095238095238093, -1.0476190476190474], [0.2857142857142857, -1.0], [0.23809523809523808, -0.9523809523809523], [0.19047619047619047, -0.8571428571428571], [0.19047619047619047, -0.6190476190476191], [0.23809523809523808, -0.5238095238095237], [0.2857142857142857, -0.47619047619047616], [0.38095238095238093, -0.42857142857142855], [0.5714285714285714, -0.42857142857142855], [0.6666666666666666, -0.47619047619047616], [0.7142857142857142, -0.5238095238095237], [0.7619047619047619, -0.6190476190476191]]], "w": 0.9523809523809523}, "C": {"l": [[[0.8095238095238095, -0.14285714285714285], [0.7619047619047619, -0.09523809523809523], [0.6190476190476191, -0.047619047619047616], [0.5238095238095237, -0.047619047619047616], [0.38095238095238093, -0.09523809523809523], [0.2857142857142857, -0.19047619047619047], [0.23809523809523808, -0.2857142857142857], [0.19047619047619047, -0.47619047619047616], [0.19047619047619047, -0.6190476190476191], [0.23809523809523808, -0.8095238095238095], [0.2857142857142857, -0.9047619047619047], [0.38095238095238093, -1.0], [0.5238095238095237, -1.0476190476190474], [0.6190476190476191, -1.0476190476190474], [0.7619047619047619, -1.0], [0.8095238095238095, -0.9523809523809523]]], "w": 1.0}, "E": {"l": [[[0.23809523809523808, -0.5714285714285714], [0.5714285714285714, -0.5714285714285714]], [[0.7142857142857142, -0.047619047619047616], [0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474], [0.7142857142857142, -1.0476190476190474]]], "w": 0.9047619047619047}, "D": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.4761904761904761, -1.0476190476190474], [0.619047619047619, -1.0], [0.7142857142857142, -0.9047619047619047], [0.7619047619047619, -0.8095238095238095], [0.8095238095238094, -0.6190476190476191], [0.8095238095238094, -0.47619047619047616], [0.7619047619047619, -0.2857142857142857], [0.7142857142857142, -0.19047619047619047], [0.619047619047619, -0.09523809523809523], [0.4761904761904761, -0.047619047619047616], [0.23809523809523803, -0.047619047619047616]]], "w": 1.0}, "G": {"l": [[[0.7619047619047619, -1.0], [0.6666666666666666, -1.0476190476190474], [0.5238095238095237, -1.0476190476190474], [0.38095238095238093, -1.0], [0.2857142857142857, -0.9047619047619047], [0.23809523809523808, -0.8095238095238095], [0.19047619047619047, -0.6190476190476191], [0.19047619047619047, -0.47619047619047616], [0.23809523809523808, -0.2857142857142857], [0.2857142857142857, -0.19047619047619047], [0.38095238095238093, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.6190476190476191, -0.047619047619047616], [0.7619047619047619, -0.09523809523809523], [0.8095238095238095, -0.14285714285714285], [0.8095238095238095, -0.47619047619047616], [0.6190476190476191, -0.47619047619047616]]], "w": 1.0}, "F": {"l": [[[0.5714285714285714, -0.5714285714285714], [0.23809523809523808, -0.5714285714285714]], [[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474], [0.7142857142857142, -1.0476190476190474]]], "w": 0.8571428571428571}, "K": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474]], [[0.8095238095238094, -0.047619047619047616], [0.3809523809523809, -0.6190476190476191]], [[0.8095238095238094, -1.0476190476190474], [0.23809523809523803, -0.47619047619047616]]], "w": 1.0}, "J": {"l": [[[0.5238095238095237, -1.0476190476190474], [0.5238095238095237, -0.3333333333333333], [0.47619047619047616, -0.19047619047619047], [0.38095238095238093, -0.09523809523809523], [0.23809523809523808, -0.047619047619047616], [0.14285714285714285, -0.047619047619047616]]], "w": 0.7619047619047619}, "M": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474], [0.5714285714285714, -0.3333333333333333], [0.9047619047619047, -1.0476190476190474], [0.9047619047619047, -0.047619047619047616]]], "w": 1.1428571428571428}, "L": {"l": [[[0.7142857142857142, -0.047619047619047616], [0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474]]], "w": 0.8095238095238095}, "O": {"l": [[[0.4285714285714285, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.8095238095238094, -0.9047619047619047], [0.857142857142857, -0.7142857142857142], [0.857142857142857, -0.38095238095238093], [0.8095238095238094, -0.19047619047619047], [0.7142857142857142, -0.09523809523809523], [0.619047619047619, -0.047619047619047616], [0.4285714285714285, -0.047619047619047616], [0.33333333333333326, -0.09523809523809523], [0.23809523809523803, -0.19047619047619047], [0.1904761904761904, -0.38095238095238093], [0.1904761904761904, -0.7142857142857142], [0.23809523809523803, -0.9047619047619047], [0.33333333333333326, -1.0], [0.4285714285714285, -1.0476190476190474]]], "w": 1.0476190476190474}, "N": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.8095238095238094, -0.047619047619047616], [0.8095238095238094, -1.0476190476190474]]], "w": 1.0476190476190474}, "P": {"l": [[[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.7619047619047619, -0.9523809523809523], [0.8095238095238094, -0.8571428571428571], [0.8095238095238094, -0.7142857142857142], [0.7619047619047619, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.619047619047619, -0.5238095238095237], [0.23809523809523803, -0.5238095238095237]]], "w": 1.0}, "S": {"l": [[[0.19047619047619047, -0.09523809523809523], [0.3333333333333333, -0.047619047619047616], [0.5714285714285714, -0.047619047619047616], [0.6666666666666666, -0.09523809523809523], [0.7142857142857142, -0.14285714285714285], [0.7619047619047619, -0.23809523809523808], [0.7619047619047619, -0.3333333333333333], [0.7142857142857142, -0.42857142857142855], [0.6666666666666666, -0.47619047619047616], [0.5714285714285714, -0.5238095238095237], [0.38095238095238093, -0.5714285714285714], [0.2857142857142857, -0.6190476190476191], [0.23809523809523808, -0.6666666666666666], [0.19047619047619047, -0.7619047619047619], [0.19047619047619047, -0.8571428571428571], [0.23809523809523808, -0.9523809523809523], [0.2857142857142857, -1.0], [0.38095238095238093, -1.0476190476190474], [0.6190476190476191, -1.0476190476190474], [0.7619047619047619, -1.0]]], "w": 0.9523809523809523}, "R": {"l": [[[0.8095238095238094, -0.047619047619047616], [0.4761904761904761, -0.5238095238095237]], [[0.23809523809523803, -0.047619047619047616], [0.23809523809523803, -1.0476190476190474], [0.619047619047619, -1.0476190476190474], [0.7142857142857142, -1.0], [0.7619047619047619, -0.9523809523809523], [0.8095238095238094, -0.8571428571428571], [0.8095238095238094, -0.7142857142857142], [0.7619047619047619, -0.6190476190476191], [0.7142857142857142, -0.5714285714285714], [0.619047619047619, -0.5238095238095237], [0.23809523809523803, -0.5238095238095237]]], "w": 1.0}, "U": {"l": [[[0.23809523809523803, -1.0476190476190474], [0.23809523809523803, -0.23809523809523808], [0.28571428571428564, -0.14285714285714285], [0.33333333333333326, -0.09523809523809523], [0.4285714285714285, -0.047619047619047616], [0.619047619047619, -0.047619047619047616], [0.7142857142857142, -0.09523809523809523], [0.7619047619047619, -0.14285714285714285], [0.8095238095238094, -0.23809523809523808], [0.8095238095238094, -1.0476190476190474]]], "w": 1.0476190476190474}, "V": {"l": [[[0.09523809523809523, -1.0476190476190474], [0.42857142857142855, -0.047619047619047616], [0.7619047619047619, -1.0476190476190474]]], "w": 0.8571428571428571}, "a": {"l": [[[0.6666666666666666, -0.047619047619047616], [0.6666666666666666, -0.5714285714285714], [0.6190476190476191, -0.6666666666666666], [0.5238095238095237, -0.7142857142857142], [0.3333333333333333, -0.7142857142857142], [0.23809523809523808, -0.6666666666666666]], [[0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523], [0.19047619047619047, -0.19047619047619047], [0.19047619047619047, -0.2857142857142857], [0.23809523809523808, -0.38095238095238093], [0.3333333333333333, -0.42857142857142855], [0.5714285714285714, -0.42857142857142855], [0.6666666666666666, -0.47619047619047616]]], "w": 0.9047619047619047}, "c": {"l": [[[0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.14285714285714285], [0.19047619047619047, -0.23809523809523808], [0.19047619047619047, -0.5238095238095237], [0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5714285714285714, -0.7142857142857142], [0.6666666666666666, -0.6666666666666666]]], "w": 0.8571428571428571}, "e": {"l": [[[0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523], [0.19047619047619047, -0.19047619047619047], [0.19047619047619047, -0.5714285714285714], [0.23809523809523808, -0.6666666666666666], [0.3333333333333333, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.5714285714285714], [0.6666666666666666, -0.47619047619047616], [0.19047619047619047, -0.38095238095238093]]], "w": 0.8571428571428571}, "d": {"l": [[[0.6666666666666666, -0.047619047619047616], [0.6666666666666666, -1.0476190476190474]], [[0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.14285714285714285], [0.19047619047619047, -0.23809523809523808], [0.19047619047619047, -0.5238095238095237], [0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5714285714285714, -0.7142857142857142], [0.6666666666666666, -0.6666666666666666]]], "w": 0.9047619047619047}, "g": {"l": [[[0.6666666666666666, -0.7142857142857142], [0.6666666666666666, 0.09523809523809523], [0.6190476190476191, 0.19047619047619047], [0.5714285714285714, 0.23809523809523808], [0.47619047619047616, 0.2857142857142857], [0.3333333333333333, 0.2857142857142857], [0.23809523809523808, 0.23809523809523808]], [[0.6666666666666666, -0.09523809523809523], [0.5714285714285714, -0.047619047619047616], [0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.14285714285714285], [0.19047619047619047, -0.23809523809523808], [0.19047619047619047, -0.5238095238095237], [0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5714285714285714, -0.7142857142857142], [0.6666666666666666, -0.6666666666666666]]], "w": 0.9047619047619047}, "f": {"l": [[[0.09523809523809523, -0.7142857142857142], [0.47619047619047616, -0.7142857142857142]], [[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.9047619047619047], [0.2857142857142857, -1.0], [0.38095238095238093, -1.0476190476190474], [0.47619047619047616, -1.0476190476190474]]], "w": 0.5714285714285714}, "i": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.7142857142857142]], [[0.23809523809523808, -1.0476190476190474], [0.19047619047619047, -1.0], [0.23809523809523808, -0.9523809523809523], [0.2857142857142857, -1.0], [0.23809523809523808, -1.0476190476190474], [0.23809523809523808, -0.9523809523809523]]], "w": 0.47619047619047616}, "h": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -1.0476190476190474]], [[0.6666666666666666, -0.047619047619047616], [0.6666666666666666, -0.5714285714285714], [0.6190476190476191, -0.6666666666666666], [0.5238095238095237, -0.7142857142857142], [0.38095238095238093, -0.7142857142857142], [0.2857142857142857, -0.6666666666666666], [0.23809523809523808, -0.6190476190476191]]], "w": 0.9047619047619047}, "m": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.7142857142857142]], [[0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.5714285714285714], [0.6666666666666666, -0.047619047619047616]], [[0.6666666666666666, -0.5714285714285714], [0.7142857142857142, -0.6666666666666666], [0.8095238095238095, -0.7142857142857142], [0.9523809523809523, -0.7142857142857142], [1.0476190476190474, -0.6666666666666666], [1.0952380952380951, -0.5714285714285714], [1.0952380952380951, -0.047619047619047616]]], "w": 1.3333333333333333}, "l": {"l": [[[0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.19047619047619047], [0.23809523809523808, -1.0476190476190474]]], "w": 0.5238095238095237}, "o": {"l": [[[0.38095238095238093, -0.047619047619047616], [0.2857142857142857, -0.09523809523809523], [0.23809523809523808, -0.14285714285714285], [0.19047619047619047, -0.23809523809523808], [0.19047619047619047, -0.5238095238095237], [0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5238095238095237], [0.7142857142857142, -0.23809523809523808], [0.6666666666666666, -0.14285714285714285], [0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.38095238095238093, -0.047619047619047616]]], "w": 0.9047619047619047}, "n": {"l": [[[0.23809523809523808, -0.7142857142857142], [0.23809523809523808, -0.047619047619047616]], [[0.23809523809523808, -0.6190476190476191], [0.2857142857142857, -0.6666666666666666], [0.38095238095238093, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.5714285714285714], [0.6666666666666666, -0.047619047619047616]]], "w": 0.9047619047619047}, "p": {"l": [[[0.23809523809523808, -0.7142857142857142], [0.23809523809523808, 0.2857142857142857]], [[0.23809523809523808, -0.6666666666666666], [0.3333333333333333, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142], [0.6190476190476191, -0.6666666666666666], [0.6666666666666666, -0.6190476190476191], [0.7142857142857142, -0.5238095238095237], [0.7142857142857142, -0.23809523809523808], [0.6666666666666666, -0.14285714285714285], [0.6190476190476191, -0.09523809523809523], [0.5238095238095237, -0.047619047619047616], [0.3333333333333333, -0.047619047619047616], [0.23809523809523808, -0.09523809523809523]]], "w": 0.9047619047619047}, "s": {"l": [[[0.19047619047619047, -0.09523809523809523], [0.2857142857142857, -0.047619047619047616], [0.47619047619047616, -0.047619047619047616], [0.5714285714285714, -0.09523809523809523], [0.6190476190476191, -0.19047619047619047], [0.6190476190476191, -0.23809523809523808], [0.5714285714285714, -0.3333333333333333], [0.47619047619047616, -0.38095238095238093], [0.3333333333333333, -0.38095238095238093], [0.23809523809523808, -0.42857142857142855], [0.19047619047619047, -0.5238095238095237], [0.19047619047619047, -0.5714285714285714], [0.23809523809523808, -0.6666666666666666], [0.3333333333333333, -0.7142857142857142], [0.47619047619047616, -0.7142857142857142], [0.5714285714285714, -0.6666666666666666]]], "w": 0.8095238095238095}, "r": {"l": [[[0.23809523809523808, -0.047619047619047616], [0.23809523809523808, -0.7142857142857142]], [[0.23809523809523808, -0.5238095238095237], [0.2857142857142857, -0.6190476190476191], [0.3333333333333333, -0.6666666666666666], [0.42857142857142855, -0.7142857142857142], [0.5238095238095237, -0.7142857142857142]]], "w": 0.6190476190476191}, "u": {"l": [[[0.6666666666666666, -0.7142857142857142], [0.6666666666666666, -0.047619047619047616]], [[0.23809523809523808, -0.7142857142857142], [0.23809523809523808, -0.19047619047619047], [0.2857142857142857, -0.09523809523809523], [0.38095238095238093, -0.047619047619047616], [0.5238095238095237, -0.047619047619047616], [0.6190476190476191, -0.09523809523809523], [0.6666666666666666, -0.14285714285714285]]], "w": 0.9047619047619047}, "t": {"l": [[[0.09523809523809523, -0.7142857142857142], [0.47619047619047616, -0.7142857142857142]], [[0.23809523809523808, -1.0476190476190474], [0.23809523809523808, -0.19047619047619047], [0.2857142857142857, -0.09523809523809523], [0.38095238095238093, -0.047619047619047616], [0.47619047619047616, -0.047619047619047616]]], "w": 0.5714285714285714}, "w": {"l": [[[0.1428571428571428, -0.7142857142857142], [0.33333333333333326, -0.047619047619047616], [0.5238095238095237, -0.5238095238095237], [0.7142857142857142, -0.047619047619047616], [0.9047619047619047, -0.7142857142857142]]], "w": 1.0476190476190474}}, "modules": [{"layer": "F", "center": [123.52499999999999, 106.675], "pads": [{"layers": ["F", "B"], "angle": -90.0, "pos": [123.52499999999999, 96.675], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [123.52499999999999, 99.175], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [123.52499999999999, 101.675], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [123.52499999999999, 104.175], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [123.52499999999999, 106.675], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}], "drawings": [], "ref": "J4", "bbox": {"pos": [121.24999899999999, 93.499999], "size": [5.150002, 16.350002]}}, {"layer": "F", "center": [120.64999999999999, 84.328], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [123.19, 84.328], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [120.64999999999999, 84.328], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}], "drawings": [], "ref": "D4", "bbox": {"pos": [118.674999, 81.052999], "size": [6.500001999999999, 6.550002]}}, {"layer": "F", "center": [120.5, 91.5], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [125.58, 91.5], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [120.5, 91.5], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}], "drawings": [], "ref": "R4", "bbox": {"pos": [118.87499899999999, 89.874999], "size": [7.850002, 3.250002]}}, {"layer": "F", "center": [102.10799999999999, 93.726], "pads": [{"layers": ["F", "B"], "angle": -270.0, "pos": [102.10799999999999, 93.726], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -270.0, "pos": [102.10799999999999, 96.226], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}], "drawings": [], "ref": "C2", "bbox": {"pos": [100.432999, 92.650999], "size": [3.350002, 4.650002]}}, {"layer": "F", "center": [96.774, 96.26599999999999], "pads": [{"layers": ["F", "B"], "angle": -90.0, "pos": [96.774, 93.76599999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [96.774, 96.26599999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}], "drawings": [], "ref": "C1", "bbox": {"pos": [95.09899899999999, 92.69099899999999], "size": [3.350002, 4.650002]}}, {"layer": "F", "center": [93.97999999999999, 112.52199999999999], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [99.06, 112.52199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [93.97999999999999, 112.52199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}], "drawings": [], "ref": "R3", "bbox": {"pos": [92.35499899999999, 110.896999], "size": [7.850002, 3.250002]}}, {"layer": "F", "center": [93.726, 106.934], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [93.726, 106.934], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [98.806, 106.934], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}], "drawings": [], "ref": "R2", "bbox": {"pos": [92.100999, 105.308999], "size": [7.850002, 3.250002]}}, {"layer": "F", "center": [93.726, 101.092], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [98.806, 101.092], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [93.726, 101.092], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.5999999999999999, 1.5999999999999999]}], "drawings": [], "ref": "R1", "bbox": {"pos": [92.100999, 99.466999], "size": [7.850002, 3.250002]}}, {"layer": "F", "center": [102.362, 112.52199999999999], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [104.902, 112.52199999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [102.362, 112.52199999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}], "drawings": [], "ref": "D3", "bbox": {"pos": [101.186999, 110.24699899999999], "size": [4.900002, 4.550002]}}, {"layer": "F", "center": [102.362, 106.934], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [102.362, 106.934], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [104.902, 106.934], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}], "drawings": [], "ref": "D2", "bbox": {"pos": [101.186999, 104.658999], "size": [4.900002, 4.550002]}}, {"layer": "F", "center": [102.362, 101.092], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [104.902, 101.092], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [102.362, 101.092], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.7999999999999998, 1.7999999999999998]}], "drawings": [], "ref": "D1", "bbox": {"pos": [101.186999, 98.816999], "size": [4.900002, 4.550002]}}, {"layer": "F", "center": [109.47399999999999, 90.932], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 90.932], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 108.71199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 93.472], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 106.172], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 96.012], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 103.63199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 98.55199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 101.092], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 101.092], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 98.55199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 103.63199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 96.012], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 106.172], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 93.472], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [117.094, 108.71199999999999], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [2.4, 1.5999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [109.47399999999999, 90.932], "drillsize": [0.7999999999999999, 0.7999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [2.4, 1.5999999999999999]}], "drawings": [], "ref": "U1", "bbox": {"pos": [107.89899899999999, 89.30699899999999], "size": [10.750002, 21.050002]}}, {"layer": "F", "center": [87.884, 95.50399999999999], "pads": [{"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 88.00399999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 90.50399999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 93.00399999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 95.50399999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}], "drawings": [], "ref": "J1", "bbox": {"pos": [85.608999, 84.828999], "size": [5.150002, 13.850002]}}, {"layer": "F", "center": [87.884, 111.75999999999999], "pads": [{"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 111.75999999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 109.25999999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 106.75999999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}, {"layers": ["F", "B"], "angle": -90.0, "pos": [87.884, 104.25999999999999], "drillsize": [0.8999999999999999, 0.8999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.8499999999999999, 1.8499999999999999]}], "drawings": [], "ref": "J2", "bbox": {"pos": [85.608999, 101.084999], "size": [5.150002, 13.850002]}}, {"layer": "F", "center": [98.298, 88.13799999999999], "pads": [{"layers": ["F", "B"], "angle": -0.0, "pos": [100.838, 90.678], "drillsize": [1.0999999999999999, 1.0999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.0999999999999999, 1.0999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [98.298, 90.678], "drillsize": [1.0999999999999999, 1.0999999999999999], "shape": "circle", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.0999999999999999, 1.0999999999999999]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [98.298, 88.13799999999999], "drillsize": [1.09728, 1.09728], "shape": "rect", "offset": [0.0, 0.0], "drillshape": "circle", "pin1": 1, "type": "th", "size": [1.99898, 1.99898]}, {"layers": ["F", "B"], "angle": -0.0, "pos": [100.838, 88.13799999999999], "drillsize": [1.09728, 1.09728], "shape": "oval", "offset": [0.0, 0.0], "drillshape": "circle", "type": "th", "size": [1.99898, 1.99898]}], "drawings": [], "ref": "J3", "bbox": {"pos": [96.572999, 84.81299899999999], "size": [6.050002, 6.650002]}}, {"layer": "F", "center": [115.57, 114.80799999999999], "pads": [], "drawings": [], "ref": "REF***", "bbox": {"pos": [112.299285, 112.04528499999999], "size": [6.54143, 5.538887]}}], "edges": [{"start": [80.81, 99.82], "end": [80.81, 83.82], "type": "segment", "width": 0.09999999999999999}, {"start": [84.21, 116.42], "radius": 1.5999999999999999, "type": "circle", "width": 0.09999999999999999}, {"width": 0.09999999999999999, "endangle": 180.0, "start": [84.81, 115.82], "radius": 4.0, "startangle": 90.0, "type": "arc"}, {"start": [127.41, 116.42], "radius": 1.5999999999999999, "type": "circle", "width": 0.09999999999999999}, {"width": 0.09999999999999999, "endangle": 90.0, "start": [126.80999999999999, 115.82], "radius": 4.0, "startangle": 0.0, "type": "arc"}, {"start": [130.81, 83.82], "end": [130.81, 99.82], "type": "segment", "width": 0.09999999999999999}, {"start": [127.41, 83.22], "radius": 1.5999999999999999, "type": "circle", "width": 0.09999999999999999}, {"start": [105.81, 79.82], "end": [126.80999999999999, 79.82], "type": "segment", "width": 0.09999999999999999}, {"width": 0.09999999999999999, "endangle": 270.0, "start": [84.81, 83.82], "radius": 4.0, "startangle": 180.0, "type": "arc"}, {"start": [84.21, 83.22], "radius": 1.5999999999999999, "type": "circle", "width": 0.09999999999999999}, {"start": [130.81, 99.82], "end": [130.81, 115.82], "type": "segment", "width": 0.09999999999999999}, {"start": [105.81, 119.82], "end": [84.81, 119.82], "type": "segment", "width": 0.09999999999999999}, {"start": [80.81, 115.82], "end": [80.81, 99.82], "type": "segment", "width": 0.09999999999999999}, {"width": 0.09999999999999999, "endangle": 0.0, "start": [126.80999999999999, 83.82], "radius": 4.0, "startangle": -90.0, "type": "arc"}, {"start": [84.81, 79.82], "end": [105.81, 79.82], "type": "segment", "width": 0.09999999999999999}, {"start": [126.80999999999999, 119.82], "end": [105.81, 119.82], "type": "segment", "width": 0.09999999999999999}], "bom": {"both": [[2, "1uf", "C_Disc_D3.8mm_W2.6mm_P2.50mm", [["C1", 4], ["C2", 3]], []], [3, "470", "R_Axial_DIN0207_L6.3mm_D2.5mm_P5.08mm_Vertical", [["R1", 7], ["R2", 6], ["R3", 5]], []], [1, "1K", "R_Axial_DIN0207_L6.3mm_D2.5mm_P5.08mm_Vertical", [["R4", 2]], []], [1, "ground", "LED_D3.0mm", [["D1", 10]], []], [1, "first", "LED_D3.0mm", [["D2", 9]], []], [1, "second", "LED_D3.0mm", [["D3", 8]], []], [1, "error", "LED_D5.0mm", [["D4", 1]], []], [1, "L293D", "DIP-16_W7.62mm_Socket_LongPads", [["U1", 11]], []], [1, "power", "JST_EH_B04B-EH-A_04x2.50mm_Straight", [["J1", 12]], []], [1, "from switches", "JST_EH_B04B-EH-A_04x2.50mm_Straight", [["J2", 13]], []], [1, "towards uC", "JST_EH_B05B-EH-A_05x2.50mm_Straight", [["J4", 0]], []], [1, "motor", "TerminalBlock_Phoenix_MPT-2.54mm_2pol", [["J3", 14]], []]], "B": [], "F": [[2, "1uf", "C_Disc_D3.8mm_W2.6mm_P2.50mm", [["C1", 4], ["C2", 3]], []], [3, "470", "R_Axial_DIN0207_L6.3mm_D2.5mm_P5.08mm_Vertical", [["R1", 7], ["R2", 6], ["R3", 5]], []], [1, "1K", "R_Axial_DIN0207_L6.3mm_D2.5mm_P5.08mm_Vertical", [["R4", 2]], []], [1, "ground", "LED_D3.0mm", [["D1", 10]], []], [1, "first", "LED_D3.0mm", [["D2", 9]], []], [1, "second", "LED_D3.0mm", [["D3", 8]], []], [1, "error", "LED_D5.0mm", [["D4", 1]], []], [1, "L293D", "DIP-16_W7.62mm_Socket_LongPads", [["U1", 11]], []], [1, "power", "JST_EH_B04B-EH-A_04x2.50mm_Straight", [["J1", 12]], []], [1, "from switches", "JST_EH_B04B-EH-A_04x2.50mm_Straight", [["J2", 13]], []], [1, "towards uC", "JST_EH_B05B-EH-A_05x2.50mm_Straight", [["J4", 0]], []], [1, "motor", "TerminalBlock_Phoenix_MPT-2.54mm_2pol", [["J3", 14]], []]]}, "silkscreen": {"B": [], "F": [{"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "S1", "thickness": 0.09999999999999999, "pos": [119.975, 101.725], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "S2", "thickness": 0.09999999999999999, "pos": [119.975, 104.225], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "S3", "thickness": 0.09999999999999999, "pos": [119.975, 106.64999999999999], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "S3", "thickness": 0.09999999999999999, "pos": [84.8, 111.875], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "S2", "thickness": 0.09999999999999999, "pos": [84.8, 109.3], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "S1", "thickness": 0.09999999999999999, "pos": [84.8, 106.8], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "GND", "thickness": 0.09999999999999999, "pos": [84.8, 104.175], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "12V", "thickness": 0.09999999999999999, "pos": [84.975, 92.95], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "5V", "thickness": 0.09999999999999999, "pos": [84.89999999999999, 90.55], "height": 0.7999999999999999}, {"width": 0.7999999999999999, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "GND\n", "thickness": 0.09999999999999999, "pos": [84.77499999999999, 87.825], "height": 0.7999999999999999}, {"width": 1.5, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "motorModule", "thickness": 0.3, "pos": [108.458, 81.53399999999999], "height": 1.5}, {"width": 1.5, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "FOSSEE", "thickness": 0.3, "pos": [108.966, 84.836], "height": 1.5}, {"width": 1.5, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "OpenPLC", "thickness": 0.3, "pos": [93.97999999999999, 81.788], "height": 1.5}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "J4", "thickness": 0.15, "pos": [120.03999999999999, 94.67], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "towards uC", "thickness": 0.15, "pos": [123.625, 110.5], "height": 1.0}, {"start": [126.175, 109.625], "end": [126.175, 107.125], "type": "segment", "width": 0.12}, {"start": [123.675, 109.625], "end": [126.175, 109.625], "type": "segment", "width": 0.12}, {"start": [124.375, 95.02499999999999], "end": [125.875, 95.02499999999999], "type": "segment", "width": 0.12}, {"start": [124.375, 94.02499999999999], "end": [124.375, 95.02499999999999], "type": "segment", "width": 0.12}, {"start": [124.375, 108.32499999999999], "end": [125.875, 108.32499999999999], "type": "segment", "width": 0.12}, {"start": [124.375, 109.32499999999999], "end": [124.375, 108.32499999999999], "type": "segment", "width": 0.12}, {"start": [123.52499999999999, 94.52499999999999], "end": [123.52499999999999, 94.02499999999999], "type": "segment", "width": 0.12}, {"start": [122.27499999999999, 94.52499999999999], "end": [123.52499999999999, 94.52499999999999], "type": "segment", "width": 0.12}, {"start": [122.27499999999999, 108.82499999999999], "end": [122.27499999999999, 94.52499999999999], "type": "segment", "width": 0.12}, {"start": [123.52499999999999, 108.82499999999999], "end": [122.27499999999999, 108.82499999999999], "type": "segment", "width": 0.12}, {"start": [123.52499999999999, 109.32499999999999], "end": [123.52499999999999, 108.82499999999999], "type": "segment", "width": 0.12}, {"start": [121.77499999999999, 94.02499999999999], "end": [121.77499999999999, 109.32499999999999], "type": "segment", "width": 0.12}, {"start": [125.875, 94.02499999999999], "end": [121.77499999999999, 94.02499999999999], "type": "segment", "width": 0.12}, {"start": [125.875, 109.32499999999999], "end": [125.875, 94.02499999999999], "type": "segment", "width": 0.12}, {"start": [121.77499999999999, 109.32499999999999], "end": [125.875, 109.32499999999999], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "D4", "thickness": 0.15, "pos": [117.25, 81.928], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "error", "thickness": 0.15, "pos": [117.25, 84.628], "height": 1.0}, {"start": [119.36, 82.783], "end": [119.36, 85.87299999999999], "type": "segment", "width": 0.12}, {"start": [121.91999999999999, 84.328], "radius": 2.5, "type": "circle", "width": 0.12}, {"width": 0.12, "endangle": 148.89115156915048, "start": [121.91999999999999, 84.328], "radius": 2.9899999999999998, "startangle": -0.008848430849525357, "type": "arc"}, {"width": 0.12, "endangle": 360.0088484308495, "start": [121.91999999999999, 84.328], "radius": 2.9899999999999998, "startangle": 211.10884843084952, "type": "arc"}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R4", "thickness": 0.15, "pos": [127.69999999999999, 90.7], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "1K", "thickness": 0.15, "pos": [127.69999999999999, 92.39999999999999], "height": 1.0}, {"start": [121.80999999999999, 91.5], "end": [124.47999999999999, 91.5], "type": "segment", "width": 0.12}, {"start": [120.5, 91.5], "radius": 1.3099999999999998, "type": "circle", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "C2", "thickness": 0.15, "pos": [104.475, 93.475], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "1uf", "thickness": 0.15, "pos": [99.125, 96.35], "height": 1.0}, {"start": [103.46799999999999, 93.01599999999999], "end": [103.46799999999999, 96.93599999999999], "type": "segment", "width": 0.12}, {"start": [100.74799999999999, 93.01599999999999], "end": [100.74799999999999, 96.93599999999999], "type": "segment", "width": 0.12}, {"start": [103.46799999999999, 93.01599999999999], "end": [102.85799999999999, 93.01599999999999], "type": "segment", "width": 0.12}, {"start": [101.35799999999999, 93.01599999999999], "end": [100.74799999999999, 93.01599999999999], "type": "segment", "width": 0.12}, {"start": [103.46799999999999, 96.93599999999999], "end": [102.85799999999999, 96.93599999999999], "type": "segment", "width": 0.12}, {"start": [101.35799999999999, 96.93599999999999], "end": [100.74799999999999, 96.93599999999999], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "C1", "thickness": 0.15, "pos": [99.125, 93.475], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "1uf", "thickness": 0.15, "pos": [104.425, 96.375], "height": 1.0}, {"start": [97.524, 93.056], "end": [98.134, 93.056], "type": "segment", "width": 0.12}, {"start": [95.414, 93.056], "end": [96.024, 93.056], "type": "segment", "width": 0.12}, {"start": [97.524, 96.976], "end": [98.134, 96.976], "type": "segment", "width": 0.12}, {"start": [95.414, 96.976], "end": [96.024, 96.976], "type": "segment", "width": 0.12}, {"start": [98.134, 96.976], "end": [98.134, 93.056], "type": "segment", "width": 0.12}, {"start": [95.414, 96.976], "end": [95.414, 93.056], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R3", "thickness": 0.15, "pos": [94.0, 110.3], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "470", "thickness": 0.15, "pos": [98.69999999999999, 110.3], "height": 1.0}, {"start": [95.28999999999999, 112.52199999999999], "end": [97.96, 112.52199999999999], "type": "segment", "width": 0.12}, {"start": [93.97999999999999, 112.52199999999999], "radius": 1.3099999999999998, "type": "circle", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R2", "thickness": 0.15, "pos": [94.64999999999999, 104.69999999999999], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "470", "thickness": 0.15, "pos": [98.6, 104.69999999999999], "height": 1.0}, {"start": [93.726, 106.934], "radius": 1.3099999999999998, "type": "circle", "width": 0.12}, {"start": [95.036, 106.934], "end": [97.70599999999999, 106.934], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "R1", "thickness": 0.15, "pos": [93.8, 98.8], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "470", "thickness": 0.15, "pos": [98.5, 98.8], "height": 1.0}, {"start": [95.036, 101.092], "end": [97.70599999999999, 101.092], "type": "segment", "width": 0.12}, {"start": [93.726, 101.092], "radius": 1.3099999999999998, "type": "circle", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "second", "thickness": 0.15, "pos": [103.63199999999999, 109.728], "height": 1.0}, {"start": [102.07199999999999, 113.60199999999999], "end": [102.07199999999999, 113.758], "type": "segment", "width": 0.12}, {"start": [102.07199999999999, 111.286], "end": [102.07199999999999, 111.442], "type": "segment", "width": 0.12}, {"width": 0.12, "endangle": 133.9455169668416, "start": [103.63199999999999, 112.52199999999999], "radius": 1.5, "startangle": 46.045516966841596, "type": "arc"}, {"width": 0.12, "endangle": 313.95448303315845, "start": [103.63199999999999, 112.52199999999999], "radius": 1.5, "startangle": 226.05448303315845, "type": "arc"}, {"width": 0.12, "endangle": 141.62086636418596, "start": [103.63199999999999, 112.52199999999999], "radius": 1.99, "startangle": 32.82086636418597, "type": "arc"}, {"width": 0.12, "endangle": 327.179133635814, "start": [103.63199999999999, 112.52199999999999], "radius": 1.99, "startangle": 218.37913363581401, "type": "arc"}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "first", "thickness": 0.15, "pos": [103.63199999999999, 104.1], "height": 1.0}, {"width": 0.12, "endangle": 327.179133635814, "start": [103.63199999999999, 106.934], "radius": 1.99, "startangle": 218.37913363581401, "type": "arc"}, {"width": 0.12, "endangle": 141.62086636418596, "start": [103.63199999999999, 106.934], "radius": 1.99, "startangle": 32.82086636418597, "type": "arc"}, {"width": 0.12, "endangle": 313.95448303315845, "start": [103.63199999999999, 106.934], "radius": 1.5, "startangle": 226.05448303315845, "type": "arc"}, {"width": 0.12, "endangle": 133.9455169668416, "start": [103.63199999999999, 106.934], "radius": 1.5, "startangle": 46.045516966841596, "type": "arc"}, {"start": [102.07199999999999, 105.698], "end": [102.07199999999999, 105.854], "type": "segment", "width": 0.12}, {"start": [102.07199999999999, 108.014], "end": [102.07199999999999, 108.17], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "ground", "thickness": 0.15, "pos": [103.63199999999999, 98.298], "height": 1.0}, {"start": [102.07199999999999, 102.172], "end": [102.07199999999999, 102.32799999999999], "type": "segment", "width": 0.12}, {"start": [102.07199999999999, 99.856], "end": [102.07199999999999, 100.012], "type": "segment", "width": 0.12}, {"width": 0.12, "endangle": 133.9455169668416, "start": [103.63199999999999, 101.092], "radius": 1.5, "startangle": 46.045516966841596, "type": "arc"}, {"width": 0.12, "endangle": 313.95448303315845, "start": [103.63199999999999, 101.092], "radius": 1.5, "startangle": 226.05448303315845, "type": "arc"}, {"width": 0.12, "endangle": 141.62086636418596, "start": [103.63199999999999, 101.092], "radius": 1.99, "startangle": 32.82086636418597, "type": "arc"}, {"width": 0.12, "endangle": 327.179133635814, "start": [103.63199999999999, 101.092], "radius": 1.99, "startangle": 218.37913363581401, "type": "arc"}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "U1", "thickness": 0.15, "pos": [109.6, 88.6], "height": 1.0}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "L293D", "thickness": 0.15, "pos": [116.5, 88.6], "height": 1.0}, {"start": [118.53399999999999, 89.542], "end": [108.03399999999999, 89.542], "type": "segment", "width": 0.12}, {"start": [118.53399999999999, 110.10199999999999], "end": [118.53399999999999, 89.542], "type": "segment", "width": 0.12}, {"start": [108.03399999999999, 110.10199999999999], "end": [118.53399999999999, 110.10199999999999], "type": "segment", "width": 0.12}, {"start": [108.03399999999999, 89.542], "end": [108.03399999999999, 110.10199999999999], "type": "segment", "width": 0.12}, {"start": [115.53399999999999, 89.60199999999999], "end": [114.28399999999999, 89.60199999999999], "type": "segment", "width": 0.12}, {"start": [115.53399999999999, 110.042], "end": [115.53399999999999, 89.60199999999999], "type": "segment", "width": 0.12}, {"start": [111.03399999999999, 110.042], "end": [115.53399999999999, 110.042], "type": "segment", "width": 0.12}, {"start": [111.03399999999999, 89.60199999999999], "end": [111.03399999999999, 110.042], "type": "segment", "width": 0.12}, {"start": [112.28399999999999, 89.60199999999999], "end": [111.03399999999999, 89.60199999999999], "type": "segment", "width": 0.12}, {"width": 0.12, "endangle": 180.0, "start": [113.28399999999999, 89.60199999999999], "radius": 1.0, "startangle": 0.0, "type": "arc"}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "J1", "thickness": 0.15, "pos": [91.725, 85.85], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "power", "thickness": 0.15, "pos": [82.55, 91.694], "height": 1.0}, {"start": [90.53399999999999, 98.454], "end": [90.53399999999999, 95.954], "type": "segment", "width": 0.12}, {"start": [88.03399999999999, 98.454], "end": [90.53399999999999, 98.454], "type": "segment", "width": 0.12}, {"start": [88.734, 86.354], "end": [90.234, 86.354], "type": "segment", "width": 0.12}, {"start": [88.734, 85.354], "end": [88.734, 86.354], "type": "segment", "width": 0.12}, {"start": [88.734, 97.154], "end": [90.234, 97.154], "type": "segment", "width": 0.12}, {"start": [88.734, 98.154], "end": [88.734, 97.154], "type": "segment", "width": 0.12}, {"start": [87.884, 85.854], "end": [87.884, 85.354], "type": "segment", "width": 0.12}, {"start": [86.634, 85.854], "end": [87.884, 85.854], "type": "segment", "width": 0.12}, {"start": [86.634, 97.654], "end": [86.634, 85.854], "type": "segment", "width": 0.12}, {"start": [87.884, 97.654], "end": [86.634, 97.654], "type": "segment", "width": 0.12}, {"start": [87.884, 98.154], "end": [87.884, 97.654], "type": "segment", "width": 0.12}, {"start": [86.134, 85.354], "end": [86.134, 98.154], "type": "segment", "width": 0.12}, {"start": [90.234, 85.354], "end": [86.134, 85.354], "type": "segment", "width": 0.12}, {"start": [90.234, 98.154], "end": [90.234, 85.354], "type": "segment", "width": 0.12}, {"start": [86.134, 98.154], "end": [90.234, 98.154], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "J2", "thickness": 0.15, "pos": [88.27499999999999, 100.1], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "from switches", "thickness": 0.15, "pos": [82.55, 107.94999999999999], "height": 1.0}, {"start": [86.134, 114.41], "end": [90.234, 114.41], "type": "segment", "width": 0.12}, {"start": [90.234, 114.41], "end": [90.234, 101.61], "type": "segment", "width": 0.12}, {"start": [90.234, 101.61], "end": [86.134, 101.61], "type": "segment", "width": 0.12}, {"start": [86.134, 101.61], "end": [86.134, 114.41], "type": "segment", "width": 0.12}, {"start": [87.884, 114.41], "end": [87.884, 113.91], "type": "segment", "width": 0.12}, {"start": [87.884, 113.91], "end": [86.634, 113.91], "type": "segment", "width": 0.12}, {"start": [86.634, 113.91], "end": [86.634, 102.11], "type": "segment", "width": 0.12}, {"start": [86.634, 102.11], "end": [87.884, 102.11], "type": "segment", "width": 0.12}, {"start": [87.884, 102.11], "end": [87.884, 101.61], "type": "segment", "width": 0.12}, {"start": [88.734, 114.41], "end": [88.734, 113.41], "type": "segment", "width": 0.12}, {"start": [88.734, 113.41], "end": [90.234, 113.41], "type": "segment", "width": 0.12}, {"start": [88.734, 101.61], "end": [88.734, 102.61], "type": "segment", "width": 0.12}, {"start": [88.734, 102.61], "end": [90.234, 102.61], "type": "segment", "width": 0.12}, {"start": [88.03399999999999, 114.71], "end": [90.53399999999999, 114.71], "type": "segment", "width": 0.12}, {"start": [90.53399999999999, 114.71], "end": [90.53399999999999, 112.21], "type": "segment", "width": 0.12}, {"width": 1.0, "angle": 0.0, "attr": [], "horiz_justify": 0, "text": "J3", "thickness": 0.15, "pos": [99.568, 83.63712], "height": 1.0}, {"width": 1.0, "angle": 90.0, "attr": [], "horiz_justify": 0, "text": "motor", "thickness": 0.15, "pos": [103.39999999999999, 88.2], "height": 1.0}, {"start": [96.76892, 85.0392], "end": [96.76892, 91.2368], "type": "segment", "width": 0.15}, {"start": [102.36708, 85.0392], "end": [96.76892, 85.0392], "type": "segment", "width": 0.15}, {"start": [102.36708, 91.2368], "end": [102.36708, 85.0392], "type": "segment", "width": 0.15}, {"start": [96.76892, 91.2368], "end": [102.36708, 91.2368], "type": "segment", "width": 0.15}, {"start": [96.76892, 85.43798], "end": [102.36708, 85.43798], "type": "segment", "width": 0.15}, {"start": [99.568, 91.2368], "end": [99.568, 90.73895999999999], "type": "segment", "width": 0.15}, {"start": [102.16896, 90.73895999999999], "end": [102.16896, 91.2368], "type": "segment", "width": 0.15}, {"start": [96.96704, 91.2368], "end": [96.96704, 90.73895999999999], "type": "segment", "width": 0.15}, {"start": [102.36708, 90.73895999999999], "end": [96.76892, 90.73895999999999], "type": "segment", "width": 0.15}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[-2.4002559999999997, 1.919918], [-2.344799, 1.947568], [-2.295852, 1.9984799999999998], [-2.282371, 2.017338], [-2.267686, 2.0420149999999997], [-2.258158, 2.068816], [-2.252707, 2.104587], [-2.250253, 2.156169], [-2.249714, 2.2242669999999998], [-2.252148, 2.3175879999999998], [-2.260606, 2.387657], [-2.276826, 2.439931], [-2.302546, 2.479869], [-2.339503, 2.5129289999999997], [-2.342218, 2.5148859999999997], [-2.37864, 2.5349079999999997], [-2.422498, 2.544815], [-2.4782759999999997, 2.547257], [-2.568952, 2.547257], [-2.56899, 2.635283], [-2.5698339999999997, 2.6843079999999997], [-2.574976, 2.713065], [-2.588413, 2.730311], [-2.6141419999999997, 2.744808], [-2.6203209999999997, 2.747769], [-2.6492359999999997, 2.7616479999999997], [-2.671624, 2.7704139999999997], [-2.688271, 2.771171], [-2.699964, 2.761023], [-2.70749, 2.737073], [-2.7116339999999997, 2.6964259999999998], [-2.7131849999999997, 2.636186], [-2.712929, 2.553455], [-2.711651, 2.4453389999999997], [-2.711252, 2.413], [-2.709815, 2.3015239999999997], [-2.708528, 2.228603], [-2.569029, 2.228603], [-2.5682449999999997, 2.290499], [-2.5647599999999997, 2.330997], [-2.556876, 2.3577079999999997], [-2.5428949999999997, 2.378244], [-2.533403, 2.38826], [-2.494596, 2.417567], [-2.460237, 2.419952], [-2.424784, 2.39575], [-2.423886, 2.394857], [-2.409461, 2.376153], [-2.400687, 2.350732], [-2.396261, 2.311584], [-2.394882, 2.251697], [-2.394857, 2.2384299999999997], [-2.3981879999999998, 2.155901], [-2.4090309999999997, 2.098691], [-2.42866, 2.0637659999999998], [-2.45835, 2.048094], [-2.4755089999999997, 2.0465139999999997], [-2.516234, 2.0539259999999997], [-2.544168, 2.07833], [-2.560983, 2.12298], [-2.5683499999999997, 2.19113], [-2.569029, 2.228603], [-2.708528, 2.228603], [-2.7082919999999997, 2.215245], [-2.706323, 2.150333], [-2.70355, 2.102958], [-2.6996119999999997, 2.06929], [-2.6941509999999997, 2.045498], [-2.686808, 2.0277529999999997], [-2.6772229999999997, 2.012224], [-2.673113, 2.0063809999999997], [-2.618595, 1.951185], [-2.549664, 1.9198899999999999], [-2.469928, 1.911165], [-2.4002559999999997, 1.919918]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[-1.283907, 1.9277799999999998], [-1.237328, 1.954723], [-1.2049429999999999, 1.981466], [-1.181258, 2.009484], [-1.164941, 2.043748], [-1.154661, 2.0892269999999997], [-1.149086, 2.150892], [-1.146884, 2.233711], [-1.146629, 2.293246], [-1.146629, 2.512391], [-1.2083139999999999, 2.540044], [-1.27, 2.567697], [-1.2772569999999999, 2.32767], [-1.2802559999999998, 2.238028], [-1.283402, 2.172962], [-1.287299, 2.1280259999999998], [-1.2925529999999998, 2.09877], [-1.299769, 2.080748], [-1.30955, 2.069511], [-1.3126879999999999, 2.067079], [-1.360239, 2.048083], [-1.4083029999999999, 2.0556], [-1.436914, 2.0755429999999997], [-1.448553, 2.0896749999999997], [-1.456609, 2.1082199999999998], [-1.4617289999999998, 2.1363339999999997], [-1.464559, 2.179173], [-1.465744, 2.241895], [-1.465943, 2.307261], [-1.465982, 2.389268], [-1.4673859999999999, 2.447316], [-1.472086, 2.486465], [-1.482013, 2.51178], [-1.499097, 2.528323], [-1.5252679999999998, 2.541156], [-1.560225, 2.554491], [-1.598404, 2.569007], [-1.593859, 2.3113889999999997], [-1.592029, 2.2185189999999997], [-1.589888, 2.149889], [-1.586819, 2.100711], [-1.582206, 2.066198], [-1.575432, 2.041562], [-1.5658809999999999, 2.022016], [-1.554366, 2.0047699999999997], [-1.49881, 1.9496799999999999], [-1.43102, 1.917822], [-1.357287, 1.910191], [-1.283907, 1.9277799999999998]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[-2.958885, 1.921962], [-2.8908549999999997, 1.957733], [-2.840649, 2.015301], [-2.822815, 2.0523119999999997], [-2.808937, 2.107882], [-2.801833, 2.178096], [-2.80116, 2.254727], [-2.8065729999999998, 2.329552], [-2.81773, 2.394342], [-2.834286, 2.440873], [-2.839374, 2.448887], [-2.899645, 2.508707], [-2.971231, 2.5445349999999998], [-3.048908, 2.55502], [-3.127452, 2.53881], [-3.149311, 2.529092], [-3.191878, 2.4991429999999997], [-3.229237, 2.4594329999999998], [-3.2327679999999996, 2.4543969999999997], [-3.2471189999999996, 2.4301239999999997], [-3.2566059999999997, 2.404178], [-3.26221, 2.370022], [-3.2649139999999996, 2.321119], [-3.265701, 2.2509349999999997], [-3.265714, 2.2352], [-3.265678, 2.2301919999999997], [-3.120571, 2.2301919999999997], [-3.1197269999999997, 2.29643], [-3.1164039999999997, 2.340386], [-3.1094169999999997, 2.368779], [-3.097584, 2.388325], [-3.0915429999999997, 2.394857], [-3.0568139999999997, 2.41968], [-3.023097, 2.418548], [-2.9890049999999997, 2.397016], [-2.968671, 2.3740289999999997], [-2.956629, 2.340478], [-2.9498659999999997, 2.287569], [-2.949402, 2.281399], [-2.948248, 2.185513], [-2.960312, 2.114299], [-2.98543, 2.068194], [-3.02344, 2.047635], [-3.0370079999999997, 2.0465139999999997], [-3.0726359999999997, 2.052152], [-3.097006, 2.0716859999999997], [-3.111907, 2.109042], [-3.119125, 2.16815], [-3.120571, 2.2301919999999997], [-3.265678, 2.2301919999999997], [-3.265174, 2.1604129999999997], [-3.262904, 2.108159], [-3.257932, 2.071949], [-3.249287, 2.045299], [-3.235995, 2.021722], [-3.233057, 2.017338], [-3.183687, 1.958249], [-3.1298909999999998, 1.9239469999999999], [-3.0643979999999997, 1.910331], [-3.0421579999999997, 1.909665], [-2.958885, 1.921962]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[-1.831697, 1.931239], [-1.774473, 1.969735], [-1.730251, 2.025335], [-1.703833, 2.096086], [-1.6984899999999998, 2.1481619999999997], [-1.6990969999999999, 2.169893], [-1.704178, 2.186531], [-1.7181449999999998, 2.201437], [-1.7454109999999998, 2.2179729999999998], [-1.7903879999999999, 2.2394979999999998], [-1.857489, 2.269374], [-1.857829, 2.269524], [-1.9195929999999999, 2.297813], [-1.970241, 2.322933], [-2.004596, 2.342179], [-2.0174819999999998, 2.352848], [-2.017486, 2.352934], [-2.006128, 2.376166], [-1.979569, 2.401774], [-1.949077, 2.4202209999999997], [-1.93363, 2.423886], [-1.8914849999999999, 2.411212], [-1.855192, 2.379471], [-1.837483, 2.344572], [-1.8204479999999998, 2.318845], [-1.787078, 2.289546], [-1.7478509999999998, 2.2642349999999998], [-1.713244, 2.250471], [-1.7060069999999998, 2.249714], [-1.6978609999999998, 2.2621599999999997], [-1.6973699999999998, 2.2939719999999997], [-1.703357, 2.336866], [-1.714643, 2.382558], [-1.7300499999999999, 2.422761], [-1.730829, 2.424322], [-1.777196, 2.489062], [-1.837289, 2.5330969999999997], [-1.905535, 2.5547109999999997], [-1.976362, 2.5521849999999997], [-2.044196, 2.5238039999999997], [-2.047212, 2.521808], [-2.100573, 2.473448], [-2.13566, 2.410352], [-2.155078, 2.327387], [-2.1576839999999997, 2.304078], [-2.162299, 2.194055], [-2.156767, 2.142748], [-2.017486, 2.142748], [-2.015676, 2.174753], [-2.005778, 2.184093], [-1.981102, 2.177105], [-1.942205, 2.160587], [-1.898725, 2.139881], [-1.8976439999999999, 2.1393329999999997], [-1.8607909999999999, 2.119949], [-1.8459999999999999, 2.107013], [-1.8496469999999998, 2.093451], [-1.865005, 2.0756319999999997], [-1.904077, 2.049845], [-1.946154, 2.0479499999999997], [-1.9838969999999998, 2.0667169999999997], [-2.009966, 2.102915], [-2.017486, 2.142748], [-2.156767, 2.142748], [-2.152806, 2.106027], [-2.12845, 2.036212], [-2.094544, 1.987302], [-2.033347, 1.937878], [-1.9659369999999998, 1.9133589999999998], [-1.89712, 1.911797], [-1.831697, 1.931239]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[-0.624114, 1.851289], [-0.619861, 1.910613], [-0.6149749999999999, 1.9455719999999999], [-0.608205, 1.96082], [-0.598298, 1.961015], [-0.595086, 1.959195], [-0.552356, 1.9460149999999998], [-0.49677299999999996, 1.946785], [-0.44026299999999996, 1.9603329999999999], [-0.404918, 1.9778609999999999], [-0.368679, 2.005861], [-0.34218699999999996, 2.037549], [-0.324001, 2.077813], [-0.312678, 2.1315429999999997], [-0.306778, 2.203626], [-0.304857, 2.2989509999999997], [-0.304823, 2.317237], [-0.30479999999999996, 2.522646], [-0.35050899999999996, 2.53858], [-0.382973, 2.54942], [-0.400785, 2.554468], [-0.40130899999999997, 2.5545139999999997], [-0.403063, 2.540828], [-0.40455599999999997, 2.503076], [-0.405674, 2.446224], [-0.40630299999999997, 2.375234], [-0.4064, 2.332073], [-0.40660199999999996, 2.246973], [-0.407642, 2.185981], [-0.410169, 2.144177], [-0.414836, 2.1166419999999997], [-0.422293, 2.098456], [-0.433189, 2.084698], [-0.43999299999999997, 2.078073], [-0.486728, 2.0513749999999997], [-0.537728, 2.049375], [-0.5839989999999999, 2.071955], [-0.592556, 2.080107], [-0.605107, 2.095436], [-0.613812, 2.1136179999999998], [-0.619369, 2.139909], [-0.622474, 2.1795619999999998], [-0.6238239999999999, 2.237832], [-0.624114, 2.318173], [-0.624114, 2.522646], [-0.669823, 2.53858], [-0.702287, 2.54942], [-0.7200989999999999, 2.554468], [-0.720623, 2.5545139999999997], [-0.721963, 2.540623], [-0.7231719999999999, 2.501439], [-0.7241989999999999, 2.4407], [-0.7249979999999999, 2.362141], [-0.7255189999999999, 2.269498], [-0.725714, 2.166509], [-0.725714, 1.769342], [-0.678543, 1.749444], [-0.631371, 1.729547], [-0.624114, 1.851289]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[0.039744, 1.9509679999999998], [0.096616, 1.972087], [0.09726699999999999, 1.9724929999999998], [0.13244, 1.9983799999999998], [0.158407, 2.0286329999999997], [0.17667, 2.0680579999999997], [0.18873199999999998, 2.1214619999999997], [0.196096, 2.193651], [0.200264, 2.2894319999999997], [0.200629, 2.3030779999999997], [0.205876, 2.508842], [0.161716, 2.531678], [0.129763, 2.54711], [0.11047, 2.554423], [0.109578, 2.5545139999999997], [0.106239, 2.541022], [0.103587, 2.504626], [0.10195599999999999, 2.4514519999999997], [0.1016, 2.408393], [0.101592, 2.338641], [0.09840299999999999, 2.294837], [0.08728799999999999, 2.2739439999999997], [0.063501, 2.272925], [0.022296, 2.288741], [-0.039914, 2.317815], [-0.085659, 2.341963], [-0.10918699999999999, 2.362913], [-0.116104, 2.385747], [-0.116114, 2.3868769999999997], [-0.10470099999999999, 2.426212], [-0.070908, 2.447462], [-0.019191, 2.450539], [0.018061, 2.4500059999999997], [0.037703, 2.4607349999999997], [0.049951999999999996, 2.4865049999999997], [0.057002, 2.5193369999999997], [0.046841999999999995, 2.537966], [0.043017, 2.540632], [0.007000999999999999, 2.5513399999999997], [-0.043434, 2.552856], [-0.095374, 2.545759], [-0.132178, 2.532788], [-0.183062, 2.489585], [-0.21198599999999998, 2.429446], [-0.217714, 2.382462], [-0.21334299999999998, 2.3400819999999998], [-0.19752499999999998, 2.305488], [-0.166203, 2.274763], [-0.115322, 2.2439899999999997], [-0.040824, 2.2092519999999998], [-0.036286, 2.2072879999999997], [0.030820999999999998, 2.176287], [0.07223199999999999, 2.150862], [0.08998099999999999, 2.128014], [0.086107, 2.104745], [0.06264299999999999, 2.078056], [0.055626999999999996, 2.071914], [0.008629999999999999, 2.0481], [-0.040067, 2.049103], [-0.082478, 2.072451], [-0.11061599999999999, 2.115675], [-0.113231, 2.12416], [-0.13869199999999998, 2.165308], [-0.17099899999999998, 2.1851279999999997], [-0.217714, 2.20477], [-0.217714, 2.15395], [-0.203504, 2.080082], [-0.161325, 2.012327], [-0.139376, 1.989661], [-0.089483, 1.960569], [-0.026032999999999997, 1.9474], [0.039744, 1.9509679999999998]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[0.529926, 1.949755], [0.595858, 1.974084], [0.649273, 2.017117], [0.670164, 2.047409], [0.692939, 2.102994], [0.6924659999999999, 2.143186], [0.668562, 2.170217], [0.659717, 2.174813], [0.62153, 2.1891439999999998], [0.602028, 2.185472], [0.595422, 2.161407], [0.595086, 2.148114], [0.582992, 2.09921], [0.5514709999999999, 2.064999], [0.507659, 2.048476], [0.45869499999999996, 2.052634], [0.418894, 2.074227], [0.40545, 2.086544], [0.39592099999999997, 2.101487], [0.38948499999999997, 2.124075], [0.38531699999999997, 2.159328], [0.38259699999999996, 2.212266], [0.380502, 2.2879069999999997], [0.37995999999999996, 2.311857], [0.37798099999999996, 2.39379], [0.375731, 2.4514549999999997], [0.372357, 2.489608], [0.367006, 2.513004], [0.358824, 2.526398], [0.34695899999999996, 2.534545], [0.339362, 2.538144], [0.307102, 2.550452], [0.288111, 2.5545139999999997], [0.281836, 2.5409479999999998], [0.278006, 2.499934], [0.2766, 2.430999], [0.277598, 2.333669], [0.277908, 2.318657], [0.280101, 2.229859], [0.28269299999999997, 2.165019], [0.28638199999999997, 2.119067], [0.291864, 2.086935], [0.29983499999999996, 2.0635529999999997], [0.31099299999999996, 2.043852], [0.31683, 2.0354099999999997], [0.350296, 1.998057], [0.387727, 1.9690029999999998], [0.39230899999999996, 1.966467], [0.459426, 1.946443], [0.529926, 1.949755]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[1.1901169999999999, 2.065358], [1.189933, 2.173837], [1.189219, 2.257287], [1.187675, 2.3197039999999998], [1.185001, 2.365085], [1.1808939999999999, 2.397429], [1.175055, 2.420733], [1.167182, 2.438995], [1.1612209999999998, 2.449418], [1.111855, 2.505945], [1.049264, 2.5413769999999998], [0.9800129999999999, 2.55409], [0.9106679999999999, 2.5424629999999997], [0.869375, 2.521568], [0.826025, 2.485422], [0.796481, 2.441276], [0.778655, 2.3834619999999997], [0.770463, 2.306313], [0.7693019999999999, 2.249714], [0.769458, 2.245647], [0.870857, 2.245647], [0.8714759999999999, 2.31055], [0.8743139999999999, 2.353514], [0.88084, 2.3816219999999997], [0.892523, 2.401953], [0.9064829999999999, 2.417288], [0.9533649999999999, 2.44689], [1.003701, 2.449419], [1.0512759999999999, 2.424705], [1.054979, 2.421356], [1.070783, 2.4039349999999997], [1.080693, 2.383209], [1.086058, 2.352362], [1.088228, 2.304577], [1.088571, 2.251748], [1.0878269999999999, 2.185381], [1.084748, 2.1411059999999997], [1.078061, 2.112009], [1.0664959999999999, 2.091173], [1.057013, 2.080107], [1.0129599999999999, 2.0521979999999997], [0.962224, 2.0488429999999997], [0.9137959999999999, 2.070159], [0.90445, 2.078073], [0.88854, 2.095647], [0.87861, 2.116587], [0.873278, 2.147782], [0.8711629999999999, 2.196122], [0.870857, 2.245647], [0.769458, 2.245647], [0.77281, 2.158568], [0.7847259999999999, 2.090086], [0.8071349999999999, 2.0385999999999997], [0.842124, 1.998443], [0.869375, 1.9778609999999999], [0.9189069999999999, 1.955625], [0.976316, 1.945304], [1.029682, 1.948067], [1.059543, 1.959212], [1.071261, 1.962383], [1.079037, 1.9505569999999999], [1.084465, 1.918866], [1.088571, 1.870593], [1.093067, 1.816829], [1.099313, 1.784482], [1.110676, 1.765985], [1.130528, 1.7537699999999998], [1.143, 1.748362], [1.1901709999999999, 1.7286009999999998], [1.1901169999999999, 2.065358]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[1.779833, 1.9586629999999998], [1.7820479999999999, 1.99685], [1.7837839999999998, 2.0548859999999998], [1.784899, 2.12818], [1.7852569999999999, 2.2050549999999998], [1.7852569999999999, 2.4651959999999997], [1.739326, 2.5111269999999997], [1.7076749999999998, 2.5394289999999997], [1.6798899999999999, 2.550893], [1.641915, 2.5501679999999998], [1.6268399999999998, 2.548321], [1.579726, 2.542948], [1.540756, 2.539869], [1.5312569999999999, 2.5395849999999998], [1.499233, 2.541445], [1.4534319999999998, 2.5461139999999998], [1.435674, 2.548321], [1.3920569999999999, 2.551735], [1.3627449999999999, 2.54432], [1.33368, 2.521427], [1.323188, 2.5111269999999997], [1.2772569999999999, 2.4651959999999997], [1.2772569999999999, 1.978602], [1.314226, 1.961758], [1.346059, 1.949282], [1.3646829999999999, 1.9449139999999998], [1.3694579999999998, 1.958718], [1.373921, 1.997286], [1.377775, 2.056356], [1.380722, 2.131663], [1.382143, 2.195286], [1.3861139999999998, 2.4456569999999997], [1.4207589999999999, 2.4505559999999997], [1.452268, 2.4471309999999997], [1.467708, 2.436041], [1.4720229999999999, 2.415308], [1.475708, 2.371145], [1.478469, 2.3091459999999997], [1.4800119999999999, 2.234909], [1.480235, 2.196706], [1.480457, 1.976783], [1.526166, 1.9608489999999998], [1.5585179999999998, 1.9500149999999998], [1.576115, 1.9449619999999999], [1.5766229999999999, 1.9449139999999998], [1.578388, 1.958648], [1.5803289999999999, 1.99673], [1.582282, 2.0544819999999997], [1.5840839999999998, 2.127227], [1.585343, 2.195286], [1.589314, 2.4456569999999997], [1.6764, 2.4456569999999997], [1.680396, 2.21724], [1.684392, 1.9888219999999999], [1.726847, 1.9668679999999998], [1.758192, 1.951793], [1.7767439999999999, 1.9449509999999999], [1.7772789999999998, 1.9449139999999998], [1.779833, 1.9586629999999998]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[2.144876, 1.956335], [2.186667, 1.975344], [2.2194689999999997, 1.998378], [2.243503, 2.024133], [2.260097, 2.057358], [2.270577, 2.1028], [2.276271, 2.165207], [2.278507, 2.249327], [2.278743, 2.304721], [2.278743, 2.520826], [2.241774, 2.53767], [2.212656, 2.549981], [2.198231, 2.5545139999999997], [2.195472, 2.541025], [2.193282, 2.504653], [2.191942, 2.451542], [2.1916569999999997, 2.409372], [2.1904339999999998, 2.3484469999999997], [2.1871359999999997, 2.300115], [2.182321, 2.270518], [2.178496, 2.264229], [2.152783, 2.270652], [2.112418, 2.287125], [2.065679, 2.309458], [2.020845, 2.333457], [1.9861929999999999, 2.35493], [1.9700019999999998, 2.369685], [1.969938, 2.3698449999999998], [1.9713299999999998, 2.3971519999999997], [1.9838179999999999, 2.423219], [2.005743, 2.4443919999999997], [2.037743, 2.4514739999999997], [2.065092, 2.450649], [2.1038259999999998, 2.450042], [2.124158, 2.459116], [2.1363689999999997, 2.483092], [2.137909, 2.487613], [2.1432029999999997, 2.5218059999999998], [2.129047, 2.5425679999999997], [2.092148, 2.552462], [2.052289, 2.554292], [1.980562, 2.540727], [1.9434319999999998, 2.521355], [1.897576, 2.475845], [1.8732559999999998, 2.4199829999999998], [1.871073, 2.360957], [1.891629, 2.3059529999999997], [1.9225489999999998, 2.271486], [1.95342, 2.252189], [2.001942, 2.227759], [2.058485, 2.202985], [2.06791, 2.1991989999999997], [2.130019, 2.171791], [2.165822, 2.147634], [2.177337, 2.1236189999999997], [2.1665799999999997, 2.096635], [2.148114, 2.0755429999999997], [2.104469, 2.049572], [2.0564459999999998, 2.047624], [2.012406, 2.067637], [1.9807089999999998, 2.107551], [1.976549, 2.117848], [1.952327, 2.1557239999999998], [1.9169649999999998, 2.183842], [1.8723429999999999, 2.206917], [1.8723429999999999, 2.141485], [1.8749689999999999, 2.101506], [1.8862299999999999, 2.069997], [1.9111989999999999, 2.036378], [1.935169, 2.010484], [1.9724409999999999, 1.973817], [2.001401, 1.954121], [2.032505, 1.9462199999999998], [2.067713, 1.9449139999999998], [2.144876, 1.956335]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[2.6526, 1.9587519999999998], [2.6699479999999998, 1.9663339999999998], [2.711356, 1.999128], [2.746765, 2.046547], [2.768664, 2.0971509999999998], [2.772229, 2.122098], [2.7602789999999997, 2.156927], [2.734067, 2.175357], [2.705964, 2.1865159999999997], [2.693095, 2.1885719999999997], [2.686829, 2.1736489999999997], [2.6744559999999997, 2.141175], [2.669028, 2.126502], [2.6385899999999998, 2.075744], [2.5945199999999997, 2.050427], [2.53801, 2.051206], [2.5338249999999998, 2.052203], [2.5036549999999997, 2.066507], [2.481476, 2.0943929999999997], [2.4663269999999997, 2.139287], [2.4572499999999997, 2.204615], [2.453286, 2.2938039999999997], [2.452914, 2.341261], [2.45273, 2.416071], [2.4515219999999998, 2.467069], [2.448309, 2.4994709999999998], [2.442109, 2.5184949999999997], [2.43194, 2.529356], [2.416819, 2.5372719999999997], [2.415946, 2.53767], [2.386828, 2.549981], [2.372403, 2.5545139999999997], [2.370186, 2.540809], [2.368289, 2.502925], [2.366847, 2.445715], [2.365998, 2.374027], [2.3658289999999997, 2.321565], [2.366692, 2.220047], [2.3700699999999997, 2.143032], [2.377142, 2.086023], [2.389088, 2.044526], [2.4070899999999997, 2.014043], [2.432327, 1.9900799999999998], [2.4572469999999997, 1.973355], [2.517171, 1.9510969999999999], [2.5869109999999997, 1.946076], [2.6526, 1.9587519999999998]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[3.1535949999999997, 1.966966], [3.2110209999999997, 2.0044969999999998], [3.2387189999999997, 2.038096], [3.260662, 2.099064], [3.2624049999999998, 2.1473079999999998], [3.258457, 2.211816], [3.109686, 2.276934], [3.037349, 2.310202], [2.990084, 2.336964], [2.9655069999999997, 2.360144], [2.9612369999999997, 2.382667], [2.9748889999999997, 2.4074549999999997], [2.989943, 2.423886], [3.033746, 2.4502349999999997], [3.0813889999999997, 2.4520809999999997], [3.125145, 2.431546], [3.157289, 2.390752], [3.163038, 2.376347], [3.1905759999999996, 2.331356], [3.222258, 2.312182], [3.265714, 2.295779], [3.265714, 2.357966], [3.261872, 2.400283], [3.246823, 2.435969], [3.21528, 2.476943], [3.2105919999999997, 2.482267], [3.175506, 2.51872], [3.1453469999999997, 2.538283], [3.107615, 2.5472829999999997], [3.076335, 2.55023], [3.0203849999999997, 2.5509649999999997], [2.980555, 2.54166], [2.955708, 2.527846], [2.9166559999999997, 2.497467], [2.8896249999999997, 2.464613], [2.8725169999999998, 2.423294], [2.863238, 2.367521], [2.859693, 2.291305], [2.85941, 2.2526219999999997], [2.860372, 2.206247], [2.948007, 2.206247], [2.949023, 2.2311259999999997], [2.951556, 2.2352], [2.968274, 2.229665], [3.0042489999999997, 2.215017], [3.0523309999999997, 2.19419], [3.062386, 2.189714], [3.1231519999999997, 2.158814], [3.1566319999999997, 2.1316569999999997], [3.1639899999999996, 2.10622], [3.146391, 2.080481], [3.131856, 2.069109], [3.0794099999999998, 2.046364], [3.030322, 2.050122], [2.989227, 2.077884], [2.960758, 2.1271519999999997], [2.951631, 2.166257], [2.948007, 2.206247], [2.860372, 2.206247], [2.861285, 2.162249], [2.8681959999999997, 2.0953839999999997], [2.881884, 2.0466949999999997], [2.904096, 2.010849], [2.936574, 1.982513], [2.950733, 1.973355], [3.015053, 1.9495069999999999], [3.085473, 1.948006], [3.1535949999999997, 1.966966]]]}, {"angle": [0.0], "type": "polygon", "pos": [115.57, 114.80799999999999], "polygons": [[[0.10390999999999999, -2.7576519999999998], [0.182454, -2.757222], [0.23929799999999998, -2.756058], [0.278105, -2.753793], [0.302538, -2.75006], [0.316262, -2.744494], [0.32294, -2.7367269999999997], [0.32623599999999997, -2.7263949999999997], [0.326556, -2.725057], [0.33156199999999997, -2.7009209999999997], [0.340829, -2.653299], [0.353392, -2.587259], [0.368287, -2.507872], [0.384551, -2.420204], [0.385119, -2.417125], [0.40141, -2.3312109999999997], [0.41665199999999997, -2.2553039999999998], [0.429861, -2.193955], [0.440054, -2.151718], [0.446248, -2.133145], [0.44654299999999997, -2.132816], [0.464788, -2.123747], [0.502405, -2.1086329999999998], [0.551271, -2.090738], [0.551543, -2.090642], [0.613093, -2.067507], [0.685657, -2.038035], [0.754057, -2.008403], [0.7572939999999999, -2.006938], [0.868702, -1.9563739999999998], [1.115399, -2.12484], [1.191077, -2.1761969999999997], [1.259631, -2.222111], [1.317088, -2.25997], [1.359476, -2.287163], [1.382825, -2.301079], [1.3850419999999999, -2.302111], [1.40201, -2.297516], [1.433701, -2.2753449999999997], [1.481352, -2.234553], [1.546198, -2.174095], [1.6123969999999999, -2.109773], [1.6762139999999999, -2.046388], [1.733329, -1.988549], [1.780305, -1.939825], [1.8137029999999998, -1.9037899999999999], [1.830085, -1.884016], [1.8306939999999998, -1.882998], [1.8325049999999998, -1.8694279999999999], [1.825683, -1.847267], [1.8085399999999998, -1.8135219999999999], [1.779393, -1.7651999999999999], [1.7365549999999998, -1.6993079999999998], [1.6794479999999998, -1.614483], [1.628766, -1.539823], [1.583461, -1.4728599999999998], [1.54615, -1.417484], [1.519452, -1.37758], [1.505985, -1.357038], [1.505137, -1.3556439999999998], [1.506781, -1.3359619999999999], [1.519245, -1.297707], [1.5400479999999999, -1.248111], [1.547462, -1.232272], [1.5798139999999998, -1.16171], [1.614328, -1.081647], [1.6423649999999999, -1.012371], [1.6625679999999998, -0.960955], [1.678615, -0.921881], [1.6878879999999998, -0.901459], [1.689041, -0.899886], [1.7060959999999998, -0.8972789999999999], [1.746298, -0.890137], [1.8043019999999999, -0.879477], [1.874763, -0.866315], [1.952335, -0.851667], [2.031672, -0.8365509999999999], [2.107431, -0.821982], [2.174264, -0.808978], [2.226828, -0.798555], [2.259776, -0.7917299999999999], [2.267857, -0.789801], [2.276205, -0.785038], [2.2825059999999997, -0.7742819999999999], [2.287045, -0.753902], [2.290104, -0.720266], [2.291967, -0.6697449999999999], [2.292918, -0.598708], [2.29324, -0.503524], [2.293257, -0.464508], [2.293257, -0.147201], [2.217057, -0.132161], [2.174663, -0.12400499999999999], [2.1113999999999997, -0.11210099999999999], [2.0349619999999997, -0.097884], [1.9530429999999999, -0.08279], [1.9304, -0.07864499999999999], [1.854806, -0.063947], [1.788953, -0.049495], [1.7383659999999999, -0.036625], [1.7085739999999998, -0.026678], [1.703612, -0.023712999999999998], [1.6914259999999999, -0.002717], [1.673953, 0.037967], [1.654577, 0.090322], [1.650734, 0.1016], [1.6253389999999999, 0.17152299999999998], [1.5938169999999998, 0.250418], [1.5629689999999998, 0.321266], [1.562817, 0.32159499999999996], [1.511447, 0.432733], [1.680399, 0.681253], [1.8493519999999999, 0.9297719999999999], [1.632429, 1.147058], [1.566819, 1.2117259999999999], [1.5069789999999998, 1.2687329999999999], [1.456267, 1.315033], [1.418046, 1.347584], [1.395675, 1.363343], [1.392466, 1.3643429999999999], [1.373626, 1.356469], [1.33518, 1.334578], [1.2813299999999999, 1.301267], [1.216276, 1.259131], [1.14594, 1.211943], [1.074555, 1.16381], [1.010908, 1.121928], [0.9590409999999999, 1.088871], [0.922995, 1.067218], [0.906867, 1.059543], [0.887189, 1.066037], [0.8498749999999999, 1.08315], [0.8026209999999999, 1.107326], [0.797612, 1.110013], [0.733977, 1.141927], [0.690341, 1.157579], [0.663202, 1.157745], [0.649057, 1.1432039999999999], [0.648975, 1.143], [0.641905, 1.1257789999999999], [0.625042, 1.084899], [0.599695, 1.023525], [0.567171, 0.944819], [0.528778, 0.851947], [0.485822, 0.748072], [0.444222, 0.647502], [0.39850399999999997, 0.536516], [0.356526, 0.433703], [0.319548, 0.342215], [0.288827, 0.26520099999999996], [0.26562199999999997, 0.205815], [0.25118999999999997, 0.167209], [0.246743, 0.1528], [0.257896, 0.136272], [0.28706899999999996, 0.10993], [0.325971, 0.080887], [0.436757, -0.010961], [0.523351, -0.116241], [0.584716, -0.232734], [0.619815, -0.358224], [0.6276079999999999, -0.49049299999999996], [0.621943, -0.551543], [0.591078, -0.678205], [0.53792, -0.790059], [0.465767, -0.885999], [0.377917, -0.964924], [0.277665, -1.02573], [0.16831, -1.067313], [0.053147, -1.0885719999999999], [-0.064525, -1.088401], [-0.18141, -1.065699], [-0.294211, -1.0193619999999999], [-0.39963099999999996, -0.948287], [-0.44363199999999997, -0.9080889999999999], [-0.528021, -0.804871], [-0.586778, -0.692075], [-0.620296, -0.57299], [-0.628965, -0.450905], [-0.613177, -0.329107], [-0.573322, -0.210884], [-0.5097929999999999, -0.099525], [-0.422979, 0.001684], [-0.325971, 0.080887], [-0.285563, 0.111162], [-0.25701799999999997, 0.137219], [-0.246743, 0.152825], [-0.252123, 0.169843], [-0.26742499999999997, 0.2105], [-0.291388, 0.271642], [-0.322756, 0.35011899999999996], [-0.360268, 0.44278], [-0.402667, 0.546472], [-0.444337, 0.6475259999999999], [-0.49030999999999997, 0.7586069999999999], [-0.532893, 0.861541], [-0.5707789999999999, 0.9531649999999999], [-0.60266, 1.030316], [-0.6272289999999999, 1.089831], [-0.64318, 1.128544], [-0.64909, 1.143], [-0.663052, 1.1576849999999999], [-0.69006, 1.1576419999999998], [-0.733587, 1.142099], [-0.79711, 1.110284], [-0.797612, 1.110013], [-0.84544, 1.085323], [-0.884103, 1.067338], [-0.905905, 1.059614], [-0.906867, 1.059543], [-0.923279, 1.067378], [-0.959513, 1.089165], [-1.011526, 1.122328], [-1.075275, 1.164291], [-1.14594, 1.211943], [-1.217884, 1.2601909999999998], [-1.282726, 1.3021509999999998], [-1.336265, 1.335227], [-1.3743029999999998, 1.3568209999999998], [-1.392467, 1.3643429999999999], [-1.409192, 1.354457], [-1.44282, 1.3268259999999998], [-1.48999, 1.284495], [-1.547342, 1.230505], [-1.611516, 1.167899], [-1.6325029999999998, 1.1469829999999999], [-1.8495009999999998, 0.929623], [-1.684332, 0.6872199999999999], [-1.634136, 0.612781], [-1.5900809999999999, 0.545972], [-1.554638, 0.49066499999999996], [-1.530281, 0.450729], [-1.5194779999999999, 0.430036], [-1.519162, 0.42856299999999997], [-1.524857, 0.409058], [-1.540174, 0.369822], [-1.562463, 0.31743], [-1.578107, 0.28235499999999997], [-1.607359, 0.215201], [-1.634906, 0.147358], [-1.6562629999999998, 0.09003399999999999], [-1.662065, 0.072572], [-1.678548, 0.025938], [-1.6946599999999998, -0.010095], [-1.7035099999999999, -0.023712999999999998], [-1.72304, -0.032048], [-1.765666, -0.043863], [-1.825855, -0.057818999999999995], [-1.898078, -0.072578], [-1.9304, -0.07864499999999999], [-2.0124779999999998, -0.09372699999999999], [-2.091205, -0.108331], [-2.158891, -0.12101999999999999], [-2.20784, -0.130358], [-2.217057, -0.132161], [-2.293257, -0.147201], [-2.293257, -0.464508], [-2.2930859999999997, -0.568846], [-2.2923839999999998, -0.647787], [-2.290866, -0.704962], [-2.288251, -0.7440009999999999], [-2.284254, -0.768535], [-2.278591, -0.782195], [-2.2709799999999998, -0.788611], [-2.267857, -0.789801], [-2.249022, -0.79402], [-2.2074119999999997, -0.802438], [-2.14837, -0.814039], [-2.0772429999999997, -0.827805], [-1.999375, -0.8427199999999999], [-1.920113, -0.857768], [-1.8448019999999998, -0.871931], [-1.778787, -0.8841939999999999], [-1.7274129999999999, -0.893539], [-1.696025, -0.8989499999999999], [-1.689041, -0.899886], [-1.682715, -0.912404], [-1.66871, -0.945754], [-1.649645, -0.9936229999999999], [-1.642366, -1.012371], [-1.6130039999999999, -1.084805], [-1.5784289999999999, -1.16483], [-1.547463, -1.232272], [-1.5246769999999998, -1.283841], [-1.509518, -1.326215], [-1.5044579999999999, -1.352166], [-1.505264, -1.3556439999999998], [-1.5159589999999998, -1.372064], [-1.5403799999999999, -1.408583], [-1.575905, -1.4613129999999999], [-1.619913, -1.526365], [-1.669783, -1.5998489999999999], [-1.679644, -1.614355], [-1.7375079999999998, -1.700296], [-1.780044, -1.765739], [-1.808946, -1.813696], [-1.82591, -1.8471799999999998], [-1.832633, -1.869205], [-1.8308099999999998, -1.8827829999999999], [-1.8307639999999998, -1.882869], [-1.816414, -1.9007029999999998], [-1.7846769999999998, -1.9351829999999999], [-1.7389899999999998, -1.982732], [-1.682796, -2.039778], [-1.619532, -2.102745], [-1.612398, -2.109773], [-1.53267, -2.1869799999999997], [-1.4711429999999999, -2.24367], [-1.426579, -2.28089], [-1.397743, -2.2996849999999998], [-1.3850419999999999, -2.302111], [-1.366506, -2.2915289999999997], [-1.328039, -2.267084], [-1.273614, -2.231388], [-1.2072019999999999, -2.1870529999999997], [-1.1327749999999999, -2.136689], [-1.115399, -2.12484], [-0.868703, -1.9563739999999998], [-0.7572939999999999, -2.006938], [-0.689543, -2.036405], [-0.616817, -2.066041], [-0.5542969999999999, -2.08967], [-0.551543, -2.090642], [-0.50264, -2.108543], [-0.464943, -2.12368], [-0.446575, -2.13279], [-0.446544, -2.132816], [-0.44071499999999997, -2.149283], [-0.43080799999999997, -2.189781], [-0.417805, -2.249758], [-0.40269099999999997, -2.3246599999999997], [-0.38644799999999996, -2.409936], [-0.385119, -2.417125], [-0.36882499999999996, -2.5049859999999997], [-0.353867, -2.58474], [-0.341209, -2.651319], [-0.331814, -2.699653], [-0.326646, -2.724675], [-0.326556, -2.725057], [-0.323411, -2.7357009999999997], [-0.31729599999999997, -2.743738], [-0.304547, -2.749533], [-0.2815, -2.753453], [-0.24449099999999999, -2.755865], [-0.189856, -2.757135], [-0.11393299999999999, -2.7576289999999997], [-0.013056, -2.757714], [0.0, -2.757714], [0.10390999999999999, -2.7576519999999998]]]}]}, "edges_bbox": {"minx": 80.759999, "miny": 79.769999, "maxx": 130.86000099999998, "maxy": 119.87000099999999}, "metadata": {"date": "2019-01-17 16:42:24", "company": "", "revision": "", "title": "motor"}} +/////////////////////////////////////////////// + +/////////////////////////////////////////////// +/* Utility functions */ + +var storagePrefix = 'KiCad_HTML_BOM__' + pcbdata.metadata.title + '__' + + pcbdata.metadata.revision + '__'; +var storage; + +function initStorage(key) { + try { + window.localStorage.getItem("blank"); + storage = window.localStorage; + } catch (e) { + // localStorage not available + } + if (!storage) { + try { + window.sessionStorage.getItem("blank"); + storage = window.sessionStorage; + } catch (e) { + // sessionStorage also not available + } + } +} + +function readStorage(key) { + if (storage) { + return storage.getItem(storagePrefix + '#' + key); + } else { + return null; + } +} + +function writeStorage(key, value) { + if (storage) { + storage.setItem(storagePrefix + '#' + key, value); + } +} + +function fancyDblClickHandler(el, onsingle, ondouble) { + return function() { + if (el.getAttribute("data-dblclick") == null) { + el.setAttribute("data-dblclick", 1); + setTimeout(function() { + if (el.getAttribute("data-dblclick") == 1) { + onsingle(); + } + el.removeAttribute("data-dblclick"); + }, 200); + } else { + el.removeAttribute("data-dblclick"); + ondouble(); + } + } +} + +function smoothScrollToRow(rowid) { + document.getElementById(rowid).scrollIntoView({ + behavior: "smooth", + block: "center", + inline: "nearest" + }); +} + +function focusInputField(input) { + input.scrollIntoView(false); + input.focus(); + input.select(); +} + +function copyToClipboard() { + var text = ''; + for (var node of bomhead.childNodes[0].childNodes) { + if (node.firstChild) { + text = text + node.firstChild.nodeValue; + } + if (node != bomhead.childNodes[0].lastChild) { + text += '\t'; + } + } + text += '\n'; + for (var row of bombody.childNodes) { + for (var cell of row.childNodes) { + for (var node of cell.childNodes) { + if (node.nodeName == "INPUT") { + if (node.checked) { + text = text + '✓'; + } + } else if (node.nodeName == "MARK") { + text = text + node.firstChild.nodeValue; + } else { + text = text + node.nodeValue; + } + } + if (cell != row.lastChild) { + text += '\t'; + } + } + text += '\n'; + } + var textArea = document.createElement("textarea"); + textArea.classList.add('clipboard-temp'); + textArea.value = text; + + document.body.appendChild(textArea); + textArea.focus(); + textArea.select(); + + try { + if (document.execCommand('copy')) { + console.log('Bom copied to clipboard.'); + } + } catch (err) { + console.log('Can not copy to clipboard.'); + } + + document.body.removeChild(textArea); +} + +function removeGutterNode(node) { + for (var i = 0; i < node.childNodes.length; i++) { + if (node.childNodes[i].classList && + node.childNodes[i].classList.contains("gutter")) { + node.removeChild(node.childNodes[i]); + break; + } + } +} + +function cleanGutters() { + removeGutterNode(document.getElementById("bot")); + removeGutterNode(document.getElementById("canvasdiv")); +} + +var units = { + prefixes: { + giga: ["G", "g", "giga", "Giga", "GIGA"], + mega: ["M", "mega", "Mega", "MEGA"], + kilo: ["K", "k", "kilo", "Kilo", "KILO"], + milli: ["m", "milli", "Milli", "MILLI"], + micro: ["U", "u", "micro", "Micro", "MICRO", "μ", "µ"], // different utf8 μ + nano: ["N", "n", "nano", "Nano", "NANO"], + pico: ["P", "p", "pico", "Pico", "PICO"], + }, + unitsShort: ["R", "r", "Ω", "F", "f", "H", "h"], + unitsLong: [ + "OHM", "Ohm", "ohm", "ohms", + "FARAD", "Farad", "farad", + "HENRY", "Henry", "henry" + ], + getMultiplier: function(s) { + if (this.prefixes.giga.includes(s)) return 1e9; + if (this.prefixes.mega.includes(s)) return 1e6; + if (this.prefixes.kilo.includes(s)) return 1e3; + if (this.prefixes.milli.includes(s)) return 1e-3; + if (this.prefixes.micro.includes(s)) return 1e-6; + if (this.prefixes.nano.includes(s)) return 1e-9; + if (this.prefixes.pico.includes(s)) return 1e-12; + return 1; + }, + valueRegex: null, +} + +function initUtils() { + var allPrefixes = units.prefixes.giga + .concat(units.prefixes.mega) + .concat(units.prefixes.kilo) + .concat(units.prefixes.milli) + .concat(units.prefixes.micro) + .concat(units.prefixes.nano) + .concat(units.prefixes.pico); + var allUnits = units.unitsShort.concat(units.unitsLong); + units.valueRegex = new RegExp("^([0-9\.]+)" + + "\\s*(" + allPrefixes.join("|") + ")?" + + "(" + allUnits.join("|") + ")?" + + "(\\b.*)?$", ""); + units.valueAltRegex = new RegExp("^([0-9]*)" + + "(" + units.unitsShort.join("|") + ")?" + + "([GgMmKkUuNnPp])?" + + "([0-9]*)" + + "(\\b.*)?$", ""); + for (var bomtable of Object.values(pcbdata.bom)) { + for (var row of bomtable) { + row.push(parseValue(row[1], row[3][0][0])); + } + } +} + +function parseValue(val, ref) { + var inferUnit = (unit, ref) => { + if (unit) { + unit = unit.toLowerCase(); + if (unit == 'Ω' || unit == "ohm" || unit == "ohms") { + unit = 'r'; + } + unit = unit[0]; + } else { + ref = /^([a-z]+)\d+$/i.exec(ref); + if (ref) { + ref = ref[1].toLowerCase(); + if (ref == "c") unit = 'f'; + else if (ref == "l") unit = 'h'; + else if (ref == "r" || ref == "rv") unit = 'r'; + else unit = null; + } + } + return unit; + }; + val = val.replace(/,/g, ""); + var match = units.valueRegex.exec(val); + var unit; + if (match) { + val = parseFloat(match[1]); + if (match[2]) { + val = val * units.getMultiplier(match[2]); + } + unit = inferUnit(match[3], ref); + if (!unit) return null; + else return { + val: val, + unit: unit, + extra: match[4], + } + } + match = units.valueAltRegex.exec(val); + if (match && (match[1] || match[4])) { + val = parseFloat(match[1] + "." + match[4]); + if (match[3]) { + val = val * units.getMultiplier(match[3]); + } + unit = inferUnit(match[2], ref); + if (!unit) return null; + else return { + val: val, + unit: unit, + extra: match[5], + } + } + return null; +} + +function valueCompare(a, b, stra, strb) { + if (a === null && b === null) { + // Failed to parse both values, compare them as strings. + if (stra != strb) return stra > strb ? 1 : -1; + else return 0; + } else if (a === null) { + return 1; + } else if (b === null) { + return -1; + } else { + if (a.unit != b.unit) return a.unit > b.unit ? 1 : -1; + else if (a.val != b.val) return a.val > b.val ? 1 : -1; + else if (a.extra != b.extra) return a.extra > b.extra ? 1 : -1; + else return 0; + } +} + +/////////////////////////////////////////////// + +/////////////////////////////////////////////// +/* PCB rendering code */ + +var redrawOnDrag = true; +var boardRotation = 0; + +function deg2rad(deg) { + return deg * Math.PI / 180; +} + +function calcFontPoint(linepoint, text, offsetx, offsety, tilt) { + var point = [ + linepoint[0] * text.width + offsetx, + linepoint[1] * text.height + offsety + ]; + // Adding half a line height here is technically a bug + // but pcbnew currently does the same, text is slightly shifted. + point[0] -= (point[1] + text.height * 0.5) * tilt; + return point; +} + +function drawtext(ctx, text, color, flip) { + ctx.save(); + ctx.translate(...text.pos); + var angle = -text.angle; + if (text.attr.includes("mirrored")) { + ctx.scale(-1, 1); + angle = -angle; + } + var tilt = 0; + if (text.attr.includes("italic")) { + tilt = 0.125; + } + var interline = (text.height * 1.5 + text.thickness) / 2; + var txt = text.text.split("\n"); + // KiCad ignores last empty line. + if (txt[txt.length-1] == '') txt.pop(); + ctx.rotate(deg2rad(angle)); + ctx.fillStyle = color; + ctx.strokeStyle = color; + ctx.lineCap = "round"; + ctx.lineWidth = text.thickness; + for (var i in txt) { + var offsety = (-(txt.length - 1) + i * 2) * interline + text.height / 2; + var lineWidth = 0; + for (var c of txt[i]) { + lineWidth += pcbdata.font_data[c].w * text.width; + } + var offsetx = 0; + switch (text.horiz_justify) { + case -1: + // Justify left, do nothing + break; + case 0: + // Justify center + offsetx -= lineWidth / 2; + break; + case 1: + // Justify right + offsetx -= lineWidth; + break; + } + for (var c of txt[i]) { + for (var line of pcbdata.font_data[c].l) { + // Drawing each segment separately instead of + // polyline because round line caps don't work in joints + for (var i = 0; i < line.length - 1; i++) { + ctx.beginPath(); + ctx.moveTo(...calcFontPoint(line[i], text, offsetx, offsety, tilt)); + ctx.lineTo(...calcFontPoint(line[i + 1], text, offsetx, offsety, tilt)); + ctx.stroke(); + } + } + offsetx += pcbdata.font_data[c].w * text.width; + } + } + ctx.restore(); +} + +function drawedge(ctx, scalefactor, edge, color) { + ctx.strokeStyle = color; + ctx.lineWidth = Math.max(1 / scalefactor, edge.width); + ctx.lineCap = "round"; + if (edge.type == "segment") { + ctx.beginPath(); + ctx.moveTo(...edge.start); + ctx.lineTo(...edge.end); + ctx.stroke(); + } + if (edge.type == "arc") { + ctx.beginPath(); + ctx.arc( + ...edge.start, + edge.radius, + deg2rad(edge.startangle), + deg2rad(edge.endangle)); + ctx.stroke(); + } + if (edge.type == "circle") { + ctx.beginPath(); + ctx.arc( + ...edge.start, + edge.radius, + 0, 2 * Math.PI); + ctx.closePath(); + ctx.stroke(); + } +} + +function drawRoundRect(ctx, color, size, radius, ctxmethod) { + ctx.beginPath(); + ctx.strokeStyle = color; + var x = size[0] * -0.5; + var y = size[1] * -0.5; + var width = size[0]; + var height = size[1]; + ctx.moveTo(x, 0); + ctx.arcTo(x, y + height, x + width, y + height, radius); + ctx.arcTo(x + width, y + height, x + width, y, radius); + ctx.arcTo(x + width, y, x, y, radius); + ctx.arcTo(x, y, x, y + height, radius); + ctx.closePath(); + ctxmethod(); +} + +function drawOblong(ctx, color, size, ctxmethod) { + drawRoundRect(ctx, color, size, Math.min(size[0], size[1]) / 2, ctxmethod); +} + +function drawPolygons(ctx, color, polygons, ctxmethod) { + ctx.fillStyle = color; + for (var polygon of polygons) { + ctx.beginPath(); + for (var vertex of polygon) { + ctx.lineTo(...vertex) + } + ctx.closePath(); + ctxmethod(); + } +} + +function drawPolygonShape(ctx, shape, color) { + ctx.save(); + ctx.translate(...shape.pos); + ctx.rotate(deg2rad(-shape.angle)); + drawPolygons(ctx, color, shape.polygons, ctx.fill.bind(ctx)); + ctx.restore(); +} + +function drawDrawing(ctx, layer, scalefactor, drawing, color) { + if (["segment", "arc", "circle"].includes(drawing.type)) { + drawedge(ctx, scalefactor, drawing, color); + } else if (drawing.type == "polygon") { + drawPolygonShape(ctx, drawing, color); + } else { + drawtext(ctx, drawing, color, layer == "B"); + } +} + +function drawCircle(ctx, radius, ctxmethod) { + ctx.beginPath(); + ctx.arc(0, 0, radius, 0, 2 * Math.PI); + ctx.closePath(); + ctxmethod(); +} + +function drawPad(ctx, pad, color, outline) { + ctx.save(); + ctx.translate(...pad.pos); + ctx.rotate(deg2rad(pad.angle)); + if (pad.offset) { + ctx.translate(...pad.offset); + } + ctx.fillStyle = color; + ctx.strokeStyle = color; + var ctxmethod = outline ? ctx.stroke.bind(ctx) : ctx.fill.bind(ctx); + if (pad.shape == "rect") { + var rect = [...pad.size.map(c => -c * 0.5), ...pad.size]; + if (outline) { + ctx.strokeRect(...rect); + } else { + ctx.fillRect(...rect); + } + } else if (pad.shape == "oval") { + drawOblong(ctx, color, pad.size, ctxmethod); + } else if (pad.shape == "circle") { + drawCircle(ctx, pad.size[0] / 2, ctxmethod); + } else if (pad.shape == "roundrect") { + drawRoundRect(ctx, color, pad.size, pad.radius, ctxmethod); + } else if (pad.shape == "custom") { + drawPolygons(ctx, color, pad.polygons, ctxmethod); + } + if (pad.type == "th" && !outline) { + ctx.fillStyle = "#CCCCCC"; + if (pad.drillshape == "oblong") { + drawOblong(ctx, "#CCCCCC", pad.drillsize, ctxmethod); + } else { + drawCircle(ctx, pad.drillsize[0] / 2, ctxmethod); + } + } + ctx.restore(); +} + +function drawModule(ctx, layer, scalefactor, module, padcolor, outlinecolor, highlight) { + if (highlight) { + // draw bounding box + if (module.layer == layer) { + ctx.save(); + ctx.globalAlpha = 0.2; + ctx.translate(...module.bbox.pos); + ctx.fillStyle = padcolor; + ctx.fillRect( + 0, 0, + ...module.bbox.size); + ctx.globalAlpha = 1; + ctx.strokeStyle = padcolor; + ctx.strokeRect( + 0, 0, + ...module.bbox.size); + ctx.restore(); + } + } + // draw drawings + for (var drawing of module.drawings) { + if (drawing.layer == layer) { + drawDrawing(ctx, layer, scalefactor, drawing.drawing, padcolor); + } + } + // draw pads + for (var pad of module.pads) { + if (pad.layers.includes(layer)) { + drawPad(ctx, pad, padcolor, false); + if (pad.pin1 && highlightpin1) { + drawPad(ctx, pad, outlinecolor, true); + } + } + } +} + +function drawEdges(canvas, scalefactor) { + var ctx = canvas.getContext("2d"); + var edgecolor = getComputedStyle(topmostdiv).getPropertyValue('--pcb-edge-color'); + for (var edge of pcbdata.edges) { + drawedge(ctx, scalefactor, edge, edgecolor); + } +} + +function drawModules(canvas, layer, scalefactor, highlight) { + var ctx = canvas.getContext("2d"); + ctx.lineWidth = 3 / scalefactor; + var style = getComputedStyle(topmostdiv); + var padcolor = style.getPropertyValue('--pad-color'); + var outlinecolor = style.getPropertyValue('--pin1-outline-color'); + if (highlight > 0) { + padcolor = style.getPropertyValue('--pad-color-highlight'); + outlinecolor = style.getPropertyValue('--pin1-outline-color-highlight'); + } + for (var i = 0; i < pcbdata.modules.length; i++) { + var mod = pcbdata.modules[i]; + if (!highlight || highlightedModules.includes(i)) { + drawModule(ctx, layer, scalefactor, mod, padcolor, outlinecolor, highlight); + } + } +} + +function drawSilkscreen(canvas, layer, scalefactor) { + var ctx = canvas.getContext("2d"); + for (var d of pcbdata.silkscreen[layer]) { + if (["segment", "arc", "circle"].includes(d.type)) { + drawedge(ctx, scalefactor, d, "#aa4"); + } else if (d.type == "polygon") { + drawPolygonShape(ctx, d, "#4aa"); + } else { + drawtext(ctx, d, "#4aa", layer == "B"); + } + } +} + +function clearCanvas(canvas) { + var ctx = canvas.getContext("2d"); + ctx.save(); + ctx.setTransform(1, 0, 0, 1, 0, 0); + ctx.clearRect(0, 0, canvas.width, canvas.height); + ctx.restore(); +} + +function drawHighlightsOnLayer(canvasdict) { + clearCanvas(canvasdict.highlight); + drawModules(canvasdict.highlight, canvasdict.layer, + canvasdict.transform.s * canvasdict.transform.zoom, true); +} + +function drawHighlights() { + drawHighlightsOnLayer(allcanvas.front); + drawHighlightsOnLayer(allcanvas.back); +} + +function drawBackground(canvasdict) { + clearCanvas(canvasdict.bg); + clearCanvas(canvasdict.silk); + drawEdges(canvasdict.bg, canvasdict.transform.s); + drawModules(canvasdict.bg, canvasdict.layer, + canvasdict.transform.s * canvasdict.transform.zoom, false); + drawSilkscreen(canvasdict.silk, canvasdict.layer, canvasdict.transform.s); +} + +function prepareCanvas(canvas, flip, transform) { + var ctx = canvas.getContext("2d"); + ctx.setTransform(1, 0, 0, 1, 0, 0); + var fontsize = 1.55; + ctx.scale(transform.zoom, transform.zoom); + ctx.translate(transform.panx, transform.pany); + if (flip) { + ctx.scale(-1, 1); + } + ctx.translate(transform.x, transform.y); + ctx.rotate(deg2rad(boardRotation)); + ctx.scale(transform.s, transform.s); +} + +function prepareLayer(canvasdict) { + var flip = (canvasdict.layer == "B"); + for (var c of ["bg", "silk", "highlight"]) { + prepareCanvas(canvasdict[c], flip, canvasdict.transform); + } +} + +function rotateVector(v, angle) { + angle = deg2rad(angle); + return [ + v[0] * Math.cos(angle) - v[1] * Math.sin(angle), + v[0] * Math.sin(angle) + v[1] * Math.cos(angle) + ]; +} + +function applyRotation(bbox) { + var corners = [ + [bbox.minx, bbox.miny], + [bbox.minx, bbox.maxy], + [bbox.maxx, bbox.miny], + [bbox.maxx, bbox.maxy], + ]; + corners = corners.map((v) => rotateVector(v, boardRotation)); + return { + minx: corners.reduce((a, v) => Math.min(a, v[0]), Infinity), + miny: corners.reduce((a, v) => Math.min(a, v[1]), Infinity), + maxx: corners.reduce((a, v) => Math.max(a, v[0]), -Infinity), + maxy: corners.reduce((a, v) => Math.max(a, v[1]), -Infinity), + } +} + +function recalcLayerScale(canvasdict) { + var canvasdivid = { + "F": "frontcanvas", + "B": "backcanvas" + } [canvasdict.layer]; + var width = document.getElementById(canvasdivid).clientWidth * 2; + var height = document.getElementById(canvasdivid).clientHeight * 2; + var bbox = applyRotation(pcbdata.edges_bbox); + var scalefactor = 0.98 * Math.min( + width / (bbox.maxx - bbox.minx), + height / (bbox.maxy - bbox.miny) + ); + if (scalefactor < 0.1) { + scalefactor = 1; + } + canvasdict.transform.s = scalefactor; + var flip = (canvasdict.layer == "B"); + if (flip) { + canvasdict.transform.x = -((bbox.maxx + bbox.minx) * scalefactor + width) * 0.5; + } else { + canvasdict.transform.x = -((bbox.maxx + bbox.minx) * scalefactor - width) * 0.5; + } + canvasdict.transform.y = -((bbox.maxy + bbox.miny) * scalefactor - height) * 0.5; + for (var c of ["bg", "silk", "highlight"]) { + canvas = canvasdict[c]; + canvas.width = width; + canvas.height = height; + canvas.style.width = (width / 2) + "px"; + canvas.style.height = (height / 2) + "px"; + } +} + +function redrawCanvas(layerdict) { + prepareLayer(layerdict); + drawBackground(layerdict); + drawHighlightsOnLayer(layerdict); +} + +function resizeCanvas(layerdict) { + recalcLayerScale(layerdict); + redrawCanvas(layerdict); +} + +function resizeAll() { + resizeCanvas(allcanvas.front); + resizeCanvas(allcanvas.back); +} + +function bboxScan(layer, x, y) { + var result = []; + for (var i = 0; i < pcbdata.modules.length; i++) { + var module = pcbdata.modules[i]; + if (module.layer == layer) { + var b = module.bbox; + if (b.pos[0] <= x && b.pos[0] + b.size[0] >= x && + b.pos[1] <= y && b.pos[1] + b.size[1] >= y) { + result.push(i); + } + } + } + return result; +} + +function handleMouseDown(e, layerdict) { + if (e.which != 1) { + return; + } + e.preventDefault(); + e.stopPropagation(); + layerdict.transform.mousestartx = e.offsetX; + layerdict.transform.mousestarty = e.offsetY; + layerdict.transform.mousedownx = e.offsetX; + layerdict.transform.mousedowny = e.offsetY; + layerdict.transform.mousedown = true; +} + +function handleMouseClick(e, layerdict) { + var x = e.offsetX; + var y = e.offsetY; + var t = layerdict.transform; + if (layerdict.layer == "B") { + x = (2 * x / t.zoom - t.panx + t.x) / -t.s; + } else { + x = (2 * x / t.zoom - t.panx - t.x) / t.s; + } + y = (2 * y / t.zoom - t.y - t.pany) / t.s; + var v = rotateVector([x, y], -boardRotation); + var modules = bboxScan(layerdict.layer, v[0], v[1]); + if (modules.length > 0) { + modulesClicked(modules); + } +} + +function handleMouseUp(e, layerdict) { + e.preventDefault(); + e.stopPropagation(); + if (e.which == 1 && + layerdict.transform.mousedown && + layerdict.transform.mousedownx == e.offsetX && + layerdict.transform.mousedowny == e.offsetY) { + // This is just a click + handleMouseClick(e, layerdict); + layerdict.transform.mousedown = false; + return; + } + if (e.which == 3) { + // Reset pan and zoom on right click. + layerdict.transform.panx = 0; + layerdict.transform.pany = 0; + layerdict.transform.zoom = 1; + redrawCanvas(layerdict); + } else if (!redrawOnDrag) { + redrawCanvas(layerdict); + } + layerdict.transform.mousedown = false; +} + +function handleMouseMove(e, layerdict) { + if (!layerdict.transform.mousedown) { + return; + } + e.preventDefault(); + e.stopPropagation(); + var dx = e.offsetX - layerdict.transform.mousestartx; + var dy = e.offsetY - layerdict.transform.mousestarty; + layerdict.transform.panx += 2 * dx / layerdict.transform.zoom; + layerdict.transform.pany += 2 * dy / layerdict.transform.zoom; + layerdict.transform.mousestartx = e.offsetX; + layerdict.transform.mousestarty = e.offsetY; + if (redrawOnDrag) { + redrawCanvas(layerdict); + } +} + +function handleMouseWheel(e, layerdict) { + e.preventDefault(); + e.stopPropagation(); + var t = layerdict.transform; + var wheeldelta = e.deltaY; + if (e.deltaMode == 1) { + // FF only, scroll by lines + wheeldelta *= 30; + } else if (e.deltaMode == 2) { + wheeldelta *= 300; + } + var m = Math.pow(1.1, -wheeldelta / 40); + // Limit amount of zoom per tick. + if (m > 2) { + m = 2; + } else if (m < 0.5) { + m = 0.5; + } + t.zoom *= m; + var zoomd = (1 - m) / t.zoom; + t.panx += 2 * e.offsetX * zoomd; + t.pany += 2 * e.offsetY * zoomd; + redrawCanvas(layerdict); +} + +function addMouseHandlers(div, layerdict) { + div.onmousedown = function(e) { + handleMouseDown(e, layerdict); + }; + div.onmousemove = function(e) { + handleMouseMove(e, layerdict); + }; + div.onmouseup = function(e) { + handleMouseUp(e, layerdict); + }; + div.onmouseout = function(e) { + handleMouseUp(e, layerdict); + } + div.onwheel = function(e) { + handleMouseWheel(e, layerdict); + } + for (var element of [div, layerdict.bg, layerdict.silk, layerdict.highlight]) { + element.addEventListener("contextmenu", function(e) { + e.preventDefault(); + }, false); + } +} + +function setRedrawOnDrag(value) { + redrawOnDrag = value; + writeStorage("redrawOnDrag", value); +} + +function setBoardRotation(value) { + boardRotation = value * 5; + writeStorage("boardRotation", boardRotation); + document.getElementById("rotationDegree").textContent = boardRotation; + resizeAll(); +} + +function initRender() { + allcanvas = { + front: { + transform: { + x: 0, + y: 0, + s: 1, + panx: 0, + pany: 0, + zoom: 1, + mousestartx: 0, + mousestarty: 0, + mousedown: false, + }, + bg: document.getElementById("F_bg"), + silk: document.getElementById("F_slk"), + highlight: document.getElementById("F_hl"), + layer: "F", + }, + back: { + transform: { + x: 0, + y: 0, + s: 1, + panx: 0, + pany: 0, + zoom: 1, + mousestartx: 0, + mousestarty: 0, + mousedown: false, + }, + bg: document.getElementById("B_bg"), + silk: document.getElementById("B_slk"), + highlight: document.getElementById("B_hl"), + layer: "B", + } + }; + addMouseHandlers(document.getElementById("frontcanvas"), allcanvas.front); + addMouseHandlers(document.getElementById("backcanvas"), allcanvas.back); +} + +/////////////////////////////////////////////// + +/////////////////////////////////////////////// +/* DOM manipulation and misc code */ + +var bomsplit; +var canvassplit; +var canvaslayout = "default"; +var bomlayout = "default"; +var initDone = false; +var bomSortFunction = null; +var currentSortColumn = null; +var currentSortOrder = null; +var currentHighlightedRowId; +var highlightHandlers = []; +var highlightedModules = []; +var checkboxes = []; +var bomCheckboxes = ""; +var highlightpin1 = false; +var lastClicked; + +function dbg(html) { + dbgdiv.innerHTML = html; +} + +function setDarkMode(value) { + if (value) { + topmostdiv.classList.add("dark"); + } else { + topmostdiv.classList.remove("dark"); + } + writeStorage("darkmode", value); + if (initDone) { + redrawCanvas(allcanvas.front); + redrawCanvas(allcanvas.back); + } +} + +function setHighlightPin1(value) { + writeStorage("highlightpin1", value); + highlightpin1 = value; + if (initDone) { + redrawCanvas(allcanvas.front); + redrawCanvas(allcanvas.back); + } +} + +function getStoredCheckboxRefs(checkbox) { + function convert(ref) { + var intref = parseInt(ref); + if (isNaN(intref)) { + for (var i = 0; i < pcbdata.modules.length; i++) { + if (pcbdata.modules[i].ref == ref) { + return i; + } + } + return -1; + } else { + return intref; + } + } + var existingRefs = readStorage("checkbox_" + checkbox); + if (!existingRefs) { + return new Set(); + } else { + return new Set(existingRefs.split(",").map(r => convert(r))); + } +} + +function getCheckboxState(checkbox, references) { + var storedRefsSet = getStoredCheckboxRefs(checkbox); + var currentRefsSet = new Set(references.map(r => r[1])); + // Get difference of current - stored + var difference = new Set(currentRefsSet); + for (ref of storedRefsSet) { + difference.delete(ref); + } + if (difference.size == 0) { + // All the current refs are stored + return "checked"; + } else if (difference.size == currentRefsSet.size) { + // None of the current refs are stored + return "unchecked"; + } else { + // Some of the refs are stored + return "indeterminate"; + } +} + +function setBomCheckboxState(checkbox, element, references) { + var state = getCheckboxState(checkbox, references); + element.checked = (state == "checked"); + element.indeterminate = (state == "indeterminate"); +} + +function createCheckboxChangeHandler(checkbox, references) { + return function() { + refsSet = getStoredCheckboxRefs(checkbox); + if (this.checked) { + // checkbox ticked + for (var ref of references) { + refsSet.add(ref[1]); + } + } else { + // checkbox unticked + for (var ref of references) { + refsSet.delete(ref[1]); + } + } + writeStorage("checkbox_" + checkbox, [...refsSet].join(",")); + } +} + +function createRowHighlightHandler(rowid, refs) { + return function() { + if (currentHighlightedRowId) { + if (currentHighlightedRowId == rowid) { + return; + } + document.getElementById(currentHighlightedRowId).classList.remove("highlighted"); + } + document.getElementById(rowid).classList.add("highlighted"); + currentHighlightedRowId = rowid; + highlightedModules = refs.map(r => r[1]); + drawHighlights(); + } +} + +function entryMatches(entry) { + // check refs + for (var ref of entry[3]) { + if (ref[0].toLowerCase().indexOf(filter) >= 0) { + return true; + } + } + // check value + if (entry[1].toLowerCase().indexOf(filter) >= 0) { + return true; + } + // check footprint + if (entry[2].toLowerCase().indexOf(filter) >= 0) { + return true; + } + return false; +} + +function findRefInEntry(entry) { + return entry[3].filter(r => r[0].toLowerCase() == reflookup); +} + +function highlightFilter(s) { + if (!filter) { + return s; + } + var parts = s.toLowerCase().split(filter); + if (parts.length == 1) { + return s; + } + var r = ""; + var pos = 0; + for (var i in parts) { + if (i > 0) { + r += '<mark class="highlight">' + + s.substring(pos, pos + filter.length) + + '</mark>'; + pos += filter.length; + } + r += s.substring(pos, pos + parts[i].length); + pos += parts[i].length; + } + return r; +} + +function checkboxSetUnsetAllHandler(checkboxname) { + return function() { + var checkboxnum = 0; + while (checkboxnum < checkboxes.length && + checkboxes[checkboxnum].toLowerCase() != checkboxname.toLowerCase()) { + checkboxnum++; + } + if (checkboxnum >= checkboxes.length) { + return; + } + var allset = true; + var checkbox; + var row; + for (row of bombody.childNodes) { + checkbox = row.childNodes[checkboxnum + 1].childNodes[0]; + if (!checkbox.checked || checkbox.indeterminate) { + allset = false; + break; + } + } + for (row of bombody.childNodes) { + checkbox = row.childNodes[checkboxnum + 1].childNodes[0]; + checkbox.checked = !allset; + checkbox.indeterminate = false; + checkbox.onchange(); + } + } +} + +function createColumnHeader(name, cls, comparator) { + var th = document.createElement("TH"); + th.innerHTML = name; + th.classList.add(cls); + th.style.cursor = "pointer"; + var span = document.createElement("SPAN"); + span.classList.add("sortmark"); + span.classList.add("none"); + th.appendChild(span); + th.onclick = function() { + if (currentSortColumn && this !== currentSortColumn) { + // Currently sorted by another column + currentSortColumn.childNodes[1].classList.remove(currentSortOrder); + currentSortColumn.childNodes[1].classList.add("none"); + currentSortColumn = null; + currentSortOrder = null; + } + if (currentSortColumn && this === currentSortColumn) { + // Already sorted by this column + if (currentSortOrder == "asc") { + // Sort by this column, descending order + bomSortFunction = function(a, b) { + return -comparator(a, b); + } + currentSortColumn.childNodes[1].classList.remove("asc"); + currentSortColumn.childNodes[1].classList.add("desc"); + currentSortOrder = "desc"; + } else { + // Unsort + bomSortFunction = null; + currentSortColumn.childNodes[1].classList.remove("desc"); + currentSortColumn.childNodes[1].classList.add("none"); + currentSortColumn = null; + currentSortOrder = null; + } + } else { + // Sort by this column, ascending order + bomSortFunction = comparator; + currentSortColumn = this; + currentSortColumn.childNodes[1].classList.remove("none"); + currentSortColumn.childNodes[1].classList.add("asc"); + currentSortOrder = "asc"; + } + populateBomBody(); + } + return th; +} + +function populateBomHeader() { + while (bomhead.firstChild) { + bomhead.removeChild(bomhead.firstChild); + } + var tr = document.createElement("TR"); + var th = document.createElement("TH"); + th.classList.add("numCol"); + tr.appendChild(th); + checkboxes = bomCheckboxes.split(",").filter((e) => e); + var checkboxCompareClosure = function(checkbox) { + return (a, b) => { + var stateA = getCheckboxState(checkbox, a[3]); + var stateB = getCheckboxState(checkbox, b[3]); + if (stateA > stateB) return -1; + if (stateA < stateB) return 1; + return 0; + } + } + for (var checkbox of checkboxes) { + th = createColumnHeader( + checkbox, "bom-checkbox", checkboxCompareClosure(checkbox)); + th.onclick = fancyDblClickHandler( + th, th.onclick.bind(th), checkboxSetUnsetAllHandler(checkbox)); + tr.appendChild(th); + } + tr.appendChild(createColumnHeader("References", "References", (a, b) => { + var i = 0; + while (i < a[3].length && i < b[3].length) { + if (a[3][i] != b[3][i]) return a[3][i] > b[3][i] ? 1 : -1; + i++; + } + return a[3].length - b[3].length; + })); + // Extra fields + if (config.extra_fields.length > 0) { + var extraFieldCompareClosure = function(fieldIndex) { + return (a, b) => { + var fa = a[4][fieldIndex]; + var fb = b[4][fieldIndex]; + if (fa != fb) return fa > fb ? 1 : -1; + else return 0; + } + } + for (var i in config.extra_fields) { + tr.appendChild(createColumnHeader( + config.extra_fields[i], "extra", extraFieldCompareClosure(i))); + } + } + tr.appendChild(createColumnHeader("Value", "Value", (a, b) => { + return valueCompare(a[5], b[5], a[1], b[1]); + })); + tr.appendChild(createColumnHeader("Footprint", "Footprint", (a, b) => { + if (a[2] != b[2]) return a[2] > b[2] ? 1 : -1; + else return 0; + })); + tr.appendChild(createColumnHeader("Quantity", "Quantity", (a, b) => { + return a[3].length - b[3].length; + })); + bomhead.appendChild(tr); +} + +function populateBomBody() { + while (bom.firstChild) { + bom.removeChild(bom.firstChild); + } + highlightHandlers = []; + currentHighlightedRowId = null; + var first = true; + switch (canvaslayout) { + case 'F': + bomtable = pcbdata.bom.F; + break; + case 'FB': + bomtable = pcbdata.bom.both; + break; + case 'B': + bomtable = pcbdata.bom.B; + break; + } + if (bomSortFunction) { + bomtable = bomtable.slice().sort(bomSortFunction); + } + for (var i in bomtable) { + var bomentry = bomtable[i]; + if (filter && !entryMatches(bomentry)) { + continue; + } + var references = bomentry[3]; + if (reflookup) { + references = findRefInEntry(bomentry); + if (references.length == 0) { + continue; + } + } + var tr = document.createElement("TR"); + var td = document.createElement("TD"); + var rownum = +i + 1; + tr.id = "bomrow" + rownum; + td.textContent = rownum; + tr.appendChild(td); + // Checkboxes + for (var checkbox of checkboxes) { + if (checkbox) { + td = document.createElement("TD"); + var input = document.createElement("input"); + input.type = "checkbox"; + input.onchange = createCheckboxChangeHandler(checkbox, references); + setBomCheckboxState(checkbox, input, references); + td.appendChild(input); + tr.appendChild(td); + } + } + // References + td = document.createElement("TD"); + td.innerHTML = highlightFilter(references.map(r => r[0]).join(", ")); + tr.appendChild(td); + // Extra fields + for (var i in config.extra_fields) { + td = document.createElement("TD"); + td.innerHTML = highlightFilter(bomentry[4][i]); + tr.appendChild(td); + } + // Value + td = document.createElement("TD"); + td.innerHTML = highlightFilter(bomentry[1]); + tr.appendChild(td); + // Footprint + td = document.createElement("TD"); + td.innerHTML = highlightFilter(bomentry[2]); + tr.appendChild(td); + // Quantity + td = document.createElement("TD"); + td.textContent = bomentry[3].length; + tr.appendChild(td); + bom.appendChild(tr); + var handler = createRowHighlightHandler(tr.id, references); + tr.onmousemove = handler; + highlightHandlers.push({ + id: tr.id, + handler: handler, + refs: references + }); + if ((filter || reflookup) && first) { + handler(); + first = false; + } + } +} + +function highlightPreviousRow() { + if (!currentHighlightedRowId) { + highlightHandlers[highlightHandlers.length - 1].handler(); + } else { + if (highlightHandlers.length > 1 && + highlightHandlers[0].id == currentHighlightedRowId) { + highlightHandlers[highlightHandlers.length - 1].handler(); + } else { + for (var i = 0; i < highlightHandlers.length - 1; i++) { + if (highlightHandlers[i + 1].id == currentHighlightedRowId) { + highlightHandlers[i].handler(); + break; + } + } + } + } + smoothScrollToRow(currentHighlightedRowId); +} + +function highlightNextRow() { + if (!currentHighlightedRowId) { + highlightHandlers[0].handler(); + } else { + if (highlightHandlers.length > 1 && + highlightHandlers[highlightHandlers.length - 1].id == currentHighlightedRowId) { + highlightHandlers[0].handler(); + } else { + for (var i = 1; i < highlightHandlers.length; i++) { + if (highlightHandlers[i - 1].id == currentHighlightedRowId) { + highlightHandlers[i].handler(); + break; + } + } + } + } + smoothScrollToRow(currentHighlightedRowId); +} + +function populateBomTable() { + populateBomHeader(); + populateBomBody(); +} + +function modulesClicked(moduleIndexes) { + var lastClickedIndex = moduleIndexes.indexOf(lastClicked); + var index = moduleIndexes[(lastClickedIndex + 1) % moduleIndexes.length]; + for (var handler of highlightHandlers) { + if (handler.refs.map(r => r[1]).indexOf(index) >= 0) { + lastClicked = index; + handler.handler(); + smoothScrollToRow(currentHighlightedRowId); + break; + } + } +} + +function updateFilter(input) { + filter = input.toLowerCase(); + populateBomTable(); +} + +function updateRefLookup(input) { + reflookup = input.toLowerCase(); + populateBomTable(); +} + +function silkscreenVisible(visible) { + if (visible) { + allcanvas.front.silk.style.display = ""; + allcanvas.back.silk.style.display = ""; + writeStorage("silkscreenVisible", true); + } else { + allcanvas.front.silk.style.display = "none"; + allcanvas.back.silk.style.display = "none"; + writeStorage("silkscreenVisible", false); + } +} + +function changeCanvasLayout(layout) { + document.getElementById("fl-btn").classList.remove("depressed"); + document.getElementById("fb-btn").classList.remove("depressed"); + document.getElementById("bl-btn").classList.remove("depressed"); + switch (layout) { + case 'F': + document.getElementById("fl-btn").classList.add("depressed"); + if (bomlayout != "bom-only") { + canvassplit.collapse(1); + } + break; + case 'B': + document.getElementById("bl-btn").classList.add("depressed"); + if (bomlayout != "bom-only") { + canvassplit.collapse(0); + } + break; + default: + document.getElementById("fb-btn").classList.add("depressed"); + if (bomlayout != "bom-only") { + canvassplit.setSizes([50, 50]); + } + } + canvaslayout = layout; + writeStorage("canvaslayout", layout); + resizeAll(); + populateBomTable(); +} + +function populateMetadata() { + document.getElementById("title").innerHTML = pcbdata.metadata.title; + document.getElementById("revision").innerHTML = "Rev: " + pcbdata.metadata.revision; + document.getElementById("company").innerHTML = pcbdata.metadata.company; + document.getElementById("filedate").innerHTML = pcbdata.metadata.date; + if (pcbdata.metadata.title != "") { + document.title = pcbdata.metadata.title + " BOM"; + } +} + +function changeBomLayout(layout) { + document.getElementById("bom-btn").classList.remove("depressed"); + document.getElementById("lr-btn").classList.remove("depressed"); + document.getElementById("tb-btn").classList.remove("depressed"); + switch (layout) { + case 'bom-only': + document.getElementById("bom-btn").classList.add("depressed"); + if (bomsplit) { + bomsplit.destroy(); + bomsplit = null; + canvassplit.destroy(); + canvassplit = null; + } + document.getElementById("frontcanvas").style.display = "none"; + document.getElementById("backcanvas").style.display = "none"; + document.getElementById("bot").style.height = ""; + break; + case 'top-bottom': + document.getElementById("tb-btn").classList.add("depressed"); + document.getElementById("frontcanvas").style.display = ""; + document.getElementById("backcanvas").style.display = ""; + document.getElementById("bot").style.height = "calc(100% - 80px)"; + document.getElementById("bomdiv").classList.remove("split-horizontal"); + document.getElementById("canvasdiv").classList.remove("split-horizontal"); + document.getElementById("frontcanvas").classList.add("split-horizontal"); + document.getElementById("backcanvas").classList.add("split-horizontal"); + if (bomsplit) { + bomsplit.destroy(); + bomsplit = null; + canvassplit.destroy(); + canvassplit = null; + } + bomsplit = Split(['#bomdiv', '#canvasdiv'], { + sizes: [50, 50], + onDragEnd: resizeAll, + direction: "vertical", + gutterSize: 5 + }); + canvassplit = Split(['#frontcanvas', '#backcanvas'], { + sizes: [50, 50], + gutterSize: 5, + onDragEnd: resizeAll + }); + break; + case 'left-right': + document.getElementById("lr-btn").classList.add("depressed"); + document.getElementById("frontcanvas").style.display = ""; + document.getElementById("backcanvas").style.display = ""; + document.getElementById("bot").style.height = "calc(100% - 80px)"; + document.getElementById("bomdiv").classList.add("split-horizontal"); + document.getElementById("canvasdiv").classList.add("split-horizontal"); + document.getElementById("frontcanvas").classList.remove("split-horizontal"); + document.getElementById("backcanvas").classList.remove("split-horizontal"); + if (bomsplit) { + bomsplit.destroy(); + bomsplit = null; + canvassplit.destroy(); + canvassplit = null; + } + bomsplit = Split(['#bomdiv', '#canvasdiv'], { + sizes: [50, 50], + onDragEnd: resizeAll, + gutterSize: 5 + }); + canvassplit = Split(['#frontcanvas', '#backcanvas'], { + sizes: [50, 50], + gutterSize: 5, + direction: "vertical", + onDragEnd: resizeAll + }); + } + bomlayout = layout; + writeStorage("bomlayout", layout); + changeCanvasLayout(canvaslayout); +} + +function focusFilterField() { + focusInputField(document.getElementById("filter")); +} + +function focusRefLookupField() { + focusInputField(document.getElementById("reflookup")); +} + +function toggleBomCheckbox(bomrowid, checkboxnum) { + if (!bomrowid || checkboxnum > checkboxes.length) { + return; + } + var bomrow = document.getElementById(bomrowid); + var checkbox = bomrow.childNodes[checkboxnum].childNodes[0]; + checkbox.checked = !checkbox.checked; + checkbox.indeterminate = false; + checkbox.onchange(); +} + +function checkBomCheckbox(bomrowid, checkboxname) { + var checkboxnum = 0; + while (checkboxnum < checkboxes.length && + checkboxes[checkboxnum].toLowerCase() != checkboxname.toLowerCase()) { + checkboxnum++; + } + if (!bomrowid || checkboxnum >= checkboxes.length) { + return; + } + var bomrow = document.getElementById(bomrowid); + var checkbox = bomrow.childNodes[checkboxnum + 1].childNodes[0]; + checkbox.checked = true; + checkbox.indeterminate = false; + checkbox.onchange(); +} + +function setBomCheckboxes(value) { + bomCheckboxes = value; + writeStorage("bomCheckboxes", value); + populateBomTable(); +} + +document.onkeydown = function(e) { + switch (e.key) { + case "n": + if (document.activeElement.type == "text") { + return; + } + if (currentHighlightedRowId !== null) { + checkBomCheckbox(currentHighlightedRowId, "placed"); + highlightNextRow(); + e.preventDefault(); + } + break; + case "ArrowUp": + highlightPreviousRow(); + e.preventDefault(); + break; + case "ArrowDown": + highlightNextRow(); + e.preventDefault(); + break; + default: + break; + } + if (e.altKey) { + switch (e.key) { + case "f": + focusFilterField(); + e.preventDefault(); + break; + case "r": + focusRefLookupField(); + e.preventDefault(); + break; + case "z": + changeBomLayout("bom-only"); + e.preventDefault(); + break; + case "x": + changeBomLayout("left-right"); + e.preventDefault(); + break; + case "c": + changeBomLayout("top-bottom"); + e.preventDefault(); + break; + case "v": + changeCanvasLayout("F"); + e.preventDefault(); + break; + case "b": + changeCanvasLayout("FB"); + e.preventDefault(); + break; + case "n": + changeCanvasLayout("B"); + e.preventDefault(); + break; + default: + break; + } + if (e.key >= '1' && e.key <= '9') { + toggleBomCheckbox(currentHighlightedRowId, parseInt(e.key)); + } + } +} + +function initDefaults() { + bomlayout = readStorage("bomlayout"); + if (bomlayout === null) { + bomlayout = config.bom_view; + } + if (!['bom-only', 'left-right', 'top-bottom'].includes(bomlayout)) { + bomlayout = config.bom_view; + } + canvaslayout = readStorage("canvaslayout"); + if (canvaslayout === null) { + canvaslayout = config.layer_view; + } + bomCheckboxes = readStorage("bomCheckboxes"); + if (bomCheckboxes === null) { + bomCheckboxes = config.checkboxes; + } + document.getElementById("bomCheckboxes").value = bomCheckboxes; + + var b = readStorage("silkscreenVisible"); + if (b === null) { + b = config.show_silkscreen; + } + document.getElementById("silkscreenCheckbox").checked = b; + silkscreenVisible(b); + + b = readStorage("redrawOnDrag"); + if (b === null) { + b = config.redraw_on_drag; + } + document.getElementById("dragCheckbox").checked = b; + setRedrawOnDrag(b); + + b = readStorage("darkmode"); + if (b === null) { + b = config.dark_mode; + } + document.getElementById("darkmodeCheckbox").checked = b; + setDarkMode(b); + + b = readStorage("highlightpin1"); + if (b === null) { + b = config.highlight_pin1; + } + document.getElementById("highlightpin1Checkbox").checked = b; + setHighlightPin1(b); + + boardRotation = readStorage("boardRotation"); + if (boardRotation === null) { + boardRotation = config.board_rotation * 5; + } else { + boardRotation = parseInt(boardRotation); + } + document.getElementById("boardRotation").value = boardRotation / 5; + document.getElementById("rotationDegree").textContent = boardRotation; +} + +window.onload = function(e) { + initUtils(); + initRender(); + initStorage(); + initDefaults(); + cleanGutters(); + populateMetadata(); + dbgdiv = document.getElementById("dbg"); + bom = document.getElementById("bombody"); + bomhead = document.getElementById("bomhead"); + filter = ""; + reflookup = ""; + initDone = true; + // Triggers render + changeBomLayout(bomlayout); +} + +window.onresize = resizeAll; +window.matchMedia("print").addListener(resizeAll); + +/////////////////////////////////////////////// + + </script> +</head> + +<body> +<div id="topmostdiv" style="width: 100%; height: 100%"> + <div id="top"> + <div style="float: right;"> + <div class="hideonprint menu" style="float: right; margin: 10px; top: 8px;"> + <button class="menubtn"></button> + <div class="menu-content"> + <label class="menu-label menu-label-top"> + <input id="darkmodeCheckbox" type="checkbox" onchange="setDarkMode(this.checked)"> + Dark mode + </label> + <label class="menu-label"> + <input id="silkscreenCheckbox" type="checkbox" checked onchange="silkscreenVisible(this.checked)"> + Show silkscreen + </label> + <label class="menu-label"> + <input id="highlightpin1Checkbox" type="checkbox" onchange="setHighlightPin1(this.checked)"> + Highlight first pin + </label> + <label class="menu-label"> + <input id="dragCheckbox" type="checkbox" checked onchange="setRedrawOnDrag(this.checked)"> + Continuous redraw on drag + </label> + <label class="menu-label"> + <span>Board rotation</span> + <span style="float: right"><span id="rotationDegree">0</span>°</span> + <input id="boardRotation" type="range" min="-36" max="36" value="0" class="slider" oninput="setBoardRotation(this.value)"> + </label> + <label class="menu-label"> + <div style="margin-left: 5px">Bom checkboxes</div> + <input id="bomCheckboxes" class="menu-textbox" type=text + oninput="setBomCheckboxes(this.value)"> + </label> + <label class="menu-label"> + <span class="shameless-plug"> + <span>Created using</span> + <a target="blank" href="https://github.com/openscopeproject/InteractiveHtmlBom">InteractiveHtmlBom</a> + </span> + </label> + </div> + </div> + <div class="button-container hideonprint" + style="float: right; margin: 10px; position: relative; top: 8px"> + <button id="fl-btn" class="left-most-button" onclick="changeCanvasLayout('F')" + title="Front only">F + </button> + <button id="fb-btn" class="middle-button" onclick="changeCanvasLayout('FB')" + title="Front and Back">FB + </button> + <button id="bl-btn" class="right-most-button" onclick="changeCanvasLayout('B')" + title="Back only">B + </button> + </div> + <div class="button-container hideonprint" + style="float: right; margin: 10px; position: relative; top: 8px"> + <button id="bom-btn" class="left-most-button" onclick="changeBomLayout('bom-only')" + title="BOM only"></button> + <button id="lr-btn" class="middle-button" onclick="changeBomLayout('left-right')" + title="BOM left, drawings right"></button> + <button id="tb-btn" class="right-most-button" onclick="changeBomLayout('top-bottom')" + title="BOM top, drawings bot"></button> + </div> + </div> + <div id="fileinfodiv" style="overflow: auto;"> + <table class="fileinfo"> + <tbody> + <tr> + <td id="title" class="title" style="width: 70%"> + Title + </td> + <td id="revision" class="title" style="width: 30%"> + Revision + </td> + </tr> + <tr> + <td id="company"> + Kicad version + </td> + <td id="filedate"> + Date + </td> + </tr> + </tbody> + </table> + </div> + </div> + <div id="bot" class="split" style="height: calc(100% - 80px)"> + <div id="bomdiv" class="split split-horizontal"> + <div style="width: 100%"> + <input id="reflookup" class="searchbox reflookup hideonprint" type="text" placeholder="Ref lookup" + oninput="updateRefLookup(this.value)"> + <input id="filter" class="searchbox filter hideonprint" type="text" placeholder="Filter" + oninput="updateFilter(this.value)"> + <div class="button-container hideonprint" style="float: left"> + <button id="copy" title="Copy bom table to clipboard" + onclick="copyToClipboard()"></button> + </div> + </div> + <div id="dbg"></div> + <table class="bom"> + <thead id="bomhead"> + </thead> + <tbody id="bombody"> + </tbody> + </table> + </div> + <div id="canvasdiv" class="split split-horizontal"> + <div id="frontcanvas" class="split" style="overflow: hidden"> + <div style="position: relative; width: 100%; height: 100%;"> + <canvas id="F_bg" style="position: absolute; left: 0; top: 0; z-index: 0;"></canvas> + <canvas id="F_slk" style="position: absolute; left: 0; top: 0; z-index: 1;"></canvas> + <canvas id="F_hl" style="position: absolute; left: 0; top: 0; z-index: 2;"></canvas> + </div> + </div> + <div id="backcanvas" class="split" style="overflow: hidden"> + <div style="position: relative; width: 100%; height: 100%;"> + <canvas id="B_bg" style="position: absolute; left: 0; top: 0; z-index: 0;"></canvas> + <canvas id="B_slk" style="position: absolute; left: 0; top: 0; z-index: 1;"></canvas> + <canvas id="B_hl" style="position: absolute; left: 0; top: 0; z-index: 2;"></canvas> + </div> + </div> + </div> + </div> +</div> +</body> + +</html> |