Browse Source

Another try a allowing touching courtyards.

Fixes https://gitlab.com/kicad/code/kicad/issues/8076
6.0.7
Jeff Young 5 years ago
parent
commit
b6f2941a06
  1. 2
      libs/kimath/include/geometry/shape_poly_set.h
  2. 6
      pcbnew/drc/drc_test_provider_courtyard_clearance.cpp
  3. 6
      pcbnew/footprint.cpp

2
libs/kimath/include/geometry/shape_poly_set.h

@ -964,7 +964,7 @@ public:
* @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 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_ALL_CORNERS to round regardless of angles
*/

6
pcbnew/drc/drc_test_provider_courtyard_clearance.cpp

@ -189,9 +189,6 @@ bool DRC_TEST_PROVIDER_COURTYARD_CLEARANCE::testCourtyardClearances()
test, F_Cu );
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 ) )
{
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 );
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 ) )
{
std::shared_ptr<DRC_ITEM> drce = DRC_ITEM::Create( DRCE_OVERLAPPING_FOOTPRINTS );

6
pcbnew/footprint.cpp

@ -1956,6 +1956,9 @@ void FOOTPRINT::BuildPolyCourtyards( OUTLINE_ERROR_HANDLER* aErrorHandler )
if( ConvertOutlineToPolygon( list_front, m_poly_courtyard_front, errorMax, chainingEpsilon,
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 );
}
else
@ -1966,6 +1969,9 @@ void FOOTPRINT::BuildPolyCourtyards( OUTLINE_ERROR_HANDLER* aErrorHandler )
if( ConvertOutlineToPolygon( list_back, m_poly_courtyard_back, errorMax, chainingEpsilon,
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 );
}
else

Loading…
Cancel
Save