▼V Reference
52 Find a task or a name
53 Modules to require
54 Scenes and sampling
55 Scene states
56 Animation requests
57 Native model details
58 Visuals
59 Geometry
60 Number Lines and Coordinate Decorations
61 Point Markers, Scatter Plots, and Filled Areas
62 Probability and Statistical Diagrams
63 Calculus lessons
64 Colors
65 Slides
66 Slide command-line tools
67 Source Programs and Authored Timelines
68 Interactive Preview and Inspection
69 Preview controls and diagnostics
70 Projects and Final Rendering
71 Project execution and cache details
72 Pict Renderer Protocol
73 3D reference map
74 3D:   Objects, groups, and paths
75 3D:   Cameras and projection
76 3D:   Views inside a Scene
77 3D:   Animating 3D objects
78 3D:   Animating the 3D camera
79 3D:   Cuts, caps, and section measurements
80 3D:   Supplementary surface, section, and annotation bindings
81 3D:   Cuts, sections, and numerical volume
82 3D:   Vectors
83 3D:   Linear maps and rotations
84 3D:   Affine transforms
85 3D:   Bounds, rays, and planes
86 3D:   Spatial maps and homotopies
87 3D:   Materials and lights
88 3D:   Lighting inspection
89 3D:   Shadow descriptors and stable bounds
90 3D:   Finite-light animation
91 3D:   Software finite-light evaluation
92 3D:   Colour space and final output
93 3D:   Relations and geometric annotations
94 3D:   Projected labels
95 3D:   Textured billboards
96 3D:   Spatial curves and vector diagrams
97 3D:   Spatial anchors and label layout
98 3D:   Anchors and projected labels
99 3D:   Parametric surfaces and calculus
100 3D:   Adaptive, trimmed, and implicit surfaces
101 3D:   Constructive solids
102 3D:   Surface constructors and queries
103 3D:   Meshes
104 3D:   Triangle topology
105 3D:   Polygonal faces
106 3D:   Deterministic convex hulls
107 3D:   Polyhedral duals
108 3D:   Schlegel diagrams and polyhedral nets
109 3D:   Conservative mesh correspondence
110 3D:   Topology-safe mesh matching
111 3D:   Checking and repairing mesh orientation
112 3D:   Clipping, sections, and transparency
113 3D:   Prepared spatial ODE trajectories and vector fields
114 3D:   Seeds and streamline sets
115 3D:   Poincare sections and return maps
116 3D:   Equilibria and local linearization
117 3D:   Flow maps and volume change
118 3D:   Drawing and inspecting trajectories
119 3D:   Reading prepared trajectories
120 3D:   Drawing vector fields and particles
121 3D:   Trajectory display
122 3D:   Spatial inspection and exact picking
123 3D:   Retained renderer backends
124 3D:   Compiled geometry and instances
125 3D:   Frame requests and results
126 3D:   Software rendering and statistics
127 3D:   Optional Racket/  Open  GL backend
128 Experimental Derived Visuals
129 Source Package Hygiene
On this page:
cut-mesh-by-box3d
mesh3d-weld
riemann-volume3d
washer-sum3d
shell-sum3d
9.3

79 3D: Cuts, caps, and section measurements🔗ℹ

3D reference map · First 3D picture

A plane section includes an explicit local numerical policy, plane basis, and component records. cut-mesh3d returns both clipped halves plus their shared section3d, optional separate cap meshes, and when capped, exact-coordinate welded solid halves through mesh-cut3d-result-positive-solid and mesh-cut3d-result-negative-solid. It does not mutate the source mesh. section3d-area, section3d-centroid, and section3d-perimeter operate on the same preserved section topology. Measurements reject an open/branch component, repeated vertex, zero-area loop, self-intersection, and a touching or intersecting pair of loops rather than silently treating it as an even/odd region. clip-planes3d and clip-box3d build ordered render-only half-space sequences.

