YUSUF.
Menu
Back to projects

Mobile App · 3D CAD / Engineering · 2026

SCADMobile

SCADMobile is a 1:1 mobile clone of OpenSCAD for Android and iOS built with Flutter. It executes .scad code 100% offline via an embedded openscad-wasm engine inside a Web Worker, renders 3D geometry in a Three.js WebGL viewport, dynamically generates Customizer controls from .scad comments, and exports meshes in STL, 3MF, OBJ, OFF, and DXF formats.

Download

Stack

  • Flutter (Dart 3.13)
  • Riverpod (flutter_riverpod)
  • OpenSCAD WebAssembly (openscad-wasm)
  • Three.js & WebGL (OrbitControls, STLLoader)
  • flutter_inappwebview & InAppLocalhostServer
  • re_editor & re_highlight
  • archive, file_picker, share_plus, path_provider

Problem

OpenSCAD, widely used for 3D printing and parametric CAD modeling, was only available on desktop platforms. Users lacked a true offline mobile environment to write .scad scripts, compile models locally, and inspect 3D geometry on the go.

Solution

Built a 1:1 mobile clone of OpenSCAD in Flutter with an embedded openscad-wasm engine running in a Web Worker for full offline compilation, paired with a Three.js WebGL viewport, live Customizer UI, Emmet-enabled code editor, and multi-format mesh export.

Role

Mobile App Architect, Flutter Developer & 3D WebGL/WASM Integrator

Architecture

  • Clean Architecture split into core and feature modules (editor, viewport, customizer, console, engine_bridge, export, file_manager)
  • Reactive state management powered by Riverpod (flutter_riverpod)
  • Embedded InAppLocalhostServer (localhost:18432) to serve WASM and Web Workers without CORS restrictions
  • Off-thread .scad compilation inside a Web Worker using openscad-wasm
  • Bi-directional Flutter and WebView JavaScript bridge (WasmBridgeService)
  • Hardware-accelerated Three.js WebGL viewport with OrbitControls and STLLoader

Challenges

  • Bypassing CORS and origin restrictions when loading WebAssembly and Web Workers inside Android WebView
  • Running the 13.9 MB openscad.js WASM engine reliably within mobile memory constraints
  • Transferring binary 3D meshes (STL/3MF/OBJ) between WebView and Dart without memory leaks
  • Making .scad coding ergonomic on mobile touchscreens via Emmet snippets and an accessory key bar

Outcomes

  • Built a production-ready offline Android release package (SCADMobile.apk, 61.7 MB)
  • Live auto-compilation with 650 ms debounce and interactive 3D WebGL preview
  • 1:1 OpenSCAD Customizer generating native sliders, dropdowns, and checkboxes from .scad comments
  • Real-time Console diagnostics with Click-to-Line Jump directly to error lines
  • Full mesh export in STL (Binary/ASCII), 3MF, OBJ, OFF, DXF, and .zip project bundles via OS Share Sheet

Docs

Install and launch SCADMobile. Open "Fayllar va Namunalar" (Files & Examples) to load built-in models (CSG.scad, Parametric_Gear.scad, Spiral_Vase.scad) or import your own .scad file. Edit code with the Emmet-enabled editor and accessory bar; the 3D WebGL viewport updates automatically. Use the Customizer tab to tweak parameters via sliders/dropdowns, and tap Export to share STL, 3MF, OBJ, OFF, DXF, or ZIP bundles.

Applications