当前位置: 首页>>代码示例>>C++>>正文


C++ D_PAD::CopyNetlistSettings方法代码示例

本文整理汇总了C++中D_PAD::CopyNetlistSettings方法的典型用法代码示例。如果您正苦于以下问题:C++ D_PAD::CopyNetlistSettings方法的具体用法?C++ D_PAD::CopyNetlistSettings怎么用?C++ D_PAD::CopyNetlistSettings使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在D_PAD的用法示例。


在下文中一共展示了D_PAD::CopyNetlistSettings方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CopyNetlistSettings

void MODULE::CopyNetlistSettings( MODULE* aModule )
{
    // Don't do anything foolish like trying to copy to yourself.
    wxCHECK_RET( aModule != NULL && aModule != this, wxT( "Cannot copy to NULL or yourself." ) );

    // Not sure what to do with the value field.  Use netlist for now.
    aModule->SetPosition( GetPosition() );

    if( aModule->GetLayer() != GetLayer() )
        aModule->Flip( aModule->GetPosition() );

    if( aModule->GetOrientation() != GetOrientation() )
        aModule->Rotate( aModule->GetPosition(), GetOrientation() );

    aModule->SetLocalSolderMaskMargin( GetLocalSolderMaskMargin() );
    aModule->SetLocalClearance( GetLocalClearance() );
    aModule->SetLocalSolderPasteMargin( GetLocalSolderPasteMargin() );
    aModule->SetLocalSolderPasteMarginRatio( GetLocalSolderPasteMarginRatio() );
    aModule->SetZoneConnection( GetZoneConnection() );
    aModule->SetThermalWidth( GetThermalWidth() );
    aModule->SetThermalGap( GetThermalGap() );

    for( D_PAD* pad = Pads();  pad;  pad = pad->Next() )
    {
        D_PAD* newPad = aModule->FindPadByName( pad->GetPadName() );

        if( newPad )
            pad->CopyNetlistSettings( newPad );
    }

    // Not sure about copying description, keywords, 3D models or any other
    // local user changes to footprint.  Stick with the new footprint settings
    // called out in the footprint loaded in the netlist.
    aModule->CalculateBoundingBox();
}
开发者ID:ianohara,项目名称:kicad-source-mirror,代码行数:35,代码来源:class_module.cpp

示例2: CopyNetlistSettings

void MODULE::CopyNetlistSettings( MODULE* aModule, bool aCopyLocalSettings )
{
    // Don't do anything foolish like trying to copy to yourself.
    wxCHECK_RET( aModule != NULL && aModule != this, wxT( "Cannot copy to NULL or yourself." ) );

    // Not sure what to do with the value field.  Use netlist for now.
    aModule->SetPosition( GetPosition() );

    if( aModule->GetLayer() != GetLayer() )
        aModule->Flip( aModule->GetPosition() );

    if( aModule->GetOrientation() != GetOrientation() )
        aModule->Rotate( aModule->GetPosition(), GetOrientation() );

    aModule->SetLocked( IsLocked() );

    if( aCopyLocalSettings )
    {
        aModule->SetLocalSolderMaskMargin( GetLocalSolderMaskMargin() );
        aModule->SetLocalClearance( GetLocalClearance() );
        aModule->SetLocalSolderPasteMargin( GetLocalSolderPasteMargin() );
        aModule->SetLocalSolderPasteMarginRatio( GetLocalSolderPasteMarginRatio() );
        aModule->SetZoneConnection( GetZoneConnection() );
        aModule->SetThermalWidth( GetThermalWidth() );
        aModule->SetThermalGap( GetThermalGap() );
    }

    for( D_PAD* pad = aModule->Pads();  pad;  pad = pad->Next() )
    {
        // Fix me: if aCopyLocalSettings == true, for "multiple" pads
        // (set of pads having the same name/number) this is broken
        // because we copy settings from the first pad found.
        // When old and new footprints have very few differences, a better
        // algo can be used.
        D_PAD* oldPad = FindPadByName( pad->GetPadName() );

        if( oldPad )
            oldPad->CopyNetlistSettings( pad, aCopyLocalSettings );
    }

    // Not sure about copying description, keywords, 3D models or any other
    // local user changes to footprint.  Stick with the new footprint settings
    // called out in the footprint loaded in the netlist.
    aModule->CalculateBoundingBox();
}
开发者ID:nikgul,项目名称:kicad-source-mirror,代码行数:45,代码来源:class_module.cpp


注:本文中的D_PAD::CopyNetlistSettings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。