Commit f98fd09f authored by charras's avatar charras

minor changes in pcbnew (see changelog)

parent 90721d13
......@@ -5,6 +5,15 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2008-Aug-06 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew:
Removed an obsolete option in the plot menu, in gerber format.
Cleanup code.
Solved a minor bug: rastnest was not displayed after a move module
and if the command was aborted
2008-Juil-31 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+eeschema:
......
......@@ -406,10 +406,6 @@ wxString ReturnPcbLayerName( int layer_number, bool is_filename = FAL
* (not internatinalized, no space)*/
/*********************/
/* PROJET_CONFIG.CPP */
/*********************/
/**************/
/* DRAWTXT.CPP */
/**************/
......
......@@ -19,7 +19,7 @@
enum PlotFormat {
PLOT_FORMAT_HPGL,
PLOT_FORMAT_GERBER,
PLOT_FORMAT_POST,
PLOT_FORMAT_POST
};
......
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -20,7 +20,7 @@
/* Fonctions locales */
static int ChangeSideMaskLayer( int masque );
static void Exit_Module( WinEDA_DrawPanel* Panel, wxDC* DC );
static void Abort_MoveOrCopyModule( WinEDA_DrawPanel* Panel, wxDC* DC );
/* Variables locales : */
static int ModuleInitOrient; // Lors des moves, val init de l'orient (pour annulation)
......@@ -122,11 +122,11 @@ void WinEDA_PcbFrame::StartMove_Module( MODULE* module, wxDC* DC )
m_Pcb->m_Status_Pcb |= DO_NOT_SHOW_GENERAL_RASTNEST;
DrawPanel->ManageCurseur = Montre_Position_Empreinte;
DrawPanel->ForceCloseManageCurseur = Exit_Module;
DrawPanel->ForceCloseManageCurseur = Abort_MoveOrCopyModule;
DrawPanel->m_AutoPAN_Request = TRUE;
// effacement module a l'ecran:
if ( DC )
if( DC )
{
int tmp = module->m_Flags;
module->m_Flags |= DO_NOT_DRAW;
......@@ -139,10 +139,12 @@ void WinEDA_PcbFrame::StartMove_Module( MODULE* module, wxDC* DC )
}
/**************************************************/
void Exit_Module( WinEDA_DrawPanel* Panel, wxDC* DC )
/***************************************************/
/* fonction de sortie de l'application */
/**************************************************************/
void Abort_MoveOrCopyModule( WinEDA_DrawPanel* Panel, wxDC* DC )
/****************************************************************/
/* Called on a move or copy module command abort
*/
{
DRAG_SEGM* pt_drag;
TRACK* pt_segm;
......@@ -154,15 +156,17 @@ void Exit_Module( WinEDA_DrawPanel* Panel, wxDC* DC )
if( module )
{
// effacement module a l'ecran:
// Erase the current footprint on screen
DrawModuleOutlines( Panel, DC, module );
/* restitution de l'empreinte si move ou effacement copie*/
if( module->m_Flags & IS_MOVED )
/* If a move command: return to old position
* If a copy command, delete the new footprint
*/
if( module->m_Flags & IS_MOVED ) // Move command
{
/* Move en cours : remise a l'etat d'origine */
if( g_Drag_Pistes_On )
{
/* Effacement des segments dragges */
/* Erase on screen dragged tracks */
pt_drag = g_DragSegmentList;
for( ; pt_drag != NULL; pt_drag = pt_drag->Pnext )
{
......@@ -171,7 +175,7 @@ void Exit_Module( WinEDA_DrawPanel* Panel, wxDC* DC )
}
}
/* Remise en etat d'origine des segments dragges */
/* Go to old position for dragged tracks */
pt_drag = g_DragSegmentList;
for( ; pt_drag != NULL; pt_drag = pt_drag->Pnext )
{
......@@ -184,9 +188,9 @@ void Exit_Module( WinEDA_DrawPanel* Panel, wxDC* DC )
module->m_Flags = 0;
}
if( module->m_Flags & IS_NEW )
if( module->m_Flags & IS_NEW ) // Copy command: delete new footprint
{
module ->DeleteStructure();
module->DeleteStructure();
module = NULL;
pcbframe->m_Pcb->m_Status_Pcb = 0;
pcbframe->build_liste_pads();
......@@ -206,13 +210,23 @@ void Exit_Module( WinEDA_DrawPanel* Panel, wxDC* DC )
Panel->ManageCurseur = NULL;
Panel->ForceCloseManageCurseur = NULL;
pcbframe->SetCurItem( NULL );
pcbframe->m_Pcb->m_Status_Pcb &= ~DO_NOT_SHOW_GENERAL_RASTNEST; // Display ratsnest is allowed
if( g_Show_Ratsnest )
pcbframe->DrawGeneralRatsnest( DC );
}
/**********************************************************/
MODULE* WinEDA_BasePcbFrame::Copie_Module( MODULE* module )
/**********************************************************/
/* copie le module "module" en position courante */
/**
* Function Copie_Module
* Copy an existing footprint. The ne footprint is added in module list
* @param module = footprint to copy
* @return a pointer on the new footprint (the copy of the existing footprint)
*/
{
MODULE* newmodule;
......@@ -286,7 +300,7 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module, wxDC* DC, bool aAskBeforeDe
/* Confirmation de l'effacement */
module->Display_Infos( this );
if ( aAskBeforeDeleting )
if( aAskBeforeDeleting )
{
msg << _( "Delete Module" ) << wxT( " " ) << module->m_Reference->m_Text
<< wxT( " (" ) << _( "Value " ) << module->m_Value->m_Text
......@@ -325,8 +339,9 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module, wxDC* DC, bool aAskBeforeDe
m_Pcb->m_Status_Pcb = 0;
build_liste_pads();
ReCompile_Ratsnest_After_Changes( DC );
// redraw the area where the module was
if ( DC )
if( DC )
DrawPanel->PostDirtyRect( module->GetBoundingBox() );
return TRUE;
}
......@@ -513,7 +528,7 @@ void BOARD::Change_Side_Module( MODULE* Module, wxDC* DC )
/* calcul du rectangle d'encadrement */
Module->Set_Rectangle_Encadrement();
if ( m_PcbFrame )
if( m_PcbFrame )
Module->Display_Infos( m_PcbFrame );
if( !(Module->m_Flags & IS_MOVED) ) /* Inversion simple */
......
......@@ -688,14 +688,6 @@ static PARAM_CFG_BOOL HPGLcenterCfg //HPGL Org Coord ( 0 normal, 1 Centre)
FALSE /* Default value */
);
static PARAM_CFG_INT GERBERSpotMiniCfg //Aperture Mini (mils)
(
wxT( "GERBmin" ), /* Keyword */
&spot_mini, /* Parameter address */
15, /* Default value */
1, 100 /* Min and max values*/
);
static PARAM_CFG_INT VernisEpargneGardeCfg
(
wxT( "VEgarde" ), /* Keyword */
......@@ -736,14 +728,6 @@ static PARAM_CFG_INT ModuleSegmWidthCfg
0, 0xFFFF /* Min and max values*/
);
static PARAM_CFG_INT FormatPlotCfg
(
wxT( "ForPlot" ), /* Keyword */
&format_plot, /* Parameter address */
1, /* Default value */
0, 3 /* Min and max values*/
);
static PARAM_CFG_INT WTraitSerigraphiePlotCfg
(
wxT( "WpenSer" ), /* Keyword */
......@@ -926,13 +910,11 @@ PARAM_CFG_BASE* ParamCfgList[] =
&HPGLspeedCfg,
&HPGLrecouvrementCfg,
&HPGLcenterCfg,
&GERBERSpotMiniCfg,
&VernisEpargneGardeCfg,
&DrawSegmLargeurCfg,
&EdgeSegmLargeurCfg,
&TexteSegmLargeurCfg,
&ModuleSegmWidthCfg,
&FormatPlotCfg,
&WTraitSerigraphiePlotCfg,
&UserGrilleXCfg,
&UserGrilleYCfg,
......
......@@ -12,6 +12,7 @@
#include "common.h"
#include "pcbnew.h"
#include "plot_common.h"
#include "pcbplot.h"
#include "autorout.h"
#include "trigo.h"
......
......@@ -24,6 +24,7 @@
#define OPTKEY_PADS_ON_SILKSCREEN wxT( "PlotPadsOnSilkscreen" )
#define OPTKEY_ALWAYS_PRINT_PADS wxT( "PlotAlwaysPads" )
#define OPTKEY_OUTPUT_FORMAT wxT( "PlotOutputFormat" )
#define OPTKEY_LINEWIDTH_VALUE wxT( "PlotLineWidth" )
static long s_SelectedLayers = CUIVRE_LAYER | CMP_LAYER |
......@@ -83,11 +84,12 @@ public:
wxCheckBox* m_Plot_Pads_on_Silkscreen;
wxCheckBox* m_Force_Plot_Pads;
wxCheckBox* m_Plot_PS_Negative;
WinEDA_ValueCtrl* m_GerbSpotSizeMinOpt;
WinEDA_ValueCtrl* m_LinesWidth;
WinEDA_ValueCtrl* m_HPGLPenSizeOpt;
WinEDA_ValueCtrl* m_HPGLPenSpeedOpt;
WinEDA_ValueCtrl* m_HPGLPenOverlayOpt;
wxStaticBox* m_HPGL_OptionsBox;
WinEDA_DFloatValueCtrl* m_FineAdjustXscaleOpt, * m_FineAdjustYscaleOpt;
double m_XScaleAdjust, m_YScaleAdjust;
......@@ -108,14 +110,14 @@ public:
// change the A4 to the simple postscript, according to the PlotFormat enum
if( radioNdx == 3 )
radioNdx = 2;
radioNdx = PLOT_FORMAT_POST;
return PlotFormat( radioNdx );
}
public:
WinEDA_PlotFrame( WinEDA_BasePcbFrame * parent );
WinEDA_PlotFrame( WinEDA_BasePcbFrame* parent );
private:
void Plot( wxCommandEvent& event );
void OnQuit( wxCommandEvent& event );
......@@ -128,12 +130,12 @@ private:
};
BEGIN_EVENT_TABLE( WinEDA_PlotFrame, wxDialog )
EVT_CLOSE( WinEDA_PlotFrame::OnClose )
EVT_BUTTON( wxID_CANCEL, WinEDA_PlotFrame::OnQuit )
EVT_BUTTON( ID_EXEC_PLOT, WinEDA_PlotFrame::Plot )
EVT_BUTTON( ID_SAVE_OPT_PLOT, WinEDA_PlotFrame::SaveOptPlot )
EVT_BUTTON( ID_CREATE_DRILL_FILE, WinEDA_PlotFrame::CreateDrillFile )
EVT_RADIOBOX( ID_SEL_PLOT_FORMAT, WinEDA_PlotFrame::SetCommands )
EVT_CLOSE( WinEDA_PlotFrame::OnClose )
EVT_BUTTON( wxID_CANCEL, WinEDA_PlotFrame::OnQuit )
EVT_BUTTON( ID_EXEC_PLOT, WinEDA_PlotFrame::Plot )
EVT_BUTTON( ID_SAVE_OPT_PLOT, WinEDA_PlotFrame::SaveOptPlot )
EVT_BUTTON( ID_CREATE_DRILL_FILE, WinEDA_PlotFrame::CreateDrillFile )
EVT_RADIOBOX( ID_SEL_PLOT_FORMAT, WinEDA_PlotFrame::SetCommands )
END_EVENT_TABLE()
......@@ -190,51 +192,49 @@ WinEDA_PlotFrame::WinEDA_PlotFrame( WinEDA_BasePcbFrame* parent ) :
4, fmtmsg, 1, wxRA_SPECIFY_COLS );
MidRightBoxSizer->Add( m_PlotFormatOpt, 0, wxGROW | wxALL, 5 );
int myFormatIndex = format_plot;
if( config )
{
config->Read( OPTKEY_OUTPUT_FORMAT, &myFormatIndex );
config->Read( OPTKEY_OUTPUT_FORMAT, &g_PlotFormat );
config->Read( OPTKEY_LINEWIDTH_VALUE, &g_PlotLine_Width);
}
m_PlotFormatOpt->SetSelection( myFormatIndex );
m_PlotFormatOpt->SetSelection( g_PlotFormat );
// Creation des menus d'option du format GERBER
m_GerbSpotSizeMinOpt = new WinEDA_ValueCtrl( this, _( "Spot min" ),
spot_mini, g_UnitMetric, MidRightBoxSizer,
UNITS_MILS );
// Creation des menus d'option du format HPGL
m_HPGLPenSizeOpt = new WinEDA_ValueCtrl( this, _( "Pen size" ),
g_HPGL_Pen_Diam, g_UnitMetric, MidRightBoxSizer,
m_HPGL_OptionsBox = new wxStaticBox( this, wxID_ANY, _( "HPGL Options:" ) );
wxStaticBoxSizer* HPGL_OptionsBoxSizer = new wxStaticBoxSizer( m_HPGL_OptionsBox, wxVERTICAL );
MidRightBoxSizer->Add( HPGL_OptionsBoxSizer, 0, wxGROW | wxALL, 5 );
m_HPGLPenSizeOpt = new WinEDA_ValueCtrl( this, _( "Pen Size" ),
g_HPGL_Pen_Diam, g_UnitMetric, HPGL_OptionsBoxSizer,
UNITS_MILS );
// unites standards = cm pour vitesse plume en HPGL
m_HPGLPenSpeedOpt = new WinEDA_ValueCtrl( this, _( "Pen speed (cm/s)" ),
g_HPGL_Pen_Speed, CENTIMETRE, MidRightBoxSizer,
m_HPGLPenSpeedOpt = new WinEDA_ValueCtrl( this, _( "Pen Speed (cm/s)" ),
g_HPGL_Pen_Speed, CENTIMETRE, HPGL_OptionsBoxSizer,
1 );
m_HPGLPenSpeedOpt->SetToolTip( _( "Set pen speed in cm/s" ) );
m_HPGLPenOverlayOpt = new WinEDA_ValueCtrl( this, _( "Pen ovr" ),
g_HPGL_Pen_Recouvrement, g_UnitMetric,
MidRightBoxSizer, UNITS_MILS );
HPGL_OptionsBoxSizer, UNITS_MILS );
m_HPGLPenOverlayOpt->SetToolTip( _( "Set plot overlay for filling" ) );
m_LinesWidth = new WinEDA_ValueCtrl( this, _( "Lines width" ),
m_LinesWidth = new WinEDA_ValueCtrl( this, _( "Lines Width" ),
g_PlotLine_Width, g_UnitMetric, MidRightBoxSizer,
PCB_INTERNAL_UNIT );
m_LinesWidth->SetToolTip( _( "Set width for lines in line plot mode" ) );
m_LinesWidth->SetToolTip( _( "Set lines width used to plot in sketch mode and plot pads outlines on silk screen layers" ) );
// Create the right column commands
static const wxString choice_plot_offset_msg[] =
{ _( "Absolute" ), _( "Auxiliary axis" ) };
m_Choice_Plot_Offset = new wxRadioBox( this, ID_SEL_PLOT_OFFSET_OPTION,
_( "Plot origin" ),
_( "Plot Origin" ),
wxDefaultPosition, wxSize( -1, -1 ),
2, choice_plot_offset_msg, 1, wxRA_SPECIFY_COLS );
......@@ -259,7 +259,7 @@ WinEDA_PlotFrame::WinEDA_PlotFrame( WinEDA_BasePcbFrame* parent ) :
m_FineAdjustXscaleOpt->SetToolTip( _( "Set X scale adjust for exact scale plotting" ) );
m_FineAdjustYscaleOpt = new WinEDA_DFloatValueCtrl( this,
_("Y scale adjust" ), m_YScaleAdjust,
_( "Y scale adjust" ), m_YScaleAdjust,
RightBoxSizer );
m_FineAdjustYscaleOpt->SetToolTip( _( "Set Y scale adjust for exact scale plotting" ) );
......@@ -291,7 +291,7 @@ WinEDA_PlotFrame::WinEDA_PlotFrame( WinEDA_BasePcbFrame* parent ) :
LayersBoxSizer->Add( OneColumnLayerBoxSizer, 0, wxGROW | wxALL, 5 );
int mask = 1;
for( int layer=0; layer<NB_LAYERS; layer++, mask <<= 1 )
for( int layer = 0; layer<NB_LAYERS; layer++, mask <<= 1 )
{
if( layer == 16 )
{
......@@ -299,7 +299,7 @@ WinEDA_PlotFrame::WinEDA_PlotFrame( WinEDA_BasePcbFrame* parent ) :
LayersBoxSizer->Add( OneColumnLayerBoxSizer, 0, wxGROW | wxALL, 5 );
}
m_BoxSelectLayer[layer] = new wxCheckBox( this, -1, board->GetLayerName(layer) );
m_BoxSelectLayer[layer] = new wxCheckBox( this, -1, board->GetLayerName( layer ) );
if( mask & s_SelectedLayers )
m_BoxSelectLayer[layer]->SetValue( true );
......@@ -311,7 +311,7 @@ WinEDA_PlotFrame::WinEDA_PlotFrame( WinEDA_BasePcbFrame* parent ) :
{
wxString layerKey;
for( int layer=0; layer<NB_LAYERS; ++layer )
for( int layer = 0; layer<NB_LAYERS; ++layer )
{
bool option;
......@@ -503,9 +503,9 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
m_Drill_Shape_Opt->Enable( true );
m_PlotModeOpt->Enable( true );
m_PlotMirorOpt->Enable( true );
m_GerbSpotSizeMinOpt->Enable( false );
m_Choice_Plot_Offset->Enable( false );
m_LinesWidth->Enable( true );
m_HPGL_OptionsBox->Enable( false );
m_HPGLPenSizeOpt->Enable( false );
m_HPGLPenSpeedOpt->Enable( false );
m_HPGLPenOverlayOpt->Enable( false );
......@@ -522,9 +522,9 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
m_Drill_Shape_Opt->Enable( false );
m_PlotModeOpt->Enable( false );
m_PlotMirorOpt->Enable( false );
m_GerbSpotSizeMinOpt->Enable( true );
m_Choice_Plot_Offset->Enable( true );
m_LinesWidth->Enable( true );
m_HPGL_OptionsBox->Enable( false );
m_HPGLPenSizeOpt->Enable( false );
m_HPGLPenSpeedOpt->Enable( false );
m_HPGLPenOverlayOpt->Enable( false );
......@@ -541,9 +541,9 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
m_PlotMirorOpt->Enable( true );
m_Drill_Shape_Opt->Enable( false );
m_PlotModeOpt->Enable( true );
m_GerbSpotSizeMinOpt->Enable( false );
m_Choice_Plot_Offset->Enable( false );
m_LinesWidth->Enable( false );
m_HPGL_OptionsBox->Enable( true );
m_HPGLPenSizeOpt->Enable( true );
m_HPGLPenSpeedOpt->Enable( true );
m_HPGLPenOverlayOpt->Enable( true );
......@@ -557,7 +557,7 @@ void WinEDA_PlotFrame::SetCommands( wxCommandEvent& event )
break;
}
format_plot = format;
g_PlotFormat = format;
}
......@@ -589,7 +589,7 @@ void WinEDA_PlotFrame::SaveOptPlot( wxCommandEvent& event )
g_PlotOrient = 0;
Plot_Mode = m_PlotModeOpt->GetSelection();
g_DrawViaOnMaskLayer = m_PlotNoViaOnMaskOpt->GetValue();
spot_mini = m_GerbSpotSizeMinOpt->GetValue();
g_HPGL_Pen_Diam = m_HPGLPenSizeOpt->GetValue();
g_HPGL_Pen_Speed = m_HPGLPenSpeedOpt->GetValue();
g_HPGL_Pen_Recouvrement = m_HPGLPenOverlayOpt->GetValue();
......@@ -600,7 +600,7 @@ void WinEDA_PlotFrame::SaveOptPlot( wxCommandEvent& event )
m_YScaleAdjust = m_FineAdjustYscaleOpt->GetValue();
wxConfig* config = m_Parent->m_Parent->m_EDA_Config;
if( config)
if( config )
{
config->Write( OPTKEY_EDGELAYER_GERBER, g_Exclude_Edges_Pcb );
config->Write( OPTKEY_XFINESCALE_ADJ, m_XScaleAdjust );
......@@ -611,8 +611,10 @@ void WinEDA_PlotFrame::SaveOptPlot( wxCommandEvent& event )
int formatNdx = m_PlotFormatOpt->GetSelection();
config->Write( OPTKEY_OUTPUT_FORMAT, formatNdx );
config->Write( OPTKEY_LINEWIDTH_VALUE, g_PlotLine_Width );
wxString layerKey;
for( int layer=0; layer<NB_LAYERS; ++layer )
for( int layer = 0; layer<NB_LAYERS; ++layer )
{
layerKey.Printf( OPTKEY_LAYERBASE, layer );
config->Write( layerKey, m_BoxSelectLayer[layer]->IsChecked() );
......
......@@ -80,9 +80,6 @@ eda_global int g_HPGL_Pen_Speed /* vitesse en cm/s */
eda_global int g_HPGL_Pen_Diam; /* diametre en mils */
eda_global int g_HPGL_Pen_Recouvrement; /* recouvrement en mils ( pour remplissages */
/* Gestion des ouvertures GERBER */
eda_global int spot_mini; /* Diametre mini de l'ouverture pour trace GERBER */
/* Gestion des cadrages et echelles de trace */
eda_global float Scale_X, Scale_Y ; /* coeff d'agrandissement en X et Y demandes */
eda_global wxPoint g_PlotOffset; /* Offset de trace modifies par l'echelle */
......@@ -91,7 +88,12 @@ eda_global int nb_plot_erreur ;
eda_global int nb_items; /* utilise pour decompter les objets traces */
eda_global int g_PlotLine_Width; /* Largeur du trait en mode filaire (utilise en serigraphie,
pour traces en mode sketch et filaire) */
eda_global int format_plot; /* numero de code du format de sortie */
eda_global int g_PlotFormat /* id for plot format (see enum PlotFormat in plot_common.h) */
#ifdef MAIN
= PLOT_FORMAT_GERBER
#endif
;
eda_global int g_PlotOrient; /* numero de code de l'orientation du trace ( voir
defines precedents):
0 = normal
......@@ -160,7 +162,7 @@ void PlotMirePcb( MIREPCB* PtMire, int format_plot,int masque_layer );
void Plot_1_EdgeModule(int format_plot, EDGE_MODULE * PtEdge);
/* PLOTGERB.CPP */
void PlotGERBERLine(wxPoint start, wxPoint end, int hauteur);
void PlotGERBERLine(wxPoint start, wxPoint end, int width);
void PlotCircle_GERBER( wxPoint centre, int rayon, int width);
void PlotPolygon_GERBER(int nb_segm, int * coord, bool fill);
void trace_1_contour_GERBER(wxPoint pos, wxSize size, wxSize delta,
......
......@@ -330,7 +330,7 @@ static void PlotTextModule( TEXTE_MODULE* pt_texte )
if( no_miroir == 0 )
size.x = -size.x; // Text is mirrored
Plot_1_texte( format_plot, pt_texte->m_Text,
Plot_1_texte( g_PlotFormat, pt_texte->m_Text,
orient, thickness,
pos.x, pos.y, size.x, size.y );
}
......
......@@ -17,7 +17,6 @@
/* Variables locales : */
static int s_Last_D_code;
static float Gerb_scale_plot; // Coeff de conversion d'unites des traces
static int scale_spot_mini; // Ouverture mini (pour remplissages)
static D_CODE* s_DCodeList; // Pointeur sur la zone de stockage des D_CODES
wxString GerberFullFileName;
static double scale_x, scale_y; // echelles de convertion en X et Y (compte tenu
......@@ -58,7 +57,6 @@ void WinEDA_BasePcbFrame::Genere_GERBER( const wxString& FullFileName, int Layer
/* Calcul des echelles de conversion */
Gerb_scale_plot = 1.0; /* pour unites gerber en 0,1 Mils, format 3.4 */
scale_spot_mini = (int) (10 * spot_mini * Gerb_scale_plot);
scale_x = Scale_X * Gerb_scale_plot;
scale_y = Scale_Y * Gerb_scale_plot;
g_PlotOffset.x = 0;
......@@ -615,10 +613,11 @@ void trace_1_pad_TRAPEZE_GERBER( wxPoint pos, wxSize size, wxSize delta,
if( modetrace != FILLED )
{
PlotGERBERLine( polygone[0], polygone[1], scale_spot_mini );
PlotGERBERLine( polygone[1], polygone[2], scale_spot_mini );
PlotGERBERLine( polygone[2], polygone[3], scale_spot_mini );
PlotGERBERLine( polygone[3], polygone[0], scale_spot_mini );
int plotLine_width = (int) (10 * g_PlotLine_Width * Gerb_scale_plot);
PlotGERBERLine( polygone[0], polygone[1], plotLine_width );
PlotGERBERLine( polygone[1], polygone[2], plotLine_width );
PlotGERBERLine( polygone[2], polygone[3], plotLine_width );
PlotGERBERLine( polygone[3], polygone[0], plotLine_width );
}
else
PlotPolygon_GERBER( 4, coord, TRUE );
......@@ -626,7 +625,7 @@ void trace_1_pad_TRAPEZE_GERBER( wxPoint pos, wxSize size, wxSize delta,
/**********************************************************/
void PlotGERBERLine( wxPoint start, wxPoint end, int large )
void PlotGERBERLine( wxPoint start, wxPoint end, int width )
/**********************************************************/
/* Trace 1 segment de piste :
......@@ -638,7 +637,7 @@ void PlotGERBERLine( wxPoint start, wxPoint end, int large )
UserToDeviceCoordinate( start );
UserToDeviceCoordinate( end );
dcode_ptr = get_D_code( large, large, GERB_LINE, 0 );
dcode_ptr = get_D_code( width, width, GERB_LINE, 0 );
if( dcode_ptr->m_NumDcode != s_Last_D_code )
{
sprintf( cbuf, "G54D%d*\n", dcode_ptr->m_NumDcode );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment