Move footprint shape offset/rotation stuff to the right place.
Most shapes are already offset/rotated (with thier non-offset/rotated points in start0, etc.).
This commit is contained in:
parent
b21e07d759
commit
114621eb2c
|
@ -106,21 +106,6 @@ void FP_SHAPE::SetDrawCoord()
|
|||
}
|
||||
|
||||
|
||||
std::shared_ptr<SHAPE> FP_SHAPE::GetEffectiveShape( PCB_LAYER_ID aLayer ) const
|
||||
{
|
||||
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
|
||||
std::vector<SHAPE*> shapes = MakeEffectiveShapes();
|
||||
|
||||
for( SHAPE* shape : shapes )
|
||||
{
|
||||
shape->Rotate( -fp->GetOrientationRadians() );
|
||||
shape->Move( fp->GetPosition() );
|
||||
}
|
||||
|
||||
return std::make_shared<SHAPE_COMPOUND>( shapes );
|
||||
}
|
||||
|
||||
|
||||
// see class_edge_mod.h
|
||||
void FP_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
||||
{
|
||||
|
|
|
@ -130,11 +130,6 @@ public:
|
|||
*/
|
||||
void SetDrawCoord();
|
||||
|
||||
/**
|
||||
* Makes a set of SHAPE objects representing the FP_SHAPE. Caller owns the objects.
|
||||
*/
|
||||
std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER ) const override;
|
||||
|
||||
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
|
||||
|
||||
wxString GetClass() const override
|
||||
|
|
|
@ -1137,6 +1137,13 @@ std::vector<SHAPE*> PCB_SHAPE::MakeEffectiveShapes() const
|
|||
case S_POLYGON:
|
||||
{
|
||||
SHAPE_LINE_CHAIN l = GetPolyShape().COutline( 0 );
|
||||
FOOTPRINT* parentFootprint = dynamic_cast<FOOTPRINT*>( m_parent );
|
||||
|
||||
if( parentFootprint )
|
||||
{
|
||||
l.Rotate( -parentFootprint->GetOrientationRadians() );
|
||||
l.Move( parentFootprint->GetPosition() );
|
||||
}
|
||||
|
||||
if( IsFilled() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue