diff --git a/Cargo.lock b/Cargo.lock index 3c24fa5ba..4da581ebf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -904,7 +904,7 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" [[package]] name = "cadkernel" version = "0.1.0" -source = "git+https://github.com/HakanSeven12/cadkernel.git#962ffc3eda748a7d675ddc868be628c334e20a3b" +source = "git+https://github.com/HakanSeven12/cadkernel.git#e3ff882a47c39104e04d07df8297ed02a4a657fe" dependencies = [ "cavalier_contours", ] diff --git a/src/scene/convert/acis_kernel.rs b/src/scene/convert/acis_kernel.rs index fd1e13bc3..1b5c1630c 100644 --- a/src/scene/convert/acis_kernel.rs +++ b/src/scene/convert/acis_kernel.rs @@ -28,7 +28,18 @@ use crate::scene::model::mesh_model::MeshLodSet; const SAG: f64 = 0.05; /// What counts as the same point when the kernel reads a body over. -const TOL: f64 = 1e-9; +/// +/// A micrometre, in a drawing measured in metres. Not slackness: an edge is +/// shared by two faces, and in a real file it cannot sit exactly on both, +/// because the two surfaces were fitted separately and written to finite +/// precision. Asked for exactness the kernel decides the edge is not on its +/// own plane, declines to project it, and the face is dropped — twenty-six +/// walls of one building went missing at a nanometre that no drawing means. +/// +/// Loosening further buys almost nothing: a hundredth of this recovers one +/// more face in sixty thousand, and past that the tolerance would start +/// accepting geometry that really is wrong. +const TOL: f64 = 1e-6; /// Tessellate an ACIS document by lifting it into the kernel. ///