Skip to main content

Crate ogeom_core

Crate ogeom_core 

Source
Expand description

Foundation layer: everything else in the workspace is shaped by this crate.

Four responsibilities:

  • Arenas. Arena and Key: typed generational index arenas in place of intrusive reference counting. No cycle hazard, cache-friendly, and arena keys are what make stable entity identity possible at all.
  • Identity. EntityId plus Provenance. Where a topology node’s identity is its address, every modeling operation produces new ones and downstream references break: the topological naming problem. An entity records where it came from at creation time instead of having it reconstructed from history maps afterwards.
  • Errors. OgeomError covers the failure vocabulary a kernel needs, lining up with the categories applications already handle, but as a plain Result: no exceptions, and no conversion of hardware signals into throwable objects.
  • Numerics. Tolerances, Tolerance and the Predicates trait, so the robustness strategy can change without rewriting a single algorithm.

See docs/DATA_MODEL.md for the normative invariants. Section numbers in this crate’s documentation refer to it.

Re-exports§

pub use arena::Arena;
pub use arena::Key;
pub use arena::UNSCOPED;
pub use collections::FastHasher;
pub use collections::FastMap;
pub use collections::FastSet;
pub use error::Cause;
pub use error::OgeomError;
pub use error::OgeomResult;
pub use id::EntityId;
pub use id::OpId;
pub use id::Provenance;
pub use id::ProvenanceTable;
pub use id::Role;
pub use id::SourceId;
pub use predicates::Exact;
pub use predicates::Fast;
pub use predicates::P2;
pub use predicates::P3;
pub use predicates::Predicates;
pub use predicates::Sign;
pub use progress::Canceller;
pub use progress::Stage;
pub use progress::Watch;
pub use tolerance::Tolerance;
pub use tolerance::Tolerances;
pub use tolerance::check_containment;

Modules§

arena
Typed generational arenas.
clock
A monotonic clock for the kernel’s diagnostic timings, on every target.
collections
Hash maps and sets for the whole kernel.
error
Errors as values.
id
Stable entity identity and provenance.
parallel
Deterministic parallelism for the kernel’s embarrassingly parallel stages.
predicates
Geometric predicates, behind a trait.
progress
Progress reporting and cancellation for long operations.
tolerance
Tolerances.

Macros§

ogeom_bail
Return early with an OgeomError built by ogeom_err!.
ogeom_err
Build an OgeomError with a formatted cause.

Type Aliases§

DefaultPredicates
The predicate implementation algorithms use unless told otherwise.