Skip to content

Commit

Permalink
see changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
CHARRAS authored and CHARRAS committed Jan 16, 2008
1 parent ed0265c commit f85ade7
Show file tree
Hide file tree
Showing 17 changed files with 655 additions and 451 deletions.
9 changes: 9 additions & 0 deletions change_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ Started 2007-June-11

Please add newer entries at the top, list the date and your name with
email address.

2007-Dec-16 UPDATE Jean-Pierre Charras <[email protected]>
================================================================================
+pcbnew:
Move Zone outlines added
Zone outline DRC works (needs improvements)
some bugs solved, but polyline.cpp still needs work.
gendrill: code cleaning.

2007-Dec-14 UPDATE Jean-Pierre Charras <[email protected]>
================================================================================
+pcbnew:
Expand Down
6 changes: 0 additions & 6 deletions cvpcb/licence.h

This file was deleted.

81 changes: 55 additions & 26 deletions cvpcb/menucfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,25 +228,40 @@ wxString FullFileName, ShortLibName, mask;

Update();
mask = wxT("*") + LibExtBuffer;
FullFileName = EDA_FileSelector( _("Libraries"),
g_RealLibDirBuffer, /* Chemin par defaut */
wxEmptyString, /* nom fichier par defaut */
LibExtBuffer, /* extension par defaut */
mask, /* Masque d'affichage */
this,
0,
TRUE /* ne chage pas de repertoire courant */
);
if (FullFileName == wxEmptyString ) return;

ShortLibName = MakeReducedFileName(FullFileName,g_RealLibDirBuffer,LibExtBuffer);
wxFileDialog FilesDialog(this, _("Library Files:"), g_RealLibDirBuffer,
wxEmptyString, mask,
wxFD_DEFAULT_STYLE | wxFD_MULTIPLE);

FilesDialog.ShowModal();
wxArrayString Filenames;
FilesDialog.GetFilenames(Filenames);

if ( Filenames.GetCount() == 0 )
return;

for ( unsigned jj = 0; jj < Filenames.GetCount(); jj ++ )
{
FullFileName = Filenames[jj];
ShortLibName = MakeReducedFileName(FullFileName,g_RealLibDirBuffer,LibExtBuffer);

g_LibName_List.Insert(ShortLibName, ii);
//Add or insert new library name
if ( g_LibName_List.Index(ShortLibName) == wxNOT_FOUND)
{
ListModIsModified = 1;
g_LibName_List.Insert(ShortLibName, ii++);
}
else
{
wxString msg;
msg << wxT("<") << ShortLibName << wxT("> : ") << _("Library already in use");
DisplayError(this, msg);
}
}

g_UserLibDirBuffer = m_LibDirCtrl->GetValue();
SetRealLibraryPath( wxT("modules") );
listlib();
ListModIsModified = 1;

m_Parent->BuildFootprintListBox();

Expand Down Expand Up @@ -282,23 +297,37 @@ wxString FullFileName, ShortLibName, mask;

Update();
mask = wxT("*") + g_EquivExtBuffer;
FullFileName = EDA_FileSelector( _("Equiv"),
g_RealLibDirBuffer, /* Chemin par defaut */
wxEmptyString, /* nom fichier par defaut */
g_EquivExtBuffer, /* extension par defaut */
mask, /* Masque d'affichage */
this,
0,
TRUE /* ne chage pas de repertoire courant */
);

if (FullFileName == wxEmptyString ) return;
wxFileDialog FilesDialog(this, _("Equiv Files:"), g_RealLibDirBuffer,
wxEmptyString, mask,
wxFD_DEFAULT_STYLE | wxFD_MULTIPLE);

ShortLibName = MakeReducedFileName(FullFileName,g_RealLibDirBuffer,g_EquivExtBuffer);
FilesDialog.ShowModal();
wxArrayString Filenames;
FilesDialog.GetFilenames(Filenames);

if ( Filenames.GetCount() == 0 )
return;

for ( unsigned jj = 0; jj < Filenames.GetCount(); jj ++ )
{
FullFileName = Filenames[jj];
ShortLibName = MakeReducedFileName(FullFileName,g_RealLibDirBuffer,g_EquivExtBuffer);

g_ListName_Equ.Insert(ShortLibName, ii);
//Add or insert new equiv library name
if ( g_ListName_Equ.Index(ShortLibName) == wxNOT_FOUND)
{
g_ListName_Equ.Insert(ShortLibName, ii++);
}
else
{
wxString msg;
msg << wxT("<") << ShortLibName << wxT("> : ") << _("Library already in use");
DisplayError(this, msg);
}
}

/* Mise a jour de l'affichage */
/* Update display list */
g_UserLibDirBuffer = m_LibDirCtrl->GetValue();
SetRealLibraryPath( wxT("modules") );
listlib();
Expand Down
51 changes: 29 additions & 22 deletions eeschema/dialog_eeschema_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,31 +364,38 @@ wxString FullLibName,ShortLibName, Mask;
}

Mask = wxT("*") + g_LibExtBuffer;
FullLibName = EDA_FileSelector( _("Library files:"),
g_RealLibDirBuffer, /* Chemin par defaut */
wxEmptyString, /* nom fichier par defaut */
g_LibExtBuffer, /* extension par defaut */
Mask, /* Masque d'affichage */
this,
wxFD_OPEN,
TRUE
);

if ( FullLibName.IsEmpty() ) return;

ShortLibName = MakeReducedFileName(FullLibName,g_RealLibDirBuffer,g_LibExtBuffer);

//Add or insert new library name
if (FindLibrary(ShortLibName) == NULL)

wxFileDialog FilesDialog(this, _("Library files:"), g_RealLibDirBuffer,
wxEmptyString, Mask,
wxFD_DEFAULT_STYLE | wxFD_MULTIPLE);

FilesDialog.ShowModal();
wxArrayString Filenames;
FilesDialog.GetFilenames(Filenames);

for ( unsigned jj = 0; jj < Filenames.GetCount(); jj ++ )
{
m_LibListChanged = TRUE;
g_LibName_List.Insert(ShortLibName, ii);
m_ListLibr->Clear();
m_ListLibr->InsertItems(g_LibName_List, 0);
FullLibName = Filenames[jj];
ShortLibName = MakeReducedFileName(FullLibName,g_RealLibDirBuffer,g_LibExtBuffer);
if ( ShortLibName.IsEmpty() ) //Just in case...
continue;
//Add or insert new library name
if (FindLibrary(ShortLibName) == NULL)
{
m_LibListChanged = TRUE;
g_LibName_List.Insert(ShortLibName, ii);
m_ListLibr->Clear();
m_ListLibr->InsertItems(g_LibName_List, 0);
}

else
{
wxString msg;
msg << wxT("<") << ShortLibName << wxT("> : ") << _("Library already in use");
DisplayError(this, msg);
}
}

else DisplayError(this, _("Library already in use"));

}


Expand Down
4 changes: 2 additions & 2 deletions include/id.h
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,8 @@ enum main_id {
ID_POPUP_PCB_ZONE_ADD_SIMILAR_ZONE,
ID_POPUP_PCB_ZONE_ADD_CUTOUT_ZONE,
ID_POPUP_PCB_DELETE_ZONE_CUTOUT,
ID_POPUP_ZONE_UNUSED2,
ID_POPUP_ZONE_UNUSED3,
ID_POPUP_PCB_MOVE_ZONE_OUTLINES,
ID_POPUP_PCB_PLACE_ZONE_OUTLINES,
ID_POPUP_ZONE_UNUSED4,

ID_POPUP_PCB_DELETE_MARKER,
Expand Down
20 changes: 15 additions & 5 deletions include/wxPcbStruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -554,13 +554,15 @@ class WinEDA_PcbFrame : public WinEDA_BasePcbFrame
bool IsNewCorner );

/**
* Function End_Move_Zone_Corner
* Terminates a move corner in a zone outline
* Function End_Move_Zone_Corner_Or_Outlines
* Terminates a move corner in a zone outline, or a move zone outlines
* @param DC = current Device Context (can be NULL)
* @param zone_container: the given zone
*/
void End_Move_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_container );
void End_Move_Zone_Corner_Or_Outlines( wxDC* DC, ZONE_CONTAINER* zone_container );

/**
* Function End_Move_Zone_Corner
* Function End_Move_Zone_Corner_Or_Outlines
* Remove the currently selected corner in a zone outline
* the .m_CornerSelection is used as corner selection
*/
Expand All @@ -577,7 +579,15 @@ class WinEDA_PcbFrame : public WinEDA_BasePcbFrame
*/
void Delete_Zone_Contour( wxDC* DC, ZONE_CONTAINER* zone_container );

// Target handling
/**
* Function Start_Move_Zone_Outlines
* Initialise parametres to move an existing zone outlines.
* @param DC = current Device Context (can be NULL)
* @param zone_container: the given zone to move
*/
void Start_Move_Zone_Outlines( wxDC* DC, ZONE_CONTAINER* zone_container );

// Target handling
MIREPCB* Create_Mire( wxDC* DC );
void Delete_Mire( MIREPCB* MirePcb, wxDC* DC );
void StartMove_Mire( MIREPCB* MirePcb, wxDC* DC );
Expand Down
15 changes: 8 additions & 7 deletions pcbnew/dialog_gendrill.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Created: 13/01/2008 17:26:27
// Created: 13/01/2008 17:26:dialog_gendrill
// RCS-ID:
// Copyright: License GNU
// Licence:
/////////////////////////////////////////////////////////////////////////////

// Generated by DialogBlocks (unregistered), 13/01/2008 17:26:27
// Generated by DialogBlocks (unregistered), 13/01/2008 17:26:dialog_gendrill

