30#include <boost/version.hpp>
32#if BOOST_VERSION >= 106700
33#include <boost/uuid/entropy_error.hpp>
78 const wxString& aTitle,
const wxPoint& aPos,
const wxSize& aSize,
79 long aStyle,
const wxString& aFrameName ) :
80 EDA_DRAW_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName,
83 m_originTransforms( *this ),
84 m_spaceMouse( nullptr )
111 viewer3D->Close(
true );
153 draw3DFrame->SetTitle( *aTitle );
166 if(
m_pcb != aBoard )
185 wxCommandEvent e( EDA_EVT_BOARD_CHANGED );
186 ProcessEventLocally( e );
190 wxCHECK2( listener,
continue );
194 wxWindow* win =
dynamic_cast<wxWindow*
>( listener );
197 win->HandleWindowEvent( e );
199 listener->SafelyProcessEvent( e );
256 std::vector<BOARD_ITEM*> items;
259 items.push_back( aItem );
267 static std::vector<KIID> lastBrightenedItemIDs;
271 for(
KIID lastBrightenedItemID : lastBrightenedItemIDs )
275 #if BOOST_VERSION >= 106700
280 catch(
const boost::uuids::entropy_error& )
282 wxLogError( wxT(
"A Boost UUID entropy exception was thrown in %s:%s." ),
283 __FILE__, __FUNCTION__ );
300 lastBrightenedItemID =
niluuid;
305 lastBrightenedItemIDs.clear();
316 wxPoint dialogPos =
GetCanvas()->ScreenToClient( dialog->GetScreenPosition() );
324 catch(
const std::exception& exc )
328 wxLogError( wxT(
"Clipper library exception '%s' occurred." ), exc.what() );
338 item->SetBrightened();
340 item->RunOnDescendants(
347 lastBrightenedItemIDs.push_back( item->m_Uuid );
352 focusPt = item->GetPosition();
355 aLayer = item->GetLayerSet().Seq()[0];
357 switch( item->Type() )
362 itemPoly =
static_cast<FOOTPRINT*
>( item )->GetBoundingHull();
364 catch(
const std::exception& exc )
368 wxLogError( wxT(
"Clipper library exception '%s' occurred." ), exc.what() );
391 item->TransformShapeToPolygon( itemPoly, aLayer, 0,
pcbIUScale.
mmToIU( 0.1 ),
397 ZONE* zone =
static_cast<ZONE*
>( item );
418 BOX2I item_bbox = item->GetBoundingBox();
433 catch(
const std::exception& exc )
437 wxLogError( wxT(
"Clipper library exception '%s' occurred." ), exc.what() );
441 itemPoly = clippedPoly;
460 catch(
const std::exception& exc )
464 wxLogError( wxT(
"Clipper library exception '%s' occurred." ), exc.what() );
487 if( view &&
GetBoard()->m_SolderMaskBridges )
545 case PCB_DISPLAY_ORIGIN::PCB_ORIGIN_PAGE:
break;
546 case PCB_DISPLAY_ORIGIN::PCB_ORIGIN_AUX: origin =
GetAuxOrigin();
break;
547 case PCB_DISPLAY_ORIGIN::PCB_ORIGIN_GRID: origin =
GetGridOrigin();
break;
548 default: wxASSERT(
false );
break;
610 if( visibleLayers.test(
F_Mask ) || visibleLayers.test(
B_Mask ) )
641 area.
SetEnd( pageSize.
x, pageSize.
y );
645 area.
SetOrigin( -pageSize.
x / 2, -pageSize.
y / 2 );
646 area.
SetEnd( pageSize.
x / 2, pageSize.
y / 2 );
684 if( draw3DFrame->IsIconized() )
685 draw3DFrame->Iconize(
false );
687 draw3DFrame->Raise();
688 draw3DFrame->Show(
true );
691 if( wxWindow::FindFocus() != draw3DFrame )
692 draw3DFrame->SetFocus();
713 if( layer == preslayer )
744 if( displ_opts.m_ContrastModeDisplay != HIGH_CONTRAST_MODE::NORMAL )
790 double theta =
RAD2DEG( atan2( -dy, dx ) );
791 double ro = hypot( dx, dy );
793 line.Printf( wxT(
"r %s theta %.3f" ),
797 SetStatusText( line, 3 );
805 line.Printf( wxT(
"X %s Y %s" ),
808 SetStatusText( line, 2 );
820 line.Printf( wxT(
"dx %s dy %s dist %s" ),
824 SetStatusText( line, 3 );
973 else if(
dynamic_cast<PCB_TRACK*
>( aItem ) )
977 else if(
dynamic_cast<PAD*
>( aItem ) )
1059 catch(
const std::system_error& e )
1061 wxLogTrace( wxT(
"KI_TRACE_NAVLIB" ), e.what() );
1083 bool showNetNames =
false;
1086 showNetNames =
config->m_Display.m_NetNames > 0;
1095 if(
via->GetViaType() == VIATYPE::BLIND_BURIED
1096 ||
via->GetViaType() == VIATYPE::MICROVIA
1097 ||
via->GetRemoveUnconnected()
1100 return hcVisChanged ? KIGFX::ALL : KIGFX::REPAINT;
1103 else if(
PAD*
pad =
dynamic_cast<PAD*
>( aItem ) )
1105 if(
pad->GetRemoveUnconnected()
1108 return hcVisChanged ? KIGFX::ALL : KIGFX::REPAINT;
1123 wxLogTrace(
"KICAD_LIB_WATCH",
"setFPWatcher" );
1129 wxLogTrace(
"KICAD_LIB_WATCH",
"Remove watch" );
1135 wxString libfullname;
1138 if( !aFootprint || !tbl )
1150 catch(
const std::exception& e )
1157 wxLogTrace(
"KICAD_LIB_WATCH",
"Error: %s", error.
What() );
1170 m_watcher = std::make_unique<wxFileSystemWatcher>();
1175 fn.DontFollowLink();
1177 wxLogTrace(
"KICAD_LIB_WATCH",
"Add watch: %s", fn.GetPath() );
1191 wxLogTrace(
"KICAD_LIB_WATCH",
"Failed to start the debounce timer" );
1199 wxLogTrace(
"KICAD_LIB_WATCH",
"OnFpChangeDebounceTimer" );
1202 wxLog::EnableLogging(
false );
1204 wxLog::EnableLogging(
true );
1222 ||
IsOK(
this,
_(
"The library containing the current footprint has changed.\n"
1223 "Do you want to reload the footprint?" ) ) )
1234 std::vector<KIID> selectedItems;
1239 selectedItems.emplace_back( item->m_Uuid );
1251 std::vector<EDA_ITEM*> sel;
1253 for(
const KIID& uuid : selectedItems )
1258 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()
void SetDefaultZoneSettings(const ZONE_SETTINGS &aSettings)
ZONE_SETTINGS & GetDefaultZoneSettings()
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) const
Invoke a function on all descendants.
Information pertinent to a Pcbnew printed circuit board.
void SetPlotOptions(const PCB_PLOT_PARAMS &aOptions)
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()
int GetCopperLayerCount() const
void IncrementTimeStamp()
void SetPageSettings(const PAGE_INFO &aPageSettings)
const PCB_PLOT_PARAMS & GetPlotOptions() const
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
void SetUserUnits(EDA_UNITS aUnits)
void SetOrigin(const Vec &pos)
const Vec & GetOrigin() const
coord_type GetHeight() const
coord_type GetWidth() const
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 th...
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 SetIgnoreMTextsMarkedNoShow(bool ignore)
void SetIgnoreModulesOnFront(bool ignore)
void SetIgnoreModulesRefs(bool ignore)
void SetIgnoreMicroVias(bool ignore)
void SetIgnorePadsOnBack(bool ignore)
void SetIgnoreModulesOnBack(bool ignore)
void SetIgnoreModulesVals(bool ignore)
void SetIgnoreThroughVias(bool ignore)
void SetIgnoreThroughHolePads(bool ignore)
void SetIgnoreMTextsOnFront(bool ignore)
void SetIgnoreMTextsOnBack(bool ignore)
void SetIgnorePadsOnFront(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.
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 selectionClear
Clear the current selection.
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 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
const ZONE_SETTINGS & GetZoneSettings() const
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.
void SetZoneSettings(const ZONE_SETTINGS &aSettings)
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.
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)
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
ZONE_SETTINGS handles zones parameters.
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
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_HIDDEN_TEXT
text marked as invisible
@ LAYER_FOOTPRINTS_BK
show footprints on back
@ LAYER_PADS_SMD_BK
smd pads, back layer
@ LAYER_PADS_TH
multilayer pads, usually with holes
@ LAYER_PADS_SMD_FR
smd pads, front layer
@ 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)
Class to handle a set of BOARD_ITEMs.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
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
VECTOR2D ToVECTOR2D(const wxPoint &aPoint)
Definition of file extensions used in Kicad.
#define ZOOM_LIST_PCBNEW_HYPER