Another try a allowing touching courtyards.

Fixes https://gitlab.com/kicad/code/kicad/issues/8076
This commit is contained in:
Jeff Young 2021-03-31 22:34:13 +01:00
parent 2ad69fc56b
commit b6f2941a06
3 changed files with 7 additions and 7 deletions

View File

@ -964,7 +964,7 @@ public:
* @param aAmount is the number of units to offset edges. * @param aAmount is the number of units to offset edges.
* @param aCircleSegmentsCount is the number of segments per 360 degrees to use in curve approx * @param aCircleSegmentsCount is the number of segments per 360 degrees to use in curve approx
* @param aCornerStrategy #ALLOW_ACUTE_CORNERS to preserve all angles, * @param aCornerStrategy #ALLOW_ACUTE_CORNERS to preserve all angles,
* #CHOP_ACUTE_CORNERS to chop angles less than 90°, * #CHAMFER_ACUTE_CORNERS to chop angles less than 90°,
* #ROUND_ACUTE_CORNERS to round off angles less than 90°, * #ROUND_ACUTE_CORNERS to round off angles less than 90°,
* #ROUND_ALL_CORNERS to round regardless of angles * #ROUND_ALL_CORNERS to round regardless of angles
*/ */

View File

@ -189,9 +189,6 @@ bool DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances()
test, F_Cu ); test, F_Cu );
clearance = constraint.GetValue().Min(); clearance = constraint.GetValue().Min();
// Touching courtyards, or courtyards -at- the clearance distance are legal.
clearance -= 1;
if( clearance >= 0 && footprintFront.Collide( &testFront, clearance, &actual, &pos ) ) if( clearance >= 0 && footprintFront.Collide( &testFront, clearance, &actual, &pos ) )
{ {
std::shared_ptr<DRC_ITEM> drce = DRC_ITEM::Create( DRCE_OVERLAPPING_FOOTPRINTS ); std::shared_ptr<DRC_ITEM> drce = DRC_ITEM::Create( DRCE_OVERLAPPING_FOOTPRINTS );
@ -219,9 +216,6 @@ bool DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances()
test, B_Cu ); test, B_Cu );
clearance = constraint.GetValue().Min(); clearance = constraint.GetValue().Min();
// Touching courtyards, or courtyards -at- the clearance distance are legal.
clearance -= 1;
if( clearance >= 0 && footprintBack.Collide( &testBack, clearance, &actual, &pos ) ) if( clearance >= 0 && footprintBack.Collide( &testBack, clearance, &actual, &pos ) )
{ {
std::shared_ptr<DRC_ITEM> drce = DRC_ITEM::Create( DRCE_OVERLAPPING_FOOTPRINTS ); std::shared_ptr<DRC_ITEM> drce = DRC_ITEM::Create( DRCE_OVERLAPPING_FOOTPRINTS );

View File

@ -1956,6 +1956,9 @@ void FOOTPRINT::BuildPolyCourtyards( OUTLINE_ERROR_HANDLER* aErrorHandler )
if( ConvertOutlineToPolygon( list_front, m_poly_courtyard_front, errorMax, chainingEpsilon, if( ConvertOutlineToPolygon( list_front, m_poly_courtyard_front, errorMax, chainingEpsilon,
aErrorHandler ) ) aErrorHandler ) )
{ {
// Touching courtyards, or courtyards -at- the clearance distance are legal.
m_poly_courtyard_front.Inflate( -1, SHAPE_POLY_SET::CHAMFER_ACUTE_CORNERS );
m_poly_courtyard_front.CacheTriangulation( false ); m_poly_courtyard_front.CacheTriangulation( false );
} }
else else
@ -1966,6 +1969,9 @@ void FOOTPRINT::BuildPolyCourtyards( OUTLINE_ERROR_HANDLER* aErrorHandler )
if( ConvertOutlineToPolygon( list_back, m_poly_courtyard_back, errorMax, chainingEpsilon, if( ConvertOutlineToPolygon( list_back, m_poly_courtyard_back, errorMax, chainingEpsilon,
aErrorHandler ) ) aErrorHandler ) )
{ {
// Touching courtyards, or courtyards -at- the clearance distance are legal.
m_poly_courtyard_back.Inflate( -1, SHAPE_POLY_SET::CHAMFER_ACUTE_CORNERS );
m_poly_courtyard_back.CacheTriangulation( false ); m_poly_courtyard_back.CacheTriangulation( false );
} }
else else