ADDED new footprint fabrication attributes.
This commit also adds mapping of the new symbol properties "exclude from BOM" and "exclude from board" to be correctly handled in Update Board from Schematic. Fixes https://gitlab.com/kicad/code/kicad/issues/2399 Fixes https://gitlab.com/kicad/code/kicad/issues/4643 Fixes https://gitlab.com/kicad/code/kicad/issues/2233
This commit is contained in:
parent
b8aee85b94
commit
e7db43285f
|
@ -227,17 +227,12 @@ void BOARD_ADAPTER::SetFlag( DISPLAY3D_FLG aFlag, bool aState )
|
|||
|
||||
bool BOARD_ADAPTER::ShouldModuleBeDisplayed( MODULE_ATTR_T aModuleAttributs ) const
|
||||
{
|
||||
if( ( ( aModuleAttributs == MOD_DEFAULT ) &&
|
||||
GetFlag( FL_MODULE_ATTRIBUTES_NORMAL ) ) ||
|
||||
( ( ( aModuleAttributs & MOD_CMS) == MOD_CMS ) &&
|
||||
GetFlag( FL_MODULE_ATTRIBUTES_NORMAL_INSERT ) ) ||
|
||||
( ( ( aModuleAttributs & MOD_VIRTUAL) == MOD_VIRTUAL ) &&
|
||||
GetFlag( FL_MODULE_ATTRIBUTES_VIRTUAL ) ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
if( aModuleAttributs & MOD_SMD )
|
||||
return GetFlag( FL_MODULE_ATTRIBUTES_NORMAL_INSERT );
|
||||
else if( aModuleAttributs & MOD_THROUGH_HOLE )
|
||||
return GetFlag( FL_MODULE_ATTRIBUTES_NORMAL );
|
||||
else
|
||||
return GetFlag( FL_MODULE_ATTRIBUTES_VIRTUAL );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ aux_axis_origin
|
|||
bevelled
|
||||
blind
|
||||
blind_buried_vias_allowed
|
||||
board_only
|
||||
bold
|
||||
bottom
|
||||
bottom_left
|
||||
|
@ -90,6 +91,8 @@ edge_width
|
|||
effects
|
||||
end
|
||||
epsilon_r
|
||||
exclude_from_pos_files
|
||||
exclude_from_bom
|
||||
fab_layers_line_width
|
||||
fab_layers_text_dims
|
||||
feature1
|
||||
|
@ -239,6 +242,7 @@ thermal_width
|
|||
thermal_gap
|
||||
thermal_bridge_width
|
||||
thickness
|
||||
through_hole
|
||||
through_hole_min
|
||||
top
|
||||
top_left
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
static bool sortPinsByNumber( LIB_PIN* aPin1, LIB_PIN* aPin2 );
|
||||
|
||||
bool NETLIST_EXPORTER_GENERIC::WriteNetlist( const wxString& aOutFileName,
|
||||
unsigned aNetlistOptions )
|
||||
unsigned aNetlistOptions )
|
||||
{
|
||||
// output the XML format netlist.
|
||||
wxXmlDocument xdoc;
|
||||
|
@ -87,7 +87,7 @@ struct COMP_FIELDS
|
|||
|
||||
|
||||
void NETLIST_EXPORTER_GENERIC::addComponentFields( XNODE* xcomp, SCH_COMPONENT* comp,
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
SCH_SHEET_PATH* aSheet )
|
||||
{
|
||||
COMP_FIELDS fields;
|
||||
|
||||
|
@ -123,15 +123,30 @@ void NETLIST_EXPORTER_GENERIC::addComponentFields( XNODE* xcomp, SCH_COMPONENT*
|
|||
// field value)
|
||||
if( !comp2->GetField( VALUE )->IsVoid()
|
||||
&& ( unit < minUnit || fields.value.IsEmpty() ) )
|
||||
fields.value = comp2->GetField( VALUE )->GetShownText();
|
||||
{
|
||||
if( m_resolveTextVars )
|
||||
fields.value = comp2->GetField( VALUE )->GetShownText();
|
||||
else
|
||||
fields.value = comp2->GetField( VALUE )->GetText();
|
||||
}
|
||||
|
||||
if( !comp2->GetField( FOOTPRINT )->IsVoid()
|
||||
&& ( unit < minUnit || fields.footprint.IsEmpty() ) )
|
||||
fields.footprint = comp2->GetField( FOOTPRINT )->GetShownText();
|
||||
{
|
||||
if( m_resolveTextVars )
|
||||
fields.footprint = comp2->GetField( FOOTPRINT )->GetShownText();
|
||||
else
|
||||
fields.footprint = comp2->GetField( FOOTPRINT )->GetText();
|
||||
}
|
||||
|
||||
if( !comp2->GetField( DATASHEET )->IsVoid()
|
||||
&& ( unit < minUnit || fields.datasheet.IsEmpty() ) )
|
||||
fields.datasheet = comp2->GetField( DATASHEET )->GetShownText();
|
||||
{
|
||||
if( m_resolveTextVars )
|
||||
fields.datasheet = comp2->GetField( DATASHEET )->GetShownText();
|
||||
else
|
||||
fields.datasheet = comp2->GetField( DATASHEET )->GetText();
|
||||
}
|
||||
|
||||
for( int fldNdx = MANDATORY_FIELDS; fldNdx < comp2->GetFieldCount(); ++fldNdx )
|
||||
{
|
||||
|
@ -140,7 +155,10 @@ void NETLIST_EXPORTER_GENERIC::addComponentFields( XNODE* xcomp, SCH_COMPONENT*
|
|||
if( f->GetText().size()
|
||||
&& ( unit < minUnit || fields.f.count( f->GetName() ) == 0 ) )
|
||||
{
|
||||
fields.f[ f->GetName() ] = f->GetShownText();
|
||||
if( m_resolveTextVars )
|
||||
fields.f[ f->GetName() ] = f->GetShownText();
|
||||
else
|
||||
fields.f[ f->GetName() ] = f->GetText();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -150,16 +168,32 @@ void NETLIST_EXPORTER_GENERIC::addComponentFields( XNODE* xcomp, SCH_COMPONENT*
|
|||
}
|
||||
else
|
||||
{
|
||||
fields.value = comp->GetField( VALUE )->GetShownText();
|
||||
fields.footprint = comp->GetField( FOOTPRINT )->GetShownText();
|
||||
fields.datasheet = comp->GetField( DATASHEET )->GetShownText();
|
||||
if( m_resolveTextVars )
|
||||
fields.value = comp->GetField( VALUE )->GetShownText();
|
||||
else
|
||||
fields.value = comp->GetField( VALUE )->GetText();
|
||||
|
||||
if( m_resolveTextVars )
|
||||
fields.footprint = comp->GetField( FOOTPRINT )->GetShownText();
|
||||
else
|
||||
fields.footprint = comp->GetField( FOOTPRINT )->GetText();
|
||||
|
||||
if( m_resolveTextVars )
|
||||
fields.datasheet = comp->GetField( DATASHEET )->GetShownText();
|
||||
else
|
||||
fields.datasheet = comp->GetField( DATASHEET )->GetText();
|
||||
|
||||
for( int fldNdx = MANDATORY_FIELDS; fldNdx < comp->GetFieldCount(); ++fldNdx )
|
||||
{
|
||||
SCH_FIELD* f = comp->GetField( fldNdx );
|
||||
|
||||
if( f->GetText().size() )
|
||||
fields.f[ f->GetName() ] = f->GetShownText();
|
||||
{
|
||||
if( m_resolveTextVars )
|
||||
fields.f[ f->GetName() ] = f->GetShownText();
|
||||
else
|
||||
fields.f[ f->GetName() ] = f->GetText();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -265,26 +299,36 @@ XNODE* NETLIST_EXPORTER_GENERIC::makeComponents( unsigned aCtl )
|
|||
|
||||
xlibsource->AddAttribute( "description", comp->GetDescription() );
|
||||
|
||||
XNODE* xproperty;
|
||||
|
||||
std::vector<SCH_FIELD>& fields = comp->GetFields();
|
||||
|
||||
for( size_t jj = MANDATORY_FIELDS; jj < fields.size(); ++jj )
|
||||
{
|
||||
XNODE* xproperty;
|
||||
xcomp->AddChild( xproperty = node( "property" ) );
|
||||
|
||||
xproperty->AddAttribute( "name", fields[jj].GetName() );
|
||||
xproperty->AddAttribute( "value", fields[jj].GetText() );
|
||||
}
|
||||
|
||||
for( const SCH_FIELD& sheetField : sheet.Last()->GetFields() )
|
||||
{
|
||||
XNODE* xproperty;
|
||||
xcomp->AddChild( xproperty = node( "property" ) );
|
||||
|
||||
xproperty->AddAttribute( "name", sheetField.GetName() );
|
||||
xproperty->AddAttribute( "value", sheetField.GetText() );
|
||||
}
|
||||
|
||||
if( !comp->GetIncludeInBom() )
|
||||
{
|
||||
xcomp->AddChild( xproperty = node( "property" ) );
|
||||
xproperty->AddAttribute( "name", "exclude_from_bom" );
|
||||
}
|
||||
|
||||
if( !comp->GetIncludeOnBoard() )
|
||||
{
|
||||
xcomp->AddChild( xproperty = node( "property" ) );
|
||||
xproperty->AddAttribute( "name", "exclude_from_board" );
|
||||
}
|
||||
|
||||
XNODE* xsheetpath;
|
||||
xcomp->AddChild( xsheetpath = node( "sheetpath" ) );
|
||||
|
||||
|
|
|
@ -62,11 +62,15 @@ enum GNL_T
|
|||
class NETLIST_EXPORTER_GENERIC : public NETLIST_EXPORTER
|
||||
{
|
||||
private:
|
||||
std::set< wxString > m_libraries; ///< Set of library nicknames.
|
||||
std::set<wxString> m_libraries; // Set of library nicknames.
|
||||
|
||||
protected:
|
||||
bool m_resolveTextVars; // Export textVar references resolved
|
||||
|
||||
public:
|
||||
NETLIST_EXPORTER_GENERIC( SCHEMATIC* aSchematic ) :
|
||||
NETLIST_EXPORTER( aSchematic )
|
||||
NETLIST_EXPORTER( aSchematic ),
|
||||
m_resolveTextVars( true )
|
||||
{}
|
||||
|
||||
/**
|
||||
|
|
|
@ -39,7 +39,9 @@ class NETLIST_EXPORTER_KICAD : public NETLIST_EXPORTER_GENERIC
|
|||
public:
|
||||
NETLIST_EXPORTER_KICAD( SCHEMATIC* aSchematic ) :
|
||||
NETLIST_EXPORTER_GENERIC( aSchematic )
|
||||
{}
|
||||
{
|
||||
m_resolveTextVars = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write netlist to \a aOutFileName.
|
||||
|
|
|
@ -40,7 +40,7 @@ MODULE::MODULE( BOARD* parent ) :
|
|||
BOARD_ITEM_CONTAINER( (BOARD_ITEM*) parent, PCB_MODULE_T ),
|
||||
m_initial_comments( 0 )
|
||||
{
|
||||
m_Attributs = MOD_DEFAULT;
|
||||
m_Attributs = 0;
|
||||
m_Layer = F_Cu;
|
||||
m_Orient = 0;
|
||||
m_ModuleStatus = MODULE_PADS_LOCKED;
|
||||
|
@ -673,26 +673,33 @@ void MODULE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM
|
|||
: _( "Front" ), RED );
|
||||
}
|
||||
|
||||
msg = wxT( ". ." );
|
||||
auto addToken = []( wxString* aStr, const wxString& aAttr )
|
||||
{
|
||||
if( !aStr->IsEmpty() )
|
||||
*aStr += wxT( ", " );
|
||||
|
||||
*aStr += aAttr;
|
||||
};
|
||||
|
||||
wxString status;
|
||||
wxString attrs;
|
||||
|
||||
if( IsLocked() )
|
||||
msg[0] = 'L';
|
||||
addToken( &status, _( "locked" ) );
|
||||
|
||||
if( m_ModuleStatus & MODULE_is_PLACED )
|
||||
msg[2] = 'P';
|
||||
addToken( &status, _( "autoplaced" ) );
|
||||
|
||||
aList.emplace_back( _( "Status" ), msg, MAGENTA );
|
||||
if( m_Attributs & MOD_BOARD_ONLY )
|
||||
addToken( &attrs, _( "not in schematic" ) );
|
||||
|
||||
// Controls on right side of the dialog
|
||||
switch( m_Attributs & 255 )
|
||||
{
|
||||
case 0: msg = _( "Normal" ); break;
|
||||
case MOD_CMS: msg = _( "Insert" ); break;
|
||||
case MOD_VIRTUAL: msg = _( "Virtual" ); break;
|
||||
default: msg = wxT( "???" ); break;
|
||||
}
|
||||
if( m_Attributs & MOD_EXCLUDE_FROM_POS_FILES )
|
||||
addToken( &attrs, _( "exclude from pos files" ) );
|
||||
|
||||
aList.emplace_back( _( "Attributes" ), msg, BROWN );
|
||||
if( m_Attributs * MOD_EXCLUDE_FROM_BOM )
|
||||
addToken( &attrs, _( "exclude from BOM" ) );
|
||||
|
||||
aList.emplace_back( _( "Status: " ) + status, _( "Attributes: " ) + attrs, BROWN );
|
||||
|
||||
msg.Printf( "%.2f", GetOrientationDegrees() );
|
||||
aList.emplace_back( _( "Rotation" ), msg, BROWN );
|
||||
|
@ -1634,11 +1641,9 @@ void MODULE::SwapData( BOARD_ITEM* aImage )
|
|||
}
|
||||
|
||||
|
||||
bool MODULE::HasNonSMDPins() const
|
||||
bool MODULE::HasThroughHolePads() const
|
||||
{
|
||||
// returns true if the given module has at lesat one non smd pin, such as through hole
|
||||
|
||||
for( auto pad : Pads() )
|
||||
for( D_PAD* pad : Pads() )
|
||||
{
|
||||
if( pad->GetAttribute() != PAD_ATTRIB_SMD )
|
||||
return true;
|
||||
|
|
|
@ -64,37 +64,37 @@ enum INCLUDE_NPTH_T
|
|||
*/
|
||||
enum MODULE_ATTR_T
|
||||
{
|
||||
MOD_DEFAULT = 0, ///< default
|
||||
MOD_CMS = 1, ///< Set for modules listed in the automatic insertion list
|
||||
///< (usually SMD footprints)
|
||||
MOD_VIRTUAL = 2 ///< Virtual component: when created by copper shapes on
|
||||
///< board (Like edge card connectors, mounting hole...)
|
||||
MOD_THROUGH_HOLE = 0x0001,
|
||||
MOD_SMD = 0x0002,
|
||||
MOD_EXCLUDE_FROM_POS_FILES = 0x0004,
|
||||
MOD_EXCLUDE_FROM_BOM = 0x0008,
|
||||
MOD_BOARD_ONLY = 0x0010 // Footprint has no corresponding symbol
|
||||
};
|
||||
|
||||
class MODULE_3D_SETTINGS
|
||||
{
|
||||
public:
|
||||
MODULE_3D_SETTINGS() :
|
||||
// Initialize with sensible values
|
||||
m_Scale { 1, 1, 1 },
|
||||
m_Rotation { 0, 0, 0 },
|
||||
m_Offset { 0, 0, 0 },
|
||||
m_Opacity( 1.0 ),
|
||||
m_Show( true )
|
||||
{
|
||||
}
|
||||
public:
|
||||
MODULE_3D_SETTINGS() :
|
||||
// Initialize with sensible values
|
||||
m_Scale { 1, 1, 1 },
|
||||
m_Rotation { 0, 0, 0 },
|
||||
m_Offset { 0, 0, 0 },
|
||||
m_Opacity( 1.0 ),
|
||||
m_Show( true )
|
||||
{
|
||||
}
|
||||
|
||||
struct VECTOR3D
|
||||
{
|
||||
double x, y, z;
|
||||
};
|
||||
struct VECTOR3D
|
||||
{
|
||||
double x, y, z;
|
||||
};
|
||||
|
||||
VECTOR3D m_Scale; ///< 3D model scaling factor (dimensionless)
|
||||
VECTOR3D m_Rotation; ///< 3D model rotation (degrees)
|
||||
VECTOR3D m_Offset; ///< 3D model offset (mm)
|
||||
double m_Opacity;
|
||||
wxString m_Filename; ///< The 3D shape filename in 3D library
|
||||
bool m_Show; ///< Include module in rendering
|
||||
VECTOR3D m_Scale; ///< 3D model scaling factor (dimensionless)
|
||||
VECTOR3D m_Rotation; ///< 3D model rotation (degrees)
|
||||
VECTOR3D m_Offset; ///< 3D model offset (mm)
|
||||
double m_Opacity;
|
||||
wxString m_Filename; ///< The 3D shape filename in 3D library
|
||||
bool m_Show; ///< Include module in rendering
|
||||
};
|
||||
|
||||
DECL_DEQ_FOR_SWIG( PADS, D_PAD* )
|
||||
|
@ -201,12 +201,7 @@ public:
|
|||
return m_fp_zones;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the given module has any non smd pins, such as through hole
|
||||
* and therefore cannot be placed automatically.
|
||||
* Used in Pick and Place files writers
|
||||
*/
|
||||
bool HasNonSMDPins() const;
|
||||
bool HasThroughHolePads() const;
|
||||
|
||||
std::list<MODULE_3D_SETTINGS>& Models() { return m_3D_Drawings; }
|
||||
const std::list<MODULE_3D_SETTINGS>& Models() const { return m_3D_Drawings; }
|
||||
|
|
|
@ -132,9 +132,8 @@ void DIALOG_BOARD_STATISTICS::refreshItemsTypes()
|
|||
|
||||
// If you need some more types to be shown, simply add them to the
|
||||
// corresponding list
|
||||
m_componentsTypes.push_back( componentsType_t( MOD_DEFAULT, _( "THT:" ) ) );
|
||||
m_componentsTypes.push_back( componentsType_t( MOD_CMS, _( "SMD:" ) ) );
|
||||
m_componentsTypes.push_back( componentsType_t( MOD_VIRTUAL, _( "Virtual:" ) ) );
|
||||
m_componentsTypes.push_back( componentsType_t( MOD_THROUGH_HOLE, _( "THT:" ) ) );
|
||||
m_componentsTypes.push_back( componentsType_t( MOD_SMD, _( "SMD:" ) ) );
|
||||
|
||||
m_padsTypes.clear();
|
||||
m_padsTypes.push_back( padsType_t( PAD_ATTRIB_STANDARD, _( "Through hole:" ) ) );
|
||||
|
@ -177,21 +176,19 @@ bool DIALOG_BOARD_STATISTICS::TransferDataToWindow()
|
|||
|
||||
void DIALOG_BOARD_STATISTICS::getDataFromPCB()
|
||||
{
|
||||
auto board = m_parentFrame->GetBoard();
|
||||
BOARD* board = m_parentFrame->GetBoard();
|
||||
|
||||
// Get modules and pads count
|
||||
for( MODULE* module : board->Modules() )
|
||||
{
|
||||
auto& pads = module->Pads();
|
||||
|
||||
// Do not proceed modules with no pads if checkbox checked
|
||||
if( m_checkBoxExcludeComponentsNoPins->GetValue() && !pads.size() )
|
||||
if( m_checkBoxExcludeComponentsNoPins->GetValue() && ! module->Pads().size() )
|
||||
continue;
|
||||
|
||||
// Go through components types list
|
||||
for( auto& type : m_componentsTypes )
|
||||
{
|
||||
if( module->GetAttributes() == type.attribute )
|
||||
if( ( module->GetAttributes() & type.attribute ) > 0 )
|
||||
{
|
||||
if( module->IsFlipped() )
|
||||
type.backSideQty++;
|
||||
|
@ -201,7 +198,7 @@ void DIALOG_BOARD_STATISTICS::getDataFromPCB()
|
|||
}
|
||||
}
|
||||
|
||||
for( auto& pad : pads )
|
||||
for( D_PAD* pad : module->Pads() )
|
||||
{
|
||||
// Go through pads types list
|
||||
for( auto& type : m_padsTypes )
|
||||
|
@ -254,9 +251,9 @@ void DIALOG_BOARD_STATISTICS::getDataFromPCB()
|
|||
}
|
||||
|
||||
// Get via counts
|
||||
for( auto& track : board->Tracks() )
|
||||
for( TRACK* track : board->Tracks() )
|
||||
{
|
||||
if( auto via = dyn_cast<VIA*>( track ) )
|
||||
if( VIA* via = dyn_cast<VIA*>( track ) )
|
||||
{
|
||||
for( auto& type : m_viasTypes )
|
||||
{
|
||||
|
@ -300,7 +297,8 @@ void DIALOG_BOARD_STATISTICS::getDataFromPCB()
|
|||
// If board has no Edge Cuts lines, board->GetBoardPolygonOutlines will
|
||||
// return small rectangle, so we double check that
|
||||
bool edgeCutsExists = false;
|
||||
for( auto& drawing : board->Drawings() )
|
||||
|
||||
for( BOARD_ITEM* drawing : board->Drawings() )
|
||||
{
|
||||
if( drawing->GetLayer() == Edge_Cuts )
|
||||
{
|
||||
|
|
|
@ -299,20 +299,16 @@ bool DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow()
|
|||
m_CostRot90Ctrl->SetValue( m_footprint->GetPlacementCost90() );
|
||||
m_CostRot180Ctrl->SetValue( m_footprint->GetPlacementCost180() );
|
||||
|
||||
m_AttributsCtrl->SetItemToolTip( 0, _( "Use this attribute for most non SMD footprints\n"
|
||||
"Footprints with this option are not put in the footprint position list file" ) );
|
||||
m_AttributsCtrl->SetItemToolTip( 1, _( "Use this attribute for SMD footprints.\n"
|
||||
"Only footprints with this option are put in the footprint position list file" ) );
|
||||
m_AttributsCtrl->SetItemToolTip( 2, _( "Use this attribute for \"virtual\" footprints drawn "
|
||||
"on board\nsuch as an edge connector (old ISA PC bus for instance)" ) );
|
||||
if( m_footprint->GetAttributes() & MOD_THROUGH_HOLE )
|
||||
m_componentType->SetSelection( 0 );
|
||||
else if( m_footprint->GetAttributes() & MOD_SMD )
|
||||
m_componentType->SetSelection( 1 );
|
||||
else
|
||||
m_componentType->SetSelection( 2 );
|
||||
|
||||
switch( m_footprint->GetAttributes() & 255 )
|
||||
{
|
||||
case MOD_CMS: m_AttributsCtrl->SetSelection( 1 ); break;
|
||||
case MOD_VIRTUAL: m_AttributsCtrl->SetSelection( 2 ); break;
|
||||
case 0:
|
||||
default: m_AttributsCtrl->SetSelection( 0 ); break;
|
||||
}
|
||||
m_boardOnly->SetValue( m_footprint->GetAttributes() & MOD_BOARD_ONLY );
|
||||
m_excludeFromPosFiles->SetValue( m_footprint->GetAttributes() & MOD_EXCLUDE_FROM_POS_FILES );
|
||||
m_excludeFromBOM->SetValue( m_footprint->GetAttributes() & MOD_EXCLUDE_FROM_BOM );
|
||||
|
||||
// Local Clearances
|
||||
|
||||
|
@ -677,18 +673,10 @@ bool DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataFromWindow()
|
|||
switch( m_ZoneConnectionChoice->GetSelection() )
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
m_footprint->SetZoneConnection( ZONE_CONNECTION::INHERITED );
|
||||
break;
|
||||
case 1:
|
||||
m_footprint->SetZoneConnection( ZONE_CONNECTION::FULL );
|
||||
break;
|
||||
case 2:
|
||||
m_footprint->SetZoneConnection( ZONE_CONNECTION::THERMAL );
|
||||
break;
|
||||
case 3:
|
||||
m_footprint->SetZoneConnection( ZONE_CONNECTION::NONE );
|
||||
break;
|
||||
case 0: m_footprint->SetZoneConnection( ZONE_CONNECTION::INHERITED ); break;
|
||||
case 1: m_footprint->SetZoneConnection( ZONE_CONNECTION::FULL ); break;
|
||||
case 2: m_footprint->SetZoneConnection( ZONE_CONNECTION::THERMAL ); break;
|
||||
case 3: m_footprint->SetZoneConnection( ZONE_CONNECTION::NONE ); break;
|
||||
}
|
||||
|
||||
// Set Module Position
|
||||
|
@ -697,14 +685,26 @@ bool DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataFromWindow()
|
|||
m_footprint->SetLocked( m_AutoPlaceCtrl->GetSelection() == 2 );
|
||||
m_footprint->SetPadsLocked( m_AutoPlaceCtrl->GetSelection() == 1 );
|
||||
|
||||
switch( m_AttributsCtrl->GetSelection() )
|
||||
int attributes = 0;
|
||||
|
||||
switch( m_componentType->GetSelection() )
|
||||
{
|
||||
case 0: m_footprint->SetAttributes( 0 ); break;
|
||||
case 1: m_footprint->SetAttributes( MOD_CMS ); break;
|
||||
case 2: m_footprint->SetAttributes( MOD_VIRTUAL ); break;
|
||||
default: wxFAIL;
|
||||
case 0: attributes |= MOD_THROUGH_HOLE; break;
|
||||
case 1: attributes |= MOD_SMD; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if( m_boardOnly->GetValue() )
|
||||
attributes |= MOD_BOARD_ONLY;
|
||||
|
||||
if( m_excludeFromPosFiles->GetValue() )
|
||||
attributes |= MOD_EXCLUDE_FROM_POS_FILES;
|
||||
|
||||
if( m_excludeFromBOM->GetValue() )
|
||||
attributes |= MOD_EXCLUDE_FROM_BOM;
|
||||
|
||||
m_footprint->SetAttributes( attributes );
|
||||
|
||||
m_footprint->SetPlacementCost90( m_CostRot90Ctrl->GetValue() );
|
||||
m_footprint->SetPlacementCost180( m_CostRot180Ctrl->GetValue() );
|
||||
|
||||
|
|
|
@ -247,7 +247,7 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
|
|||
bButtonsSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_buttonUpdate = new wxButton( m_PanelGeneral, wxID_ANY, _("Update Footprint from Library..."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bButtonsSizer->Add( m_buttonUpdate, 0, wxALL|wxEXPAND, 5 );
|
||||
bButtonsSizer->Add( m_buttonUpdate, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_buttonExchange = new wxButton( m_PanelGeneral, wxID_ANY, _("Change Footprint..."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bButtonsSizer->Add( m_buttonExchange, 0, wxEXPAND|wxALL, 5 );
|
||||
|
@ -256,10 +256,10 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
|
|||
bButtonsSizer->Add( m_buttonModuleEditor, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
bButtonsSizer->Add( 0, 15, 1, wxEXPAND, 5 );
|
||||
bButtonsSizer->Add( 0, 10, 0, wxEXPAND, 5 );
|
||||
|
||||
m_button5 = new wxButton( m_PanelGeneral, wxID_ANY, _("Edit Library Footprint..."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bButtonsSizer->Add( m_button5, 0, wxALL|wxEXPAND, 5 );
|
||||
bButtonsSizer->Add( m_button5, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
bSizerRight->Add( bButtonsSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
@ -267,11 +267,36 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
|
|||
|
||||
bSizerRight->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
wxString m_AttributsCtrlChoices[] = { _("Through hole"), _("Surface mount"), _("Virtual") };
|
||||
int m_AttributsCtrlNChoices = sizeof( m_AttributsCtrlChoices ) / sizeof( wxString );
|
||||
m_AttributsCtrl = new wxRadioBox( m_PanelGeneral, wxID_ANY, _("Fabrication Attributes"), wxDefaultPosition, wxDefaultSize, m_AttributsCtrlNChoices, m_AttributsCtrlChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_AttributsCtrl->SetSelection( 0 );
|
||||
bSizerRight->Add( m_AttributsCtrl, 0, wxALL|wxEXPAND, 5 );
|
||||
wxStaticBoxSizer* sbFabSizer;
|
||||
sbFabSizer = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Fabrication Attributes") ), wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bPartTypeSizer;
|
||||
bPartTypeSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_componentTypeLabel = new wxStaticText( sbFabSizer->GetStaticBox(), wxID_ANY, _("Component:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_componentTypeLabel->Wrap( -1 );
|
||||
bPartTypeSizer->Add( m_componentTypeLabel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
wxString m_componentTypeChoices[] = { _("Through hole"), _("SMD"), _("Other") };
|
||||
int m_componentTypeNChoices = sizeof( m_componentTypeChoices ) / sizeof( wxString );
|
||||
m_componentType = new wxChoice( sbFabSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_componentTypeNChoices, m_componentTypeChoices, 0 );
|
||||
m_componentType->SetSelection( 0 );
|
||||
bPartTypeSizer->Add( m_componentType, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
sbFabSizer->Add( bPartTypeSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
m_boardOnly = new wxCheckBox( sbFabSizer->GetStaticBox(), wxID_ANY, _("Not in schematic"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbFabSizer->Add( m_boardOnly, 0, wxALL, 5 );
|
||||
|
||||
m_excludeFromPosFiles = new wxCheckBox( sbFabSizer->GetStaticBox(), wxID_ANY, _("Exclude from position files"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbFabSizer->Add( m_excludeFromPosFiles, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_excludeFromBOM = new wxCheckBox( sbFabSizer->GetStaticBox(), wxID_ANY, _("Exclude from BOM"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbFabSizer->Add( m_excludeFromBOM, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerRight->Add( sbFabSizer, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
bSizerProperties->Add( bSizerRight, 1, wxEXPAND|wxTOP, 5 );
|
||||
|
|
|
@ -1831,27 +1831,27 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizerRight</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bButtonsSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -2068,19 +2068,19 @@
|
|||
<event name="OnButtonClick">EditFootprint</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="0">
|
||||
<property name="height">15</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">10</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -2163,70 +2163,346 @@
|
|||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Through hole" "Surface mount" "Virtual"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Fabrication Attributes</property>
|
||||
<property name="majorDimension">1</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_AttributsCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxRA_SPECIFY_COLS</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="name">sbFabSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bPartTypeSizer</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Component:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_componentTypeLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxChoice" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Through hole" "SMD" "Other"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_componentType</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Not in schematic</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_boardOnly</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Exclude from position files</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_excludeFromPosFiles</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Exclude from BOM</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_excludeFromBOM</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -34,6 +34,7 @@ class WX_GRID;
|
|||
#include <wx/gbsizer.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/slider.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/dialog.h>
|
||||
|
@ -83,7 +84,11 @@ class DIALOG_FOOTPRINT_BOARD_EDITOR_BASE : public DIALOG_SHIM
|
|||
wxButton* m_buttonExchange;
|
||||
wxButton* m_buttonModuleEditor;
|
||||
wxButton* m_button5;
|
||||
wxRadioBox* m_AttributsCtrl;
|
||||
wxStaticText* m_componentTypeLabel;
|
||||
wxChoice* m_componentType;
|
||||
wxCheckBox* m_boardOnly;
|
||||
wxCheckBox* m_excludeFromPosFiles;
|
||||
wxCheckBox* m_excludeFromBOM;
|
||||
wxPanel* m_PanelClearances;
|
||||
wxStaticText* m_staticTextInfo;
|
||||
wxStaticText* m_staticTextInfoValPos;
|
||||
|
|
|
@ -225,20 +225,16 @@ bool DIALOG_FOOTPRINT_FP_EDITOR::TransferDataToWindow()
|
|||
m_CostRot90Ctrl->SetValue( m_footprint->GetPlacementCost90() );
|
||||
m_CostRot180Ctrl->SetValue( m_footprint->GetPlacementCost180() );
|
||||
|
||||
m_AttributsCtrl->SetItemToolTip( 0, _( "Use this attribute for most non SMD footprints\n"
|
||||
"Footprints with this option are not put in the footprint position list file" ) );
|
||||
m_AttributsCtrl->SetItemToolTip( 1, _( "Use this attribute for SMD footprints.\n"
|
||||
"Only footprints with this option are put in the footprint position list file" ) );
|
||||
m_AttributsCtrl->SetItemToolTip( 2, _( "Use this attribute for \"virtual\" footprints drawn on board\n"
|
||||
"such as an edge connector (old ISA PC bus for instance)" ) );
|
||||
if( m_footprint->GetAttributes() & MOD_THROUGH_HOLE )
|
||||
m_componentType->SetSelection( 0 );
|
||||
else if( m_footprint->GetAttributes() & MOD_SMD )
|
||||
m_componentType->SetSelection( 1 );
|
||||
else
|
||||
m_componentType->SetSelection( 2 );
|
||||
|
||||
switch( m_footprint->GetAttributes() & 255 )
|
||||
{
|
||||
case MOD_CMS: m_AttributsCtrl->SetSelection( 1 ); break;
|
||||
case MOD_VIRTUAL: m_AttributsCtrl->SetSelection( 2 ); break;
|
||||
case 0:
|
||||
default: m_AttributsCtrl->SetSelection( 0 ); break;
|
||||
}
|
||||
m_boardOnly->SetValue( m_footprint->GetAttributes() & MOD_BOARD_ONLY );
|
||||
m_excludeFromPosFiles->SetValue( m_footprint->GetAttributes() & MOD_EXCLUDE_FROM_POS_FILES );
|
||||
m_excludeFromBOM->SetValue( m_footprint->GetAttributes() & MOD_EXCLUDE_FROM_BOM );
|
||||
|
||||
// Local Clearances
|
||||
|
||||
|
@ -640,14 +636,26 @@ bool DIALOG_FOOTPRINT_FP_EDITOR::TransferDataFromWindow()
|
|||
|
||||
m_footprint->SetLocked( m_AutoPlaceCtrl->GetSelection() == 1 );
|
||||
|
||||
switch( m_AttributsCtrl->GetSelection() )
|
||||
int attributes = 0;
|
||||
|
||||
switch( m_componentType->GetSelection() )
|
||||
{
|
||||
case 0: m_footprint->SetAttributes( 0 ); break;
|
||||
case 1: m_footprint->SetAttributes( MOD_CMS ); break;
|
||||
case 2: m_footprint->SetAttributes( MOD_VIRTUAL ); break;
|
||||
default: wxFAIL;
|
||||
case 0: attributes |= MOD_THROUGH_HOLE; break;
|
||||
case 1: attributes |= MOD_SMD; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if( m_boardOnly->GetValue() )
|
||||
attributes |= MOD_BOARD_ONLY;
|
||||
|
||||
if( m_excludeFromPosFiles->GetValue() )
|
||||
attributes |= MOD_EXCLUDE_FROM_POS_FILES;
|
||||
|
||||
if( m_excludeFromBOM->GetValue() )
|
||||
attributes |= MOD_EXCLUDE_FROM_BOM;
|
||||
|
||||
m_footprint->SetAttributes( attributes );
|
||||
|
||||
m_footprint->SetPlacementCost90( m_CostRot90Ctrl->GetValue() );
|
||||
m_footprint->SetPlacementCost180( m_CostRot180Ctrl->GetValue() );
|
||||
|
||||
|
@ -673,18 +681,10 @@ bool DIALOG_FOOTPRINT_FP_EDITOR::TransferDataFromWindow()
|
|||
switch( m_ZoneConnectionChoice->GetSelection() )
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
m_footprint->SetZoneConnection( ZONE_CONNECTION::INHERITED );
|
||||
break;
|
||||
case 1:
|
||||
m_footprint->SetZoneConnection( ZONE_CONNECTION::FULL );
|
||||
break;
|
||||
case 2:
|
||||
m_footprint->SetZoneConnection( ZONE_CONNECTION::THERMAL );
|
||||
break;
|
||||
case 3:
|
||||
m_footprint->SetZoneConnection( ZONE_CONNECTION::NONE );
|
||||
break;
|
||||
case 0: m_footprint->SetZoneConnection( ZONE_CONNECTION::INHERITED ); break;
|
||||
case 1: m_footprint->SetZoneConnection( ZONE_CONNECTION::FULL ); break;
|
||||
case 2: m_footprint->SetZoneConnection( ZONE_CONNECTION::THERMAL ); break;
|
||||
case 3: m_footprint->SetZoneConnection( ZONE_CONNECTION::NONE ); break;
|
||||
}
|
||||
|
||||
std::list<MODULE_3D_SETTINGS>* draw3D = &m_footprint->Models();
|
||||
|
|
|
@ -172,13 +172,38 @@ DIALOG_FOOTPRINT_FP_EDITOR_BASE::DIALOG_FOOTPRINT_FP_EDITOR_BASE( wxWindow* pare
|
|||
m_sizerAP->Add( m_sizerAllow180, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerProperties->Add( m_sizerAP, 1, wxEXPAND|wxTOP, 5 );
|
||||
bSizerProperties->Add( m_sizerAP, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxString m_AttributsCtrlChoices[] = { _("Through hole"), _("Surface mount"), _("Virtual") };
|
||||
int m_AttributsCtrlNChoices = sizeof( m_AttributsCtrlChoices ) / sizeof( wxString );
|
||||
m_AttributsCtrl = new wxRadioBox( m_PanelGeneral, wxID_ANY, _("Fabrication Attributes"), wxDefaultPosition, wxDefaultSize, m_AttributsCtrlNChoices, m_AttributsCtrlChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_AttributsCtrl->SetSelection( 1 );
|
||||
bSizerProperties->Add( m_AttributsCtrl, 1, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
wxStaticBoxSizer* sbFabSizer;
|
||||
sbFabSizer = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Fabrication Attributes") ), wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bPartTypeSizer;
|
||||
bPartTypeSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_componentTypeLabel = new wxStaticText( sbFabSizer->GetStaticBox(), wxID_ANY, _("Component:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_componentTypeLabel->Wrap( -1 );
|
||||
bPartTypeSizer->Add( m_componentTypeLabel, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
wxString m_componentTypeChoices[] = { _("Through hole"), _("SMD"), _("Other") };
|
||||
int m_componentTypeNChoices = sizeof( m_componentTypeChoices ) / sizeof( wxString );
|
||||
m_componentType = new wxChoice( sbFabSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_componentTypeNChoices, m_componentTypeChoices, 0 );
|
||||
m_componentType->SetSelection( 0 );
|
||||
bPartTypeSizer->Add( m_componentType, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
sbFabSizer->Add( bPartTypeSizer, 0, wxEXPAND, 5 );
|
||||
|
||||
m_boardOnly = new wxCheckBox( sbFabSizer->GetStaticBox(), wxID_ANY, _("Not in schematic"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbFabSizer->Add( m_boardOnly, 0, wxALL, 5 );
|
||||
|
||||
m_excludeFromPosFiles = new wxCheckBox( sbFabSizer->GetStaticBox(), wxID_ANY, _("Exclude from position files"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbFabSizer->Add( m_excludeFromPosFiles, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_excludeFromBOM = new wxCheckBox( sbFabSizer->GetStaticBox(), wxID_ANY, _("Exclude from BOM"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
sbFabSizer->Add( m_excludeFromBOM, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerProperties->Add( sbFabSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
m_PanelPropertiesBoxSizer->Add( bSizerProperties, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
|
|
@ -918,7 +918,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxTOP</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
|
@ -1214,70 +1214,346 @@
|
|||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxRadioBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Through hole" "Surface mount" "Virtual"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Fabrication Attributes</property>
|
||||
<property name="majorDimension">1</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_AttributsCtrl</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">1</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxRA_SPECIFY_COLS</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="name">sbFabSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="parent">1</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bPartTypeSizer</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Component:</property>
|
||||
<property name="markup">0</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_componentTypeLabel</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxChoice" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Through hole" "SMD" "Other"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_componentType</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Not in schematic</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_boardOnly</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Exclude from position files</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_excludeFromPosFiles</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Exclude from BOM</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_excludeFromBOM</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -31,8 +31,9 @@ class WX_GRID;
|
|||
#include <wx/textctrl.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/slider.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
|
@ -66,7 +67,11 @@ class DIALOG_FOOTPRINT_FP_EDITOR_BASE : public DIALOG_SHIM
|
|||
wxBoxSizer* m_sizerAllow180;
|
||||
wxStaticText* m_allow180Label;
|
||||
wxSlider* m_CostRot180Ctrl;
|
||||
wxRadioBox* m_AttributsCtrl;
|
||||
wxStaticText* m_componentTypeLabel;
|
||||
wxChoice* m_componentType;
|
||||
wxCheckBox* m_boardOnly;
|
||||
wxCheckBox* m_excludeFromPosFiles;
|
||||
wxCheckBox* m_excludeFromBOM;
|
||||
wxPanel* m_PanelClearances;
|
||||
wxStaticText* m_staticTextInfo;
|
||||
wxStaticText* m_staticTextInfoValPos;
|
||||
|
|
|
@ -51,10 +51,11 @@ int g_matchModeForUpdateSelected = ID_MATCH_FP_SELECTED;
|
|||
int g_matchModeForExchange = ID_MATCH_FP_REF;
|
||||
int g_matchModeForExchangeSelected = ID_MATCH_FP_SELECTED;
|
||||
|
||||
bool g_removeExtraTextItems = false;
|
||||
bool g_resetTextItemLayers = false;
|
||||
bool g_resetTextItemEffects = false;
|
||||
bool g_reset3DModels = false;
|
||||
bool g_removeExtraTextItems = false;
|
||||
bool g_resetTextItemLayers = false;
|
||||
bool g_resetTextItemEffects = false;
|
||||
bool g_resetFabricationAttrs = false;
|
||||
bool g_reset3DModels = false;
|
||||
|
||||
|
||||
DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent, MODULE* aModule,
|
||||
|
@ -139,6 +140,7 @@ DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent,
|
|||
m_removeExtraBox->SetValue( g_removeExtraTextItems );
|
||||
m_resetTextItemLayers->SetValue( g_resetTextItemLayers );
|
||||
m_resetTextItemEffects->SetValue( g_resetTextItemEffects );
|
||||
m_resetFabricationAttrs->SetValue( g_resetFabricationAttrs );
|
||||
m_reset3DModels->SetValue( g_reset3DModels );
|
||||
|
||||
m_MessageWindow->SetLazyUpdate( true );
|
||||
|
@ -163,6 +165,7 @@ DIALOG_EXCHANGE_FOOTPRINTS::~DIALOG_EXCHANGE_FOOTPRINTS()
|
|||
g_removeExtraTextItems = m_removeExtraBox->GetValue();
|
||||
g_resetTextItemLayers = m_resetTextItemLayers->GetValue();
|
||||
g_resetTextItemEffects = m_resetTextItemEffects->GetValue();
|
||||
g_resetFabricationAttrs = m_resetFabricationAttrs->GetValue();
|
||||
g_reset3DModels = m_reset3DModels->GetValue();
|
||||
}
|
||||
|
||||
|
@ -374,6 +377,7 @@ bool DIALOG_EXCHANGE_FOOTPRINTS::processModule( MODULE* aModule, const LIB_ID& a
|
|||
m_removeExtraBox->GetValue(),
|
||||
m_resetTextItemLayers->GetValue(),
|
||||
m_resetTextItemEffects->GetValue(),
|
||||
m_resetFabricationAttrs->GetValue(),
|
||||
m_reset3DModels->GetValue() );
|
||||
|
||||
if( aModule == m_currentModule )
|
||||
|
@ -458,7 +462,8 @@ TEXTE_MODULE* getMatchingTextItem( TEXTE_MODULE* aRefItem, MODULE* aModule )
|
|||
|
||||
void PCB_EDIT_FRAME::Exchange_Module( MODULE* aSrc, MODULE* aDest, BOARD_COMMIT& aCommit,
|
||||
bool deleteExtraTexts, bool resetTextLayers,
|
||||
bool resetTextEffects, bool reset3DModels )
|
||||
bool resetTextEffects, bool resetFabricationAttrs,
|
||||
bool reset3DModels )
|
||||
{
|
||||
aDest->SetParent( GetBoard() );
|
||||
|
||||
|
@ -517,6 +522,9 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aSrc, MODULE* aDest, BOARD_COMMIT&
|
|||
}
|
||||
}
|
||||
|
||||
if( !resetFabricationAttrs )
|
||||
aDest->SetAttributes( aSrc->GetAttributes() );
|
||||
|
||||
// Copy 3D model settings in accordance with the reset* flag
|
||||
if( !reset3DModels )
|
||||
aDest->Models() = aSrc->Models(); // Linked list of 3D models.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -104,6 +104,9 @@ DIALOG_EXCHANGE_FOOTPRINTS_BASE::DIALOG_EXCHANGE_FOOTPRINTS_BASE( wxWindow* pare
|
|||
m_resetTextItemEffects = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset text sizes, styles and positions"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_updateOptionsSizer->Add( m_resetTextItemEffects, 0, wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_resetFabricationAttrs = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset fabrication attributes"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_updateOptionsSizer->Add( m_resetFabricationAttrs, 0, wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
m_reset3DModels = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset 3D models"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_updateOptionsSizer->Add( m_reset3DModels, 0, wxBOTTOM|wxRIGHT, 5 );
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
<property name="file">dialog_exchange_footprints_base</property>
|
||||
<property name="first_id">4200</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="image_path_wrapper_function_name"></property>
|
||||
<property name="indent_with_spaces"></property>
|
||||
<property name="internationalize">1</property>
|
||||
<property name="name">dialog_exchange_footprints_base</property>
|
||||
|
@ -26,7 +25,6 @@
|
|||
<property name="skip_php_events">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="ui_table">UI</property>
|
||||
<property name="use_array_enum">0</property>
|
||||
<property name="use_enum">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
|
@ -644,7 +642,6 @@
|
|||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
|
@ -921,7 +918,6 @@
|
|||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="auth_needed">0</property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="bitmap"></property>
|
||||
|
@ -1190,6 +1186,70 @@
|
|||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Reset fabrication attributes</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_resetFabricationAttrs</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020)
|
||||
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
|
@ -63,6 +63,7 @@ class DIALOG_EXCHANGE_FOOTPRINTS_BASE : public DIALOG_SHIM
|
|||
wxCheckBox* m_removeExtraBox;
|
||||
wxCheckBox* m_resetTextItemLayers;
|
||||
wxCheckBox* m_resetTextItemEffects;
|
||||
wxCheckBox* m_resetFabricationAttrs;
|
||||
wxCheckBox* m_reset3DModels;
|
||||
WX_HTML_REPORT_PANEL* m_MessageWindow;
|
||||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
|
|
|
@ -73,8 +73,8 @@ DIALOG_GEN_FOOTPRINT_POSITION_BASE::DIALOG_GEN_FOOTPRINT_POSITION_BASE( wxWindow
|
|||
wxBoxSizer* bSizerLower;
|
||||
bSizerLower = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_forceSMDOpt = new wxCheckBox( this, wxID_ANY, _("Include footprints with SMD pads even if not marked Surface Mount"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerLower->Add( m_forceSMDOpt, 0, wxALL, 5 );
|
||||
m_excludeTH = new wxCheckBox( this, wxID_ANY, _("Exclude all footprints with through hole pads"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerLower->Add( m_excludeTH, 0, wxALL, 5 );
|
||||
|
||||
m_cbIncludeBoardEdge = new wxCheckBox( this, wxID_ANY, _("Include board edge layer"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerLower->Add( m_cbIncludeBoardEdge, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
@ -110,7 +110,7 @@ DIALOG_GEN_FOOTPRINT_POSITION_BASE::DIALOG_GEN_FOOTPRINT_POSITION_BASE( wxWindow
|
|||
m_rbFormat->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onSelectFormat ), NULL, this );
|
||||
m_radioBoxUnits->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIUnits ), NULL, this );
|
||||
m_radioBoxFilesCount->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIFileOpt ), NULL, this );
|
||||
m_forceSMDOpt->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIforceSMDOpt ), NULL, this );
|
||||
m_excludeTH->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
|
||||
m_cbIncludeBoardEdge->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIincludeBoardEdge ), NULL, this );
|
||||
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnGenerate ), NULL, this );
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ DIALOG_GEN_FOOTPRINT_POSITION_BASE::~DIALOG_GEN_FOOTPRINT_POSITION_BASE()
|
|||
m_rbFormat->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onSelectFormat ), NULL, this );
|
||||
m_radioBoxUnits->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIUnits ), NULL, this );
|
||||
m_radioBoxFilesCount->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIFileOpt ), NULL, this );
|
||||
m_forceSMDOpt->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIforceSMDOpt ), NULL, this );
|
||||
m_excludeTH->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
|
||||
m_cbIncludeBoardEdge->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIincludeBoardEdge ), NULL, this );
|
||||
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnGenerate ), NULL, this );
|
||||
|
||||
|
|
|
@ -532,7 +532,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Include footprints with SMD pads even if not marked Surface Mount</property>
|
||||
<property name="label">Exclude all footprints with through hole pads</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -540,7 +540,7 @@
|
|||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_forceSMDOpt</property>
|
||||
<property name="name">m_excludeTH</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
|
@ -561,7 +561,7 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnUpdateUI">onUpdateUIforceSMDOpt</event>
|
||||
<event name="OnUpdateUI">onUpdateUIExcludeTH</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
|
|
|
@ -49,7 +49,7 @@ class DIALOG_GEN_FOOTPRINT_POSITION_BASE : public DIALOG_SHIM
|
|||
wxRadioBox* m_rbFormat;
|
||||
wxRadioBox* m_radioBoxUnits;
|
||||
wxRadioBox* m_radioBoxFilesCount;
|
||||
wxCheckBox* m_forceSMDOpt;
|
||||
wxCheckBox* m_excludeTH;
|
||||
wxCheckBox* m_cbIncludeBoardEdge;
|
||||
WX_HTML_REPORT_PANEL* m_messagesPanel;
|
||||
wxStaticLine* m_staticline;
|
||||
|
@ -62,7 +62,7 @@ class DIALOG_GEN_FOOTPRINT_POSITION_BASE : public DIALOG_SHIM
|
|||
virtual void onSelectFormat( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onUpdateUIUnits( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void onUpdateUIFileOpt( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void onUpdateUIforceSMDOpt( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void onUpdateUIExcludeTH( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void onUpdateUIincludeBoardEdge( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnGenerate( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
|
|
@ -289,7 +289,6 @@ void DIALOG_NETLIST::loadNetlist( bool aDryRun )
|
|||
|
||||
NETLIST netlist;
|
||||
|
||||
netlist.SetDeleteExtraFootprints( m_cbDeleteExtraFootprints->GetValue() );
|
||||
netlist.SetFindByTimeStamp( m_matchByUUID );
|
||||
netlist.SetReplaceFootprints( m_cbUpdateFootprints->GetValue() );
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ DIALOG_NETLIST_BASE::DIALOG_NETLIST_BASE( wxWindow* parent, wxWindowID id, const
|
|||
bSizerNetlistFilename->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 2 );
|
||||
|
||||
|
||||
bMainSizer->Add( bSizerNetlistFilename, 0, wxALL|wxEXPAND, 5 );
|
||||
bMainSizer->Add( bSizerNetlistFilename, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
|
||||
|
||||
wxBoxSizer* bUpperSizer;
|
||||
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
@ -72,7 +72,7 @@ DIALOG_NETLIST_BASE::DIALOG_NETLIST_BASE( wxWindow* parent, wxWindowID id, const
|
|||
bUpperSizer->Add( sbSizer1, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bLowerSizer;
|
||||
bLowerSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
@ -89,7 +89,7 @@ DIALOG_NETLIST_BASE::DIALOG_NETLIST_BASE( wxWindow* parent, wxWindowID id, const
|
|||
m_buttonFPTest = new wxButton( this, ID_TEST_NETLIST, _("Test Footprints"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_buttonFPTest->SetToolTip( _("Read the current netlist file and list missing and extra footprints") );
|
||||
|
||||
m_buttonsSizer->Add( m_buttonFPTest, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
m_buttonsSizer->Add( m_buttonFPTest, 0, wxEXPAND|wxLEFT|wxRIGHT, 10 );
|
||||
|
||||
m_sdbSizer1 = new wxStdDialogButtonSizer();
|
||||
m_sdbSizer1OK = new wxButton( this, wxID_OK );
|
||||
|
@ -103,7 +103,7 @@ DIALOG_NETLIST_BASE::DIALOG_NETLIST_BASE( wxWindow* parent, wxWindowID id, const
|
|||
m_buttonsSizer->Add( m_sdbSizer1, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( m_buttonsSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
|
||||
bMainSizer->Add( m_buttonsSizer, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bMainSizer );
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -270,7 +270,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -755,7 +755,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxTOP</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -763,7 +763,7 @@
|
|||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">protected</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="border">10</property>
|
||||
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="0">
|
||||
|
|
|
@ -111,7 +111,6 @@ void DIALOG_UPDATE_PCB::PerformUpdate( bool aDryRun )
|
|||
|
||||
m_runDragCommand = false;
|
||||
|
||||
m_netlist->SetDeleteExtraFootprints( m_cbDeleteExtraFootprints->GetValue() );
|
||||
m_netlist->SetFindByTimeStamp( !m_cbRelinkFootprints->GetValue() );
|
||||
m_netlist->SetReplaceFootprints( m_cbUpdateFootprints->GetValue() );
|
||||
|
||||
|
|
|
@ -70,14 +70,13 @@ enum SELECT_SIDE
|
|||
PCB_BOTH_SIDES
|
||||
};
|
||||
|
||||
PLACE_FILE_EXPORTER::PLACE_FILE_EXPORTER( BOARD* aBoard, bool aUnitsMM,
|
||||
bool aForceSmdItems, bool aTopSide,
|
||||
bool aBottomSide, bool aFormatCSV )
|
||||
PLACE_FILE_EXPORTER::PLACE_FILE_EXPORTER( BOARD* aBoard, bool aUnitsMM, bool aExcludeAllTH,
|
||||
bool aTopSide, bool aBottomSide, bool aFormatCSV )
|
||||
{
|
||||
m_board = aBoard;
|
||||
m_unitsMM = aUnitsMM;
|
||||
m_forceSmdItems = aForceSmdItems;
|
||||
m_fpCount = 0;
|
||||
m_board = aBoard;
|
||||
m_unitsMM = aUnitsMM;
|
||||
m_excludeAllTH = aExcludeAllTH;
|
||||
m_fpCount = 0;
|
||||
|
||||
if( aTopSide && aBottomSide )
|
||||
m_side = PCB_BOTH_SIDES;
|
||||
|
@ -114,7 +113,6 @@ std::string PLACE_FILE_EXPORTER::GenPositionData()
|
|||
|
||||
// Build and sort the list of footprints alphabetically
|
||||
std::vector<LIST_MOD> list;
|
||||
m_smdFootprintsNotLabeledSMD.clear();
|
||||
|
||||
for( MODULE* footprint : m_board->Modules() )
|
||||
{
|
||||
|
@ -126,26 +124,11 @@ std::string PLACE_FILE_EXPORTER::GenPositionData()
|
|||
continue;
|
||||
}
|
||||
|
||||
if( footprint->GetAttributes() & MOD_VIRTUAL )
|
||||
continue;
|
||||
if( footprint->GetAttributes() & MOD_EXCLUDE_FROM_POS_FILES )
|
||||
continue;
|
||||
|
||||
if( ( footprint->GetAttributes() & MOD_CMS ) == 0 )
|
||||
{
|
||||
if( m_forceSmdItems ) // true to fix a bunch of mis-labeled footprints:
|
||||
{
|
||||
if( !footprint->HasNonSMDPins() )
|
||||
{
|
||||
// all footprint's pins are SMD, mark the part for pick and place
|
||||
// Note: they are not necessary to pick and place,
|
||||
// but the probability is high
|
||||
m_smdFootprintsNotLabeledSMD.push_back( footprint );
|
||||
}
|
||||
else
|
||||
continue;
|
||||
}
|
||||
else
|
||||
continue;
|
||||
}
|
||||
if( m_excludeAllTH && footprint->HasThroughHolePads() )
|
||||
continue;
|
||||
|
||||
m_fpCount++;
|
||||
|
||||
|
@ -346,13 +329,13 @@ std::string PLACE_FILE_EXPORTER::GenReportData()
|
|||
|
||||
buffer += "attribut";
|
||||
|
||||
if( module->GetAttributes() & MOD_VIRTUAL )
|
||||
if( ( module->GetAttributes() & ( MOD_THROUGH_HOLE | MOD_SMD ) ) == 0 )
|
||||
buffer += " virtual";
|
||||
|
||||
if( module->GetAttributes() & MOD_CMS )
|
||||
if( module->GetAttributes() & MOD_SMD )
|
||||
buffer += " smd";
|
||||
|
||||
if(( module->GetAttributes() & ( MOD_VIRTUAL | MOD_CMS) ) == 0 )
|
||||
if( module->GetAttributes() & MOD_THROUGH_HOLE )
|
||||
buffer += " none";
|
||||
|
||||
buffer += "\n";
|
||||
|
|
|
@ -82,36 +82,19 @@ public:
|
|||
*/
|
||||
int GetFootprintCount() { return m_fpCount; }
|
||||
|
||||
/**
|
||||
* @return the list of not virtual footprints with MOD_CMS flag not set
|
||||
* but having only smd pads.
|
||||
* This list can be used to force this flag.
|
||||
* it is filled only if forceSmdItems is true
|
||||
*/
|
||||
std::vector<MODULE*>& GetSmdFootprintsNotLabeledSMD()
|
||||
{
|
||||
return m_smdFootprintsNotLabeledSMD;
|
||||
}
|
||||
|
||||
// Use standard board side name. do not translate them,
|
||||
// they are keywords in place file
|
||||
static std::string GetFrontSideName() { return std::string( "top" ); }
|
||||
static std::string GetBackSideName() { return std::string( "bottom" ); }
|
||||
|
||||
private:
|
||||
BOARD* m_board;
|
||||
bool m_unitsMM; // true for mm, false for inches
|
||||
bool m_forceSmdItems; // If true, non virtual fp with the flag MOD_CMD not set but
|
||||
// having only smd pads will be in list
|
||||
// and will be added in m_smdFootprintsNotLabeledSMD
|
||||
int m_side; // PCB_BACK_SIDE, PCB_FRONT_SIDE, PCB_BOTH_SIDES
|
||||
bool m_formatCSV; // true for csv format, false for ascii (utf8) format
|
||||
int m_fpCount; // Number of footprints in list, for info
|
||||
wxPoint m_place_Offset; // Offset for coordinates in generated data.
|
||||
|
||||
// A list of footprints with MOD_CMS flag not set but having only smd pads.
|
||||
// This list can be used to force this flag.
|
||||
std::vector<MODULE*> m_smdFootprintsNotLabeledSMD;
|
||||
BOARD* m_board;
|
||||
bool m_unitsMM; // true for mm, false for inches
|
||||
bool m_excludeAllTH; // Exclude any footprints with through-hole pads
|
||||
int m_side; // PCB_BACK_SIDE, PCB_FRONT_SIDE, PCB_BOTH_SIDES
|
||||
bool m_formatCSV; // true for csv format, false for ascii (utf8) format
|
||||
int m_fpCount; // Number of footprints in list, for info
|
||||
wxPoint m_place_Offset; // Offset for coordinates in generated data.
|
||||
};
|
||||
|
||||
#endif // #ifndef EXPORT_FOOTPRINTS_PLACEFILE_H
|
||||
|
|
|
@ -1085,17 +1085,6 @@ static void CreateDevicesSection( FILE* aFile, BOARD* aPcb )
|
|||
fprintf( aFile, "\nDEVICE \"DEV_%s\"\n", TO_UTF8( escapeString( shapeName ) ) );
|
||||
fprintf( aFile, "PART \"%s\"\n", TO_UTF8( escapeString( module->GetValue() ) ) );
|
||||
fprintf( aFile, "PACKAGE \"%s\"\n", TO_UTF8( escapeString( module->GetFPID().Format() ) ) );
|
||||
|
||||
// The TYPE attribute is almost freeform
|
||||
const char* ty = "TH";
|
||||
|
||||
if( module->GetAttributes() & MOD_CMS )
|
||||
ty = "SMD";
|
||||
|
||||
if( module->GetAttributes() & MOD_VIRTUAL )
|
||||
ty = "VIRTUAL";
|
||||
|
||||
fprintf( aFile, "TYPE %s\n", ty );
|
||||
}
|
||||
|
||||
fputs( "$ENDDEVICES\n\n", aFile );
|
||||
|
@ -1170,38 +1159,10 @@ static void FootprintWriteShape( FILE* aFile, MODULE* module, const wxString& aS
|
|||
/* creates header: */
|
||||
fprintf( aFile, "\nSHAPE \"%s\"\n", TO_UTF8( escapeString( aShapeName ) ) );
|
||||
|
||||
if( module->GetAttributes() & MOD_VIRTUAL )
|
||||
{
|
||||
fprintf( aFile, "INSERT SMD\n" );
|
||||
}
|
||||
if( module->GetAttributes() & MOD_THROUGH_HOLE )
|
||||
fprintf( aFile, "INSERT TH\n" );
|
||||
else
|
||||
{
|
||||
if( module->GetAttributes() & MOD_CMS )
|
||||
{
|
||||
fprintf( aFile, "INSERT SMD\n" );
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf( aFile, "INSERT TH\n" );
|
||||
}
|
||||
}
|
||||
|
||||
#if 0 /* ATTRIBUTE name and value is unspecified and the original exporter
|
||||
* got the syntax wrong, so CAM350 rejected the whole shape! */
|
||||
|
||||
if( module->m_Attributs != MOD_DEFAULT )
|
||||
{
|
||||
fprintf( aFile, "ATTRIBUTE" );
|
||||
|
||||
if( module->m_Attributs & MOD_CMS )
|
||||
fprintf( aFile, " PAD_SMD" );
|
||||
|
||||
if( module->m_Attributs & MOD_VIRTUAL )
|
||||
fprintf( aFile, " VIRTUAL" );
|
||||
|
||||
fprintf( aFile, "\n" );
|
||||
}
|
||||
#endif
|
||||
fprintf( aFile, "INSERT SMD\n" );
|
||||
|
||||
// Silk outline; wildly interpreted by various importers:
|
||||
// CAM350 read it right but only closed shapes
|
||||
|
|
|
@ -98,9 +98,17 @@ private:
|
|||
m_radioBoxFilesCount->Enable( m_rbFormat->GetSelection() != 2 );
|
||||
}
|
||||
|
||||
void onUpdateUIforceSMDOpt( wxUpdateUIEvent& event ) override
|
||||
void onUpdateUIExcludeTH( wxUpdateUIEvent& event ) override
|
||||
{
|
||||
m_forceSMDOpt->Enable( m_rbFormat->GetSelection() != 2 );
|
||||
if( m_rbFormat->GetSelection() == 2 )
|
||||
{
|
||||
m_excludeTH->SetValue( false );
|
||||
m_excludeTH->Enable( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_excludeTH->Enable( true );
|
||||
}
|
||||
}
|
||||
|
||||
void onUpdateUIincludeBoardEdge( wxUpdateUIEvent& event ) override
|
||||
|
@ -127,9 +135,9 @@ private:
|
|||
return m_radioBoxFilesCount->GetSelection() == 1;
|
||||
}
|
||||
|
||||
bool ForceAllSmd()
|
||||
bool ExcludeAllTH()
|
||||
{
|
||||
return m_forceSMDOpt->GetValue();
|
||||
return m_excludeTH->GetValue();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -317,30 +325,17 @@ bool DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles()
|
|||
int top_side = true;
|
||||
int bottom_side = true;
|
||||
|
||||
// Test for any footprint candidate in list, and display the list of forced footprints
|
||||
// if ForceAllSmd() is true
|
||||
// Test for any footprint candidate in list.
|
||||
{
|
||||
PLACE_FILE_EXPORTER exporter( brd, UnitsMM(), ForceAllSmd(), top_side, bottom_side,
|
||||
PLACE_FILE_EXPORTER exporter( brd, UnitsMM(), ExcludeAllTH(), top_side, bottom_side,
|
||||
useCSVfmt );
|
||||
exporter.GenPositionData();
|
||||
|
||||
if( exporter.GetFootprintCount() == 0)
|
||||
if( exporter.GetFootprintCount() == 0 )
|
||||
{
|
||||
wxMessageBox( _( "No footprint for automated placement." ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
if( ForceAllSmd() )
|
||||
{
|
||||
std::vector<MODULE*>& fp_no_smd_list = exporter.GetSmdFootprintsNotLabeledSMD();
|
||||
|
||||
for( MODULE* item : fp_no_smd_list )
|
||||
{
|
||||
msg.Printf( _( "footprint %s (not set as SMD) forced in list" ),
|
||||
item->GetReference() );
|
||||
m_reporter->Report( msg, RPT_SEVERITY_INFO );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create output directory if it does not exist.
|
||||
|
@ -384,8 +379,8 @@ bool DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles()
|
|||
fn.SetExt( FootprintPlaceFileExtension );
|
||||
|
||||
int fpcount = m_parent->DoGenFootprintsPositionFile( fn.GetFullPath(), UnitsMM(),
|
||||
ForceAllSmd(),
|
||||
top_side, bottom_side, useCSVfmt );
|
||||
ExcludeAllTH(), top_side, bottom_side,
|
||||
useCSVfmt );
|
||||
if( fpcount < 0 )
|
||||
{
|
||||
msg.Printf( _( "Unable to create \"%s\"." ), fn.GetFullPath() );
|
||||
|
@ -426,8 +421,8 @@ bool DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles()
|
|||
else
|
||||
fn.SetExt( FootprintPlaceFileExtension );
|
||||
|
||||
fpcount = m_parent->DoGenFootprintsPositionFile( fn.GetFullPath(), UnitsMM(),
|
||||
ForceAllSmd(), top_side, bottom_side, useCSVfmt );
|
||||
fpcount = m_parent->DoGenFootprintsPositionFile( fn.GetFullPath(), UnitsMM(), ExcludeAllTH(),
|
||||
top_side, bottom_side, useCSVfmt );
|
||||
|
||||
if( fpcount < 0 )
|
||||
{
|
||||
|
@ -547,7 +542,7 @@ bool PCB_EDIT_FRAME::DoGenFootprintsReport( const wxString& aFullFilename, bool
|
|||
return false;
|
||||
|
||||
std::string data;
|
||||
PLACE_FILE_EXPORTER exporter ( GetBoard(), aUnitsMM, false, true, true, false );
|
||||
PLACE_FILE_EXPORTER exporter( GetBoard(), aUnitsMM, false, true, true, false );
|
||||
data = exporter.GenReportData();
|
||||
|
||||
fputs( data.c_str(), rptfile );
|
||||
|
|
|
@ -70,7 +70,7 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename, PCB_LAYER
|
|||
|
||||
for( MODULE* footprint : m_pcb->Modules() )
|
||||
{
|
||||
if( footprint->GetAttributes() & MOD_VIRTUAL )
|
||||
if( footprint->GetAttributes() & MOD_EXCLUDE_FROM_POS_FILES )
|
||||
continue;
|
||||
|
||||
if( footprint->GetLayer() == aLayer )
|
||||
|
@ -145,17 +145,12 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename, PCB_LAYER
|
|||
// Add rotation info (rotation is CCW, in degrees):
|
||||
pnpAttrib.m_Orientation = mapRotationAngle( footprint->GetOrientationDegrees() );
|
||||
|
||||
// Add component type info (SMD or Through Hole):
|
||||
bool is_smd_mount = footprint->GetAttributes() & MOD_CMS;
|
||||
pnpAttrib.m_MountType = GBR_CMP_PNP_METADATA::MOUNT_TYPE_UNSPECIFIED;
|
||||
|
||||
// Smd footprints can have through holes (thermal vias).
|
||||
// but if a footprint is not set as SMD, it will be set as SMD
|
||||
// if it does not have through hole pads
|
||||
if( !is_smd_mount && !footprint->HasNonSMDPins() )
|
||||
is_smd_mount = true;
|
||||
|
||||
pnpAttrib.m_MountType = is_smd_mount ? GBR_CMP_PNP_METADATA::MOUNT_TYPE_SMD
|
||||
: GBR_CMP_PNP_METADATA::MOUNT_TYPE_TH;
|
||||
if( footprint->GetAttributes() & MOD_THROUGH_HOLE )
|
||||
pnpAttrib.m_MountType = GBR_CMP_PNP_METADATA::MOUNT_TYPE_TH;
|
||||
else if( footprint->GetAttributes() & MOD_SMD )
|
||||
pnpAttrib.m_MountType = GBR_CMP_PNP_METADATA::MOUNT_TYPE_SMD;
|
||||
|
||||
// Add component value info:
|
||||
pnpAttrib.m_Value = ConvertNotAllowedCharsInGerber( footprint->Value().GetShownText(),
|
||||
|
|
|
@ -1011,15 +1011,24 @@ void PCB_IO::format( MODULE* aModule, int aNestLevel ) const
|
|||
FormatInternalUnits( aModule->GetThermalGap() ).c_str() );
|
||||
|
||||
// Attributes
|
||||
if( aModule->GetAttributes() != MOD_DEFAULT )
|
||||
if( aModule->GetAttributes() )
|
||||
{
|
||||
m_out->Print( aNestLevel+1, "(attr" );
|
||||
|
||||
if( aModule->GetAttributes() & MOD_CMS )
|
||||
if( aModule->GetAttributes() & MOD_SMD )
|
||||
m_out->Print( 0, " smd" );
|
||||
|
||||
if( aModule->GetAttributes() & MOD_VIRTUAL )
|
||||
m_out->Print( 0, " virtual" );
|
||||
if( aModule->GetAttributes() & MOD_THROUGH_HOLE )
|
||||
m_out->Print( 0, " through_hole" );
|
||||
|
||||
if( aModule->GetAttributes() & MOD_BOARD_ONLY )
|
||||
m_out->Print( 0, " board_only" );
|
||||
|
||||
if( aModule->GetAttributes() & MOD_EXCLUDE_FROM_POS_FILES )
|
||||
m_out->Print( 0, " excude_from_pos_files" );
|
||||
|
||||
if( aModule->GetAttributes() & MOD_EXCLUDE_FROM_BOM )
|
||||
m_out->Print( 9, " exclude_from_bom" );
|
||||
|
||||
m_out->Print( 0, ")\n" );
|
||||
}
|
||||
|
|
|
@ -80,7 +80,8 @@ class TEXTE_PCB;
|
|||
//#define SEXPR_BOARD_FILE_VERSION 20200811 // Add groups
|
||||
//#define SEXPR_BOARD_FILE_VERSION 20200818 // Remove Status flag bitmap and setup counts
|
||||
//#define SEXPR_BOARD_FILE_VERSION 20200819 // Add board-level properties
|
||||
#define SEXPR_BOARD_FILE_VERSION 20200825 // Remove host information
|
||||
//#define SEXPR_BOARD_FILE_VERSION 20200825 // Remove host information
|
||||
#define SEXPR_BOARD_FILE_VERSION 20200828 // Add new fabrication attributes
|
||||
|
||||
#define BOARD_FILE_HOST_VERSION 20200825 ///< Earlier files than this include the host tag
|
||||
|
||||
|
|
|
@ -1295,15 +1295,16 @@ void LEGACY_PLUGIN::loadMODULE( MODULE* aModule )
|
|||
|
||||
else if( TESTLINE( "At" ) ) // (At)tributes of module
|
||||
{
|
||||
int attrs = MOD_DEFAULT;
|
||||
int attrs = 0;
|
||||
|
||||
data = line + SZ( "At" );
|
||||
|
||||
if( strstr( data, "SMD" ) )
|
||||
attrs |= MOD_CMS;
|
||||
|
||||
if( strstr( data, "VIRTUAL" ) )
|
||||
attrs |= MOD_VIRTUAL;
|
||||
attrs |= MOD_SMD;
|
||||
else if( strstr( data, "VIRTUAL" ) )
|
||||
attrs |= MOD_EXCLUDE_FROM_POS_FILES | MOD_EXCLUDE_FROM_BOM;
|
||||
else
|
||||
attrs |= MOD_THROUGH_HOLE | MOD_EXCLUDE_FROM_POS_FILES;
|
||||
|
||||
aModule->SetAttributes( attrs );
|
||||
}
|
||||
|
|
|
@ -417,7 +417,7 @@ MODULE* MICROWAVE_TOOL::createMicrowaveInductor( MICROWAVE_INDUCTOR_PATTERN& aIn
|
|||
MODULE* module = editFrame.CreateNewModule( msg );
|
||||
|
||||
module->SetFPID( LIB_ID( wxEmptyString, wxT( "mw_inductor" ) ) );
|
||||
module->SetAttributes( MOD_VIRTUAL | MOD_CMS );
|
||||
module->SetAttributes( MOD_EXCLUDE_FROM_POS_FILES | MOD_EXCLUDE_FROM_BOM );
|
||||
module->ClearFlags();
|
||||
module->SetPosition( aInductorPattern.m_End );
|
||||
|
||||
|
|
|
@ -307,6 +307,33 @@ bool BOARD_NETLIST_UPDATER::updateComponentParameters( MODULE* aPcbComponent,
|
|||
}
|
||||
}
|
||||
|
||||
if( ( aNewComponent->GetProperties().count( "exclude_from_bom" ) > 0 )
|
||||
!= ( ( aPcbComponent->GetAttributes() & MOD_EXCLUDE_FROM_BOM ) > 0 ) )
|
||||
{
|
||||
int attributes = aPcbComponent->GetAttributes();
|
||||
|
||||
if( aNewComponent->GetProperties().count( "exclude_from_bom" ) )
|
||||
{
|
||||
attributes |= MOD_EXCLUDE_FROM_BOM;
|
||||
msg.Printf( _( "Setting %s 'exclude from BOM' fabrication attribute." ),
|
||||
aPcbComponent->GetReference() );
|
||||
}
|
||||
else
|
||||
{
|
||||
attributes &= ~MOD_EXCLUDE_FROM_BOM;
|
||||
msg.Printf( _( "Removing %s 'exclude from BOM' fabrication attribute." ),
|
||||
aPcbComponent->GetReference() );
|
||||
}
|
||||
|
||||
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||
|
||||
if( !m_isDryRun )
|
||||
{
|
||||
changed = true;
|
||||
aPcbComponent->SetAttributes( attributes );
|
||||
}
|
||||
}
|
||||
|
||||
if( changed && copy )
|
||||
m_commit.Modified( aPcbComponent, copy );
|
||||
else
|
||||
|
@ -326,7 +353,7 @@ bool BOARD_NETLIST_UPDATER::updateComponentPadConnections( MODULE* aPcbComponent
|
|||
bool changed = false;
|
||||
|
||||
// At this point, the component footprint is updated. Now update the nets.
|
||||
for( auto pad : aPcbComponent->Pads() )
|
||||
for( D_PAD* pad : aPcbComponent->Pads() )
|
||||
{
|
||||
const COMPONENT_NET& net = aNewComponent->GetNet( pad->GetName() );
|
||||
|
||||
|
@ -418,17 +445,17 @@ bool BOARD_NETLIST_UPDATER::updateComponentPadConnections( MODULE* aPcbComponent
|
|||
m_oldToNewNets[ pad->GetNetname() ] = netName;
|
||||
|
||||
msg.Printf( _( "Reconnect %s pin %s from %s to %s."),
|
||||
aPcbComponent->GetReference(),
|
||||
pad->GetName(),
|
||||
UnescapeString( pad->GetNetname() ),
|
||||
UnescapeString( netName ) );
|
||||
aPcbComponent->GetReference(),
|
||||
pad->GetName(),
|
||||
UnescapeString( pad->GetNetname() ),
|
||||
UnescapeString( netName ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
msg.Printf( _( "Connect %s pin %s to %s."),
|
||||
aPcbComponent->GetReference(),
|
||||
pad->GetName(),
|
||||
UnescapeString( netName ) );
|
||||
aPcbComponent->GetReference(),
|
||||
pad->GetName(),
|
||||
UnescapeString( netName ) );
|
||||
}
|
||||
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||
|
||||
|
@ -481,7 +508,7 @@ bool BOARD_NETLIST_UPDATER::updateCopperZoneNets( NETLIST& aNetlist )
|
|||
}
|
||||
}
|
||||
|
||||
for( auto via : m_board->Tracks() )
|
||||
for( TRACK* via : m_board->Tracks() )
|
||||
{
|
||||
if( via->Type() != PCB_VIA_T )
|
||||
continue;
|
||||
|
@ -500,7 +527,8 @@ bool BOARD_NETLIST_UPDATER::updateCopperZoneNets( NETLIST& aNetlist )
|
|||
if( !updatedNetname.IsEmpty() )
|
||||
{
|
||||
msg.Printf( _( "Reconnect via from %s to %s." ),
|
||||
UnescapeString( via->GetNetname() ), UnescapeString( updatedNetname ) );
|
||||
UnescapeString( via->GetNetname() ),
|
||||
UnescapeString( updatedNetname ) );
|
||||
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||
|
||||
if( !m_isDryRun )
|
||||
|
@ -520,7 +548,7 @@ bool BOARD_NETLIST_UPDATER::updateCopperZoneNets( NETLIST& aNetlist )
|
|||
else
|
||||
{
|
||||
msg.Printf( _( "Via connected to unknown net (%s)." ),
|
||||
UnescapeString( via->GetNetname() ) );
|
||||
UnescapeString( via->GetNetname() ) );
|
||||
m_reporter->Report( msg, RPT_SEVERITY_WARNING );
|
||||
++m_warningCount;
|
||||
}
|
||||
|
@ -598,15 +626,17 @@ bool BOARD_NETLIST_UPDATER::deleteUnusedComponents( NETLIST& aNetlist )
|
|||
wxString msg;
|
||||
const COMPONENT* component;
|
||||
|
||||
for( auto module : m_board->Modules() )
|
||||
for( MODULE* module : m_board->Modules() )
|
||||
{
|
||||
if( ( module->GetAttributes() & MOD_BOARD_ONLY ) > 0 )
|
||||
continue;
|
||||
|
||||
if( m_lookupByTimestamp )
|
||||
component = aNetlist.GetComponentByPath( module->GetPath() );
|
||||
else
|
||||
component = aNetlist.GetComponentByReference( module->GetReference() );
|
||||
|
||||
if( component == NULL )
|
||||
if( component == NULL || component->GetProperties().count( "exclude_from_board" ) )
|
||||
{
|
||||
if( module->IsLocked() )
|
||||
{
|
||||
|
@ -641,8 +671,10 @@ bool BOARD_NETLIST_UPDATER::deleteSinglePadNets()
|
|||
std::vector<D_PAD*> padlist = m_board->GetPads();
|
||||
|
||||
// Sort pads by netlist name
|
||||
std::sort( padlist.begin(), padlist.end(),
|
||||
[ this ]( D_PAD* a, D_PAD* b ) -> bool { return getNetname( a ) < getNetname( b ); } );
|
||||
std::sort( padlist.begin(), padlist.end(), [ this ]( D_PAD* a, D_PAD* b ) -> bool
|
||||
{
|
||||
return getNetname( a ) < getNetname( b );
|
||||
} );
|
||||
|
||||
for( D_PAD* pad : padlist )
|
||||
{
|
||||
|
@ -775,6 +807,9 @@ bool BOARD_NETLIST_UPDATER::UpdateNetlist( NETLIST& aNetlist )
|
|||
int matchCount = 0;
|
||||
MODULE* tmp;
|
||||
|
||||
if( component->GetProperties().count( "exclude_from_board" ) )
|
||||
continue;
|
||||
|
||||
msg.Printf( _( "Processing component \"%s:%s\"." ),
|
||||
component->GetReference(),
|
||||
component->GetFPID().Format().wx_str() );
|
||||
|
|
|
@ -31,33 +31,28 @@
|
|||
using namespace std::placeholders;
|
||||
|
||||
#include <fctsys.h>
|
||||
//#include <pgm_base.h>
|
||||
#include <kiway.h>
|
||||
//#include <confirm.h>
|
||||
#include <pcb_edit_frame.h>
|
||||
#include "pcb_netlist.h"
|
||||
#include "netlist_reader.h"
|
||||
#include <netlist_reader/pcb_netlist.h>
|
||||
#include <netlist_reader/netlist_reader.h>
|
||||
#include <reporter.h>
|
||||
#include <lib_id.h>
|
||||
#include <fp_lib_table.h>
|
||||
#include <class_board.h>
|
||||
#include <class_module.h>
|
||||
#include <ratsnest/ratsnest_data.h>
|
||||
//#include <pcbnew.h>
|
||||
#include <io_mgr.h>
|
||||
#include "board_netlist_updater.h"
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tools/pcb_actions.h>
|
||||
#include <tools/selection_tool.h>
|
||||
#include <project/project_file.h> // LAST_PATH_TYPE
|
||||
#include <view/view.h>
|
||||
//#include <view/view.h>
|
||||
|
||||
extern void SpreadFootprints( std::vector<MODULE*>* aFootprints,
|
||||
wxPoint aSpreadAreaPosition );
|
||||
extern void SpreadFootprints( std::vector<MODULE*>* aFootprints, wxPoint aSpreadAreaPosition );
|
||||
|
||||
|
||||
bool PCB_EDIT_FRAME::ReadNetlistFromFile( const wxString &aFilename,
|
||||
NETLIST& aNetlist,
|
||||
bool PCB_EDIT_FRAME::ReadNetlistFromFile( const wxString &aFilename, NETLIST& aNetlist,
|
||||
REPORTER& aReporter )
|
||||
{
|
||||
wxString msg;
|
||||
|
@ -135,8 +130,6 @@ void PCB_EDIT_FRAME::OnNetlistChanged( BOARD_NETLIST_UPDATER& aUpdater, bool* aR
|
|||
}
|
||||
|
||||
|
||||
#define ALLOW_PARTIAL_FPID 1
|
||||
|
||||
void PCB_EDIT_FRAME::LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter )
|
||||
{
|
||||
wxString msg;
|
||||
|
@ -154,12 +147,8 @@ void PCB_EDIT_FRAME::LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter )
|
|||
{
|
||||
component = aNetlist.GetComponent( ii );
|
||||
|
||||
#if ALLOW_PARTIAL_FPID
|
||||
// The FPID is ok as long as there is a footprint portion coming from eeschema.
|
||||
if( !component->GetFPID().GetLibItemName().size() )
|
||||
#else
|
||||
if( component->GetFPID().empty() )
|
||||
#endif
|
||||
{
|
||||
msg.Printf( _( "No footprint defined for symbol \"%s\".\n" ),
|
||||
component->GetReference() );
|
||||
|
@ -198,13 +187,9 @@ void PCB_EDIT_FRAME::LoadFootprints( NETLIST& aNetlist, REPORTER& aReporter )
|
|||
{
|
||||
module = NULL;
|
||||
|
||||
#if ALLOW_PARTIAL_FPID
|
||||
// The LIB_ID is ok as long as there is a footprint portion coming
|
||||
// the library if it's needed. Nickname can be blank.
|
||||
// The LIB_ID is ok as long as there is a footprint portion coming the library if
|
||||
// it's needed. Nickname can be blank.
|
||||
if( !component->GetFPID().GetLibItemName().size() )
|
||||
#else
|
||||
if( !component->GetFPID().IsValid() )
|
||||
#endif
|
||||
{
|
||||
msg.Printf( _( "%s footprint ID \"%s\" is not valid." ),
|
||||
component->GetReference(),
|
||||
|
|
|
@ -193,20 +193,13 @@ typedef boost::ptr_vector< COMPONENT > COMPONENTS;
|
|||
*/
|
||||
class NETLIST
|
||||
{
|
||||
COMPONENTS m_components; ///< Components found in the netlist.
|
||||
COMPONENTS m_components; // Components found in the netlist.
|
||||
|
||||
/// Remove footprints from #BOARD not found in netlist when true.
|
||||
bool m_deleteExtraFootprints;
|
||||
|
||||
/// Find component by time stamp if true or reference designator if false.
|
||||
bool m_findByTimeStamp;
|
||||
|
||||
/// Replace component footprints when they differ from the netlist if true.
|
||||
bool m_replaceFootprints;
|
||||
bool m_findByTimeStamp; // Associate components by KIID (or refdes if false)
|
||||
bool m_replaceFootprints; // Update footprints to match footprints defined in netlist
|
||||
|
||||
public:
|
||||
NETLIST() :
|
||||
m_deleteExtraFootprints( false ),
|
||||
m_findByTimeStamp( false ),
|
||||
m_replaceFootprints( false )
|
||||
{
|
||||
|
@ -269,23 +262,12 @@ public:
|
|||
COMPONENT* GetComponentByPath( const KIID_PATH& aPath );
|
||||
|
||||
void SortByFPID();
|
||||
|
||||
void SortByReference();
|
||||
|
||||
void SetDeleteExtraFootprints( bool aDeleteExtraFootprints )
|
||||
{
|
||||
m_deleteExtraFootprints = aDeleteExtraFootprints;
|
||||
}
|
||||
|
||||
void SetFindByTimeStamp( bool aFindByTimeStamp ) { m_findByTimeStamp = aFindByTimeStamp; }
|
||||
|
||||
bool IsFindByTimeStamp() const { return m_findByTimeStamp; }
|
||||
|
||||
void SetReplaceFootprints( bool aReplaceFootprints )
|
||||
{
|
||||
m_replaceFootprints = aReplaceFootprints;
|
||||
}
|
||||
|
||||
void SetReplaceFootprints( bool aReplace ) { m_replaceFootprints = aReplace; }
|
||||
bool GetReplaceFootprints() const { return m_replaceFootprints; }
|
||||
|
||||
/**
|
||||
|
|
|
@ -520,8 +520,6 @@ void PCB_MODULE::AddToBoard()
|
|||
fpID.Parse( m_compRef, LIB_ID::ID_PCB, true );
|
||||
module->SetFPID( fpID );
|
||||
|
||||
module->SetAttributes( MOD_DEFAULT | MOD_CMS );
|
||||
|
||||
// reference text
|
||||
TEXTE_MODULE* ref_text = &module->Reference();
|
||||
|
||||
|
|
|
@ -783,8 +783,8 @@ public:
|
|||
* @param aCommit = commit that should store the changes
|
||||
*/
|
||||
void Exchange_Module( MODULE* aSrc, MODULE* aDest, BOARD_COMMIT& aCommit,
|
||||
bool deleteExtraTexts = true,
|
||||
bool resetTextLayers = true, bool resetTextEffects = true,
|
||||
bool deleteExtraTexts = true, bool resetTextLayers = true,
|
||||
bool resetTextEffects = true, bool resetFabricationAttrs = true,
|
||||
bool reset3DModels = true );
|
||||
|
||||
// loading modules: see PCB_BASE_FRAME
|
||||
|
|
|
@ -2526,6 +2526,7 @@ MODULE* PCB_PARSER::parseMODULE_unchecked( wxArrayString* aInitialComments )
|
|||
wxPoint pt;
|
||||
T token;
|
||||
LIB_ID fpid;
|
||||
int attributes = 0;
|
||||
|
||||
std::unique_ptr<MODULE> module( new MODULE( m_board ) );
|
||||
|
||||
|
@ -2689,16 +2690,33 @@ MODULE* PCB_PARSER::parseMODULE_unchecked( wxArrayString* aInitialComments )
|
|||
{
|
||||
switch( token )
|
||||
{
|
||||
case T_smd:
|
||||
module->SetAttributes( module->GetAttributes() | MOD_CMS );
|
||||
case T_virtual: // legacy token prior to version 20200826
|
||||
attributes |= MOD_EXCLUDE_FROM_POS_FILES | MOD_EXCLUDE_FROM_BOM;
|
||||
break;
|
||||
|
||||
case T_virtual:
|
||||
module->SetAttributes( module->GetAttributes() | MOD_VIRTUAL );
|
||||
case T_through_hole:
|
||||
attributes |= MOD_THROUGH_HOLE;
|
||||
break;
|
||||
|
||||
case T_smd:
|
||||
attributes |= MOD_SMD;
|
||||
break;
|
||||
|
||||
case T_board_only:
|
||||
attributes |= MOD_BOARD_ONLY;
|
||||
break;
|
||||
|
||||
case T_exclude_from_pos_files:
|
||||
attributes |= MOD_EXCLUDE_FROM_POS_FILES;
|
||||
break;
|
||||
|
||||
case T_exclude_from_bom:
|
||||
attributes |= MOD_EXCLUDE_FROM_BOM;
|
||||
break;
|
||||
|
||||
default:
|
||||
Expecting( "smd and/or virtual" );
|
||||
Expecting( "through_hole, smd, virtual, board_only, exclude_from_pos_files "
|
||||
"or exclude_from_bom" );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -2797,6 +2815,16 @@ MODULE* PCB_PARSER::parseMODULE_unchecked( wxArrayString* aInitialComments )
|
|||
}
|
||||
}
|
||||
|
||||
// In legacy files the lack of attributes indicated a through-hole component which was by
|
||||
// default excluded from pos files. However there was a hack to look for SMD pads and
|
||||
// consider those "mislabelled through-hole components" and therefore include them in place
|
||||
// files. We probably don't want to get into that game so we'll just include them by
|
||||
// default and let the user change it if required.
|
||||
if( m_requiredVersion < 20200826 && attributes == 0 )
|
||||
attributes |= MOD_THROUGH_HOLE;
|
||||
|
||||
module->SetAttributes( attributes );
|
||||
|
||||
module->SetFPID( fpid );
|
||||
module->SetProperties( properties );
|
||||
module->CalculateBoundingBox();
|
||||
|
|
Loading…
Reference in New Issue