Altium schematic: remove border from symlib ellipse inner polygon.
This commit is contained in:
parent
19560f0281
commit
6ff3b0eb95
|
@ -2287,9 +2287,11 @@ void SCH_IO_ALTIUM::ParseEllipse( const std::map<wxString, wxString>& aPropertie
|
||||||
schsym = m_symbols.at( libSymbolIt->first );
|
schsym = m_symbols.at( libSymbolIt->first );
|
||||||
}
|
}
|
||||||
|
|
||||||
ELLIPSE<int> ellipse( elem.Center, elem.Radius, KiROUND(elem.SecondaryRadius ),
|
ELLIPSE<int> ellipse( elem.Center, elem.Radius, KiROUND( elem.SecondaryRadius ),
|
||||||
EDA_ANGLE::m_Angle0 );
|
EDA_ANGLE::m_Angle0 );
|
||||||
|
|
||||||
std::vector<BEZIER<int>> beziers;
|
std::vector<BEZIER<int>> beziers;
|
||||||
|
std::vector<VECTOR2I> polyPoints;
|
||||||
|
|
||||||
TransformEllipseToBeziers( ellipse, beziers );
|
TransformEllipseToBeziers( ellipse, beziers );
|
||||||
|
|
||||||
|
@ -2317,39 +2319,27 @@ void SCH_IO_ALTIUM::ParseEllipse( const std::map<wxString, wxString>& aPropertie
|
||||||
SetLibShapeLine( elem, libbezier, ALTIUM_SCH_RECORD::ELLIPSE );
|
SetLibShapeLine( elem, libbezier, ALTIUM_SCH_RECORD::ELLIPSE );
|
||||||
SetLibShapeFillAndColor( elem, libbezier, ALTIUM_SCH_RECORD::ELLIPSE, elem.Color );
|
SetLibShapeFillAndColor( elem, libbezier, ALTIUM_SCH_RECORD::ELLIPSE, elem.Color );
|
||||||
libbezier->RebuildBezierToSegmentsPointsList( libbezier->GetWidth() / 2 );
|
libbezier->RebuildBezierToSegmentsPointsList( libbezier->GetWidth() / 2 );
|
||||||
|
|
||||||
|
polyPoints.push_back( libbezier->GetStart() );
|
||||||
}
|
}
|
||||||
|
|
||||||
// A series of beziers won't fill the center, so if this is meant to be fully filled,
|
// A series of beziers won't fill the center, so if this is meant to be fully filled,
|
||||||
// Add a polygon to fill the center
|
// Add a polygon to fill the center
|
||||||
if( elem.IsSolid)
|
if( elem.IsSolid )
|
||||||
{
|
{
|
||||||
|
|
||||||
LIB_SHAPE* libline = new LIB_SHAPE( symbol, SHAPE_T::POLY );
|
LIB_SHAPE* libline = new LIB_SHAPE( symbol, SHAPE_T::POLY );
|
||||||
symbol->AddDrawItem( libline, false );
|
symbol->AddDrawItem( libline, false );
|
||||||
libline->SetUnit( std::max( 0, elem.ownerpartid ) );
|
libline->SetUnit( std::max( 0, elem.ownerpartid ) );
|
||||||
|
|
||||||
if( !schsym )
|
for( const VECTOR2I& point : polyPoints )
|
||||||
{
|
libline->AddPoint( point );
|
||||||
libline->AddPoint( GetLibEditPosition( elem.Center + VECTOR2I( elem.Radius, 0 ) ) );
|
|
||||||
libline->AddPoint( GetLibEditPosition( elem.Center + VECTOR2I( 0, elem.SecondaryRadius ) ) );
|
|
||||||
libline->AddPoint( GetLibEditPosition( elem.Center + VECTOR2I( -elem.Radius, 0 ) ) );
|
|
||||||
libline->AddPoint( GetLibEditPosition( elem.Center + VECTOR2I( 0, -elem.SecondaryRadius ) ) );
|
|
||||||
libline->AddPoint( GetLibEditPosition( elem.Center + VECTOR2I( elem.Radius, 0 ) ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
libline->AddPoint( GetRelativePosition( elem.Center + VECTOR2I( elem.Radius, 0 ) + m_sheetOffset, schsym ) );
|
|
||||||
libline->AddPoint( GetRelativePosition( elem.Center + VECTOR2I( 0, elem.SecondaryRadius ) + m_sheetOffset, schsym ) );
|
|
||||||
libline->AddPoint( GetRelativePosition( elem.Center + VECTOR2I( -elem.Radius, 0 ) + m_sheetOffset, schsym ) );
|
|
||||||
libline->AddPoint( GetRelativePosition( elem.Center + VECTOR2I( 0, -elem.SecondaryRadius ) + m_sheetOffset, schsym ) );
|
|
||||||
libline->AddPoint( GetRelativePosition( elem.Center + VECTOR2I( elem.Radius, 0 ) + m_sheetOffset, schsym ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
SetLibShapeLine( elem, libline, ALTIUM_SCH_RECORD::ELLIPSE );
|
libline->AddPoint( polyPoints[0] );
|
||||||
|
|
||||||
|
libline->SetWidth( -1 );
|
||||||
SetLibShapeFillAndColor( elem, libline, ALTIUM_SCH_RECORD::ELLIPSE, elem.Color );
|
SetLibShapeFillAndColor( elem, libline, ALTIUM_SCH_RECORD::ELLIPSE, elem.Color );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue