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.
The chapters follow the questions an engineer asks, in the order they ask them: design the shape, mesh it, simulate and check it, make it lighter, and make it real. The later chapters are the toolkits that power all of the above.
| Chapter | What you will learn |
|---|
| Geometry & modeling | The central idea of Rasmah — a CAD model as a differentiable program — plus the three views of a shape (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. |
| Assembly & registration | Composing named parts into one model, and aligning shapes by registering their pose. |
| Chapter | What you will learn |
|---|
| 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. |
| Chapter | What you will learn |
|---|
| The finite element method | From a differential equation to the linear system K u = f — the assemblers, solvers, stress recovery, and the design checks (factor of safety, deflection limits, force balance). |
| Solving with physics | Running a simulation in one line by naming the physics, the material, and the boundary conditions. |
| Coupled multiphysics | Piezoelectricity, thermoelectricity, and poroelasticity — two fields driving each other. |
| Nonlinear solid mechanics | Finite-strain hyperelasticity and J2 plasticity — large deformation and permanent yielding. |
| 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. |
| Fluid flow | Creeping Stokes and inertial Navier–Stokes — the coupled velocity–pressure saddle problem. |
| 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. |
| 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. |
| Materials | What a body is made of — stiffness, density, conductivity, strength — and how to build solid, anisotropic, composite, and fluid materials. |
| Units | Physical dimensions on every quantity — SI inside, your units at the boundary. |
| Chapter | What you will learn |
|---|
| Topology optimization | The SIMP density method — carve a light structure out of a design space by scaling each element's stiffness. |
| Chapter | What you will learn |
|---|
| Optimization | Gradient-based minimization — quasi-Newton descent and Brent's method for finding the best design. |
| Chapter | What you will learn |
|---|
| Nonlinear solvers | Root finding with Newton's method and the family of nonlinear solvers behind solve_nonlinear. |
| Sparse linear algebra | The sparse matrices, direct factorizations, iterative solvers, and multigrid preconditioners behind every solve. |
| Chapter | What you will learn |
|---|
| 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. |
| Chapter | What you will learn |
|---|
| 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. |
| Chapter | What you will learn |
|---|
| 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. |
| Chapter | What you will learn |
|---|
| The Rasmah GUI | The browser-based interface — the Geometry → FEA → TopOpt workspace pipeline and its script generation. |
The Tutorials walk through concrete, end-to-end examples (geometry, meshing, simulation, topology optimization). Each is a self-contained Quarto notebook.
Start with Geometry & modeling.