KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_pad_properties.cpp File Reference
#include <base_units.h>
#include <bitmaps.h>
#include <board_commit.h>
#include <board.h>
#include <board_design_settings.h>
#include <footprint.h>
#include <confirm.h>
#include <core/arraydim.h>
#include <convert_basic_shapes_to_polygon.h>
#include <gal/graphics_abstraction_layer.h>
#include <geometry/shape_segment.h>
#include <dialog_pad_properties.h>
#include <dialogs/html_message_box.h>
#include <macros.h>
#include <pad.h>
#include <pcb_base_frame.h>
#include <footprint_edit_frame.h>
#include <pcb_painter.h>
#include <pcbnew_settings.h>
#include <settings/color_settings.h>
#include <view/view_controls.h>
#include <widgets/net_selector.h>
#include <tool/tool_manager.h>
#include <tools/pad_tool.h>
#include <advanced_config.h>
#include <wx/choicdlg.h>

Go to the source code of this file.

Macros

#define PTH_DLG_TYPE   0
 
#define SMD_DLG_TYPE   1
 
#define CONN_DLG_TYPE   2
 
#define NPTH_DLG_TYPE   3
 
#define APERTURE_DLG_TYPE   4
 
#define SELECTED_ITEMS_LAYER   Dwgs_User
 

Enumerations

enum  CODE_CHOICE {
  CHOICE_SHAPE_CIRCLE = 0 , CHOICE_SHAPE_OVAL , CHOICE_SHAPE_RECT , CHOICE_SHAPE_TRAPEZOID ,
  CHOICE_SHAPE_ROUNDRECT , CHOICE_SHAPE_CHAMFERED_RECT , CHOICE_SHAPE_CHAMFERED_ROUNDED_RECT , CHOICE_SHAPE_CUSTOM_CIRC_ANCHOR ,
  CHOICE_SHAPE_CUSTOM_RECT_ANCHOR
}
 

Functions

static bool PadHasMeaningfulRoundingRadius (const PAD &aPad)
 Returns true if the pad's rounding ratio is valid (i.e.
 
static double GetDefaultIpcRoundingRatio (const PAD &aPad)
 Get a sensible default for a rounded rectangle pad's rounding ratio.
 

Variables

static PAD_SHAPE code_shape []
 
static PAD_ATTRIB code_type []
 

Macro Definition Documentation

◆ APERTURE_DLG_TYPE

#define APERTURE_DLG_TYPE   4

Definition at line 105 of file dialog_pad_properties.cpp.

◆ CONN_DLG_TYPE

#define CONN_DLG_TYPE   2

Definition at line 103 of file dialog_pad_properties.cpp.

◆ NPTH_DLG_TYPE

#define NPTH_DLG_TYPE   3

Definition at line 104 of file dialog_pad_properties.cpp.

◆ PTH_DLG_TYPE

#define PTH_DLG_TYPE   0

Definition at line 101 of file dialog_pad_properties.cpp.

◆ SELECTED_ITEMS_LAYER

#define SELECTED_ITEMS_LAYER   Dwgs_User

◆ SMD_DLG_TYPE

#define SMD_DLG_TYPE   1

Definition at line 102 of file dialog_pad_properties.cpp.

Enumeration Type Documentation

◆ CODE_CHOICE

Enumerator
CHOICE_SHAPE_CIRCLE 
CHOICE_SHAPE_OVAL 
CHOICE_SHAPE_RECT 
CHOICE_SHAPE_TRAPEZOID 
CHOICE_SHAPE_ROUNDRECT 
CHOICE_SHAPE_CHAMFERED_RECT 
CHOICE_SHAPE_CHAMFERED_ROUNDED_RECT 
CHOICE_SHAPE_CUSTOM_CIRC_ANCHOR 
CHOICE_SHAPE_CUSTOM_RECT_ANCHOR 

Definition at line 75 of file dialog_pad_properties.cpp.

Function Documentation

◆ GetDefaultIpcRoundingRatio()

static double GetDefaultIpcRoundingRatio ( const PAD aPad)
static

Get a sensible default for a rounded rectangle pad's rounding ratio.

According to IPC-7351C, this is 25%, or 0.25mm, whichever is smaller

Definition at line 124 of file dialog_pad_properties.cpp.

References PAD::GetSizeX(), PAD::GetSizeY(), EDA_IU_SCALE::mmToIU(), and pcbIUScale.

Referenced by DIALOG_PAD_PROPERTIES::OnPadShapeSelection().

◆ PadHasMeaningfulRoundingRadius()

static bool PadHasMeaningfulRoundingRadius ( const PAD aPad)
static

Returns true if the pad's rounding ratio is valid (i.e.

the pad has a shape where that is meaningful)

Definition at line 112 of file dialog_pad_properties.cpp.

References CHAMFERED_RECT, PAD::GetShape(), and ROUNDRECT.

Referenced by DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES().

Variable Documentation

◆ code_shape

◆ code_type

PAD_ATTRIB code_type[]
static
Initial value:
=
{
}
@ NPTH
like PAD_PTH, but not plated mechanical use only, no connection allowed
@ SMD
Smd pad, appears on the solder paste layer (default)
@ PTH
Plated through hole pad.
@ CONN
Like smd, does not appear on the solder paste layer (default) Note: also has a special attribute in G...

Definition at line 89 of file dialog_pad_properties.cpp.

Referenced by DIALOG_PAD_PROPERTIES::transferDataToPad().