First pass renaming module to footprint

This is mostly in comments and the few remainin text strings that
reference module
This commit is contained in:
Seth Hillbrand 2020-10-20 20:48:06 -07:00
parent 06bf7943b7
commit f8a4edb1c9
62 changed files with 140 additions and 140 deletions

View File

@ -290,7 +290,7 @@ void S3D_PLUGIN_MANAGER::listPlugins( const wxString& aPath,
{ {
// list potential plugins given a search path // list potential plugins given a search path
wxString nameFilter; // filter for user-loadable libraries (aka modules) wxString nameFilter; // filter for user-loadable libraries (aka footprints)
wxString lName; // stores name of enumerated files wxString lName; // stores name of enumerated files
wxString fName; // full name of file wxString fName; // full name of file
wxDir wd; wxDir wd;

View File

@ -231,7 +231,7 @@ class BOARD_ADAPTER
/** /**
* @brief GetModulesZcoord3DIU - Get the position of the module in 3d integer units * @brief GetModulesZcoord3DIU - Get the position of the module in 3d integer units
* considering if it is flipped or not. * considering if it is flipped or not.
* @param aIsFlipped: true for use in modules on Front (top) layer, false * @param aIsFlipped: true for use in footprints on Front (top) layer, false
* if module is on back (bottom) layer * if module is on back (bottom) layer
* @return the Z position of 3D shapes, in 3D integer units * @return the Z position of 3D shapes, in 3D integer units
*/ */

View File

@ -224,7 +224,7 @@ void BOARD_ADAPTER::AddGraphicsShapesWithClearanceToContainer( const MODULE* aMo
} }
} }
// Convert texts sur modules // Convert texts sur footprints
if( aModule->Reference().GetLayer() == aLayerId && aModule->Reference().IsVisible() ) if( aModule->Reference().GetLayer() == aLayerId && aModule->Reference().IsVisible() )
texts.push_back( &aModule->Reference() ); texts.push_back( &aModule->Reference() );

View File

