Make FP_SHAPE GetEffectiveShape() relative to board, not footprint.
This commit is contained in:
parent
aa06de2db4
commit
74ad1562d9
|
@ -106,6 +106,17 @@ void FP_SHAPE::SetDrawCoord()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::shared_ptr<SHAPE> FP_SHAPE::GetEffectiveShape( PCB_LAYER_ID aLayer ) const
|
||||||
|
{
|
||||||
|
std::vector<SHAPE*> shapes = MakeEffectiveShapes();
|
||||||
|
|
||||||
|
for( SHAPE* shape : shapes )
|
||||||
|
shape->Move( m_Parent->GetPosition() );
|
||||||
|
|
||||||
|
return std::make_shared<SHAPE_COMPOUND>( shapes );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// see class_edge_mod.h
|
// see class_edge_mod.h
|
||||||
void FP_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
void FP_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
||||||
{
|
{
|
||||||
|
|
|
@ -130,6 +130,11 @@ public:
|
||||||
*/
|
*/
|
||||||
void SetDrawCoord();
|
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;
|
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
|
||||||
|
|
||||||
wxString GetClass() const override
|
wxString GetClass() const override
|
||||||
|
|
|
@ -285,7 +285,7 @@ public:
|
||||||
* Makes a set of SHAPE objects representing the PCB_SHAPE. Caller owns the objects.
|
* Makes a set of SHAPE objects representing the PCB_SHAPE. Caller owns the objects.
|
||||||
*/
|
*/
|
||||||
std::vector<SHAPE*> MakeEffectiveShapes() const; // fixme: move to shape_compound
|
std::vector<SHAPE*> MakeEffectiveShapes() const; // fixme: move to shape_compound
|
||||||
virtual std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER ) const override;
|
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;
|
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue