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.

Elsewhere: the Standard package, Precision, and the parts of a collections library that carry semantics rather than just storage.

Four responsibilities:

  • Arenas. Arena and Key: typed generational index arenas replace the intrusive reference counting conventional kernels use. No cycle hazard, cache-friendly, and, critically, arena keys are what make stable entity identity possible at all.
  • Identity. EntityId plus Provenance. Conventionally a topology node’s identity is its address, so every modeling operation produces new ones and downstream references break; that is the topological naming problem. We record where an entity came from at creation time instead of reconstructing it 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 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.
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.