| 1 | <!DOCTYPE html> |
| 2 | <html lang="nl"> |
| 3 | |
| 4 | <head> |
| 5 | <meta charset="utf-8"> |
| 6 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 7 | <title>Timdraw</title> |
| 8 | <link rel="stylesheet" href="/static/style.css"> |
| 9 | </head> |
| 10 | |
| 11 | <body> |
| 12 | <header> |
| 13 | <div class="brand"> |
| 14 | <strong>Timdraw</strong> |
| 15 | <button id="machine-name" type="button" class="machine-name"> |
| 16 | <span id="lamp" class="lamp"></span> |
| 17 | Bachin TA4 |
| 18 | </button> |
| 19 | <a id="local-url" href="http://127.0.0.1:8765/">127.0.0.1:8765</a> |
| 20 | </div> |
| 21 | <div class="plot-actions"> |
| 22 | <button id="btn-plot" type="button" class="primary">Teken</button> |
| 23 | <button id="btn-pause" type="button">Pauze</button> |
| 24 | <button id="btn-trace" type="button">Voorbeeld</button> |
| 25 | <button id="btn-stop" type="button">Stop</button> |
| 26 | </div> |
| 27 | <div class="header-actions"> |
| 28 | <p id="toast" class="toast" hidden></p> |
| 29 | <button id="btn-fit" type="button">Passend</button> |
| 30 | <label class="check"><input id="show-travel" type="checkbox"> Verplaatsingen</label> |
| 31 | </div> |
| 32 | </header> |
| 33 | <div class="layout"> |
| 34 | <aside class="panel left"> |
| 35 | <section> |
| 36 | <h2>Tekening</h2> |
| 37 | <div class="row wrap"> |
| 38 | <button id="btn-import" type="button" class="primary">Importeer SVG</button> |
| 39 | <button id="btn-open" type="button">Open</button> |
| 40 | <button id="btn-save" type="button">Opslaan</button> |
| 41 | <input id="file" type="file" accept=".svg,image/svg+xml" hidden> |
| 42 | <input id="open-file" type="file" accept=".tdrw,application/json" hidden> |
| 43 | </div> |
| 44 | <label class="field">Voorbeeld uit Bachin |
| 45 | <select id="demos"> |
| 46 | <option value="">—</option> |
| 47 | </select> |
| 48 | </label> |
| 49 | </section> |
| 50 | <section> |
| 51 | <h2>Tekst</h2> |
| 52 | <textarea id="new-text" rows="3" placeholder="Tekst op één lijn per regel"></textarea> |
| 53 | <div class="split"> |
| 54 | <label class="field">Font |
| 55 | <select id="new-font"> |
| 56 | <option value="futural">Sans</option> |
| 57 | <option value="rowmans">Romein</option> |
| 58 | <option value="scripts">Handschrift</option> |
| 59 | </select> |
| 60 | </label> |
| 61 | <label class="field">Hoogte mm |
| 62 | <input id="new-size" type="number" min="2" max="80" step="0.5" value="12"> |
| 63 | </label> |
| 64 | </div> |
| 65 | <button id="btn-text" type="button">Plaats tekst</button> |
| 66 | </section> |
| 67 | <section> |
| 68 | <h2>Objecten</h2> |
| 69 | <ul id="layers"></ul> |
| 70 | <div class="row wrap"> |
| 71 | <button id="btn-copy" type="button">Kopieer</button> |
| 72 | <button id="btn-paste" type="button">Plak</button> |
| 73 | <button id="btn-dup" type="button">Dupliceer</button> |
| 74 | <button id="btn-delete" type="button">Wis</button> |
| 75 | <button id="btn-back" type="button">Achter</button> |
| 76 | <button id="btn-front" type="button">Voor</button> |
| 77 | </div> |
| 78 | <label class="check"><input id="per-object" type="checkbox"> Objecten individueel tekenen</label> |
| 79 | <label class="check" id="ignore-overlap-label"><input id="ignore-overlap" type="checkbox"> Overlappende lijnen negeren</label> |
| 80 | <p class="hint">Slepen verplaatst. Hoeken schalen. Het handvat boven het kader draait. Delete wist, Ctrl+C / |
| 81 | Ctrl+V kopieert.</p> |
| 82 | </section> |
| 83 | </aside> |
| 84 | <main> |
| 85 | <canvas id="page"></canvas> |
| 86 | </main> |
| 87 | <aside class="panel right"> |
| 88 | <section> |
| 89 | <h2 id="prop-title">Eigenschappen</h2> |
| 90 | <div id="text-props" hidden> |
| 91 | <label class="field">Tekst |
| 92 | <textarea id="prop-text" rows="3"></textarea> |
| 93 | </label> |
| 94 | <div class="split"> |
| 95 | <label class="field">Font |
| 96 | <select id="prop-font"> |
| 97 | <option value="futural">Sans</option> |
| 98 | <option value="rowmans">Romein</option> |
| 99 | <option value="scripts">Handschrift</option> |
| 100 | </select> |
| 101 | </label> |
| 102 | <label class="field">Hoogte mm |
| 103 | <input id="prop-size" type="number" min="2" max="80" step="0.5"> |
| 104 | </label> |
| 105 | </div> |
| 106 | </div> |
| 107 | <div class="modes"> |
| 108 | <label class="check"><input id="prop-line" type="checkbox" checked> Lijn</label> |
| 109 | <label class="check"><input id="prop-fill" type="checkbox"> Vulling</label> |
| 110 | </div> |
| 111 | <div class="split"> |
| 112 | <label class="field">Hoek ° |
| 113 | <input id="prop-angle" type="number" min="-180" max="180" step="1" value="45"> |
| 114 | </label> |
| 115 | <label class="field">Lijnafstand mm |
| 116 | <input id="prop-spacing" type="number" min="0.3" max="30" step="0.1" value="2"> |
| 117 | </label> |
| 118 | </div> |
| 119 | <label class="field">Vulpercentage |
| 120 | <input id="prop-percent" type="number" min="2" max="100" step="1" value="20"> |
| 121 | </label> |
| 122 | <label class="check"><input id="prop-cross" type="checkbox"> Crosshatch</label> |
| 123 | <label class="check"><input id="prop-zigzag" type="checkbox"> Zigzag</label> |
| 124 | <label class="check"><input id="prop-gray" type="checkbox"> Grijswaarden</label> |
| 125 | <div id="gray-props"> |
| 126 | <label class="field">Tredes |
| 127 | <input id="prop-steps" type="number" min="2" max="16" step="1" value="5"> |
| 128 | </label> |
| 129 | <div class="split"> |
| 130 | <label class="field">Donker mm |
| 131 | <input id="prop-dark" type="number" min="0.3" max="20" step="0.1" value="0.8"> |
| 132 | </label> |
| 133 | <label class="field">Licht mm |
| 134 | <input id="prop-light" type="number" min="0.4" max="40" step="0.1" value="4"> |
| 135 | </label> |
| 136 | </div> |
| 137 | <p class="hint">Donkerder wordt krapper gearceerd. Lichter krijgt meer afstand. Bijna-wit slaat Timdraw over. |
| 138 | </p> |
| 139 | </div> |
| 140 | </section> |
| 141 | <section> |
| 142 | <h2>Machine</h2> |
| 143 | <p id="machine-error" class="error" hidden></p> |
| 144 | <p id="position" class="mono">X — Y — Z —</p> |
| 145 | <div class="jog"> |
| 146 | <button type="button" data-x="0" data-y="1">↑</button> |
| 147 | <div class="jog-mid"> |
| 148 | <button type="button" data-x="-1" data-y="0">←</button> |
| 149 | <select id="jog-step"> |
| 150 | <option value="1">1 mm</option> |
| 151 | <option value="10" selected>10 mm</option> |
| 152 | <option value="50">50 mm</option> |
| 153 | </select> |
| 154 | <button type="button" data-x="1" data-y="0">→</button> |
| 155 | </div> |
| 156 | <button type="button" data-x="0" data-y="-1">↓</button> |
| 157 | </div> |
| 158 | <div class="row wrap"> |
| 159 | <button id="btn-pen-up" type="button">Pen omhoog</button> |
| 160 | <button id="btn-pen-down" type="button">Pen omlaag</button> |
| 161 | <button id="btn-unlock" type="button">Ontgrendel</button> |
| 162 | <button id="btn-home" type="button">Home</button> |
| 163 | <button id="btn-release" type="button">Assen los</button> |
| 164 | </div> |
| 165 | <p id="stats" class="hint"></p> |
| 166 | <div class="progress"> |
| 167 | <div id="bar"></div> |
| 168 | </div> |
| 169 | </section> |
| 170 | </aside> |
| 171 | </div> |
| 172 | <dialog id="connect-modal" class="connect-modal"> |
| 173 | <h2>Machine</h2> |
| 174 | <p id="machine-state">Niet verbonden</p> |
| 175 | <p id="firmware" class="hint"></p> |
| 176 | <div class="split"> |
| 177 | <label class="field">Poort |
| 178 | <select id="port"></select> |
| 179 | </label> |
| 180 | <button id="btn-connect" type="button" class="primary">Verbinden</button> |
| 181 | </div> |
| 182 | <div class="split"> |
| 183 | <label class="field">Tekensnelheid |
| 184 | <input id="draw-speed" type="number" min="50" max="6000" step="50" value="3000"> |
| 185 | </label> |
| 186 | <label class="field">Verplaatsing |
| 187 | <input id="travel-speed" type="number" min="50" max="6000" step="50" value="5000"> |
| 188 | </label> |
| 189 | </div> |
| 190 | <div class="split"> |
| 191 | <label class="field">Pen omhoog Z |
| 192 | <input id="pen-up" type="number" min="0" max="12" step="0.1" value="0"> |
| 193 | </label> |
| 194 | <label class="field">Pen omlaag Z |
| 195 | <input id="pen-down" type="number" min="0" max="12" step="0.1" value="10"> |
| 196 | </label> |
| 197 | </div> |
| 198 | <label class="field">Pauze na pen ms |
| 199 | <input id="dwell" type="number" min="0" max="2000" step="10" value="0"> |
| 200 | </label> |
| 201 | <label class="field">Nulpunt |
| 202 | <select id="origin"> |
| 203 | <option value="top-left" selected>Linksboven</option> |
| 204 | <option value="bottom-left">Linksonder</option> |
| 205 | </select> |
| 206 | </label> |
| 207 | <div class="row"> |
| 208 | <button id="connect-close" type="button">Sluiten</button> |
| 209 | </div> |
| 210 | </dialog> |
| 211 | <script src="/static/penpath.js"></script> |
| 212 | <script src="/static/app.js"></script> |
| 213 | </body> |
| 214 | |
| 215 | </html> |