section-fill3d exposes a separate cap-style mesh for a section; section-hatch3d creates deterministic even/odd stroke intervals in the plane-local basis, including empty intervals for nested holes. slice-stack3d retains stable section-group paths as planes advance along a normal. prepare-cross-section-function3d makes an immutable table of sections, areas, centroids, and diagnostics, which volume-by-slices3d evaluates with a declared midpoint, trapezoid, or Simpson rule. The sampling convention is part of the table and is checked by the chosen numerical rule. riemann-volume3d provides a separate midpoint-column construction for graph-volume explanations; each row and cell is an ordinary stable spatial child. washer-sum3d creates stable midpoint annular slabs about the x axis, and shell-sum3d creates stable midpoint cylindrical shells about the z axis. These are explanatory geometry groups; numerical volume estimation remains explicit.

The cap triangulator handles simple concave loops and a deterministic containment forest of nested holes. It bridges each immediate hole into its outer loop with a visible, source-order tie-broken bridge, then verifies that the cap triangle area equals outer area minus holes. mesh3d-weld performs exact-coordinate (never tolerance-based) boundary reuse for derived cut solids; it intentionally omits per-vertex normals because the current mesh representation has no per-corner normal channel.

Current limitations: cuts presently preserve positions, normals, and RGBA colours, but do not yet offer general UV/scalar/semantic attribute descriptors; cap construction for self-intersecting or touching contours does not yet have robust recovery (measurements reject those contours); and repeated semantic multi-plane cutting currently produces uncapped geometry.

procedure

(cut-mesh-by-box3d mesh    
  bounds    
  #:id id    
  #:settings settings) → mesh3d?
  mesh : mesh3d?
  bounds : aabb3?
  id : symbol?
  settings : section3d-settings?
Materializes the six inclusive local-axis box half-spaces as ordered indexed geometry. This is the geometry counterpart to clip-box3d, which remains render-only. The result is deliberately uncapped; it does not claim to be a closed box-cut solid.

procedure

(mesh3d-weld meshes    
  #:id id    
  #:material material) → mesh3d?
  meshes : (listof mesh3d?)
  id : symbol?
  material : material3d?
Combines meshes that share exact local boundary vertices into one indexed mesh. It rejects mismatched transforms, opacity, or a missing colour at a newly introduced vertex; it never performs tolerance-based welding. Multi-plane render clipping is semantic and ordered, but the optional OpenGL backend does not provide the corresponding multi-plane uniform path. See "examples/3d/capped-cube-cutaway.rkt".

procedure

(riemann-volume3d function    
  [#:x-range x-range    
  #:y-range y-range    
  #:resolution resolution    
  #:base base]    
  #:id id) → group3d?
  function : procedure?
  x-range : list? = (list -1 1)
  y-range : list? = (list -1 1)
  resolution : list? = (list 8 8)
  base : finite-real? = 0
  id : symbol?
Builds midpoint columns between base and (function x y). Children have stable 'row-n then 'cell-n identifiers. A zero-height sample is a stable empty cell group, not an invented nonzero solid.

procedure

(washer-sum3d outer    
  inner    
  [#:x-range x-range    
  #:count count]    
  #:id id) → group3d?
  outer : procedure?
  inner : procedure?
  x-range : list? = (list -1 1)
  count : exact-positive-integer? = 8
  id : symbol?
Builds midpoint annular washer slabs about the x axis. outer and inner must return nonnegative radii with inner no larger than outer. Children are stably named 'washer-n.

procedure

(shell-sum3d height    
  [#:radius-range radius-range    
  #:count count    
  #:base base]    
  #:id id) → group3d?
  height : procedure?
  radius-range : list? = (list 0 1)
  count : exact-positive-integer? = 8
  base : finite-real? = 0
  id : symbol?
Builds midpoint annular cylindrical shells about the z axis between base and (height radius). Children are stably named 'shell-n.