PCB_SHAPE: Use SHAPE_ARC as the effective shape of an arc

This commit is contained in:
Jon Evans 2021-03-19 22:23:15 -04:00
parent ba67acf348
commit 7a8abcadd2
1 changed files with 2 additions and 11 deletions

View File

@ -1089,18 +1089,9 @@ std::vector<SHAPE*> PCB_SHAPE::MakeEffectiveShapes() const
switch( m_shape ) switch( m_shape )
{ {
case S_ARC: case S_ARC:
{ effectiveShapes.emplace_back( new SHAPE_ARC( GetCenter(), GetArcStart(),
SHAPE_ARC arc( GetCenter(), GetArcStart(), (double) GetAngle() / 10.0 ); GetAngle() / 10.0, m_width ) );
SHAPE_LINE_CHAIN l = arc.ConvertToPolyline();
for( int i = 0; i < l.SegmentCount(); i++ )
{
effectiveShapes.emplace_back( new SHAPE_SEGMENT( l.Segment( i ).A,
l.Segment( i ).B, m_width ) );
}
break; break;
}
case S_SEGMENT: case S_SEGMENT:
effectiveShapes.emplace_back( new SHAPE_SEGMENT( GetStart(), GetEnd(), m_width ) ); effectiveShapes.emplace_back( new SHAPE_SEGMENT( GetStart(), GetEnd(), m_width ) );