-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
index.html
63 lines (57 loc) · 2.29 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html lang="en">
<!-- based on http://jsfiddle.net/roha/353r2k8w/ -->
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-58161369-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-58161369-2');
</script>
<!-- End Google Analytics -->
<title>STL to OpenSCAD Converter</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css">
<link rel="stylesheet" type="text/css" href="style.css">
<script src="js/jquery-1.12.4.js"></script>
<script src="js/binaryReader.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1>STL → OpenSCAD File Converter</h1>
<p>This tool allows you to convert .STLs to .SCADs with ease.</p>
<details>
<summary>Thingiverse use case</summary>
<p>
In OpenSCAD you can use <code>import(example.stl)</code> to import an STL. However, Thingiverse Customizer
doesn't support the <code>import</code> command, and it requires that everything resides in one
<code>.scad</code> file. With this tool, you can convert all your STLs to OpenSCAD modules, copy and paste
each module into one big SCAD file, and call the module instead of using <code>import()</code>.
<br>
This is how I created the
<a href="https://www.thingiverse.com/thing:4311414">3DVerkstan Faceshield Stacker Customizer</a>.
</p>
</details>
<p>
If you find this useful please <a href="https://github.com/raviriley/STL-to-OpenSCAD-Converter">star it on
GitHub</a> or give it a like on <a href="https://www.thingiverse.com/thing:4461877">Thingiverse</a> :)
</p>
<hr style="margin-bottom: 2%;">
<div><span id="error"></span></div>
<input type="file" id="upload" name="file" accept=".stl">
<label for="upload" class="button">Choose File</label>
<button id="cancel" class="button" onclick="abortRead();">Cancel</button>
<div id="progress_bar">
<div class="percent">0%</div>
</div>
<p id="conversion"></p>
<p id="triangles"></p>
<p id="bounds"></p>
<span id="result"></span>
<div>
<a href="#" id="download" class="button" style="display: none">Download</a>
</div>
<script src="js/main.js"></script>
</body>
</html>