u/MikeNc51W

▲ 2 r/PWA

3D modeling PWA using OpenSCAD WASM port

Hey all,

Just thought I'd share a fun FOSS PWA project I've been working on the last month and a half. It's a 3D modeling PWA that utilizes the OpenSCAD WASM port. I have it available at scadlite.com and my GitHub page for it is https://github.com/myoung8223/scadlite. Yeah, it's vibe-coded with genAI, so understandable demerit points there. I'm not much of a JS programmer. C is more my poison, and even then, undoubtedly quite mediocre there as well.

I got into 3D printing and modeling about 11 years ago and soon found an absolutely awesome free and open source 3D design program called OpenSCAD. If unfamiliar with it, it's known as the "programmer's 3D modeller", where you specify OpenSCAD code, a C-like language, in building your 3D models with primitive 3D geometry. It sounds limiting on the surface, but the rabbit hole is deep! Some users of more serious commercial 3D modeling programs might look down on it as not a serious tool or a tedious way to 3D model. Though for modeling parts, and modeling them parametrically, I find it to be an awesome program. I've designed probably a hundred useful things over the years, from printed objects to even some 3D assets for a WebXR VR game I made. I find it to be an enjoyable computer programming meets 3D modeling meets math meets LEGOs mix!

One issue with it is that it's Windows, macOS, and Linux only, or at least was until a WebAssembly port was made for it back in 2019. Even with the port, I couldn't find any fully-featured OpenSCAD implementations I much cared for. Some had many features but weren't PWAs, relying on an Internet connection. Others were PWAs missing important features. Admittedly, even my implementation isn't fully featured, but it covers vanilla OpenSCAD well. I tried forking one of the more polished projects to add some critical features and that turned into a total mess. Then I tried my hand at building one from the ground-up, teaming-up with Gemini, then later paying for Claude when I seemed to hit a wall with Gemini's capabilities. Well, "ground-up" probably doesn't give enough credit to the critical pieces that existed for this project -- the WASM port being key, the awesomeness that is the Three.js project, and the incredibly impressive capabilities of Gemini, and especially Claude. I wanted my project to be able to function completely standalone and application-like -- no server, no Internet needed once installed, the whole compiler running client-side via WASM -- one of the great selling points of PWAs in my opinion.

I see someone posted on how PWAs are a boon for free and open source software. Totally agree there! I guess I'll also add "genAI" into that FOSS boon. Maybe it's a double-edged sword with AI slop and devolving of programming skills. Wait, triple-edged sword? I've been biased toward native applications for a while, but the platform agnostic nature of PWAs is quite cool, coupled with this dawn of rapid prototyping capabilities of genAI. My motivation for this project was actually to try and get OpenSCAD in (more) use in K-12 education (the sector I work in), considering that landscape is seriously dominated by ChromeOS with 1:1 device programs. OpenSCAD, with its multidisciplinary approach to 3D modeling -- copious 3D math and spatial reasoning and troubleshooting, plus many computer programming concepts -- totally belongs in STEM classrooms and on student Chromebooks as an alternative/augmentation to traditional, mouse-driven, commercial 3D modeling programs.

The PWA I created with genAI isn't meant to be a replacement for OpenSCAD, hence "lite" being in the name. I'll probably still be using OpenSCAD for serious projects on my desktop. But as an avenue for getting K-12 students using OpenSCAD on their Chromebooks, that's my hope! Looking forward to making more PWAs that strike as useful!

reddit.com
u/MikeNc51W — 1 day ago

OpenSCAD PWA

Inspired by OpenSCAD Playground, and empowered by Gemini and Claude, as I'm not much of a Javascript programmer, I vibe-coded a free and open source OpenSCAD PWA called SCADLite, for getting web-centric platforms like ChromeOS in on the fun. The main driver for this project was the long-time observation that K-12 education is dominated by Chromebooks, and I feel that OpenSCAD is an amazing tool that should get more use in K-12 education. I know in K-12, 3D modeling is dominated by Autodesk software, but free and open source software should get more representation too, especially considering the multidisciplinary aspects of OpenSCAD -- modeling and programming. My PWA is at...

scadlite.com

My GitHub page for it is here, where I have features listed...

https://github.com/myoung8223/scadlite

It certainly doesn't have all of the bells and whistles of OpenSCAD. Getting modifiers working properly was also quite the challenge. I think I got them working properly, using multiple passes, though in this project, it seems like bugs rear their heads at every corner. The most recent major frustration was CodeJar, the JS-based code editor I was using, acting very bizarre. Perhaps that was my use of it, or just a natural ceiling for its capabilities. Replaced that with customized CodeMirror and that seems to be working out well so far. Also recently added model encoding in URLs. Other nifty features are support for importing fonts, STLs, and SVGs. The PWA works completely offline and self-contained.

Ultimately, when I'm modeling on a desktop I'll probably still be using the full-blown OpenSCAD application. Though I think this PWA is featured enough to be a handy tool for web-based platforms.

reddit.com
u/MikeNc51W — 3 days ago