Getting Started / Welcome & Installation

Welcome to Plumb 3D Documentation

Plumb 3D is a deterministic, 100% pure safe Rust 3D DCC suite uniting parametric B-Rep CAD (sealed at v1.27.17 LTS) with Generation 2 Digital Sculpting (v2.33.0).

System Requirements

  • OS: Linux (x86_64), Windows, or macOS.
  • GPU: Vulkan, Metal, or DirectX 12 compatible graphics driver (for wgpu 22 viewport).
  • Toolchain: Rust 1.78+ stable (when building from source).

Installing from Source

git clone https://github.com/The-No-Hands-company/Plumb-3D.git
cd Plumb-3D
cargo test --workspace
cargo run -p app --release

Packaging a Release Bundle

Use scripts/package_release.sh to compile the release binary and bundle docs/, assets/, and README.md into dist/ with a SHA-256 checksum:

bash scripts/package_release.sh
Getting Started / Workspace Layout & Docking

Workspace Layout & Docking

Plumb 3D uses egui and egui_dock for a distraction-free, hardware-accelerated interface with zero panel overlap.

Plumb 3D Studio Viewport Layout

Core UI Regions

  • Top Menu & Workspace Switcher: File/Edit/Add/Render menus plus one-click templates (General, Hard-Surface, CAD Precision, Sculpting, UV & Retopo, LookDev).
  • Context Header Ribbon: Adapts automatically to the active mode — hiding CAD snapping controls in Sculpt Mode to keep the ribbon clean and scrollbar-free.
  • Scene Outliner: Hierarchical DAG tree, visibility toggles, and undo/redo action history.
  • Inspector: Transform coordinates, Modifier Stack, PBR Materials, CAD Design, and Analysis tools.
  • Drag-and-Drop Docking: Enable under Window → Drag-and-Drop Docking Workspace to dock 3D Viewport, Outliner, Inspector, Geometry Nodes, UV Editor, Timeline, and Rhai Console.
Getting Started / Viewport Navigation & Shortcuts

Viewport Navigation & Shortcuts

Consistent navigation across Object, Edit, Sculpt, Curve, and Sketch modes.

Camera Controls

  • Alt + LMB or MMB: Orbit camera around pivot.
  • Shift + MMB: Pan camera.
  • Scroll Wheel: Zoom in/out.
  • F: Frame selected object (or Home to frame all).
  • Numpad 1 / 3 / 7: Front, Right, Top orthographic views.
ZBrush-Style Sculpt Orbiting: In Sculpt Mode, clicking and dragging on empty canvas orbits the camera automatically without deselecting your clay mesh.

Global Studio Shortcuts

  • F1: User Manual · F2: Welcome Hub · F3 / Ctrl+K: Command Palette · F12: Path-Traced Render.
  • Tab: Toggle Object / Edit Mode · 1/2/3: Vertex / Edge / Face selection.
  • W/E/R: Move / Rotate / Scale gizmos · Z: Toggle wireframe overlay.
User Manual · Modeler & CAD / Half-Edge Modeling

Half-Edge Modeling & Interactive Modals

Direct polygonal modeling backed by a strict 2-manifold Half-Edge BMesh kernel.

Core Edit Operators

  • Extrude (E): Region or individual face extrusion constructing watertight sidewalls.
  • Direct Push-Pull (Shift+E): Click-drag face extrusion with automatic boolean union/subtraction.
  • Inset (I): Inward border framing on selected faces.
  • Bevel (Ctrl+B): Multi-segment chamfering and profile rounding on edges or vertices.
  • Loop Cut (Ctrl+R) & Knife (K): Edge ring slicing and point-to-point surface cuts.
  • 8-Directional Pie Menu (V): Gesture-driven radial tool selector at the cursor.

Selection Algorithms

Use Alt+L for Topological Edge Loops, L for Manifold Linked Shells, B for Marquee Box Select, Ctrl+I for Selection Inversion, and Shortest-Path Dijkstra selection.

User Manual · Modeler & CAD / Modifiers, Sketcher & NURBS

