DEV Community

Cover image for NASSCAD V4.2.7 — A full CAD modeler that lives in a single HTML file
Nasser
Nasser

Posted on • Edited on

NASSCAD V4.2.7 — A full CAD modeler that lives in a single HTML file

NASSCAD V4.2.7 — A full parametric CAD modeler that lives in a single HTML file

What if your entire CAD environment was one .htm file you could double-click, drop on a USB drive, or host on a static server — no install, no cloud account, no subscription?

That's NASSCAD. And version 4.2.7 is a serious piece of engineering.

TL;DR — Full Boolean CSG, 18 watertight primitives, parametric screw & nut generators (ISO 68-1 / ASME B1.1 / ISO 4032/4033), non-destructive CSG history tree, BVH raycasting, a 2 GB geometry arena with mark-and-sweep GC, STL / OBJ / 3MF / GLB / PLY import-export, NassScript JS console, live-preview modals with sliders. Zero runtime CDN fetches. Works completely offline. Free (CC BY-NC 4.0).


The premise

Most browser-based CAD tools lean on CDNs, backends, or cloud rendering pipelines. NASSCAD goes the opposite direction: every dependency — Three.js r128, the Manifold WASM CSG engine, fonts, all geometry modules — is either bundled inline or base64-encoded and decoded at runtime via atob(). The manifold.wasm binary lives inside the HTML itself.

This is not a toy viewer. It's a full parametric modeler with Boolean operations, a construction tree, undo/redo, multi-format export, scripting, and a 2 GB memory arena — in a single file you can save to your desktop and run forever, offline, with no server.


What's new in V4.2.7

🔩 Screw.Gen — ISO 68-1 / ASME B1.1 / B1.2

Parametric screw generator with real ISO 60° V-thread profile:

  • Standards: Metric M2–M24 (ISO 68-1) · Imperial UNC/UNF (ASME B1.1/B1.2)
  • Pitch modes: Coarse / Fine / Custom / Smooth bore
  • Head styles: Hexagonal · CHC Socket · None (threaded rod)
  • Lead-in / lead-out: 1 pitch ramp for clean boolean operations
  • Resolution: N_RAD 32 / 48 / 64 / 96
  • Watertight manifold guaranteed — double-click to re-edit

⬡ Nut.Gen — ISO 4032/4033 · ASME B18.2.2

Parametric nut generator with interior ISO 60° threaded bore:

  • Standards: Metric M2–M24 · Imperial UNC/UNF
  • Pitch modes: Coarse / Fine / Custom / Smooth bore
  • Height styles: ISO 4032 normal · ISO 4033 Tall · Custom height slider
  • Chamfer: Optional 30° chamfer on top/bottom faces
  • Resolution: N_RAD 32 / 48 / 64
  • Watertight manifold guaranteed — double-click to re-edit

X-Ray mode

Toggle wireframe overlay on the entire scene with a single keystroke (X). Essential for inspecting boolean operations and internal geometry without exploding the CSG tree.

Scale improvements

Toolbar now has symmetric scale buttons: /10 /5 /2 10× — division and multiplication in one row.

Stats panel

Vertices / Faces / Objects / Undo-Redo counter moved into the Objects panel for cleaner layout.


Core architecture

Module Role
Three.js r128 WebGL rendering, custom OrbitControls with spherical damping, dual resolution (64 segs display / 128 export)
Manifold WASM C++ CSG engine in a Web Worker. N-ary union in a single call. Epsilon vertex merge before handoff
GeometryPool 512 MB–2 GB binary arena. Bump allocator + free-list reuse + mark-and-sweep GC + XOR checksum
BVH Raycaster AABB world-space cache per mesh. Pre-filter before triangle traversal. Fast at 10M+ vertices
IndexedDB Named project persistence, quota display, restore on reload. CSG tree serialized with each save
NassScript Full JS console with direct access to the NASSCAD internal API. Ctrl+Enter to run, history navigation
Worker Pool ×4 / ×6 / ×8 parallel workers for heavy CSG operations

The CSG engine — how it actually works

Boolean operations go through a carefully layered pipeline:

Auto hole detection — mix a solid and a hole object in a selection, NASSCAD forces subtract automatically. No manual mode switching needed.

N-ary union — one single Manifold WASM call for N objects, not an O(n²) pairwise loop. A scene with 21 objects unions in ~2s on a mid-range laptop.

_tryTrivialUnion fast path — if all selected objects are solids with no holes, skip the WASM call entirely and merge BufferGeometry directly. 6× faster for simple assemblies.

Watertight invariant — every geometry constructor returns { vPos: Float32Array, tris: Array }. The Uint32Array wrapping happens exclusively downstream in ToScene functions. This guarantees Manifold never receives a non-manifold mesh.

CSG Tree — every operation is logged, re-runnable, and serialized to IndexedDB. You can replay the full construction history on reload.


18 primitives

Cube · Sphere · Cylinder · Cone · Half-Sphere · Tube · Roof · Arc
⚙ Gear.Gen (ISO Involute + V-Groove Pulley)
⌁ Pipe.Gen (Bishop-Frame path)
◎ Torus Ultra-HD
✦ Chamfered / Rounded Cube
⌾ Truncated Cylinder · Double Chamfer
⌀ RevSolid.Gen (Solid of Revolution)
◑ ArcSphere.Gen (Spherical Sector)
🔩 Screw.Gen (ISO 68-1 / UNC·UNF)
⬡ Nut.Gen (ISO 4032/4033 · ASME B18.2.2)
M  Threaded Fastener (M2–M20 library)
Enter fullscreen mode Exit fullscreen mode

Export / Import

Export: STL (128 segs default) · OBJ · 3MF · GLB · PLY · SVG section · DXF section

Import: STL · OBJ · GLB · PLY (ASCII/binary)

Hard-dimensions approach: what you model is what you export, 1:1, no scale surprises.


NassScript — JS console with full internal access

// Stellate Crown — procedural example
objs.forEach(o => { scene.remove(o.mesh); o.mesh.geometry.dispose(); });
objs = []; updStats();

showToreDialog(); _toreRebuild();
await delay(300); _toreToScene();

const N = 6, R = 70;
for (let i = 0; i < N; i++) {
  const a = (2 * Math.PI * i) / N;
  addPrimitive('sphere');
  const o = objs[objs.length - 1];
  o.mesh.position.set(Math.cos(a)*R, 8, Math.sin(a)*R);
  setHoleMode(true);
  await delay(200);
}
selObjs = [...objs];
await doCSG('union');
Enter fullscreen mode Exit fullscreen mode

Every internal function is exposed. Automate complex geometries, create procedural parts, chain boolean operations — all in the same window as your model.


Community response

The V4.2.7 release post on r/VibeCodeDevs reached 31K views and 101 upvotes in 48 hours — organic, no promotion.

A few comments that sum it up:

"I had a 3D part I needed printed, and I just described it to Claude because I didn't have access to CAD software… I just tinkered for a few minutes with yours, and I was able to reproduce what Claude made for me." — NumberRegistry

"What type of Godzilla prompt did you use to create this monster?" — zipatauontheripatang

"Claude could evaporate overnight and this tool would still work. What's wrong with that?" — Various-Chest-7986

Makers testing it in the wild. The file:// architecture holds up.


Philosophy

The code is open and readable. What can't be copied is the vision behind it.

NASSCAD targets makers and engineers who need a serious tool without a 10 GB install, a cloud account, or a monthly subscription. The entire application — geometry engine, CSG pipeline, font rendering, UI — fits in one HTML file you can save to a USB drive and run on any machine, forever, with no internet connection.

Try it: nasscad.com

Built with Claude Sonnet 4.6 · Anthropic — AI-assisted coding


Tags: javascript, showdev, tooling, webdev, cad, wasm, threejs, opensource

Try it: nasscad.com
Built with Claude Sonnet 4.6 · Anthropic — AI-assisted coding

Top comments (2)

Collapse
 
nasser_7cff6f77e08155b603 profile image
Nasser

Waiting comments ...

Collapse
 
muhammad_nadhifnaimbin profile image
MUHAMMAD NADHIF NAIM BIN MUSTAQIM Moe

I AM THRAGG