WORK
Last updated on

CAD Kernel

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

AreaOperations
Generationcontrol points, interpolation, arcs, circles, periodic curves
Evaluationpoint, derivatives, tangent, curvature, torsion
Analysisclosest point, arc length, parameter at length, division by count/length
Editingsplit, trim, reverse, join, offset, knot insertion, degree elevation
Pairsintersection, fillet

Surfaces

AreaOperations
Generationextrude, loft, ruled loft, revolve, sweep, sphere, cylinder, cone, torus
Evaluationpoint, normal, partial derivatives, Gaussian / mean / principal curvature
Extractionisocurves, boundary curves
Editingtrim with curves, split, reverse, transpose
Pairssurface–surface and surface–curve intersection

Topology and solids

AreaOperations
ElementsVertex, Edge, Loop, Face, Shell, Solid
Queriesadjacent faces / edges, manifold check, closure, Euler number
Booleansunion, difference, intersection
Tessellationtolerance, adaptive subdivision, maximum divisions