← Back to team overview

kicad-developers team mailing list archive

Question on Connectivity Algo

 

When building zone connectivity, we go through the following two routines:

bool ContainsPoint( const VECTOR2I p ) const
{
    auto zone = static_cast<ZONE_CONTAINER*> ( Parent() );
    return m_cachedPoly->ContainsPoint( p, zone->GetMinThickness() );
}

int ContainsPoint( const VECTOR2I& aP, int aClearance = 0 )    // const
{
    if( containsPoint(aP) )
        return 1;

    if( aClearance > 0 )
        return checkClearance ( aP, aClearance );

    return 0;
}

Why is zone->GetMinThickness() used?  Isn’t that the minimum web thickness of the zone?

And in the second routine, why check both?  Isn’t checkClearance() a superset of containsPoint()?

Thanks,
Jeff


Follow ups