本文整理汇总了C++中ZONE_CONTAINER::GetFillMode方法的典型用法代码示例。如果您正苦于以下问题:C++ ZONE_CONTAINER::GetFillMode方法的具体用法?C++ ZONE_CONTAINER::GetFillMode怎么用?C++ ZONE_CONTAINER::GetFillMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZONE_CONTAINER
的用法示例。
在下文中一共展示了ZONE_CONTAINER::GetFillMode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IsSame
/**
* Function IsSame
* test is 2 zones are equivalent:
* 2 zones are equivalent if they have same parameters and same outlines
* info relative to filling is not take in account
* @param aZoneToCompare = zone to compare with "this"
*/
bool ZONE_CONTAINER::IsSame( const ZONE_CONTAINER& aZoneToCompare )
{
// compare basic parameters:
if( GetLayer() != aZoneToCompare.GetLayer() )
return false;
if( GetNetCode() != aZoneToCompare.GetNetCode() )
return false;
if( GetPriority() != aZoneToCompare.GetPriority() )
return false;
// Compare zone specific parameters
if( GetIsKeepout() != aZoneToCompare.GetIsKeepout() )
return false;
if( GetIsKeepout() )
{
if( GetDoNotAllowCopperPour() != aZoneToCompare.GetDoNotAllowCopperPour() )
return false;
if( GetDoNotAllowVias() != aZoneToCompare.GetDoNotAllowVias() )
return false;
if( GetDoNotAllowTracks() != aZoneToCompare.GetDoNotAllowTracks() )
return false;
}
if( m_ArcToSegmentsCount != aZoneToCompare.GetArcSegmentCount() )
return false;
if( m_ZoneClearance != aZoneToCompare.m_ZoneClearance )
return false;
if( m_ZoneMinThickness != aZoneToCompare.GetMinThickness() )
return false;
if( m_FillMode != aZoneToCompare.GetFillMode() )
return false;
if( m_PadConnection != aZoneToCompare.m_PadConnection )
return false;
if( m_ThermalReliefGap != aZoneToCompare.m_ThermalReliefGap )
return false;
if( m_ThermalReliefCopperBridge != aZoneToCompare.m_ThermalReliefCopperBridge )
return false;
// Compare outlines
wxASSERT( m_Poly ); // m_Poly == NULL Should never happen
wxASSERT( aZoneToCompare.Outline() );
if( Outline()->m_CornersList.GetList() !=
aZoneToCompare.Outline()->m_CornersList.GetList() ) // Compare vector
return false;
return true;
}
示例2: Fill
//.........这里部分代码省略.........
}
zone.m_zone->SetFilledPolysList( poly );
}
if( m_progressReporter )
{
m_progressReporter->AdvancePhase();
m_progressReporter->Report( _( "Caching polygon triangulations..." ) );
m_progressReporter->SetMaxProgress( toFill.size() );
}
#ifdef USE_OPENMP
#pragma omp parallel
#endif
{
#ifdef USE_OPENMP
#pragma omp master
if( m_progressReporter )
{
m_progressReporter->KeepRefreshing( true );
}
#endif
#ifdef USE_OPENMP
#pragma omp for schedule(dynamic)
#endif
for( unsigned i = 0; i < toFill.size(); i++ )
{
if( m_progressReporter )
{
m_progressReporter->AdvanceProgress();
}
toFill[i].m_zone->CacheTriangulation();
}
}
// If some zones must be filled by segments, create the filling segments
// (note, this is a outdated option, but it exists)
int zones_to_fill_count = 0;
for( unsigned i = 0; i < toFill.size(); i++ )
{
if( toFill[i].m_zone->GetFillMode() == ZFM_SEGMENTS )
zones_to_fill_count++;
}
if( zones_to_fill_count )
{
if( m_progressReporter )
{
m_progressReporter->AdvancePhase();
m_progressReporter->Report( _( "Fill with segments..." ) );
m_progressReporter->SetMaxProgress( zones_to_fill_count );
}
// TODO: use OPENMP to speedup calculations:
for( unsigned i = 0; i < toFill.size(); i++ )
{
ZONE_CONTAINER* zone = toFill[i].m_zone;
if( zone->GetFillMode() != ZFM_SEGMENTS )
continue;
if( m_progressReporter )
{
m_progressReporter->AdvanceProgress();
}
ZONE_SEGMENT_FILL segFill;
fillZoneWithSegments( zone, zone->GetFilledPolysList(), segFill );
toFill[i].m_zone->SetFillSegments( segFill );
}
}
if( m_progressReporter )
{
m_progressReporter->AdvancePhase();
m_progressReporter->Report( _( "Committing changes..." ) );
}
connectivity->SetProgressReporter( nullptr );
if( m_commit )
{
m_commit->Push( _( "Fill Zone(s)" ), false );
}
else
{
for( unsigned i = 0; i < toFill.size(); i++ )
{
connectivity->Update( toFill[i].m_zone );
}
connectivity->RecalculateRatsnest();
}
connectivity->Unlock();
}