RasmahRasmah

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.

ChapterWhat you will learn
Geometry & modelingThe central idea of Rasmah — a CAD model as a differentiable program — plus the three geometry backends (SDF, BRep, mesh).
Primitives, SDFs, and CSGThe basic solid shapes, how signed distance fields represent them exactly, and how to combine them with boolean operations and transforms.
Sketches, extrusion, and revolution2D sketches and the two operations that sweep them into 3D solids.
Modeling operationsHollowing, offsetting, mirroring, patterns, lofting, sweeping, and edge treatments.
NURBS and the exact BRepThe exact boundary representation, topological naming, NURBS curves, and snapping.
MeshingThe two mesh types — surface and volume — and the canonical shape-to-mesh workflow.
Surface meshingThe triangle surface mesh — the exact icosphere, marching cubes, dual contouring, and the adaptive octree.
Volume meshingThe tetrahedral mesh that fills a solid's interior, plus the quality metrics that keep a solve healthy.
Mesh repairDiagnosing and fixing the defects of a mesh imported from a scanner or file.
From points to meshRebuilding a mesh from a point cloud — normals, reconstruction, and RANSAC primitive fitting.
The finite element methodFrom a differential equation to the linear system K u = f — the assemblers, solvers, and stress recovery.
Solving with physicsRunning a simulation in one line by naming the physics, the material, and the boundary conditions.
Nonlinear solid mechanicsFinite-strain hyperelasticity and J2 plasticity — large deformation and permanent yielding.
Coupled multiphysicsPiezoelectricity, thermoelectricity, and poroelasticity — two fields driving each other.
Electrostatics & magnetostaticsThe electric and magnetic scalar potentials — Laplace's equation solved for φ and ψ.
Electromagnetic wavesFull-wave vector Maxwell — cavity modes, the magnetic vector potential, and time-domain FETD.
Fluid flowCreeping Stokes and inertial Navier–Stokes — the coupled velocity–pressure saddle problem.
EigenproblemsNatural frequencies, buckling loads, and acoustic cavity modes — the eigenvalue problems of a structure.
Structural elementsThe slender-member elements — trusses, beams, plates, and shells — that replace solid meshes with a few bars or a surface.
Materials & phase-field physicsConstitutive models and phase fields — plasticity, viscoelasticity, fracture, and phase separation.
Transport & coupled physicsBioheat, electrolytes, MHD, waves, and the J-integral and topological-derivative analyses.
Topology optimizationThe SIMP density method — carve a light structure out of a design space by scaling each element's stiffness.
MaterialsWhat a body is made of — stiffness, density, conductivity, strength — and how to build solid, anisotropic, composite, and fluid materials.
OptimizationGradient-based minimization — quasi-Newton descent and Brent's method for finding the best design.
Nonlinear solversRoot finding with Newton's method and the family of nonlinear solvers behind solve_nonlinear.
Assembly & registrationComposing named parts into one model, and aligning shapes by registering their pose.
Sparse linear algebraThe sparse matrices, direct factorizations, iterative solvers, and multigrid preconditioners behind every solve.
Model reductionCompressing fields with POD, reading dynamics with DMD, and fitting non-intrusive surrogates.
Neural networksThe native MLP core — layers, activations, initializers, and Adam training over a flat parameter vector.
Neural signed distance fieldsRepresenting geometry as a network — SIREN activations, the eikonal regularizer, and fitting.
Physics-informed neural networksSolving a PDE by training a network to satisfy its residual — mesh-free simulation.
UnitsPhysical dimensions on every quantity — SI inside, your units at the boundary.
ManufacturingTurning a design into machine instructions — the tool path and cutter model at the heart of CAM.
Milling, turning, and cuttingSubtractive machining: pockets, profiling, surfacing, turning, and wire/beam cutting.
Additive manufacturing3D printing: slicing, perimeters, infill, and the extrusion-balanced G-code.
File I/OReading and writing the exchange formats — meshes, exact CAD, volumes, and point clouds, all round-tripped.
Exact CAD exchangeSTEP and IGES — the formats that preserve exact topology, not just triangles.
Volumes and point cloudsMedical imaging (DICOM/NIfTI), scan data (XYZ/PCD), and time-series PVD.
The Rasmah GUIThe 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.