本文整理汇总了C++中D_PAD::GetChamferRectRatio方法的典型用法代码示例。如果您正苦于以下问题:C++ D_PAD::GetChamferRectRatio方法的具体用法?C++ D_PAD::GetChamferRectRatio怎么用?C++ D_PAD::GetChamferRectRatio使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类D_PAD
的用法示例。
在下文中一共展示了D_PAD::GetChamferRectRatio方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ImportSettingsFromMaster
void D_PAD::ImportSettingsFromMaster( const D_PAD& aMasterPad )
{
SetShape( aMasterPad.GetShape() );
SetLayerSet( aMasterPad.GetLayerSet() );
SetAttribute( aMasterPad.GetAttribute() );
// The pad orientation, for historical reasons is the
// pad rotation + parent rotation.
// So we have to manage this parent rotation
double pad_rot = aMasterPad.GetOrientation();
if( aMasterPad.GetParent() )
pad_rot -= aMasterPad.GetParent()->GetOrientation();
if( GetParent() )
pad_rot += GetParent()->GetOrientation();
SetOrientation( pad_rot );
SetSize( aMasterPad.GetSize() );
SetDelta( wxSize( 0, 0 ) );
SetOffset( aMasterPad.GetOffset() );
SetDrillSize( aMasterPad.GetDrillSize() );
SetDrillShape( aMasterPad.GetDrillShape() );
SetRoundRectRadiusRatio( aMasterPad.GetRoundRectRadiusRatio() );
SetChamferRectRatio( aMasterPad.GetChamferRectRatio() );
SetChamferPositions( aMasterPad.GetChamferPositions() );
switch( aMasterPad.GetShape() )
{
case PAD_SHAPE_TRAPEZOID:
SetDelta( aMasterPad.GetDelta() );
break;
case PAD_SHAPE_CIRCLE:
// ensure size.y == size.x
SetSize( wxSize( GetSize().x, GetSize().x ) );
break;
default:
;
}
switch( aMasterPad.GetAttribute() )
{
case PAD_ATTRIB_SMD:
case PAD_ATTRIB_CONN:
// These pads do not have hole (they are expected to be only on one
// external copper layer)
SetDrillSize( wxSize( 0, 0 ) );
break;
default:
;
}
// copy also local settings:
SetLocalClearance( aMasterPad.GetLocalClearance() );
SetLocalSolderMaskMargin( aMasterPad.GetLocalSolderMaskMargin() );
SetLocalSolderPasteMargin( aMasterPad.GetLocalSolderPasteMargin() );
SetLocalSolderPasteMarginRatio( aMasterPad.GetLocalSolderPasteMarginRatio() );
SetZoneConnection( aMasterPad.GetZoneConnection() );
SetThermalWidth( aMasterPad.GetThermalWidth() );
SetThermalGap( aMasterPad.GetThermalGap() );
// Add or remove custom pad shapes:
SetPrimitives( aMasterPad.GetPrimitives() );
SetAnchorPadShape( aMasterPad.GetAnchorPadShape() );
MergePrimitivesAsPolygon();
}