54 switch( aFootprintShape )
57 msg =
_(
"Gap Size:" );
58 cmp_name = wxT(
"muwave_gap" );
63 msg =
_(
"Stub Size:" );
64 cmp_name = wxT(
"muwave_stub" );
70 msg =
_(
"Arc Stub Radius Value:" );
71 cmp_name = wxT(
"muwave_arcstub" );
96 _(
"Create Microwave Footprint" ), msg );
106 if( !msg.ToDouble( &fval ) )
128 switch( aFootprintShape )
133 pad->SetX(
pad->GetPosition().x + offsetX );
141 pad->SetNumber( wxT(
"1" ) );
147 pad->SetY(
pad->GetPosition().y + offsetY );
155 int numPoints = ( angle.
AsDegrees() / 5.0 ) + 3;
156 std::vector<VECTOR2I> polyPoints;
157 polyPoints.reserve( numPoints );
159 polyPoints.emplace_back(
VECTOR2I( 0, 0 ) );
163 for(
int ii = 1; ii < numPoints - 1; ii++ )
167 polyPoints.push_back( pt );
171 if( theta > angle / 2 )
176 polyPoints.push_back( polyPoints[0] );
194 int aTextSize,
int aPadCount )
205 footprint->Reference().SetTextThickness( aTextSize / 5 );
207 footprint->Value().SetTextThickness( aTextSize / 5 );
228 pad->SetNumber( wxString::Format( wxT(
"%d" ), pad_num ) );
int GetCurrentTrackWidth() const
static constexpr PCB_LAYER_ID ALL_LAYERS
! Temporary layer identifier to identify code that is not padstack-aware
FOOTPRINT * CreateNewFootprint(wxString aFootprintName, const wxString &aLibName)
Create a new footprint at position 0,0.
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Return the BOARD_DESIGN_SETTINGS for the open project.
The main frame for Pcbnew.
void OnModify() override
Must be called after a board change to set the modified flag.
wxString StringFromValue(double aValue, bool aAddUnitLabel=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
Converts aValue in internal units into a united string.
int ValueFromString(const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
Converts aTextValue in aUnits to internal units used by the frame.
A KICAD version of wxTextEntryDialog which supports the various improvements/work-arounds from DIALOG...
wxString GetValue() const
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
This file is part of the common library.
static constexpr EDA_ANGLE ANGLE_0
static constexpr EDA_ANGLE ANGLE_180
@ SMD
Smd pad, appears on the solder paste layer (default)
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Calculate the new point of coord coord pX, pY, for a rotation center 0, 0.
VECTOR2< int32_t > VECTOR2I