▼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:
mesh-vertex-topology3d
mesh-halfedge3d
mesh-edge-topology3d
mesh-triangle-topology3d
mesh-boundary-component3d
mesh-component-topology3d
mesh-topology3d
mesh3d-topology
mesh-topology3d-vertex-neighbours
mesh-topology3d-incident-edges
mesh-topology3d-incident-faces
mesh-topology3d-face-neighbours
mesh-topology3d-boundary-components
mesh-topology3d-connected-components
mesh-topology3d-manifold?
mesh-topology3d-closed?
mesh-topology3d-orientable?
mesh3d-component-invariants3d
mesh3d-genus-report
mesh3d-euler-characteristic
mesh3d-boundary-count
mesh3d-component-invariants
mesh3d-genus
9.3

104 3D: Triangle topology🔗ℹ

3D reference map · First 3D picture

struct

(struct mesh-vertex-topology3d (index
    id
    outgoing-halfedges
    boundary?
    component)
    #:transparent)
  index : exact-nonnegative-integer?
  id : (or/c symbol? exact-nonnegative-integer?)
  outgoing-halfedges : vector?
  boundary? : boolean?
  component : (or/c #f exact-nonnegative-integer?)
A source vertex and its deterministic outgoing half-edge indexes.

struct

(struct mesh-halfedge3d (index
    from
    to
    triangle
    next
    previous
    opposite
    edge)
    #:transparent)
  index : exact-nonnegative-integer?
  from : exact-nonnegative-integer?
  to : exact-nonnegative-integer?
  triangle : exact-nonnegative-integer?
  next : exact-nonnegative-integer?
  previous : exact-nonnegative-integer?
  opposite : any/c
  edge : exact-nonnegative-integer?
One directed triangle side. opposite is #f at a boundary, one index for a two-incidence edge, or an immutable vector of all other incident half-edges at a nonmanifold edge.

struct

(struct mesh-edge-topology3d (index
    id
    vertices
    halfedges
    boundary?
    nonmanifold?)
    #:transparent)
  index : exact-nonnegative-integer?
  id : (or/c symbol? exact-nonnegative-integer?)
  vertices : vector?
  halfedges : vector?
  boundary? : boolean?
  nonmanifold? : boolean?
One undirected triangle edge in first-incidence order.

struct

(struct mesh-triangle-topology3d (index
    id
    vertices
    halfedges
    component)
    #:transparent)
  index : exact-nonnegative-integer?
  id : (or/c symbol? exact-nonnegative-integer?)
  vertices : vector?
  halfedges : vector?
  component : exact-nonnegative-integer?
One declared triangle face and its three half-edges.

struct

(struct mesh-boundary-component3d (index
    edges
    vertices
    halfedges
    component
    closed?)
    #:transparent)
  index : exact-nonnegative-integer?
  edges : vector?
  vertices : vector?
  halfedges : vector?
  component : (or/c #f exact-nonnegative-integer?)
  closed? : boolean?
A connected boundary-edge graph. closed? reports whether it is a genuine degree-two boundary loop.

struct

(struct mesh-component-topology3d (index
    triangles
    vertices
    edges
    boundary-components
    manifold?
    orientable?)
    #:transparent)
  index : exact-nonnegative-integer?
  triangles : vector?
  vertices : vector?
  edges : vector?
  boundary-components : vector?
  manifold? : boolean?
  orientable? : boolean?
One edge-connected face component; isolated source vertices become explicit zero-face components.

struct

(struct mesh-topology3d (vertices
    halfedges
    edges
    triangles
    components
    boundaries
    diagnostics)
    #:transparent)
  vertices : vector?
  halfedges : vector?
  edges : vector?
  triangles : vector?
  components : vector?
  boundaries : vector?
  diagnostics : hash?
An immutable triangle-topology complex. Its structural skeleton is cached by geometry-key3d; semantic IDs are attached per queried mesh, so equally shaped meshes still keep their own author-visible names.

procedure

(mesh3d-topology mesh) → mesh-topology3d?

  mesh : mesh3d?
Builds the stable half-edge complex. It never welds, repairs, or changes mesh geometry.

procedure

(mesh-topology3d-vertex-neighbours topology    
  vertex-index) → vector?
  topology : mesh-topology3d?
  vertex-index : exact-nonnegative-integer?
Returns adjacent source vertices in first-edge encounter order.

procedure

(mesh-topology3d-incident-edges topology    
  vertex-index) → vector?
  topology : mesh-topology3d?
  vertex-index : exact-nonnegative-integer?
Returns incident topological-edge indexes.

procedure

(mesh-topology3d-incident-faces topology    
  vertex-index) → vector?
  topology : mesh-topology3d?
  vertex-index : exact-nonnegative-integer?
Returns incident triangle indexes.

procedure

(mesh-topology3d-face-neighbours topology    
  face-index) → vector?
  topology : mesh-topology3d?
  face-index : exact-nonnegative-integer?
Returns adjacent triangle indexes in local-half-edge order.

procedure

(mesh-topology3d-boundary-components topology) → vector?

  topology : mesh-topology3d?
Returns the deterministic boundary-component records.

procedure

(mesh-topology3d-connected-components topology) → vector?

  topology : mesh-topology3d?
Returns edge-connected face components plus any isolated vertices.

procedure

(mesh-topology3d-manifold? topology) → boolean?

  topology : mesh-topology3d?
Checks edge and vertex-fan manifoldness without repairing an invalid mesh.

procedure

(mesh-topology3d-closed? topology) → boolean?

  topology : mesh-topology3d?
Checks for a nonempty manifold topology without boundaries.

procedure

(mesh-topology3d-orientable? topology) → boolean?

  topology : mesh-topology3d?
Reports whether the retained local winding relations have a consistent global parity.

struct

(struct mesh3d-component-invariants3d (component
    vertex-count
    edge-count
    face-count
    euler-characteristic
    boundary-count
    manifold?
    orientable?
    genus
    reason)
    #:transparent)
  component : exact-nonnegative-integer?
  vertex-count : exact-nonnegative-integer?
  edge-count : exact-nonnegative-integer?
  face-count : exact-nonnegative-integer?
  euler-characteristic : exact-integer?
  boundary-count : exact-nonnegative-integer?
  manifold? : boolean?
  orientable? : boolean?
  genus : (or/c #f exact-nonnegative-integer?)
  reason : any/c
Per-component combinatorial invariants. genus is absent and reason explains why when a genus claim would be false.

struct

(struct mesh3d-genus-report (components valid? reason)
    #:transparent)
  components : vector?
  valid? : boolean?
  reason : any/c
The genus result for every component, without silently guessing values for nonmanifold, nonorientable, or zero-face inputs.

procedure

(mesh3d-euler-characteristic mesh-or-topology) → exact-integer?

  mesh-or-topology : (or/c mesh3d? mesh-topology3d?)
Returns V − E + F for the retained complex.

procedure

(mesh3d-boundary-count mesh-or-topology)

 → exact-nonnegative-integer?
  mesh-or-topology : (or/c mesh3d? mesh-topology3d?)
Returns the number of connected boundary graphs.

procedure

(mesh3d-component-invariants mesh-or-topology) → vector?

  mesh-or-topology : (or/c mesh3d? mesh-topology3d?)
Returns immutable per-component invariant reports.

procedure

(mesh3d-genus mesh-or-topology) → mesh3d-genus-report?

  mesh-or-topology : (or/c mesh3d? mesh-topology3d?)
Returns explicit genus reports. For each valid connected orientable surface, g = (2 - b - chi) / 2.

The triangle topology layer does not repair malformed input or turn a branching boundary graph into a fictitious loop.