Skip to main content

Module diff

Module diff 

Source
Expand description

CSG Tree structural diff and patch

Computes a minimal set of operations to transform one SDF tree into another. Useful for undo/redo systems, network synchronization, and collaborative editing.

Author: Moroya Sakamoto

Structs§

TreePatch
A patch containing a set of diff operations.

Enums§

DiffError
Error type for patch application.
DiffOp
A single diff operation.

Functions§

apply_patch
Apply a patch to an SDF tree, producing a new tree.
invert_patch
Invert a patch: creates an undo patch from a forward patch.
merge_patches
Merge two sequential patches into a single patch.
tree_diff
Compute the structural diff between two SDF trees.
tree_hash
Compute a deterministic structural hash of an SDF node.

Type Aliases§

TreePath
A path from the root to a specific node in the SDF tree.