Merge trunk @ 5278
This commit is contained in:
commit
c3a3ac9da2
|
@ -33,6 +33,7 @@ IF (WIN32)
|
|||
NAMES glew glew32 glew32s
|
||||
PATHS
|
||||
$ENV{GLEW_ROOT_PATH}/lib
|
||||
$ENV{GLEW_ROOT_PATH}/lib/Release/Win32
|
||||
${OPENGL_LIBRARY_DIR}
|
||||
)
|
||||
|
||||
|
|
|
@ -163,20 +163,22 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent )
|
|||
module = module->Next();
|
||||
}
|
||||
|
||||
// Print list
|
||||
for( iter = list.begin(); iter != list.end(); iter++ )
|
||||
// Print list. Also delete temporary created objects.
|
||||
for( size_t ii = list.GetCount(); ii > 0; ii-- )
|
||||
{
|
||||
cmp* current = *iter;
|
||||
cmp* current = *list.begin(); // Because the first object will be removed
|
||||
// from list, all objects will be get here
|
||||
|
||||
msg.Empty();
|
||||
|
||||
msg << current->m_Id << wxT( ";\"" );
|
||||
msg << current->m_Ref << wxT( "\";\"" );
|
||||
msg << FROM_UTF8( current->m_fpid.Format().c_str() ) << wxT( "\";" );
|
||||
msg << FROM_UTF8( current->m_fpid.GetFootprintName().c_str() ) << wxT( "\";" );
|
||||
msg << current->m_CmpCount << wxT( ";\"" );
|
||||
msg << current->m_Val << wxT( "\";;;\n" );
|
||||
fprintf( fp_bom, "%s", TO_UTF8( msg ) );
|
||||
|
||||
// We do not need this object, now: remove it from list and delete it
|
||||
list.DeleteObject( current );
|
||||
delete (current);
|
||||
}
|
||||
|
|
|
@ -2506,6 +2506,8 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
|
|||
pad->SetNetCode( NETINFO_LIST::UNCONNECTED );
|
||||
}
|
||||
|
||||
m_ratsnest->ProcessBoard();
|
||||
|
||||
// Last step: Some tests:
|
||||
// verify all pads found in netlist:
|
||||
// They should exist in footprints, otherwise the footprint is wrong
|
||||
|
|
|
@ -863,6 +863,12 @@ unsigned int MODULE::ViewGetLOD( int aLayer ) const
|
|||
return 30;
|
||||
}
|
||||
|
||||
const BOX2I MODULE::ViewBBox() const
|
||||
{
|
||||
EDA_RECT fpRect = GetFootprintRect();
|
||||
|
||||
return BOX2I( VECTOR2I( fpRect.GetOrigin() ), VECTOR2I( fpRect.GetSize() ) );
|
||||
}
|
||||
|
||||
/* Test for validity of the name in a library of the footprint
|
||||
* ( no spaces, dir separators ... )
|
||||
|
|
|
@ -491,6 +491,9 @@ public:
|
|||
/// @copydoc VIEW_ITEM::ViewGetLOD()
|
||||
virtual unsigned int ViewGetLOD( int aLayer ) const;
|
||||
|
||||
/// @copydoc VIEW_ITEM::ViewBBox()
|
||||
virtual const BOX2I ViewBBox() const;
|
||||
|
||||
/**
|
||||
* Function CopyNetlistSettings
|
||||
* copies the netlist settings to \a aModule.
|
||||
|
|
|
@ -439,10 +439,13 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule,
|
|||
comp->SetPosition( aModule->GetPosition().x * scale + dx,
|
||||
-aModule->GetPosition().y * scale + dy,
|
||||
rotz, IDF3::LYR_TOP );
|
||||
else
|
||||
comp->SetPosition( aModule->GetPosition().x * scale + dx,
|
||||
-aModule->GetPosition().y * scale + dy,
|
||||
rotz, IDF3::LYR_BOTTOM );
|
||||
else
|
||||
comp->SetPosition( aModule->GetPosition().x * scale + dx,
|
||||
-aModule->GetPosition().y * scale + dy,
|
||||
rotz, IDF3::LYR_BOTTOM );
|
||||
|
||||
comp->SetPlacement( IDF3::PS_ECAD );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -370,7 +370,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
|||
_( "Add footprints" ), KiBitmap( module_xpm ) );
|
||||
|
||||
text = AddHotkeyName( _( "&Track" ), g_Pcbnew_Editor_Hokeys_Descr,
|
||||
HK_ADD_NEW_TRACK, IS_COMMENT );
|
||||
HK_ADD_NEW_TRACK );
|
||||
AddMenuItem( placeMenu, ID_TRACK_BUTT, text,
|
||||
_( "Add tracks and vias" ), KiBitmap( add_tracks_xpm ) );
|
||||
|
||||
|
@ -381,8 +381,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
|||
_( "&Keepout Area" ), _( "Add keepout areas" ), KiBitmap( add_keepout_area_xpm ) );
|
||||
|
||||
AddMenuItem( placeMenu, ID_PCB_ADD_TEXT_BUTT,
|
||||
_( "Te&xt" ), _( "Add text on copper layers or graphic text" ),
|
||||
KiBitmap( add_text_xpm ) );
|
||||
_( "Te&xt" ), _( "Add text on copper layers or graphic text" ),
|
||||
KiBitmap( add_text_xpm ) );
|
||||
|
||||
AddMenuItem( placeMenu, ID_PCB_ARC_BUTT,
|
||||
_( "&Arc" ), _( "Add graphic arc" ),KiBitmap( add_arc_xpm ) );
|
||||
|
|
|
@ -198,6 +198,8 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_ID aLayer,
|
|||
|
||||
break;
|
||||
|
||||
case B_Adhes:
|
||||
case F_Adhes:
|
||||
case B_Paste:
|
||||
case F_Paste:
|
||||
plotOpt.SetSkipPlotNPTH_Pads( false );
|
||||
|
@ -237,8 +239,36 @@ void PlotOneBoardLayer( BOARD *aBoard, PLOTTER* aPlotter, LAYER_ID aLayer,
|
|||
}
|
||||
break;
|
||||
|
||||
// These layers are plotted like silk screen layers.
|
||||
// Mainly, pads on these layers are not filled.
|
||||
// This is not necessary the best choice.
|
||||
case Dwgs_User:
|
||||
case Cmts_User:
|
||||
case Eco1_User:
|
||||
case Eco2_User:
|
||||
case Edge_Cuts:
|
||||
case Margin:
|
||||
case F_CrtYd:
|
||||
case B_CrtYd:
|
||||
case F_Fab:
|
||||
case B_Fab:
|
||||
plotOpt.SetSkipPlotNPTH_Pads( false );
|
||||
plotOpt.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE );
|
||||
|
||||
if( plotOpt.GetFormat() == PLOT_FORMAT_DXF )
|
||||
PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
else
|
||||
PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
break;
|
||||
|
||||
default:
|
||||
PlotSilkScreen( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
plotOpt.SetSkipPlotNPTH_Pads( false );
|
||||
plotOpt.SetDrillMarksType( PCB_PLOT_PARAMS::NO_DRILL_SHAPE );
|
||||
|
||||
if( plotOpt.GetFormat() == PLOT_FORMAT_DXF )
|
||||
PlotLayerOutlines( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
else
|
||||
PlotStandardLayer( aBoard, aPlotter, layer_mask, plotOpt );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -306,23 +336,6 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter,
|
|||
if( ( aLayerMask & LSET::AllCuMask() ).any() )
|
||||
width_adj = itemplotter.getFineWidthAdj();
|
||||
|
||||
#if 0 // was:
|
||||
switch( aLayerMask &
|
||||
( SOLDERMASK_LAYER_BACK | SOLDERMASK_LAYER_FRONT |
|
||||
SOLDERPASTE_LAYER_BACK | SOLDERPASTE_LAYER_FRONT ) )
|
||||
{
|
||||
case SOLDERMASK_LAYER_FRONT:
|
||||
case SOLDERMASK_LAYER_BACK:
|
||||
break;
|
||||
|
||||
case SOLDERPASTE_LAYER_FRONT:
|
||||
case SOLDERPASTE_LAYER_BACK:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#else
|
||||
static const LSET speed( 4, B_Mask, F_Mask, B_Paste, F_Paste );
|
||||
|
||||
LSET anded = ( speed & aLayerMask );
|
||||
|
@ -335,7 +348,6 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter,
|
|||
{
|
||||
margin = pad->GetSolderPasteMargin();
|
||||
}
|
||||
#endif
|
||||
|
||||
wxSize padPlotsSize;
|
||||
padPlotsSize.x = pad->GetSize().x + ( 2 * margin.x ) + width_adj;
|
||||
|
|
|
@ -306,7 +306,7 @@ void PCB_EDIT_FRAME::ReCreateHToolbar()
|
|||
m_mainToolBar->AddSeparator();
|
||||
m_mainToolBar->AddTool( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, wxEmptyString,
|
||||
KiBitmap( web_support_xpm ),
|
||||
_( "Fast access to the Web Based FreeROUTE advanced router" ) );
|
||||
_( "Fast access to the FreeROUTE external advanced router" ) );
|
||||
|
||||
// Access to the scripting console
|
||||
#if defined(KICAD_SCRIPTING_WXPYTHON)
|
||||
|
|
|
@ -308,6 +308,7 @@ int POINT_EDITOR::OnSelectionChange( TOOL_EVENT& aEvent )
|
|||
controls->SetAutoPan( false );
|
||||
setAltConstraint( false );
|
||||
modified = false;
|
||||
m_toolMgr->PassEvent();
|
||||
}
|
||||
|
||||
else if( evt->IsCancel() )
|
||||
|
|
|
@ -252,7 +252,8 @@ bool SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAllowDisambigua
|
|||
GENERAL_COLLECTOR collector;
|
||||
|
||||
// Preferred types (they have the priority when if they are covered by a bigger item)
|
||||
const KICAD_T types[] = { PCB_TRACE_T, PCB_VIA_T, PCB_LINE_T, PCB_MODULE_TEXT_T, EOT };
|
||||
const KICAD_T types[] = { PCB_TRACE_T, PCB_VIA_T, PCB_LINE_T,
|
||||
PCB_MODULE_EDGE_T, PCB_MODULE_TEXT_T, EOT };
|
||||
|
||||
if( m_editModules )
|
||||
collector.Collect( getModel<BOARD>(), GENERAL_COLLECTOR::ModuleItems,
|
||||
|
@ -348,9 +349,6 @@ bool SELECTION_TOOL::selectMultiple()
|
|||
|
||||
if( evt->IsMouseUp( BUT_LEFT ) )
|
||||
{
|
||||
// End drawing the selection box
|
||||
m_selArea->ViewSetVisible( false );
|
||||
|
||||
// Mark items within the selection box as selected
|
||||
std::vector<KIGFX::VIEW::LAYER_ITEM_PAIR> selectedItems;
|
||||
BOX2I selectionBox = m_selArea->ViewBBox();
|
||||
|
@ -384,6 +382,8 @@ bool SELECTION_TOOL::selectMultiple()
|
|||
}
|
||||
}
|
||||
|
||||
// Stop drawing the selection box
|
||||
m_selArea->ViewSetVisible( false );
|
||||
view->Remove( m_selArea );
|
||||
m_multiple = false; // Multiple selection mode is inactive
|
||||
getViewControls()->SetAutoPan( false );
|
||||
|
|
|
@ -728,7 +728,8 @@ void IDF3_COMP_OUTLINE_DATA::writePlaceData( std::ofstream& aBoardFile,
|
|||
|
||||
if( aPlacement == PS_INVALID )
|
||||
{
|
||||
ERROR_IDF << "placement invalid; defaulting to PLACED\n";
|
||||
ERROR_IDF << "placement invalid (" << aRefDes << ":";
|
||||
std::cerr << aPlacement << "); defaulting to PLACED\n";
|
||||
aPlacement = PS_PLACED;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
// a closed loop as assumed for all other outlines.
|
||||
// 3. a scheme is needed to tell a castellated edge from a plain board edge
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <iomanip>
|
||||
|
|
Loading…
Reference in New Issue