Initialize the style to define a through-hole pad.
Syntax: |
---|
FWizPadStyle.InitTHPadStack(holeDiameter, padDiameter=0, bSquared=false, shapeFactor=0, bPlated=true, padType=FWiz.PADTHTYPE_PAD, xFactor=0) |
Parameters
Parameter | Description | ||||||
---|---|---|---|---|---|---|---|
holeDiameter | Specify the hole diameter. | ||||||
padDiameter | Specify the diameter of the pad. If this value is less than or equal to zero it is calculated from the hole value. | ||||||
bSquared | Specify true if the pad should be square or false for a circular pad. | ||||||
shapeFactor | Specify the shape of the pad by defining whether the corners should be straight, rounded or beveled. Specify the shape of the pad as follows:
|
||||||
bPlated | Specify the hole type. Enter true if the hole is plated otherwise false. | ||||||
padType | Specify the type of pad. It can be one of the following values: FWiz.PADTHTYPE_PAD, FWiz.PADTHTYPE_HOLE, FWiz.PADTHTYPE_VIA. | ||||||
xFactor | Determines the increase in size along the X axis of the pad with respect to the Y axis. If you specify a value of 1 then the pad will have twice the width of the height. |
Return Value
If the operation ends correctly, it returns true otherwise it returns false.
Remarks
This function creates a public pad style.
Example
See the TO-220 sample code for the complete script.
Copy code | |
---|---|
var style = new FWizPadStyle(0);
if (style.IsAutoPadStyle())
{
style.SetStyle(1);
var holeSize = FWiz.CalcHoleDiameter(FWiz.GetValue("b"), -1);
var padSize = FWiz.CalcPadDiameter(holeSize);
style.InitTHPadStack(holeSize, padSize);
}
// Add Pads
FWiz.DrawPad(0, 0, "2", style, 0);
FWiz.DrawPad(-FWiz.GetValue("e"), 0, "1", style, 0);
FWiz.DrawPad(+FWiz.GetValue("e"), 0, "3", style, 0);
|