Skip to main content

plan_boundary_distance

Function plan_boundary_distance 

Source
pub fn plan_boundary_distance(
    a: &ExactBRep,
    b: &ExactBRep,
    accuracy: Scalar,
    tolerance: Tolerance,
) -> Result<DistanceBounds, ExactMeasureError>
Expand description

Distance between the plan projections of a and b – their shadows on the XY plane – to within accuracy (#217).

A solid’s shadow is its boundary’s: a vertical line through a point of the solid meets the boundary. So this is the least horizontal distance between two boundary points, found by the same certified search as boundary_distance with horizontal gaps, directions and enclosing discs. It is zero when the shadows overlap, and unlike the distance in space it is zero for a body standing inside another’s footprint. point_a and point_b lie within rounding of the boundaries, their projections at most upper apart. When two planar faces show the shadows overlap over a patch of positive area, the interval is [0, 0] and the points project into that patch (see plan_overlap).

§Errors

As boundary_distance.