-
The path forward to the web
06/03/2021 at 21:55 • 0 commentsNodejs output from my STL generator Customizer
So Thingiverse's Customizer queue is apparently backed up, and I haven't been able to dig up much in the way of details. MakerBot (which owns Thingiverse) doesn't owe me a working tool, but it's pretty bad form to leave it in the current online-but-not-working state. To prevent others from falling victim I removed Customizer integration from my Penguin Case page on Thingiverse, though the change doesn't appear to have had any effect since Customizer integration is still there.
Proof that OpenJSCAD at least initially planned OpenSCAD support. OpenJSCAD
At first it was very jarring to find that OpenSCAD syntax is unsupported in OpenJSCAD, but it turns out that at least in a prior version OpenSCAD compatibility was planned, so I'm not just losing my mind. Unfortunately that version hadn't yet reached OpenSCAD parity, and apparently has been superseded by another which has dropped OpenSCAD syntax as a goal.
While I was digging around trying to figure out why I remembered a feature that didn't exist, I also found this project that seems to be the genesis of the other two, and this nodejs tool that almost does what I want, but the opposite instead.
CAD Projects
There are several interesting projects that appear to be driving toward this "web SCAD" future as well. CadHUB appears to be building a multi-language CAD editor for the web, and SOL75 - a very clean looking parametric model viewer. Neither seem to be ready for public use yet though.
Web Assembly
Ideally, I want to have OpenSCAD transpiled into web assembly so that it is actually running in the browser. That way hosting an online STL generator would scale more easily. But web assembly looks like a pain to set up, so it's shelved for now.
The current state of my STL generator page. Good old server-side
For now I'm going with a server-side implementation. You fill out a form and hit send, and my server will render the STL and hand it back to you. Easy peasy. Github link to the code.
-
Reinventing the cube
06/03/2021 at 18:58 • 0 commentsMy great, great grandfather's mining lamp from the early 1900s. Earlier this spring I found myself wanting to take my great, great grandfather's carbide mining lamp caving with me and show the crew how it worked while we were stopped for lunch. Obviously a family heirloom such as this has some sentimental value, and I needed a case to protect it while we scrambled over rocks and tossed our backpacks up ledges.
---------- more ----------The Frog Box I printed. A strong box such as a Pelican Case is the obvious answer here, but I felt that it was a little overkill and a little pricey. I also couldn't find any small enough on their website, despite knowing that I had seen some sufficiently miniature ones at work before. That's when I discovered the Frog Box on Thingiverse. I printed the provided STL and found that it checked all of my boxes: Durable, could be made water resistant, and was parametric. Except I don't have access to Fusion 360, and thus couldn't change the size to fit my carbide lamp.
So I set out to make my own parametric box using an open source CAD tool, one that could be adjusted and produce an STL from a webpage if at all possible. It does feel really silly to be designing my own box. I dabbled in 3D design in college and took to heart the findings that "well I'm not very good at this." Which sucks, because improving a skill doesn't happen much when you stop trying.
So here's to trying and learning I guess. Huzzah.
Properly motivated? Good, moving on.
There are a couple open source CAD programs to pick from (none really matching parity with the commercial offerings available on Windows). I mainly stick to Solvespace and OpenSCAD. They both work well with simple designs and boolean build-ups of addition and subtraction. Blender is a powerful 3D editor, but I haven't found it much good for CAD. I've also used FreeCAD in the past, but may never give it another chance after multiple occurrences of when it updates and suddenly fails to open projects made in the previous version.27 days and my first attempt at generating an STL is supposedly still crunching along... I chose to go with OpenSCAD originally for it's compatibility with Thingiverse's Customizer, which would provide the accessible parametric functionality I wanted. It was only after I had finished the rough draft of the design and uploaded it to Thingiverse that I discovered that Customizer is, well, totally broken.
That was discouraging, but I quickly decided to pivot and host my own OpenJSCAD server to allow for parameterized downloads! I had heard of OpenJSCAD before and loved the idea of OpenSCAD but built in Javascript for use in the web. Of course, that's not actually the case. OpenJSCAD is built in Javascript all right, but it's also programmed in Javascript. That's right, there isn't parity between the two tools, as they essentially use different programming languages. Shucks.
I could migrate the project to javascript, but (besides not wanting to muck with javascript) I've found OpenJSCAD to not be very mature yet. So for now I'm sticking with OpenSCAD.
Tune in next week for a look at how I plan to strap wings and a propeller on this jalopy called OpenSCAD and get parameterized STLs on the web.