|
@@ -4,12 +4,47 @@ This page shows the current version of the PCB layout as SVG graphics.
|
4
|
4
|
|
5
|
5
|
You can also view the [Main-Board PCB layout as PDF](./plot/dispensy_pcb.pdf).
|
6
|
6
|
|
|
7
|
+## 2D PCB Layout
|
|
8
|
+
|
7
|
9
|
<script src="js/svg-pan-zoom.js" charset="UTF-8"></script>
|
8
|
10
|
<div style="background-color: white;">
|
9
|
|
- <embed type="image/svg+xml" src="./plot/dispensy_pcb.svg" id="pz_dispensy" style="width:100%;"/>
|
|
11
|
+ <embed type="image/svg+xml" src="./plot/dispensy_pcb.svg" id="pz_dispensy" style="width: 100%;"/>
|
10
|
12
|
<script>
|
11
|
13
|
document.getElementById('pz_dispensy').addEventListener('load', function(){
|
12
|
14
|
svgPanZoom(document.getElementById('pz_dispensy'), {controlIconsEnabled: true});
|
13
|
15
|
})
|
14
|
16
|
</script>
|
15
|
17
|
</div>
|
|
18
|
+
|
|
19
|
+## 3D PCB Model
|
|
20
|
+
|
|
21
|
+<p>Status: "<span id="3d_info">Preparing 3D model...</span>"</p>
|
|
22
|
+<div id="3d_viewer" style="width: 100%; height: 100%;" />
|
|
23
|
+<script type="module">
|
|
24
|
+ var view = document.getElementById('3d_viewer');
|
|
25
|
+ view.style.height = (view.clientWidth / 2) + "px";
|
|
26
|
+ var info = document.getElementById('3d_info');
|
|
27
|
+ import * as View from './js/modelview.js';
|
|
28
|
+ View.init(view, info);
|
|
29
|
+ const file = './plot/dispensy_pcb.3mf';
|
|
30
|
+ var xhttp = new XMLHttpRequest();
|
|
31
|
+ xhttp.responseType = 'arraybuffer';
|
|
32
|
+ xhttp.onload = function() {
|
|
33
|
+ if (this.status != 200) {
|
|
34
|
+ info.textContent = "Download of " + file + " failed: " + this.status + " " + this.statusText;
|
|
35
|
+ return;
|
|
36
|
+ }
|
|
37
|
+ info.textContent = "Downloaded: " + file;
|
|
38
|
+ var file_parts = file.split(".");
|
|
39
|
+ var ext = file_parts.pop().toLowerCase();
|
|
40
|
+ if (ext == "zip") {
|
|
41
|
+ ext = file_parts.pop().toLowerCase();
|
|
42
|
+ }
|
|
43
|
+ info.textContent = "Loaded file with extension: " + ext;
|
|
44
|
+ var model_data = this.response;
|
|
45
|
+ View.view(ext, model_data);
|
|
46
|
+ };
|
|
47
|
+ info.textContent = "Fetching: " + file;
|
|
48
|
+ xhttp.open("GET", file);
|
|
49
|
+ xhttp.send();
|
|
50
|
+</script>
|