Minor changes
This commit is contained in:
parent
3db5876c55
commit
a0c5e040f7
|
@ -15,6 +15,19 @@ email address.
|
||||||
for it.
|
for it.
|
||||||
|
|
||||||
|
|
||||||
|
2009-oct-30 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
|
||||||
|
================================================================================
|
||||||
|
Replace library editor pin properties dialog box and minor update.
|
||||||
|
* Replaced library pin properties dialog with wxFormBuilder version.
|
||||||
|
* Remove DialogBlocks version of pin properties dialog.
|
||||||
|
* Add pin properties dialog support code to pin object.
|
||||||
|
* Create single event handler for displaying pin properties dialog.
|
||||||
|
* Remove left over DialogBlocks project file for annotate dialog.
|
||||||
|
* Fixed escape key bug in library editor new component dialog.
|
||||||
|
* Add GetUnitsLabel() to get human readable units for dialog labels.
|
||||||
|
* Translate French comments in all modified files.
|
||||||
|
* Some minor clean up of Doxygen comments.
|
||||||
|
|
||||||
2009-oct-30 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
|
2009-oct-30 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
|
||||||
================================================================================
|
================================================================================
|
||||||
++pcbnew
|
++pcbnew
|
||||||
|
|
|
@ -166,6 +166,7 @@ void DialogLabelEditor::onEnterKey( wxCommandEvent& event )
|
||||||
void DialogLabelEditor::OnButtonOKClick( wxCommandEvent& event )
|
void DialogLabelEditor::OnButtonOKClick( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
TextPropertiesAccept( event );
|
TextPropertiesAccept( event );
|
||||||
|
EndModal( wxID_OK );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -176,6 +177,6 @@ void DialogLabelEditor::OnButtonOKClick( wxCommandEvent& event )
|
||||||
void DialogLabelEditor::OnButtonCANCEL_Click( wxCommandEvent& event )
|
void DialogLabelEditor::OnButtonCANCEL_Click( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
m_Parent->DrawPanel->MouseToCursorSchema();
|
m_Parent->DrawPanel->MouseToCursorSchema();
|
||||||
EndModal( -1 );
|
EndModal( wxID_CANCEL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,11 +139,14 @@ void WinEDA_SchematicFrame::EditSchematicText( SCH_TEXT* TextStruct,
|
||||||
if( TextStruct == NULL )
|
if( TextStruct == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Erase old text on screen
|
||||||
DrawPanel->CursorOff( DC );
|
DrawPanel->CursorOff( DC );
|
||||||
RedrawOneStruct( DrawPanel, DC, TextStruct, g_XorMode );
|
RedrawOneStruct( DrawPanel, DC, TextStruct, g_XorMode );
|
||||||
|
|
||||||
DialogLabelEditor::ShowModally( this, TextStruct );
|
DialogLabelEditor::ShowModally( this, TextStruct );
|
||||||
|
|
||||||
|
// Redraw nex text, if exists
|
||||||
|
if( ! TextStruct->m_Text.IsEmpty() )
|
||||||
RedrawOneStruct( DrawPanel, DC, TextStruct, GR_DEFAULT_DRAWMODE );
|
RedrawOneStruct( DrawPanel, DC, TextStruct, GR_DEFAULT_DRAWMODE );
|
||||||
DrawPanel->CursorOn( DC );
|
DrawPanel->CursorOn( DC );
|
||||||
}
|
}
|
||||||
|
@ -163,11 +166,11 @@ void WinEDA_SchematicFrame::ChangeTextOrient( SCH_TEXT* TextStruct, wxDC* DC )
|
||||||
if( TextStruct->m_Flags == 0 )
|
if( TextStruct->m_Flags == 0 )
|
||||||
SaveCopyInUndoList( TextStruct, UR_CHANGED );
|
SaveCopyInUndoList( TextStruct, UR_CHANGED );
|
||||||
|
|
||||||
/* Effacement du texte en cours */
|
/* Erase old text */
|
||||||
DrawPanel->CursorOff( DC );
|
DrawPanel->CursorOff( DC );
|
||||||
RedrawOneStruct( DrawPanel, DC, TextStruct, g_XorMode );
|
RedrawOneStruct( DrawPanel, DC, TextStruct, g_XorMode );
|
||||||
|
|
||||||
/* Rotation du texte */
|
/* Rot text */
|
||||||
int orient;
|
int orient;
|
||||||
|
|
||||||
switch( TextStruct->Type() )
|
switch( TextStruct->Type() )
|
||||||
|
@ -187,7 +190,7 @@ void WinEDA_SchematicFrame::ChangeTextOrient( SCH_TEXT* TextStruct, wxDC* DC )
|
||||||
|
|
||||||
GetScreen()->SetModify();
|
GetScreen()->SetModify();
|
||||||
|
|
||||||
/* Reaffichage */
|
/* redraw the new tewt */
|
||||||
RedrawOneStruct( DrawPanel, DC, TextStruct, g_XorMode );
|
RedrawOneStruct( DrawPanel, DC, TextStruct, g_XorMode );
|
||||||
DrawPanel->CursorOn( DC );
|
DrawPanel->CursorOn( DC );
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
6294
internat/fr/kicad.po
6294
internat/fr/kicad.po
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Dec 29 2008)
|
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
@ -152,7 +152,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
|
||||||
m_panelNetClassesEditor->SetSizer( bpanelNetClassesSizer );
|
m_panelNetClassesEditor->SetSizer( bpanelNetClassesSizer );
|
||||||
m_panelNetClassesEditor->Layout();
|
m_panelNetClassesEditor->Layout();
|
||||||
bpanelNetClassesSizer->Fit( m_panelNetClassesEditor );
|
bpanelNetClassesSizer->Fit( m_panelNetClassesEditor );
|
||||||
m_DRnotebook->AddPage( m_panelNetClassesEditor, _("Net Classes Editor"), true );
|
m_DRnotebook->AddPage( m_panelNetClassesEditor, _("Net Classes Editor"), false );
|
||||||
m_panelGolbalDesignRules = new wxPanel( m_DRnotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
|
m_panelGolbalDesignRules = new wxPanel( m_DRnotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
|
||||||
wxBoxSizer* bpanelGlobRulesSizer;
|
wxBoxSizer* bpanelGlobRulesSizer;
|
||||||
bpanelGlobRulesSizer = new wxBoxSizer( wxVERTICAL );
|
bpanelGlobRulesSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
@ -267,7 +267,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
|
||||||
wxStaticBoxSizer* sViaSizeBox;
|
wxStaticBoxSizer* sViaSizeBox;
|
||||||
sViaSizeBox = new wxStaticBoxSizer( new wxStaticBox( m_panelGolbalDesignRules, wxID_ANY, _("Custom Via Sizes:") ), wxVERTICAL );
|
sViaSizeBox = new wxStaticBoxSizer( new wxStaticBox( m_panelGolbalDesignRules, wxID_ANY, _("Custom Via Sizes:") ), wxVERTICAL );
|
||||||
|
|
||||||
m_staticText7 = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("A blank or 0 => default Netclass value"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticText7 = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Drill value: a blank or 0 => default Netclass value"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticText7->Wrap( -1 );
|
m_staticText7->Wrap( -1 );
|
||||||
sViaSizeBox->Add( m_staticText7, 0, wxALL, 5 );
|
sViaSizeBox->Add( m_staticText7, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
@ -356,7 +356,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
|
||||||
m_panelGolbalDesignRules->SetSizer( bpanelGlobRulesSizer );
|
m_panelGolbalDesignRules->SetSizer( bpanelGlobRulesSizer );
|
||||||
m_panelGolbalDesignRules->Layout();
|
m_panelGolbalDesignRules->Layout();
|
||||||
bpanelGlobRulesSizer->Fit( m_panelGolbalDesignRules );
|
bpanelGlobRulesSizer->Fit( m_panelGolbalDesignRules );
|
||||||
m_DRnotebook->AddPage( m_panelGolbalDesignRules, _("Global Design Rules"), false );
|
m_DRnotebook->AddPage( m_panelGolbalDesignRules, _("Global Design Rules"), true );
|
||||||
|
|
||||||
bMainSizer->Add( m_DRnotebook, 1, wxEXPAND | wxALL, 5 );
|
bMainSizer->Add( m_DRnotebook, 1, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<property name="minimum_size">-1,-1</property>
|
<property name="minimum_size">-1,-1</property>
|
||||||
<property name="name">DIALOG_DESIGN_RULES_BASE</property>
|
<property name="name">DIALOG_DESIGN_RULES_BASE</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="size">900,600</property>
|
<property name="size">900,640</property>
|
||||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass"></property>
|
||||||
<property name="title">Design Rules Editor</property>
|
<property name="title">Design Rules Editor</property>
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
<object class="notebookpage" expanded="1">
|
<object class="notebookpage" expanded="1">
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
||||||
<property name="label">Net Classes Editor</property>
|
<property name="label">Net Classes Editor</property>
|
||||||
<property name="select">1</property>
|
<property name="select">0</property>
|
||||||
<object class="wxPanel" expanded="1">
|
<object class="wxPanel" expanded="1">
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
|
@ -969,7 +969,7 @@
|
||||||
<object class="notebookpage" expanded="1">
|
<object class="notebookpage" expanded="1">
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
||||||
<property name="label">Global Design Rules</property>
|
<property name="label">Global Design Rules</property>
|
||||||
<property name="select">0</property>
|
<property name="select">1</property>
|
||||||
<object class="wxPanel" expanded="1">
|
<object class="wxPanel" expanded="1">
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
|
@ -1895,7 +1895,7 @@
|
||||||
<property name="font"></property>
|
<property name="font"></property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">A blank or 0 => default Netclass value</property>
|
<property name="label">Drill value: a blank or 0 => default Netclass value</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">m_staticText7</property>
|
<property name="name">m_staticText7</property>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Dec 29 2008)
|
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
@ -108,7 +108,7 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Design Rules Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 900,600 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Design Rules Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 900,640 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
~DIALOG_DESIGN_RULES_BASE();
|
~DIALOG_DESIGN_RULES_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -74,6 +74,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit()
|
||||||
else
|
else
|
||||||
msg = _( "Default" );
|
msg = _( "Default" );
|
||||||
m_gridDisplayCurrentSettings->SetCellValue( 1, 0, msg );
|
m_gridDisplayCurrentSettings->SetCellValue( 1, 0, msg );
|
||||||
|
|
||||||
// recompute the column widths here, after setting texts
|
// recompute the column widths here, after setting texts
|
||||||
|
|
||||||
value = netclass->GetViaDiameter();
|
value = netclass->GetViaDiameter();
|
||||||
|
@ -136,22 +137,55 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::OnOkClick( wxCommandEvent& event )
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
{
|
{
|
||||||
bool change = false;
|
bool change = false;
|
||||||
|
|
||||||
switch( event.GetId() )
|
switch( event.GetId() )
|
||||||
{
|
{
|
||||||
case ID_CURRENT_VALUES_TO_CURRENT_NET:
|
case ID_CURRENT_VALUES_TO_CURRENT_NET:
|
||||||
|
if( !IsOK( this,
|
||||||
|
_( "Set current Net tracks and vias sizes and drill to the current values?" ) ) )
|
||||||
|
return;
|
||||||
|
{
|
||||||
|
wxBusyCursor dummy;
|
||||||
change = m_Parent->Change_Net_Tracks_And_Vias_Sizes( m_Netcode, false );
|
change = m_Parent->Change_Net_Tracks_And_Vias_Sizes( m_Netcode, false );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_NETCLASS_VALUES_TO_CURRENT_NET:
|
case ID_NETCLASS_VALUES_TO_CURRENT_NET:
|
||||||
|
if( !IsOK( this,
|
||||||
|
_(
|
||||||
|
"Set current Net tracks and vias sizes and drill to the Netclass default value?" ) ) )
|
||||||
|
return;
|
||||||
|
{
|
||||||
|
wxBusyCursor dummy;
|
||||||
change = m_Parent->Change_Net_Tracks_And_Vias_Sizes( m_Netcode, true );
|
change = m_Parent->Change_Net_Tracks_And_Vias_Sizes( m_Netcode, true );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_ALL_TRACKS_VIAS:
|
case ID_ALL_TRACKS_VIAS:
|
||||||
|
if( !IsOK( this, _( "Set All Tracks and Vias to Netclass value" ) ) )
|
||||||
|
return;
|
||||||
|
{
|
||||||
|
wxBusyCursor dummy;
|
||||||
change = m_Parent->Reset_All_Tracks_And_Vias_To_Netclass_Values( true, true );
|
change = m_Parent->Reset_All_Tracks_And_Vias_To_Netclass_Values( true, true );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_ALL_VIAS:
|
case ID_ALL_VIAS:
|
||||||
|
if( !IsOK( this, _( "Set All Via to Netclass value" ) ) )
|
||||||
|
return;
|
||||||
|
{
|
||||||
|
wxBusyCursor dummy;
|
||||||
change = m_Parent->Reset_All_Tracks_And_Vias_To_Netclass_Values( false, true );
|
change = m_Parent->Reset_All_Tracks_And_Vias_To_Netclass_Values( false, true );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_ALL_TRACKS:
|
case ID_ALL_TRACKS:
|
||||||
|
if( !IsOK( this, _( "Set All Track to Netclass value" ) ) )
|
||||||
|
return;
|
||||||
|
{
|
||||||
|
wxBusyCursor dummy;
|
||||||
change = m_Parent->Reset_All_Tracks_And_Vias_To_Netclass_Values( true, false );
|
change = m_Parent->Reset_All_Tracks_And_Vias_To_Netclass_Values( true, false );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -186,24 +186,6 @@ bool WinEDA_PcbFrame::Change_Net_Tracks_And_Vias_Sizes(
|
||||||
if( aNetcode <= 0 )
|
if( aNetcode <= 0 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
NETINFO_ITEM* net = GetBoard()->FindNet( aNetcode );
|
|
||||||
wxASSERT( net );
|
|
||||||
wxString netName = net->GetNetname();
|
|
||||||
wxString msg;
|
|
||||||
NETCLASS* netClass = net->GetNetClass();
|
|
||||||
wxASSERT( netClass );
|
|
||||||
wxString netClassName = netClass->GetName();
|
|
||||||
if( aUseNetclassValue )
|
|
||||||
msg.Printf( _(
|
|
||||||
"Set tracks and vias sizes and drill to the Netclass \"%s\"default value (entire NET \"%s\") ?" ),
|
|
||||||
GetChars( netClassName ), GetChars( netName ) );
|
|
||||||
else
|
|
||||||
msg.Printf( _(
|
|
||||||
"Set tracks and vias sizes and drill to the current values (entire NET \"%s\") ?" ),
|
|
||||||
GetChars( netClassName ), GetChars( netName ) );
|
|
||||||
if( !IsOK( this, msg ) )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/* Examine segments */
|
/* Examine segments */
|
||||||
PICKED_ITEMS_LIST itemsListPicker;
|
PICKED_ITEMS_LIST itemsListPicker;
|
||||||
bool change = false;
|
bool change = false;
|
||||||
|
@ -232,22 +214,6 @@ bool WinEDA_PcbFrame::Reset_All_Tracks_And_Vias_To_Netclass_Values(
|
||||||
{
|
{
|
||||||
TRACK* pt_segm;
|
TRACK* pt_segm;
|
||||||
|
|
||||||
if( aTrack && aVia )
|
|
||||||
{
|
|
||||||
if( !IsOK( this, _( "Set All Tracks and Vias to Netclass value" ) ) )
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if( aVia )
|
|
||||||
{
|
|
||||||
if( !IsOK( this, _( "Set All Via to Netclass value" ) ) )
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if( aTrack )
|
|
||||||
{
|
|
||||||
if( !IsOK( this, _( "Set All Track to Netclass value" ) ) )
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* read and edit tracks and vias if required */
|
/* read and edit tracks and vias if required */
|
||||||
PICKED_ITEMS_LIST itemsListPicker;
|
PICKED_ITEMS_LIST itemsListPicker;
|
||||||
bool change = false;
|
bool change = false;
|
||||||
|
|
|
@ -22,16 +22,23 @@ static void CreateRoutesSection( FILE* file, BOARD* pcb );
|
||||||
static void CreateSignalsSection( FILE* file, BOARD* pcb );
|
static void CreateSignalsSection( FILE* file, BOARD* pcb );
|
||||||
static void CreateShapesSection( FILE* file, BOARD* pcb );
|
static void CreateShapesSection( FILE* file, BOARD* pcb );
|
||||||
static void CreatePadsShapesSection( FILE* file, BOARD* pcb );
|
static void CreatePadsShapesSection( FILE* file, BOARD* pcb );
|
||||||
static void ModuleWriteShape( FILE* File, MODULE* module );
|
static void FootprintWriteShape( FILE* File, MODULE* module );
|
||||||
|
|
||||||
// layer name pour extensions fichiers de tracewxString
|
// layer name for Gencad export
|
||||||
static const wxString GenCAD_Layer_Name[32] = {
|
static const wxString GenCAD_Layer_Name[32] =
|
||||||
wxT( "BOTTOM" ), wxT( "INNER1" ), wxT( "INNER2" ), wxT("INNER3" ),
|
{
|
||||||
wxT( "INNER4" ), wxT( "INNER5" ), wxT( "INNER6" ), wxT("INNER7" ),
|
wxT( "BOTTOM" ), wxT( "INNER1" ), wxT( "INNER2" ),
|
||||||
wxT( "INNER8" ), wxT( "INNER9" ), wxT( "INNER10" ), wxT("INNER11" ),
|
wxT(
|
||||||
|
"INNER3" ),
|
||||||
|
wxT( "INNER4" ), wxT( "INNER5" ), wxT( "INNER6" ), wxT(
|
||||||
|
"INNER7" ),
|
||||||
|
wxT( "INNER8" ), wxT( "INNER9" ), wxT( "INNER10" ), wxT(
|
||||||
|
"INNER11" ),
|
||||||
wxT( "INNER12" ), wxT( "INNER13" ), wxT( "INNER14" ), wxT( "TOP" ),
|
wxT( "INNER12" ), wxT( "INNER13" ), wxT( "INNER14" ), wxT( "TOP" ),
|
||||||
wxT( "adhecu" ), wxT( "adhecmp" ), wxT( "SOLDERPASTE_BOTTOM" ), wxT("SOLDERPASTE_TOP" ),
|
wxT( "adhecu" ), wxT( "adhecmp" ), wxT( "SOLDERPASTE_BOTTOM" ),wxT(
|
||||||
wxT( "SILKSCREEN_BOTTOM" ), wxT( "SILKSCREEN_TOP" ), wxT( "SOLDERMASK_BOTTOM" ), wxT("SOLDERMASK_TOP" ),
|
"SOLDERPASTE_TOP" ),
|
||||||
|
wxT( "SILKSCREEN_BOTTOM" ), wxT( "SILKSCREEN_TOP" ), wxT( "SOLDERMASK_BOTTOM" ), wxT(
|
||||||
|
"SOLDERMASK_TOP" ),
|
||||||
wxT( "drawings" ), wxT( "comments" ), wxT( "eco1" ), wxT( "eco2" ),
|
wxT( "drawings" ), wxT( "comments" ), wxT( "eco1" ), wxT( "eco2" ),
|
||||||
wxT( "edges" ), wxT( "--" ), wxT( "--" ), wxT( "--" )
|
wxT( "edges" ), wxT( "--" ), wxT( "--" ), wxT( "--" )
|
||||||
};
|
};
|
||||||
|
@ -39,7 +46,8 @@ static const wxString GenCAD_Layer_Name[32] = {
|
||||||
int offsetX, offsetY;
|
int offsetX, offsetY;
|
||||||
D_PAD* PadList;
|
D_PAD* PadList;
|
||||||
|
|
||||||
/* routines de conversion des coord ( sous GenCAD axe Y vers le haut) */
|
/* 2 helper functions to calculate coordinates of modules in gencad values ( GenCAD Y axis from bottom to top)
|
||||||
|
*/
|
||||||
static int mapXto( int x )
|
static int mapXto( int x )
|
||||||
{
|
{
|
||||||
return x - offsetX;
|
return x - offsetX;
|
||||||
|
@ -57,7 +65,7 @@ void WinEDA_PcbFrame::ExportToGenCAD( wxCommandEvent& event )
|
||||||
/***********************************************************/
|
/***********************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Exporte le board au format GenCAD 1.4
|
* Creates an Export file (format GenCAD 1.4) from the current borad.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
wxFileName fn = GetScreen()->m_FileName;
|
wxFileName fn = GetScreen()->m_FileName;
|
||||||
|
@ -81,7 +89,7 @@ void WinEDA_PcbFrame::ExportToGenCAD( wxCommandEvent& event )
|
||||||
DisplayError( this, msg ); return;
|
DisplayError( this, msg ); return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mise a jour des infos PCB: */
|
/* Update some board data, to ensure a reliable gencad export: */
|
||||||
GetBoard()->ComputeBoundaryBox();
|
GetBoard()->ComputeBoundaryBox();
|
||||||
|
|
||||||
offsetX = m_Auxiliary_Axis_Position.x;
|
offsetX = m_Auxiliary_Axis_Position.x;
|
||||||
|
@ -91,9 +99,12 @@ void WinEDA_PcbFrame::ExportToGenCAD( wxCommandEvent& event )
|
||||||
DrawPanel->PrepareGraphicContext( &dc );
|
DrawPanel->PrepareGraphicContext( &dc );
|
||||||
Compile_Ratsnest( &dc, TRUE );
|
Compile_Ratsnest( &dc, TRUE );
|
||||||
|
|
||||||
/* Mise des modules vus en miroir en position "normale"
|
/* Temporary modification of footprints that are flipped (i.e. on bottom layer)
|
||||||
* (necessaire pour decrire les formes sous GenCAD,
|
* to convert them to non flipped footprints.
|
||||||
* qui sont decrites en vue normale, orientation 0)) */
|
* This is necessary to easily export shapes to GenCAD,
|
||||||
|
* that are given as normal orientation (non flipped, rotation = 0))
|
||||||
|
* these changes will be undone later
|
||||||
|
*/
|
||||||
MODULE* module;
|
MODULE* module;
|
||||||
for( module = GetBoard()->m_Modules; module != NULL; module = module->Next() )
|
for( module = GetBoard()->m_Modules; module != NULL; module = module->Next() )
|
||||||
{
|
{
|
||||||
|
@ -105,20 +116,20 @@ void WinEDA_PcbFrame::ExportToGenCAD( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creation de l'entete:
|
// Create file header:
|
||||||
CreateHeaderInfoData( file, this );
|
CreateHeaderInfoData( file, this );
|
||||||
CreateBoardSection( file, GetBoard() );
|
CreateBoardSection( file, GetBoard() );
|
||||||
|
|
||||||
/* Creation liste des TRACKS
|
/* Create TRACKS list
|
||||||
* (section $TRACK) id liste des outils de tracage de pistes */
|
* This is the section $TRACK) (track width sizes) */
|
||||||
CreateTracksInfoData( file, GetBoard() );
|
CreateTracksInfoData( file, GetBoard() );
|
||||||
|
|
||||||
/* Creation de la liste des formes utilisees
|
/* Create the shapes list
|
||||||
* (formes des composants principalement */
|
* (shapes of pads and footprints */
|
||||||
CreatePadsShapesSection( file, GetBoard() ); // doit etre appele avant CreateShapesSection()
|
CreatePadsShapesSection( file, GetBoard() ); // doit etre appele avant CreateShapesSection()
|
||||||
CreateShapesSection( file, GetBoard() );
|
CreateShapesSection( file, GetBoard() );
|
||||||
|
|
||||||
/* Creation de la liste des equipotentielles: */
|
/* Create the list of Nets: */
|
||||||
CreateSignalsSection( file, GetBoard() );
|
CreateSignalsSection( file, GetBoard() );
|
||||||
|
|
||||||
CreateDevicesSection( file, GetBoard() );
|
CreateDevicesSection( file, GetBoard() );
|
||||||
|
@ -127,7 +138,7 @@ void WinEDA_PcbFrame::ExportToGenCAD( wxCommandEvent& event )
|
||||||
|
|
||||||
fclose( file );
|
fclose( file );
|
||||||
|
|
||||||
/* Remise en place des modules vus en miroir */
|
/* Undo the footprints modifications (flipped footprints) */
|
||||||
for( module = GetBoard()->m_Modules; module != NULL; module = module->Next() )
|
for( module = GetBoard()->m_Modules; module != NULL; module = module->Next() )
|
||||||
{
|
{
|
||||||
if( module->flag )
|
if( module->flag )
|
||||||
|
@ -154,9 +165,9 @@ static int Pad_list_Sort_by_Shapes( const void* refptr, const void* objptr )
|
||||||
void CreatePadsShapesSection( FILE* file, BOARD* pcb )
|
void CreatePadsShapesSection( FILE* file, BOARD* pcb )
|
||||||
/*****************************************************/
|
/*****************************************************/
|
||||||
|
|
||||||
/* Cree la liste des formes des pads ( 1 forme par pad )
|
/* Creates the pads shapes list ( 1 shape per pad )
|
||||||
* initialise le membre .GetSubRatsnest de la struct pad, la valeur 1 ..n
|
* Uses .GetSubRatsnest member of class D_PAD, to handle the shape id (value 1 ..n)
|
||||||
* pour les formes de pad PAD1 a PADn
|
* for pads shapes PAD1 to PADn
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
std::vector<D_PAD*> pads;
|
std::vector<D_PAD*> pads;
|
||||||
|
@ -167,7 +178,8 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb )
|
||||||
|
|
||||||
if( pcb->GetPadsCount() > 0 )
|
if( pcb->GetPadsCount() > 0 )
|
||||||
{
|
{
|
||||||
pads.insert( pads.end(), pcb->m_NetInfo->m_PadsFullList.begin(), pcb->m_NetInfo->m_PadsFullList.end() );
|
pads.insert( pads.end(),
|
||||||
|
pcb->m_NetInfo->m_PadsFullList.begin(), pcb->m_NetInfo->m_PadsFullList.end() );
|
||||||
qsort( &pads[0], pcb->GetPadsCount(), sizeof( D_PAD* ), Pad_list_Sort_by_Shapes );
|
qsort( &pads[0], pcb->GetPadsCount(), sizeof( D_PAD* ), Pad_list_Sort_by_Shapes );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +192,7 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb )
|
||||||
pad->SetSubRatsnest( pad_name_number );
|
pad->SetSubRatsnest( pad_name_number );
|
||||||
|
|
||||||
if( old_pad && 0==D_PAD::Compare( old_pad, pad ) )
|
if( old_pad && 0==D_PAD::Compare( old_pad, pad ) )
|
||||||
continue; // Forme deja generee
|
continue; // already created
|
||||||
|
|
||||||
old_pad = pad;
|
old_pad = pad;
|
||||||
|
|
||||||
|
@ -199,23 +211,23 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb )
|
||||||
pad_type = "ROUND";
|
pad_type = "ROUND";
|
||||||
fprintf( file, " %s %d\n", pad_type, pad->m_Drill.x );
|
fprintf( file, " %s %d\n", pad_type, pad->m_Drill.x );
|
||||||
fprintf( file, "CIRCLE %d %d %d\n",
|
fprintf( file, "CIRCLE %d %d %d\n",
|
||||||
pad->m_Offset.x, -pad->m_Offset.y, pad->m_Size.x / 2 );
|
pad->m_Offset.x, -pad->m_Offset.y, dx );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PAD_RECT:
|
case PAD_RECT:
|
||||||
pad_type = "RECTANGULAR";
|
pad_type = "RECTANGULAR";
|
||||||
fprintf( file, " %s %d\n", pad_type, pad->m_Drill.x );
|
fprintf( file, " %s %d\n", pad_type, pad->m_Drill.x );
|
||||||
fprintf( file, "RECTANGLE %d %d %d %d\n",
|
fprintf( file, "RECTANGLE %d %d %d %d\n",
|
||||||
-dx + pad->m_Offset.x, -dy - pad->m_Offset.y,
|
pad->m_Offset.x - dx, -(pad->m_Offset.y - dy),
|
||||||
dx + pad->m_Offset.x, -pad->m_Offset.y + dy );
|
pad->m_Offset.x + dx, -(pad->m_Offset.y + dy) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PAD_OVAL: /* description du contour par 2 linges et 2 arcs */
|
case PAD_OVAL: /* Create outline by 2 lines and 2 arcs */
|
||||||
{
|
{
|
||||||
pad_type = "FINGER";
|
pad_type = "FINGER";
|
||||||
fprintf( file, " %s %d\n", pad_type, pad->m_Drill.x );
|
fprintf( file, " %s %d\n", pad_type, pad->m_Drill.x );
|
||||||
int dr = dx - dy;
|
int dr = dx - dy;
|
||||||
if( dr >= 0 ) // ovale horizontal
|
if( dr >= 0 ) // Horizontal oval
|
||||||
{
|
{
|
||||||
int rayon = dy;
|
int rayon = dy;
|
||||||
fprintf( file, "LINE %d %d %d %d\n",
|
fprintf( file, "LINE %d %d %d %d\n",
|
||||||
|
@ -234,7 +246,7 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb )
|
||||||
-dr + pad->m_Offset.x, -pad->m_Offset.y - rayon,
|
-dr + pad->m_Offset.x, -pad->m_Offset.y - rayon,
|
||||||
-dr + pad->m_Offset.x, -pad->m_Offset.y );
|
-dr + pad->m_Offset.x, -pad->m_Offset.y );
|
||||||
}
|
}
|
||||||
else // ovale vertical
|
else // Vertical oval
|
||||||
{
|
{
|
||||||
dr = -dr;
|
dr = -dr;
|
||||||
int rayon = dx;
|
int rayon = dx;
|
||||||
|
@ -271,11 +283,12 @@ void CreatePadsShapesSection( FILE* file, BOARD* pcb )
|
||||||
void CreateShapesSection( FILE* file, BOARD* pcb )
|
void CreateShapesSection( FILE* file, BOARD* pcb )
|
||||||
/**************************************************/
|
/**************************************************/
|
||||||
|
|
||||||
/* Creation de la liste des formes des composants.
|
/* Creates the footprint shape list.
|
||||||
* Comme la forme de base (module de librairie peut etre modifiee,
|
* We must use one shape for identical footprint (i.e. come from the same footprint in lib)
|
||||||
* une forme est creee par composant
|
* But because pads shapes and positions can be easily modified on board,
|
||||||
* La forme est donnee normalisee, c'est a dire orientation 0, position 0 non miroir
|
* a shape is created by footprint found.
|
||||||
* Il y aura donc des formes indentiques redondantes
|
* (todo : compare footprints shapes and creates only one shape for all footprints found having the same shape)
|
||||||
|
* The shape is always given in orientation 0, position 0 not flipped
|
||||||
*
|
*
|
||||||
* Syntaxe:
|
* Syntaxe:
|
||||||
* $SHAPES
|
* $SHAPES
|
||||||
|
@ -299,7 +312,7 @@ void CreateShapesSection( FILE* file, BOARD* pcb )
|
||||||
|
|
||||||
for( module = pcb->m_Modules; module != NULL; module = module->Next() )
|
for( module = pcb->m_Modules; module != NULL; module = module->Next() )
|
||||||
{
|
{
|
||||||
ModuleWriteShape( file, module );
|
FootprintWriteShape( file, module );
|
||||||
for( pad = module->m_Pads; pad != NULL; pad = pad->Next() )
|
for( pad = module->m_Pads; pad != NULL; pad = pad->Next() )
|
||||||
{
|
{
|
||||||
layer = "ALL";
|
layer = "ALL";
|
||||||
|
@ -342,11 +355,11 @@ void CreateShapesSection( FILE* file, BOARD* pcb )
|
||||||
void CreateComponentsSection( FILE* file, BOARD* pcb )
|
void CreateComponentsSection( FILE* file, BOARD* pcb )
|
||||||
/******************************************************/
|
/******************************************************/
|
||||||
|
|
||||||
/* Creation de la section $COMPONENTS (Placement des composants
|
/* Creates the section $COMPONENTS (Footprints placement)
|
||||||
* Composants cote CUIVRE:
|
* When a footprint is on bottom side of the board::
|
||||||
* Les formes sont donnees avec l'option "FLIP", c.a.d.:
|
* shapes are given with option "FLIP" and "MIRRORX".
|
||||||
* - ils sont decrits en vue normale (comme s'ils etaient sur cote COMPOSANT)
|
* - But shapes remain given like component not mirrored and not flipped
|
||||||
* - leur orientation est donn<EFBFBD>e comme s'ils etaient cote composant.
|
* - orientaion is given like if where not mirrored and not flipped.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
MODULE* module = pcb->m_Modules;
|
MODULE* module = pcb->m_Modules;
|
||||||
|
@ -362,8 +375,8 @@ void CreateComponentsSection( FILE* file, BOARD* pcb )
|
||||||
int orient = module->m_Orient;
|
int orient = module->m_Orient;
|
||||||
if( module->flag )
|
if( module->flag )
|
||||||
{
|
{
|
||||||
mirror = "MIRRORX"; // Miroir selon axe X
|
mirror = "MIRRORX"; // Mirrored relative to X axis
|
||||||
flip = "FLIP"; // Description normale ( formes a afficher en miroir X)
|
flip = "FLIP"; // Normal shape description ( gencad viewer must show it flipped and mirrored)
|
||||||
NEGATE_AND_NORMALIZE_ANGLE_POS( orient );
|
NEGATE_AND_NORMALIZE_ANGLE_POS( orient );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -385,7 +398,7 @@ void CreateComponentsSection( FILE* file, BOARD* pcb )
|
||||||
fprintf( file, "SHAPE %s %s %s\n",
|
fprintf( file, "SHAPE %s %s %s\n",
|
||||||
CONV_TO_UTF8( module->m_Reference->m_Text ), mirror, flip );
|
CONV_TO_UTF8( module->m_Reference->m_Text ), mirror, flip );
|
||||||
|
|
||||||
/* Generation des elements textes (ref et valeur seulement) */
|
/* creates texts (ref and value) */
|
||||||
PtTexte = module->m_Reference;
|
PtTexte = module->m_Reference;
|
||||||
for( ii = 0; ii < 2; ii++ )
|
for( ii = 0; ii < 2; ii++ )
|
||||||
{
|
{
|
||||||
|
@ -407,7 +420,7 @@ void CreateComponentsSection( FILE* file, BOARD* pcb )
|
||||||
PtTexte = module->m_Value;
|
PtTexte = module->m_Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// commentaire:
|
//put a comment:
|
||||||
fprintf( file, "SHEET Part %s %s\n", CONV_TO_UTF8( module->m_Reference->m_Text ),
|
fprintf( file, "SHEET Part %s %s\n", CONV_TO_UTF8( module->m_Reference->m_Text ),
|
||||||
CONV_TO_UTF8( module->m_Value->m_Text ) );
|
CONV_TO_UTF8( module->m_Value->m_Text ) );
|
||||||
}
|
}
|
||||||
|
@ -420,7 +433,7 @@ void CreateComponentsSection( FILE* file, BOARD* pcb )
|
||||||
void CreateSignalsSection( FILE* file, BOARD* pcb )
|
void CreateSignalsSection( FILE* file, BOARD* pcb )
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
/* Creation de la liste des equipotentielles:
|
/* Creates the list of Nets:
|
||||||
* $SIGNALS
|
* $SIGNALS
|
||||||
* SIGNAL <equipot name>
|
* SIGNAL <equipot name>
|
||||||
* NODE <component name> <pin name>
|
* NODE <component name> <pin name>
|
||||||
|
@ -481,7 +494,7 @@ void CreateSignalsSection( FILE* file, BOARD* pcb )
|
||||||
bool CreateHeaderInfoData( FILE* file, WinEDA_PcbFrame* frame )
|
bool CreateHeaderInfoData( FILE* file, WinEDA_PcbFrame* frame )
|
||||||
/*************************************************************/
|
/*************************************************************/
|
||||||
|
|
||||||
/* Creation de la section $HEADER ... $ENDHEADER
|
/* Creates the section $HEADER ... $ENDHEADER
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
@ -513,8 +526,8 @@ static int Track_list_Sort_by_Netcode( const void* refptr, const void* objptr )
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Routine de tri de la liste des piste par netcode,
|
* Sort function used to sort tracks segments:
|
||||||
* puis par largeur puis par layer
|
* items are sorted by netcode, then by width then by layer
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
const TRACK* ref, * cmp;
|
const TRACK* ref, * cmp;
|
||||||
|
@ -537,12 +550,13 @@ static int Track_list_Sort_by_Netcode( const void* refptr, const void* objptr )
|
||||||
void CreateRoutesSection( FILE* file, BOARD* pcb )
|
void CreateRoutesSection( FILE* file, BOARD* pcb )
|
||||||
/*************************************************/
|
/*************************************************/
|
||||||
|
|
||||||
/* Creation de la liste des pistes, vias et zones
|
/* Creates the tracks, vias
|
||||||
|
* TODO: add zones
|
||||||
* section:
|
* section:
|
||||||
* $ROUTE
|
* $ROUTE
|
||||||
* ...
|
* ...
|
||||||
* $ENROUTE
|
* $ENROUTE
|
||||||
* Les segments de piste doivent etre regroupes par nets
|
* Track segments must be sorted by nets
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
TRACK* track, ** tracklist;
|
TRACK* track, ** tracklist;
|
||||||
|
@ -550,7 +564,7 @@ void CreateRoutesSection( FILE* file, BOARD* pcb )
|
||||||
int old_netcode, old_width, old_layer;
|
int old_netcode, old_width, old_layer;
|
||||||
int nbitems, ii;
|
int nbitems, ii;
|
||||||
|
|
||||||
// Calcul du nombre de segments a ecrire
|
// Count items
|
||||||
nbitems = 0;
|
nbitems = 0;
|
||||||
for( track = pcb->m_Track; track != NULL; track = track->Next() )
|
for( track = pcb->m_Track; track != NULL; track = track->Next() )
|
||||||
nbitems++;
|
nbitems++;
|
||||||
|
@ -633,8 +647,9 @@ void CreateRoutesSection( FILE* file, BOARD* pcb )
|
||||||
void CreateDevicesSection( FILE* file, BOARD* pcb )
|
void CreateDevicesSection( FILE* file, BOARD* pcb )
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
/* Creation de la section de description des proprietes des composants
|
/* Creatthes the section $DEVICES
|
||||||
* ( la forme des composants est dans la section shape )
|
* This is a list of footprints properties
|
||||||
|
* ( Shapes are in section $SHAPE )
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
MODULE* module;
|
MODULE* module;
|
||||||
|
@ -667,8 +682,8 @@ void CreateDevicesSection( FILE* file, BOARD* pcb )
|
||||||
void CreateBoardSection( FILE* file, BOARD* pcb )
|
void CreateBoardSection( FILE* file, BOARD* pcb )
|
||||||
/*************************************************/
|
/*************************************************/
|
||||||
|
|
||||||
/* Creation de la section $BOARD.
|
/* Creatthe section $BOARD.
|
||||||
* On ne cree ici que le rectangle d'encadrement du Board
|
* We output here only the board boudary box
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
fputs( "$BOARD\n", file );
|
fputs( "$BOARD\n", file );
|
||||||
|
@ -693,15 +708,15 @@ void CreateBoardSection( FILE* file, BOARD* pcb )
|
||||||
void CreateTracksInfoData( FILE* file, BOARD* pcb )
|
void CreateTracksInfoData( FILE* file, BOARD* pcb )
|
||||||
/****************************************************/
|
/****************************************************/
|
||||||
|
|
||||||
/* Creation de la section "$TRACKS"
|
/* Creates the section "$TRACKS"
|
||||||
* Cette section definit les largeurs de pistes utilsees
|
* This sections give the list of widths (tools) used in tracks and vias
|
||||||
* format:
|
* format:
|
||||||
* $TRACK
|
* $TRACK
|
||||||
* TRACK <name> <width>
|
* TRACK <name> <width>
|
||||||
* $ENDTRACK
|
* $ENDTRACK
|
||||||
*
|
*
|
||||||
* on attribue ici comme nom l'epaisseur des traits precede de "TRACK": ex
|
* Each tool name is build like this: "TRACK" + track width.
|
||||||
* pour une largeur de 120 : nom = "TRACK120".
|
* For instance for a width = 120 : name = "TRACK120".
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
TRACK* track;
|
TRACK* track;
|
||||||
|
@ -758,28 +773,28 @@ void CreateTracksInfoData( FILE* file, BOARD* pcb )
|
||||||
|
|
||||||
|
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
void ModuleWriteShape( FILE* file, MODULE* module )
|
void FootprintWriteShape( FILE* file, MODULE* module )
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
/* Sauvegarde de la forme d'un MODULE (section SHAPE)
|
/* Creates the shape of a footprint (section SHAPE)
|
||||||
* La forme est donnee "normalisee" (Orient 0, vue normale ( non miroir)
|
* The shape is always given "normal" (Orient 0, not mirrored)
|
||||||
* Syntaxe:
|
* Syntax:
|
||||||
* SHAPE <shape_name>
|
* SHAPE <shape_name>
|
||||||
* shape_descr (line, arc ..):
|
* shape_descr (line, arc ..):
|
||||||
* LINE startX startY endX endY
|
* LINE startX startY endX endY
|
||||||
* ARC startX startY endX endY centreX scentreY
|
* ARC startX startY endX endY centreX centreY
|
||||||
* PAD_CIRCLE centreX scentreY radius
|
* PAD_CIRCLE centreX scentreY radius
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
EDGE_MODULE* PtEdge;
|
EDGE_MODULE* PtEdge;
|
||||||
EDA_BaseStruct* PtStruct;
|
EDA_BaseStruct* PtStruct;
|
||||||
int Yaxis_sign = -1; // Controle changement signe axe Y (selon module normal/miroir et conevtions d'axe)
|
int Yaxis_sign = -1; // Controle changement signe axe Y (selon module normal/miroir et conventions d'axe)
|
||||||
|
|
||||||
|
|
||||||
/* Generation du fichier module: */
|
/* creates header: */
|
||||||
fprintf( file, "\nSHAPE %s\n", CONV_TO_UTF8( module->m_Reference->m_Text ) );
|
fprintf( file, "\nSHAPE %s\n", CONV_TO_UTF8( module->m_Reference->m_Text ) );
|
||||||
|
|
||||||
/* Attributs du module */
|
/* creates Attributs */
|
||||||
if( module->m_Attributs != MOD_DEFAULT )
|
if( module->m_Attributs != MOD_DEFAULT )
|
||||||
{
|
{
|
||||||
fprintf( file, "ATTRIBUTE" );
|
fprintf( file, "ATTRIBUTE" );
|
||||||
|
@ -791,7 +806,7 @@ void ModuleWriteShape( FILE* file, MODULE* module )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Generation des elements Drawing modules */
|
/* creates Drawing */
|
||||||
PtStruct = module->m_Drawings;
|
PtStruct = module->m_Drawings;
|
||||||
for( ; PtStruct != NULL; PtStruct = PtStruct->Next() )
|
for( ; PtStruct != NULL; PtStruct = PtStruct->Next() )
|
||||||
{
|
{
|
||||||
|
@ -838,15 +853,13 @@ void ModuleWriteShape( FILE* file, MODULE* module )
|
||||||
default:
|
default:
|
||||||
DisplayError( NULL, wxT( "Type Edge Module inconnu" ) );
|
DisplayError( NULL, wxT( "Type Edge Module inconnu" ) );
|
||||||
break;
|
break;
|
||||||
}
|
} /* end switch PtEdge->m_Shape */
|
||||||
|
|
||||||
/* Fin switch type edge */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
} /* End switch Items type */
|
||||||
|
|
||||||
/* Fin switch gestion des Items draw */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue