30#include <boost/version.hpp>
32#if BOOST_VERSION >= 106700
33#include <boost/uuid/entropy_error.hpp>
60#include <wx/fswatcher.h>
82 const wxString& aTitle,
const wxPoint& aPos,
const wxSize& aSize,
83 long aStyle,
const wxString& aFrameName ) :
84 EDA_DRAW_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName,
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 );
267 std::vector<BOARD_ITEM*> items;
270 items.push_back( aItem );
278 static std::vector<KIID> lastBrightenedItemIDs;
280 bool itemsUnbrightened =
false;
282 for(
KIID lastBrightenedItemID : lastBrightenedItemIDs )
286 lastItem->ClearBrightened();
288 itemsUnbrightened =
true;
292 if( itemsUnbrightened )
295 lastBrightenedItemIDs.clear();
306 wxPoint dialogPos =
GetCanvas()->ScreenToClient( dialog->GetScreenPosition() );
314 catch(
const std::exception& e )
316 wxFAIL_MSG( wxString::Format( wxT(
"Clipper exception occurred: %s" ), e.what() ) );
326 item->SetBrightened();
327 lastBrightenedItemIDs.push_back( item->m_Uuid );
333 lastBrightenedItemIDs.push_back( child->
m_Uuid );
342 focusPt = item->GetPosition();
345 aLayer = item->GetLayerSet().Seq()[0];
347 switch( item->Type() )
352 itemPoly =
static_cast<FOOTPRINT*
>( item )->GetBoundingHull();
354 catch(
const std::exception& e )
356 wxFAIL_MSG( wxString::Format( wxT(
"Clipper exception occurred: %s" ), e.what() ) );
384 ZONE* zone =
static_cast<ZONE*
>( item );
404 BOX2I item_bbox = item->GetBoundingBox();
421 catch(
const std::exception& e )
423 wxFAIL_MSG( wxString::Format( wxT(
"Clipper exception occurred: %s" ), e.what() ) );
427 itemPoly = clippedPoly;
446 catch(
const std::exception& e )
448 wxFAIL_MSG( wxString::Format( wxT(
"Clipper exception occurred: %s" ), e.what() ) );
471 if( view &&
GetBoard()->m_SolderMaskBridges )
483 m_pcb->SetPageSettings( aPageSettings );
492 return m_pcb->GetPageSettings();
507 return m_pcb->GetDesignSettings().GetGridOrigin();
513 m_pcb->GetDesignSettings().SetGridOrigin( aPoint );
519 return m_pcb->GetDesignSettings().GetAuxOrigin();
532 default: wxASSERT(
false );
break;
546 return m_pcb->GetTitleBlock();
552 m_pcb->SetTitleBlock( aTitleBlock );
558 return m_pcb->GetDesignSettings();
571 return m_pcb->GetPlotOptions();
577 m_pcb->SetPlotOptions( aSettings );
582 if( visibleLayers.test(
F_Mask ) || visibleLayers.test(
B_Mask ) )
607 BOX2I area = aBoardEdgesOnly ?
m_pcb->GetBoardEdgesBoundingBox() :
m_pcb->GetBoundingBox();
616 area.
SetEnd( pageSize.
x, pageSize.
y );
620 area.
SetOrigin( -pageSize.
x / 2, -pageSize.
y / 2 );
621 area.
SetEnd( pageSize.
x / 2, pageSize.
y / 2 );
680 if( draw3DFrame->IsIconized() )
681 draw3DFrame->Iconize(
false );
683 draw3DFrame->Raise();
684 draw3DFrame->Show(
true );
687 if( wxWindow::FindFocus() != draw3DFrame )
688 draw3DFrame->SetFocus();
709 if( layer == preslayer )
716 if( layer >
m_pcb->GetCopperLayerStackMaxId() )
769 double theta =
RAD2DEG( atan2( -dy, dx ) );
770 double ro = hypot( dx, dy );
772 line.Printf( wxT(
"r %s theta %.3f" ),
776 SetStatusText( line, 3 );
784 line.Printf( wxT(
"X %s Y %s" ),
787 SetStatusText( line, 2 );
799 line.Printf( wxT(
"dx %s dy %s dist %s" ),
803 SetStatusText( line, 3 );
917 return &cfg->m_MagneticItems;
947 else if(
dynamic_cast<PCB_TRACK*
>( aItem ) )
951 else if(
dynamic_cast<PAD*
>( aItem ) )
957 if(
text->HasTextVars() )
959 text->ClearRenderCache();
960 text->ClearBoundingBoxCache();
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;
1085 ||
via->GetRemoveUnconnected()
1091 else if(
PAD*
pad =
dynamic_cast<PAD*
>( aItem ) )
1093 if(
pad->GetRemoveUnconnected()
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() );
1183 wxLogTrace(
"KICAD_LIB_WATCH",
"Failed to start the debounce timer" );
1199 wxLogTrace(
"KICAD_LIB_WATCH",
"Restarting debounce timer" );
1203 wxLogTrace(
"KICAD_LIB_WATCH",
"OnFpChangeDebounceTimer" );
1206 wxLog::EnableLogging(
false );
1208 wxLog::EnableLogging(
true );
1228 ||
IsOK(
this,
_(
"The library containing the current footprint has changed.\n"
1229 "Do you want to reload the footprint?" ) ) )
1240 std::vector<KIID> selectedItems;
1243 selectedItems.emplace_back( item->m_Uuid );
1254 std::vector<EDA_ITEM*> sel;
1256 for(
const KIID& uuid : selectedItems )
1259 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 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)
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()
std::vector< wxEvtHandler * > m_boardChangeListeners
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.
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)
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
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_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.
std::vector< GRID > grids
Common grid settings, available to every frame.
bool m_ForceShowFieldsWhenFPSelected
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
VECTOR2< double > VECTOR2D
VECTOR2D ToVECTOR2D(const wxPoint &aPoint)
Definition of file extensions used in Kicad.