51 switch( aFootprintShape )
54 msg =
_(
"Gap Size:" );
55 cmp_name =
"muwave_gap";
60 msg =
_(
"Stub Size:" );
61 cmp_name =
"muwave_stub";
67 msg =
_(
"Arc Stub Radius Value:" );
68 cmp_name =
"muwave_arcstub";
80 if( dlg.ShowQuasiModal() != wxID_OK )
83 value = dlg.GetValue();
90 double fcoeff = 10.0, fval;
91 msg.Printf( wxT(
"%3.1f" ),
angle / fcoeff );
93 _(
"Create microwave footprint" ), msg );
100 if( !msg.ToDouble( &fval ) )
119 switch( aFootprintShape )
122 oX = -( gap_size + pad->
GetSize().x ) / 2;
146 int numPoints = (
angle / 50) + 3;
147 std::vector<wxPoint> polyPoints;
148 polyPoints.reserve( numPoints );
150 polyPoints.emplace_back( wxPoint( 0, 0 ) );
152 int theta = -
angle / 2;
154 for(
int ii = 1; ii < numPoints - 1; ii++ )
156 wxPoint pt( 0, -gap_size );
158 polyPoints.push_back( pt );
162 if( theta >
angle / 2 )
167 polyPoints.push_back( polyPoints[0] );
185 int aTextSize,
int aPadCount )
211 pad->
SetSize( wxSize( tw, tw ) );
218 Line.Printf( wxT(
"%d" ), pad_num );
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
wxString GetValue() const
void OnModify() override
Must be called after a board change to set the modified flag.
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Returns the BOARD_DESIGN_SETTINGS for the open project.
int GetCurrentTrackWidth() const
This file is part of the common library.
A KICAD version of wxTextEntryDialog which supports the various improvments/work-arounds from DIALOG_...
void SetAnchorPadShape(PAD_SHAPE_T aShape)
Set the shape of the anchor pad for custom shaped pads.
Smd pad, appears on the solder paste layer (default)
void SetName(const wxString &aName)
Set the pad name (sometimes called pad number, although it can be an array reference like AA12).
void SetTextSize(const wxSize &aNewSize)
void SetSize(const wxSize &aSize)
void RotatePoint(int *pX, int *pY, double angle)
long long int ValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType)
Function ValueFromString converts aTextValue in aUnits to internal units used by the application.
const wxSize & GetSize() const
void SetShape(PAD_SHAPE_T aShape)
Set the new shape of this pad.
FOOTPRINT * CreateNewFootprint(const wxString &aFootprintName)
Creates a new footprint, at position 0,0.
const wxPoint & GetPos0() const
void SetLayerSet(LSET aLayers) override
wxPoint GetPosition() const override
static DIRECTION_45::AngleType angle(const VECTOR2I &a, const VECTOR2I &b)
void AddPrimitivePoly(const SHAPE_POLY_SET &aPoly, int aThickness, bool aFilled)
Has meaning only for custom shape pads.
void SetPosition(const wxPoint &aPos) override
The main frame for Pcbnew.
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
wxString StringFromValue(EDA_UNITS aUnits, double aValue, bool aAddUnitSymbol, EDA_DATA_TYPE aType)
Convert a value to a string using double notation.
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
void SetAttribute(PAD_ATTR_T aAttribute)