Rework on Enum PAD_SHAPE_T, PAD_DRILL_SHAPE_T and PAD_ATTR_T (see rev 6008) : the new and better names are now used in Kicad code and existing python scripts.
PAD_SHAPE_T and PAD_ATTR_T still have a double definition (new names and old names) to be sure python scripts are nor broken by the change. PAD_DRILL_SHAPE_T does not have a double definition, because it is unlikely oblong holes are used in python scripts. Double definitions will be removed in the (next) future.
This commit is contained in:
parent
705eb1f245
commit
4fc230b773
|
@ -141,7 +141,7 @@ void EDA_3D_CANVAS::buildBoardThroughHolesPolygonList( SHAPE_POLY_SET& allBoardH
|
|||
int inflate = copper_thickness;
|
||||
|
||||
// If not plated, no copper.
|
||||
if( pad->GetAttribute () == PAD_HOLE_NOT_PLATED )
|
||||
if( pad->GetAttribute () == PAD_ATTRIB_HOLE_NOT_PLATED )
|
||||
inflate = 0;
|
||||
|
||||
pad->BuildPadDrillShapePolygon( allBoardHoles, inflate, segcount );
|
||||
|
@ -387,7 +387,7 @@ void EDA_3D_CANVAS::buildBoard3DView( GLuint aBoardList, GLuint aBodyOnlyList,
|
|||
for( const MODULE* module = pcb->m_Modules; module; module = module->Next() )
|
||||
{
|
||||
for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() )
|
||||
if( pad->GetAttribute () != PAD_HOLE_NOT_PLATED )
|
||||
if( pad->GetAttribute () != PAD_ATTRIB_HOLE_NOT_PLATED )
|
||||
draw3DPadHole( pad );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -449,7 +449,7 @@ void EDA_3D_CANVAS::buildPadShapeThickOutlineAsPolygon( const D_PAD* aPad,
|
|||
int aCircleToSegmentsCount,
|
||||
double aCorrectionFactor )
|
||||
{
|
||||
if( aPad->GetShape() == PAD_CIRCLE ) // Draw a ring
|
||||
if( aPad->GetShape() == PAD_SHAPE_CIRCLE ) // Draw a ring
|
||||
{
|
||||
TransformRingToPolygon( aCornerBuffer, aPad->ShapePos(),
|
||||
aPad->GetSize().x / 2, aCircleToSegmentsCount, aWidth );
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
* LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
|
||||
* THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN PAD_CONNECTION WITH THE
|
||||
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
|
||||
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* US Government Users Restricted Rights
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
* LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
|
||||
* THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN PAD_CONNECTION WITH THE
|
||||
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
|
||||
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* US Government Users Restricted Rights
|
||||
|
|
|
@ -11,28 +11,25 @@
|
|||
*/
|
||||
enum PAD_SHAPE_T
|
||||
{
|
||||
PAD_CIRCLE,
|
||||
PAD_ROUND = PAD_CIRCLE,
|
||||
PAD_SHAPE_CIRCLE = PAD_CIRCLE,
|
||||
PAD_RECT,
|
||||
PAD_SHAPE_RECT = PAD_RECT,
|
||||
PAD_OVAL,
|
||||
PAD_SHAPE_OVAL = PAD_OVAL,
|
||||
PAD_TRAPEZOID,
|
||||
PAD_SHAPE_TRAPEZOID = PAD_TRAPEZOID
|
||||
PAD_SHAPE_CIRCLE,
|
||||
PAD_CIRCLE = PAD_SHAPE_CIRCLE,
|
||||
PAD_SHAPE_RECT,
|
||||
PAD_RECT = PAD_SHAPE_RECT,
|
||||
PAD_SHAPE_OVAL,
|
||||
PAD_OVAL = PAD_SHAPE_OVAL,
|
||||
PAD_SHAPE_TRAPEZOID,
|
||||
PAD_TRAPEZOID = PAD_SHAPE_TRAPEZOID
|
||||
};
|
||||
|
||||
/**
|
||||
* Enum PAD_DRILL_SHAPE_T
|
||||
* is the set of pad dtill shapes, used with D_PAD::{Set,Get}DrillShape()
|
||||
* is the set of pad drill shapes, used with D_PAD::{Set,Get}DrillShape()
|
||||
* The double name is for convenience of Python devs
|
||||
*/
|
||||
enum PAD_DRILL_SHAPE_T
|
||||
{
|
||||
PAD_DRILL_CIRCLE,
|
||||
PAD_DRILL_SHAPE_CIRCLE = PAD_DRILL_CIRCLE,
|
||||
PAD_DRILL_OBLONG,
|
||||
PAD_DRILL_SHAPE_OBLONG = PAD_DRILL_OBLONG
|
||||
PAD_DRILL_SHAPE_CIRCLE,
|
||||
PAD_DRILL_SHAPE_OBLONG,
|
||||
};
|
||||
|
||||
|
||||
|
@ -43,15 +40,15 @@ enum PAD_DRILL_SHAPE_T
|
|||
*/
|
||||
enum PAD_ATTR_T
|
||||
{
|
||||
PAD_STANDARD, ///< Usual pad
|
||||
PAD_ATTRIB_STANDARD = PAD_STANDARD,
|
||||
PAD_SMD, ///< Smd pad, appears on the solder paste layer (default)
|
||||
PAD_ATTRIB_SMD = PAD_SMD,
|
||||
PAD_CONN, ///< Like smd, does not appear on the solder paste layer (default)
|
||||
PAD_ATTRIB_CONN = PAD_CONN,
|
||||
PAD_HOLE_NOT_PLATED, ///< like PAD_STANDARD, but not plated
|
||||
PAD_ATTRIB_STANDARD, ///< Usual pad
|
||||
PAD_STANDARD = PAD_ATTRIB_STANDARD,
|
||||
PAD_ATTRIB_SMD, ///< Smd pad, appears on the solder paste layer (default)
|
||||
PAD_SMD = PAD_ATTRIB_SMD,
|
||||
PAD_ATTRIB_CONN, ///< Like smd, does not appear on the solder paste layer (default)
|
||||
PAD_CONN = PAD_ATTRIB_CONN,
|
||||
PAD_ATTRIB_HOLE_NOT_PLATED, ///< like PAD_STANDARD, but not plated
|
||||
///< mechanical use only, no connection allowed
|
||||
PAD_ATTRIB_HOLE_NOT_PLATED = PAD_HOLE_NOT_PLATED
|
||||
PAD_HOLE_NOT_PLATED = PAD_ATTRIB_HOLE_NOT_PLATED
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1645,7 +1645,7 @@ public:
|
|||
* @param aTextSize = the size of ref and value texts ( <= 0 to use board default values )
|
||||
* @param aPadCount = number of pads
|
||||
* Pads settings are:
|
||||
* PAD_SMD, rectangular, H size = V size = current track width.
|
||||
* PAD_ATTRIB_SMD, rectangular, H size = V size = current track width.
|
||||
*/
|
||||
MODULE* CreateMuWaveBaseFootprint( const wxString& aValue, int aTextSize, int aPadCount );
|
||||
|
||||
|
@ -1653,7 +1653,7 @@ public:
|
|||
* Create_MuWaveComponent
|
||||
* creates a module "GAP" or "STUB" used in micro wave designs.
|
||||
* This module has 2 pads:
|
||||
* PAD_SMD, rectangular, H size = V size = current track width.
|
||||
* PAD_ATTRIB_SMD, rectangular, H size = V size = current track width.
|
||||
* the "gap" is isolation created between this 2 pads
|
||||
*/
|
||||
MODULE* Create_MuWaveComponent( int shape_type );
|
||||
|
|
|
@ -92,7 +92,7 @@ void PlacePad( D_PAD* aPad, int color, int marge, int op_logic )
|
|||
dx = aPad->GetSize().x / 2;
|
||||
dx += marge;
|
||||
|
||||
if( aPad->GetShape() == PAD_CIRCLE )
|
||||
if( aPad->GetShape() == PAD_SHAPE_CIRCLE )
|
||||
{
|
||||
TraceFilledCircle( shape_pos.x, shape_pos.y, dx,
|
||||
aPad->GetLayerSet(), color, op_logic );
|
||||
|
@ -102,7 +102,7 @@ void PlacePad( D_PAD* aPad, int color, int marge, int op_logic )
|
|||
dy = aPad->GetSize().y / 2;
|
||||
dy += marge;
|
||||
|
||||
if( aPad->GetShape() == PAD_TRAPEZOID )
|
||||
if( aPad->GetShape() == PAD_SHAPE_TRAPEZOID )
|
||||
{
|
||||
dx += abs( aPad->GetDelta().y ) / 2;
|
||||
dy += abs( aPad->GetDelta().x ) / 2;
|
||||
|
|
|
@ -143,19 +143,19 @@ void MODULE::TransformPadsShapesWithClearanceToPolygon( LAYER_ID aLayer,
|
|||
|
||||
// NPTH pads are not drawn on layers if the shape size and pos is the same
|
||||
// as their hole:
|
||||
if( aSkipNPTHPadsWihNoCopper && pad->GetAttribute() == PAD_HOLE_NOT_PLATED )
|
||||
if( aSkipNPTHPadsWihNoCopper && pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED )
|
||||
{
|
||||
if( pad->GetDrillSize() == pad->GetSize() && pad->GetOffset() == wxPoint( 0, 0 ) )
|
||||
{
|
||||
switch( pad->GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE:
|
||||
if( pad->GetDrillShape() == PAD_DRILL_CIRCLE )
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
if( pad->GetDrillShape() == PAD_DRILL_SHAPE_CIRCLE )
|
||||
continue;
|
||||
break;
|
||||
|
||||
case PAD_OVAL:
|
||||
if( pad->GetDrillShape() != PAD_DRILL_CIRCLE )
|
||||
case PAD_SHAPE_OVAL:
|
||||
if( pad->GetDrillShape() != PAD_DRILL_SHAPE_CIRCLE )
|
||||
continue;
|
||||
break;
|
||||
|
||||
|
@ -569,13 +569,13 @@ void D_PAD:: TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer
|
|||
|
||||
switch( GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
dx = KiROUND( dx * aCorrectionFactor );
|
||||
TransformCircleToPolygon( aCornerBuffer, PadShapePos, dx,
|
||||
aCircleToSegmentsCount );
|
||||
break;
|
||||
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
// An oval pad has the same shape as a segment with rounded ends
|
||||
{
|
||||
int width;
|
||||
|
@ -601,8 +601,8 @@ void D_PAD:: TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
case PAD_SHAPE_RECT:
|
||||
{
|
||||
wxPoint corners[4];
|
||||
BuildPadPolygon( corners, wxSize( 0, 0 ), angle );
|
||||
|
@ -643,14 +643,14 @@ void D_PAD::BuildPadShapePolygon( SHAPE_POLY_SET& aCornerBuffer,
|
|||
* the pad position is NOT the shape position */
|
||||
switch( GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE:
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
case PAD_SHAPE_OVAL:
|
||||
TransformShapeWithClearanceToPolygon( aCornerBuffer, aInflateValue.x,
|
||||
aSegmentsPerCircle, aCorrectionFactor );
|
||||
break;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
case PAD_SHAPE_RECT:
|
||||
aCornerBuffer.NewOutline();
|
||||
|
||||
BuildPadPolygon( corners, aInflateValue, m_Orient );
|
||||
|
@ -766,7 +766,7 @@ void CreateThermalReliefPadPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
|||
|
||||
switch( aPad.GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE: // Add 4 similar holes
|
||||
case PAD_SHAPE_CIRCLE: // Add 4 similar holes
|
||||
{
|
||||
/* we create 4 copper holes and put them in position 1, 2, 3 and 4
|
||||
* here is the area of the rectangular pad + its thermal gap
|
||||
|
@ -848,7 +848,7 @@ void CreateThermalReliefPadPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
{
|
||||
// Oval pad support along the lines of round and rectangular pads
|
||||
std::vector <wxPoint> corners_buffer; // Polygon buffer as vector
|
||||
|
@ -978,7 +978,7 @@ void CreateThermalReliefPadPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_RECT: // draw 4 Holes
|
||||
case PAD_SHAPE_RECT: // draw 4 Holes
|
||||
{
|
||||
/* we create 4 copper holes and put them in position 1, 2, 3 and 4
|
||||
* here is the area of the rectangular pad + its thermal gap
|
||||
|
@ -1075,7 +1075,7 @@ void CreateThermalReliefPadPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
{
|
||||
SHAPE_POLY_SET antipad; // The full antipad area
|
||||
|
||||
|
|
|
@ -700,7 +700,7 @@ unsigned MODULE::GetPadCount( INCLUDE_NPTH_T aIncludeNPTH ) const
|
|||
|
||||
for( D_PAD* pad = m_Pads; pad; pad = pad->Next() )
|
||||
{
|
||||
if( pad->GetAttribute() == PAD_HOLE_NOT_PLATED )
|
||||
if( pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED )
|
||||
continue;
|
||||
|
||||
cnt++;
|
||||
|
|
|
@ -67,9 +67,9 @@ D_PAD::D_PAD( MODULE* parent ) :
|
|||
m_Pos = GetParent()->GetPosition();
|
||||
}
|
||||
|
||||
SetShape( PAD_CIRCLE ); // Default pad shape is PAD_CIRCLE.
|
||||
SetDrillShape( PAD_DRILL_CIRCLE ); // Default pad drill shape is a circle.
|
||||
m_Attribute = PAD_STANDARD; // Default pad type is NORMAL (thru hole)
|
||||
SetShape( PAD_SHAPE_CIRCLE ); // Default pad shape is PAD_CIRCLE.
|
||||
SetDrillShape( PAD_DRILL_SHAPE_CIRCLE ); // Default pad drill shape is a circle.
|
||||
m_Attribute = PAD_ATTRIB_STANDARD; // Default pad type is NORMAL (thru hole)
|
||||
m_LocalClearance = 0;
|
||||
m_LocalSolderMaskMargin = 0;
|
||||
m_LocalSolderPasteMargin = 0;
|
||||
|
@ -110,7 +110,7 @@ LSET D_PAD::ConnSMDMask()
|
|||
|
||||
LSET D_PAD::UnplatedHoleMask()
|
||||
{
|
||||
// was #define PAD_HOLE_NOT_PLATED_DEFAULT_LAYERS ALL_CU_LAYERS |
|
||||
// was #define PAD_ATTRIB_HOLE_NOT_PLATED_DEFAULT_LAYERS ALL_CU_LAYERS |
|
||||
// SILKSCREEN_LAYER_FRONT | SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT
|
||||
static LSET saved = LSET::AllCuMask() | LSET( 3, F_SilkS, B_Mask, F_Mask );
|
||||
return saved;
|
||||
|
@ -124,19 +124,19 @@ int D_PAD::boundingRadius() const
|
|||
|
||||
switch( GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
radius = m_Size.x / 2;
|
||||
break;
|
||||
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
radius = std::max( m_Size.x, m_Size.y ) / 2;
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_RECT:
|
||||
radius = 1 + KiROUND( EuclideanNorm( m_Size ) / 2 );
|
||||
break;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
x = m_Size.x + std::abs( m_DeltaSize.y ); // Remember: m_DeltaSize.y is the m_Size.x change
|
||||
y = m_Size.y + std::abs( m_DeltaSize.x ); // Remember: m_DeltaSize.x is the m_Size.y change
|
||||
radius = 1 + KiROUND( hypot( x, y ) / 2 );
|
||||
|
@ -158,12 +158,12 @@ const EDA_RECT D_PAD::GetBoundingBox() const
|
|||
|
||||
switch( GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
area.SetOrigin( m_Pos );
|
||||
area.Inflate( m_Size.x / 2 );
|
||||
break;
|
||||
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
//Use the maximal two most distant points and track their rotation
|
||||
// (utilise symmetry to avoid four points)
|
||||
quadrant1.x = m_Size.x/2;
|
||||
|
@ -179,7 +179,7 @@ const EDA_RECT D_PAD::GetBoundingBox() const
|
|||
area.SetSize( 2*dx, 2*dy );
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_RECT:
|
||||
//Use two corners and track their rotation
|
||||
// (utilise symmetry to avoid four points)
|
||||
quadrant1.x = m_Size.x/2;
|
||||
|
@ -195,7 +195,7 @@ const EDA_RECT D_PAD::GetBoundingBox() const
|
|||
area.SetSize( 2*dx, 2*dy );
|
||||
break;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
//Use the four corners and track their rotation
|
||||
// (Trapezoids will not be symmetric)
|
||||
quadrant1.x = (m_Size.x + m_DeltaSize.y)/2;
|
||||
|
@ -263,7 +263,7 @@ void D_PAD::SetAttribute( PAD_ATTR_T aAttribute )
|
|||
{
|
||||
m_Attribute = aAttribute;
|
||||
|
||||
if( aAttribute == PAD_SMD )
|
||||
if( aAttribute == PAD_ATTRIB_SMD )
|
||||
m_Drill = wxSize( 0, 0 );
|
||||
}
|
||||
|
||||
|
@ -417,7 +417,7 @@ bool D_PAD::IncrementItemReference()
|
|||
|
||||
bool D_PAD::IncrementPadName( bool aSkipUnconnectable, bool aFillSequenceGaps )
|
||||
{
|
||||
bool skip = aSkipUnconnectable && ( GetAttribute() == PAD_HOLE_NOT_PLATED );
|
||||
bool skip = aSkipUnconnectable && ( GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED );
|
||||
|
||||
if( !skip )
|
||||
SetPadName( GetParent()->GetNextPadName( aFillSequenceGaps ) );
|
||||
|
@ -654,7 +654,7 @@ void D_PAD::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM>& aList )
|
|||
|
||||
Line = ::CoordinateToString( (unsigned) m_Drill.x );
|
||||
|
||||
if( GetDrillShape() == PAD_DRILL_CIRCLE )
|
||||
if( GetDrillShape() == PAD_DRILL_SHAPE_CIRCLE )
|
||||
{
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Drill" ), Line, RED ) );
|
||||
}
|
||||
|
@ -741,13 +741,13 @@ bool D_PAD::HitTest( const wxPoint& aPosition ) const
|
|||
|
||||
switch( GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
if( KiROUND( EuclideanNorm( delta ) ) <= dx )
|
||||
return true;
|
||||
|
||||
break;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
{
|
||||
wxPoint poly[4];
|
||||
BuildPadPolygon( poly, wxSize(0,0), 0 );
|
||||
|
@ -755,7 +755,7 @@ bool D_PAD::HitTest( const wxPoint& aPosition ) const
|
|||
return TestPointInsidePolygon( poly, 4, delta );
|
||||
}
|
||||
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
{
|
||||
RotatePoint( &delta, -m_Orient );
|
||||
// An oval pad has the same shape as a segment with rounded ends
|
||||
|
@ -776,7 +776,7 @@ bool D_PAD::HitTest( const wxPoint& aPosition ) const
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_RECT:
|
||||
RotatePoint( &delta, -m_Orient );
|
||||
|
||||
if( (abs( delta.x ) <= dx ) && (abs( delta.y ) <= dy) )
|
||||
|
@ -857,16 +857,16 @@ wxString D_PAD::ShowPadShape() const
|
|||
{
|
||||
switch( GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
return _( "Circle" );
|
||||
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
return _( "Oval" );
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_RECT:
|
||||
return _( "Rect" );
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
return _( "Trap" );
|
||||
|
||||
default:
|
||||
|
@ -879,16 +879,16 @@ wxString D_PAD::ShowPadAttr() const
|
|||
{
|
||||
switch( GetAttribute() )
|
||||
{
|
||||
case PAD_STANDARD:
|
||||
case PAD_ATTRIB_STANDARD:
|
||||
return _( "Std" );
|
||||
|
||||
case PAD_SMD:
|
||||
case PAD_ATTRIB_SMD:
|
||||
return _( "SMD" );
|
||||
|
||||
case PAD_CONN:
|
||||
case PAD_ATTRIB_CONN:
|
||||
return _( "Conn" );
|
||||
|
||||
case PAD_HOLE_NOT_PLATED:
|
||||
case PAD_ATTRIB_HOLE_NOT_PLATED:
|
||||
return _( "Not Plated" );
|
||||
|
||||
default:
|
||||
|
@ -931,7 +931,7 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const
|
|||
aCount = 0;
|
||||
|
||||
// These types of pads contain a hole
|
||||
if( m_Attribute == PAD_STANDARD || m_Attribute == PAD_HOLE_NOT_PLATED )
|
||||
if( m_Attribute == PAD_ATTRIB_STANDARD || m_Attribute == PAD_ATTRIB_HOLE_NOT_PLATED )
|
||||
aLayers[aCount++] = ITEM_GAL_LAYER( PADS_HOLES_VISIBLE );
|
||||
|
||||
if( IsOnLayer( F_Cu ) && IsOnLayer( B_Cu ) )
|
||||
|
|
|
@ -520,7 +520,7 @@ private:
|
|||
|
||||
wxSize m_Size; ///< X and Y size ( relative to orient 0)
|
||||
|
||||
PAD_DRILL_SHAPE_T m_drillShape; ///< PAD_DRILL_NONE, PAD_DRILL_CIRCLE, PAD_DRILL_OBLONG
|
||||
PAD_DRILL_SHAPE_T m_drillShape; ///< PAD_DRILL_SHAPE_CIRCLE, PAD_DRILL_SHAPE_OBLONG
|
||||
|
||||
|
||||
/**
|
||||
|
@ -548,7 +548,8 @@ private:
|
|||
wxPoint m_Pos0; ///< Initial Pad position (i.e. pad position relative to the
|
||||
///< module anchor, orientation 0)
|
||||
|
||||
PAD_ATTR_T m_Attribute; ///< NORMAL, PAD_SMD, PAD_CONN, PAD_HOLE_NOT_PLATED
|
||||
PAD_ATTR_T m_Attribute; ///< PAD_ATTRIB_NORMAL, PAD_ATTRIB_SMD,
|
||||
///< PAD_ATTRIB_CONN, PAD_ATTRIB_HOLE_NOT_PLATED
|
||||
double m_Orient; ///< in 1/10 degrees
|
||||
|
||||
int m_LengthPadToDie; ///< Length net from pad to die, inside the package
|
||||
|
|
|
@ -169,7 +169,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode,
|
|||
|
||||
// if SMD or connector pad and high contrast mode
|
||||
if( ( aDraw_mode & GR_ALLOW_HIGHCONTRAST ) &&
|
||||
( GetAttribute() == PAD_SMD || GetAttribute() == PAD_CONN ) &&
|
||||
( GetAttribute() == PAD_ATTRIB_SMD || GetAttribute() == PAD_ATTRIB_CONN ) &&
|
||||
displ_opts && displ_opts->m_ContrastModeDisplay )
|
||||
{
|
||||
// when routing tracks
|
||||
|
@ -190,7 +190,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode,
|
|||
ColorTurnToDarkDarkGray( &color );
|
||||
}
|
||||
// else routing between an internal signal layer and some other
|
||||
// layer. Grey out all PAD_SMD pads not on current or the single
|
||||
// layer. Grey out all PAD_ATTRIB_SMD pads not on current or the single
|
||||
// selected external layer.
|
||||
else if( !IsOnLayer( screen->m_Active_Layer )
|
||||
&& !IsOnLayer( routeTop )
|
||||
|
@ -199,7 +199,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode,
|
|||
ColorTurnToDarkDarkGray( &color );
|
||||
}
|
||||
}
|
||||
// when not edting tracks, show PAD_SMD components not on active layer
|
||||
// when not edting tracks, show PAD_ATTRIB_SMD components not on active layer
|
||||
// as greyed out
|
||||
else
|
||||
{
|
||||
|
@ -273,7 +273,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode,
|
|||
if( !( m_layerMask & LSET::AllCuMask() ).any() )
|
||||
DisplayIsol = false;
|
||||
|
||||
if( ( GetAttribute() == PAD_HOLE_NOT_PLATED ) &&
|
||||
if( ( GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED ) &&
|
||||
brd->IsElementVisible( NON_PLATED_VISIBLE ) )
|
||||
{
|
||||
drawInfo.m_ShowNotPlatedHole = true;
|
||||
|
@ -330,7 +330,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
|
|||
|
||||
switch( GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
if( aDrawInfo.m_ShowPadFilled )
|
||||
GRFilledCircle( aClipBox, aDC, shape_pos.x, shape_pos.y,
|
||||
halfsize.x + aDrawInfo.m_Mask_margin.x, 0,
|
||||
|
@ -350,7 +350,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
|
|||
|
||||
break;
|
||||
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
{
|
||||
wxPoint segStart, segEnd;
|
||||
seg_width = BuildSegmentFromOvalShape(segStart, segEnd, angle,
|
||||
|
@ -379,8 +379,8 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_RECT:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
BuildPadPolygon( coord, aDrawInfo.m_Mask_margin, angle );
|
||||
|
||||
for( int ii = 0; ii < 4; ii++ )
|
||||
|
@ -436,13 +436,13 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
|
|||
|
||||
switch( GetDrillShape() )
|
||||
{
|
||||
case PAD_DRILL_CIRCLE:
|
||||
case PAD_DRILL_SHAPE_CIRCLE:
|
||||
if( aDC->LogicalToDeviceXRel( hole ) > MIN_DRAW_WIDTH )
|
||||
GRFilledCircle( aClipBox, aDC, holepos.x, holepos.y, hole, 0,
|
||||
hole_color, hole_color );
|
||||
break;
|
||||
|
||||
case PAD_DRILL_OBLONG:
|
||||
case PAD_DRILL_SHAPE_OBLONG:
|
||||
{
|
||||
wxPoint drl_start, drl_end;
|
||||
GetOblongDrillGeometry( drl_start, drl_end, seg_width );
|
||||
|
@ -491,7 +491,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
|
|||
if( aDrawInfo.m_Display_netname )
|
||||
shortname_len = GetShortNetname().Len();
|
||||
|
||||
if( GetShape() == PAD_CIRCLE )
|
||||
if( GetShape() == PAD_SHAPE_CIRCLE )
|
||||
angle = 0;
|
||||
|
||||
AreaSize = m_Size;
|
||||
|
@ -629,7 +629,7 @@ void D_PAD::BuildPadPolygon( wxPoint aCoord[4], wxSize aInflateValue,
|
|||
|
||||
switch( GetShape() )
|
||||
{
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_RECT:
|
||||
// For rectangular shapes, inflate is easy
|
||||
halfsize += aInflateValue;
|
||||
|
||||
|
@ -642,7 +642,7 @@ void D_PAD::BuildPadPolygon( wxPoint aCoord[4], wxSize aInflateValue,
|
|||
halfsize.y = 0;
|
||||
break;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
// Trapezoidal pad: verify delta values
|
||||
delta.x = ( m_DeltaSize.x >> 1 );
|
||||
delta.y = ( m_DeltaSize.y >> 1 );
|
||||
|
@ -681,7 +681,7 @@ void D_PAD::BuildPadPolygon( wxPoint aCoord[4], wxSize aInflateValue,
|
|||
|
||||
// Offsetting the trapezoid shape id needed
|
||||
// It is assumed delta.x or/and delta.y == 0
|
||||
if( GetShape() == PAD_TRAPEZOID && (aInflateValue.x != 0 || aInflateValue.y != 0) )
|
||||
if( GetShape() == PAD_SHAPE_TRAPEZOID && (aInflateValue.x != 0 || aInflateValue.y != 0) )
|
||||
{
|
||||
double angle;
|
||||
wxSize corr;
|
||||
|
|
|
@ -246,8 +246,8 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa
|
|||
// for through pads: pads on Front or Back board sides must be seen
|
||||
pad = (D_PAD*) item;
|
||||
|
||||
if( (pad->GetAttribute() != PAD_SMD) &&
|
||||
(pad->GetAttribute() != PAD_CONN) ) // a hole is present, so multiple layers
|
||||
if( (pad->GetAttribute() != PAD_ATTRIB_SMD) &&
|
||||
(pad->GetAttribute() != PAD_ATTRIB_CONN) ) // a hole is present, so multiple layers
|
||||
{
|
||||
// proceed to the common tests below, but without the parent module test,
|
||||
// by leaving module==NULL, but having pad != null
|
||||
|
|
|
@ -173,11 +173,11 @@ void DIALOG_GENDRILL::InitDisplayParams()
|
|||
{
|
||||
for( D_PAD* pad = module->Pads(); pad != NULL; pad = pad->Next() )
|
||||
{
|
||||
if( pad->GetDrillShape() == PAD_DRILL_CIRCLE )
|
||||
if( pad->GetDrillShape() == PAD_DRILL_SHAPE_CIRCLE )
|
||||
{
|
||||
if( pad->GetDrillSize().x != 0 )
|
||||
{
|
||||
if( pad->GetAttribute() == PAD_HOLE_NOT_PLATED )
|
||||
if( pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED )
|
||||
m_notplatedPadsHoleCount++;
|
||||
else
|
||||
m_platedPadsHoleCount++;
|
||||
|
@ -187,7 +187,7 @@ void DIALOG_GENDRILL::InitDisplayParams()
|
|||
{
|
||||
if( pad->GetDrillSize().x != 0 && pad->GetDrillSize().y != 0 )
|
||||
{
|
||||
if( pad->GetAttribute() == PAD_HOLE_NOT_PLATED )
|
||||
if( pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED )
|
||||
m_notplatedPadsHoleCount++;
|
||||
else
|
||||
m_platedPadsHoleCount++;
|
||||
|
|
|
@ -52,33 +52,33 @@
|
|||
|
||||
// list of pad shapes.
|
||||
static PAD_SHAPE_T code_shape[] = {
|
||||
PAD_CIRCLE,
|
||||
PAD_OVAL,
|
||||
PAD_RECT,
|
||||
PAD_TRAPEZOID
|
||||
PAD_SHAPE_CIRCLE,
|
||||
PAD_SHAPE_OVAL,
|
||||
PAD_SHAPE_RECT,
|
||||
PAD_SHAPE_TRAPEZOID
|
||||
};
|
||||
|
||||
|
||||
static PAD_ATTR_T code_type[] = {
|
||||
PAD_STANDARD,
|
||||
PAD_SMD,
|
||||
PAD_CONN,
|
||||
PAD_HOLE_NOT_PLATED
|
||||
PAD_ATTRIB_STANDARD,
|
||||
PAD_ATTRIB_SMD,
|
||||
PAD_ATTRIB_CONN,
|
||||
PAD_ATTRIB_HOLE_NOT_PLATED
|
||||
};
|
||||
|
||||
|
||||
// Default mask layers setup for pads according to the pad type
|
||||
static const LSET std_pad_layers[] = {
|
||||
// PAD_STANDARD:
|
||||
// PAD_ATTRIB_STANDARD:
|
||||
D_PAD::StandardMask(),
|
||||
|
||||
// PAD_SMD:
|
||||
// PAD_ATTRIB_SMD:
|
||||
D_PAD::SMDMask(),
|
||||
|
||||
// PAD_CONN:
|
||||
// PAD_ATTRIB_CONN:
|
||||
D_PAD::ConnSMDMask(),
|
||||
|
||||
// PAD_HOLE_NOT_PLATED:
|
||||
// PAD_ATTRIB_HOLE_NOT_PLATED:
|
||||
D_PAD::UnplatedHoleMask()
|
||||
};
|
||||
|
||||
|
@ -236,7 +236,7 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event )
|
|||
drawInfo.m_Display_padnum = true;
|
||||
drawInfo.m_Display_netname = true;
|
||||
|
||||
if( m_dummyPad->GetAttribute() == PAD_HOLE_NOT_PLATED )
|
||||
if( m_dummyPad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED )
|
||||
drawInfo.m_ShowNotPlatedHole = true;
|
||||
|
||||
// Shows the local pad clearance
|
||||
|
@ -266,7 +266,7 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event )
|
|||
|
||||
// If the pad is a circle, use the x size here instead.
|
||||
int ysize;
|
||||
if( m_dummyPad->GetShape() == PAD_CIRCLE )
|
||||
if( m_dummyPad->GetShape() == PAD_SHAPE_CIRCLE )
|
||||
ysize = m_dummyPad->GetSize().x;
|
||||
else
|
||||
ysize = m_dummyPad->GetSize().y;
|
||||
|
@ -497,19 +497,19 @@ void DIALOG_PAD_PROPERTIES::initValues()
|
|||
switch( m_dummyPad->GetShape() )
|
||||
{
|
||||
default:
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
m_PadShape->SetSelection( 0 );
|
||||
break;
|
||||
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
m_PadShape->SetSelection( 1 );
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_RECT:
|
||||
m_PadShape->SetSelection( 2 );
|
||||
break;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
m_PadShape->SetSelection( 3 );
|
||||
break;
|
||||
}
|
||||
|
@ -531,13 +531,13 @@ void DIALOG_PAD_PROPERTIES::initValues()
|
|||
|
||||
// Enable/disable Pad name,and pad length die
|
||||
// (disable for NPTH pads (mechanical pads)
|
||||
bool enable = m_dummyPad->GetAttribute() != PAD_HOLE_NOT_PLATED;
|
||||
bool enable = m_dummyPad->GetAttribute() != PAD_ATTRIB_HOLE_NOT_PLATED;
|
||||
|
||||
m_PadNumCtrl->Enable( enable );
|
||||
m_PadNetNameCtrl->Enable( m_canEditNetName && enable && m_currentPad != NULL );
|
||||
m_LengthPadToDieCtrl->Enable( enable );
|
||||
|
||||
if( m_dummyPad->GetDrillShape() != PAD_DRILL_OBLONG )
|
||||
if( m_dummyPad->GetDrillShape() != PAD_DRILL_SHAPE_OBLONG )
|
||||
m_DrillShapeCtrl->SetSelection( 0 );
|
||||
else
|
||||
m_DrillShapeCtrl->SetSelection( 1 );
|
||||
|
@ -561,7 +561,7 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event )
|
|||
{
|
||||
switch( m_PadShape->GetSelection() )
|
||||
{
|
||||
case 0: // CIRCLE:
|
||||
case 0: // PAD_SHAPE_CIRCLE:
|
||||
m_ShapeDelta_Ctrl->Enable( false );
|
||||
m_trapDeltaDirChoice->Enable( false );
|
||||
m_ShapeSize_Y_Ctrl->Enable( false );
|
||||
|
@ -569,7 +569,7 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event )
|
|||
m_ShapeOffset_Y_Ctrl->Enable( false );
|
||||
break;
|
||||
|
||||
case 1: // OVAL:
|
||||
case 1: // PAD_SHAPE_OVAL:
|
||||
m_ShapeDelta_Ctrl->Enable( false );
|
||||
m_trapDeltaDirChoice->Enable( false );
|
||||
m_ShapeSize_Y_Ctrl->Enable( true );
|
||||
|
@ -577,7 +577,7 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event )
|
|||
m_ShapeOffset_Y_Ctrl->Enable( true );
|
||||
break;
|
||||
|
||||
case 2: // PAD_RECT:
|
||||
case 2: // PAD_SHAPE_RECT:
|
||||
m_ShapeDelta_Ctrl->Enable( false );
|
||||
m_trapDeltaDirChoice->Enable( false );
|
||||
m_ShapeSize_Y_Ctrl->Enable( true );
|
||||
|
@ -585,7 +585,7 @@ void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event )
|
|||
m_ShapeOffset_Y_Ctrl->Enable( true );
|
||||
break;
|
||||
|
||||
case 3: // TRAPEZOID:
|
||||
case 3: // PAD_SHAPE_TRAPEZOID:
|
||||
m_ShapeDelta_Ctrl->Enable( true );
|
||||
m_trapDeltaDirChoice->Enable( true );
|
||||
m_ShapeSize_Y_Ctrl->Enable( true );
|
||||
|
@ -739,7 +739,7 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK()
|
|||
|
||||
// Test for incorrect values
|
||||
if( (m_dummyPad->GetSize().x <= 0) ||
|
||||
((m_dummyPad->GetSize().y <= 0) && (m_dummyPad->GetShape() != PAD_CIRCLE)) )
|
||||
((m_dummyPad->GetSize().y <= 0) && (m_dummyPad->GetShape() != PAD_SHAPE_CIRCLE)) )
|
||||
{
|
||||
error_msgs.Add( _( "Pad size must be greater than zero" ) );
|
||||
}
|
||||
|
@ -762,7 +762,7 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK()
|
|||
// Note: he message is shown in an HTML window
|
||||
msg = _( "Error: the pad is not on a copper layer and has a hole" );
|
||||
|
||||
if( m_dummyPad->GetAttribute() == PAD_HOLE_NOT_PLATED )
|
||||
if( m_dummyPad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED )
|
||||
{
|
||||
msg += wxT( "<br><br><i>" );
|
||||
msg += _( "For NPTH pad, set pad size value to pad drill value,"
|
||||
|
@ -793,18 +793,18 @@ bool DIALOG_PAD_PROPERTIES::padValuesOK()
|
|||
|
||||
switch( m_dummyPad->GetAttribute() )
|
||||
{
|
||||
case PAD_HOLE_NOT_PLATED: // Not plated, but through hole, a hole is expected
|
||||
case PAD_STANDARD : // Pad through hole, a hole is also expected
|
||||
case PAD_ATTRIB_HOLE_NOT_PLATED: // Not plated, but through hole, a hole is expected
|
||||
case PAD_ATTRIB_STANDARD : // Pad through hole, a hole is also expected
|
||||
if( m_dummyPad->GetDrillSize().x <= 0 )
|
||||
error_msgs.Add( _( "Error: Through hole pad: drill diameter set to 0" ) );
|
||||
break;
|
||||
|
||||
case PAD_CONN: // Connector pads are smd pads, just they do not have solder paste.
|
||||
case PAD_ATTRIB_CONN: // Connector pads are smd pads, just they do not have solder paste.
|
||||
if( padlayers_mask[B_Paste] || padlayers_mask[F_Paste] )
|
||||
error_msgs.Add( _( "Error: Connector pads are not on the solder paste layer\n"
|
||||
"Use SMD pads instead" ) );
|
||||
// Fall trough
|
||||
case PAD_SMD: // SMD and Connector pads (One external copper layer only)
|
||||
case PAD_ATTRIB_SMD: // SMD and Connector pads (One external copper layer only)
|
||||
/*
|
||||
if( padlayers_mask[B_Cu] && padlayers_mask[F_Cu] )
|
||||
error_msgs.Add( _( "Error: only one copper layer allowed for SMD or Connector pads" ) );
|
||||
|
@ -922,8 +922,8 @@ void DIALOG_PAD_PROPERTIES::PadPropertiesAccept( wxCommandEvent& event )
|
|||
|
||||
wxString padNetname;
|
||||
|
||||
// For PAD_HOLE_NOT_PLATED, ensure there is no net name selected
|
||||
if( m_padMaster->GetAttribute() != PAD_HOLE_NOT_PLATED )
|
||||
// For PAD_ATTRIB_HOLE_NOT_PLATED, ensure there is no net name selected
|
||||
if( m_padMaster->GetAttribute() != PAD_ATTRIB_HOLE_NOT_PLATED )
|
||||
padNetname = m_PadNetNameCtrl->GetValue();
|
||||
|
||||
if( m_currentPad->GetNetname() != padNetname )
|
||||
|
@ -1025,18 +1025,18 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad )
|
|||
|
||||
if( m_DrillShapeCtrl->GetSelection() == 0 )
|
||||
{
|
||||
aPad->SetDrillShape( PAD_DRILL_CIRCLE );
|
||||
aPad->SetDrillShape( PAD_DRILL_SHAPE_CIRCLE );
|
||||
y = x;
|
||||
}
|
||||
else
|
||||
aPad->SetDrillShape( PAD_DRILL_OBLONG );
|
||||
aPad->SetDrillShape( PAD_DRILL_SHAPE_OBLONG );
|
||||
|
||||
aPad->SetDrillSize( wxSize( x, y ) );
|
||||
|
||||
// Read pad shape size:
|
||||
x = ValueFromTextCtrl( *m_ShapeSize_X_Ctrl );
|
||||
y = ValueFromTextCtrl( *m_ShapeSize_Y_Ctrl );
|
||||
if( aPad->GetShape() == PAD_CIRCLE )
|
||||
if( aPad->GetShape() == PAD_SHAPE_CIRCLE )
|
||||
y = x;
|
||||
|
||||
aPad->SetSize( wxSize( x, y ) );
|
||||
|
@ -1108,22 +1108,22 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad )
|
|||
// Clear some values, according to the pad type and shape
|
||||
switch( aPad->GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
aPad->SetOffset( wxPoint( 0, 0 ) );
|
||||
aPad->SetDelta( wxSize( 0, 0 ) );
|
||||
x = aPad->GetSize().x;
|
||||
aPad->SetSize( wxSize( x, x ) );
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_RECT:
|
||||
aPad->SetDelta( wxSize( 0, 0 ) );
|
||||
break;
|
||||
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
aPad->SetDelta( wxSize( 0, 0 ) );
|
||||
break;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1132,21 +1132,21 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad )
|
|||
|
||||
switch( aPad->GetAttribute() )
|
||||
{
|
||||
case PAD_STANDARD:
|
||||
case PAD_ATTRIB_STANDARD:
|
||||
break;
|
||||
|
||||
case PAD_CONN:
|
||||
case PAD_SMD:
|
||||
// SMD and PAD_CONN has no hole.
|
||||
// basically, SMD and PAD_CONN are same type of pads
|
||||
// PAD_CONN has just a default non technical layers that differs from SMD
|
||||
case PAD_ATTRIB_CONN:
|
||||
case PAD_ATTRIB_SMD:
|
||||
// SMD and PAD_ATTRIB_CONN has no hole.
|
||||
// basically, SMD and PAD_ATTRIB_CONN are same type of pads
|
||||
// PAD_ATTRIB_CONN has just a default non technical layers that differs from SMD
|
||||
// and are intended to be used in virtual edge board connectors
|
||||
// However we can accept a non null offset,
|
||||
// mainly to allow complex pads build from a set of from basic pad shapes
|
||||
aPad->SetDrillSize( wxSize( 0, 0 ) );
|
||||
break;
|
||||
|
||||
case PAD_HOLE_NOT_PLATED:
|
||||
case PAD_ATTRIB_HOLE_NOT_PLATED:
|
||||
// Mechanical purpose only:
|
||||
// no offset, no net name, no pad name allowed
|
||||
aPad->SetOffset( wxPoint( 0, 0 ) );
|
||||
|
|
|
@ -884,7 +884,7 @@ bool DRC::doPadToPadsDrc( D_PAD* aRefPad, D_PAD** aStart, D_PAD** aEnd, int x_li
|
|||
&& pad->GetDrillSize() == aRefPad->GetDrillSize()
|
||||
&& pad->GetDrillShape() == aRefPad->GetDrillShape() )
|
||||
{
|
||||
if( aRefPad->GetDrillShape() == PAD_DRILL_CIRCLE )
|
||||
if( aRefPad->GetDrillShape() == PAD_DRILL_SHAPE_CIRCLE )
|
||||
continue;
|
||||
|
||||
// for oval holes: must also have the same orientation
|
||||
|
@ -900,8 +900,8 @@ bool DRC::doPadToPadsDrc( D_PAD* aRefPad, D_PAD** aStart, D_PAD** aEnd, int x_li
|
|||
// pad under testing has a hole, test this hole against pad reference
|
||||
dummypad.SetPosition( pad->GetPosition() );
|
||||
dummypad.SetSize( pad->GetDrillSize() );
|
||||
dummypad.SetShape( pad->GetDrillShape() == PAD_DRILL_OBLONG ?
|
||||
PAD_OVAL : PAD_CIRCLE );
|
||||
dummypad.SetShape( pad->GetDrillShape() == PAD_DRILL_SHAPE_OBLONG ?
|
||||
PAD_SHAPE_OVAL : PAD_SHAPE_CIRCLE );
|
||||
dummypad.SetOrientation( pad->GetOrientation() );
|
||||
|
||||
if( !checkClearancePadToPad( aRefPad, &dummypad ) )
|
||||
|
@ -917,8 +917,8 @@ bool DRC::doPadToPadsDrc( D_PAD* aRefPad, D_PAD** aStart, D_PAD** aEnd, int x_li
|
|||
{
|
||||
dummypad.SetPosition( aRefPad->GetPosition() );
|
||||
dummypad.SetSize( aRefPad->GetDrillSize() );
|
||||
dummypad.SetShape( aRefPad->GetDrillShape() == PAD_DRILL_OBLONG ?
|
||||
PAD_OVAL : PAD_CIRCLE );
|
||||
dummypad.SetShape( aRefPad->GetDrillShape() == PAD_DRILL_SHAPE_OBLONG ?
|
||||
PAD_SHAPE_OVAL : PAD_SHAPE_CIRCLE );
|
||||
dummypad.SetOrientation( aRefPad->GetOrientation() );
|
||||
|
||||
if( !checkClearancePadToPad( pad, &dummypad ) )
|
||||
|
|
|
@ -291,8 +291,8 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads )
|
|||
|
||||
dummypad.SetSize( pad->GetDrillSize() );
|
||||
dummypad.SetPosition( pad->GetPosition() );
|
||||
dummypad.SetShape( pad->GetDrillShape() == PAD_DRILL_OBLONG ?
|
||||
PAD_OVAL : PAD_CIRCLE );
|
||||
dummypad.SetShape( pad->GetDrillShape() == PAD_DRILL_SHAPE_OBLONG ?
|
||||
PAD_SHAPE_OVAL : PAD_SHAPE_CIRCLE );
|
||||
dummypad.SetOrientation( pad->GetOrientation() );
|
||||
|
||||
m_padToTestPos = dummypad.GetPosition() - origin;
|
||||
|
@ -584,7 +584,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
|
|||
|
||||
double pad_angle;
|
||||
|
||||
// Get the clerance between the 2 pads. this is the min distance between aRefPad and aPad
|
||||
// Get the clearance between the 2 pads. this is the min distance between aRefPad and aPad
|
||||
int dist_min = aRefPad->GetClearance( aPad );
|
||||
|
||||
// relativePadPos is the aPad shape position relative to the aRefPad shape position
|
||||
|
@ -599,7 +599,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
|
|||
/* Here, pads are near and DRC depend on the pad shapes
|
||||
* We must compare distance using a fine shape analysis
|
||||
* Because a circle or oval shape is the easier shape to test, try to have
|
||||
* aRefPad shape type = PAD_CIRCLE or PAD_OVAL.
|
||||
* aRefPad shape type = PAD_SHAPE_CIRCLE or PAD_SHAPE_OVAL.
|
||||
* if aRefPad = TRAP. and aPad = RECT, also swap pads
|
||||
* Swap aRefPad and aPad if needed
|
||||
*/
|
||||
|
@ -608,21 +608,21 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
|
|||
|
||||
// swap pads to make comparisons easier
|
||||
// priority is aRefPad = ROUND then OVAL then RECT then other
|
||||
if( aRefPad->GetShape() != aPad->GetShape() && aRefPad->GetShape() != PAD_CIRCLE )
|
||||
if( aRefPad->GetShape() != aPad->GetShape() && aRefPad->GetShape() != PAD_SHAPE_CIRCLE )
|
||||
{
|
||||
// pad ref shape is here oval, rect or trapezoid
|
||||
switch( aPad->GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
swap_pads = true;
|
||||
break;
|
||||
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
swap_pads = true;
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
if( aRefPad->GetShape() != PAD_OVAL )
|
||||
case PAD_SHAPE_RECT:
|
||||
if( aRefPad->GetShape() != PAD_SHAPE_OVAL )
|
||||
swap_pads = true;
|
||||
break;
|
||||
|
||||
|
@ -637,16 +637,16 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
|
|||
relativePadPos = -relativePadPos;
|
||||
}
|
||||
|
||||
/* Because pad exchange, aRefPad shape is PAD_CIRCLE or PAD_OVAL,
|
||||
* if one of the 2 pads was a PAD_CIRCLE or PAD_OVAL.
|
||||
* Therefore, if aRefPad is a PAD_RECT or a PAD_TRAPEZOID,
|
||||
* aPad is also a PAD_RECT or a PAD_TRAPEZOID
|
||||
/* Because pad exchange, aRefPad shape is PAD_SHAPE_CIRCLE or PAD_SHAPE_OVAL,
|
||||
* if one of the 2 pads was a PAD_SHAPE_CIRCLE or PAD_SHAPE_OVAL.
|
||||
* Therefore, if aRefPad is a PAD_SHAPE_SHAPE_RECT or a PAD_SHAPE_TRAPEZOID,
|
||||
* aPad is also a PAD_SHAPE_RECT or a PAD_SHAPE_TRAPEZOID
|
||||
*/
|
||||
bool diag = true;
|
||||
|
||||
switch( aRefPad->GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
|
||||
/* One can use checkClearanceSegmToPad to test clearance
|
||||
* aRefPad is like a track segment with a null length and a witdth = GetSize().x
|
||||
|
@ -660,12 +660,12 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
|
|||
diag = checkClearanceSegmToPad( aPad, aRefPad->GetSize().x, dist_min );
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_RECT:
|
||||
// pad_angle = pad orient relative to the aRefPad orient
|
||||
pad_angle = aRefPad->GetOrientation() + aPad->GetOrientation();
|
||||
NORMALIZE_ANGLE_POS( pad_angle );
|
||||
|
||||
if( aPad->GetShape() == PAD_RECT )
|
||||
if( aPad->GetShape() == PAD_SHAPE_RECT )
|
||||
{
|
||||
wxSize size = aPad->GetSize();
|
||||
|
||||
|
@ -709,7 +709,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
|
|||
diag = false;
|
||||
}
|
||||
}
|
||||
else if( aPad->GetShape() == PAD_TRAPEZOID )
|
||||
else if( aPad->GetShape() == PAD_SHAPE_TRAPEZOID )
|
||||
{
|
||||
wxPoint polyref[4]; // Shape of aRefPad
|
||||
wxPoint polycompare[4]; // Shape of aPad
|
||||
|
@ -734,7 +734,7 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_OVAL: /* an oval pad is like a track segment */
|
||||
case PAD_SHAPE_OVAL: /* an oval pad is like a track segment */
|
||||
{
|
||||
/* Create a track segment with same dimensions as the oval aRefPad
|
||||
* and use checkClearanceSegmToPad function to test aPad to aRefPad clearance
|
||||
|
@ -776,11 +776,11 @@ bool DRC::checkClearancePadToPad( D_PAD* aRefPad, D_PAD* aPad )
|
|||
break;
|
||||
}
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
|
||||
// at this point, aPad is also a trapezoid, because all other shapes
|
||||
// have priority, and are already tested
|
||||
wxASSERT( aPad->GetShape() == PAD_TRAPEZOID );
|
||||
wxASSERT( aPad->GetShape() == PAD_SHAPE_TRAPEZOID );
|
||||
{
|
||||
wxPoint polyref[4]; // Shape of aRefPad
|
||||
wxPoint polycompare[4]; // Shape of aPad
|
||||
|
@ -822,13 +822,13 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* aPad, int aSegmentWidth, int aMi
|
|||
padHalfsize.x = aPad->GetSize().x >> 1;
|
||||
padHalfsize.y = aPad->GetSize().y >> 1;
|
||||
|
||||
if( aPad->GetShape() == PAD_TRAPEZOID ) // The size is bigger, due to GetDelta() extra size
|
||||
if( aPad->GetShape() == PAD_SHAPE_TRAPEZOID ) // The size is bigger, due to GetDelta() extra size
|
||||
{
|
||||
padHalfsize.x += std::abs(aPad->GetDelta().y) / 2; // Remember: GetDelta().y is the GetSize().x change
|
||||
padHalfsize.y += std::abs(aPad->GetDelta().x) / 2; // Remember: GetDelta().x is the GetSize().y change
|
||||
}
|
||||
|
||||
if( aPad->GetShape() == PAD_CIRCLE )
|
||||
if( aPad->GetShape() == PAD_SHAPE_CIRCLE )
|
||||
{
|
||||
/* Easy case: just test the distance between segment and pad centre
|
||||
* calculate pad coordinates in the X,Y axis with X axis = segment to test
|
||||
|
@ -866,7 +866,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* aPad, int aSegmentWidth, int aMi
|
|||
default:
|
||||
return false;
|
||||
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
{
|
||||
/* an oval is a complex shape, but is a rectangle and 2 circles
|
||||
* these 3 basic shapes are more easy to test.
|
||||
|
@ -926,7 +926,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* aPad, int aSegmentWidth, int aMi
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_RECT:
|
||||
// the area to test is a rounded rectangle.
|
||||
// this can be done by testing 2 rectangles and 4 circles (the corners)
|
||||
|
||||
|
@ -988,7 +988,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* aPad, int aSegmentWidth, int aMi
|
|||
|
||||
break;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
{
|
||||
wxPoint poly[4];
|
||||
aPad->BuildPadPolygon( poly, wxSize( 0, 0 ), orient );
|
||||
|
|
|
@ -1574,7 +1574,7 @@ void EAGLE_PLUGIN::loadPlain( CPTREE& aGraphics )
|
|||
m_xpath->push( "hole" );
|
||||
EHOLE e( gr->second );
|
||||
|
||||
// Fabricate a MODULE with a single PAD_HOLE_NOT_PLATED pad.
|
||||
// Fabricate a MODULE with a single PAD_ATTRIB_HOLE_NOT_PLATED pad.
|
||||
// Use m_hole_count to gen up a unique name.
|
||||
|
||||
MODULE* module = new MODULE( m_board );
|
||||
|
@ -1589,12 +1589,12 @@ void EAGLE_PLUGIN::loadPlain( CPTREE& aGraphics )
|
|||
|
||||
module->SetPosition( pos );
|
||||
|
||||
// Add a PAD_HOLE_NOT_PLATED pad to this module.
|
||||
// Add a PAD_ATTRIB_HOLE_NOT_PLATED pad to this module.
|
||||
D_PAD* pad = new D_PAD( module );
|
||||
module->Pads().PushBack( pad );
|
||||
|
||||
pad->SetShape( PAD_ROUND );
|
||||
pad->SetAttribute( PAD_HOLE_NOT_PLATED );
|
||||
pad->SetShape( PAD_SHAPE_CIRCLE );
|
||||
pad->SetAttribute( PAD_ATTRIB_HOLE_NOT_PLATED );
|
||||
|
||||
/* pad's position is already centered on module at relative (0, 0)
|
||||
wxPoint padpos( kicad_x( e.x ), kicad_y( e.y ) );
|
||||
|
@ -2045,18 +2045,18 @@ void EAGLE_PLUGIN::packagePad( MODULE* aModule, CPTREE& aTree ) const
|
|||
switch( *e.shape )
|
||||
{
|
||||
case EPAD::ROUND:
|
||||
wxASSERT( pad->GetShape()==PAD_CIRCLE ); // verify set in D_PAD constructor
|
||||
wxASSERT( pad->GetShape()==PAD_SHAPE_CIRCLE ); // verify set in D_PAD constructor
|
||||
break;
|
||||
case EPAD::OCTAGON:
|
||||
// no KiCad octagonal pad shape, use PAD_CIRCLE for now.
|
||||
// pad->SetShape( PAD_OCTAGON );
|
||||
wxASSERT( pad->GetShape()==PAD_CIRCLE ); // verify set in D_PAD constructor
|
||||
wxASSERT( pad->GetShape()==PAD_SHAPE_CIRCLE ); // verify set in D_PAD constructor
|
||||
break;
|
||||
case EPAD::LONG:
|
||||
pad->SetShape( PAD_OVAL );
|
||||
pad->SetShape( PAD_SHAPE_OVAL );
|
||||
break;
|
||||
case EPAD::SQUARE:
|
||||
pad->SetShape( PAD_RECT );
|
||||
pad->SetShape( PAD_SHAPE_RECT );
|
||||
break;
|
||||
case EPAD::OFFSET:
|
||||
; // don't know what to do here.
|
||||
|
@ -2081,7 +2081,7 @@ void EAGLE_PLUGIN::packagePad( MODULE* aModule, CPTREE& aTree ) const
|
|||
pad->SetSize( wxSize( KiROUND( diameter ), KiROUND( diameter ) ) );
|
||||
}
|
||||
|
||||
if( pad->GetShape() == PAD_OVAL )
|
||||
if( pad->GetShape() == PAD_SHAPE_OVAL )
|
||||
{
|
||||
// The Eagle "long" pad is wider than it is tall,
|
||||
// m_elongation is percent elongation
|
||||
|
@ -2322,12 +2322,12 @@ void EAGLE_PLUGIN::packageHole( MODULE* aModule, CPTREE& aTree ) const
|
|||
{
|
||||
EHOLE e( aTree );
|
||||
|
||||
// we add a PAD_HOLE_NOT_PLATED pad to this module.
|
||||
// we add a PAD_ATTRIB_HOLE_NOT_PLATED pad to this module.
|
||||
D_PAD* pad = new D_PAD( aModule );
|
||||
aModule->Pads().PushBack( pad );
|
||||
|
||||
pad->SetShape( PAD_ROUND );
|
||||
pad->SetAttribute( PAD_HOLE_NOT_PLATED );
|
||||
pad->SetShape( PAD_SHAPE_CIRCLE );
|
||||
pad->SetAttribute( PAD_ATTRIB_HOLE_NOT_PLATED );
|
||||
|
||||
// Mechanical purpose only:
|
||||
// no offset, no net name, no pad name allowed
|
||||
|
@ -2362,8 +2362,8 @@ void EAGLE_PLUGIN::packageSMD( MODULE* aModule, CPTREE& aTree ) const
|
|||
aModule->Pads().PushBack( pad );
|
||||
|
||||
pad->SetPadName( FROM_UTF8( e.name.c_str() ) );
|
||||
pad->SetShape( PAD_RECT );
|
||||
pad->SetAttribute( PAD_SMD );
|
||||
pad->SetShape( PAD_SHAPE_RECT );
|
||||
pad->SetAttribute( PAD_ATTRIB_SMD );
|
||||
|
||||
// pad's "Position" is not relative to the module's,
|
||||
// whereas Pos0 is relative to the module's but is the unrotated coordinate.
|
||||
|
@ -2389,14 +2389,14 @@ void EAGLE_PLUGIN::packageSMD( MODULE* aModule, CPTREE& aTree ) const
|
|||
pad->SetLayerSet( back );
|
||||
|
||||
// Optional according to DTD
|
||||
if( e.roundness ) // set set shape to PAD_RECT above, in case roundness is not present
|
||||
if( e.roundness ) // set set shape to PAD_SHAPE_RECT above, in case roundness is not present
|
||||
{
|
||||
if( *e.roundness >= 75 ) // roundness goes from 0-100% as integer
|
||||
{
|
||||
if( e.dy == e.dx )
|
||||
pad->SetShape( PAD_ROUND );
|
||||
pad->SetShape( PAD_SHAPE_CIRCLE );
|
||||
else
|
||||
pad->SetShape( PAD_OVAL );
|
||||
pad->SetShape( PAD_SHAPE_OVAL );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -979,7 +979,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
if( itmp >= 0 )
|
||||
{
|
||||
// if user changed colors and we are in high contrast mode, then redraw
|
||||
// because the PAD_SMD pads may change color.
|
||||
// because the PAD_ATTRIB_SMD pads may change color.
|
||||
if( displ_opts->m_ContrastModeDisplay && GetActiveLayer() != itmp )
|
||||
{
|
||||
m_canvas->Refresh();
|
||||
|
|
|
@ -134,14 +134,14 @@ static void build_pad_testpoints( BOARD *aPcb,
|
|||
const wxSize& drill = pad->GetDrillSize();
|
||||
rk.drill = std::min( drill.x, drill.y );
|
||||
rk.hole = (rk.drill != 0);
|
||||
rk.smd = pad->GetAttribute() == PAD_SMD;
|
||||
rk.mechanical = (pad->GetAttribute() == PAD_HOLE_NOT_PLATED);
|
||||
rk.smd = pad->GetAttribute() == PAD_ATTRIB_SMD;
|
||||
rk.mechanical = (pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED);
|
||||
rk.x_location = pad->GetPosition().x - origin.x;
|
||||
rk.y_location = origin.y - pad->GetPosition().y;
|
||||
rk.x_size = pad->GetSize().x;
|
||||
|
||||
// Rule: round pads have y = 0
|
||||
if( pad->GetShape() == PAD_CIRCLE )
|
||||
if( pad->GetShape() == PAD_SHAPE_CIRCLE )
|
||||
rk.y_size = 0;
|
||||
else
|
||||
rk.y_size = pad->GetSize().y;
|
||||
|
|
|
@ -455,7 +455,7 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb )
|
|||
switch( pad->GetShape() )
|
||||
{
|
||||
default:
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
fprintf( aFile, " ROUND %g\n",
|
||||
pad->GetDrillSize().x / SCALE_FACTOR );
|
||||
/* Circle is center, radius */
|
||||
|
@ -465,7 +465,7 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb )
|
|||
pad->GetSize().x / (SCALE_FACTOR * 2) );
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_RECT:
|
||||
fprintf( aFile, " RECTANGULAR %g\n",
|
||||
pad->GetDrillSize().x / SCALE_FACTOR );
|
||||
|
||||
|
@ -476,7 +476,7 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb )
|
|||
dx / (SCALE_FACTOR / 2), dy / (SCALE_FACTOR / 2) );
|
||||
break;
|
||||
|
||||
case PAD_OVAL: // Create outline by 2 lines and 2 arcs
|
||||
case PAD_SHAPE_OVAL: // Create outline by 2 lines and 2 arcs
|
||||
{
|
||||
// OrCAD Layout call them OVAL or OBLONG - GenCAD call them FINGERs
|
||||
fprintf( aFile, " FINGER %g\n",
|
||||
|
@ -547,7 +547,7 @@ static void CreatePadsShapesSection( FILE* aFile, BOARD* aPcb )
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
fprintf( aFile, " POLYGON %g\n",
|
||||
pad->GetDrillSize().x / SCALE_FACTOR );
|
||||
|
||||
|
|
|
@ -292,7 +292,7 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule,
|
|||
if( drill > 0.0 )
|
||||
{
|
||||
// plating
|
||||
if( pad->GetAttribute() == PAD_HOLE_NOT_PLATED )
|
||||
if( pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED )
|
||||
kplate = IDF3::NPTH;
|
||||
else
|
||||
kplate = IDF3::PTH;
|
||||
|
@ -302,7 +302,7 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule,
|
|||
|
||||
if( tstr.empty() || !tstr.compare( "0" ) || !tstr.compare( "~" )
|
||||
|| ( kplate == IDF3::NPTH )
|
||||
||( pad->GetDrillShape() == PAD_DRILL_OBLONG ) )
|
||||
||( pad->GetDrillShape() == PAD_DRILL_SHAPE_OBLONG ) )
|
||||
pintype = "MTG";
|
||||
else
|
||||
pintype = "PIN";
|
||||
|
@ -315,7 +315,7 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule,
|
|||
// 5. Assoc. part : BOARD | NOREFDES | PANEL | {"refdes"}
|
||||
// 6. type : PIN | VIA | MTG | TOOL | { "other" }
|
||||
// 7. owner : MCAD | ECAD | UNOWNED
|
||||
if( ( pad->GetDrillShape() == PAD_DRILL_OBLONG )
|
||||
if( ( pad->GetDrillShape() == PAD_DRILL_SHAPE_OBLONG )
|
||||
&& ( pad->GetDrillSize().x != pad->GetDrillSize().y ) )
|
||||
{
|
||||
// NOTE: IDF does not have direct support for slots;
|
||||
|
|
|
@ -987,14 +987,14 @@ static void export_vrml_padshape( MODEL_VRML& aModel, VRML_LAYER* aTinLayer, D_P
|
|||
|
||||
switch( aPad->GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
|
||||
if( !aTinLayer->AddCircle( pad_x, -pad_y, pad_w, false ) )
|
||||
throw( std::runtime_error( aTinLayer->GetError() ) );
|
||||
|
||||
break;
|
||||
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
|
||||
if( !aTinLayer->AddSlot( pad_x, -pad_y, pad_w * 2.0, pad_h * 2.0,
|
||||
aPad->GetOrientation()/10.0, false ) )
|
||||
|
@ -1002,12 +1002,12 @@ static void export_vrml_padshape( MODEL_VRML& aModel, VRML_LAYER* aTinLayer, D_P
|
|||
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_RECT:
|
||||
// Just to be sure :D
|
||||
pad_dx = 0;
|
||||
pad_dy = 0;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
{
|
||||
double coord[8] =
|
||||
{
|
||||
|
@ -1068,11 +1068,11 @@ static void export_vrml_pad( MODEL_VRML& aModel, BOARD* pcb, D_PAD* aPad )
|
|||
{
|
||||
bool pth = false;
|
||||
|
||||
if( ( aPad->GetAttribute() != PAD_HOLE_NOT_PLATED )
|
||||
if( ( aPad->GetAttribute() != PAD_ATTRIB_HOLE_NOT_PLATED )
|
||||
&& !aModel.plainPCB )
|
||||
pth = true;
|
||||
|
||||
if( aPad->GetDrillShape() == PAD_DRILL_OBLONG )
|
||||
if( aPad->GetDrillShape() == PAD_DRILL_SHAPE_OBLONG )
|
||||
{
|
||||
// Oblong hole (slot)
|
||||
aModel.holes.AddSlot( hole_x, -hole_y, hole_drill_w * 2.0, hole_drill_h * 2.0,
|
||||
|
|
|
@ -372,7 +372,7 @@ static bool HasNonSMDPins( MODULE* aModule )
|
|||
|
||||
for( pad = aModule->Pads(); pad; pad = pad->Next() )
|
||||
{
|
||||
if( pad->GetAttribute() != PAD_SMD )
|
||||
if( pad->GetAttribute() != PAD_ATTRIB_SMD )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -673,24 +673,24 @@ void EXCELLON_WRITER::BuildHolesList( int aFirstLayer,
|
|||
for( D_PAD* pad = module->Pads(); pad; pad = pad->Next() )
|
||||
{
|
||||
if( ! aGenerateNPTH_list &&
|
||||
pad->GetAttribute() == PAD_HOLE_NOT_PLATED &&
|
||||
pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED &&
|
||||
! aMerge_PTH_NPTH )
|
||||
continue;
|
||||
|
||||
if( aGenerateNPTH_list && pad->GetAttribute() != PAD_HOLE_NOT_PLATED )
|
||||
if( aGenerateNPTH_list && pad->GetAttribute() != PAD_ATTRIB_HOLE_NOT_PLATED )
|
||||
continue;
|
||||
|
||||
if( pad->GetDrillSize().x == 0 )
|
||||
continue;
|
||||
|
||||
new_hole.m_Hole_NotPlated = (pad->GetAttribute() == PAD_HOLE_NOT_PLATED);
|
||||
new_hole.m_Hole_NotPlated = (pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED);
|
||||
new_hole.m_Tool_Reference = -1; // Flag is: Not initialized
|
||||
new_hole.m_Hole_Orient = pad->GetOrientation();
|
||||
new_hole.m_Hole_Shape = 0; // hole shape: round
|
||||
new_hole.m_Hole_Diameter = std::min( pad->GetDrillSize().x, pad->GetDrillSize().y );
|
||||
new_hole.m_Hole_Size.x = new_hole.m_Hole_Size.y = new_hole.m_Hole_Diameter;
|
||||
|
||||
if( pad->GetDrillShape() != PAD_DRILL_CIRCLE )
|
||||
if( pad->GetDrillShape() != PAD_DRILL_SHAPE_CIRCLE )
|
||||
new_hole.m_Hole_Shape = 1; // oval flag set
|
||||
|
||||
new_hole.m_Hole_Size = pad->GetDrillSize();
|
||||
|
|
|
@ -352,12 +352,12 @@ void PCB_BASE_FRAME::GlobalChange_PadSettings( D_PAD* aPad,
|
|||
pad->SetLocalSolderPasteMargin( aPad->GetLocalSolderPasteMargin() );
|
||||
pad->SetLocalSolderPasteMarginRatio( aPad->GetLocalSolderPasteMarginRatio() );
|
||||
|
||||
if( pad->GetShape() != PAD_TRAPEZOID )
|
||||
if( pad->GetShape() != PAD_SHAPE_TRAPEZOID )
|
||||
{
|
||||
pad->SetDelta( wxSize( 0, 0 ) );
|
||||
}
|
||||
|
||||
if( pad->GetShape() == PAD_CIRCLE )
|
||||
if( pad->GetShape() == PAD_SHAPE_CIRCLE )
|
||||
{
|
||||
// Ensure pad size.y = pad size.x
|
||||
int size = pad->GetSize().x;
|
||||
|
@ -366,8 +366,8 @@ void PCB_BASE_FRAME::GlobalChange_PadSettings( D_PAD* aPad,
|
|||
|
||||
switch( pad->GetAttribute() )
|
||||
{
|
||||
case PAD_SMD:
|
||||
case PAD_CONN:
|
||||
case PAD_ATTRIB_SMD:
|
||||
case PAD_ATTRIB_CONN:
|
||||
pad->SetDrillSize( wxSize( 0, 0 ) );
|
||||
pad->SetOffset( wxPoint( 0, 0 ) );
|
||||
break;
|
||||
|
|
|
@ -588,8 +588,8 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader ) throw( IO_ERROR,
|
|||
static const LSET pad_front( 3, F_Cu, F_Mask, F_Paste );
|
||||
static const LSET pad_back( 3, B_Cu, B_Mask, B_Paste );
|
||||
|
||||
pad->SetShape( PAD_RECT );
|
||||
pad->SetAttribute( PAD_SMD );
|
||||
pad->SetShape( PAD_SHAPE_RECT );
|
||||
pad->SetAttribute( PAD_ATTRIB_SMD );
|
||||
pad->SetLayerSet( pad_front );
|
||||
|
||||
if( testFlags( parameters[paramCnt-2], 0x0080, wxT( "onsolder" ) ) )
|
||||
|
@ -636,9 +636,9 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader ) throw( IO_ERROR,
|
|||
if( !testFlags( parameters[paramCnt-2], 0x0100, wxT( "square" ) ) )
|
||||
{
|
||||
if( pad->GetSize().x == pad->GetSize().y )
|
||||
pad->SetShape( PAD_ROUND );
|
||||
pad->SetShape( PAD_SHAPE_CIRCLE );
|
||||
else
|
||||
pad->SetShape( PAD_OVAL );
|
||||
pad->SetShape( PAD_SHAPE_OVAL );
|
||||
}
|
||||
|
||||
module->Add( pad );
|
||||
|
@ -662,14 +662,14 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader ) throw( IO_ERROR,
|
|||
|
||||
D_PAD* pad = new D_PAD( module.get() );
|
||||
|
||||
pad->SetShape( PAD_ROUND );
|
||||
pad->SetShape( PAD_SHAPE_CIRCLE );
|
||||
|
||||
static const LSET pad_set = LSET::AllCuMask() | LSET( 3, F_SilkS, F_Mask, B_Mask );
|
||||
|
||||
pad->SetLayerSet( pad_set );
|
||||
|
||||
if( testFlags( parameters[paramCnt-2], 0x0100, wxT( "square" ) ) )
|
||||
pad->SetShape( PAD_RECT );
|
||||
pad->SetShape( PAD_SHAPE_RECT );
|
||||
|
||||
// Read pad number:
|
||||
if( paramCnt > 9 )
|
||||
|
@ -707,8 +707,8 @@ MODULE* GPCB_FPL_CACHE::parseMODULE( LINE_READER* aLineReader ) throw( IO_ERROR,
|
|||
pad->SetPos0( padPos );
|
||||
pad->SetPosition( padPos );
|
||||
|
||||
if( pad->GetShape() == PAD_ROUND && pad->GetSize().x != pad->GetSize().y )
|
||||
pad->SetShape( PAD_OVAL );
|
||||
if( pad->GetShape() == PAD_SHAPE_CIRCLE && pad->GetSize().x != pad->GetSize().y )
|
||||
pad->SetShape( PAD_SHAPE_OVAL );
|
||||
|
||||
module->Add( pad );
|
||||
continue;
|
||||
|
|
|
@ -1225,10 +1225,10 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const
|
|||
|
||||
switch( aPad->GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE: shape = "circle"; break;
|
||||
case PAD_RECT: shape = "rect"; break;
|
||||
case PAD_OVAL: shape = "oval"; break;
|
||||
case PAD_TRAPEZOID: shape = "trapezoid"; break;
|
||||
case PAD_SHAPE_CIRCLE: shape = "circle"; break;
|
||||
case PAD_SHAPE_RECT: shape = "rect"; break;
|
||||
case PAD_SHAPE_OVAL: shape = "oval"; break;
|
||||
case PAD_SHAPE_TRAPEZOID: shape = "trapezoid"; break;
|
||||
|
||||
default:
|
||||
THROW_IO_ERROR( wxString::Format( _( "unknown pad type: %d"), aPad->GetShape() ) );
|
||||
|
@ -1238,10 +1238,10 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const
|
|||
|
||||
switch( aPad->GetAttribute() )
|
||||
{
|
||||
case PAD_STANDARD: type = "thru_hole"; break;
|
||||
case PAD_SMD: type = "smd"; break;
|
||||
case PAD_CONN: type = "connect"; break;
|
||||
case PAD_HOLE_NOT_PLATED: type = "np_thru_hole"; break;
|
||||
case PAD_ATTRIB_STANDARD: type = "thru_hole"; break;
|
||||
case PAD_ATTRIB_SMD: type = "smd"; break;
|
||||
case PAD_ATTRIB_CONN: type = "connect"; break;
|
||||
case PAD_ATTRIB_HOLE_NOT_PLATED: type = "np_thru_hole"; break;
|
||||
|
||||
default:
|
||||
THROW_IO_ERROR( wxString::Format( _( "unknown pad attribute: %d" ),
|
||||
|
@ -1270,7 +1270,7 @@ void PCB_IO::format( D_PAD* aPad, int aNestLevel ) const
|
|||
{
|
||||
m_out->Print( 0, " (drill" );
|
||||
|
||||
if( aPad->GetDrillShape() == PAD_DRILL_OBLONG )
|
||||
if( aPad->GetDrillShape() == PAD_DRILL_SHAPE_OBLONG )
|
||||
m_out->Print( 0, " oval" );
|
||||
|
||||
if( sz.GetWidth() > 0 )
|
||||
|
|
|
@ -1449,10 +1449,10 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule )
|
|||
|
||||
switch( padchar )
|
||||
{
|
||||
case 'C': padshape = PAD_CIRCLE; break;
|
||||
case 'R': padshape = PAD_RECT; break;
|
||||
case 'O': padshape = PAD_OVAL; break;
|
||||
case 'T': padshape = PAD_TRAPEZOID; break;
|
||||
case 'C': padshape = PAD_SHAPE_CIRCLE; break;
|
||||
case 'R': padshape = PAD_SHAPE_RECT; break;
|
||||
case 'O': padshape = PAD_SHAPE_OVAL; break;
|
||||
case 'T': padshape = PAD_SHAPE_TRAPEZOID; break;
|
||||
default:
|
||||
m_error.Printf( _( "Unknown padshape '%c=0x%02x' on line: %d of module: '%s'" ),
|
||||
padchar,
|
||||
|
@ -1500,14 +1500,14 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule )
|
|||
BIU offs_x = biuParse( data, &data );
|
||||
BIU offs_y = biuParse( data, &data );
|
||||
|
||||
PAD_DRILL_SHAPE_T drShape = PAD_DRILL_CIRCLE;
|
||||
PAD_DRILL_SHAPE_T drShape = PAD_DRILL_SHAPE_CIRCLE;
|
||||
|
||||
data = strtok_r( (char*) data, delims, &saveptr );
|
||||
if( data ) // optional shape
|
||||
{
|
||||
if( data[0] == 'O' )
|
||||
{
|
||||
drShape = PAD_DRILL_OBLONG;
|
||||
drShape = PAD_DRILL_SHAPE_OBLONG;
|
||||
|
||||
data = strtok_r( NULL, delims, &saveptr );
|
||||
drill_x = biuParse( data );
|
||||
|
@ -1532,13 +1532,13 @@ void LEGACY_PLUGIN::loadPAD( MODULE* aModule )
|
|||
data = strtok_r( line + SZ( "At" ), delims, &saveptr );
|
||||
|
||||
if( !strcmp( data, "SMD" ) )
|
||||
attribute = PAD_SMD;
|
||||
attribute = PAD_ATTRIB_SMD;
|
||||
else if( !strcmp( data, "CONN" ) )
|
||||
attribute = PAD_CONN;
|
||||
attribute = PAD_ATTRIB_CONN;
|
||||
else if( !strcmp( data, "HOLE" ) )
|
||||
attribute = PAD_HOLE_NOT_PLATED;
|
||||
attribute = PAD_ATTRIB_HOLE_NOT_PLATED;
|
||||
else
|
||||
attribute = PAD_STANDARD;
|
||||
attribute = PAD_ATTRIB_STANDARD;
|
||||
|
||||
strtok_r( NULL, delims, &saveptr ); // skip BufCar
|
||||
data = strtok_r( NULL, delims, &saveptr );
|
||||
|
@ -3689,10 +3689,10 @@ void LEGACY_PLUGIN::savePAD( const D_PAD* me ) const
|
|||
|
||||
switch( me->GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE: cshape = 'C'; break;
|
||||
case PAD_RECT: cshape = 'R'; break;
|
||||
case PAD_OVAL: cshape = 'O'; break;
|
||||
case PAD_TRAPEZOID: cshape = 'T'; break;
|
||||
case PAD_SHAPE_CIRCLE: cshape = 'C'; break;
|
||||
case PAD_SHAPE_RECT: cshape = 'R'; break;
|
||||
case PAD_SHAPE_OVAL: cshape = 'O'; break;
|
||||
case PAD_SHAPE_TRAPEZOID: cshape = 'T'; break;
|
||||
|
||||
default:
|
||||
THROW_IO_ERROR( wxString::Format( UNKNOWN_PAD_FORMAT, me->GetShape() ) );
|
||||
|
@ -3732,7 +3732,7 @@ void LEGACY_PLUGIN::savePAD( const D_PAD* me ) const
|
|||
fmtBIU( me->GetDrillSize().x ).c_str(),
|
||||
fmtBIUPoint( me->GetOffset() ).c_str() );
|
||||
|
||||
if( me->GetDrillShape() == PAD_DRILL_OBLONG )
|
||||
if( me->GetDrillShape() == PAD_DRILL_SHAPE_OBLONG )
|
||||
{
|
||||
fprintf( m_fp, " %c %s", 'O', fmtBIUSize( me->GetDrillSize() ).c_str() );
|
||||
}
|
||||
|
@ -3743,10 +3743,10 @@ void LEGACY_PLUGIN::savePAD( const D_PAD* me ) const
|
|||
|
||||
switch( me->GetAttribute() )
|
||||
{
|
||||
case PAD_STANDARD: texttype = "STD"; break;
|
||||
case PAD_SMD: texttype = "SMD"; break;
|
||||
case PAD_CONN: texttype = "CONN"; break;
|
||||
case PAD_HOLE_NOT_PLATED: texttype = "HOLE"; break;
|
||||
case PAD_ATTRIB_STANDARD: texttype = "STD"; break;
|
||||
case PAD_ATTRIB_SMD: texttype = "SMD"; break;
|
||||
case PAD_ATTRIB_CONN: texttype = "CONN"; break;
|
||||
case PAD_ATTRIB_HOLE_NOT_PLATED: texttype = "HOLE"; break;
|
||||
|
||||
default:
|
||||
THROW_IO_ERROR( wxString::Format( UNKNOWN_PAD_ATTRIBUTE, me->GetAttribute() ) );
|
||||
|
|
|
@ -270,8 +270,8 @@ MODULE* PCB_EDIT_FRAME::Genere_Self( wxDC* DC )
|
|||
pad->SetSize( wxSize( s_inductor_pattern.m_Width, s_inductor_pattern.m_Width ) );
|
||||
|
||||
pad->SetLayerSet( LSET( module->GetLayer() ) );
|
||||
pad->SetAttribute( PAD_SMD );
|
||||
pad->SetShape( PAD_CIRCLE );
|
||||
pad->SetAttribute( PAD_ATTRIB_SMD );
|
||||
pad->SetShape( PAD_SHAPE_CIRCLE );
|
||||
|
||||
D_PAD* newpad = new D_PAD( *pad );
|
||||
|
||||
|
@ -553,8 +553,8 @@ MODULE* PCB_EDIT_FRAME::CreateMuWaveBaseFootprint( const wxString& aValue,
|
|||
pad->SetSize( wxSize( tw, tw ) );
|
||||
|
||||
pad->SetPosition( module->GetPosition() );
|
||||
pad->SetShape( PAD_RECT );
|
||||
pad->SetAttribute( PAD_SMD );
|
||||
pad->SetShape( PAD_SHAPE_RECT );
|
||||
pad->SetAttribute( PAD_ATTRIB_SMD );
|
||||
pad->SetLayerSet( F_Cu );
|
||||
|
||||
Line.Printf( wxT( "%d" ), pad_num );
|
||||
|
|
|
@ -93,11 +93,11 @@ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
|
|||
|
||||
switch( mp.GetShape() )
|
||||
{
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
aPad->SetDelta( mp.GetDelta() );
|
||||
break;
|
||||
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
// ensure size.y == size.x
|
||||
aPad->SetSize( wxSize( aPad->GetSize().x, aPad->GetSize().x ) );
|
||||
break;
|
||||
|
@ -108,8 +108,8 @@ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
|
|||
|
||||
switch( mp.GetAttribute() )
|
||||
{
|
||||
case PAD_SMD:
|
||||
case PAD_CONN:
|
||||
case PAD_ATTRIB_SMD:
|
||||
case PAD_ATTRIB_CONN:
|
||||
aPad->SetDrillSize( wxSize( 0, 0 ) );
|
||||
aPad->SetOffset( wxPoint( 0, 0 ) );
|
||||
break;
|
||||
|
@ -178,10 +178,13 @@ void PCB_BASE_FRAME::AddPad( MODULE* aModule, bool draw )
|
|||
/* NPTH pads take empty pad number (since they can't be connected),
|
||||
* other pads get incremented from the last one edited */
|
||||
wxString padName;
|
||||
if( pad->GetAttribute() != PAD_HOLE_NOT_PLATED ) {
|
||||
|
||||
if( pad->GetAttribute() != PAD_ATTRIB_HOLE_NOT_PLATED )
|
||||
{
|
||||
padName = GetNextPadName( GetDesignSettings()
|
||||
.m_Pad_Master.GetPadName() );
|
||||
}
|
||||
|
||||
pad->SetPadName( padName );
|
||||
GetDesignSettings().m_Pad_Master.SetPadName( padName );
|
||||
|
||||
|
|
|
@ -200,10 +200,10 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad
|
|||
if( !m_isHolePlated && m_hole )
|
||||
{
|
||||
// mechanical hole
|
||||
pad->SetShape( PAD_CIRCLE );
|
||||
pad->SetAttribute( PAD_HOLE_NOT_PLATED );
|
||||
pad->SetShape( PAD_SHAPE_CIRCLE );
|
||||
pad->SetAttribute( PAD_ATTRIB_HOLE_NOT_PLATED );
|
||||
|
||||
pad->SetDrillShape( PAD_DRILL_CIRCLE );
|
||||
pad->SetDrillShape( PAD_DRILL_SHAPE_CIRCLE );
|
||||
pad->SetDrillSize( wxSize( m_hole, m_hole ) );
|
||||
pad->SetSize( wxSize( m_hole, m_hole ) );
|
||||
|
||||
|
@ -211,7 +211,7 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad
|
|||
}
|
||||
else
|
||||
{
|
||||
( m_hole ) ? padType = PAD_STANDARD : padType = PAD_SMD;
|
||||
( m_hole ) ? padType = PAD_ATTRIB_STANDARD : padType = PAD_ATTRIB_SMD;
|
||||
|
||||
// form layer mask
|
||||
for( i = 0; i < (int) m_shapes.GetCount(); i++ )
|
||||
|
@ -237,7 +237,7 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad
|
|||
}
|
||||
}
|
||||
|
||||
if( padType == PAD_STANDARD )
|
||||
if( padType == PAD_ATTRIB_STANDARD )
|
||||
// actually this is a thru-hole pad
|
||||
pad->SetLayerSet( LSET::AllCuMask() | LSET( 2, B_Mask, F_Mask ) );
|
||||
|
||||
|
@ -251,21 +251,21 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad
|
|||
|| padShapeName == wxT( "MtHole" ) )
|
||||
{
|
||||
if( width != height )
|
||||
pad->SetShape( PAD_OVAL );
|
||||
pad->SetShape( PAD_SHAPE_OVAL );
|
||||
else
|
||||
pad->SetShape( PAD_CIRCLE );
|
||||
pad->SetShape( PAD_SHAPE_CIRCLE );
|
||||
}
|
||||
else if( padShapeName == wxT( "Rect" )
|
||||
|| padShapeName == wxT( "RndRect" ) )
|
||||
pad->SetShape( PAD_RECT );
|
||||
pad->SetShape( PAD_SHAPE_RECT );
|
||||
else if( padShapeName == wxT( "Polygon" ) )
|
||||
pad->SetShape( PAD_RECT ); // approximation
|
||||
pad->SetShape( PAD_SHAPE_RECT ); // approximation
|
||||
|
||||
pad->SetSize( wxSize( width, height ) );
|
||||
pad->SetDelta( wxSize( 0, 0 ) );
|
||||
pad->SetOrientation( m_rotation + aRotation );
|
||||
|
||||
pad->SetDrillShape( PAD_DRILL_CIRCLE );
|
||||
pad->SetDrillShape( PAD_DRILL_SHAPE_CIRCLE );
|
||||
pad->SetOffset( wxPoint( 0, 0 ) );
|
||||
pad->SetDrillSize( wxSize( m_hole, m_hole ) );
|
||||
|
||||
|
|
|
@ -572,7 +572,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
|
|||
{
|
||||
// Drawing hole: has same shape as PAD_CIRCLE or PAD_OVAL
|
||||
size = VECTOR2D( aPad->GetDrillSize() ) / 2.0;
|
||||
shape = aPad->GetDrillShape() == PAD_DRILL_OBLONG ? PAD_OVAL : PAD_CIRCLE;
|
||||
shape = aPad->GetDrillShape() == PAD_DRILL_SHAPE_OBLONG ? PAD_SHAPE_OVAL : PAD_SHAPE_CIRCLE;
|
||||
}
|
||||
else if( aLayer == F_Mask || aLayer == B_Mask )
|
||||
{
|
||||
|
@ -604,7 +604,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
|
|||
|
||||
switch( shape )
|
||||
{
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
if( size.y >= size.x )
|
||||
{
|
||||
m = ( size.y - size.x );
|
||||
|
@ -649,11 +649,11 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_RECT:
|
||||
m_gal->DrawRectangle( VECTOR2D( -size.x, -size.y ), VECTOR2D( size.x, size.y ) );
|
||||
break;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
{
|
||||
std::deque<VECTOR2D> pointList;
|
||||
wxPoint corners[4];
|
||||
|
@ -680,7 +680,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
m_gal->DrawCircle( VECTOR2D( 0.0, 0.0 ), size.x );
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -2149,11 +2149,11 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) throw( IO_ERROR, PARSE_ERROR )
|
|||
switch( token )
|
||||
{
|
||||
case T_thru_hole:
|
||||
pad->SetAttribute( PAD_STANDARD );
|
||||
pad->SetAttribute( PAD_ATTRIB_STANDARD );
|
||||
break;
|
||||
|
||||
case T_smd:
|
||||
pad->SetAttribute( PAD_SMD );
|
||||
pad->SetAttribute( PAD_ATTRIB_SMD );
|
||||
|
||||
// Default D_PAD object is thru hole with drill.
|
||||
// SMD pads have no hole
|
||||
|
@ -2161,7 +2161,7 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) throw( IO_ERROR, PARSE_ERROR )
|
|||
break;
|
||||
|
||||
case T_connect:
|
||||
pad->SetAttribute( PAD_CONN );
|
||||
pad->SetAttribute( PAD_ATTRIB_CONN );
|
||||
|
||||
// Default D_PAD object is thru hole with drill.
|
||||
// CONN pads have no hole
|
||||
|
@ -2169,7 +2169,7 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) throw( IO_ERROR, PARSE_ERROR )
|
|||
break;
|
||||
|
||||
case T_np_thru_hole:
|
||||
pad->SetAttribute( PAD_HOLE_NOT_PLATED );
|
||||
pad->SetAttribute( PAD_ATTRIB_HOLE_NOT_PLATED );
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -2181,19 +2181,19 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) throw( IO_ERROR, PARSE_ERROR )
|
|||
switch( token )
|
||||
{
|
||||
case T_circle:
|
||||
pad->SetShape( PAD_CIRCLE );
|
||||
pad->SetShape( PAD_SHAPE_CIRCLE );
|
||||
break;
|
||||
|
||||
case T_rect:
|
||||
pad->SetShape( PAD_RECT );
|
||||
pad->SetShape( PAD_SHAPE_RECT );
|
||||
break;
|
||||
|
||||
case T_oval:
|
||||
pad->SetShape( PAD_OVAL );
|
||||
pad->SetShape( PAD_SHAPE_OVAL );
|
||||
break;
|
||||
|
||||
case T_trapezoid:
|
||||
pad->SetShape( PAD_TRAPEZOID );
|
||||
pad->SetShape( PAD_SHAPE_TRAPEZOID );
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -2257,7 +2257,7 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) throw( IO_ERROR, PARSE_ERROR )
|
|||
switch( token )
|
||||
{
|
||||
case T_oval:
|
||||
pad->SetDrillShape( PAD_DRILL_OBLONG );
|
||||
pad->SetDrillShape( PAD_DRILL_SHAPE_OBLONG );
|
||||
break;
|
||||
|
||||
case T_NUMBER:
|
||||
|
@ -2294,7 +2294,7 @@ D_PAD* PCB_PARSER::parseD_PAD( MODULE* aParent ) throw( IO_ERROR, PARSE_ERROR )
|
|||
// other than 0 used to fix a bunch of debug assertions even though it is defined
|
||||
// as a through hole pad. Wouldn't a though hole pad with no drill be a surface
|
||||
// mount pad (or a conn pad which is a smd pad with no solder paste)?
|
||||
if( ( pad->GetAttribute() != PAD_SMD ) && ( pad->GetAttribute() != PAD_CONN ) )
|
||||
if( ( pad->GetAttribute() != PAD_ATTRIB_SMD ) && ( pad->GetAttribute() != PAD_ATTRIB_CONN ) )
|
||||
pad->SetDrillSize( drillSize );
|
||||
else
|
||||
pad->SetDrillSize( wxSize( 0, 0 ) );
|
||||
|
|
|
@ -370,16 +370,16 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter,
|
|||
pad->SetSize( padPlotsSize );
|
||||
switch( pad->GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE:
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
case PAD_SHAPE_OVAL:
|
||||
if( aPlotOpt.GetSkipPlotNPTH_Pads() &&
|
||||
(pad->GetSize() == pad->GetDrillSize()) &&
|
||||
(pad->GetAttribute() == PAD_HOLE_NOT_PLATED) )
|
||||
(pad->GetAttribute() == PAD_ATTRIB_HOLE_NOT_PLATED) )
|
||||
break;
|
||||
|
||||
// Fall through:
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
case PAD_SHAPE_RECT:
|
||||
default:
|
||||
itemplotter.PlotPad( pad, color, plotMode );
|
||||
break;
|
||||
|
|
|
@ -73,16 +73,16 @@ void BRDITEMS_PLOTTER::PlotPad( D_PAD* aPad, EDA_COLOR_T aColor, EDA_DRAW_MODE_T
|
|||
|
||||
switch( aPad->GetShape() )
|
||||
{
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
m_plotter->FlashPadCircle( shape_pos, aPad->GetSize().x, aPlotMode );
|
||||
break;
|
||||
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
m_plotter->FlashPadOval( shape_pos, aPad->GetSize(),
|
||||
aPad->GetOrientation(), aPlotMode );
|
||||
break;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
{
|
||||
wxPoint coord[4];
|
||||
aPad->BuildPadPolygon( coord, wxSize(0,0), 0 );
|
||||
|
@ -91,7 +91,7 @@ void BRDITEMS_PLOTTER::PlotPad( D_PAD* aPad, EDA_COLOR_T aColor, EDA_DRAW_MODE_T
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_RECT:
|
||||
default:
|
||||
m_plotter->FlashPadRect( shape_pos, aPad->GetSize(),
|
||||
aPad->GetOrientation(), aPlotMode );
|
||||
|
@ -625,14 +625,14 @@ void BRDITEMS_PLOTTER::plotOneDrillMark( PAD_DRILL_SHAPE_T aDrillShape,
|
|||
double aOrientation, int aSmallDrill )
|
||||
{
|
||||
// Small drill marks have no significance when applied to slots
|
||||
if( aSmallDrill && aDrillShape == PAD_DRILL_CIRCLE )
|
||||
if( aSmallDrill && aDrillShape == PAD_DRILL_SHAPE_CIRCLE )
|
||||
aDrillSize.x = std::min( aSmallDrill, aDrillSize.x );
|
||||
|
||||
// Round holes only have x diameter, slots have both
|
||||
aDrillSize.x -= getFineWidthAdj();
|
||||
aDrillSize.x = Clamp( 1, aDrillSize.x, aPadSize.x - 1 );
|
||||
|
||||
if( aDrillShape == PAD_DRILL_OBLONG )
|
||||
if( aDrillShape == PAD_DRILL_SHAPE_OBLONG )
|
||||
{
|
||||
aDrillSize.y -= getFineWidthAdj();
|
||||
aDrillSize.y = Clamp( 1, aDrillSize.y, aPadSize.y - 1 );
|
||||
|
@ -669,7 +669,7 @@ void BRDITEMS_PLOTTER::PlotDrillMarks()
|
|||
const VIA* via = dyn_cast<const VIA*>( pts );
|
||||
|
||||
if( via )
|
||||
plotOneDrillMark( PAD_DRILL_CIRCLE, via->GetStart(),
|
||||
plotOneDrillMark( PAD_DRILL_SHAPE_CIRCLE, via->GetStart(),
|
||||
wxSize( via->GetDrillValue(), 0 ),
|
||||
wxSize( via->GetWidth(), 0 ), 0, small_drill );
|
||||
}
|
||||
|
|
|
@ -164,12 +164,12 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad )
|
|||
|
||||
switch( aPad->GetAttribute() )
|
||||
{
|
||||
case PAD_STANDARD:
|
||||
case PAD_ATTRIB_STANDARD:
|
||||
break;
|
||||
|
||||
case PAD_SMD:
|
||||
case PAD_HOLE_NOT_PLATED:
|
||||
case PAD_CONN:
|
||||
case PAD_ATTRIB_SMD:
|
||||
case PAD_ATTRIB_HOLE_NOT_PLATED:
|
||||
case PAD_ATTRIB_CONN:
|
||||
{
|
||||
LSET lmsk = aPad->GetLayerSet();
|
||||
bool is_copper = false;
|
||||
|
@ -179,7 +179,7 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad )
|
|||
if( lmsk[i] )
|
||||
{
|
||||
is_copper = true;
|
||||
if( aPad->GetAttribute() != PAD_HOLE_NOT_PLATED )
|
||||
if( aPad->GetAttribute() != PAD_ATTRIB_HOLE_NOT_PLATED )
|
||||
layers = PNS_LAYERSET( i );
|
||||
break;
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad )
|
|||
|
||||
double orient = aPad->GetOrientation() / 10.0;
|
||||
|
||||
if( aPad->GetShape() == PAD_CIRCLE )
|
||||
if( aPad->GetShape() == PAD_SHAPE_CIRCLE )
|
||||
{
|
||||
solid->SetShape( new SHAPE_CIRCLE( c, sz.x / 2 ) );
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad )
|
|||
|
||||
switch( aPad->GetShape() )
|
||||
{
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
if( sz.x == sz.y )
|
||||
solid->SetShape( new SHAPE_CIRCLE( c, sz.x / 2 ) );
|
||||
else
|
||||
|
@ -246,11 +246,11 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad )
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_RECT:
|
||||
solid->SetShape( new SHAPE_RECT( c - sz / 2, sz.x, sz.y ) );
|
||||
break;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
{
|
||||
wxPoint coords[4];
|
||||
aPad->BuildPadPolygon( coords, wxSize( 0, 0 ), aPad->GetOrientation() );
|
||||
|
@ -275,9 +275,9 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad )
|
|||
{
|
||||
switch( aPad->GetShape() )
|
||||
{
|
||||
// PAD_CIRCLE already handled above
|
||||
// PAD_SHAPE_CIRCLE already handled above
|
||||
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
if( sz.x == sz.y )
|
||||
solid->SetShape( new SHAPE_CIRCLE( c, sz.x / 2 ) );
|
||||
else
|
||||
|
@ -326,8 +326,8 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad )
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_RECT:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
{
|
||||
wxPoint coords[4];
|
||||
aPad->BuildPadPolygon( coords, wxSize( 0, 0 ), aPad->GetOrientation() );
|
||||
|
|
|
@ -51,8 +51,8 @@ class FPCFootprintWizard(FootprintWizardPlugin):
|
|||
def smdRectPad(self,module,size,pos,name):
|
||||
pad = D_PAD(module)
|
||||
pad.SetSize(size)
|
||||
pad.SetShape(PAD_RECT)
|
||||
pad.SetAttribute(PAD_SMD)
|
||||
pad.SetShape(PAD_SHAPE_RECT)
|
||||
pad.SetAttribute(PAD_ATTRIB_SMD)
|
||||
pad.SetLayerSet( pad.SMDMask() )
|
||||
pad.SetPos0(pos)
|
||||
pad.SetPosition(pos)
|
||||
|
|
|
@ -32,21 +32,21 @@ class PadMaker:
|
|||
def __init__(self, module):
|
||||
self.module = module
|
||||
|
||||
def THPad(self, w, l, drill, shape=pcbnew.PAD_OVAL):
|
||||
def THPad(self, w, l, drill, shape=pcbnew.PAD_SHAPE_OVAL):
|
||||
pad = pcbnew.D_PAD(self.module)
|
||||
|
||||
pad.SetSize(pcbnew.wxSize(l, w))
|
||||
|
||||
pad.SetShape(shape)
|
||||
|
||||
pad.SetAttribute(pcbnew.PAD_STANDARD)
|
||||
pad.SetAttribute(pcbnew.PAD_ATTRIB_STANDARD)
|
||||
pad.SetLayerSet(pad.StandardMask())
|
||||
pad.SetDrillSize(pcbnew.wxSize(drill, drill))
|
||||
|
||||
return pad
|
||||
|
||||
def THRoundPad(self, size, drill):
|
||||
pad = self.THPad(size, size, drill, shape=pcbnew.PAD_CIRCLE)
|
||||
pad = self.THPad(size, size, drill, shape=pcbnew.PAD_SHAPE_CIRCLE)
|
||||
return pad
|
||||
|
||||
def NPTHRoundPad(self, drill):
|
||||
|
@ -54,26 +54,26 @@ class PadMaker:
|
|||
|
||||
pad.SetSize(pcbnew.wxSize(drill, drill))
|
||||
|
||||
pad.SetShape(pcbnew.PAD_CIRCLE)
|
||||
pad.SetShape(pcbnew.PAD_SHAPE_CIRCLE)
|
||||
|
||||
pad.SetAttribute(pcbnew.PAD_HOLE_NOT_PLATED)
|
||||
pad.SetAttribute(pcbnew.PAD_ATTRIB_HOLE_NOT_PLATED)
|
||||
pad.SetLayerSet(pad.UnplatedHoleMask())
|
||||
pad.SetDrillSize(pcbnew.wxSize(drill, drill))
|
||||
return pad
|
||||
|
||||
def SMDPad(self, w, l, shape=pcbnew.PAD_RECT):
|
||||
def SMDPad(self, w, l, shape=pcbnew.PAD_SHAPE_RECT):
|
||||
pad = pcbnew.D_PAD(self.module)
|
||||
pad.SetSize(pcbnew.wxSize(l, w))
|
||||
|
||||
pad.SetShape(shape)
|
||||
|
||||
pad.SetAttribute(pcbnew.PAD_SMD)
|
||||
pad.SetAttribute(pcbnew.PAD_ATTRIB_SMD)
|
||||
pad.SetLayerSet(pad.SMDMask())
|
||||
|
||||
return pad
|
||||
|
||||
def SMTRoundPad(self, size):
|
||||
pad = self.SMDPad(size, size, shape=pcbnew.PAD_CIRCLE)
|
||||
pad = self.SMDPad(size, size, shape=pcbnew.PAD_SHAPE_CIRCLE)
|
||||
return pad
|
||||
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ class QFPWizard(HelpfulFootprintWizardPlugin.HelpfulFootprintWizardPlugin):
|
|||
|
||||
row_len = (pads_per_row - 1) * pad_pitch
|
||||
|
||||
pad_shape = pcbnew.PAD_OVAL if pads["*oval"] else pcbnew.PAD_RECT
|
||||
pad_shape = pcbnew.PAD_SHAPE_OVAL if pads["*oval"] else pcbnew.PAD_SHAPE_RECT
|
||||
|
||||
h_pad = PA.PadMaker(self.module).SMDPad(
|
||||
pad_width, pad_length, shape=pad_shape)
|
||||
|
|
|
@ -135,7 +135,7 @@ class SDIPWizard(RowedFootprint):
|
|||
pad_width = self.parameters["Pads"]["pad width"]
|
||||
drill = self.parameters["Pads"]["drill size"]
|
||||
return PA.PadMaker(self.module).THPad(
|
||||
pad_width, pad_length, drill, shape=pcbnew.PAD_OVAL)
|
||||
pad_width, pad_length, drill, shape=pcbnew.PAD_SHAPE_OVAL)
|
||||
|
||||
def DrawBox(self, ssx, ssy):
|
||||
|
||||
|
@ -195,7 +195,7 @@ class SOICWizard(RowedFootprint):
|
|||
pad_length = self.parameters["Pads"]["pad length"]
|
||||
pad_width = self.parameters["Pads"]["pad width"]
|
||||
return PA.PadMaker(self.module).SMDPad(
|
||||
pad_width, pad_length, shape=pcbnew.PAD_RECT)
|
||||
pad_width, pad_length, shape=pcbnew.PAD_SHAPE_RECT)
|
||||
|
||||
def DrawBox(self, ssx, ssy):
|
||||
|
||||
|
|
|
@ -46,8 +46,8 @@ class TouchSliderWizard(FootprintWizardPlugin):
|
|||
def smdRectPad(self,module,size,pos,name):
|
||||
pad = D_PAD(module)
|
||||
pad.SetSize(size)
|
||||
pad.SetShape(PAD_RECT)
|
||||
pad.SetAttribute(PAD_SMD)
|
||||
pad.SetShape(PAD_SHAPE_RECT)
|
||||
pad.SetAttribute(PAD_ATTRIB_SMD)
|
||||
pad.SetLayerSet(pad.ConnSMDMask())
|
||||
pad.SetPos0(pos)
|
||||
pad.SetPosition(pos)
|
||||
|
@ -58,8 +58,8 @@ class TouchSliderWizard(FootprintWizardPlugin):
|
|||
def smdTrianglePad(self,module,size,pos,name,up_down=1,left_right=0):
|
||||
pad = D_PAD(module)
|
||||
pad.SetSize(wxSize(size[0],size[1]))
|
||||
pad.SetShape(PAD_TRAPEZOID)
|
||||
pad.SetAttribute(PAD_SMD)
|
||||
pad.SetShape(PAD_SHAPE_TRAPEZOID)
|
||||
pad.SetAttribute(PAD_ATTRIB_SMD)
|
||||
pad.SetLayerSet(pad.ConnSMDMask())
|
||||
pad.SetPos0(pos)
|
||||
pad.SetPosition(pos)
|
||||
|
|
|
@ -379,7 +379,7 @@ static DRAWSEGMENT* findPoint( const wxPoint& aPoint, ::PCB_TYPE_COLLECTOR* item
|
|||
*/
|
||||
static bool isRoundKeepout( D_PAD* aPad )
|
||||
{
|
||||
if( aPad->GetShape()==PAD_CIRCLE )
|
||||
if( aPad->GetShape()==PAD_SHAPE_CIRCLE )
|
||||
{
|
||||
if( aPad->GetDrillSize().x >= aPad->GetSize().x )
|
||||
return true;
|
||||
|
@ -472,7 +472,7 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad )
|
|||
switch( aPad->GetShape() )
|
||||
{
|
||||
default:
|
||||
case PAD_CIRCLE:
|
||||
case PAD_SHAPE_CIRCLE:
|
||||
{
|
||||
double diameter = scale( aPad->GetSize().x );
|
||||
|
||||
|
@ -500,7 +500,7 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad )
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_RECT:
|
||||
case PAD_SHAPE_RECT:
|
||||
{
|
||||
double dx = scale( aPad->GetSize().x ) / 2.0;
|
||||
double dy = scale( aPad->GetSize().y ) / 2.0;
|
||||
|
@ -536,7 +536,7 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad )
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_OVAL:
|
||||
case PAD_SHAPE_OVAL:
|
||||
{
|
||||
double dx = scale( aPad->GetSize().x ) / 2.0;
|
||||
double dy = scale( aPad->GetSize().y ) / 2.0;
|
||||
|
@ -587,7 +587,7 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad )
|
|||
}
|
||||
break;
|
||||
|
||||
case PAD_TRAPEZOID:
|
||||
case PAD_SHAPE_TRAPEZOID:
|
||||
{
|
||||
double dx = scale( aPad->GetSize().x ) / 2.0;
|
||||
double dy = scale( aPad->GetSize().y ) / 2.0;
|
||||
|
|
|
@ -166,8 +166,8 @@ void ZONE_CONTAINER::buildFeatureHoleList( BOARD* aPcb, SHAPE_POLY_SET& aFeature
|
|||
// the pad hole
|
||||
dummypad.SetSize( pad->GetDrillSize() );
|
||||
dummypad.SetOrientation( pad->GetOrientation() );
|
||||
dummypad.SetShape( pad->GetDrillShape() == PAD_DRILL_OBLONG ?
|
||||
PAD_OVAL : PAD_CIRCLE );
|
||||
dummypad.SetShape( pad->GetDrillShape() == PAD_DRILL_SHAPE_OBLONG ?
|
||||
PAD_SHAPE_OVAL : PAD_SHAPE_CIRCLE );
|
||||
dummypad.SetPosition( pad->GetPosition() );
|
||||
|
||||
pad = &dummypad;
|
||||
|
@ -337,7 +337,7 @@ void ZONE_CONTAINER::buildFeatureHoleList( BOARD* aPcb, SHAPE_POLY_SET& aFeature
|
|||
{
|
||||
// Rejects non-standard pads with tht-only thermal reliefs
|
||||
if( GetPadConnection( pad ) == PAD_ZONE_CONN_THT_THERMAL
|
||||
&& pad->GetAttribute() != PAD_STANDARD )
|
||||
&& pad->GetAttribute() != PAD_ATTRIB_STANDARD )
|
||||
continue;
|
||||
|
||||
if( GetPadConnection( pad ) != PAD_ZONE_CONN_THERMAL
|
||||
|
|
|
@ -112,7 +112,7 @@ void BuildUnconnectedThermalStubsPolygonList( SHAPE_POLY_SET& aCornerBuffer,
|
|||
{
|
||||
// Rejects non-standard pads with tht-only thermal reliefs
|
||||
if( aZone->GetPadConnection( pad ) == PAD_ZONE_CONN_THT_THERMAL
|
||||
&& pad->GetAttribute() != PAD_STANDARD )
|
||||
&& pad->GetAttribute() != PAD_ATTRIB_STANDARD )
|
||||
continue;
|
||||
|
||||
if( aZone->GetPadConnection( pad ) != PAD_ZONE_CONN_THERMAL
|
||||
|
@ -173,7 +173,7 @@ void BuildUnconnectedThermalStubsPolygonList( SHAPE_POLY_SET& aCornerBuffer,
|
|||
// This is a CIRCLE pad tweak
|
||||
// for circle pads, the thermal stubs orientation is 45 deg
|
||||
double fAngle = pad->GetOrientation();
|
||||
if( pad->GetShape() == PAD_CIRCLE )
|
||||
if( pad->GetShape() == PAD_SHAPE_CIRCLE )
|
||||
{
|
||||
endpoint.x = KiROUND( endpoint.x * aArcCorrection );
|
||||
endpoint.y = endpoint.x;
|
||||
|
|
Loading…
Reference in New Issue