109 3D: Conservative mesh correspondence
3D reference map · First 3D picture
struct
(struct spatial-correspondence3d ( source destination reason mode route diagnostics) #:transparent) source : any/c destination : any/c reason : any/c mode : any/c route : any/c diagnostics : hash?
struct
(struct mesh-correspondence3d ( vertex-map edge-map face-map unmatched-source unmatched-destination diagnostics) #:transparent) vertex-map : vector? edge-map : vector? face-map : vector? unmatched-source : hash? unmatched-destination : hash? diagnostics : hash?
procedure
(prepare-mesh-correspondence3d source destination [ #:vertex-map vertex-map #:edge-map edge-map #:face-map face-map #:geometric-fallback? geometric-fallback?] #:geometric-frame geometric-frame [ #:geometric-limit geometric-limit #:maximum-geometric-cost maximum-geometric-cost]) → mesh-correspondence3d? source : mesh3d? destination : mesh3d? vertex-map : (or/c #f vector?) = #f edge-map : (or/c #f vector?) = #f face-map : (or/c #f vector?) = #f geometric-fallback? : boolean? = #f geometric-frame : 'local-normalized geometric-limit : exact-positive-integer? = 64 maximum-geometric-cost : (or/c #f nonnegative-real?) = #f
Passing #:geometric-fallback? #t explicitly permits a final bounded minimum-cost assignment only between still-unmatched source parts and unused destination parts. The current declared 'local-normalized frame centres each mesh’s local AABB and divides by its largest extent. The cost records normalized position, available normal agreement, local valence, and a penalty for unequal explicit semantic IDs. Its diagnostics retain the initial reason, candidate indexes, accepted pairs and their costs, and rejected pairs. #:maximum-geometric-cost rejects an assigned pair above its threshold rather than treating it as a successful correspondence.
Limitations. Geometric fallback is deliberately local-frame-only and bounded; it is not a graph-isomorphism proof, a provenance-map matcher, or a large-mesh nearest-neighbour service. A plan that still contains ambiguity or unmatched records requires an explicit map or a separate cross-fade; it never silently morphs unrelated index arrays.