CAD Kernel
A CAD kernel written in Rust. It represents geometry with NURBS curves and surfaces and manages topology with a B-rep structure, so that area, volume and edges can be computed rigorously rather than approximated from meshes.
Every wall, slab, column, stair, ramp and roof in Strura is built by this kernel — including curved walls, openings carved through them, sloped and curved stair bands, and the booleans that fuse wall junctions.
Features
- NURBS curves & surfaces — mathematically precise freeform geometry, with arcs and circles as exact rational curves
- B-rep structure — Vertex, Edge, Loop, Face, Shell and Solid with adjacency queries, manifold and closure checks
- Operations — extrude, revolve, loft (including ruled lofts for sloped bands), sweep, offset with self-intersection handling, trim, split, fillet
- Booleans — union, difference and intersection of solids, with the 2D boolean and polygon tooling used for plans
- Surface–surface intersection — including the analytic fast paths that keep curved openings interactive
- Tessellation — adaptive, curvature-based meshing with tolerance control, producing the meshes the GPU renders
- Fast & safe — pure Rust, runs natively and in the browser through WebAssembly
Architecture
┌─────────────────────────────────────────┐
│ Application │
└─────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ Operations Layer │
│ Extrude / Revolve / Loft / Boolean │
└─────────────────────────────────────────┘
│
┌───────────┴───────────┐
▼ ▼
┌───────────────────┐ ┌───────────────────┐
│ Topology Layer │ │ Geometry Layer │
│ Solid ─ Shell │──▶│ Surface (NURBS) │
│ ─ Face ─ Loop │ │ Curve (NURBS) │
│ ─ Edge │ │ Point │
└───────────────────┘ └───────────────────┘
Capabilities
Curves
| Area | Operations |
|---|
| Generation | control points, interpolation, arcs, circles, periodic curves |
| Evaluation | point, derivatives, tangent, curvature, torsion |
| Analysis | closest point, arc length, parameter at length, division by count/length |
| Editing | split, trim, reverse, join, offset, knot insertion, degree elevation |
| Pairs | intersection, fillet |
Surfaces
| Area | Operations |
|---|
| Generation | extrude, loft, ruled loft, revolve, sweep, sphere, cylinder, cone, torus |
| Evaluation | point, normal, partial derivatives, Gaussian / mean / principal curvature |
| Extraction | isocurves, boundary curves |
| Editing | trim with curves, split, reverse, transpose |
| Pairs | surface–surface and surface–curve intersection |
Topology and solids
| Area | Operations |
|---|
| Elements | Vertex, Edge, Loop, Face, Shell, Solid |
| Queries | adjacent faces / edges, manifold check, closure, Euler number |
| Booleans | union, difference, intersection |
| Tessellation | tolerance, adaptive subdivision, maximum divisions |