#ifndef _DIALOG_GENDRILL_H_
#define _DIALOG_GENDRILL_H_
Expand Down Expand Up @@ -149,14 +149,15 @@ class WinEDA_DrillFrame: public wxDialog
void InitDisplayParams(void);
void SetParams(void);
void GenDrillFiles( wxCommandEvent& event );
void GenDrillMap( int format );
void GenDrillMap( std::vector<DRILL_TOOL> & buffer, int format );
void UpdatePrecisionOptions( wxCommandEvent& event );
void UpdateConfig();
int Plot_Drill_PcbMap( DRILL_TOOL* buffer, int format );
void GenDrillReport();
int Gen_Liste_Forets( DRILL_TOOL* buffer, bool print_header );
int Create_Drill_File_EXCELLON( DRILL_TOOL* buffer );
int Plot_Drill_PcbMap( std::vector<DRILL_TOOL> & buffer, int format );
void GenDrillReport( std::vector<DRILL_TOOL> & buffer );
int Gen_Liste_Forets( std::vector<DRILL_TOOL> & buffer, bool print_header );
int Create_Drill_File_EXCELLON( std::vector<DRILL_TOOL> & buffer );
void Init_Drill();
int Gen_Liste_Tools( std::vector<DRILL_TOOL> & buffer, bool print_header );
};

#endif
Expand Down
49 changes: 27 additions & 22 deletions pcbnew/dialog_setup_libs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,29 +364,34 @@ wxString mask = wxT("*");
mask += LibExtBuffer;
g_RealLibDirBuffer.Replace( wxT("\\"), wxT("/"));

fullfilename = EDA_FileSelector( _("library files:"),
g_RealLibDirBuffer, /* Chemin par defaut */
wxEmptyString, /* nom fichier par defaut */
LibExtBuffer, /* extension par defaut */
mask, /* Masque d'affichage */
this,
0,
TRUE
);

if ( fullfilename.IsEmpty() ) return;

ShortLibName =
MakeReducedFileName(fullfilename, g_RealLibDirBuffer, LibExtBuffer);

//Add or insert new library name
if ( g_LibName_List.Index(ShortLibName) == wxNOT_FOUND)
wxFileDialog FilesDialog(this, _("Library Files:"), g_RealLibDirBuffer,
wxEmptyString, mask,
wxFD_DEFAULT_STYLE | wxFD_MULTIPLE);

FilesDialog.ShowModal();
wxArrayString Filenames;
FilesDialog.GetFilenames(Filenames);

for ( unsigned jj = 0; jj < Filenames.GetCount(); jj ++ )
{
m_LibModified = TRUE;
g_LibName_List.Insert(ShortLibName, ii);
m_ListLibr->Clear();
m_ListLibr->InsertItems(g_LibName_List, 0);
fullfilename = Filenames[jj];
ShortLibName =
MakeReducedFileName(fullfilename, g_RealLibDirBuffer, LibExtBuffer);

//Add or insert new library name
if ( g_LibName_List.Index(ShortLibName) == wxNOT_FOUND)
{
m_LibModified = TRUE;
g_LibName_List.Insert(ShortLibName, ii);
m_ListLibr->Clear();
m_ListLibr->InsertItems(g_LibName_List, 0);
}
else
{
wxString msg;
msg << wxT("<") << ShortLibName << wxT("> : ") << _("Library already in use");
DisplayError(this, msg);
}
}
else DisplayError(this, _("Library exists! No Change"));
}

15 changes: 14 additions & 1 deletion pcbnew/edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_PCB_DELETE_EDGE_ZONE:
case ID_POPUP_PCB_FILL_ALL_ZONES:
case ID_POPUP_PCB_PLACE_ZONE_CORNER:
case ID_POPUP_PCB_PLACE_ZONE_OUTLINES:
case ID_POPUP_PCB_EDIT_ZONE_PARAMS:
case ID_POPUP_PCB_DELETE_ZONE:
case ID_POPUP_PCB_MOVE_ZONE_CORNER:
case ID_POPUP_PCB_MOVE_ZONE_OUTLINES:
case ID_POPUP_PCB_ADD_ZONE_CORNER:
case ID_POPUP_PCB_DELETE_TRACKSEG:
case ID_POPUP_PCB_DELETE_TRACK:
case ID_POPUP_PCB_DELETE_TRACKNET:
Expand Down Expand Up @@ -488,6 +492,14 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
break;
}

case ID_POPUP_PCB_MOVE_ZONE_OUTLINES:
{
DrawPanel->MouseToCursorSchema();
ZONE_CONTAINER * zone_cont = (ZONE_CONTAINER*)GetCurItem();
Start_Move_Zone_Outlines(&dc, zone_cont);
break;
}

case ID_POPUP_PCB_ADD_ZONE_CORNER:
{
DrawPanel->MouseToCursorSchema();
Expand All @@ -505,11 +517,12 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
break;
}

case ID_POPUP_PCB_PLACE_ZONE_OUTLINES:
case ID_POPUP_PCB_PLACE_ZONE_CORNER:
{
DrawPanel->MouseToCursorSchema();
ZONE_CONTAINER * zone_cont = (ZONE_CONTAINER*)GetCurItem();
End_Move_Zone_Corner(&dc, zone_cont);
End_Move_Zone_Corner_Or_Outlines(&dc, zone_cont);
break;
}

Expand Down
Loading

0 comments on commit f85ade7

Please sign in to comment.