diff --git a/crates/fj-core/src/core.rs b/crates/fj-core/src/core.rs index 47336abcc..e1e65fc7d 100644 --- a/crates/fj-core/src/core.rs +++ b/crates/fj-core/src/core.rs @@ -2,7 +2,9 @@ //! //! See [`Core`]. -use crate::{layers::Layers, validation::ValidationConfig}; +use crate::{ + algorithms::approx::Tolerance, layers::Layers, validation::ValidationConfig, +}; /// An instance of the Fornjot core /// @@ -10,6 +12,9 @@ use crate::{layers::Layers, validation::ValidationConfig}; pub struct Core { /// The layers of data that make up the state of a core instance pub layers: Layers, + + /// Default tolerance used for intermediate geometry representation + pub default_tolerance: Tolerance, } impl Core { @@ -25,7 +30,13 @@ impl Core { } fn from_layers(layers: Layers) -> Self { - Self { layers } + let default_tolerance = Tolerance::from_scalar(0.001) + .expect("Tolerance provided is larger than zero"); + + Self { + layers, + default_tolerance, + } } }