The Rasmah Handbook
Welcome to the Rasmah Handbook — a book-style guide to Rasmah, a differentiable, programmatic CAD and computational-geometry framework for Julia.
The Handbook is written like a book, not a reference list. Each chapter opens with the idea — explained in plain language, with the mathematics where it matters — and then documents the functions that put the idea into practice, with their algorithms, their arguments, and worked examples you can run.
The rendered 3D views throughout the Handbook are interactive, not static images: drag to rotate, scroll (or pinch) to zoom, and use the on-screen toolbar to pan, change the view, and inspect the model.
How the Handbook is organized
The chapters build on one another. Start at the top and read down.
| Chapter | What you will learn |
|---|---|
| Geometry & modeling | The central idea of Rasmah — a CAD model as a differentiable program — plus the three geometry backends (SDF, BRep, mesh). |
| Primitives, SDFs, and CSG | The basic solid shapes, how signed distance fields represent them exactly, and how to combine them with boolean operations and transforms. |
| Sketches, extrusion, and revolution | 2D sketches and the two operations that sweep them into 3D solids. |
| Modeling operations | Hollowing, offsetting, mirroring, patterns, lofting, sweeping, and edge treatments. |
| NURBS and the exact BRep | The exact boundary representation, topological naming, NURBS curves, and snapping. |
| Meshing | The two mesh types — surface and volume — and the canonical shape-to-mesh workflow. |
| Surface meshing | The triangle surface mesh — the exact icosphere, marching cubes, dual contouring, and the adaptive octree. |
| Volume meshing | The tetrahedral mesh that fills a solid's interior, plus the quality metrics that keep a solve healthy. |
| Mesh repair | Diagnosing and fixing the defects of a mesh imported from a scanner or file. |
| From points to mesh | Rebuilding a mesh from a point cloud — normals, reconstruction, and RANSAC primitive fitting. |
| The finite element method | From a differential equation to the linear system K u = f — the assemblers, solvers, and stress recovery. |
| Solving with physics | Running a simulation in one line by naming the physics, the material, and the boundary conditions. |
| Nonlinear solid mechanics | Finite-strain hyperelasticity and J2 plasticity — large deformation and permanent yielding. |
| Coupled multiphysics | Piezoelectricity, thermoelectricity, and poroelasticity — two fields driving each other. |
| Electrostatics & magnetostatics | The electric and magnetic scalar potentials — Laplace's equation solved for φ and ψ. |
| Electromagnetic waves | Full-wave vector Maxwell — cavity modes, the magnetic vector potential, and time-domain FETD. |
| Fluid flow | Creeping Stokes and inertial Navier–Stokes — the coupled velocity–pressure saddle problem. |
| Eigenproblems | Natural frequencies, buckling loads, and acoustic cavity modes — the eigenvalue problems of a structure. |
| Structural elements | The slender-member elements — trusses, beams, plates, and shells — that replace solid meshes with a few bars or a surface. |
| Materials & phase-field physics | Constitutive models and phase fields — plasticity, viscoelasticity, fracture, and phase separation. |
| Transport & coupled physics | Bioheat, electrolytes, MHD, waves, and the J-integral and topological-derivative analyses. |
| Topology optimization | The SIMP density method — carve a light structure out of a design space by scaling each element's stiffness. |
| Materials | What a body is made of — stiffness, density, conductivity, strength — and how to build solid, anisotropic, composite, and fluid materials. |
| Optimization | Gradient-based minimization — quasi-Newton descent and Brent's method for finding the best design. |
| Nonlinear solvers | Root finding with Newton's method and the family of nonlinear solvers behind solve_nonlinear. |
| Assembly & registration | Composing named parts into one model, and aligning shapes by registering their pose. |
| Sparse linear algebra | The sparse matrices, direct factorizations, iterative solvers, and multigrid preconditioners behind every solve. |
| Model reduction | Compressing fields with POD, reading dynamics with DMD, and fitting non-intrusive surrogates. |
| Neural networks | The native MLP core — layers, activations, initializers, and Adam training over a flat parameter vector. |
| Neural signed distance fields | Representing geometry as a network — SIREN activations, the eikonal regularizer, and fitting. |
| Physics-informed neural networks | Solving a PDE by training a network to satisfy its residual — mesh-free simulation. |
| Units | Physical dimensions on every quantity — SI inside, your units at the boundary. |
| Manufacturing | Turning a design into machine instructions — the tool path and cutter model at the heart of CAM. |
| Milling, turning, and cutting | Subtractive machining: pockets, profiling, surfacing, turning, and wire/beam cutting. |
| Additive manufacturing | 3D printing: slicing, perimeters, infill, and the extrusion-balanced G-code. |
| File I/O | Reading and writing the exchange formats — meshes, exact CAD, volumes, and point clouds, all round-tripped. |
| Exact CAD exchange | STEP and IGES — the formats that preserve exact topology, not just triangles. |
| Volumes and point clouds | Medical imaging (DICOM/NIfTI), scan data (XYZ/PCD), and time-series PVD. |
| The Rasmah GUI | The browser-based interface — the Geometry → FEA → TopOpt workspace pipeline and its script generation. |
Where the other resources live
The Tutorials walk through concrete, end-to-end examples (geometry, meshing, simulation, topology optimization). Each is a self-contained Quarto notebook.
Next steps
Start with Geometry & modeling.
