54 switch( aFootprintShape )
56 case MICROWAVE_FOOTPRINT_SHAPE::GAP:
57 msg =
_(
"Gap Size:" );
58 cmp_name = wxT(
"muwave_gap" );
62 case MICROWAVE_FOOTPRINT_SHAPE::STUB:
63 msg =
_(
"Stub Size:" );
64 cmp_name = wxT(
"muwave_stub" );
69 case MICROWAVE_FOOTPRINT_SHAPE::STUB_ARC:
70 msg =
_(
"Arc Stub Radius Value:" );
71 cmp_name = wxT(
"muwave_arcstub" );
92 if( aFootprintShape == MICROWAVE_FOOTPRINT_SHAPE::STUB_ARC )
96 _(
"Create Microwave Footprint" ), msg );
106 if( !msg.ToDouble( &fval ) )
128 switch( aFootprintShape )
130 case MICROWAVE_FOOTPRINT_SHAPE::GAP:
133 pad->SetX(
pad->GetPosition().x + offsetX );
140 case MICROWAVE_FOOTPRINT_SHAPE::STUB:
141 pad->SetNumber( wxT(
"1" ) );
147 pad->SetY(
pad->GetPosition().y + offsetY );
150 case MICROWAVE_FOOTPRINT_SHAPE::STUB_ARC:
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 )
225 pad->SetAttribute( PAD_ATTRIB::SMD );
228 pad->SetNumber( wxString::Format( wxT(
"%d" ), pad_num ) );
int GetCurrentTrackWidth() const
void SetTextSize(VECTOR2I aNewSize, bool aEnforceMinTextSize=true)
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
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)
Creates a new footprint, at position 0,0.
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Returns 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, int aDisplayTime)
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
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