53 switch( aFootprintShape )
56 msg =
_(
"Gap Size:" );
57 cmp_name = wxT(
"muwave_gap" );
62 msg =
_(
"Stub Size:" );
63 cmp_name = wxT(
"muwave_stub" );
69 msg =
_(
"Arc Stub Radius Value:" );
70 cmp_name = wxT(
"muwave_arcstub" );
94 _(
"Create Microwave Footprint" ), msg );
103 if( !msg.ToDouble( &fval ) )
125 switch( aFootprintShape )
128 oX = -( gap_size +
pad->GetSize().x ) / 2;
131 pad->SetX(
pad->GetPos0().x +
pad->GetPosition().x );
135 pad->SetX0( oX + gap_size +
pad->GetSize().x );
136 pad->SetX(
pad->GetPos0().x +
pad->GetPosition().x );
140 pad->SetNumber( wxT(
"1" ) );
142 pad->SetY0( -( gap_size +
pad->GetSize().y ) / 2 );
143 pad->SetSize( wxSize(
pad->GetSize().x, gap_size ) );
144 pad->SetY(
pad->GetPos0().y +
pad->GetPosition().y );
152 int numPoints = (
angle.AsDegrees() / 5.0 ) + 3;
153 std::vector<VECTOR2I> polyPoints;
154 polyPoints.reserve( numPoints );
156 polyPoints.emplace_back( wxPoint( 0, 0 ) );
160 for(
int ii = 1; ii < numPoints - 1; ii++ )
162 wxPoint pt( 0, -gap_size );
164 polyPoints.push_back( pt );
168 if( theta >
angle / 2 )
173 polyPoints.push_back( polyPoints[0] );
175 pad->AddPrimitivePoly( polyPoints, 0,
true );
191 int aTextSize,
int aPadCount )
218 pad->SetSize( wxSize( tw, tw ) );
int GetCurrentTrackWidth() const
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
void SetTextSize(const VECTOR2I &aNewSize)
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Returns the BOARD_DESIGN_SETTINGS for the open project.
FOOTPRINT * CreateNewFootprint(const wxString &aFootprintName, bool aQuiet=false)
Creates a new footprint, at position 0,0.
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)
Converts aValue in internal units into a united string.
int ValueFromString(const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
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, int aDisplayTime)
Display an error or warning message box with aMessage.
This file is part of the common library.
static constexpr EDA_ANGLE & ANGLE_180
static constexpr EDA_ANGLE & ANGLE_0
static DIRECTION_45::AngleType angle(const VECTOR2I &a, const VECTOR2I &b)
@ SMD
Smd pad, appears on the solder paste layer (default)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)