52 fparent->GetCanvas()->GetView()->Update( aFootprint );
54 fparent->GetCanvas()->GetView()->MarkDirty();
55 fparent->GetCanvas()->Refresh();
68 wxString msg = wxString::Format(
_(
"Board edges must be defined on the %s layer." ),
71 frame()->GetInfoBar()->RemoveAllButtons();
72 frame()->GetInfoBar()->ShowMessageFor( msg, 5000, wxICON_ERROR );
76 if( !
frame()->GetOverrideLocks() )
78 aFootprints.erase( std::remove_if( aFootprints.begin(), aFootprints.end(),
81 return fp->IsLocked();
104 commit.
Push(
_(
"Autoplace Footprints" ) );
114 std::vector<FOOTPRINT*> footprints;
134 std::vector<FOOTPRINT*> footprints;
AR_RESULT AutoplaceFootprints(std::vector< FOOTPRINT * > &aFootprints, BOARD_COMMIT *aCommit, bool aPlaceOffboardModules=false)
void SetOverlay(std::shared_ptr< KIGFX::VIEW_OVERLAY > aOverlay)
Set a VIEW overlay to draw items during a autoplace session.
void SetRefreshCallback(std::function< int(FOOTPRINT *aFootprint)> aCallback)
Callback to redraw on screen the view after changes, for instance after moving a footprint.
void SetProgressReporter(PROGRESS_REPORTER *aReporter)
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Execute the changes.
virtual void Revert() override
Revert the commit by restoring the modified items state.
bool GetBoardPolygonOutlines(SHAPE_POLY_SET &aOutlines, OUTLINE_ERROR_HANDLER *aErrorHandler=nullptr, bool aAllowUseArcsInPolygons=false, bool aIncludeNPTHAsOutlines=false)
Extract the board outlines and build a closed polygon from lines, arcs and circle items on edge cut l...
const BOX2I GetBoardEdgesBoundingBox() const
Return the board bounding box calculated using exclusively the board edges (graphics on Edge....
constexpr size_type GetWidth() const
constexpr size_type GetHeight() const
A base class for most all the KiCad significant classes used in schematics and boards.
std::shared_ptr< VIEW_OVERLAY > MakeOverlay()
static TOOL_ACTION autoplaceOffboardComponents
static TOOL_ACTION autoplaceSelectedComponents
Common, abstract interface for edit frames.
Represent a set of closed polygons.
bool Contains(const VECTOR2I &aP, int aSubpolyIndex=-1, int aAccuracy=0, bool aUseBBoxCaches=false) const
Return true if a given subpolygon contains the point aP.
Multi-thread safe progress reporter dialog, intended for use of tasks that parallel reporting back of...
wxString LayerName(int aLayer)
Returns the default display name for a given layer.
std::shared_ptr< PNS_LOG_VIEWER_OVERLAY > overlay
wxString result
Test unit parsing edge cases and error handling.
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint