← Back to team overview

kicad-developers team mailing list archive

Re: Question on Connectivity Algo

 

Am Di., 7. Aug. 2018 um 12:13 Uhr schrieb Jeff Young <jeff@xxxxxxxxx>:

> So the polygon of a zone and the zone boundary points are two distinct
> data structures?  (And the polygon both has the fillet shapes and is inset
> by half the minThickness width?)
>

The polygon (m_Poly) of the zone is just the area that could be filled (in
the case of copper).  The structure m_FilledPolysList is the fractured
structure of polygons that acquired copper from the fill (no holes).  In
the case of copper, this is the same as m_RawPolysList

In the case of non-copper, m_Poly is the same as before, the points given
by the user for the outside limits.  Now, however, m_RawPolysList is the
resulting smoothed zone (if chamfer or fillet is enabled) with additional
polygons in the set for holes and m_FilledPolysList is the fractured (no
holes), inset polygon structure.

-Seth




>
> Thanks,
> Jeff.
>
>
> On 7 Aug 2018, at 19:35, jp charras <jp.charras@xxxxxxxxxx> wrote:
>
> Le 07/08/2018 à 20:14, Seth Hillbrand a écrit :
>
> Hi Jeff-
>
> Am Di., 7. Aug. 2018 um 08:07 Uhr schrieb Jeff Young <jeff@xxxxxxxxx
> <mailto:jeff@xxxxxxxxx <jeff@xxxxxxxxx>>>:
>
>    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?
>
>
> Minimum thickness sets the trace thickness for the zone.  The outside
> points of the filled zone sets the maximum size, so the actual zone
> outline is offset into the zone area by half the min thickness.  This
> means that the corners are rounded (see attached image) and need to be
> considered when determining interior points.
>
>
>    And in the second routine, why check both?  Isn’t checkClearance() a
>    superset of containsPoint()?
>
>
> The clearance sets the minimum distance outside of the outer boundary.
> So, in the case of a zone, clearance is half the trace width.  This is
> outside of the polygon, so it needs a distinct check.
>
> Looking at this, it seems we _might_ have a discrepancy between
> m_ZoneMinThickness representing half or all of the zone trace width.
>
> -Seth
>
>
> I agree.
> I am guessing (although I dis not write the code):
> return m_cachedPoly->ContainsPoint( p, zone->GetMinThickness() );
> should be
> return m_cachedPoly->ContainsPoint( p, zone->GetMinThickness()/2 );
>
>
> --
> Jean-Pierre CHARRAS
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References