Merged the differential pair router & length tuning tool.

This commit is contained in:
Maciej Suminski
2015-03-03 11:50:50 +01:00
135 changed files with 19399 additions and 1504 deletions
+18 -1
View File
@@ -57,7 +57,7 @@ MODULE::MODULE( BOARD* parent ) :
m_Attributs = MOD_DEFAULT;
m_Layer = F_Cu;
m_Orient = 0;
m_ModuleStatus = 0;
m_ModuleStatus = MODULE_PADS_LOCKED;
flag = 0;
m_CntRot90 = m_CntRot180 = 0;
m_Surface = 0.0;
@@ -1241,3 +1241,20 @@ bool MODULE::IncrementReference( bool aFillSequenceGaps )
return success;
}
double MODULE::PadCoverageRatio() const
{
double padArea = 0.0;
double moduleArea = GetFootprintRect().GetArea();
for( D_PAD* pad = m_Pads; pad; pad = pad->Next() )
padArea += pad->GetBoundingBox().GetArea();
if( moduleArea == 0.0 )
return 1.0;
double ratio = padArea / moduleArea;
return std::min( ratio, 1.0 );
}