30#include <boost/version.hpp> 
   32#if BOOST_VERSION >= 106700 
   33#include <boost/uuid/entropy_error.hpp> 
   61#include <wx/fswatcher.h> 
   84                                const wxString& aTitle, 
const wxPoint& aPos, 
const wxSize& aSize,
 
   85                                long aStyle, 
const wxString& aFrameName ) :
 
 
  113        viewer3D->Close( 
true );
 
 
  155            draw3DFrame->SetTitle( *aTitle );
 
 
  168    if( 
m_pcb != aBoard )
 
  187        wxCommandEvent e( EDA_EVT_BOARD_CHANGED );
 
  188        ProcessEventLocally( e );
 
 
  234    std::vector<BOARD_ITEM*> items;
 
  237        items.push_back( aItem );
 
 
  245    static std::vector<KIID> lastBrightenedItemIDs;
 
  247    bool itemsUnbrightened = 
false;
 
  249    for( 
KIID lastBrightenedItemID : lastBrightenedItemIDs )
 
  253            lastItem->ClearBrightened();
 
  255            itemsUnbrightened = 
true;
 
  259    if( itemsUnbrightened )
 
  262    lastBrightenedItemIDs.clear();
 
  273        wxPoint dialogPos = 
GetCanvas()->ScreenToClient( dialog->GetScreenPosition() );
 
  281        catch( 
const std::exception& e )
 
  283            wxFAIL_MSG( wxString::Format( wxT( 
"Clipper exception occurred: %s" ), e.what() ) );
 
  293            item->SetBrightened();
 
  294            lastBrightenedItemIDs.push_back( item->m_Uuid );
 
  300                        lastBrightenedItemIDs.push_back( child->
m_Uuid );
 
  309            focusPt = item->GetPosition();
 
  312                aLayer = item->GetLayerSet().Seq()[0];
 
  314            switch( item->Type() )
 
  319                    itemPoly = 
static_cast<FOOTPRINT*
>( item )->GetBoundingHull();
 
  321                catch( 
const std::exception& e )
 
  323                    wxFAIL_MSG( wxString::Format( wxT( 
"Clipper exception occurred: %s" ), e.what() ) );
 
  352                ZONE* zone = 
static_cast<ZONE*
>( item );
 
  372                BOX2I item_bbox = item->GetBoundingBox();
 
  389            catch( 
const std::exception& e )
 
  391                wxFAIL_MSG( wxString::Format( wxT( 
"Clipper exception occurred: %s" ), e.what() ) );
 
  395                itemPoly = clippedPoly;
 
  414        catch( 
const std::exception& e )
 
  416            wxFAIL_MSG( wxString::Format( wxT( 
"Clipper exception occurred: %s" ), e.what() ) );
 
 
  439    if( view && 
GetBoard()->m_SolderMaskBridges )
 
 
  451    m_pcb->SetPageSettings( aPageSettings );
 
 
  460    return m_pcb->GetPageSettings();
 
 
  475    return m_pcb->GetDesignSettings().GetGridOrigin();
 
 
  481    m_pcb->GetDesignSettings().SetGridOrigin( aPoint );
 
 
  487    return m_pcb->GetDesignSettings().GetAuxOrigin();
 
 
  500    default:                                  wxASSERT( 
false );        
break;
 
 
  514    return m_pcb->GetTitleBlock();
 
 
  520    m_pcb->SetTitleBlock( aTitleBlock );
 
 
  526    return m_pcb->GetDesignSettings();
 
 
  539    return m_pcb->GetPlotOptions();
 
 
  545    m_pcb->SetPlotOptions( aSettings );
 
  550    if( visibleLayers.test( 
F_Mask ) || visibleLayers.test( 
B_Mask ) )
 
 
  575    BOX2I area = aBoardEdgesOnly ? 
m_pcb->GetBoardEdgesBoundingBox() : 
m_pcb->GetBoundingBox();
 
  584            area.
SetEnd( pageSize.
x, pageSize.
y );
 
  588            area.
SetOrigin( -pageSize.
x / 2, -pageSize.
y / 2 );
 
  589            area.
