Build smoothed area at outline
The clearance to board edge will be set by the knockout routine. Clipping twice can leave small imperfections in the edge that need to get triangulated
This commit is contained in:
parent
a04d6401c1
commit
3644224cb6
|
@ -1173,22 +1173,14 @@ bool ZONE::BuildSmoothedPoly( SHAPE_POLY_SET& aSmoothedPoly, PCB_LAYER_ID aLayer
|
|||
if( GetNumCorners() <= 2 ) // malformed zone. polygon calculations will not like it ...
|
||||
return false;
|
||||
|
||||
int zoneClearance = m_ZoneClearance;
|
||||
|
||||
if( GetIsRuleArea() )
|
||||
{
|
||||
// We like keepouts just the way they are....
|
||||
aSmoothedPoly = *m_Poly;
|
||||
return true;
|
||||
}
|
||||
else if( !IsOnCopperLayer() )
|
||||
{
|
||||
// Non-copper zones don't have electrical clearances
|
||||
zoneClearance = 0;
|
||||
}
|
||||
|
||||
BOARD* board = GetBoard();
|
||||
int edgeClearance = 0;
|
||||
int maxError = ARC_HIGH_DEF;
|
||||
bool keepExternalFillets = false;
|
||||
|
||||
|
@ -1196,9 +1188,6 @@ bool ZONE::BuildSmoothedPoly( SHAPE_POLY_SET& aSmoothedPoly, PCB_LAYER_ID aLayer
|
|||
{
|
||||
BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings();
|
||||
|
||||
DRC_CONSTRAINT c = bds.m_DRCEngine->EvalRules( EDGE_CLEARANCE_CONSTRAINT, this, nullptr,
|
||||
aLayer );
|
||||
edgeClearance = c.Value().Min();
|
||||
maxError = bds.m_MaxError;
|
||||
keepExternalFillets = bds.m_ZoneKeepExternalFillets;
|
||||
}
|
||||
|
@ -1247,7 +1236,6 @@ bool ZONE::BuildSmoothedPoly( SHAPE_POLY_SET& aSmoothedPoly, PCB_LAYER_ID aLayer
|
|||
if( aBoardOutline )
|
||||
{
|
||||
SHAPE_POLY_SET poly = *aBoardOutline;
|
||||
poly.Deflate( std::max( zoneClearance, edgeClearance ), 16 );
|
||||
aSmoothedPoly.BooleanIntersection( poly, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
|
||||
}
|
||||
|
||||
|
@ -1256,7 +1244,7 @@ bool ZONE::BuildSmoothedPoly( SHAPE_POLY_SET& aSmoothedPoly, PCB_LAYER_ID aLayer
|
|||
if( aSmoothedPolyWithApron )
|
||||
{
|
||||
SHAPE_POLY_SET poly = *maxExtents;
|
||||
poly.Inflate( m_ZoneMinThickness, 16 );
|
||||
poly.Inflate( m_ZoneMinThickness, 64 );
|
||||
*aSmoothedPolyWithApron = aSmoothedPoly;
|
||||
aSmoothedPolyWithApron->BooleanIntersection( poly, SHAPE_POLY_SET::PM_FAST );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue