Skip to main content

MAX_WIDTH

Constant MAX_WIDTH 

Source
pub const MAX_WIDTH: f64 = 1e-4;
Expand description

The widest a single coordinate of any stored entity may be.

Not a comparison tolerance — nothing is ever tested for equality against it. It is a bound on how much uncertainty an entity is allowed to carry, and every search and comparison downstream assumes something like it: a containment search resolves to min_subdivision_size (also 1e-4), so a vertex already wider than that cannot be located on anything, and a control point that wide makes a curve whose convex hull no longer pins the curve down. Past this point the arithmetic stops meaning what the algorithms assume it means.

Public so that what builds an entity can tell whether a representation it may choose fits the budget: the boolean’s exact arc (geop-lib-booleans) is one of two enclosures of the same curve, and is taken only where it does.