30#include <boost/version.hpp>
32#if BOOST_VERSION >= 106700
33#include <boost/uuid/entropy_error.hpp>
77 const wxString& aTitle,
const wxPoint& aPos,
const wxSize& aSize,
78 long aStyle,
const wxString& aFrameName ) :
79 EDA_DRAW_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName,
82 m_originTransforms( *this ),
83 m_spaceMouse( nullptr )
109 viewer3D->Close(
true );
113 Prj().Cleanup3DCache();
152 draw3DFrame->SetTitle( *aTitle );
186 tbl->
Load( projectFpLibTableFileName );
205 if(
m_pcb != aBoard )
224 wxCommandEvent e( EDA_EVT_BOARD_CHANGED );
225 ProcessEventLocally( e );
229 wxCHECK2( listener,
continue );
233 wxWindow* win =
dynamic_cast<wxWindow*
>( listener );
236 win->HandleWindowEvent( e );
238 listener->SafelyProcessEvent( e );
295 std::vector<BOARD_ITEM*> items;
298 items.push_back( aItem );
306 static std::vector<KIID> lastBrightenedItemIDs;
310 for(
KIID lastBrightenedItemID : lastBrightenedItemIDs )
314 #if BOOST_VERSION >= 106700
319 catch(
const boost::uuids::entropy_error& )
321 wxLogError( wxT(
"A Boost UUID entropy exception was thrown in %s:%s." ),
322 __FILE__, __FUNCTION__ );
334 static_cast<FOOTPRINT*
>( lastItem )->RunOnChildren(
342 static_cast<PCB_GROUP*
>( lastItem )->RunOnChildren(
350 lastBrightenedItemID =
niluuid;
355 lastBrightenedItemIDs.clear();
366 wxPoint dialogPos =
GetCanvas()->ScreenToClient( dialog->GetScreenPosition() );
374 catch(
const ClipperLib::clipperException& exc )
378 wxLogError( wxT(
"Clipper library exception '%s' occurred." ), exc.what() );
388 item->SetBrightened();
392 static_cast<FOOTPRINT*
>( item )->RunOnChildren(
400 static_cast<PCB_GROUP*
>( item )->RunOnChildren(
408 lastBrightenedItemIDs.push_back( item->m_Uuid );
413 focusPt = item->GetPosition();
416 aLayer = item->GetLayerSet().Seq()[0];
418 switch( item->Type() )
423 itemPoly =
static_cast<FOOTPRINT*
>( item )->GetBoundingHull();
425 catch(
const ClipperLib::clipperException& exc )
429 wxLogError( wxT(
"Clipper library exception '%s' occurred." ), exc.what() );
451 item->TransformShapeToPolygon( itemPoly, aLayer, 0,
pcbIUScale.
mmToIU( 0.1 ),
457 ZONE* zone =
static_cast<ZONE*
>( item );
478 BOX2I item_bbox = item->GetBoundingBox();
493 catch(
const ClipperLib::clipperException& exc )
497 wxLogError( wxT(
"Clipper library exception '%s' occurred." ), exc.what() );
501 itemPoly = clippedPoly;
520 catch(
const ClipperLib::clipperException& exc )
524 wxLogError( wxT(
"Clipper library exception '%s' occurred." ), exc.what() );
547 if( view &&
GetBoard()->m_SolderMask )
605 case PCB_DISPLAY_ORIGIN::PCB_ORIGIN_PAGE:
break;
606 case PCB_DISPLAY_ORIGIN::PCB_ORIGIN_AUX: origin =
GetAuxOrigin();
break;
607 case PCB_DISPLAY_ORIGIN::PCB_ORIGIN_GRID: origin =
GetGridOrigin();
break;
608 default: wxASSERT(
false );
break;
680 area.
SetEnd( pageSize.
x, pageSize.
y );
684 area.
SetOrigin( -pageSize.
x / 2, -pageSize.
y / 2 );
685 area.
SetEnd( pageSize.
x / 2, pageSize.
y / 2 );
718 if( draw3DFrame->IsIconized() )
719 draw3DFrame->Iconize(
false );
721 draw3DFrame->Raise();
722 draw3DFrame->Show(
true );
725 if( wxWindow::FindFocus() != draw3DFrame )
726 draw3DFrame->SetFocus();
747 if( layer == preslayer )
778 if( displ_opts.m_ContrastModeDisplay != HIGH_CONTRAST_MODE::NORMAL )
813 line.Printf( wxT(
"grid X %s Y %s" ),
817 SetStatusText( line, 4 );
837 double theta =
RAD2DEG( atan2( -dy, dx ) );
838 double ro = hypot( dx, dy );
840 line.Printf( wxT(
"r %s theta %.3f" ),
844 SetStatusText( line, 3 );
852 line.Printf( wxT(
"X %s Y %s" ),
855 SetStatusText( line, 2 );
867 line.Printf( wxT(
"dx %s dy %s dist %s" ),
871 SetStatusText( line, 3 );
1004 else if(
dynamic_cast<PCB_TRACK*
>( aItem ) )
1008 else if(
dynamic_cast<PAD*
>( aItem ) )
1091 catch(
const std::system_error& e )
1093 wxLogTrace( wxT(
"KI_TRACE_NAVLIB" ), e.what() );
1123 if(
via->GetViaType() == VIATYPE::BLIND_BURIED
1124 ||
via->GetViaType() == VIATYPE::MICROVIA
1125 ||
via->GetRemoveUnconnected() )
1127 return hcVisChanged ? KIGFX::ALL : KIGFX::REPAINT;
1130 else if(
PAD*
pad =
dynamic_cast<PAD*
>( aItem ) )
1132 if(
pad->GetRemoveUnconnected() )
1155 wxString libfullname;
1158 if( !aFootprint || !tbl )
1170 catch(
const std::exception& e )
1177 wxLogTrace(
"KICAD_LIB_WATCH",
"Error: %s", error.
What() );
1190 m_watcher = std::make_unique<wxFileSystemWatcher>();
1195 fn.DontFollowLink();
1209 wxLogTrace(
"KICAD_LIB_WATCH",
"Failed to start the debounce timer" );
1217 wxLogTrace(
"KICAD_LIB_WATCH",
"OnFpChangeDebounceTimer" );
1220 wxLog::EnableLogging(
false );
1222 wxLog::EnableLogging(
true );
1236 ||
IsOK(
this,
_(
"The library containing the current footprint has changed.\n"
1237 "Do you want to reload the footprint?" ) ) )
constexpr EDA_IU_SCALE pcbIUScale
constexpr int ARC_LOW_DEF
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< wxString > 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...
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 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.
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()
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
KIGFX::GAL * GetGAL() const
Return a pointer to the GAL instance used in the panel.
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.
const VECTOR2D & GetGridSize() const
Return the grid size.
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
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.
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...
void Load(const wxString &aFileName)
Load the library table using the path defined by aFileName aFallBackTable.
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 VECTOR2I GetSizeIU(double aIUScale) const
Gets the page size in internal units.
MAGNETIC_SETTINGS m_MagneticItems
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)
void DisplayGridMsg() override
Display the current grid pane on the status bar.
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.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void RedrawRatsnest()
Return the bounding box of the view that should be used if model is not valid.
A set of BOARD_ITEMs (i.e., without duplicates).
Parameters and options when plotting/printing a board.
A progress reporter interface for use in multi-threaded environments.
virtual FP_LIB_TABLE * PcbFootprintLibs(KIWAY &aKiway)
Return the table of footprint libraries.
virtual const wxString FootprintLibTblName() const
Returns the path and filename of this project's footprint library table.
virtual _ELEM * GetElem(ELEM_T aIndex)
Get and set the elements for this project.
virtual void SetElem(ELEM_T aIndex, _ELEM *aElem)
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.
@ ALLOW_ACUTE_CORNERS
just inflate the polygon. Acute angles create spikes
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)
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.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.
FP_LIB_TABLE GFootprintTable
The global footprint library table.
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_VIEWER_MODAL
@ FRAME_FOOTPRINT_PREVIEW
bool m_Use3DConnexionDriver
Use the 3DConnexion Driver.
const std::string KiCadFootprintFileExtension
bool IsCopperLayer(int aLayerId)
Tests whether a layer is a copper layer.
@ LAYER_MOD_TEXT_INVISIBLE
text marked as invisible
@ LAYER_PAD_FR
smd pads, front layer
@ LAYER_MOD_FR
show footprints on front
@ LAYER_PAD_BK
smd pads, back layer
@ LAYER_MOD_VALUES
show footprints values (when texts are visible)
@ LAYER_PADS_TH
multilayer pads, usually with holes
@ LAYER_VIAS
Meta control for all vias opacity/visibility.
@ LAYER_MOD_BK
show footprints on back
@ LAYER_MOD_REFERENCES
show footprints references (when texts are visible)
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< wxString > sizes
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_GROUP_T
class PCB_GROUP, a set of BOARD_ITEMs
@ 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_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.