SetEnd( pageSize.
x / 2, pageSize.
y / 2 );
 
 
  648    if( draw3DFrame->IsIconized() )
 
  649         draw3DFrame->Iconize( 
false );
 
  651    draw3DFrame->Raise();
 
  652    draw3DFrame->Show( 
true );
 
  655    if( wxWindow::FindFocus() != draw3DFrame )
 
  656        draw3DFrame->SetFocus();
 
 
  677    if( layer == preslayer )
 
  684        if( layer > 
m_pcb->GetCopperLayerStackMaxId() )
 
 
  737        double   theta = 
RAD2DEG( atan2( -dy, dx ) );
 
  738        double   ro = hypot( dx, dy );
 
  740        line.Printf( wxT( 
"r %s  theta %.3f" ),
 
  744        SetStatusText( line, 3 );
 
  752    line.Printf( wxT( 
"X %s  Y %s" ),
 
  755    SetStatusText( line, 2 );
 
  767        line.Printf( wxT( 
"dx %s  dy %s  dist %s" ),
 
  771        SetStatusText( line, 3 );
 
 
  885        return &cfg->m_MagneticItems;
 
 
  915                else if( 
dynamic_cast<PCB_TRACK*
>( aItem ) )
 
  919                else if( 
dynamic_cast<PAD*
>( aItem ) )
 
  925                    if( 
text->HasTextVars() )
 
  927                        text->ClearRenderCache();
 
  928                        text->ClearBoundingBoxCache();
 
 
 1016    catch( 
const std::system_error& e )
 
 1018        wxLogTrace( wxT( 
"KI_TRACE_NAVLIB" ), e.what() );
 
 
 1040        bool showNetNames = 
false;
 
 1043            showNetNames = 
config->m_Display.m_NetNames > 0;
 
 1053                                || 
via->GetRemoveUnconnected()
 
 1059                    else if( 
PAD* 
pad = 
dynamic_cast<PAD*
>( aItem ) )
 
 1061                        if( 
pad->GetRemoveUnconnected()
 
 
 1091    wxString libfullname;
 
 1094    if( !aFootprint || !tbl )
 
 1106    catch( 
const std::exception& e )
 
 1126    m_watcher = std::make_unique<wxFileSystemWatcher>();
 
 1131    fn.DontFollowLink();
 
 
 1151    wxLogTrace( 
traceLibWatch, 
"Failed to start the debounce timer" );
 
 
 1174    wxLog::EnableLogging( 
false );
 
 1176    wxLog::EnableLogging( 
true );
 
 1196        || 
IsOK( 
this, 
_( 
"The library containing the current footprint has changed.\n" 
 1197                          "Do you want to reload the footprint?" ) ) )
 
 1208                std::vector<KIID> selectedItems;
 
 1211                    selectedItems.emplace_back( item->m_Uuid );
 
 1222                std::vector<EDA_ITEM*> sel;
 
 1224                for( 
const KIID& uuid : selectedItems )
 
 1227                        sel.push_back( item );
 
 
constexpr EDA_IU_SCALE pcbIUScale
 
constexpr int ARC_LOW_DEF
 
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
 
@ NORMAL
Inactive layers are shown normally (no high-contrast mode)
 
@ HIDDEN
Inactive layers are hidden.
 
static TOOL_ACTION selectItems
Select a list of items (specified as the event parameter)
 
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
 
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
 
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
 
Information pertinent to a Pcbnew printed circuit board.
 
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
 
void UpdateUserUnits(BOARD_ITEM *aItem, KIGFX::VIEW *aView)
Update any references within aItem (or its descendants) to the user units.
 
const LSET & GetVisibleLayers() const
A proxy function that calls the correspondent function in m_BoardSettings.
 
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.
 
void IncrementTimeStamp()
 
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
 
void SynchronizeProperties()
Copy the current project's text variables into the boards property cache.
 
BOARD_ITEM * ResolveItem(const KIID &aID, bool aAllowNullptrReturn=false) const
 
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 CommonSettingsChanged(int aFlags) override
Notification that common settings are updated.
 
void ShowChangedLanguage() override
 
void ReloadRequest()
Request reloading the 3D view.
 
FRAME_T GetFrameType() const
 
virtual APP_SETTINGS_BASE * config() const
Return 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.
 
virtual void RecreateToolbars()
 
bool m_isClosing
Set by the close window event handler after frames are asked if they can close.
 
bool IsType(FRAME_T aType) const
 
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
The current canvas type.
 
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.
 
EDA_DRAW_FRAME(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName, const EDA_IU_SCALE &aIuScale)
 
virtual void handleActivateEvent(wxActivateEvent &aEvent)
Handle a window activation event.
 
virtual void UpdateMsgPanel()
Redraw the message panel.
 
void FocusOnLocation(const VECTOR2I &aPos, bool aAllowScroll=true)
Useful to focus on a particular location, in find functions.
 
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 ...
 
std::vector< wxWindow * > findDialogs()
 
virtual void DisplayGridMsg()
Display current grid size in the status bar.
 
void CommonSettingsChanged(int aFlags) override
Notification event that some of the common (suite-wide) settings have changed.
 
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.
 
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
 
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.
 
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.
 
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
 
static TOOL_ACTION rehatchShapes
 
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 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.
 
std::unique_ptr< NL_PCBNEW_PLUGIN > m_spaceMouse
 
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 handleActivateEvent(wxActivateEvent &aEvent) override
Handle a window activation event.
 
void setFPWatcher(FOOTPRINT *aFootprint)
Create 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 ...
 
const BOX2I GetDocumentExtents(bool aIncludeAllVisible=true) const override
Return bounding box 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...
 
bool m_inFpChangeTimerEvent
 
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()
 
void FocusOnItems(std::vector< BOARD_ITEM * > aItems, PCB_LAYER_ID aLayer=UNDEFINED_LAYER, bool aAllowScroll=true)
 
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.
 
void CommonSettingsChanged(int aFlags) override
Notification event that some of the common (suite-wide) settings have changed.
 
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).
 
EDA_ITEM * ResolveItem(const KIID &aId, bool aAllowNullptrReturn=false) const override
Fetch an item by KIID.
 
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
 
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
Return the BOARD_DESIGN_SETTINGS for the open project.
 
virtual void ShowChangedLanguage() override
Redraw the menus and what not in current language.
 
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)
Update the current display options.
 
GENERAL_COLLECTORS_GUIDE GetCollectorsGuide()
 
virtual void SetPlotSettings(const PCB_PLOT_PARAMS &aSettings)
 
void FocusOnItem(EDA_ITEM *aItem, bool aAllowScroll=true) override
Focus on a particular canvas item.
 
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()
Show 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
 
virtual void Update3DView(bool aMarkDirty, bool aRefresh, const wxString *aTitle=nullptr)
Update the 3D view, if the viewer is opened by this frame.
 
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(const char *aFilename)
Return a handle to the a given settings by type.
 
Represent a set of closed polygons.
 
void ClearArcs()
Removes all arc references from all the outlines and holes in the polyset.
 
bool IsEmpty() const
Return true if the set is empty (no polygons at all)
 
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)
 
void BooleanIntersection(const SHAPE_POLY_SET &b)
Perform boolean polyset intersection.
 
void BooleanSubtract(const SHAPE_POLY_SET &b)
Perform boolean polyset difference.
 
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 DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
 
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
 
This file is part of the common library.
 
@ ALLOW_ACUTE_CORNERS
just inflate the polygon. Acute angles create spikes
 
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
 
const wxChar *const traceLibWatch
Flag to enable debug output for library file watch refreshes.
 
bool IsCopperLayer(int aLayerId)
Test 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.
 
@ GEOMETRY
Position or shape has changed.
 
@ ALL
All except INITIAL_ADD.
 
Declaration of the NL_PCBNEW_PLUGIN class.
 
wxDEFINE_EVENT(EDA_EVT_BOARD_CHANGING, 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.
 
std::vector< GRID > grids
 
Common grid settings, available to every frame.
 
bool m_ForceShowFieldsWhenFPSelected
 
wxLogTrace helper definitions.
 
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_BARCODE_T
class PCB_BARCODE, a barcode (graphic item)
 
@ 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
 
VECTOR2< double > VECTOR2D
 
VECTOR2D ToVECTOR2D(const wxPoint &aPoint)
 
Definition of file extensions used in Kicad.