| Left click | Select an object (BVH AABB pre-filter — fast at 10M+ vertices) |
| Left click + drag | Move selected object on the XZ plane. On multi-selection: drags the entire group — relative positions preserved, single Undo step. |
| Shift + click | Multi-select (N objects) — for CSG, alignment |
| Left drag on empty zone | Box-select — draw a selection rectangle. Shift = add to selection. |
| Alt + left drag | Pan the grid + all objects — useful for large scenes |
| Right click + drag | Orbit camera around the scene |
| Middle click + drag | Pan camera |
| Scroll wheel | Zoom in / out |
| Single click on object | Select + show cotation mode — XYZ dimension handles, resize by dragging corners or top handle |
| Double-click on object | Switch to rotation mode — 3 Cura-style rings (X/Y/Z). Drag a ring to rotate. Single click returns to cotation mode. |
| Double-click on .gen object | Reopens the generator dialog pre-filled with current parameters — live edit in-place (Cubic/Cylind/Tore/Pipe/Gear) |
| Ctrl + Z | Undo (up to 200 levels — IDB journal) |
| Ctrl + Y | Redo |
| Ctrl + D | Duplicate selection |
| Del / Backspace | Delete selection |
| Arrows ↑↓←→ | Move object 1 mm (XZ plane, camera-relative) |
| Alt + ↑ / ↓ | Move object up / down (Y axis) |
| Ctrl + A | Select all objects |
| Ctrl + C / Ctrl + V | Copy / Paste (offset +10mm X/Z) — geometry + transforms preserved |
| L | Show / hide 3D alignment handles |
| S | Enable / disable magnetic snap (0.1 / 0.5 / 1 mm) |
| N | Toggle light / dark theme |
| 1 · 2 · 3 · 4 · 5 | Camera views: Perspective · Top · Front · Right · Reset |
| Esc | Deselect all / Cancel box-select / Close dialogs |
| Standard primitives (toolbox) | |
| Cube | Box 20×20×20 mm — 6 flat faces, perfect manifold |
| Sphere ◎ | Configurable resolution 8–64 segs (slider in Properties) · export at 2× resolution, capped 128 · smooth normals built-in |
| Half-sphere ◑ | Flat-capped hemisphere — same slider as sphere · closed cap guaranteed manifold |
| Cylinder | 64 segs display / 128 segs export — cap-fan topology |
| Cone | 64 segs / 128 export — apex merged vertex |
| Pyramid ▲ | 4-sided pyramid — square base + triangular faces, watertight |
| RoofArc ⌒ | Half-cylinder / vaulted roof — length W, radius H, closed caps |
| Tube ⊙ | Hollow cylinder — outer radius Ro, inner radius Ri, height H. Parameters editable in Properties. |
| Lathe ⌀ | Revolved surface of revolution — 64 segs / 128 export · profile defined by spline points |
| 3D Text ✏ | ExtrudeGeometry — 6 fonts (Helvetiker R/B, Optimer R/B, Gentilis R/B) · configurable depth, bevel |
| Generator primitives (.gen — parametric, double-click to edit) | |
| ⌾ Cylind.Gen | Truncated cylinder with double chamfer/bevel — Rt, Rb, H, top/bottom chamfer 1–48 segs, N facets 12–128 — watertight manifold guaranteed |
| ✦☐ Cubic.Gen | Chamfered / rounded cube — W×H×D, chamfer radius, 1–48 segments — spherical slerp algorithm, watertight manifold |
| ◎ Tore.Gen | Ultra-HD Torus — ring R, tube r, N ring facets 12–256, M tube facets 6–128 — periodic (i+1)%N·(j+1)%M topology, 0 seam, watertight |
| ◑ ArcSphere.Gen | Spherical sector — full angle phi 1–360°. Capped with analytically-correct normals at both poles. Manifold-verified. |
| ⌀ RevSolid.Gen | Revolved solid — arc angle 1–360°. Closed caps when angle < 360°. Topology: lathe + planar caps, watertight. |
| 🟰 Pipe.Gen | Hollow pipe — straight segments + tangent arcs (radius R_bend, real tube-bending). Bishop frame (parallel transport) — zero section twist. Outer wall + inner wall + sealed caps → watertight manifold. |
| ⚙ Gear.Gen | ISO involute gears (20° pressure) — module 0.5–8 mm, straight / helical / herringbone. V-pulley (lathe+caps). Timing pulley (ExtrudeGeometry). Configurable teeth, shaft bore → watertight. |
| Hardware library | |
| 🔩 Threads M2–M20 | ISO metric bolts and nuts — sizes M2 M3 M4 M5 M6 M8 M10 M12 M16 M20 — loaded from NUTS_AND_BOLTS.js on first use |
| Import | |
| Import STL/OBJ/3MF | Binary + ASCII STL · Wavefront OBJ with normals · 3MF with per-object colors and multi-object support — automatic centering, placed on floor |
| ∪ Union | Merges N objects into one solid. Shift+click to select N objects. |
| − Subtract | Subtracts holes from solids. Automatic hole-mode detection. |
| ∩ Intersect | Keeps only the volume common to all selected objects. |
| Hole Mode | Marks an object as a hole (transparent red). Union with a solid = automatic subtraction (NASSCAD auto-subtract mode). |
| Progressive CSG | Pass 1 (16 segs, ≤300ms): preview mesh immediately visible. Pass 2 (_csgQuality segs): silent geometry swap in background. Badge ⚡ Refining shown between passes. Active on curved primitives + CSG⚡ ≥ 64. |
| AABB bypass | Non-overlapping objects (Union): Manifold skipped, geometry merged directly. Analytic normals preserved — postProcess skipped. Measured: 200 spheres (19M vertices) in ~2.6s. Scales linearly with vertex count. |
| 🌳 Tree | Displays the CSG construction tree — recursive: Union(A, Subtract(B, C))… |
| ↺ Re-run | Non-destructive re-run — reconstructs sources from tree snapshot, re-executes CSG. Survives Save/Load and Undo/Redo. |
| ↺↺ Deep Re-run | Full recursive tree re-run from leaves — parallel Worker Pool via Promise.all. Shown only if tree depth ≥ 2. |
| CSG⚡ quality | Buttons 32 / 64 / 128 in menubar — Manifold segment resolution. Default 128. Does not affect display (SEG_VIEW=64) or export (SEG_PRINT). |
| Worker Pool | ×4 / ×6 / ×8 Manifold workers (menubar) — parallel async CSG on multi-core. Reload required to apply. |
| Rotation mode | Double-click an object — 3 Cura-style rings: ■ Y (blue) · ■ X (green) · ■ Z (red). Drag a ring to rotate. Snap 15°. Single click exits to cotation mode. |
| Ring size | Screen-space constant — the rings keep the same apparent size regardless of zoom, exactly like Cura Slicer. |
| Angle display | Live angle overlay drawn on the 2D canvas during drag — shows current rotation value. |
| Activate | Single-click an object to show 6 handles. Drag a handle to resize live. Undo-safe. |
| 4 corner handles | XZ plane resize — drag to change Width and Depth simultaneously, maintaining the corner anchor. |
| Top square ■ | Y height handle — drag up/down to change object height. |
| Arrow ↑ (green) | Y lift/lower — moves object vertically. Floor-clamped at Y=0 (no underground). |
| ↧ Drop to ground | Toolbar button — snaps selection bottom face to Y=0. Works on multi-select. |
| Live dimensions | XYZ labels on the 2D canvas overlay updated in real time during drag. Rotation-aware (AABB world-space). |
| ☀ Light | Directional light intensity slider — 0 (dark) to 2 (very bright). Default 0.7. Global, not per-object. |
| Color | Click the swatch to open the OS color picker. Accessible via 🎨 Recolor button too. |
| Opacity | 0 = transparent, 1 = opaque. Values below 1 enable transparent rendering + correct depth sorting. |
| Solid / Hole | Toggle object mode. Hole = transparent red, auto-subtracted in CSG Union. |
| Pos / Rot / Dim | Direct numeric input. Pos Y = height of bottom face from ground. Dim = real AABB dimensions (rotation-aware). |
| ◎ Sphere resolution | Visible on Sphere / Half-sphere only — slider 8–64 segs (step 4). Live rebuild. Export at 2× capped 128. |
| X-Ray mode | Toolbar button — all objects semi-transparent, depth-write off. Reveals hidden/interior geometry. Toggle anytime. |
| Activate | Shift+click ≥ 2 objects → 📐 Align button or key L — colored 3D handles appear. Click handle = immediate alignment. |
| X Axis | Left · Center · Right |
| Y Axis | Floor · Center · Top |
| Z Axis | Front · Center · Back |
| Object snap | Alt+drag on an object — snaps face-to-face to the nearest object (XZ plane). Active when Snap is enabled. |
| Ctrl+Z / Ctrl+Y | 200 levels — persisted in IndexedDB (structured clone, TypedArrays native). ~20–50× faster than base64 JSON. |
| Scope | Covers: add, delete, move, scale, rotate, CSG, duplicate, import, .gen edit, thread insert. Every mutation is undoable. |
| _csgTree included | CSG construction tree embedded in each undo snapshot — Re-run stays coherent after Ctrl+Z. |
| Auto-purge | Oldest entries purged when limit reached. Journal cleared on new project / load file. |
| Save | Exports a .json file v4 — objects, positions, colors, CSG geometries, CSG tree |
| Load | Reloads a NASSCAD .json file v1–v4 — restores complete scene including .gen params |
| Export STL Binary | Native slicer format (Cura, PrusaSlicer, Bambu) — Z-up. 4–5× more compact than ASCII. Quality: 128 / 256 / 512 segs |
| Export STL ASCII | Human-readable text — legacy tool compatibility |
| Export OBJ | Wavefront with vn normals — compatible Blender, FreeCAD |
| Export 3MF | Native format for Bambu Studio, PrusaSlicer, Cura — per-object colors, Z-up, clean ZIP |
| STL Quality | Buttons 128 / 256 / 512 in menubar — curve segments at export. 128 = sufficient for 0.4mm FDM. |
| 📂 IDB Projects | Named projects saved in browser IndexedDB — list, save, load, delete. Quota bar displayed. |
| 📁 Folder | Opens the folder containing the NASSCAD .htm file (Electron / desktop only) |
| Access | Menubar button ⚡ Script — opens the script editor modal |
| Execution | Runs JS code with full access to NASSCAD API: objs, scene, doCSG(), addPrimitive(), nasLog()… Supports await (async functions). |
| Shortcuts | Ctrl+Enter = Run · Tab = 2 spaces · Ctrl+↑/↓ = history (20 entries) |
| Example | addPrimitive('cube'); nasLog('OK','done'); |
| ⚠ Dev tool | Full JS scope — developer use only. Do not run unverified code. |
ArrayBuffer allocated at startup. Size chosen via 💾 Pool: 512MB / 1GB / 1.5GB / 2GB in menubar (default 512 MB at first launch). Automatic mark-and-sweep GC. Proportions: 80% geo zone + 20% snapshot zone.
| 512 MB (default) | Geo: ~410 MB · Snap: ~102 MB — safe for most sessions |
| 1 GB | Geo: ~819 MB · Snap: ~204 MB — recommended for large scenes |
| 2 GB (max) | SharedArrayBuffer if COOP/COEP headers active (Electron) — otherwise ArrayBuffer fallback |
| MEM gauge | Bar at bottom right — JS Heap + pool. Hover = full detail. |
| ♻ Flush pool | Toolbar button — triggers mark-and-sweep GC manually. Frees orphan geometries, displays freed MB in logs. |
| Checksum | XOR of first 256 bytes per slot — silent corruption detection on load. |
| Three.js Rendering (WebGL — GPU) | |||
| ✅ Smooth | < 500 objects | < 3M vertices | No risk |
| ⚠ Slow | 500–1,000 objects | 3–8M vertices | FPS drop |
| 🔴 Risk | > 1,000 objects | > 8M vertices | Likely freeze |
| Manifold WASM — CSG operations | |||
| ✅ Fast | < 10,000 triangles/object (cube, cone, pyramid…) | < 1 second | |
| ⚠ Slow | 10,000–50,000 triangles/object (sphere, half-sphere) | 1–10 seconds | |
| 🔴 Freeze | > 50,000 triangles/object — threads (63K tri) in CSG | > 30 seconds | |
| GeometryPool + Undo/Redo (200 levels IDB) | |||
| ✅ Safe | < 150 complex objects, < 50 active undo levels | Pool < 50% | |
| 🔴 Saturation | > 300 objects or massive CSG snapshots | Red MEM gauge | |
| Practical tips | |||
|
· M threads in CSG: use CSG⚡ 32 segs first, switch to 128 only for final export · Box-select: drag on empty zone to select groups — then drag any selected object to move the whole group (XZ plane, snap-aware, single Undo) · Deep Re-run: modify sources → ↺↺ Deep to re-compute entire tree without redoing manually · Complex CSG: first reduce simple groups with Union, then subtract · MEM gauge > 70%: save project and reload page to free memory · STL 128 segs: sufficient for FDM 0.4mm nozzle (printer resolution > 0.2mm) · Progressive CSG: sources appear hidden during Pass 1 — this is normal (restored at Pass 2) |
|||
| Watertight generators — deduplicated V() pool | |
| _ccBuildBox() | Cubic.Gen — spherical slerp per edge, Map pool ix|iy|iz PREC=1e5, indexed mesh → watertight by construction |
| _ccBuildFrustum() | Cylind.Gen — double-chamfer truncated cylinder. Same V() pool, angular seam closed at theta=2π → watertight |
| _toreBuild() | Tore.Gen — periodic topology (i+1)%N·(j+1)%M. Float64 angles, N×M vertices, 2×N×M CCW tris. 0 seam, 0 border. |
| _makeArcSphereGeo() | ArcSphere.Gen — analytical normals at both poles. mergeVertices with _arcSphNoMerge sentinel (try/finally protected) for c2 normal integrity. |
| _makeLatheGeo() | RevSolid.Gen — arc 1–360°. Planar cap closing when angle < 360°. Reconstructed at CSG quality in Deep Re-run. |
| _pipeBuild() | Pipe.Gen — Bishop frame parallel transport (zero twist), straight + arc R_bend segments, outer+inner+caps → manifold |
| _gearBuild() | Gear.Gen — ISO 20° involute (ra=rp+m, rf=rp-1.25m, rb=rp·cos20°). V-pulley lathe+caps. Timing ExtrudeGeometry. |
| CSG Engine | |
| Manifold.union(N) | Native N-ary C++ WASM merge — 1 call for N objects |
| file:// patch | manifold.js converted to IIFE — removal of import(), fetch(), export default. Compatible with file:// |
| WASM base64 inline | manifold.wasm base64-encoded in HTML — decoded via atob() at runtime. Zero network. |
| Normal smoothing — PP Worker (off main thread) | |
| BFS continuity islands | Breadth-first by edges — groups faces whose angle < crease. CSR v→f adjacence (Uint32Array), cache-friendly. |
| postProcessCSGGeo() | Short-circuits < 400 faces → computeVertexNormals native. Above: dispatched to PP Worker. Progress badge ⚡. |
| Memory management | |
| Bump allocator | Zone-growing pointer — O(1) allocation. Best-fit free-list reuse before bump. |
| Mark-and-sweep GC | Mark: walks objs[]._poolSlot — Sweep: frees orphans — Compact: recalculates ptrs |
| DataView globale | Single DataView instance shared by _slotRead/_slotWrite — zero allocation per slot access (GC pressure eliminated) |
| BVH Raycaster | |
| AABB cache | Box3 world-space per mesh — rebuilt in updOList(), invalidated on any position/scale change |
| ray.intersectsBox() | AABB pre-filter — candidates only, O(N) with tiny constant. firstHitOnly=true stops at first triangle hit. |
| CSG Tree — non-destructive history | |
| _csgTree Map | Map<id → {op, children[snapshot]}> — stored at each doCSG(), recursive subtrees propagated |
| IDB persistence | csgTree serialized as Array.from(entries()) in idbSaveProject — restored on load |
| NASSCAD V4.2.6 — June 2026 | |
| ✍ NASSER Architect & Tester |
CLIT · Electronics technician · 3D Maker Vision, direction, critical bug identification (CSG sizes, manifold, worker), quality standards, field testing, technology pivots. |
| 🤖 Claude Sonnet 4.6 Developer |
Artificial Intelligence · Anthropic Web Worker Manifold WASM · Watertight primitives · Manifold geometries verified edge by edge · Surgical patches · Systematic node --check. |
| Architecture V4.2.6: Three.js r128 · Manifold WASM (Worker Pool ×N async) · Render gate _camDirty · GeometryPool 512MB–2GB (binary arena, GC mark-and-sweep, free-list reuse, DataView globale) · Undo/Redo 200 niveaux IDB (TypedArrays structured clone, _csgTree included) · BVH raycaster (AABB cache + firstHitOnly) · Box-select (rectangle NDC) · CSG Tree arborescent (non-destructive, IDB-persistent) · Progressive CSG (2-pass) · PP Worker · IndexedDB · 16 primitives watertight · ArcSphere.Gen · RevSolid.Gen · Cylind.Gen · Cubic.Gen · Tore.Gen · Pipe.Gen · Gear.Gen · Face Handles 6-DOF · Rotation Gizmo 3-axis · X-Ray mode · Export STL/OBJ/3MF · Import STL/OBJ/3MF · Snap 0.1mm · Threads M2–M20 · NassScript · Sphere resolution slider | |
Third-party dependencies (all local, zero CDN):
· three.js (Mr.doob and community) — MIT — 3D WebGL engine
· manifold.js + manifold_worker.js (Emmett Lalish et al.) — Apache 2.0 — C++ CSG WASM engine
· helvetiker_regular.js + helvetiker_bold.js (MAGENTA Ltd, MgOpen Modata) — MgOpen License
· optimer_regular.js + optimer_bold.js (MAGENTA Ltd, MgOpen Cosmetica) — MgOpen License
· gentilis_regular.js + gentilis_bold.js (J. Victor Gaultney / SIL International) — SIL OFL 1.1
· NUTS_AND_BOLTS.js (NassLab) — CC BY-NC 4.0 — M2–M20 fastener geometry data
· nasscad_logs.js (NassLab) — CC BY-NC 4.0 — structured logging module
⚖ NASSCAD V4.2 License
© 2026 NassLab — Nasser, France
This software is distributed under the Creative Commons BY-NC 4.0 license:
· Personal and non-commercial use — free, redistribution allowed with attribution
· Commercial use — written agreement required from NassLab
No implied warranty. The author cannot be held liable for any damage resulting from the use of this software.