@ -458,7 +458,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
} }
} }
// Add holes of modules // Add holes of footprints
// ///////////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////////////
for( MODULE* module : m_board->Modules() ) for( MODULE* module : m_board->Modules() )
{ {
@ -534,7 +534,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
const bool renderPlatedPadsAsPlated = GetFlag( FL_RENDER_PLATED_PADS_AS_PLATED ); const bool renderPlatedPadsAsPlated = GetFlag( FL_RENDER_PLATED_PADS_AS_PLATED );
// Add modules PADs objects to containers // Add footprints PADs objects to containers
for( PCB_LAYER_ID curr_layer_id : layer_id ) for( PCB_LAYER_ID curr_layer_id : layer_id )
{ {
wxASSERT( m_layers_container2D.find( curr_layer_id ) != m_layers_container2D.end() ); wxASSERT( m_layers_container2D.find( curr_layer_id ) != m_layers_container2D.end() );
@ -549,7 +549,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
AddPadsShapesWithClearanceToContainer( module, layerContainer, curr_layer_id, 0, AddPadsShapesWithClearanceToContainer( module, layerContainer, curr_layer_id, 0,
true, renderPlatedPadsAsPlated, false ); true, renderPlatedPadsAsPlated, false );
// Micro-wave modules may have items on copper layers // Micro-wave footprints may have items on copper layers
AddGraphicsShapesWithClearanceToContainer( module, layerContainer, curr_layer_id, 0 ); AddGraphicsShapesWithClearanceToContainer( module, layerContainer, curr_layer_id, 0 );
} }
} }
@ -567,7 +567,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
} }
} }
// Add modules PADs poly contourns (vertical outlines) // Add footprints PADs poly contourns (vertical outlines)
if( GetFlag( FL_RENDER_OPENGL_COPPER_THICKNESS ) if( GetFlag( FL_RENDER_OPENGL_COPPER_THICKNESS )
&& ( m_render_engine == RENDER_ENGINE::OPENGL_LEGACY ) ) && ( m_render_engine == RENDER_ENGINE::OPENGL_LEGACY ) )
{ {
@ -980,7 +980,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
} }
// Add modules tech layers - objects // Add footprints tech layers - objects
// ///////////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////////
for( MODULE* module : m_board->Modules() ) for( MODULE* module : m_board->Modules() )
{ {
@ -1008,7 +1008,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
} }
// Add modules tech layers - contours // Add footprints tech layers - contours
for( MODULE* module : m_board->Modules() ) for( MODULE* module : m_board->Modules() )
{ {
if( (curr_layer_id == F_SilkS) || (curr_layer_id == B_SilkS) ) if( (curr_layer_id == F_SilkS) || (curr_layer_id == B_SilkS) )

View File

@ -271,7 +271,7 @@ private:
bool m_opengl_supports_raytracing; bool m_opengl_supports_raytracing;
bool m_render_raytracing_was_requested; bool m_render_raytracing_was_requested;
CCONTAINER m_3DShapes_container; // Holds 3D shapes from modules CCONTAINER m_3DShapes_container; // Holds 3D shapes from footprints
CGENERICACCELERATOR *m_accelerator3DShapes; // used for mouse over searching CGENERICACCELERATOR *m_accelerator3DShapes; // used for mouse over searching
BOARD_ITEM* m_currentIntersectedBoardItem; BOARD_ITEM* m_currentIntersectedBoardItem;

View File

@ -908,7 +908,7 @@ void C3D_RENDER_OGL_LEGACY::load_3D_models( REPORTER* aStatusReporter )
(!m_boardAdapter.GetFlag( FL_MODULE_ATTRIBUTES_VIRTUAL )) ) (!m_boardAdapter.GetFlag( FL_MODULE_ATTRIBUTES_VIRTUAL )) )
return; return;
// Go for all modules // Go for all footprints
for( MODULE* module : m_boardAdapter.GetBoard()->Modules() ) for( MODULE* module : m_boardAdapter.GetBoard()->Modules() )
{ {
for( const MODULE_3D_SETTINGS& model : module->Models() ) for( const MODULE_3D_SETTINGS& model : module->Models() )

View File

@ -1255,7 +1255,7 @@ void C3D_RENDER_OGL_LEGACY::render_3D_models_selected( bool aRenderTopOrBot, boo
C_OGL_3DMODEL::BeginDrawMulti( !aRenderSelectedOnly ); C_OGL_3DMODEL::BeginDrawMulti( !aRenderSelectedOnly );
// Go for all modules // Go for all footprints
for( auto module : m_boardAdapter.GetBoard()->Modules() ) for( auto module : m_boardAdapter.GetBoard()->Modules() )
{ {
const bool isIntersected = ( module == m_currentIntersectedBoardItem ); const bool isIntersected = ( module == m_currentIntersectedBoardItem );

View File

@ -95,7 +95,7 @@ private:
CLAYERS_OGL_DISP_LISTS* m_ogl_disp_list_through_holes_outer_ring; CLAYERS_OGL_DISP_LISTS* m_ogl_disp_list_through_holes_outer_ring;
//CLAYERS_OGL_DISP_LISTS* m_ogl_disp_list_through_holes_vias_inner; // Not in use //CLAYERS_OGL_DISP_LISTS* m_ogl_disp_list_through_holes_vias_inner; // Not in use
// This is for pads holes of the modules // This is for pads holes of the footprints
//CLAYERS_OGL_DISP_LISTS* m_ogl_disp_list_vias_and_pad_holes_inner_contourn_and_caps; //CLAYERS_OGL_DISP_LISTS* m_ogl_disp_list_vias_and_pad_holes_inner_contourn_and_caps;
CLAYERS_OGL_DISP_LISTS* m_ogl_disp_list_vias_and_pad_holes_outer_contourn_and_caps; CLAYERS_OGL_DISP_LISTS* m_ogl_disp_list_vias_and_pad_holes_outer_contourn_and_caps;

View File

@ -1267,7 +1267,7 @@ void C3D_RENDER_RAYTRACING::add_3D_vias_and_pads_to_container()
void C3D_RENDER_RAYTRACING::load_3D_models( CCONTAINER &aDstContainer, bool aSkipMaterialInformation ) void C3D_RENDER_RAYTRACING::load_3D_models( CCONTAINER &aDstContainer, bool aSkipMaterialInformation )
{ {
// Go for all modules // Go for all footprints
for( auto module : m_boardAdapter.GetBoard()->Modules() ) for( auto module : m_boardAdapter.GetBoard()->Modules() )
{ {
if((!module->Models().empty() ) && if((!module->Models().empty() ) &&

View File

@ -104,7 +104,7 @@ PGM_BASE& Pgm()
return program; return program;
} }
// A module to allow Html modules initialization/cleanup // A module to allow Html footprints initialization/cleanup
// When a wxHtmlWindow is used *only* in a dll/so module, the Html text is displayed // When a wxHtmlWindow is used *only* in a dll/so module, the Html text is displayed
// as plain text. // as plain text.
// This helper class is just used to force wxHtmlWinParser initialization // This helper class is just used to force wxHtmlWinParser initialization
@ -161,7 +161,7 @@ struct APP_SINGLE_TOP : public wxApp
#endif #endif
// Force wxHtmlWinParser initialization when a wxHtmlWindow is used only // Force wxHtmlWinParser initialization when a wxHtmlWindow is used only
// in a shared modules (.so or .dll file) // in a shared footprints (.so or .dll file)
// Otherwise the Html text is displayed as plain text. // Otherwise the Html text is displayed as plain text.
HtmlModule html_init; HtmlModule html_init;
@ -402,7 +402,7 @@ bool PGM_SINGLE_TOP::OnPgmInit()
#if defined(PGM_DATA_FILE_EXT) #if defined(PGM_DATA_FILE_EXT)
// PGM_DATA_FILE_EXT, if present, may be different for each compile, // PGM_DATA_FILE_EXT, if present, may be different for each compile,
// it may come from CMake on the compiler command line, but often does not. // it may come from CMake on the compiler command line, but often does not.
// This facility is mostly useful for those program modules // This facility is mostly useful for those program footprints
// supporting a single argv[1]. // supporting a single argv[1].
if( !argv1.GetExt() ) if( !argv1.GetExt() )
argv1.SetExt( wxT( PGM_DATA_FILE_EXT ) ); argv1.SetExt( wxT( PGM_DATA_FILE_EXT ) );

View File

@ -117,7 +117,7 @@ static struct PGM_PYTHON : public PGM_BASE
#if defined(PGM_DATA_FILE_EXT) #if defined(PGM_DATA_FILE_EXT)
// PGM_DATA_FILE_EXT, if present, may be different for each compile, // PGM_DATA_FILE_EXT, if present, may be different for each compile,
// it may come from CMake on the compiler command line, but often does not. // it may come from CMake on the compiler command line, but often does not.
// This facillity is mostly useful for those program modules // This facillity is mostly useful for those program footprints
// supporting a single argv[1]. // supporting a single argv[1].
if( !argv1.GetExt() ) if( !argv1.GetExt() )
argv1.SetExt( wxT( PGM_DATA_FILE_EXT ) ); argv1.SetExt( wxT( PGM_DATA_FILE_EXT ) );

View File

@ -86,7 +86,7 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) :
ReCreateMenuBar(); ReCreateMenuBar();
ReCreateHToolbar(); ReCreateHToolbar();
// Create list of available modules and components of the schematic // Create list of available footprints and components of the schematic
BuildCmpListBox(); BuildCmpListBox();
BuildFOOTPRINTS_LISTBOX(); BuildFOOTPRINTS_LISTBOX();
BuildLIBRARY_LISTBOX(); BuildLIBRARY_LISTBOX();

View File

@ -74,7 +74,7 @@ public:
std::map<wxString, wxString> m_pinMap; std::map<wxString, wxString> m_pinMap;
}; };
///> Map to hold NETLIST modules data ///> Map to hold NETLIST footprints data
using PCB_MODULES_MAP = std::map<wxString, std::shared_ptr<PCB_MODULE_DATA>>; using PCB_MODULES_MAP = std::map<wxString, std::shared_ptr<PCB_MODULE_DATA>>;
using CHANGELIST_ITEM = std::pair<SCH_REFERENCE, std::shared_ptr<PCB_MODULE_DATA>>; using CHANGELIST_ITEM = std::pair<SCH_REFERENCE, std::shared_ptr<PCB_MODULE_DATA>>;
@ -131,7 +131,7 @@ private:
void getChangeList(); void getChangeList();
/** /**
* @brief Check if some symbols are not represented in PCB modules and vice versa. * @brief Check if some symbols are not represented in PCB footprints and vice versa.
* \ref m_refs must be sorted by path * \ref m_refs must be sorted by path
*/ */
void checkForUnusedSymbols(); void checkForUnusedSymbols();

View File

@ -241,7 +241,7 @@ void GBR_TO_PCB_EXPORTER::export_non_copper_item( GERBER_DRAW_ITEM* aGbrItem, LA
/* /*
* Many holes will be pads, but we have no way to create those without modules, and creating * Many holes will be pads, but we have no way to create those without footprints, and creating
* a module per pad is not really viable. * a module per pad is not really viable.
* *
* So we use vias to mimic holes, with the loss of any hole shape (as we only have round holes * So we use vias to mimic holes, with the loss of any hole shape (as we only have round holes

View File

@ -78,7 +78,7 @@ private:
* write a via to the board file. * write a via to the board file.
* Some of these will represent actual vias while others are used to represent * Some of these will represent actual vias while others are used to represent
* holes in pads. (We can't generate actual pads because the Gerbers don't contain * holes in pads. (We can't generate actual pads because the Gerbers don't contain
* info on how to group them into modules.) * info on how to group them into footprints.)
* @param aVia * @param aVia
*/ */
void export_via( const EXPORT_VIA& aVia ); void export_via( const EXPORT_VIA& aVia );

View File

@ -264,7 +264,7 @@ public:
*/ */
virtual bool IsLocked() const virtual bool IsLocked() const
{ {
// only MODULEs & TRACKs can be locked at this time. // only footprints & TRACKs can be locked at this time.
return false; return false;
} }
@ -274,7 +274,7 @@ public:
*/ */
virtual void SetLocked( bool aLocked ) virtual void SetLocked( bool aLocked )
{ {
// only MODULEs & TRACKs can be locked at this time. // only footprints & TRACKs can be locked at this time.
} }
/** /**

View File

@ -194,10 +194,10 @@ enum GAL_LAYER_ID: int
LAYER_GRID, LAYER_GRID,
LAYER_GRID_AXES, LAYER_GRID_AXES,
LAYER_NO_CONNECTS, ///< show a marker on pads with no nets LAYER_NO_CONNECTS, ///< show a marker on pads with no nets
LAYER_MOD_FR, ///< show modules on front LAYER_MOD_FR, ///< show footprints on front
LAYER_MOD_BK, ///< show modules on back LAYER_MOD_BK, ///< show footprints on back
LAYER_MOD_VALUES, ///< show modules values (when texts are visibles) LAYER_MOD_VALUES, ///< show footprints values (when texts are visibles)
LAYER_MOD_REFERENCES, ///< show modules references (when texts are visibles) LAYER_MOD_REFERENCES, ///< show footprints references (when texts are visibles)
LAYER_TRACKS, LAYER_TRACKS,
LAYER_PADS_TH, ///< multilayer pads, usually with holes LAYER_PADS_TH, ///< multilayer pads, usually with holes
LAYER_PADS_PLATEDHOLES, ///< to draw pad holes (plated) LAYER_PADS_PLATEDHOLES, ///< to draw pad holes (plated)

View File

@ -286,7 +286,7 @@ public:
*/ */
virtual void OnModify(); virtual void OnModify();
// Modules (footprints) // footprints (footprints)
/** /**
* Function CreateNewModule * Function CreateNewModule

View File

@ -127,7 +127,7 @@ void ARRAY_CREATOR::Invoke()
// PCB items keep the same numbering // PCB items keep the same numbering
// @TODO: renumber modules if asked. This needs UI to enable. // @TODO: renumber footprints if asked. This needs UI to enable.
// something like this, but needs a "block offset" to prevent // something like this, but needs a "block offset" to prevent
// multiple selections overlapping. // multiple selections overlapping.
// if( new_item->Type() == PCB_MODULE_T ) // if( new_item->Type() == PCB_MODULE_T )

View File

@ -103,7 +103,7 @@ private:
/** /**
* Find the "best" module place. The criteria are: * Find the "best" module place. The criteria are:
* - Maximum ratsnest with modules already placed * - Maximum ratsnest with footprints already placed
* - Max size, and number of pads max * - Max size, and number of pads max
*/ */
MODULE* pickModule(); MODULE* pickModule();

View File

@ -62,7 +62,7 @@ const int scale = (int)(0.01 * IU_PER_MM);
const int PADDING = (int)(1 * IU_PER_MM); const int PADDING = (int)(1 * IU_PER_MM);
// Populates a list of rectangles, from a list of modules // Populates a list of rectangles, from a list of footprints
void fillRectList( CSubRectArray& vecSubRects, std::vector <MODULE*>& aModuleList ) void fillRectList( CSubRectArray& vecSubRects, std::vector <MODULE*>& aModuleList )
{ {
vecSubRects.clear(); vecSubRects.clear();

View File

@ -140,7 +140,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry, bool a
{ {
if( m_editModules ) if( m_editModules )
{ {
// modules inside modules are not supported yet // footprints inside footprints are not supported yet
wxASSERT( boardItem->Type() != PCB_MODULE_T ); wxASSERT( boardItem->Type() != PCB_MODULE_T );
boardItem->SetParent( board->Modules().front() ); boardItem->SetParent( board->Modules().front() );
@ -188,7 +188,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry, bool a
case PCB_FP_SHAPE_T: case PCB_FP_SHAPE_T:
case PCB_FP_TEXT_T: case PCB_FP_TEXT_T:
case PCB_FP_ZONE_AREA_T: case PCB_FP_ZONE_AREA_T:
// This level can only handle module items when editing modules // This level can only handle module items when editing footprints
wxASSERT( m_editModules ); wxASSERT( m_editModules );
if( boardItem->Type() == PCB_FP_TEXT_T ) if( boardItem->Type() == PCB_FP_TEXT_T )
@ -233,7 +233,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry, bool a
case PCB_MODULE_T: case PCB_MODULE_T:
{ {
// There are no modules inside a module yet // There are no footprints inside a module yet
wxASSERT( !m_editModules ); wxASSERT( !m_editModules );
MODULE* module = static_cast<MODULE*>( boardItem ); MODULE* module = static_cast<MODULE*>( boardItem );

View File

@ -81,7 +81,7 @@ void BOARD::ConvertBrdLayerToPolygonalContours( PCB_LAYER_ID aLayer, SHAPE_POLY_
module->TransformPadsShapesWithClearanceToPolygon( aOutlines, aLayer, 0, maxError, module->TransformPadsShapesWithClearanceToPolygon( aOutlines, aLayer, 0, maxError,
ERROR_INSIDE ); ERROR_INSIDE );
// Micro-wave modules may have items on copper layers // Micro-wave footprints may have items on copper layers
module->TransformGraphicShapesWithClearanceToPolygonSet( aOutlines, aLayer, 0, maxError, module->TransformGraphicShapesWithClearanceToPolygonSet( aOutlines, aLayer, 0, maxError,
ERROR_INSIDE ); ERROR_INSIDE );
} }

View File

@ -1106,7 +1106,7 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR inspector, void* testData, const KICAD_T s
break; break;
/* Instances of the requested KICAD_T live in a list, either one /* Instances of the requested KICAD_T live in a list, either one
* that I manage, or that my modules manage. If it's a type managed * that I manage, or that my footprints manage. If it's a type managed
* by class MODULE, then simply pass it on to each module's * by class MODULE, then simply pass it on to each module's
* MODULE::Visit() function by way of the * MODULE::Visit() function by way of the
* IterateForward( m_Modules, ... ) call. * IterateForward( m_Modules, ... ) call.

View File

@ -349,7 +349,7 @@ public:
} }
/** /**
* Removes all modules from the deque and frees the memory associated with them * Removes all footprints from the deque and frees the memory associated with them
*/ */
void DeleteAllModules() void DeleteAllModules()
{ {
@ -546,7 +546,7 @@ public:
/** /**
* Expect either of the two layers on which a module can reside, and returns * Expect either of the two layers on which a module can reside, and returns
* whether that layer is visible. * whether that layer is visible.
* @param aLayer One of the two allowed layers for modules: F_Cu or B_Cu * @param aLayer One of the two allowed layers for footprints: F_Cu or B_Cu
* @return bool - true if the layer is visible, else false. * @return bool - true if the layer is visible, else false.
*/ */
bool IsModuleLayerVisible( PCB_LAYER_ID aLayer ); bool IsModuleLayerVisible( PCB_LAYER_ID aLayer );
@ -1082,7 +1082,7 @@ public:
* @param aPosition A wxPoint object containing the position to test. * @param aPosition A wxPoint object containing the position to test.
* @param aActiveLayer Layer to test. * @param aActiveLayer Layer to test.
* @param aVisibleOnly Search only the visible layers if true. * @param aVisibleOnly Search only the visible layers if true.
* @param aIgnoreLocked Ignore locked modules when true. * @param aIgnoreLocked Ignore locked footprints when true.
* @return MODULE* The best module or NULL if none. * @return MODULE* The best module or NULL if none.
*/ */
MODULE* GetFootprint( const wxPoint& aPosition, PCB_LAYER_ID aActiveLayer, MODULE* GetFootprint( const wxPoint& aPosition, PCB_LAYER_ID aActiveLayer,

View File

@ -283,7 +283,7 @@ public:
*/ */
bool IsFlipped() const { return GetLayer() == B_Cu; } bool IsFlipped() const { return GetLayer() == B_Cu; }
// m_ModuleStatus bits: // m_footprintstatus bits:
#define MODULE_is_LOCKED 0x01 ///< module LOCKED: no autoplace allowed #define MODULE_is_LOCKED 0x01 ///< module LOCKED: no autoplace allowed
#define MODULE_is_PLACED 0x02 ///< In autoplace: module automatically placed #define MODULE_is_PLACED 0x02 ///< In autoplace: module automatically placed
#define MODULE_to_PLACE 0x04 ///< In autoplace: module waiting for autoplace #define MODULE_to_PLACE 0x04 ///< In autoplace: module waiting for autoplace

View File

@ -57,9 +57,9 @@ const KICAD_T GENERAL_COLLECTOR::AllBoardItems[] = {
PCB_VIA_T, // in m_tracks PCB_VIA_T, // in m_tracks
PCB_TRACE_T, // in m_tracks PCB_TRACE_T, // in m_tracks
PCB_ARC_T, // in m_tracks PCB_ARC_T, // in m_tracks
PCB_PAD_T, // in modules PCB_PAD_T, // in footprints
PCB_FP_TEXT_T, // in modules PCB_FP_TEXT_T, // in footprints
PCB_MODULE_T, // in m_modules PCB_MODULE_T, // in m_footprints
PCB_GROUP_T, // in m_groups PCB_GROUP_T, // in m_groups
PCB_ZONE_AREA_T, // in m_zones PCB_ZONE_AREA_T, // in m_zones
EOT EOT
@ -454,7 +454,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData )
{ {
PCB_LAYER_ID layer = item->GetLayer(); PCB_LAYER_ID layer = item->GetLayer();
// Modules and their subcomponents: reference, value and pads are not sensitive // footprints and their subcomponents: reference, value and pads are not sensitive
// to the layer visibility controls. They all have their own separate visibility // to the layer visibility controls. They all have their own separate visibility
// controls for vias, GetLayer() has no meaning, but IsOnLayer() works fine. User // controls for vias, GetLayer() has no meaning, but IsOnLayer() works fine. User
// text in module *is* sensitive to layer visibility but that was already handled. // text in module *is* sensitive to layer visibility but that was already handled.
@ -518,7 +518,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, void* testData )
PCB_LAYER_ID layer = item->GetLayer(); PCB_LAYER_ID layer = item->GetLayer();
// Modules and their subcomponents: reference, value and pads are not sensitive // footprints and their subcomponents: reference, value and pads are not sensitive
// to the layer visibility controls. They all have their own separate visibility // to the layer visibility controls. They all have their own separate visibility
// controls for vias, GetLayer() has no meaning, but IsOnLayer() works fine. User // controls for vias, GetLayer() has no meaning, but IsOnLayer() works fine. User
// text in module *is* sensitive to layer visibility but that was already handled. // text in module *is* sensitive to layer visibility but that was already handled.

View File

@ -155,7 +155,7 @@ public:
} }
/** /**
* @return bool - true if should ignore modules values. * @return bool - true if should ignore footprints values.
*/ */
virtual bool IgnoreModulesVals() const = 0; virtual bool IgnoreModulesVals() const = 0;
@ -454,7 +454,7 @@ public:
m_IgnoreMTextsMarkedNoShow = true; // g_ModuleTextNOVColor; m_IgnoreMTextsMarkedNoShow = true; // g_ModuleTextNOVColor;
m_IgnoreMTextsOnBack = true; m_IgnoreMTextsOnBack = true;
m_IgnoreMTextsOnFront = false; m_IgnoreMTextsOnFront = false;
m_IgnoreModulesOnBack = true; // !Show_Modules_Cmp; m_IgnoreModulesOnBack = true; // !Show_footprints_Cmp;
m_IgnoreModulesOnFront = false; m_IgnoreModulesOnFront = false;
m_IgnorePadsOnFront = false; m_IgnorePadsOnFront = false;
@ -588,13 +588,13 @@ public:
void SetIgnoreThroughHolePads(bool ignore) { m_IgnoreThroughHolePads = ignore; } void SetIgnoreThroughHolePads(bool ignore) { m_IgnoreThroughHolePads = ignore; }
/** /**
* @return bool - true if should ignore modules values. * @return bool - true if should ignore footprints values.
*/ */
bool IgnoreModulesVals() const override { return m_IgnoreModulesVals; } bool IgnoreModulesVals() const override { return m_IgnoreModulesVals; }
void SetIgnoreModulesVals(bool ignore) { m_IgnoreModulesVals = ignore; } void SetIgnoreModulesVals(bool ignore) { m_IgnoreModulesVals = ignore; }
/** /**
* @return bool - true if should ignore modules references. * @return bool - true if should ignore footprints references.
*/ */
bool IgnoreModulesRefs() const override { return m_IgnoreModulesRefs; } bool IgnoreModulesRefs() const override { return m_IgnoreModulesRefs; }
void SetIgnoreModulesRefs(bool ignore) { m_IgnoreModulesRefs = ignore; } void SetIgnoreModulesRefs(bool ignore) { m_IgnoreModulesRefs = ignore; }

View File

@ -453,7 +453,7 @@ static bool ChangeArrayCompare( const RefDesChange& aA, const RefDesChange& aB )
// //
/// Compare function to sort modules. /// Compare function to sort footprints.
/// @return true if the first coordinate should be before the second coordinate /// @return true if the first coordinate should be before the second coordinate
static bool ModuleCompare( const RefDesInfo& aA, const RefDesInfo& aB ) static bool ModuleCompare( const RefDesInfo& aA, const RefDesInfo& aB )
{ {
@ -549,13 +549,13 @@ void DIALOG_BOARD_REANNOTATE::LogChangePlan()
// //
/// Create a list of the modules and their coordinates /// Create a list of the footprints and their coordinates
void DIALOG_BOARD_REANNOTATE::LogModules( wxString& aMessage, std::vector<RefDesInfo>& aModules ) void DIALOG_BOARD_REANNOTATE::LogModules( wxString& aMessage, std::vector<RefDesInfo>& aModules )
{ {
wxString message = aMessage; wxString message = aMessage;
if( aModules.empty() ) if( aModules.empty() )
message += _( "\nNo modules" ); message += _( "\nNo footprints" );
else else
{ {
int i = 1; int i = 1;
@ -706,7 +706,7 @@ bool DIALOG_BOARD_REANNOTATE::BuildModuleList( std::vector<RefDesInfo>& aBadRefD
if( m_AnnotateSelection->GetValue() ) if( m_AnnotateSelection->GetValue() )
{ {
for( EDA_ITEM* item : m_selection ) for( EDA_ITEM* item : m_selection )
{ //Get the timestamps of selected modules { //Get the timestamps of selected footprints
if( item->Type() == PCB_MODULE_T ) if( item->Type() == PCB_MODULE_T )
selected.push_back( item->m_Uuid ); selected.push_back( item->m_Uuid );
} }
@ -782,7 +782,7 @@ bool DIALOG_BOARD_REANNOTATE::BuildModuleList( std::vector<RefDesInfo>& aBadRefD
for( KIID sel : selected ) for( KIID sel : selected )
{ {
if( thismodule.Uuid == sel ) if( thismodule.Uuid == sel )
{ //Found in selected modules { //Found in selected footprints
thismodule.Action = UpdateRefDes; //Update it thismodule.Action = UpdateRefDes; //Update it
break; break;
} }
@ -796,10 +796,10 @@ bool DIALOG_BOARD_REANNOTATE::BuildModuleList( std::vector<RefDesInfo>& aBadRefD
} }
SetSortCodes( FrontDirectionsArray, m_SortCode ); //Determine the sort order for the front SetSortCodes( FrontDirectionsArray, m_SortCode ); //Determine the sort order for the front
sort( m_FrontModules.begin(), m_FrontModules.end(),ModuleCompare ); //Sort the front modules sort( m_FrontModules.begin(), m_FrontModules.end(),ModuleCompare ); //Sort the front footprints
SetSortCodes( BackDirectionsArray, m_SortCode ); //Determine the sort order for the back SetSortCodes( BackDirectionsArray, m_SortCode ); //Determine the sort order for the back
sort( m_BackModules.begin(), m_BackModules.end(), ModuleCompare ); //Sort the back modules sort( m_BackModules.begin(), m_BackModules.end(), ModuleCompare ); //Sort the back footprints
m_RefDesTypes.clear(); m_RefDesTypes.clear();
m_ChangeArray.clear(); m_ChangeArray.clear();

View File

@ -180,10 +180,10 @@ void DIALOG_BOARD_STATISTICS::getDataFromPCB()
{ {
BOARD* board = m_parentFrame->GetBoard(); BOARD* board = m_parentFrame->GetBoard();
// Get modules and pads count // Get footprints and pads count
for( MODULE* module : board->Modules() ) for( MODULE* module : board->Modules() )
{ {
// Do not proceed modules with no pads if checkbox checked // Do not proceed footprints with no pads if checkbox checked
if( m_checkBoxExcludeComponentsNoPins->GetValue() && ! module->Pads().size() ) if( m_checkBoxExcludeComponentsNoPins->GetValue() && ! module->Pads().size() )
continue; continue;

View File

@ -88,7 +88,7 @@ static int iu_to_d356(int iu, int clamp)
return val; return val;
} }
/* Extract the D356 record from the modules (pads) */ /* Extract the D356 record from the footprints (pads) */
static void build_pad_testpoints( BOARD *aPcb, std::vector <D356_RECORD>& aRecords ) static void build_pad_testpoints( BOARD *aPcb, std::vector <D356_RECORD>& aRecords )
{ {
wxPoint origin = aPcb->GetDesignSettings().m_AuxOrigin; wxPoint origin = aPcb->GetDesignSettings().m_AuxOrigin;

View File

@ -48,7 +48,7 @@ static const char unit_text_inch[] = "## Unit = inches, Angle = deg.\n";
static const double conv_unit_mm = 1.0 / IU_PER_MM; // units = mm static const double conv_unit_mm = 1.0 / IU_PER_MM; // units = mm
static const char unit_text_mm[] = "## Unit = mm, Angle = deg.\n"; static const char unit_text_mm[] = "## Unit = mm, Angle = deg.\n";
// Sort function use by GenereModulesPosition() // Sort function use by GenerefootprintsPosition()
// sort is made by side (layer) top layer first // sort is made by side (layer) top layer first
// then by reference increasing order // then by reference increasing order
static bool sortFPlist( const LIST_MOD& ref, const LIST_MOD& tst ) static bool sortFPlist( const LIST_MOD& ref, const LIST_MOD& tst )

View File

@ -202,7 +202,7 @@ static const wxString getShapeName( MODULE* aModule )
// GerbTool chokes on units different than INCH so this is the conversion factor // GerbTool chokes on units different than INCH so this is the conversion factor
const static double SCALE_FACTOR = 1000.0 * IU_PER_MILS; const static double SCALE_FACTOR = 1000.0 * IU_PER_MILS;
/* Two helper functions to calculate coordinates of modules in gencad values /* Two helper functions to calculate coordinates of footprints in gencad values
* (GenCAD Y axis from bottom to top) * (GenCAD Y axis from bottom to top)
*/ */
static double MapXTo( int aX ) static double MapXTo( int aX )
@ -662,7 +662,7 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb )
} }
/// Compute hashes for modules without taking into account their position, rotation or layer /// Compute hashes for footprints without taking into account their position, rotation or layer
static size_t hashModule( const MODULE* aModule ) static size_t hashModule( const MODULE* aModule )
{ {
size_t ret = 0x11223344; size_t ret = 0x11223344;
@ -780,7 +780,7 @@ static void CreateShapesSection( FILE* aFile, BOARD* aPcb )
double orient = pad->GetOrientation() - module->GetOrientation(); double orient = pad->GetOrientation() - module->GetOrientation();
NORMALIZE_ANGLE_POS( orient ); NORMALIZE_ANGLE_POS( orient );
// Bottom side modules use the flipped padstack // Bottom side footprints use the flipped padstack
fprintf( aFile, ( flipBottomPads && module->GetFlag() ) ? fprintf( aFile, ( flipBottomPads && module->GetFlag() ) ?
"PIN \"%s\" PAD%dF %g %g %s %g %s\n" : "PIN \"%s\" PAD%dF %g %g %s %g %s\n" :
"PIN \"%s\" PAD%d %g %g %s %g %s\n", "PIN \"%s\" PAD%d %g %g %s %g %s\n",

View File

@ -268,7 +268,7 @@ UseBoundingBox:
/** /**
* Function idf_export_module * Function idf_export_module
* retrieves information from all board modules, adds drill holes to * retrieves information from all board footprints, adds drill holes to
* the DRILLED_HOLES or BOARD_OUTLINE section as appropriate, * the DRILLED_HOLES or BOARD_OUTLINE section as appropriate,
* compiles data for the PLACEMENT section and compiles data for * compiles data for the PLACEMENT section and compiles data for
* the library ELECTRICAL section. * the library ELECTRICAL section.
@ -351,7 +351,7 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule, IDF3_BOARD& aIDFBoa
double dlength = pad->GetDrillSize().y * scale; double dlength = pad->GetDrillSize().y * scale;
// NOTE: The orientation of modules and pads have // NOTE: The orientation of footprints and pads have
// the opposite sense due to KiCad drawing on a // the opposite sense due to KiCad drawing on a
// screen with a LH coordinate system // screen with a LH coordinate system
double angle = pad->GetOrientation() / 10.0; double angle = pad->GetOrientation() / 10.0;

View File

@ -245,10 +245,10 @@ public:
bool Load_Module_From_BOARD( MODULE* Module ); bool Load_Module_From_BOARD( MODULE* Module );
/** /**
* Display the list of modules currently existing on the BOARD. * Display the list of footprints currently existing on the BOARD.
* *
* @return a pointer to a module if this module is selected or NULL otherwise * @return a pointer to a module if this module is selected or NULL otherwise
* @param aPcb = the board from modules can be loaded * @param aPcb = the board from footprints can be loaded
*/ */
MODULE* SelectFootprintFromBoard( BOARD* aPcb ); MODULE* SelectFootprintFromBoard( BOARD* aPcb );

View File

@ -1022,7 +1022,7 @@ MODULE* PCB_BASE_FRAME::CreateNewModule( const wxString& aModuleName )
return NULL; return NULL;
} }
// Creates the new module and add it to the head of the linked list of modules // Creates the new module and add it to the head of the linked list of footprints
MODULE* module = new MODULE( GetBoard() ); MODULE* module = new MODULE( GetBoard() );
// Update parameters: timestamp ... // Update parameters: timestamp ...

View File

@ -28,7 +28,7 @@
#include <tool/tool_menu.h> #include <tool/tool_menu.h>
// Microwave shapes that are created as board modules when the user requests them. // Microwave shapes that are created as board footprints when the user requests them.
enum class MICROWAVE_FOOTPRINT_SHAPE enum class MICROWAVE_FOOTPRINT_SHAPE
{ {
GAP, GAP,

View File

@ -217,7 +217,7 @@ void NETINFO_MAPPING::Update()
for( TRACK* track : m_board->Tracks() ) for( TRACK* track : m_board->Tracks() )
nets.insert( track->GetNetCode() ); nets.insert( track->GetNetCode() );
// Modules/pads // footprints/pads
for( MODULE* module : m_board->Modules() ) for( MODULE* module : m_board->Modules() )
{ {
for( D_PAD* pad : module->Pads() ) for( D_PAD* pad : module->Pads() )

View File

@ -109,7 +109,7 @@ void PCB_EDIT_FRAME::OnNetlistChanged( BOARD_NETLIST_UPDATER& aUpdater, bool* aR
SpreadFootprints( &newFootprints, areaPosition ); SpreadFootprints( &newFootprints, areaPosition );
// Start drag command for new modules // Start drag command for new footprints
if( !newFootprints.empty() ) if( !newFootprints.empty() )
{ {
for( MODULE* footprint : newFootprints ) for( MODULE* footprint : newFootprints )

View File

@ -196,7 +196,7 @@ void PCB_DRAW_PANEL_GAL::DisplayBoard( BOARD* aBoard )
for( auto track : aBoard->Tracks() ) for( auto track : aBoard->Tracks() )
m_view->Add( track ); m_view->Add( track );
// Load modules and its additional elements // Load footprints and its additional elements
for( auto module : aBoard->Modules() ) for( auto module : aBoard->Modules() )
m_view->Add( module ); m_view->Add( module );
@ -566,12 +566,12 @@ void PCB_DRAW_PANEL_GAL::setDefaultLayerDeps()
m_view->SetRequired( LAYER_PAD_FR, LAYER_PADS ); m_view->SetRequired( LAYER_PAD_FR, LAYER_PADS );
m_view->SetRequired( LAYER_PAD_BK, LAYER_PADS ); m_view->SetRequired( LAYER_PAD_BK, LAYER_PADS );
// Front modules // Front footprints
m_view->SetRequired( LAYER_PAD_FR, F_Cu ); m_view->SetRequired( LAYER_PAD_FR, F_Cu );
m_view->SetRequired( LAYER_MOD_TEXT_FR, LAYER_MOD_FR ); m_view->SetRequired( LAYER_MOD_TEXT_FR, LAYER_MOD_FR );
m_view->SetRequired( LAYER_PAD_FR_NETNAMES, LAYER_PAD_FR ); m_view->SetRequired( LAYER_PAD_FR_NETNAMES, LAYER_PAD_FR );
// Back modules // Back footprints
m_view->SetRequired( LAYER_PAD_BK, B_Cu ); m_view->SetRequired( LAYER_PAD_BK, B_Cu );
m_view->SetRequired( LAYER_MOD_TEXT_BK, LAYER_MOD_BK ); m_view->SetRequired( LAYER_MOD_TEXT_BK, LAYER_MOD_BK );
m_view->SetRequired( LAYER_PAD_BK_NETNAMES, LAYER_PAD_BK ); m_view->SetRequired( LAYER_PAD_BK_NETNAMES, LAYER_PAD_BK );

View File

@ -617,12 +617,12 @@ public:
/** /**
* Function ArchiveModulesOnBoard * Function ArchiveModulesOnBoard
* Save modules in a library: * Save footprints in a library:
* @param aStoreInNewLib: * @param aStoreInNewLib:
* true : save modules in a existing lib. Existing footprints will be kept * true : save footprints in a existing lib. Existing footprints will be kept
* or updated. * or updated.
* This lib should be in fp lib table, and is type is .pretty * This lib should be in fp lib table, and is type is .pretty
* false: save modules in a new lib. It it is an existing lib, * false: save footprints in a new lib. It it is an existing lib,
* previous footprints will be removed * previous footprints will be removed
* *
* @param aLibName: * @param aLibName:
@ -752,7 +752,7 @@ public:
bool resetTextEffects = true, bool resetFabricationAttrs = true, bool resetTextEffects = true, bool resetFabricationAttrs = true,
bool reset3DModels = true ); bool reset3DModels = true );
// loading modules: see PCB_BASE_FRAME // loading footprints: see PCB_BASE_FRAME
/** /**
* Function OnEditItemRequest * Function OnEditItemRequest

View File

@ -116,7 +116,7 @@ public:
/** /**
* plot items like text and graphics, * plot items like text and graphics,
* but not tracks and modules * but not tracks and footprints
*/ */
void PlotBoardGraphicItems(); void PlotBoardGraphicItems();

View File

@ -921,7 +921,7 @@ void EAGLE_PLUGIN::loadLibrary( wxXmlNode* aLib, const wxString* aLibName )
m_xpath->push( "packages" ); m_xpath->push( "packages" );
// Create a MODULE for all the eagle packages, for use later via a copy constructor // Create a MODULE for all the eagle packages, for use later via a copy constructor
// to instantiate needed MODULES in our BOARD. Save the MODULE templates in // to instantiate needed footprints in our BOARD. Save the MODULE templates in
// a MODULE_MAP using a single lookup key consisting of libname+pkgname. // a MODULE_MAP using a single lookup key consisting of libname+pkgname.
// Get the first package and iterate // Get the first package and iterate

View File

@ -630,7 +630,7 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const
formatHeader( aBoard, aNestLevel ); formatHeader( aBoard, aNestLevel );
// Save the modules. // Save the footprints.
for( BOARD_ITEM* module : sorted_modules ) for( BOARD_ITEM* module : sorted_modules )
{ {
Format( module, aNestLevel ); Format( module, aNestLevel );

View File

@ -75,7 +75,7 @@ class PCB_TEXT;
//#define SEXPR_BOARD_FILE_VERSION 20200628 // remove visibility settings //#define SEXPR_BOARD_FILE_VERSION 20200628 // remove visibility settings
//#define SEXPR_BOARD_FILE_VERSION 20200724 // Add KIID to module components //#define SEXPR_BOARD_FILE_VERSION 20200724 // Add KIID to module components
//#define SEXPR_BOARD_FILE_VERSION 20200807 // Add zone hatch advanced settings //#define SEXPR_BOARD_FILE_VERSION 20200807 // Add zone hatch advanced settings
//#define SEXPR_BOARD_FILE_VERSION 20200808 // Add properties to modules //#define SEXPR_BOARD_FILE_VERSION 20200808 // Add properties to footprints
//#define SEXPR_BOARD_FILE_VERSION 20200809 // Add REMOVE_UNUSED_LAYERS option to vias and THT pads //#define SEXPR_BOARD_FILE_VERSION 20200809 // Add REMOVE_UNUSED_LAYERS option to vias and THT pads
//#define SEXPR_BOARD_FILE_VERSION 20200811 // Add groups //#define SEXPR_BOARD_FILE_VERSION 20200811 // Add groups
//#define SEXPR_BOARD_FILE_VERSION 20200818 // Remove Status flag bitmap and setup counts //#define SEXPR_BOARD_FILE_VERSION 20200818 // Remove Status flag bitmap and setup counts

View File

@ -811,7 +811,7 @@ void PCB::ParseBoard( wxStatusBar* aStatusBar, wxXmlDocument* aXmlDoc, const wxS
while( aNode ) while( aNode )
{ {
// Components/modules // Components/footprints
if( aNode->GetName() == wxT( "multiLayer" ) ) if( aNode->GetName() == wxT( "multiLayer" ) )
DoPCBComponents( aNode, aXmlDoc, aActualConversion, aStatusBar ); DoPCBComponents( aNode, aXmlDoc, aActualConversion, aStatusBar );

View File

@ -42,7 +42,7 @@ namespace PCAD2KICAD {
class PCB : public PCB_MODULE, public PCB_CALLBACKS class PCB : public PCB_MODULE, public PCB_CALLBACKS
{ {
public: public:
PCB_COMPONENTS_ARRAY m_pcbComponents; // PCB Modules,Lines,Routes,Texts, .... and so on PCB_COMPONENTS_ARRAY m_pcbComponents; // PCB footprints,Lines,Routes,Texts, .... and so on
PCB_NETS_ARRAY m_pcbNetlist; // net objects collection PCB_NETS_ARRAY m_pcbNetlist; // net objects collection
wxString m_defaultMeasurementUnit; wxString m_defaultMeasurementUnit;
std::map<int, TLAYER> m_layersMap; // flexible layers mapping std::map<int, TLAYER> m_layersMap; // flexible layers mapping

View File

@ -3963,13 +3963,13 @@ public:
/** /**
* Function FlipMODULEs * Function FlipMODULEs
* flips the modules which are on the back side of the board to the front. * flips the footprints which are on the back side of the board to the front.
*/ */
void FlipMODULEs( BOARD* aBoard ); void FlipMODULEs( BOARD* aBoard );
/** /**
* Function RevertMODULEs * Function RevertMODULEs
* flips the modules which were on the back side of the board back to the back. * flips the footprints which were on the back side of the board back to the back.
*/ */
void RevertMODULEs( BOARD* aBoard ); void RevertMODULEs( BOARD* aBoard );
}; };

View File

@ -216,7 +216,7 @@ void PCB_EDIT_FRAME::RunActionPlugin( ACTION_PLUGIN* aActionPlugin )
itemsList.PushItem( picker ); itemsList.PushItem( picker );
} }
// Append modules: // Append footprints:
for( MODULE* item : currentPcb->Modules() ) for( MODULE* item : currentPcb->Modules() )
{ {
ITEM_PICKER picker( nullptr, item, UNDO_REDO::CHANGED ); ITEM_PICKER picker( nullptr, item, UNDO_REDO::CHANGED );
@ -273,7 +273,7 @@ void PCB_EDIT_FRAME::RunActionPlugin( ACTION_PLUGIN* aActionPlugin )
for( TRACK* item : currentPcb->Tracks() ) for( TRACK* item : currentPcb->Tracks() )
currItemList.insert( item ); currItemList.insert( item );
// Append modules: // Append footprints:
for( MODULE* item : currentPcb->Modules() ) for( MODULE* item : currentPcb->Modules() )
currItemList.insert( item ); currItemList.insert( item );
@ -285,7 +285,7 @@ void PCB_EDIT_FRAME::RunActionPlugin( ACTION_PLUGIN* aActionPlugin )
for( ZONE_CONTAINER* zone : currentPcb->Zones() ) for( ZONE_CONTAINER* zone : currentPcb->Zones() )
currItemList.insert( zone ); currItemList.insert( zone );
// Found deleted modules // Found deleted footprints
for( unsigned int i = 0; i < oldBuffer->GetCount(); i++ ) for( unsigned int i = 0; i < oldBuffer->GetCount(); i++ )
{ {
BOARD_ITEM* item = (BOARD_ITEM*) oldBuffer->GetPickedItem( i ); BOARD_ITEM* item = (BOARD_ITEM*) oldBuffer->GetPickedItem( i );
@ -303,7 +303,7 @@ void PCB_EDIT_FRAME::RunActionPlugin( ACTION_PLUGIN* aActionPlugin )
oldBuffer->PushItem( deletedItemsList.GetItemWrapper( i ) ); oldBuffer->PushItem( deletedItemsList.GetItemWrapper( i ) );
} }
// Find new modules // Find new footprints
for( MODULE* item : currentPcb->Modules() ) for( MODULE* item : currentPcb->Modules() )
{ {
if( !oldBuffer->ContainsItem( item ) ) if( !oldBuffer->ContainsItem( item ) )

View File

@ -99,12 +99,12 @@ bool ImportSpecctraSES( wxString& aFullFilename );
/** /**
* Function ArchiveModulesOnBoard * Function ArchiveModulesOnBoard
* Save modules in a library: * Save footprints in a library:
* @param aStoreInNewLib: * @param aStoreInNewLib:
* true : save modules in a existing lib. Existing footprints will be kept * true : save footprints in a existing lib. Existing footprints will be kept
* or updated. * or updated.
* This lib should be in fp lib table, and is type is .pretty * This lib should be in fp lib table, and is type is .pretty
* false: save modules in a new lib. It it is an existing lib, * false: save footprints in a new lib. It it is an existing lib,
* previous footprints will be removed * previous footprints will be removed
* *
* @param aLibName: * @param aLibName:

View File

@ -483,7 +483,7 @@ int EDIT_TOOL::doMoveSelection( TOOL_EVENT aEvent, bool aPickReference )
m_dragging = true; m_dragging = true;
// When editing modules, all items have the same parent // When editing footprints, all items have the same parent
if( EditingModules() ) if( EditingModules() )
{ {
m_commit->Modify( selection.Front() ); m_commit->Modify( selection.Front() );
@ -953,7 +953,7 @@ int EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
auto refPt = selection.GetReferencePoint(); auto refPt = selection.GetReferencePoint();
const int rotateAngle = TOOL_EVT_UTILS::GetEventRotationAngle( *editFrame, aEvent ); const int rotateAngle = TOOL_EVT_UTILS::GetEventRotationAngle( *editFrame, aEvent );
// When editing modules, all items have the same parent // When editing footprints, all items have the same parent
if( EditingModules() ) if( EditingModules() )
m_commit->Modify( selection.Front() ); m_commit->Modify( selection.Front() );
@ -1053,7 +1053,7 @@ int EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent )
auto refPoint = selection.GetReferencePoint(); auto refPoint = selection.GetReferencePoint();
wxPoint mirrorPoint( refPoint.x, refPoint.y ); wxPoint mirrorPoint( refPoint.x, refPoint.y );
// When editing modules, all items have the same parent // When editing footprints, all items have the same parent
if( EditingModules() ) if( EditingModules() )
m_commit->Modify( selection.Front() ); m_commit->Modify( selection.Front() );
@ -1159,7 +1159,7 @@ int EDIT_TOOL::Flip( const TOOL_EVENT& aEvent )
bool leftRight = frame()->Settings().m_FlipLeftRight; bool leftRight = frame()->Settings().m_FlipLeftRight;
// When editing modules, all items have the same parent // When editing footprints, all items have the same parent
if( EditingModules() ) if( EditingModules() )
m_commit->Modify( selection.Front() ); m_commit->Modify( selection.Front() );
@ -1458,7 +1458,7 @@ int EDIT_TOOL::MoveExact( const TOOL_EVENT& aEvent )
// Make sure the rotation is from the right reference point // Make sure the rotation is from the right reference point
selCenter += translation; selCenter += translation;
// When editing modules, all items have the same parent // When editing footprints, all items have the same parent
if( EditingModules() ) if( EditingModules() )
m_commit->Modify( selection.Front() ); m_commit->Modify( selection.Front() );

View File

@ -46,7 +46,7 @@ namespace KIGFX {
/** /**
* Function EditToolSelectionFilter * Function EditToolSelectionFilter
* *
* A CLIENT_SELECTION_FILTER which promotes pad selections to their parent modules and * A CLIENT_SELECTION_FILTER which promotes pad selections to their parent footprints and
* optionally excludes locked items and/or transient items (such as markers). * optionally excludes locked items and/or transient items (such as markers).
*/ */

View File

@ -93,7 +93,7 @@ int GLOBAL_EDIT_TOOL::ExchangeFootprints( const TOOL_EVENT& aEvent )
else else
wxFAIL_MSG( "ExchangeFootprints: unexpected action" ); wxFAIL_MSG( "ExchangeFootprints: unexpected action" );
// Footprint exchange could remove modules, so they have to be // Footprint exchange could remove footprints, so they have to be
// removed from the selection first // removed from the selection first
m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true ); m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true );

View File

@ -1177,13 +1177,13 @@ TOOL_ACTION PCB_ACTIONS::deselectNet( "pcbnew.InteractiveSelection.DeselectNet",
TOOL_ACTION PCB_ACTIONS::selectOnSheetFromEeschema( "pcbnew.InteractiveSelection.SelectOnSheet", TOOL_ACTION PCB_ACTIONS::selectOnSheetFromEeschema( "pcbnew.InteractiveSelection.SelectOnSheet",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Sheet" ), _( "Sheet" ),
_( "Selects all modules and tracks in the schematic sheet" ), _( "Selects all footprints and tracks in the schematic sheet" ),
select_same_sheet_xpm ); select_same_sheet_xpm );
TOOL_ACTION PCB_ACTIONS::selectSameSheet( "pcbnew.InteractiveSelection.SelectSameSheet", TOOL_ACTION PCB_ACTIONS::selectSameSheet( "pcbnew.InteractiveSelection.SelectSameSheet",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Items in Same Hierarchical Sheet" ), _( "Items in Same Hierarchical Sheet" ),
_( "Selects all modules and tracks in the same schematic sheet" ), _( "Selects all footprints and tracks in the same schematic sheet" ),
select_same_sheet_xpm ); select_same_sheet_xpm );
TOOL_ACTION PCB_ACTIONS::filterSelection( "pcbnew.InteractiveSelection.FilterSelection", TOOL_ACTION PCB_ACTIONS::filterSelection( "pcbnew.InteractiveSelection.FilterSelection",

View File

@ -73,7 +73,7 @@ void PCB_TOOL_BASE::doInteractiveItemPlacement( const std::string& aTool,
{ {
auto module = dyn_cast<MODULE*>( newItem.get() ); auto module = dyn_cast<MODULE*>( newItem.get() );
// modules have more drawable parts // footprints have more drawable parts
module->RunOnChildren( std::bind( &KIGFX::VIEW_GROUP::Add, &preview, _1 ) ); module->RunOnChildren( std::bind( &KIGFX::VIEW_GROUP::Add, &preview, _1 ) );
} }
} }

View File

@ -94,7 +94,7 @@ public:
/** /**
* Function SetEditModules() * Function SetEditModules()
* *
* Toggles edit module mode. When enabled, one may select parts of modules individually * Toggles edit module mode. When enabled, one may select parts of footprints individually
* (graphics, pads, etc.), so they can be modified. * (graphics, pads, etc.), so they can be modified.
* @param aEnabled decides if the mode should be enabled. * @param aEnabled decides if the mode should be enabled.
*/ */

View File

@ -68,7 +68,7 @@ public:
void setTransitions() override; void setTransitions() override;
/** /**
* Toggles edit module mode. When enabled, one may select parts of modules individually * Toggles edit module mode. When enabled, one may select parts of footprints individually
* (graphics, pads, etc.), so they can be modified. * (graphics, pads, etc.), so they can be modified.
* @param aEnabled decides if the mode should be enabled. * @param aEnabled decides if the mode should be enabled.
*/ */

View File

@ -1163,7 +1163,7 @@ void SELECTION_TOOL::selectAllItemsOnSheet( wxString& aSheetPath )
{ {
std::list<MODULE*> modList; std::list<MODULE*> modList;
// store all modules that are on that sheet path // store all footprints that are on that sheet path
for( MODULE* module : board()->Modules() ) for( MODULE* module : board()->Modules() )
{ {
if( module == nullptr ) if( module == nullptr )
@ -1202,8 +1202,8 @@ void SELECTION_TOOL::selectAllItemsOnSheet( wxString& aSheetPath )
for( D_PAD* pad : padList ) for( D_PAD* pad : padList )
selectConnectedTracks( *pad, STOP_NEVER ); selectConnectedTracks( *pad, STOP_NEVER );
// now we need to find all modules that are connected to each of these nets // now we need to find all footprints that are connected to each of these nets
// then we need to determine if these modules are in the list of modules // then we need to determine if these modules are in the list of footprints
// belonging to this sheet ( modList ) // belonging to this sheet ( modList )
std::list<int> removeCodeList; std::list<int> removeCodeList;
constexpr KICAD_T padType[] = { PCB_PAD_T, EOT }; constexpr KICAD_T padType[] = { PCB_PAD_T, EOT };
@ -1300,7 +1300,7 @@ int SELECTION_TOOL::selectSameSheet( const TOOL_EVENT& aEvent )
if( !selectCursor( true ) ) if( !selectCursor( true ) )
return 0; return 0;
// this function currently only supports modules since they are only // this function currently only supports footprints since they are only
// on one sheet. // on one sheet.
auto item = m_selection.Front(); auto item = m_selection.Front();
@ -1790,7 +1790,7 @@ BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector
return NULL; return NULL;
} }
// All are modules, now find smallest MODULE // All are footprints, now find smallest MODULE
int minDim = 0x7FFFFFFF; int minDim = 0x7FFFFFFF;
int minNdx = 0; int minNdx = 0;
@ -2061,7 +2061,7 @@ void SELECTION_TOOL::highlightInternal( BOARD_ITEM* aItem, int aMode,
aSelectionViewGroup->Add( aItem ); aSelectionViewGroup->Add( aItem );
} }
// Modules are treated in a special way - when they are highlighted, we have to highlight // footprints are treated in a special way - when they are highlighted, we have to highlight
// all the parts that make the module, not the module itself // all the parts that make the module, not the module itself
if( aItem->Type() == PCB_MODULE_T ) if( aItem->Type() == PCB_MODULE_T )
{ {
@ -2119,7 +2119,7 @@ void SELECTION_TOOL::unhighlightInternal( BOARD_ITEM* aItem, int aMode,
view()->Update( aItem ); view()->Update( aItem );
} }
// Modules are treated in a special way - when they are highlighted, we have to // footprints are treated in a special way - when they are highlighted, we have to
// highlight all the parts that make the module, not the module itself // highlight all the parts that make the module, not the module itself
if( aItem->Type() == PCB_MODULE_T ) if( aItem->Type() == PCB_MODULE_T )
{ {

View File

@ -293,11 +293,11 @@ private:
*/ */
void selectAllItemsOnSheet( wxString& aSheetPath ); void selectAllItemsOnSheet( wxString& aSheetPath );
///> Selects all modules belonging to same sheet, from Eeschema, ///> Selects all footprints belonging to same sheet, from Eeschema,
///> using crossprobing ///> using crossprobing
int selectSheetContents( const TOOL_EVENT& aEvent ); int selectSheetContents( const TOOL_EVENT& aEvent );
///> Selects all modules belonging to same hierarchical sheet ///> Selects all footprints belonging to same hierarchical sheet
///> as the selected footprint (same sheet path). ///> as the selected footprint (same sheet path).
int selectSameSheet( const TOOL_EVENT& aEvent ); int selectSameSheet( const TOOL_EVENT& aEvent );

View File

@ -194,14 +194,14 @@ void PCB_BASE_EDIT_FRAME::SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsLis
commandToUndo->m_TransformPoint = aTransformPoint; commandToUndo->m_TransformPoint = aTransformPoint;
// First, filter unnecessary stuff from the list (i.e. for multiple pads / labels modified), // First, filter unnecessary stuff from the list (i.e. for multiple pads / labels modified),
// take the first occurence of the module (we save copies of modules when one of its subitems // take the first occurence of the module (we save copies of footprints when one of its subitems
// is changed). // is changed).
for( unsigned ii = 0; ii < aItemsList.GetCount(); ii++ ) for( unsigned ii = 0; ii < aItemsList.GetCount(); ii++ )
{ {
ITEM_PICKER curr_picker = aItemsList.GetItemWrapper(ii); ITEM_PICKER curr_picker = aItemsList.GetItemWrapper(ii);
BOARD_ITEM* item = dynamic_cast<BOARD_ITEM*>( aItemsList.GetPickedItem( ii ) ); BOARD_ITEM* item = dynamic_cast<BOARD_ITEM*>( aItemsList.GetPickedItem( ii ) );
// For items belonging to modules, we need to save state of the parent module // For items belonging to footprints, we need to save state of the parent module
if( item && item->GetParent() && item->GetParent()->Type() == PCB_MODULE_T ) if( item && item->GetParent() && item->GetParent()->Type() == PCB_MODULE_T )
{ {
item = item->GetParent(); item = item->GetParent();
@ -464,7 +464,7 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool
BOARD_ITEM* image = (BOARD_ITEM*) aList->GetPickedItemLink( ii ); BOARD_ITEM* image = (BOARD_ITEM*) aList->GetPickedItemLink( ii );
// Remove all pads/drawings/texts, as they become invalid // Remove all pads/drawings/texts, as they become invalid
// for the VIEW after SwapData() called for modules // for the VIEW after SwapData() called for footprints
view->Remove( item ); view->Remove( item );
connectivity->Remove( item ); connectivity->Remove( item );

View File

@ -84,13 +84,13 @@ struct COURTYARD_INVALID_CASE
static const std::vector<COURTYARD_INVALID_CASE> courtyard_invalid_cases = static const std::vector<COURTYARD_INVALID_CASE> courtyard_invalid_cases =
{ {
{ {
// Empty board has no modules to be invalid // Empty board has no footprints to be invalid
"empty board", "empty board",
{}, {},
{}, {},
}, },
{ {
"single mod, no courtyard", "single footprint, no courtyard",
{ {
{ {
"U1", "U1",
@ -98,7 +98,7 @@ static const std::vector<COURTYARD_INVALID_CASE> courtyard_invalid_cases =
{ 0, 0 }, { 0, 0 },
}, },
}, },
{ // one error: the module has no courtyard { // one error: the footprint has no courtyard
{ {
"U1", "U1",
DRCE_MISSING_COURTYARD, DRCE_MISSING_COURTYARD,
@ -106,7 +106,7 @@ static const std::vector<COURTYARD_INVALID_CASE> courtyard_invalid_cases =
}, },
}, },
{ {
"single mod, unclosed courtyard", "single footprint, unclosed courtyard",
{ {
{ {
"U1", "U1",
@ -117,7 +117,7 @@ static const std::vector<COURTYARD_INVALID_CASE> courtyard_invalid_cases =
{ 0, 0 }, { 0, 0 },
}, },
}, },
{ // one error: the module has malformed courtyard { // one error: the footprint has malformed courtyard
{ {
"U1", "U1",
DRCE_MALFORMED_COURTYARD, DRCE_MALFORMED_COURTYARD,
@ -125,7 +125,7 @@ static const std::vector<COURTYARD_INVALID_CASE> courtyard_invalid_cases =
}, },
}, },
{ {
"single mod, disjoint courtyard", "single footprint, disjoint courtyard",
{ {
{ {
"U1", "U1",
@ -144,7 +144,7 @@ static const std::vector<COURTYARD_INVALID_CASE> courtyard_invalid_cases =
}, },
}, },
{ {
"two mods, one OK, one malformed", "two footprints, one OK, one malformed",
{ {
{ {
"U1", "U1",

View File

@ -80,14 +80,14 @@ std::ostream& operator<<( std::ostream& os, const COURTYARD_COLLISION& aColl )
/** /**
* A complete courtyard overlap test case: a name, the board modules list * A complete courtyard overlap test case: a name, the board footprint list
* and the expected collisions. * and the expected collisions.
*/ */
struct COURTYARD_OVERLAP_TEST_CASE struct COURTYARD_OVERLAP_TEST_CASE
{ {
std::string m_case_name; std::string m_case_name;
// The modules in the test case // The footprint in the test case
std::vector<COURTYARD_TEST_MODULE> m_mods; std::vector<COURTYARD_TEST_MODULE> m_mods;
// The expected number of collisions // The expected number of collisions
@ -162,11 +162,11 @@ BOOST_FIXTURE_TEST_SUITE( DrcCourtyardOverlap, COURTYARD_TEST_FIXTURE )
static std::vector<COURTYARD_OVERLAP_TEST_CASE> courtyard_cases = { static std::vector<COURTYARD_OVERLAP_TEST_CASE> courtyard_cases = {
{ {
"empty board", "empty board",
{}, // no modules {}, // no footprint
{}, // no collisions {}, // no collisions
}, },
{ {
"single empty mod", "single empty footprint",
{ {
{ {
"U1", "U1",
@ -177,8 +177,8 @@ static std::vector<COURTYARD_OVERLAP_TEST_CASE> courtyard_cases = {
{}, // no collisions {}, // no collisions
}, },
{ {
// A single module can't overlap itself // A single footprint can't overlap itself
"single mod, single courtyard", "single footprint, single courtyard",
{ {
{ {
"U1", "U1",
@ -196,7 +196,7 @@ static std::vector<COURTYARD_OVERLAP_TEST_CASE> courtyard_cases = {
{}, // no collisions {}, // no collisions
}, },
{ {
"two modules, no overlap", "two footprint, no overlap",
{ {
{ {
"U1", "U1",
@ -226,7 +226,7 @@ static std::vector<COURTYARD_OVERLAP_TEST_CASE> courtyard_cases = {
{}, // no collisions {}, // no collisions
}, },
{ {
"two modules, touching, no overlap", "two footprints, touching, no overlap",
{ {
{ {
"U1", "U1",
@ -256,7 +256,7 @@ static std::vector<COURTYARD_OVERLAP_TEST_CASE> courtyard_cases = {
{}, // Touching means not colliding {}, // Touching means not colliding
}, },
{ {
"two modules, overlap", "two footprints, overlap",
{ {
{ {
"U1", "U1",
@ -288,7 +288,7 @@ static std::vector<COURTYARD_OVERLAP_TEST_CASE> courtyard_cases = {
}, },
}, },
{ {
"two modules, overlap, different sides", "two footprints, overlap, different sides",
{ {
{ {
"U1", "U1",
@ -318,7 +318,7 @@ static std::vector<COURTYARD_OVERLAP_TEST_CASE> courtyard_cases = {
{}, // but on different sides {}, // but on different sides
}, },
{ {
"two modules, multiple courtyards, overlap", "two footprints, multiple courtyards, overlap",
{ {
{ {
"U1", "U1",
@ -357,7 +357,7 @@ static std::vector<COURTYARD_OVERLAP_TEST_CASE> courtyard_cases = {
}, },
{ {
// The courtyards do not overlap, but their bounding boxes do // The courtyards do not overlap, but their bounding boxes do
"two modules, no overlap, bbox overlap", "two footprints, no overlap, bbox overlap",
{ {
{ {
"U1", "U1",