STL-to-OpenSCAD-Converter/index.html

62 lines
2.3 KiB
HTML
Raw Normal View History

2020-04-28 13:00:09 +02:00
<!DOCTYPE html>
2022-07-25 01:24:11 +02:00
<html lang="en">
2020-04-28 13:00:09 +02:00
<!-- based on http://jsfiddle.net/roha/353r2k8w/ -->
2022-06-24 06:54:19 +02:00
2020-04-28 13:00:09 +02:00
<head>
2022-06-24 06:54:19 +02:00
<!-- 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());
2020-07-01 00:48:52 +02:00
2022-06-24 06:54:19 +02:00
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">
2020-04-28 13:00:09 +02:00
</head>
2022-06-24 06:54:19 +02:00
2020-04-28 13:00:09 +02:00
<body>
2022-06-24 06:54:19 +02:00
<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> :)
2020-06-16 02:42:47 +02:00
</p>
2022-06-24 06:54:19 +02:00
<hr style="margin-bottom: 2%;">
2020-06-16 02:42:47 +02:00
<div><span id="error"></span></div>
<input type="file" id="upload" name="file" accept=".stl">
<label for="upload" class="button">Choose File</label>
2020-06-16 08:11:05 +02:00
<button id="cancel" class="button" onclick="abortRead();">Cancel</button>
2020-06-16 02:42:47 +02:00
<div id="progress_bar">
<div class="percent">0%</div>
</div>
2020-06-16 10:21:17 +02:00
<p id="conversion"></p>
2020-06-16 02:42:47 +02:00
<span id="result"></span>
2022-06-24 06:54:19 +02:00
2020-06-16 02:42:47 +02:00
<div>
<a href="#" id="download" class="button" style="display: none">Download</a>
</div>
<script src="js/main.js"></script>
2022-06-24 06:54:19 +02:00
2020-04-28 13:00:09 +02:00
</body>
2022-06-24 06:54:19 +02:00
2020-04-28 13:00:09 +02:00
</html>