Skip to main content

relative_deflection

Function relative_deflection 

Source
pub fn relative_deflection(
    model: &Model,
    shape: &Shape,
    fraction: f64,
    tol: Tolerances,
) -> OgeomResult<Deflection>
Expand description

A deflection expressed as a fraction of a shape’s own size.

“A thousandth of the part” survives the part being modelled in metres rather than millimetres, and being scaled after it was drawn; an absolute chord does not. Deflection::relative does the arithmetic once a size is known; this is what finds the size, which is the part a caller should not have to get right.

The measure is the bounding box’s diagonal, not its longest side: a thin plate and a cube of the same longest side are not equally demanding, and the diagonal is the one that notices.

§Errors

OgeomError::Construction if fraction is not finite and positive, or the shape has nothing a deflection would describe.