Expand description
Headless TreeMaker 5.0.1 model engine.
treemaker-core is a Rust port of the model-only TreeMaker engine: stream
I/O, tree/path feasibility, ALM optimization, polygon construction, crease
pattern construction, and CP diagnostics. It does not include GUI,
wxWidgets, printing, menus, or proprietary optimizer backends.
The primary entry point is Tree.
use treemaker_core::Tree;
let text = std::fs::read_to_string("model.tmd5")?;
let mut tree = Tree::from_tmd_str(&text)?;
let summary = tree.summary();
println!("nodes={}, paths={}", summary.nodes, summary.paths);
tree.optimize_scale()?;
tree.build_polys_and_crease_pattern()?;
std::fs::write("out.tmd5", tree.to_tmd5_string())?;Numeric optimization parity is tolerance-based. The behavioral baseline is TreeMaker 5.0.1 with the distributable ALM backend.
Structs§
- CPStatus
Report - Detailed crease-pattern status report with offending part IDs when available.
- Condition
- TreeMaker condition wrapper.
- Crease
- Crease-pattern crease.
- Edge
- TreeMaker edge record.
- Facet
- Crease-pattern facet.
- Node
- TreeMaker node record.
- Optimization
Report - Report returned by optimization operations.
- Path
- TreeMaker path record between a pair of nodes.
- Point
- Two-dimensional point in paper coordinates.
- Poly
- Polygon or subpolygon generated during crease-pattern construction.
- Tree
- Complete TreeMaker model state.
- Tree
Summary - Stable summary of a
Treesuitable for CLI/wasm output and regression tests. - Vertex
- Crease-pattern vertex.
Enums§
- CPStatus
- High-level crease-pattern status, matching TreeMaker’s
GetCPStatus(). - Condition
Kind - Supported TreeMaker condition variants.
- Optimization
Kind - Optimizer kind used for an
OptimizationReport. - Owner
Ref - Owner reference using TreeMaker’s 1-based external indices.
- Tree
Error - Structured error returned by parsing, validation, optimization, and build operations.