Don't let the polygon routines collapse on a zero line width.
Fixes https://gitlab.com/kicad/code/kicad/issues/9418
This commit is contained in:
parent
09a2701136
commit
b1f17dc927
|
@ -31,7 +31,6 @@
|
||||||
#include <pad.h>
|
#include <pad.h>
|
||||||
#include <pcb_dimension.h>
|
#include <pcb_dimension.h>
|
||||||
#include <pcb_track.h>
|
#include <pcb_track.h>
|
||||||
#include <string_utils.h>
|
|
||||||
#include <pcb_shape.h>
|
#include <pcb_shape.h>
|
||||||
#include <pcb_text.h>
|
#include <pcb_text.h>
|
||||||
#include <zone.h>
|
#include <zone.h>
|
||||||
|
@ -41,7 +40,6 @@
|
||||||
#include <geometry/geometry_utils.h>
|
#include <geometry/geometry_utils.h>
|
||||||
#include <geometry/shape_segment.h>
|
#include <geometry/shape_segment.h>
|
||||||
#include <geometry/shape_circle.h>
|
#include <geometry/shape_circle.h>
|
||||||
#include <geometry/shape_rect.h>
|
|
||||||
#include <geometry/shape_line_chain.h>
|
#include <geometry/shape_line_chain.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -827,12 +827,16 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE* aZone, PCB_LAYER_ID aLa
|
||||||
{
|
{
|
||||||
if( aItem->GetBoundingBox().Intersects( zone_boundingbox ) )
|
if( aItem->GetBoundingBox().Intersects( zone_boundingbox ) )
|
||||||
{
|
{
|
||||||
int gap = evalRulesForItems( CLEARANCE_CONSTRAINT, aZone, aItem, aLayer );
|
bool ignoreLineWidths = false;
|
||||||
|
int gap = evalRulesForItems( CLEARANCE_CONSTRAINT, aZone, aItem, aLayer );
|
||||||
|
|
||||||
if( aItem->IsOnLayer( Edge_Cuts ) )
|
if( aItem->IsOnLayer( Edge_Cuts ) )
|
||||||
{
|
{
|
||||||
gap = std::max( gap, evalRulesForItems( EDGE_CLEARANCE_CONSTRAINT,
|
gap = std::max( gap, evalRulesForItems( EDGE_CLEARANCE_CONSTRAINT,
|
||||||
aZone, aItem, Edge_Cuts ) );
|
aZone, aItem, Edge_Cuts ) );
|
||||||
|
|
||||||
|
ignoreLineWidths = true;
|
||||||
|
gap = std::max( gap, bds.GetDRCEpsilon() );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( aItem->IsOnLayer( Margin ) )
|
if( aItem->IsOnLayer( Margin ) )
|
||||||
|
@ -841,7 +845,7 @@ void ZONE_FILLER::buildCopperItemClearances( const ZONE* aZone, PCB_LAYER_ID aLa
|
||||||
aZone, aItem, Margin ) );
|
aZone, aItem, Margin ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
addKnockout( aItem, aLayer, gap, aItem->IsOnLayer( Edge_Cuts ), aHoles );
|
addKnockout( aItem, aLayer, gap, ignoreLineWidths, aHoles );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue