30#include <boost/version.hpp>
32#if BOOST_VERSION >= 106700
33#include <boost/uuid/entropy_error.hpp>
61#include <wx/fswatcher.h>
79 const wxString& aTitle,
const wxPoint& aPos,
const wxSize& aSize,
80 long aStyle,
const wxString& aFrameName ) :
81 EDA_DRAW_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName,
84 m_originTransforms( *this ),
85 m_spaceMouse( nullptr )
112 viewer3D->Close(
true );
154 draw3DFrame->SetTitle( *aTitle );
167 if(
m_pcb != aBoard )
186 wxCommandEvent e( EDA_EVT_BOARD_CHANGED );
187 ProcessEventLocally( e );
191 wxCHECK2( listener,
continue );
195 wxWindow* win =
dynamic_cast<wxWindow*
>( listener );
198 win->HandleWindowEvent( e );
200 listener->SafelyProcessEvent( e );
257 std::vector<BOARD_ITEM*> items;
260 items.push_back( aItem );
268 static std::vector<KIID> lastBrightenedItemIDs;
272 for(
KIID lastBrightenedItemID : lastBrightenedItemIDs )
276 #if BOOST_VERSION >= 106700
281 catch(
const boost::uuids::entropy_error& )
283 wxLogError( wxT(
"A Boost UUID entropy exception was thrown in %s:%s." ),
284 __FILE__, __FUNCTION__ );
301 lastBrightenedItemID =
niluuid;
306 lastBrightenedItemIDs.clear();
317 wxPoint dialogPos =
GetCanvas()->ScreenToClient( dialog->GetScreenPosition() );
325 catch(
const std::exception& e )
327 wxFAIL_MSG( wxString::Format( wxT(
"Clipper exception occurred: %s" ), e.what() ) );
337 item->SetBrightened();
339 item->RunOnDescendants(
346 lastBrightenedItemIDs.push_back( item->m_Uuid );
351 focusPt = item->GetPosition();
354 aLayer = item->GetLayerSet().Seq()[0];
356 switch( item->Type() )
361 itemPoly =
static_cast<FOOTPRINT*
>( item )->GetBoundingHull();
363 catch(
const std::exception& e )
365 wxFAIL_MSG( wxString::Format( wxT(
"Clipper exception occurred: %s" ),
389 item->TransformShapeToPolygon( itemPoly, aLayer, 0,
pcbIUScale.
mmToIU( 0.1 ),
395 ZONE* zone =
static_cast<ZONE*
>( item );
416 BOX2I item_bbox = item->GetBoundingBox();
431 catch(
const std::exception& e )
433 wxFAIL_MSG( wxString::Format( wxT(
"Clipper exception occurred: %s" ), e.what() ) );
437 itemPoly = clippedPoly;
456 catch(
const std::exception& e )
458 wxFAIL_MSG( wxString::Format( wxT(
"Clipper exception occurred: %s" ), e.what() ) );
481 if( view &&
GetBoard()->m_SolderMaskBridges )
539 case PCB_DISPLAY_ORIGIN::PCB_ORIGIN_PAGE:
break;
540 case PCB_DISPLAY_ORIGIN::PCB_ORIGIN_AUX: origin =
GetAuxOrigin();
break;
541 case PCB_DISPLAY_ORIGIN::PCB_ORIGIN_GRID: origin =
GetGridOrigin();
break;
542 default: wxASSERT(
false );
break;
592 if( visibleLayers.test(
F_Mask ) || visibleLayers.test(
B_Mask ) )
626 area.
SetEnd( pageSize.
x, pageSize.
y );
630 area.
SetOrigin( -pageSize.
x / 2, -pageSize.
y / 2 );
631 area.
SetEnd( pageSize.
x / 2, pageSize.
y / 2 );
690 if( draw3DFrame->IsIconized() )
691 draw3DFrame->Iconize(
false );
693 draw3DFrame->Raise();
694 draw3DFrame->Show(
true );
697 if( wxWindow::FindFocus() != draw3DFrame )
698 draw3DFrame->SetFocus();
719 if( layer == preslayer )
736 if( displ_opts.m_ContrastModeDisplay != HIGH_CONTRAST_MODE::NORMAL )
779 double theta =
RAD2DEG( atan2( -dy, dx ) );
780 double ro = hypot( dx, dy );
782 line.Printf( wxT(
"r %s theta %.3f" ),
786 SetStatusText( line, 3 );
794 line.Printf( wxT(
"X %s Y %s" ),
797 SetStatusText( line, 2 );
809 line.Printf( wxT(
"dx %s dy %s dist %s" ),
813 SetStatusText( line, 3 );
962 else if(
dynamic_cast<PCB_TRACK*
>( aItem ) )
966 else if(
dynamic_cast<PAD*
>( aItem ) )
1048 catch(
const std::system_error& e )
1050 wxLogTrace( wxT(
"KI_TRACE_NAVLIB" ), e.what() );
1072 bool showNetNames =
false;
1075 showNetNames =
config->m_Display.m_NetNames > 0;
1084 if(
via->GetViaType() != VIATYPE::THROUGH
1085 ||
via->GetRemoveUnconnected()
1088 return hcVisChanged ? KIGFX::ALL : KIGFX::REPAINT;
1091 else if(
PAD*
pad =
dynamic_cast<PAD*
>( aItem ) )
1093 if(
pad->GetRemoveUnconnected()
1096 return hcVisChanged ? KIGFX::ALL : KIGFX::REPAINT;
1111 wxLogTrace(
"KICAD_LIB_WATCH",
"setFPWatcher" );
1117 wxLogTrace(
"KICAD_LIB_WATCH",
"Remove watch" );
1123 wxString libfullname;
1126 if( !aFootprint || !tbl )
1138 catch(
const std::exception& e )
1145 wxLogTrace(
"KICAD_LIB_WATCH",
"Error: %s", error.
What() );
1158 m_watcher = std::make_unique<wxFileSystemWatcher>();
1163 fn.DontFollowLink();
1165 wxLogTrace(
"KICAD_LIB_WATCH",
"Add watch: %s", fn.GetPath() );
1179 wxLogTrace(
"KICAD_LIB_WATCH",
"Failed to start the debounce timer" );
1187 wxLogTrace(
"KICAD_LIB_WATCH",
"OnFpChangeDebounceTimer" );
1190 wxLog::EnableLogging(
false );
1192 wxLog::EnableLogging(
true );
1210 ||
IsOK(
this,
_(
"The library containing the current footprint has changed.\n"
1211 "Do you want to reload the footprint?" ) ) )
1222 std::vector<KIID> selectedItems;
1227 selectedItems.emplace_back( item->m_Uuid );
1239 std::vector<EDA_ITEM*> sel;
1241 for(
const KIID& uuid : selectedItems )
1246 sel.push_back( item );
constexpr EDA_IU_SCALE pcbIUScale
constexpr int ARC_LOW_DEF
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
const std::vector< GRID > DefaultGridSizeList() const
Handles how to draw a screen (a board, a schematic ...)
VECTOR2D m_LocalOrigin
Relative Screen cursor coordinate (on grid) in user units.
void SetContentModified(bool aModified=true)
void InitDataPoints(const VECTOR2I &aPageSizeInternalUnits)
Container for design settings for a BOARD object.
std::map< int, SEVERITY > m_DRCSeverities
void SetGridOrigin(const VECTOR2I &aOrigin)
const VECTOR2I & GetGridOrigin()
const VECTOR2I & GetAuxOrigin()
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual void RunOnDescendants(const std::function< void(BOARD_ITEM *)> &aFunction, int aDepth=0) const
Invoke a function on all descendants.
Information pertinent to a Pcbnew printed circuit board.
void SetPlotOptions(const PCB_PLOT_PARAMS &aOptions)
PCB_LAYER_ID GetCopperLayerStackMaxId() const
LSET GetVisibleLayers() const
A proxy function that calls the correspondent function in m_BoardSettings.
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
const BOX2I GetBoardEdgesBoundingBox() const
Return the board bounding box calculated using exclusively the board edges (graphics on Edge....
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
bool IsElementVisible(GAL_LAYER_ID aLayer) const
Test whether a given element category is visible.
const PAGE_INFO & GetPageSettings() const
void UpdateUserUnits(BOARD_ITEM *aItem, KIGFX::VIEW *aView)
Update any references within aItem (or its descendants) to the user units.
BOARD_ITEM * GetItem(const KIID &aID) const
bool BuildConnectivity(PROGRESS_REPORTER *aReporter=nullptr)
Build or rebuild the board connectivity database for the board, especially the list of connected item...
FOOTPRINT * GetFirstFootprint() const
Get the first footprint on the board or nullptr.
TITLE_BLOCK & GetTitleBlock()
void IncrementTimeStamp()
void SetPageSettings(const PAGE_INFO &aPageSettings)
const PCB_PLOT_PARAMS & GetPlotOptions() const
bool IsLayerVisible(PCB_LAYER_ID aLayer) const
A proxy function that calls the correspondent function in m_BoardSettings tests whether a given layer...
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
void SetUserUnits(EDA_UNITS aUnits)
constexpr void SetOrigin(const Vec &pos)
constexpr size_type GetWidth() const
constexpr Vec Centre() const
constexpr size_type GetHeight() const
constexpr const Vec & GetOrigin() const
constexpr void SetEnd(coord_type x, coord_type y)
static DELETED_BOARD_ITEM * GetInstance()
Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard.
void ShowChangedLanguage() override
void ReloadRequest()
Request reloading the 3D view.
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Notification that common settings are updated.
FRAME_T GetFrameType() const
virtual APP_SETTINGS_BASE * config() const
Returns the settings object used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME.
virtual void handleIconizeEvent(wxIconizeEvent &aEvent)
Handle a window iconize event.
virtual void OnModify()
Must be called after a model change in order to set the "modify" flag and do other frame-specific pro...
virtual bool IsContentModified() const
Get if the contents of the frame have been modified since the last save.
bool IsType(FRAME_T aType) const
The base class for create windows for drawing purpose.
virtual void ActivateGalCanvas()
Use to start up the GAL drawing canvas.
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
EDA_DRAW_PANEL_GAL::GAL_TYPE m_canvasType
void UpdateGridSelectBox()
Rebuild the grid combobox to respond to any changes in the GUI (units, user grid changes,...
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
void FocusOnLocation(const VECTOR2I &aPos)
Useful to focus on a particular location, in find functions.
void RecreateToolbars()
Rebuild all toolbars, and update the checked state of check tools.
virtual void handleActivateEvent(wxActivateEvent &aEvent)
Handle a window activation event.
virtual void UpdateMsgPanel()
Redraw the message panel.
void UpdateStatusBar() override
Update the status bar information.
void ShowChangedLanguage() override
Redraw the menus and what not in current language.
virtual EDA_DRAW_PANEL_GAL * GetCanvas() const
Return a pointer to GAL-based canvas of given EDA draw frame.
void unitsChangeRefresh() override
Called when when the units setting has changed to allow for any derived classes to handle refreshing ...
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Notification event that some of the common (suite-wide) settings have changed.
std::vector< wxWindow * > findDialogs()
virtual void DisplayGridMsg()
Display current grid size in the status bar.
bool m_showBorderAndTitleBlock
bool GetShowPolarCoords() const
For those frames that support polar coordinates.
GAL_TYPE GetBackend() const
Return the type of backend currently used by GAL canvas.
virtual void SetHighContrastLayer(int aLayer)
Take care of display settings for the given layer to be displayed in high contrast mode.
KIGFX::VIEW_CONTROLS * GetViewControls() const
Return a pointer to the #VIEW_CONTROLS instance used in the panel.
virtual KIGFX::VIEW * GetView() const
Return a pointer to the #VIEW instance used in the panel.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
void SetEventDispatcher(TOOL_DISPATCHER *aEventDispatcher)
Set a dispatcher that processes events and forwards them to tools.
void StartDrawing()
Begin drawing if it was stopped previously.
A base class for most all the KiCad significant classes used in schematics and boards.
void SetFlags(EDA_ITEM_FLAGS aMask)
KICAD_T Type() const
Returns the type of object.
static const TOOL_EVENT ConnectivityChangedEvent
Selected item had a property changed (except movement)
Hold a record identifying a library accessed by the appropriate footprint library #PLUGIN object in t...
const FP_LIB_TABLE_ROW * FindRow(const wxString &aNickName, bool aCheckIfEnabled=false)
Return an FP_LIB_TABLE_ROW if aNickName is found in this table or in any chained fall back table frag...
FOOTPRINT * FootprintLoad(const wxString &aNickname, const wxString &aFootprintName, bool aKeepUUID=false)
Load a footprint having aFootprintName from the library given by aNickname.
A general implementation of a COLLECTORS_GUIDE.
void SetIgnoreBlindBuriedVias(bool ignore)
void SetIgnoreTracks(bool ignore)
void SetIgnoreFootprintsOnFront(bool ignore)
void SetIgnoreFPTextOnFront(bool ignore)
void SetIgnoreMicroVias(bool ignore)
void SetIgnoreFPTextOnBack(bool ignore)
void SetIgnoreThroughVias(bool ignore)
void SetIgnoreThroughHolePads(bool ignore)
void SetIgnoreFPReferences(bool ignore)
void SetIgnoreFPValues(bool ignore)
void SetIgnoreFootprintsOnBack(bool ignore)
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
A color representation with 4 components: red, green, blue, alpha.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
Contains methods for drawing PCB-specific items.
virtual PCB_RENDER_SETTINGS * GetSettings() override
Return a pointer to current settings that are going to be used when drawing items.
PCB specific render settings.
void LoadColors(const COLOR_SETTINGS *aSettings) override
bool m_ForceShowFieldsWhenFPSelected
void LoadDisplayOptions(const PCB_DISPLAY_OPTIONS &aOptions)
Load settings related to display options (high-contrast mode, full or outline modes for vias/pads/tra...
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const override
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1) override
Add a VIEW_ITEM to the view.
virtual void Remove(VIEW_ITEM *aItem) override
Remove a VIEW_ITEM from the view.
void UpdateDisplayOptions(const PCB_DISPLAY_OPTIONS &aOptions)
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
void SetDefaultFont(const wxString &aFont)
void SetGapLengthRatio(double aRatio)
void SetDashLengthRatio(double aRatio)
void SetHighlightFactor(float aFactor)
void SetSelectFactor(float aFactor)
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
An abstract base class for deriving all objects that can be added to a VIEW.
bool IsBOARD_ITEM() const
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
BOX2D GetViewport() const
Return the current viewport visible area rectangle.
bool HasItem(const VIEW_ITEM *aItem) const
Indicates whether or not the given item has been added to the view.
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
void RecacheAllItems()
Rebuild GAL display lists.
void UpdateAllItems(int aUpdateFlags)
Update all items in the view according to the given flags.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
void UpdateAllItemsConditionally(int aUpdateFlags, std::function< bool(VIEW_ITEM *)> aCondition)
Update items in the view according to the given flags and condition.
wxString AsString() const
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
const UTF8 & GetLibItemName() const
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
const wxString GetFullURI(bool aSubstituted=false) const
Return the full location specifying URI for the LIB, either in original UI form or in environment var...
LSET is a set of PCB_LAYER_IDs.
The class that implements the public interface to the SpaceMouse plug-in.
void SetFocus(bool aFocus)
Set the connection to the 3Dconnexion driver to the focus state so that 3DMouse data is routed to thi...
Describe the page size and margins of a paper page on which to eventually print or plot.
const VECTOR2D GetSizeIU(double aIUScale) const
Gets the page size in internal units.
DISPLAY_OPTIONS m_Display
MAGNETIC_SETTINGS m_MagneticItems
static TOOL_ACTION selectItems
Select a list of items (specified as the event parameter)
SEVERITY GetSeverity(int aErrorCode) const override
std::unique_ptr< wxFileSystemWatcher > m_watcher
virtual void ReloadFootprint(FOOTPRINT *aFootprint)
Reload the footprint from the library.
virtual void OnDisplayOptionsChanged()
void FocusOnItems(std::vector< BOARD_ITEM * > aItems, PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
void handleIconizeEvent(wxIconizeEvent &aEvent) override
Handle a window iconize event.
ORIGIN_TRANSFORMS & GetOriginTransforms() override
Return a reference to the default ORIGIN_TRANSFORMS object.
virtual const PCB_PLOT_PARAMS & GetPlotSettings() const
Return the PCB_PLOT_PARAMS for the BOARD owned by this frame.
wxDateTime m_watcherLastModified
const PCB_DISPLAY_OPTIONS & GetDisplayOptions() const
Display options control the way tracks, vias, outlines and other things are shown (for instance solid...
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
void RemoveBoardChangeListener(wxEvtHandler *aListener)
Remove aListener to from the board changed listener list.
void handleActivateEvent(wxActivateEvent &aEvent) override
Handle a window activation event.
void setFPWatcher(FOOTPRINT *aFootprint)
Creates (or removes) a watcher on the specified footprint.
virtual void unitsChangeRefresh() override
Called when when the units setting has changed to allow for any derived classes to handle refreshing ...
EDA_ITEM * GetItem(const KIID &aId) const override
Fetch an item by KIID.
const BOX2I GetDocumentExtents(bool aIncludeAllVisible=true) const override
Returns bbox of document with option to not include some items.
const VECTOR2I GetPageSizeIU() const override
Works off of GetPageSettings() to return the size of the paper page in the internal units of this par...
PCBNEW_SETTINGS * GetPcbNewSettings() const
virtual void SwitchLayer(PCB_LAYER_ID aLayer)
Change the active layer in the frame.
virtual PCB_LAYER_ID GetActiveLayer() const
PCB_BASE_FRAME(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName)
void OnModify() override
Must be called after a change in order to set the "modify" flag and update other data structures and ...
const VECTOR2I & GetAuxOrigin() const
virtual PCB_VIEWERS_SETTINGS_BASE * GetViewerSettingsBase() const
const VECTOR2I GetUserOrigin() const
virtual MAGNETIC_SETTINGS * GetMagneticItemsSettings()
std::vector< wxEvtHandler * > m_boardChangeListeners
void OnFPChange(wxFileSystemWatcherEvent &aEvent)
Handler for FP change events.
bool canCloseWindow(wxCloseEvent &aCloseEvent) override
const VECTOR2I & GetGridOrigin() const override
Return the absolute coordinates of the origin of the snap grid.
const TITLE_BLOCK & GetTitleBlock() const override
const PAGE_INFO & GetPageSettings() const override
BOX2I GetBoardBoundingBox(bool aBoardEdgesOnly=false) const
Calculate the bounding box containing all board items (or board edge segments).
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual void ActivateGalCanvas() override
Use to start up the GAL drawing canvas.
void SetDrawBgColor(const COLOR4D &aColor) override
void OnFpChangeDebounceTimer(wxTimerEvent &aEvent)
Handler for the filesystem watcher debounce timer.
virtual void SetBoard(BOARD *aBoard, PROGRESS_REPORTER *aReporter=nullptr)
Set the #m_Pcb member in such as way as to ensure deleting any previous BOARD.
virtual void SetPageSettings(const PAGE_INFO &aPageSettings) override
NL_PCBNEW_PLUGIN * m_spaceMouse
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock) override
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Returns the BOARD_DESIGN_SETTINGS for the open project.
virtual void ShowChangedLanguage() override
Redraw the menus and what not in current language.
void AddBoardChangeListener(wxEvtHandler *aListener)
Add aListener to post #EDA_EVT_BOARD_CHANGED command events to.
virtual void AddFootprintToBoard(FOOTPRINT *aFootprint)
Add the given footprint to the board.
virtual void doReCreateMenuBar() override
void SetDisplayOptions(const PCB_DISPLAY_OPTIONS &aOptions, bool aRefresh=true)
Updates the current display options from the given options struct.
GENERAL_COLLECTORS_GUIDE GetCollectorsGuide()
virtual void SetPlotSettings(const PCB_PLOT_PARAMS &aSettings)
PCB_DISPLAY_OPTIONS m_displayOptions
FOOTPRINT_EDITOR_SETTINGS * GetFootprintEditorSettings() const
void SetGridOrigin(const VECTOR2I &aPoint) override
PCB_ORIGIN_TRANSFORMS m_originTransforms
EDA_3D_VIEWER_FRAME * CreateAndShow3D_Frame()
Shows the 3D view frame.
wxTimer m_watcherDebounceTimer
EDA_3D_VIEWER_FRAME * Get3DViewerFrame()
virtual void SetActiveLayer(PCB_LAYER_ID aLayer)
virtual COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Helper to retrieve the current color settings.
wxFileName m_watcherFileName
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Notification event that some of the common (suite-wide) settings have changed.
virtual void Update3DView(bool aMarkDirty, bool aRefresh, const wxString *aTitle=nullptr)
Update the 3D view, if the viewer is opened by this frame.
void FocusOnItem(BOARD_ITEM *aItem, PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
void rebuildConnectivity()
virtual void UpdateStatusBar() override
Update the status bar information.
HIGH_CONTRAST_MODE m_ContrastModeDisplay
How inactive layers are displayed.
void UpdateColors()
Update the color settings in the painter and GAL.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void DisplayBoard(BOARD *aBoard, PROGRESS_REPORTER *aReporter=nullptr)
Add all items from the current board to the VIEW, so they can be displayed by GAL.
void RedrawRatsnest()
Return the bounding box of the view that should be used if model is not valid.
Parameters and options when plotting/printing a board.
virtual SETTINGS_MANAGER & GetSettingsManager() const
A progress reporter interface for use in multi-threaded environments.
static FP_LIB_TABLE * PcbFootprintLibs(PROJECT *aProject)
Return the table of footprint libraries without Kiway.
static void Cleanup3DCache(PROJECT *aProject)
T * GetAppSettings()
Returns a handle to the a given settings by type If the settings have already been loaded,...
Represent a set of closed polygons.
void BooleanSubtract(const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode)
Perform boolean polyset difference For aFastMode meaning, see function booleanOp.
bool IsEmpty() const
Return true if the set is empty (no polygons at all)
void BooleanIntersection(const SHAPE_POLY_SET &b, POLYGON_MODE aFastMode)
Perform boolean polyset intersection For aFastMode meaning, see function booleanOp.
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Appends a vertex at the end of the given outline/hole (default: the last outline)
int NewOutline()
Creates a new empty polygon in the set and returns its index.
void Deflate(int aAmount, CORNER_STRATEGY aCornerStrategy, int aMaxError)
const BOX2I BBox(int aClearance=0) const override
Compute a bounding box of the shape, with a margin of aClearance a collision.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
A lower-precision version of StringFromValue().
EDA_UNITS GetUserUnits() const
Handle a list of polygons defining a copper zone.
SHAPE_POLY_SET * Outline()
void TransformShapeToPolygon(SHAPE_POLY_SET &aBuffer, PCB_LAYER_ID aLayer, int aClearance, int aError, ERROR_LOC aErrorLoc, bool ignoreLineWidth=false) const override
Convert the zone shape to a closed polygon Used in filling zones calculations Circles and arcs are ap...
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
This file is part of the common library.
Declaration of the eda_3d_viewer class.
static constexpr EDA_ANGLE ANGLE_0
#define QUALIFIED_VIEWER3D_FRAMENAME(parent)
#define IS_NEW
New item, just created.
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
@ FRAME_FOOTPRINT_PREVIEW
@ FRAME_FOOTPRINT_CHOOSER
static const std::string KiCadFootprintFileExtension
bool IsCopperLayer(int aLayerId)
Tests whether a layer is a copper layer.
@ LAYER_FOOTPRINTS_FR
show footprints on front
@ LAYER_FP_REFERENCES
show footprints references (when texts are visible)
@ LAYER_PADS
Meta control for all pads opacity/visibility (color ignored)
@ LAYER_FOOTPRINTS_BK
show footprints on back
@ LAYER_FP_VALUES
show footprints values (when texts are visible)
@ LAYER_VIAS
Meta control for all vias opacity/visibility.
PCB_LAYER_ID
A quick note on layer IDs:
Message panel definition file.
@ COLOR
Color has changed.
@ REPAINT
Item needs to be redrawn.
@ ALL
All except INITIAL_ADD.
Declaration of the NL_PCBNEW_PLUGIN class.
wxDEFINE_EVENT(EDA_EVT_BOARD_CHANGED, wxCommandEvent)
PGM_BASE & Pgm()
The global Program "get" accessor.
KIWAY Kiway(KFCTL_STANDALONE)
float highlight_factor
How much to brighten highlighted objects by.
float select_factor
How much to brighten selected objects by.
constexpr int mmToIU(double mm) const
std::vector< GRID > grids
Common grid settings, available to every frame.
bool m_ForceShowFieldsWhenFPSelected
std::vector< double > zoom_factors
double RAD2DEG(double rad)
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_DIM_ORTHOGONAL_T
class PCB_DIM_ORTHOGONAL, a linear dimension constrained to x/y
@ PCB_DIM_LEADER_T
class PCB_DIM_LEADER, a leader dimension (graphic item)
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_DIM_CENTER_T
class PCB_DIM_CENTER, a center point marking (graphic item)
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_ZONE_T
class ZONE, a copper pour area
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_FIELD_T
class PCB_FIELD, text associated with a footprint property
@ PCB_MARKER_T
class PCB_MARKER, a marker used to show something
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_DIM_ALIGNED_T
class PCB_DIM_ALIGNED, a linear dimension (graphic item)
@ PCB_PAD_T
class PAD, a pad in a footprint
@ PCB_ARC_T
class PCB_ARC, an arc track segment on a copper layer
@ PCB_TRACE_T
class PCB_TRACK, a track segment (segment on a copper layer)
@ PCB_DIM_RADIAL_T
class PCB_DIM_RADIAL, a radius or diameter dimension
VECTOR2< int32_t > VECTOR2I
VECTOR2D ToVECTOR2D(const wxPoint &aPoint)
Definition of file extensions used in Kicad.
#define ZOOM_LIST_PCBNEW_HYPER