Modifier Stack, 2D Sketcher & Trimmed NURBS

Non-destructive parametric modeling fused seamlessly with exact analytic CAD surfaces.

3ds Max-Style Modifier Stack

Add, reorder, disable, or collapse modifiers non-destructively: Subdivide, CatmullClark, Bevel, Mirror, Weld, Boolean, Decimate, Displace, Taper, Morpher, WeightedNormal, and GeometryNodes.

2D Constraint Sketcher

Sketch Points, Lines, Circles, and Arcs on any 3D CAD Workplane (Alt+W), apply distance/angular constraints, solve deterministically, and extrude, revolve, loft, or sweep into watertight solids.

Trimmed NURBS & Class-A Diagnostics

Inspect Class-A continuity with Zebra reflection stripes, Gaussian/Mean curvature heatmaps, and porcupine curvature combs. Import/export via STEP/IGES interchange.

User Manual · Modeler & CAD / Engineering & Manufacturing

FEA, Sheet Metal, Mold Tooling & CAM

Industrial engineering pipelines built natively on top of Plumb 3D's BMesh and volumetric kernels.

  • FEA Structural Solver: 4-node tetrahedral (Tet4) linear elasticity, Cauchy stress recovery, Von Mises yield heatmaps, and Factor of Safety.
  • Sheet Metal: DIN 6935 K-factor bend deductions, base/edge flanges, bend reliefs, and CNC flat-pattern unfolding.
  • Injection Mold Tooling: Draft angle diagnostics, silhouette parting line extraction, and A/B core-cavity mold block splitting with polymer shrinkage factors (ABS, PP, PC, Nylon 66).
  • 3-Axis CAM & G-Code: 2.5D facing, adaptive clearing, 3D contouring, peck drilling, and RS-274 / Fanuc / Haas / GRBL post-processing.
  • 3D Printing Slicer: Watertightness audit, wall thickness checks, infill patterns, and G-code slicing.
User Manual · Modeler & CAD / UVs, Physics & Rendering

UV Unwrapping, Physics & Path Tracing

UV Unwrapping & ABF++ Distortion

Mark seams in the 2D UV Editor or by dihedral angle, run Conformal Tutte Disk / LSCM unwrap or Smart UV projection, pack islands with area weighting, and inspect stretch via the ABF++ heatmap.

Physics & Dynamics

  • XPBD Cloth: Stretch, shear, isometric bending, wind, and spatial-hash particle self-collision.
  • SPH Fluids & Voronoi Fracture: Smoothed-particle hydrodynamics and 3D polyhedral half-face solid destruction.

Monte Carlo Path Tracer (F12)

Multi-threaded SAH-BVH ray tracer featuring Principled BSDF, subsurface scattering, thin-lens bokeh DOF, physical sky/ESO 360 skybox, and high-to-low normal/AO/height map baking.

User Manual · The Sculptor / Workspace & Shelf UI

Sculptor Shelf, Dock & Quick Radial HUD

Switch to Sculpt Mode or the Sculpting workspace tab for a dedicated ZBrush / SculptForge digital clay environment.

Dedicated Sculptor Chrome

  • Left Shelf Tiles: 5 tactile preview tiles for Active Brush, Stroke Mode (Dots/DragRect/DragDot/Airbrush/Anchored), Alpha Texture, MatCap LookDev (Clay, Red Wax, Chrome, Normal, Studio), and Stencil Projection.
  • Bottom Brush Dock: Floating pill dock with all 14 primary brushes and hotkey badges.
  • Upper-Right Multi-Res HUD: Clickable Catmull-Clark level pips (1..5) with live vertex/quad counts.
  • Spacebar / RMB Quick Radial HUD: Press Space or Right-Click anywhere on the canvas to summon brushes, Radius/Strength sliders, Alpha stencils, and toggles for every specialized Sculpt HUD right under your cursor.
User Manual · The Sculptor / Brushes & Stroke Dynamics

30+ Brushes, LazyMouse & Symmetry

Primary Brush Hotkeys

  • D Draw · C Clay · B Clay Buildup · I Inflate · F Flatten
  • S Scrape · P Polish · G Grab · K Snake Hook · M Mask
  • [ / ] Brush Radius · - / = Brush Strength · X Toggle X Symmetry

LazyMouse Trailing Leash (Shift+L)

Enables spring-damped stroke stabilization. A glowing terracotta leash cord connects your cursor to the stabilized anchor bead, preventing jitter and accidental divots during crisp creasing.

Radial & Mirror Symmetry

Supports bilateral X/Y/Z mirroring plus rotational RadialSymmetry from 1 to 64 segments around arbitrary axes.

User Manual · The Sculptor / Multi-Res, DynTopo & OpenVDB

Multi-Res Pyramids, DynTopo & Voxel Remesh

Catmull-Clark Multi-Resolution

  • Ctrl+D: Subdivide to the next Catmull-Clark level (up to Level 5).
  • D / Shift+D: Step up to fine detail or down to coarse anatomical blocking non-destructively.

Corner-Table DynTopo & OpenVDB DynaMesh

Toggle DynTopo for localized adaptive edge splitting/collapsing inside the brush radius, or run OpenVDB Voxel Remesh / DynaMesh to fuse intersecting meshes into a single clean manifold surface.

User Manual · The Sculptor / Stencils, VDM & FaceSets

Screen-Space Stencils, 3D VDM & FaceSets

Screen-Space Stencil Projection (Shift+S)

Projects procedural alpha patterns (Leather, ChippedStone, Knurl, Pores, Noise, Scales) across the viewport with real-time Scale, Angle, and Opacity controls.

3D Vector Displacement (VDM)

Unlike scalar heightmaps, Mesh::apply_vdm_stamp displaces vertices in full tangent-space 3D (T, B, N), enabling overhangs, horns, and dragon scales.

FaceSets / Polygroups (Shift+F)

Paint a mask with M, press Ctrl+W to convert the masked region into a color-coded FaceSet, and use Alt+M to clear the mask.

User Manual · The Sculptor / Topology, Deformers & Diagnostics

Topology, Deformers & Diagnostics (v2.28–v2.33)

Access all specialized tool HUDs directly from the Spacebar Quick Radial HUD.

  • Slice / Array / Ridge Sharpen (v2.29.0): Slice along X=0 or Y=0 into polygroups without discarding halves; build Linear/Radial/Grid ArrayMeshes; auto-crease dihedral edges and sharpen ridges.
  • Solidify / Deform / Shrinkwrap (v2.30.0): Thicken open shells into watertight solids with rim quads; apply Twist/Bend/Taper/Spherize; shrinkwrap onto target meshes.
  • Panel Loops / Curvature Paint / Mirror & Weld (v2.31.0): Extrude beveled sci-fi panel loops from polygroups; bake Cavity/Base/Ridge polypaint; bisect-mirror-weld symmetry seams.
  • Poke / Mask Filter / Wall Thickness (v2.32.0): Star-split faces with spike offset; Blur/Sharpen/Grow/Shrink sculpt masks; raycast inward wall thickness and bake Red/Yellow/Green heatmaps.
  • UV Relax / Attribute Transfer / Flat Subdivide (v2.33.0): Pin-border UV relaxation; transfer polypaint and masks across retopology; subdivide hard-surface meshes without smoothing silhouettes.
User Tutorials / Tutorial 1

Tutorial 1: Sci-Fi Cargo Crate (Box Modeling)

Learn classical box modeling in 10 minutes using Inset (I), Extrude (E), and Bevel (Ctrl+B).

  1. Start in General 3D with the default 2m cube and press Tab to enter Edit Mode.
  2. Press 3 for Face Mode, select the top face, press I to Inset by 0.15m.
  3. Press E and drag downward -0.12m to recess the top panel. Repeat on the 4 side faces.
  4. Switch to Inspector → Modifiers and add a Bevel Modifier (Width 0.03m, Segments 2) to catch studio highlights.
  5. Assign a metallic PBR material and press F12 to path-trace your crate.
User Tutorials / Tutorial 2

Tutorial 2: Medieval Citadel Masterclass

Build a multi-tower fortress with battered talus bases, battlements, PBR stone/brass shaders, and night-sky path tracing.

Medieval Citadel Path-Traced Render
  1. Switch to the Hard-Surface workspace and delete the default cube.
  2. Donjon Keep: Add a Cylinder (R=3.2m, H=2.0m, 24 segs) at Y=1.0m for the talus plinth, then stack the main tower (R=2.6m, H=7.5m) at Y=5.75m with a Bevel modifier.
  3. Battlements: Inset the tower roof, extrude the parapet wall, and use ArrayMesh (Radial mode) to place crenelated merlons around the rim.
  4. Curtain Walls & Bastions: Place rampart boxes and corner cylinders, then add warm point lights inside the gatehouse windows.
  5. Render: Enable the 360 skybox and press F12 for progressive Monte Carlo path tracing.
User Tutorials / Tutorial 3

Tutorial 3: Organic Sculpting & Multi-Res Bust

Block out anatomy on a pinch-free Quad-Sphere, subdivide with Catmull-Clark, and stamp pores using Screen-Space Stencils.

  1. Switch to the Sculpting workspace tab and spawn a Clay Sphere (6,144 uniform quads, zero polar pinching).
  2. Use Grab (G) and Snake Hook (K) with X symmetry (X) to pull out the jaw, brow ridge, and neck.
  3. Press Ctrl+D twice to reach Multi-Res Level 3, then block muscle forms with Clay Buildup (B) and smooth with Smooth.
  4. Press Shift+L to enable the LazyMouse leash and carve crisp eyelids and lips with Crease.
  5. Press Shift+S for Stencil Projection, select Pores or Leather, and stroke fine skin micro-detail.
User Tutorials / Tutorial 4

Tutorial 4: Hard-Surface Armor (Panel Loops & Solidify)

Turn sculpted masks into crisp, 3D-printable armored plates.

  1. On a sculpted torso mesh, press M and paint a chestplate mask.
  2. Press Space → open Poke/Mask and click Blur / Sharpen for clean plate borders.
  3. Press Ctrl+W to convert the mask into a new FaceSet polygroup.
  4. Open Panels/Paint and click Extrude Panel Loops to bevel and raise armored seams, or use Solidify Shell to give extracted plates watertight 3D-printable thickness, then verify with Wall Thickness.
User Tutorials / Tutorial 5

Tutorial 5: Parametric Sketch to CAM G-Code

Design a precision bracket with 2D constraints, run FEA stress validation, and export CNC toolpaths.

  1. Switch to CAD Precision, create a 2D Sketch on the XY workplane, and constrain an L-bracket profile with exact millimeter dimensions.
  2. Extrude the sketch into a solid, add mounting holes, and apply a rolling-ball fillet.
  3. Open Inspector → Analyze & Make and run the Tet4 FEA Solver to inspect Von Mises stress.
  4. Switch to the CAM tab, select a flat endmill, generate 2.5D facing + contour toolpaths, and export RS-274 / GRBL G-code.
Developer Docs / System Architecture

7-Crate Architecture & Zero-Unsafe Policy

Why Plumb 3D is split into 7 strictly decoupled Cargo crates with zero foreign C/C++ FFI and zero unsafe blocks.

Dependency Graph

app (winit, egui, egui_dock, modals, commands, Rhai)
 ├── render-viewport (wgpu 22 forward rasterizer, MatCaps, Gaussian splats, meshlets)
 ├── render-pathtracer (Rayon SAH-BVH Monte Carlo, Principled BSDF, baker)
 ├── geo-nodes (visual geometry node graph, topological sort)
 └── graph-engine (Maya DAG, constraints, 2-bone/CCD IK, undo/redo)
      └── geo-kernel (BMesh, Corner-Table, OpenVDB, SDF, NURBS, FEA, CAM, Sculpt)
           └── core-math (glam Vec2/Vec3/Quat/Mat4, Ray, Aabb, Transform)

Why This Separation Matters

  • Headless Testability: geo-kernel and render-pathtracer have zero windowing or GPU dependencies — 600+ geometry tests run in seconds in CI without a display server.
  • Memory Safety Without C/C++ ABI Risk: Unlike Blender or ZBrush plugins, no C++ pointers or raw FFI can cause use-after-free crashes. All mesh arenas use generational SlotMap keys.
Developer Docs / Why 7 Geometric Kernels?

Why Plumb 3D Has 7 Geometric Kernels

No single mesh data structure excels at every 3D task. Plumb 3D implements 7 specialized representations and a Universal Bridge to convert between them.

KernelStrengthPrimary Use
BMesh Half-EdgeFast topological queries & Euler opsEdit Mode, Extrude, Bevel, Multi-Res, Sculpting
Corner-TableFlat pointerless V/O arrays10M+ triangle DynTopo sculpting with minimal RAM
Weiler Radial-EdgeArbitrary N ≥ 0 faces per edgeNon-manifold junctions, wireframes, shell unzipping
Baumgart Winged-EdgeEdge-centric CW/CCW traversalClassic CAD topology interchange
Volumetric Half-Face3D polyhedral cell complexes3D Voronoi solid fracture & Tet4 FEA
OpenVDB / NanoVDBSparse 8×8×8 narrow-band bricksFailure-proof CSG booleans, DynaMesh, GPU raymarch
Nanite Meshlet DAG64v/128t clusters + error cutsContinuous screen-space LOD (>85% tri reduction)
Developer Docs / BMesh Half-Edge Internals

BMesh Half-Edge Internals (geo-kernel::mesh)

Understanding SlotMap keys, twin half-edges, and boundary invariants in crates/geo-kernel/src/mesh/.

Core Data Model

pub struct Mesh {
    pub vertices: SlotMap<VertexKey, Vertex>,
    pub edges: SlotMap<EdgeKey, Edge>,
    pub half_edges: SlotMap<HalfEdgeKey, HalfEdge>,
    pub faces: SlotMap<FaceKey, Face>,
}

Key Implementation Rules (Lessons from the Kernel)

  • Always call delete_face(fk) before replacing faces: Removing only from self.faces leaves stale half-edges in self.half_edges, causing subsequent add_face calls on those edges to fail with NonManifoldEdge.
  • Boundary Half-Edge Winding: When add_face creates a new edge A → B, it inserts a twin half-edge B → A with face: None and next: HalfEdgeKey::default(). Any tool stitching rim quads onto open boundaries (like solidify_shell) must traverse (he.origin, he.target) of the face: None half-edge so adjacent faces run in opposite directions.
  • Euler Invariant: Closed 2-manifold meshes satisfy V - E + F = 2(1 - g).
Developer Docs / Rendering Pipelines

wgpu 22 Viewport & SAH-BVH Path Tracer

Real-Time Viewport (render-viewport)

Built on wgpu 22 with WGSL shaders for infinite adaptive grids, MatCap Clay/Red Wax/Chrome shaders, RTAO contact shadows, NPR cel/halftone outlines, EWA-projected 3D Gaussian Splats, and GPU-driven Meshlet culling.

Monte Carlo Path Tracer (render-pathtracer)

Uses a Surface Area Heuristic (SAH) BVH built in parallel with rayon, importance-sampled Principled BSDF, subsurface scattering random walks, thin-lens camera DOF, and edge-preserving denoising.

Developer Docs / Engineering Rules & Contributing

Engineering Rules & Contributing

  • Zero unsafe: Every crate must remain 100% safe Rust.
  • Strict File Size Ceiling ($\le 630$ lines): Every new or modified .rs file must stay at or below 630 lines; decompose large features into focused submodules.
  • Zero Warnings: Run cargo clippy --workspace -- -D warnings and cargo test --workspace before every commit.
  • 7-Bit ASCII in UI: Keep UI labels clean and compatible across all system fonts.
Plumb 3D Library & API / geo-kernel Module Atlas

Complete geo-kernel Module Library

Searchable reference of the core geometry, sculpting, CAD, and simulation modules inside crates/geo-kernel/src/.

ModuleKey Types / MethodsDomain
mesh/Mesh, add_face, delete_face, update_normalsBMesh Core
sculpt.rsSculptBrush, LazyMouse, apply_sculpt_brushSculpting
sculpt_dyntopo.rsDyntopoSettings, apply_dyntopo_sculptDynamic Topology
multires.rsCatmullClarkModifier, bake_vdmMulti-Res
stroke.rsStrokeMode, RadialSymmetry, VdmStamp, apply_vdm_stampStroke & VDM
face_sets.rsFaceSetRegistry, isolate_set, allows_strokePolygroups
dynamesher.rsDynaMeshSettings, SDF remeshingVolumetric Remesh
voxel_remesh.rsVoxel remesh & triangle projectionVolumetric Remesh
zremesh_guides.rsGuideNetwork, GuideStrokeAuto-Retopology
quadriflow.rsQuad-dominant retopologyAuto-Retopology
mesh_bisect.rsBisectSettings, bisect_planeTopology (v2.28)
smoothing_groups.rsSmoothingGroups, sharp edge taggingNormals (v2.28)
proximity_weld.rsProximityWeldSettings, spatial vertex weldCleanup (v2.28)
mesh_slice.rsSliceSettings, slice_plane, split_into_halvesTopology (v2.29)
array_mesh.rsArrayMeshMode, build_array_meshInstancing (v2.29)
ridge_sharpen.rsRidgeSharpenSettings, sharpen_ridges_and_auto_creaseSculpting (v2.29)
mesh_solidify.rsSolidifySettings, solidify_shellSurfacing (v2.30)
nonlinear_deform.rsNonlinearDeformKind (Twist/Bend/Taper/Spherize)Deformers (v2.30)
mesh_shrinkwrap.rsShrinkwrapSettings, shrinkwrap_to_targetConform (v2.30)
panel_loops.rsPanelLoopSettings, apply_panel_loopsHard-Surface (v2.31)
polypaint_generators.rsPolypaintCurvatureSettings, bake_polypaint_from_curvaturePolypaint (v2.31)
mirror_weld.rsMirrorWeldSettings, mirror_and_weldSymmetry (v2.31)
mesh_poke.rsPokeSettings, poke_facesTopology (v2.32)
mask_blur_sharpen.rsMaskFilterOp, filter_sculpt_maskMasking (v2.32)
wall_thickness.rsWallThicknessSettings, analyze_wall_thickness3D Print Check (v2.32)
uv_smooth.rsUvSmoothSettings, smooth_uv_coordinatesUVs (v2.33)
attribute_transfer.rsAttributeTransferSettings, transfer_attributes_fromTransfer (v2.33)
edge_subdivide.rsFlatSubdivideResult, flat_subdivide_onceSubdivide (v2.33)
openvdb/VdbGrid, NanoGridBuffer, Level Set CSGVolumetrics
sdf/SdfNode, DualContouringExtractor, QEF solverImplicit SDF
xpbd_cloth.rsXpbdClothSimulator, self-collisionPhysics
fea/ & cam/ & sheet_metal/Tet4 FEA, 3-axis G-code CAM, K-factor unfoldEngineering
Plumb 3D Library & API / Rhai Scripting API

Rhai Embedded Scripting API

Safe, sandboxed automation with infinite-loop instruction caps and direct access to Vec3, Primitives, and SceneGraph.

Vector Math & Primitives

// Create a procedural tower in Rhai
let p = vec3(0.0, 2.5, 0.0);
let dir = normalize(vec3(1.0, 1.0, 0.0));
let cube = Primitives::create_cube(2.0);
let cyl = Primitives::create_cylinder(1.2, 5.0, 24);
let torus = Primitives::create_torus(2.0, 0.4, 32, 16);

Safety Guarantees

  • Zero C FFI: Pure Rust execution inside the app process.
  • Instruction Budget: Infinite loops terminate cleanly without hanging the viewport.