Commit 4d60b9a3 authored by Dick Hollenbeck's avatar Dick Hollenbeck

mainline-merges

parents fcbcb640 d3d0de88
...@@ -4,6 +4,31 @@ KiCad ChangeLog 2010 ...@@ -4,6 +4,31 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2010-jun-24 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
++EESchema component library and hierarchical sheet label object improvements.
* Continue component library class clean up and encapsulation work.
* Change hierarchical sheet label container to boost::vector_ptr.
* Encapsulate hierarchical label handling in hierarchical sheet class.
* Convert some missed occurrences of wxString::GetData() to GetChars( wxString ).
* Fix some minor code formatting issues.
2010-jun-23, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++eeschema:
In netlist generation, changed the rule to calculate netnames of nets with labels:
Previously, named nets (i.e. nets with local, hierarchical or global labels) have their name
defined by the first label found in list.
So net names could be changed without really changing the schematic.
Now the names are calculated from the rules (by priority order) :
1 - use the most top level labels in hierarchies.
2 - use global labels first, local labels next (hidden power pins names are global labels).
3 - use alphabetic sort (so, if GND and AGND are connected, the net will be always named AGND,
and adding a VSS connection cannot change the net name)
So power nets and nets that have more than one label cannot have their netname changed
if there is no actual change relative to these nets names in schematic
2010-Jun-17 UPDATE Dick Hollenbeck <dick@softplc.com> 2010-Jun-17 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================ ================================================================================
++eeschema: ++eeschema:
......
...@@ -106,9 +106,9 @@ Installation from source code ...@@ -106,9 +106,9 @@ Installation from source code
Some dependencies must be satisfied for the correct installation of KiCad: Some dependencies must be satisfied for the correct installation of KiCad:
wxWidgets >= 2.6.3.3 http://www.wxwidgets.org/ wxWidgets >= 2.8.11 http://www.wxwidgets.org/
CMake >= 2.4.6 http://www.cmake.org/ CMake >= 2.6.4 http://www.cmake.org/
Boost C++ Libraries http://www.boost.org/ Boost C++ Libraries (files used by kicad are provided in kicad sources) http://www.boost.org/
OpenGL OpenGL
Linux: Mesa 3D Graphics Library http://www.mesa3d.org/ Linux: Mesa 3D Graphics Library http://www.mesa3d.org/
Windows: built-in Windows: built-in
......
...@@ -9,7 +9,17 @@ set(BITMAP2COMPONENT_SRCS ...@@ -9,7 +9,17 @@ set(BITMAP2COMPONENT_SRCS
bitmap2cmp_gui bitmap2cmp_gui
) )
add_executable(bitmap2component WIN32 MACOSX_BUNDLE ${BITMAP2COMPONENT_SRCS} ${BITMAP2COMPONENT_RESOURCES}) if(WIN32)
if(MINGW)
# BITMAP2COMPONENT_RESOURCES variable is set by the macro.
mingw_resource_compiler(bitmap2component)
else(MINGW)
set(BITMAP2COMPONENT_RESOURCES bitmap2component.rc)
endif(MINGW)
endif(WIN32)
add_executable(bitmap2component WIN32 MACOSX_BUNDLE
${BITMAP2COMPONENT_SRCS}
${BITMAP2COMPONENT_RESOURCES})
target_link_libraries( bitmap2component target_link_libraries( bitmap2component
......
...@@ -23,17 +23,22 @@ ...@@ -23,17 +23,22 @@
*/ */
#include "wx/wx.h" #include "wx/wx.h"
#include "wx/config.h" #include "wx/config.h"
#include "wx/filename.h"
#include "bitmap2cmp_gui_base.h" #include "bitmap2cmp_gui_base.h"
#include "potracelib.h" #include "potracelib.h"
#include "bitmap_io.h" #include "bitmap_io.h"
#include "bitmap2component.xpm"
#define KEYWORD_FRAME_POSX wxT( "bmconverter_Pos_x" )
#define KEYWORD_FRAME_POSY wxT( "bmconverter_Pos_y" ) #define KEYWORD_FRAME_POSX wxT( "Bmconverter_Pos_x" )
#define KEYWORD_FRAME_SIZEX wxT( "bmconverter_Size_x" ) #define KEYWORD_FRAME_POSY wxT( "Bmconverter_Pos_y" )
#define KEYWORD_FRAME_SIZEY wxT( "bmconverter_Size_y" ) #define KEYWORD_FRAME_SIZEX wxT( "Bmconverter_Size_x" )
#define KEYWORD_FRAME_SIZEY wxT( "Bmconverter_Size_y" )
#define KEYWORD_LAST_INPUT_FILE wxT( "Last_input" )
#define KEYWORD_LAST_OUTPUT_FILE wxT( "Last_output" )
extern int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile, int aFormat ); extern int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile, int aFormat );
...@@ -49,7 +54,8 @@ private: ...@@ -49,7 +54,8 @@ private:
wxBitmap m_Greyscale_Bitmap; wxBitmap m_Greyscale_Bitmap;
wxImage m_NB_Image; wxImage m_NB_Image;
wxBitmap m_BN_Bitmap; wxBitmap m_BN_Bitmap;
wxString m_ImgFileName; wxString m_BitmapFileName;
wxString m_ConvertedFileName;
wxSize m_FrameSize; wxSize m_FrameSize;
wxPoint m_FramePos; wxPoint m_FramePos;
wxConfig * m_Config; wxConfig * m_Config;
...@@ -65,14 +71,13 @@ private: ...@@ -65,14 +71,13 @@ private:
void OnLoadFile( wxCommandEvent& event ); void OnLoadFile( wxCommandEvent& event );
void OnExportEeschema( wxCommandEvent& event ); void OnExportEeschema( wxCommandEvent& event );
void OnExportPcbnew( wxCommandEvent& event ); void OnExportPcbnew( wxCommandEvent& event );
void Binarize( int aThreshold ); void Binarize( double aThreshold ); // aThreshold = 0.0 (black level) to 1.0 (white level)
void OnOptionsSelection( wxCommandEvent& event ); void OnOptionsSelection( wxCommandEvent& event );
void OnThresholdChange( wxScrollEvent& event ); void OnThresholdChange( wxScrollEvent& event );
void NegateGreyscaleImage( ); void NegateGreyscaleImage( );
void ExportFile( FILE* aOutfile, int aFormat ); void ExportFile( FILE* aOutfile, int aFormat );
}; };
BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL )
{ {
m_Config = new wxConfig(); m_Config = new wxConfig();
...@@ -80,11 +85,18 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL ) ...@@ -80,11 +85,18 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL )
m_Config->Read( KEYWORD_FRAME_POSY, & m_FramePos.y, -1 ); m_Config->Read( KEYWORD_FRAME_POSY, & m_FramePos.y, -1 );
m_Config->Read( KEYWORD_FRAME_SIZEX, & m_FrameSize.x, -1 ); m_Config->Read( KEYWORD_FRAME_SIZEX, & m_FrameSize.x, -1 );
m_Config->Read( KEYWORD_FRAME_SIZEY, & m_FrameSize.y, -1 ); m_Config->Read( KEYWORD_FRAME_SIZEY, & m_FrameSize.y, -1 );
m_Config->Read( KEYWORD_LAST_INPUT_FILE, &m_BitmapFileName );
m_Config->Read( KEYWORD_LAST_OUTPUT_FILE, &m_ConvertedFileName );
#ifdef __WINDOWS__
SetIcon( wxICON( bitmap2component_icon ) );
#else
SetIcon( wxICON( bitmap2component ) );
#endif
wxString msg( wxT( " 0000 " ) ); wxString msg( wxT( "000000" ) );
m_gridInfo->SetCellValue( 0, 0, msg );
m_gridInfo->SetCellValue( 1, 0, msg ); m_gridInfo->SetCellValue( 1, 0, msg );
m_gridInfo->SetCellValue( 2, 0, msg );
if( GetSizer() ) if( GetSizer() )
{ {
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
...@@ -108,6 +120,8 @@ BM2CMP_FRAME::~BM2CMP_FRAME() ...@@ -108,6 +120,8 @@ BM2CMP_FRAME::~BM2CMP_FRAME()
m_Config->Write( KEYWORD_FRAME_POSY, (long) m_FramePos.y ); m_Config->Write( KEYWORD_FRAME_POSY, (long) m_FramePos.y );
m_Config->Write( KEYWORD_FRAME_SIZEX, (long) m_FrameSize.x ); m_Config->Write( KEYWORD_FRAME_SIZEX, (long) m_FrameSize.x );
m_Config->Write( KEYWORD_FRAME_SIZEY, (long) m_FrameSize.y ); m_Config->Write( KEYWORD_FRAME_SIZEY, (long) m_FrameSize.y );
m_Config->Write( KEYWORD_LAST_INPUT_FILE, m_BitmapFileName );
m_Config->Write( KEYWORD_LAST_OUTPUT_FILE, m_ConvertedFileName );
delete m_Config; delete m_Config;
...@@ -136,18 +150,24 @@ void BM2CMP_FRAME::OnPaint( wxPaintEvent& event ) ...@@ -136,18 +150,24 @@ void BM2CMP_FRAME::OnPaint( wxPaintEvent& event )
*/ */
void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event ) void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
{ {
wxFileDialog FileDlg( this, _( "Choose Image" ), ::wxGetCwd(), wxEmptyString, wxFileName fn(m_BitmapFileName);
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) )
path = wxGetCwd();
wxFileDialog FileDlg( this, _( "Choose Image" ), path, wxEmptyString,
_( "Image Files " ) + wxImage::GetImageExtWildcard(), _( "Image Files " ) + wxImage::GetImageExtWildcard(),
wxFD_OPEN ); wxFD_OPEN );
int diag = FileDlg.ShowModal(); int diag = FileDlg.ShowModal();
if( diag != wxID_OK ) if( diag != wxID_OK )
return; return;
m_ImgFileName = FileDlg.GetPath();
if( !m_Pict_Image.LoadFile( m_ImgFileName ) ) m_BitmapFileName = FileDlg.GetPath();
if( !m_Pict_Image.LoadFile( m_BitmapFileName ) )
{ {
wxMessageBox( _( "Couldn't load image from '%s'." ), m_ImgFileName.c_str() ); wxMessageBox( _( "Couldn't load image from <%s>" ), m_BitmapFileName.c_str() );
return; return;
} }
...@@ -176,18 +196,18 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event ) ...@@ -176,18 +196,18 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
m_Greyscale_Bitmap = wxBitmap( m_Greyscale_Image ); m_Greyscale_Bitmap = wxBitmap( m_Greyscale_Image );
m_NB_Image = m_Greyscale_Image; m_NB_Image = m_Greyscale_Image;
Binarize( m_sliderThreshold->GetValue() ); Binarize( (double)m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() );
Refresh(); Refresh();
} }
void BM2CMP_FRAME::Binarize( int aThreshold ) void BM2CMP_FRAME::Binarize( double aThreshold )
{ {
unsigned int pixin; unsigned int pixin;
unsigned char pixout; unsigned char pixout;
int h = m_Greyscale_Image.GetHeight(); int h = m_Greyscale_Image.GetHeight();
int w = m_Greyscale_Image.GetWidth(); int w = m_Greyscale_Image.GetWidth();
unsigned int threshold = (aThreshold * 256) / 10; unsigned int threshold = (int)(aThreshold * 256);
for( int y = 1; y < h; y++ ) for( int y = 1; y < h; y++ )
for( int x = 1; x < w; x++ ) for( int x = 1; x < w; x++ )
...@@ -223,35 +243,39 @@ void BM2CMP_FRAME::OnOptionsSelection( wxCommandEvent& event ) ...@@ -223,35 +243,39 @@ void BM2CMP_FRAME::OnOptionsSelection( wxCommandEvent& event )
{ {
NegateGreyscaleImage( ); NegateGreyscaleImage( );
m_Greyscale_Bitmap = wxBitmap( m_Greyscale_Image ); m_Greyscale_Bitmap = wxBitmap( m_Greyscale_Image );
Binarize( m_sliderThreshold->GetValue() ); Binarize( (double)m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() );
Refresh(); Refresh();
} }
void BM2CMP_FRAME::OnThresholdChange( wxScrollEvent& event ) void BM2CMP_FRAME::OnThresholdChange( wxScrollEvent& event )
{ {
Binarize( m_sliderThreshold->GetValue() ); Binarize( (double)m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() );
Refresh(); Refresh();
} }
void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event ) void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event )
{ {
wxFileName fn(m_ConvertedFileName);
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) )
path = ::wxGetCwd();
wxString msg = _( "Schematic lib file (*.lib)|*.lib" ); wxString msg = _( "Schematic lib file (*.lib)|*.lib" );
wxFileDialog FileDlg( this, _( "Create lib file" ), ::wxGetCwd(), wxEmptyString, wxFileDialog FileDlg( this, _( "Create lib file" ), path, wxEmptyString,
msg, msg,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
int diag = FileDlg.ShowModal(); int diag = FileDlg.ShowModal();
if( diag != wxID_OK ) if( diag != wxID_OK )
return; return;
wxString filename = FileDlg.GetPath(); m_ConvertedFileName = FileDlg.GetPath();
FILE* outfile; FILE* outfile;
outfile = wxFopen( filename, wxT( "w" ) ); outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
if( outfile == NULL ) if( outfile == NULL )
{ {
wxString msg; wxString msg;
msg.Printf( _( "File %s could not be created" ), filename.c_str() ); msg.Printf( _( "File %s could not be created" ), m_ConvertedFileName.c_str() );
wxMessageBox( msg ); wxMessageBox( msg );
return; return;
} }
...@@ -263,22 +287,26 @@ void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event ) ...@@ -263,22 +287,26 @@ void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event )
void BM2CMP_FRAME::OnExportPcbnew( wxCommandEvent& event ) void BM2CMP_FRAME::OnExportPcbnew( wxCommandEvent& event )
{ {
wxFileName fn(m_ConvertedFileName);
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) )
path = ::wxGetCwd();
wxString msg = _( "Footprint export file (*.emp)|*.emp" ); wxString msg = _( "Footprint export file (*.emp)|*.emp" );
wxFileDialog FileDlg( this, _( "Create footprint export file" ), ::wxGetCwd(), wxEmptyString, wxFileDialog FileDlg( this, _( "Create footprint export file" ), path, wxEmptyString,
msg, msg,
wxFD_SAVE | wxFD_OVERWRITE_PROMPT ); wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
int diag = FileDlg.ShowModal(); int diag = FileDlg.ShowModal();
if( diag != wxID_OK ) if( diag != wxID_OK )
return; return;
wxString filename = FileDlg.GetPath(); m_ConvertedFileName = FileDlg.GetPath();
FILE* outfile; FILE* outfile;
outfile = wxFopen( filename, wxT( "w" ) ); outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
if( outfile == NULL ) if( outfile == NULL )
{ {
wxString msg; wxString msg;
msg.Printf( _( "File %s could not be created" ), filename.c_str() ); msg.Printf( _( "File %s could not be created" ), m_ConvertedFileName.c_str() );
wxMessageBox( msg ); wxMessageBox( msg );
return; return;
} }
......
...@@ -87,7 +87,7 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS ...@@ -87,7 +87,7 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
m_ThresholdText->Wrap( -1 ); m_ThresholdText->Wrap( -1 );
brightSizer->Add( m_ThresholdText, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); brightSizer->Add( m_ThresholdText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_sliderThreshold = new wxSlider( this, wxID_ANY, 5, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS|wxSL_TOP ); m_sliderThreshold = new wxSlider( this, wxID_ANY, 25, 0, 50, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP );
brightSizer->Add( m_sliderThreshold, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); brightSizer->Add( m_sliderThreshold, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bMainSizer->Add( brightSizer, 0, wxEXPAND, 5 ); bMainSizer->Add( brightSizer, 0, wxEXPAND, 5 );
......
...@@ -670,7 +670,7 @@ ...@@ -670,7 +670,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="maxValue">10</property> <property name="maxValue">50</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minValue">0</property> <property name="minValue">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
...@@ -678,10 +678,10 @@ ...@@ -678,10 +678,10 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS|wxSL_TOP</property> <property name="style">wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="value">5</property> <property name="value">25</property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
......
...@@ -32,10 +32,8 @@ ...@@ -32,10 +32,8 @@
#include <vector> #include <vector>
#include "potracelib.h" #include "potracelib.h"
//#include "bitmap_io.h"
#include "auxiliary.h" #include "auxiliary.h"
#ifndef max #ifndef max
#define max( a, b ) ( ( (a) > (b) ) ? (a) : (b) ) #define max( a, b ) ( ( (a) > (b) ) ? (a) : (b) )
#endif #endif
......
bitmap2component_icon ICON bitmap2component.ico
#include "wx/msw/wx.rc"
/* XPM */
const char *bitmap2component_xpm[] = {
/* columns rows colors chars-per-pixel */
"32 32 16 1",
"@ c #592904",
"# c #974704",
"$ c #5455D0",
"o c #090915",
"- c #2E1604",
"+ c #4B4BB5",
"* c #222352",
"X c #0F1128",
": c #BE5904",
" c #0CFA0C",
"% c #FC7A04",
"= c #323378",
"; c #753704",
"O c #3C3B8F",
"& c #DF6904",
". c #050204",
/* pixels */
" . ..",
" .",
" ",
"........................ .. ",
"........................ .. ",
" X.oO ... ",
"+++X@#.X+ $ ... .",
"...o@%&@.*$$X.o= ... ..",
"....@%%%#-..-#;.... ........",
"....@%%&%&-.#%%-.... .......",
"....@%%%%;..;%&......====O+$ ",
"....@%%:-....o..............= ",
"....@&@.... +*O ......%%%%&#.X ",
"....-..... .....%%&%%%:...",
"OO O=+ . *.%%%%%&%@X ",
" ... =.%%%%%%%#..",
" . O.%%%%&%%;.=",
".......... .....%%%%%%%-..",
"....@@..... ......%%%%%%;...",
"....@%:-....X.........###;;-.= ",
"....@%%&#...-#@...........o*$ ",
"....@%%%%&-.#%%...... $ ",
"....@%%%%#..;%%..... .......",
"....@%%&-....-..... ........",
"XXXo@%;.X+ +*=$ ... ..",
" X-.oO ... .",
" X.= ... ",
"........................ .. ",
"........................ .. ",
" ",
" .",
" . .."
};
This diff is collapsed.
PCBNEW-LibModule-V1
$INDEX
LOGO
$EndINDEX
#
# LOGO
# pixmap w = 229, h = 270
#
$MODULE LOGO
Po 0 0 0 15 00000000 00000000 ~~
T0 0 4800 600 600 0 120 N I 21 "G***"
T1 0 -4800 600 600 0 120 N I 21 "LOGO"
DP 0 0 0 0 5 1 21
Dl -3783 4516
Dl -3766 -4466
Dl 3850 -4483
Dl -3800 -4500
Dl -3783 4516
DP 0 0 0 0 390 1 21
Dl 1632 4131
Dl 1638 4131
Dl 1780 4126
Dl 1890 4102
Dl 2002 4043
Dl 2149 3930
Dl 2363 3747
Dl 2609 3558
Dl 2925 3367
Dl 2953 3353
Dl 3208 3199
Dl 3374 3049
Dl 3430 2920
Dl 3427 2889
Dl 3408 2899
Dl 3352 2984
Dl 3273 3033
Dl 3265 3034
Dl 3196 3087
Dl 3127 3137
Dl 2968 3224
Dl 2766 3322
Dl 2565 3409
Dl 2409 3464
Dl 2322 3492
Dl 2250 3532
Dl 2193 3578
Dl 2046 3649
Dl 1874 3708
Dl 1736 3733
Dl 1669 3729
Dl 1582 3691
Dl 1484 3578
Dl 1479 3570
Dl 1408 3458
Dl 1371 3333
Dl 1360 3154
Dl 1369 2883
Dl 1374 2686
Dl 1361 2510
Dl 1318 2351
Dl 1286 2218
Dl 1266 2017
Dl 1257 1890
Dl 1233 1816
Dl 1230 1815
Dl 1208 1871
Dl 1199 2043
Dl 1199 2110
Dl 1190 2365
Dl 1158 2536
Dl 1091 2664
Dl 977 2790
Dl 920 2843
Dl 516 3128
Dl 70 3289
Dl -404 3323
Dl -637 3292
Dl -853 3202
Dl -1017 3037
Dl -1126 2886
Dl -999 2829
Dl -983 2821
Dl -843 2712
Dl -822 2563
Dl -822 2562
Dl -856 2472
Dl -936 2370
Dl -1082 2234
Dl -1316 2041
Dl -1493 1900
Dl -1665 1757
Dl -1767 1658
Dl -1816 1577
Dl -1831 1491
Dl -1832 1376
Dl -1818 1157
Dl -1783 920
Dl -1783 919
Dl -1720 715
Dl -1617 463
Dl -1494 206
Dl -1372 -10
Dl -1272 -144
Dl -1237 -179
Dl -1193 -249
Dl -1222 -335
Dl -1248 -399
Dl -1243 -481
Dl -1185 -620
Dl -1093 -804
Dl -979 -1005
Dl -973 -1016
Dl -889 -1183
Dl -877 -1295
Dl -885 -1396
Dl -865 -1410
Dl -865 -2009
Dl -930 -2105
Dl -953 -2213
Dl -966 -2390
Dl -966 -2426
Dl -943 -2572
Dl -861 -2701
Dl -786 -2787
Dl -733 -2833
Dl -692 -2808
Dl -592 -2724
Dl -547 -2679
Dl -450 -2495
Dl -476 -2314
Dl -523 -2224
Dl -543 -2349
Dl -559 -2417
Dl -638 -2554
Dl -744 -2596
Dl -848 -2525
Dl -897 -2373
Dl -832 -2172
Dl -798 -2106
Dl -784 -2031
Dl -794 -2018
Dl -865 -2009
Dl -865 -1410
Dl -838 -1429
Dl -731 -1345
Dl -637 -1263
Dl -471 -1159
Dl -412 -1136
Dl -412 -1333
Dl -483 -1366
Dl -484 -1369
Dl -453 -1399
Dl -412 -1380
Dl -412 -1473
Dl -617 -1494
Dl -737 -1573
Dl -743 -1597
Dl -719 -1723
Dl -644 -1899
Dl -626 -1935
Dl -600 -2011
Dl -580 -2047
Dl -496 -2136
Dl -472 -2157
Dl -369 -2218
Dl -221 -2228
Dl -123 -2221
Dl -125 -2209
Dl -133 -2208
Dl -197 -2165
Dl -133 -2116
Dl -123 -2113
Dl -33 -2118
Dl -18 -2168
Dl -24 -2193
Dl 49 -2183
Dl 233 -2099
Dl 245 -2094
Dl 391 -2027
Dl 478 -1999
Dl 495 -1996
Dl 495 -2037
Dl 423 -2065
Dl 467 -2158
Dl 520 -2276
Dl 512 -2442
Dl 434 -2577
Dl 303 -2633
Dl 230 -2607
Dl 138 -2490
Dl 98 -2320
Dl 97 -2183
Dl 31 -2262
Dl -55 -2423
Dl -45 -2589
Dl 74 -2708
Dl 142 -2741
Dl 313 -2816
Dl 412 -2842
Dl 473 -2829
Dl 484 -2822
Dl 533 -2739
Dl 536 -2719
Dl 596 -2627
Dl 644 -2561
Dl 685 -2383
Dl 659 -2182
Dl 614 -2083
Dl 532 -2040
Dl 495 -2037
Dl 495 -1996
Dl 506 -1993
Dl 604 -1935
Dl 656 -1882
Dl 640 -1827
Dl 614 -1805
Dl 569 -1828
Dl 561 -1839
Dl 511 -1850
Dl 413 -1805
Dl 236 -1690
Dl 89 -1608
Dl -108 -1528
Dl -159 -1513
Dl -412 -1473
Dl -412 -1380
Dl -383 -1366
Dl -381 -1363
Dl -412 -1333
Dl -412 -1136
Dl -399 -1131
Dl -220 -1110
Dl -22 -1170
Dl 232 -1318
Dl 324 -1377
Dl 514 -1477
Dl 628 -1491
Dl 684 -1425
Dl 697 -1388
Dl 760 -1249
Dl 850 -1065
Dl 884 -995
Dl 985 -757
Dl 1053 -548
Dl 1117 -358
Dl 1203 -199
Dl 1383 97
Dl 1511 450
Dl 1536 567
Dl 1577 892
Dl 1589 1224
Dl 1567 1496
Dl 1556 1560
Dl 1545 1685
Dl 1569 1735
Dl 1579 1744
Dl 1583 1813
Dl 1535 1967
Dl 1534 1970
Dl 1486 2117
Dl 1481 2211
Dl 1516 2321
Dl 1522 2335
Dl 1658 2502
Dl 1859 2582
Dl 2077 2554
Dl 2078 2554
Dl 2201 2473
Dl 2339 2346
Dl 2453 2214
Dl 2499 2120
Dl 2526 2030
Dl 2595 1887
Dl 2618 1845
Dl 2736 1510
Dl 2760 1129
Dl 2690 686
Dl 2526 166
Dl 2419 -91
Dl 2285 -326
Dl 2107 -549
Dl 2084 -575
Dl 1788 -972
Dl 1513 -1466
Dl 1410 -1707
Dl 1349 -1962
Dl 1333 -2269
Dl 1331 -2416
Dl 1285 -2920
Dl 1171 -3320
Dl 982 -3631
Dl 710 -3865
Dl 349 -4036
Dl 179 -4082
Dl -197 -4100
Dl -546 -4006
Dl -639 -3959
Dl -881 -3774
Dl -1056 -3508
Dl -1150 -3316
Dl -1150 -1281
Dl -1262 -1095
Dl -1314 -1016
Dl -1453 -826
Dl -1612 -629
Dl -1622 -616
Dl -1775 -422
Dl -1887 -238
Dl -1983 -19
Dl -2086 281
Dl -2109 349
Dl -2204 591
Dl -2300 793
Dl -2310 812
Dl -2400 976
Dl -2460 1087
Dl -2484 1146
Dl -2519 1309
Dl -2527 1476
Dl -2503 1579
Dl -2486 1643
Dl -2536 1765
Dl -2631 1904
Dl -2761 1977
Dl -2975 2009
Dl -2990 2010
Dl -3154 2034
Dl -3249 2066
Dl -3294 2122
Dl -3338 2308
Dl -3323 2604
Dl -3321 2625
Dl -3304 2811
Dl -3316 2944
Dl -3361 3099
Dl -3407 3256
Dl -3427 3451
Dl -3365 3565
Dl -3216 3619
Dl -3085 3647
Dl -2900 3701
Dl -2717 3757
Dl -2500 3813
Dl -2192 3895
Dl -1716 4063
Dl -1618 4091
Dl -1618 3724
Dl -1877 3667
Dl -2040 3621
Dl -2194 3587
Dl -2223 3583
Dl -2405 3553
Dl -2631 3514
Dl -2857 3472
Dl -3038 3437
Dl -3132 3416
Dl -3176 3385
Dl -3212 3269
Dl -3178 3139
Dl -3169 3121
Dl -3143 2964
Dl -3148 2711
Dl -3185 2390
Dl -3188 2367
Dl -3179 2222
Dl -3088 2153
Dl -2893 2138
Dl -2693 2117
Dl -2509 2005
Dl -2421 1802
Dl -2395 1718
Dl -2299 1601
Dl -2175 1580
Dl -2092 1629
Dl -1936 1793
Dl -1734 2069
Dl -1482 2464
Dl -1128 3045
Dl -1150 3247
Dl -1168 3355
Dl -1249 3572
Dl -1367 3700
Dl -1418 3719
Dl -1618 3724
Dl -1618 4091
Dl -1549 4111
Dl -1325 4130
Dl -1156 4095
Dl -1096 4057
Dl -973 3961
Dl -901 3905
Dl -829 3866
Dl -823 3866
Dl -748 3819
Dl -729 3806
Dl -585 3769
Dl -337 3745
Dl -7 3736
Dl 382 3744
Dl 652 3757
Dl 868 3774
Dl 998 3797
Dl 1067 3833
Dl 1100 3885
Dl 1142 3947
Dl 1256 4047
Dl 1334 4094
Dl 1450 4125
Dl 1632 4131
DP 0 0 0 0 5 1 21
Dl 3387 2800
Dl 3383 2766
Dl 3346 2733
Dl 3350 2766
Dl 3387 2800
DP 0 0 0 0 5 1 21
Dl 3283 2733
Dl 3300 2716
Dl 3283 2700
Dl 3266 2716
Dl 3283 2733
DP 0 0 0 0 5 1 21
Dl 3216 2700
Dl 3233 2683
Dl 3216 2666
Dl 3200 2683
Dl 3216 2700
DP 0 0 0 0 9 1 21
Dl 3129 2633
Dl 3119 2613
Dl 3050 2533
Dl 2990 2474
Dl 2937 2433
Dl 2946 2453
Dl 3016 2533
Dl 3076 2591
Dl 3129 2633
DP 0 0 0 0 5 1 21
Dl 2920 2400
Dl 2916 2366
Dl 2879 2333
Dl 2883 2366
Dl 2920 2400
DP 0 0 0 0 7 1 21
Dl 2812 2179
Dl 2823 2175
Dl 2825 2161
Dl 2823 2025
Dl 2814 2012
Dl 2809 2100
Dl 2812 2179
$EndMODULE LOGO
$EndLIBRARY
EESchema-LIBRARY Version 2.3
#
# LOGO
# pixmap size w = 229, h = 270
#
DEF LOGO G 0 40 Y Y 1 F N
F0 "#G" 0 -420 60 H I C CNN
F1 "LOGO" 0 420 60 H I C CNN
DRAW
P 5 0 0 1 -378 -451 -376 446 385 448 -380 450 -378 -451 F
P 390 0 0 1 163 -413 163 -413 178 -412 189 -410 200 -404 214 -393 236 -374 260 -355 292 -336 295 -335 320 -319 337 -304 343 -292 342 -288 340 -289 335 -298 327 -303 326 -303 319 -308 312 -313 296 -322 276 -332 256 -340 240 -346 232 -349 225 -353 219 -357 204 -364 187 -370 173 -373 166 -372 158 -369 148 -357 147 -357 140 -345 137 -333 136 -315 136 -288 137 -268 136 -251 131 -235 128 -221 126 -201 125 -189 123 -181 123 -181 120 -187 120 -204 119 -211 119 -236 115 -253 109 -266 97 -279 92 -284 51 -312 7 -328 -40 -332 -63 -329 -85 -320 -101 -303 -112 -288 -99 -282 -98 -282 -84 -271 -82 -256 -82 -256 -85 -247 -93 -237 -108 -223 -131 -204 -149 -190 -166 -175 -176 -165 -181 -157 -183 -149 -183 -137 -181 -115 -178 -92 -178 -91 -172 -71 -161 -46 -149 -20 -137 1 -127 14 -123 17 -119 24 -122 33 -124 39 -124 48 -118 62 -109 80 -97 100 -97 101 -88 118 -87 129 -88 139 -86 141 -86 200 -93 210 -95 221 -96 239 -96 242 -94 257 -86 270 -78 278 -73 283 -69 280 -59 272 -54 267 -45 249 -47 231 -52 222 -54 234 -55 241 -63 255 -74 259 -84 252 -89 237 -83 217 -79 210 -78 203 -79 201 -86 200 -86 141 -83 142 -73 134 -63 126 -47 115 -41 113 -41 133 -48 136 -48 136 -45 139 -41 138 -41 147 -61 149 -73 157 -74 159 -71 172 -64 189 -62 193 -60 201 -58 204 -49 213 -47 215 -36 221 -22 222 -12 222 -12 220 -13 220 -19 216 -13 211 -12 211 -3 211 -1 216 -2 219 4 218 23 209 24 209 39 202 47 199 49 199 49 203 42 206 46 215 52 227 51 244 43 257 30 263 23 260 13 249 9 232 9 218 3 226 -5 242 -4 258 7 270 14 274 31 281 41 284 47 282 48 282 53 273 53 271 59 262 64 256 68 238 65 218 61 208 53 204 49 203 49 199 50 199 60 193 65 188 64 182 61 180 56 182 56 183 51 185 41 180 23 169 8 160 -10 152 -15 151 -41 147 -41 138 -38 136 -38 136 -41 133 -41 113 -39 113 -22 111 -2 117 23 131 32 137 51 147 62 149 68 142 69 138 76 124 85 106 88 99 98 75 105 54 111 35 120 19 138 -9 151 -45 153 -56 157 -89 158 -122 156 -149 155 -156 154 -168 156 -173 157 -174 158 -181 153 -196 153 -197 148 -211 148 -221 151 -232 152 -233 165 -250 185 -258 207 -255 207 -255 220 -247 233 -234 245 -221 249 -212 252 -203 259 -188 261 -184 273 -151 276 -112 269 -68 252 -16 241 9 228 32 210 54 208 57 178 97 151 146 141 170 134 196 133 226 133 241 128 292 117 332 98 363 71 386 34 403 17 408 -19 410 -54 400 -63 395 -88 377 -105 350 -114 331 -114 128 -126 109 -131 101 -145 82 -161 62 -162 61 -177 42 -188 23 -198 1 -208 -28 -210 -34 -220 -59 -229 -79 -231 -81 -240 -97 -246 -108 -248 -114 -251 -130 -252 -147 -250 -157 -248 -164 -253 -176 -263 -190 -276 -197 -297 -200 -299 -201 -315 -203 -324 -206 -329 -212 -333 -230 -332 -260 -332 -262 -330 -281 -331 -294 -336 -309 -340 -325 -342 -345 -336 -356 -321 -361 -308 -364 -289 -370 -271 -375 -249 -381 -219 -389 -171 -406 -161 -409 -161 -372 -187 -366 -204 -362 -219 -358 -222 -358 -240 -355 -263 -351 -285 -347 -303 -343 -313 -341 -317 -338 -321 -326 -317 -313 -316 -312 -314 -296 -314 -271 -318 -239 -318 -236 -317 -222 -308 -215 -289 -213 -269 -211 -250 -200 -242 -180 -239 -171 -229 -160 -217 -158 -209 -162 -193 -179 -173 -206 -148 -246 -112 -304 -115 -324 -116 -335 -124 -357 -136 -370 -141 -371 -161 -372 -161 -409 -154 -411 -132 -413 -115 -409 -109 -405 -97 -396 -90 -390 -82 -386 -82 -386 -74 -381 -72 -380 -58 -376 -33 -374 0 -373 38 -374 65 -375 86 -377 99 -379 106 -383 110 -388 114 -394 125 -404 133 -409 145 -412 163 -413 F
P 5 0 0 1 338 -280 338 -276 334 -273 335 -276 338 -280 F
P 5 0 0 1 328 -273 330 -271 328 -270 326 -271 328 -273 F
P 5 0 0 1 321 -270 323 -268 321 -266 320 -268 321 -270 F
P 9 0 0 1 312 -263 311 -261 305 -253 299 -247 293 -243 294 -245 301 -253 307 -259 312 -263 F
P 5 0 0 1 292 -240 291 -236 287 -233 288 -236 292 -240 F
P 7 0 0 1 281 -217 282 -217 282 -216 282 -202 281 -201 280 -210 281 -217 F
ENDDRAW
ENDDEF
This diff is collapsed.
update=16/05/2010 14:21:37 update=30/06/2010 12:54:53
version=1 version=1
last_client=pcbnew last_client=pcbnew
[common] [common]
NetDir= NetDir=
[general]
version=1
RootSch=interf_u.sch
BoardNm=interf_u.brd
[cvpcb]
version=1
NetITyp=0
NetIExt=.net
PkgIExt=.pkg
NetType=0
[cvpcb/libraries]
EquName1=devcms
[eeschema] [eeschema]
version=1 version=1
LibDir= LibDir=
...@@ -33,9 +45,11 @@ offY_E=0 ...@@ -33,9 +45,11 @@ offY_E=0
RptD_X=0 RptD_X=0
RptD_Y=100 RptD_Y=100
RptLab=1 RptLab=1
PenMin=20
SimCmd= SimCmd=
UseNetN=0 UseNetN=0
LabSize=60
PrintMonochrome=1
ShowSheetReferenceAndTitleBlock=1
[eeschema/libraries] [eeschema/libraries]
LibName1=power LibName1=power
LibName2=device LibName2=device
...@@ -48,18 +62,7 @@ LibName8=adc-dac ...@@ -48,18 +62,7 @@ LibName8=adc-dac
LibName9=memory LibName9=memory
LibName10=xilinx LibName10=xilinx
LibName11=special LibName11=special
[general] LibName12=image
version=1
RootSch=interf_u.sch
BoardNm=interf_u.brd
[cvpcb]
version=1
NetITyp=0
NetIExt=.net
PkgIExt=.pkg
NetType=0
[cvpcb/libraries]
EquName1=devcms
[pcbnew] [pcbnew]
version=1 version=1
PadDrlX=430 PadDrlX=430
......
EESchema Schematic File Version 2 date 28/04/2010 09:06:34 EESchema Schematic File Version 2 date 30/06/2010 12:55:05
LIBS:power LIBS:power
LIBS:device LIBS:device
LIBS:conn LIBS:conn
...@@ -10,13 +10,14 @@ LIBS:adc-dac ...@@ -10,13 +10,14 @@ LIBS:adc-dac
LIBS:memory LIBS:memory
LIBS:xilinx LIBS:xilinx
LIBS:special LIBS:special
LIBS:image
LIBS:interf_u-cache LIBS:interf_u-cache
EELAYER 24 0 EELAYER 24 0
EELAYER END EELAYER END
$Descr A3 16535 11700 $Descr A3 16535 11700
Sheet 1 1 Sheet 1 1
Title "INTERFACE UNIVERSEL" Title "INTERFACE UNIVERSEL"
Date "28 apr 2010" Date "30 jun 2010"
Rev "2B" Rev "2B"
Comp "KICAD" Comp "KICAD"
Comment1 "Comment 1" Comment1 "Comment 1"
...@@ -24,6 +25,15 @@ Comment2 "Comment 2" ...@@ -24,6 +25,15 @@ Comment2 "Comment 2"
Comment3 "Comment 3" Comment3 "Comment 3"
Comment4 "Comment 4" Comment4 "Comment 4"
$EndDescr $EndDescr
$Comp
L LOGO #G?
U 1 1 4C2B218C
P 11350 10550
F 0 "#G?" H 11350 10130 60 0001 C CNN
F 1 "LOGO" H 11350 10970 60 0001 C CNN
1 11350 10550
1 0 0 -1
$EndComp
Wire Bus Line Wire Bus Line
3900 2450 3850 2450 3900 2450 3850 2450
Wire Wire Line Wire Wire Line
...@@ -43,21 +53,13 @@ Wire Wire Line ...@@ -43,21 +53,13 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
3150 2250 3650 2250 3150 2250 3650 2250
Wire Wire Line Wire Wire Line
4450 9300 3800 9300 4450 9300 2600 9300
Wire Wire Line
3800 9300 3250 9300
Wire Wire Line
3250 9300 2600 9300
Wire Wire Line Wire Wire Line
2600 9300 2600 9350 2600 9300 2600 9350
Wire Wire Line Wire Wire Line
2600 8900 2600 8850 2600 8900 2600 8850
Wire Wire Line Wire Wire Line
4450 8900 3800 8900 4450 8900 2600 8900
Wire Wire Line
3800 8900 3250 8900
Wire Wire Line
3250 8900 2600 8900
Connection ~ 3250 8900 Connection ~ 3250 8900
Connection ~ 3800 8900 Connection ~ 3800 8900
Connection ~ 3800 9300 Connection ~ 3800 9300
...@@ -187,11 +189,7 @@ Wire Wire Line ...@@ -187,11 +189,7 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
10050 3300 10100 3300 10050 3300 10100 3300
Wire Wire Line Wire Wire Line
10050 3000 10050 3100 10050 3000 10050 3300
Wire Wire Line
10050 3100 10050 3200
Wire Wire Line
10050 3200 10050 3300
Wire Wire Line Wire Wire Line
10100 3100 10050 3100 10100 3100 10050 3100
Wire Wire Line Wire Wire Line
...@@ -199,13 +197,9 @@ Wire Wire Line ...@@ -199,13 +197,9 @@ Wire Wire Line
Connection ~ 10050 3100 Connection ~ 10050 3100
Connection ~ 10050 3200 Connection ~ 10050 3200
Wire Wire Line Wire Wire Line
13550 4400 13550 4150 13550 4400 13550 3700
Wire Wire Line Wire Wire Line
13550 4150 13550 3700 14350 4400 14350 3700
Wire Wire Line
14350 4400 14350 4150
Wire Wire Line
14350 4150 14350 3700
Connection ~ 13550 4150 Connection ~ 13550 4150
Connection ~ 14350 4150 Connection ~ 14350 4150
Connection ~ 14350 3700 Connection ~ 14350 3700
...@@ -224,9 +218,7 @@ Wire Wire Line ...@@ -224,9 +218,7 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
8450 1850 9000 1850 8450 1850 9000 1850
Wire Wire Line Wire Wire Line
8450 1950 8500 1950 8450 1950 9000 1950
Wire Wire Line
8500 1950 9000 1950
Wire Wire Line Wire Wire Line
8450 2150 9000 2150 8450 2150 9000 2150
Wire Wire Line Wire Wire Line
...@@ -237,9 +229,7 @@ Connection ~ 8500 1950 ...@@ -237,9 +229,7 @@ Connection ~ 8500 1950
Wire Wire Line Wire Wire Line
3950 4000 4500 4000 3950 4000 4500 4000
Wire Wire Line Wire Wire Line
4550 2350 4550 2450 4550 2350 4550 2550
Wire Wire Line
4550 2450 4550 2550
Connection ~ 4550 2450 Connection ~ 4550 2450
Wire Wire Line Wire Wire Line
3950 4100 4500 4100 3950 4100 4500 4100
...@@ -459,23 +449,9 @@ Wire Wire Line ...@@ -459,23 +449,9 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
14700 7500 14750 7500 14700 7500 14750 7500
Wire Wire Line Wire Wire Line
14700 7500 14700 7300 14700 7500 14700 6100
Wire Wire Line
14700 7300 14700 7100
Wire Wire Line
14700 7100 14700 6900
Wire Wire Line
14700 6900 14700 6700
Wire Wire Line
14700 6700 14700 6500
Wire Wire Line Wire Wire Line
14700 6500 14700 6300 14650 6100 14750 6100
Wire Wire Line
14700 6300 14700 6100
Wire Wire Line
14650 6100 14700 6100
Wire Wire Line
14700 6100 14750 6100
Wire Wire Line Wire Wire Line
14750 6300 14700 6300 14750 6300 14700 6300
Wire Wire Line Wire Wire Line
...@@ -532,21 +508,7 @@ Wire Wire Line ...@@ -532,21 +508,7 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
1200 6900 1300 6900 1200 6900 1300 6900
Wire Wire Line Wire Wire Line
1200 7700 1200 7600 1200 7700 1200 6900
Wire Wire Line
1200 7600 1200 7500
Wire Wire Line
1200 7500 1200 7400
Wire Wire Line
1200 7400 1200 7300
Wire Wire Line
1200 7300 1200 7200
Wire Wire Line
1200 7200 1200 7100
Wire Wire Line
1200 7100 1200 7000
Wire Wire Line
1200 7000 1200 6900
Wire Wire Line Wire Wire Line
1300 7000 1200 7000 1300 7000 1200 7000
Wire Wire Line Wire Wire Line
...@@ -573,9 +535,7 @@ Wire Wire Line ...@@ -573,9 +535,7 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
3350 6800 3350 6900 3350 6800 3350 6900
Wire Wire Line Wire Wire Line
3350 6800 3150 6800 3350 6800 2450 6800
Wire Wire Line
3150 6800 2450 6800
Wire Wire Line Wire Wire Line
2450 6800 2450 6900 2450 6800 2450 6900
Wire Wire Line Wire Wire Line
...@@ -583,9 +543,7 @@ Wire Wire Line ...@@ -583,9 +543,7 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
3150 7950 3150 6800 3150 7950 3150 6800
Wire Wire Line Wire Wire Line
3900 7000 2950 7000 3900 7000 2600 7000
Wire Wire Line
2950 7000 2600 7000
Wire Wire Line Wire Wire Line
2600 7000 2600 7100 2600 7000 2600 7100
Wire Wire Line Wire Wire Line
...@@ -597,9 +555,7 @@ Wire Wire Line ...@@ -597,9 +555,7 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
3050 6900 2500 6900 3050 6900 2500 6900
Wire Wire Line Wire Wire Line
3050 7950 3050 7700 3050 7950 3050 6900
Wire Wire Line
3050 7700 3050 6900
Wire Wire Line Wire Wire Line
3900 7600 3400 7600 3900 7600 3400 7600
Wire Wire Line Wire Wire Line
...@@ -607,17 +563,13 @@ Wire Wire Line ...@@ -607,17 +563,13 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
3400 7700 3050 7700 3400 7700 3050 7700
Wire Wire Line Wire Wire Line
2100 7300 2750 7300 2100 7300 3250 7300
Wire Wire Line
2750 7300 3250 7300
Wire Wire Line Wire Wire Line
3250 7300 3250 7100 3250 7300 3250 7100
Wire Wire Line Wire Wire Line
3250 7100 3900 7100 3250 7100 3900 7100
Wire Wire Line Wire Wire Line
2100 7600 2450 7600 2100 7600 3300 7600
Wire Wire Line
2450 7600 3300 7600
Wire Wire Line Wire Wire Line
3300 7600 3300 7300 3300 7600 3300 7300
Wire Wire Line Wire Wire Line
...@@ -637,9 +589,7 @@ Wire Wire Line ...@@ -637,9 +589,7 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
3900 7500 2850 7500 3900 7500 2850 7500
Wire Wire Line Wire Wire Line
3900 7400 2650 7400 3900 7400 2100 7400
Wire Wire Line
2650 7400 2100 7400
Connection ~ 2450 7600 Connection ~ 2450 7600
Connection ~ 2550 7500 Connection ~ 2550 7500
Connection ~ 2650 7400 Connection ~ 2650 7400
...@@ -651,13 +601,9 @@ Wire Wire Line ...@@ -651,13 +601,9 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
2850 7200 2100 7200 2850 7200 2100 7200
Wire Wire Line Wire Wire Line
2850 7950 2850 7500 2850 7950 2850 7200
Wire Wire Line
2850 7500 2850 7200
Wire Wire Line Wire Wire Line
2550 7950 2550 7500 2550 7950 2550 7150
Wire Wire Line
2550 7500 2550 7150
Wire Wire Line Wire Wire Line
2550 7150 2900 7150 2550 7150 2900 7150
Wire Wire Line Wire Wire Line
...@@ -673,85 +619,19 @@ Wire Wire Line ...@@ -673,85 +619,19 @@ Wire Wire Line
Wire Wire Line Wire Wire Line
14250 4150 14350 4150 14250 4150 14350 4150
Wire Bus Line Wire Bus Line
3750 2350 3750 2250 3750 2350 3750 1650
Wire Bus Line
3750 2250 3750 2150
Wire Bus Line
3750 2150 3750 2050
Wire Bus Line
3750 2050 3750 1950
Wire Bus Line
3750 1950 3750 1850
Wire Bus Line
3750 1850 3750 1750
Wire Bus Line
3750 1750 3750 1650
Wire Bus Line
3750 3450 3750 3550
Wire Bus Line
3750 3550 3750 3650
Wire Bus Line
3750 3650 3750 3750
Wire Bus Line
3750 3750 3750 3850
Wire Bus Line
3750 3850 3750 3950
Wire Bus Line
3750 3950 3750 4050
Wire Bus Line
3750 4050 3750 4150
Wire Bus Line
3750 4150 3750 4250
Wire Bus Line
3750 4250 3750 4350
Wire Bus Line
3750 4350 3750 4450
Wire Bus Line Wire Bus Line
3750 4450 3750 4550 3750 3450 3750 5350
Wire Bus Line
3750 4550 3750 5350
Wire Bus Line Wire Bus Line
3300 5350 3750 5350 3300 5350 3750 5350
Wire Bus Line Wire Bus Line
3300 6650 3300 6550 3300 6650 3300 5350
Wire Bus Line
3300 6550 3300 6450
Wire Bus Line
3300 6450 3300 6350
Wire Bus Line
3300 6350 3300 6250
Wire Bus Line
3300 6250 3300 6150
Wire Bus Line
3300 6150 3300 6050
Wire Bus Line
3300 6050 3300 5950
Wire Bus Line
3300 5950 3300 5350
Wire Bus Line
3900 3700 3900 3600
Wire Bus Line Wire Bus Line
3900 3600 3900 3500 3900 3700 3900 2450
Wire Bus Line
3900 3500 3900 3400
Wire Bus Line
3900 3400 3900 3300
Wire Bus Line
3900 3300 3900 3200
Wire Bus Line
3900 3200 3900 3100
Wire Bus Line
3900 3100 3900 3000
Wire Bus Line
3900 3000 3900 2450
Wire Wire Line
13700 3700 13550 3700
Wire Wire Line
13550 3700 12300 3700
Wire Wire Line Wire Wire Line
14200 3700 14350 3700 13700 3700 12300 3700
Wire Wire Line Wire Wire Line
14350 3700 14650 3700 14200 3700 14650 3700
Wire Wire Line Wire Wire Line
15200 3700 15150 3700 15200 3700 15150 3700
Wire Wire Line Wire Wire Line
...@@ -1663,6 +1543,8 @@ P 11200 5700 ...@@ -1663,6 +1543,8 @@ P 11200 5700
F 0 "U9" H 11200 8450 70 0000 C CNN F 0 "U9" H 11200 8450 70 0000 C CNN
F 1 "4003APG120" H 11200 2950 70 0000 C CNN F 1 "4003APG120" H 11200 2950 70 0000 C CNN
F 2 "PGA120" H 11200 2850 60 0000 C CNN F 2 "PGA120" H 11200 2850 60 0000 C CNN
F 4 "50$" H 11200 5700 60 0001 C CNN "price"
F 5 "test" H 11200 5700 60 0001 C CNN "Field5"
1 11200 5700 1 11200 5700
1 0 0 -1 1 0 0 -1
$EndComp $EndComp
......
update=12/06/2010 08:55:18 update=24/06/2010 21:06:23
last_client=pcbnew last_client=pcbnew
[general] [general]
version=1 version=1
...@@ -17,8 +17,8 @@ NetDir= ...@@ -17,8 +17,8 @@ NetDir=
[pcbnew] [pcbnew]
version=1 version=1
PadDrlX=320 PadDrlX=320
PadDimH=700 PadDimH=620
PadDimV=700 PadDimV=1100
BoardThickness=630 BoardThickness=630
SgPcb45=1 SgPcb45=1
TxtPcbV=800 TxtPcbV=800
......
...@@ -340,6 +340,7 @@ void AnnotateComponents( WinEDA_SchematicFrame* parent, ...@@ -340,6 +340,7 @@ void AnnotateComponents( WinEDA_SchematicFrame* parent,
/* Final control (just in case ... )*/ /* Final control (just in case ... )*/
parent->CheckAnnotate( NULL, !annotateSchematic ); parent->CheckAnnotate( NULL, !annotateSchematic );
parent->OnModify( );
parent->DrawPanel->Refresh( true ); parent->DrawPanel->Refresh( true );
} }
......
...@@ -675,13 +675,12 @@ static void CollectStructsToDrag( SCH_SCREEN* screen ) ...@@ -675,13 +675,12 @@ static void CollectStructsToDrag( SCH_SCREEN* screen )
if( Struct->Type() == DRAW_SHEET_STRUCT_TYPE ) if( Struct->Type() == DRAW_SHEET_STRUCT_TYPE )
{ {
SCH_SHEET* sheet = (SCH_SHEET*) Struct;
// Add all pins sheets of a selected hierarchical sheet to the list // Add all pins sheets of a selected hierarchical sheet to the list
SCH_SHEET_PIN* SLabel = ( (SCH_SHEET*) Struct )->m_Label; BOOST_FOREACH( SCH_SHEET_PIN label, sheet->GetSheetPins() )
while( SLabel )
{ {
if( SLabel->Type() == DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE ) AddPickedItem( screen, label.m_Pos );
AddPickedItem( screen, SLabel->m_Pos );
SLabel = (SCH_SHEET_PIN*) SLabel->Next();
} }
} }
......
...@@ -340,31 +340,28 @@ void BuildComponentsListFromSchematic( std::vector <OBJ_CMP_TO_LIST>& aList ) ...@@ -340,31 +340,28 @@ void BuildComponentsListFromSchematic( std::vector <OBJ_CMP_TO_LIST>& aList )
{ {
EDA_BaseStruct* SchItem; EDA_BaseStruct* SchItem;
SCH_COMPONENT* DrawLibItem; SCH_COMPONENT* DrawLibItem;
SCH_SHEET_PATH* sheet; SCH_SHEET_PATH* sheetPath;
/* Build the sheet (not screen) list */ /* Build the sheet (not screen) list */
SCH_SHEET_LIST SheetList; SCH_SHEET_LIST SheetList;
for( sheet = SheetList.GetFirst(); for( sheetPath = SheetList.GetFirst(); sheetPath != NULL; sheetPath = SheetList.GetNext() )
sheet != NULL;
sheet = SheetList.GetNext() )
{ {
for( SchItem = sheet->LastDrawList(); SchItem; for( SchItem = sheetPath->LastDrawList(); SchItem; SchItem = SchItem->Next() )
SchItem = SchItem->Next() )
{ {
if( SchItem->Type() != TYPE_SCH_COMPONENT ) if( SchItem->Type() != TYPE_SCH_COMPONENT )
continue; continue;
DrawLibItem = (SCH_COMPONENT*) SchItem; DrawLibItem = (SCH_COMPONENT*) SchItem;
DrawLibItem->SetParent( sheet->LastScreen() ); DrawLibItem->SetParent( sheetPath->LastScreen() );
OBJ_CMP_TO_LIST item; OBJ_CMP_TO_LIST item;
item.m_RootCmp = DrawLibItem; item.m_RootCmp = DrawLibItem;
item.m_SheetPath = *sheet; item.m_SheetPath = *sheetPath;
item.m_Unit = DrawLibItem->GetUnitSelection( sheet ); item.m_Unit = DrawLibItem->GetUnitSelection( sheetPath );
strncpy( item.m_Reference, strncpy( item.m_Reference,
CONV_TO_UTF8( DrawLibItem->GetRef( sheet ) ), CONV_TO_UTF8( DrawLibItem->GetRef( sheetPath ) ),
sizeof( item.m_Reference ) ); sizeof( item.m_Reference ) );
// Ensure always null terminate m_Ref. // Ensure always null terminate m_Ref.
item.m_Reference[sizeof( item.m_Reference ) - 1 ] = 0; item.m_Reference[sizeof( item.m_Reference ) - 1 ] = 0;
...@@ -384,19 +381,17 @@ void BuildComponentsListFromSchematic( std::vector <OBJ_CMP_TO_LIST>& aList ) ...@@ -384,19 +381,17 @@ void BuildComponentsListFromSchematic( std::vector <OBJ_CMP_TO_LIST>& aList )
static void GenListeGLabels( std::vector <LABEL_OBJECT>& aList ) static void GenListeGLabels( std::vector <LABEL_OBJECT>& aList )
{ {
SCH_ITEM* DrawList; SCH_ITEM* DrawList;
SCH_SHEET_PIN* PinLabel; SCH_SHEET_PATH* sheetPath;
SCH_SHEET_PATH* sheet;
/* Build the sheet list */ /* Build the sheet list */
SCH_SHEET_LIST SheetList; SCH_SHEET_LIST SheetList;
LABEL_OBJECT labet_object; LABEL_OBJECT labet_object;
for( sheet = SheetList.GetFirst(); for( sheetPath = SheetList.GetFirst(); sheetPath != NULL; sheetPath = SheetList.GetNext() )
sheet != NULL;
sheet = SheetList.GetNext() )
{ {
DrawList = (SCH_ITEM*) sheet->LastDrawList(); DrawList = (SCH_ITEM*) sheetPath->LastDrawList();
while( DrawList ) while( DrawList )
{ {
switch( DrawList->Type() ) switch( DrawList->Type() )
...@@ -404,22 +399,21 @@ static void GenListeGLabels( std::vector <LABEL_OBJECT>& aList ) ...@@ -404,22 +399,21 @@ static void GenListeGLabels( std::vector <LABEL_OBJECT>& aList )
case TYPE_SCH_HIERLABEL: case TYPE_SCH_HIERLABEL:
case TYPE_SCH_GLOBALLABEL: case TYPE_SCH_GLOBALLABEL:
labet_object.m_LabelType = DrawList->Type(); labet_object.m_LabelType = DrawList->Type();
labet_object.m_SheetPath = *sheet; labet_object.m_SheetPath = *sheetPath;
labet_object.m_Label = DrawList; labet_object.m_Label = DrawList;
aList.push_back( labet_object ); aList.push_back( labet_object );
break; break;
case DRAW_SHEET_STRUCT_TYPE: case DRAW_SHEET_STRUCT_TYPE:
{ {
PinLabel = ( (SCH_SHEET*) DrawList )->m_Label; SCH_SHEET* sheet = (SCH_SHEET*) DrawList;
while( PinLabel != NULL )
BOOST_FOREACH( SCH_SHEET_PIN sheetLabel, sheet->GetSheetPins() )
{ {
labet_object.m_LabelType = labet_object.m_LabelType = DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE;
DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE; labet_object.m_SheetPath = *sheetPath;
labet_object.m_SheetPath = *sheet; labet_object.m_Label = &sheetLabel;
labet_object.m_Label = PinLabel;
aList.push_back( labet_object ); aList.push_back( labet_object );
PinLabel = PinLabel->Next();
} }
} }
break; break;
...@@ -797,6 +791,10 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart( ...@@ -797,6 +791,10 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart(
// Store fields. Store non empty fields only. // Store fields. Store non empty fields only.
for( int jj = FOOTPRINT; jj < currCmp->GetFieldCount(); jj++ ) for( int jj = FOOTPRINT; jj < currCmp->GetFieldCount(); jj++ )
{ {
//Ensure fields exists in dummy component
if( dummyCmp.GetFieldCount() <= jj )
dummyCmp.AddField( *currCmp->GetField( jj ) );
// store useful data
if( !currCmp->GetField( jj )->m_Text.IsEmpty() ) if( !currCmp->GetField( jj )->m_Text.IsEmpty() )
dummyCmp.GetField( jj )->m_Text = currCmp->GetField( jj )->m_Text; dummyCmp.GetField( jj )->m_Text = currCmp->GetField( jj )->m_Text;
} }
...@@ -845,21 +843,27 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart( ...@@ -845,21 +843,27 @@ int DIALOG_BUILD_BOM::PrintComponentsListByPart(
CONV_TO_UTF8( currCmp->GetField( DATASHEET) ->m_Text ) ); CONV_TO_UTF8( currCmp->GetField( DATASHEET) ->m_Text ) );
#endif #endif
fprintf( f, "%c%s", s_ExportSeparatorSymbol,
CONV_TO_UTF8( RNames ) );
// print fields, on demand // print fields, on demand
for( int jj = FIELD1; jj <= FIELD8 ; jj++ ) int last_nonempty_field_idx = 0;
for( int jj = FOOTPRINT; jj < dummyCmp.GetFieldCount(); jj++ )
if ( !dummyCmp.GetField( jj )->m_Text.IsEmpty() )
last_nonempty_field_idx = jj;
for( int jj = FIELD1; jj <= last_nonempty_field_idx ; jj++ )
{ {
if ( IsFieldChecked( jj ) ) if ( IsFieldChecked( jj ) )
fprintf( f, "%c%4s", s_ExportSeparatorSymbol, fprintf( f, "%c%4s", s_ExportSeparatorSymbol,
CONV_TO_UTF8( dummyCmp.GetField( jj )->m_Text ) ); CONV_TO_UTF8( dummyCmp.GetField( jj )->m_Text ) );
} }
fprintf( f, "%c%s\n", s_ExportSeparatorSymbol, fprintf( f, "\n" );
CONV_TO_UTF8( RNames ) );
// Clear strings and values, to prepare next component // Clear strings and values, to prepare next component
qty = 0; qty = 0;
RNames.Empty(); RNames.Empty();
for( int jj = FOOTPRINT; jj < currCmp->GetFieldCount(); jj++ ) for( int jj = FOOTPRINT; jj < dummyCmp.GetFieldCount(); jj++ )
dummyCmp.GetField( jj )->m_Text.Empty(); dummyCmp.GetField( jj )->m_Text.Empty();
} }
......
This diff is collapsed.
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
#define CLASS_DRAWSHEET_H #define CLASS_DRAWSHEET_H
#include "base_struct.h" #include "base_struct.h"
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/foreach.hpp>
extern SCH_SHEET* g_RootSheet; extern SCH_SHEET* g_RootSheet;
...@@ -21,12 +24,15 @@ extern SCH_SHEET* g_RootSheet; ...@@ -21,12 +24,15 @@ extern SCH_SHEET* g_RootSheet;
*/ */
class SCH_SHEET_PIN : public SCH_ITEM, public EDA_TextStruct class SCH_SHEET_PIN : public SCH_ITEM, public EDA_TextStruct
{ {
private:
int m_Number; ///< Label number use for saving sheet label to file.
///< Sheet label numbering begins at 2.
///< 0 is reserved for the sheet name.
///< 1 is reserve for the sheet file name.
public: public:
int m_Edge, m_Shape; int m_Edge, m_Shape;
bool m_IsDangling; // TRUE non connected bool m_IsDangling; // TRUE non connected
int m_Number; // used to numbered labels when writing data on file .
// m_Number >= 2
// value 0 is for sheet name and 1 for sheet filename
public: public:
SCH_SHEET_PIN( SCH_SHEET* parent, SCH_SHEET_PIN( SCH_SHEET* parent,
...@@ -40,6 +46,7 @@ public: ...@@ -40,6 +46,7 @@ public:
return wxT( "SCH_SHEET_PIN" ); return wxT( "SCH_SHEET_PIN" );
} }
bool operator==( const SCH_SHEET_PIN* aPin ) const;
SCH_SHEET_PIN* GenCopy(); SCH_SHEET_PIN* GenCopy();
...@@ -48,14 +55,43 @@ public: ...@@ -48,14 +55,43 @@ public:
return ( SCH_SHEET_PIN*) Pnext; return ( SCH_SHEET_PIN*) Pnext;
} }
void Place( WinEDA_SchematicFrame* frame, /**
wxDC* DC ); * Get the sheet label number.
*
* @return Number of the sheet label.
*/
int GetNumber() { return m_Number; }
/**
* Set the sheet label number.
*
* @param aNumber - New sheet number label.
*/
void SetNumber( int aNumber );
/**
* Get the parent sheet object of this sheet pin.
*
* @return The sheet that is the parent of this sheet pin or NULL if it does
* not have a parent.
*/
SCH_SHEET* GetParent() const { return (SCH_SHEET*) m_Parent; }
void Place( WinEDA_SchematicFrame* frame, wxDC* DC );
void Draw( WinEDA_DrawPanel* panel, void Draw( WinEDA_DrawPanel* panel,
wxDC* DC, wxDC* DC,
const wxPoint& offset, const wxPoint& offset,
int draw_mode, int draw_mode,
int Color = -1 ); int Color = -1 );
/**
* Plot this sheet pin object to aPlotter.
*
* @param aPlotter - The plotter object to plot to.
*/
void Plot( PLOTTER* aPlotter );
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.sch" * writes the data structures for this object out to a FILE in "*.sch"
...@@ -119,6 +155,9 @@ public: ...@@ -119,6 +155,9 @@ public:
}; };
typedef boost::ptr_vector< SCH_SHEET_PIN > SCH_SHEET_PIN_LIST;
/* class SCH_SHEET /* class SCH_SHEET
* This class is the sheet symbol placed in a schematic, and is the entry point * This class is the sheet symbol placed in a schematic, and is the entry point
* for a sub schematic * for a sub schematic
...@@ -131,10 +170,14 @@ public: ...@@ -131,10 +170,14 @@ public:
* components: it is stored in F0 ... * components: it is stored in F0 ...
* of the file. */ * of the file. */
private: private:
wxString m_FileName; /*also in SCH_SCREEN (redundant), wxString m_FileName; /* also in SCH_SCREEN (redundant),
* but need it here for loading after * but need it here for loading after
* reading the sheet description from * reading the sheet description from
* file. */ * file. */
protected:
SCH_SHEET_PIN_LIST m_labels; /* List of points to be connected.*/
public: public:
int m_SheetNameSize; /* Size (height) of the text, used to int m_SheetNameSize; /* Size (height) of the text, used to
* draw the sheet name */ * draw the sheet name */
...@@ -143,10 +186,6 @@ public: ...@@ -143,10 +186,6 @@ public:
wxPoint m_Pos; wxPoint m_Pos;
wxSize m_Size; /* Position and Size of *sheet symbol */ wxSize m_Size; /* Position and Size of *sheet symbol */
int m_Layer; int m_Layer;
SCH_SHEET_PIN* m_Label; /* Points Be connection, linked
* list.*/
int m_NbLabel; /* Pins sheet (corresponding to
* hierarchical labels) count */
SCH_SCREEN* m_AssociatedScreen; /* Associated Screen which SCH_SCREEN* m_AssociatedScreen; /* Associated Screen which
* handle the physical data * handle the physical data
* In complex hierarchies we * In complex hierarchies we
...@@ -176,14 +215,60 @@ public: ...@@ -176,14 +215,60 @@ public:
SCH_SHEET* GenCopy(); SCH_SHEET* GenCopy();
void DisplayInfo( WinEDA_DrawFrame* frame ); void DisplayInfo( WinEDA_DrawFrame* frame );
/** Function CleanupSheet /**
* Delete pinsheets which are not corresponding to a hierarchical label * Add aLabel to this sheet.
* @param aFrame = the schematic frame *
* @param aRedraw = true to redraw Sheet * Note: Once a label is added to the sheet, it is owned by the sheet.
* @param aSaveForUndoRedo = true to put this sheet in UndoRedo list, * Do not delete the label object or you will likely get a segfault
* if it is modified. * when this sheet is destroyed.
*
* @param aLabel - The label to add to the sheet.
*/
void AddLabel( SCH_SHEET_PIN* aLabel );
SCH_SHEET_PIN_LIST& GetSheetPins() { return m_labels; }
/**
* Remove a sheet label from this sheet.
*
* @param aSheetLabel - The sheet label to remove from the list.
*/
void RemoveLabel( SCH_SHEET_PIN* aSheetLabel );
/**
* Delete sheet label which do not have a corresponding hierarchical label.
*
* Note: Make sure you save a copy of the sheet in the undo list before calling
* CleanupSheet() otherwise any unrefernced sheet labels will be lost.
*/
void CleanupSheet();
/**
* Return the label found at aPosition in this sheet.
*
* @param aPosition - The position to check for a label.
*
* @return The label found at aPosition or NULL if no label is found.
*/
SCH_SHEET_PIN* GetLabel( const wxPoint& aPosition );
/**
* Checks if a label already exists with aName.
*
* @param aName - Name of label to search for.
*
* @return - True if label found, otherwise false.
*/ */
void CleanupSheet( WinEDA_SchematicFrame* frame, bool aRedraw, bool aSaveForUndoRedo ); bool HasLabel( const wxString& aName );
bool HasLabels() { return !m_labels.empty(); }
/**
* Check all sheet labels against schematic for undefined hierarchical labels.
*
* @return True if there are any undefined labels.
*/
bool HasUndefinedLabels();
/** Function GetPenSize /** Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item * @return the size of the "pen" that be used to draw or plot this item
...@@ -272,7 +357,7 @@ public: ...@@ -272,7 +357,7 @@ public:
wxString GetFileName( void ); wxString GetFileName( void );
// Set a new filename without changing anything else // Set a new filename without changing anything else
void SetFileName( const wxString& aFilename ) void SetFileName( const wxString& aFilename )
{ {
m_FileName = aFilename; m_FileName = aFilename;
} }
...@@ -304,11 +389,9 @@ public: ...@@ -304,11 +389,9 @@ public:
virtual void Move( const wxPoint& aMoveVector ) virtual void Move( const wxPoint& aMoveVector )
{ {
m_Pos += aMoveVector; m_Pos += aMoveVector;
SCH_SHEET_PIN* label = m_Label; BOOST_FOREACH( SCH_SHEET_PIN& label, m_labels )
while( label != NULL )
{ {
label->Move( aMoveVector ); label.Move( aMoveVector );
label = label->Next();
} }
} }
...@@ -323,18 +406,35 @@ public: ...@@ -323,18 +406,35 @@ public:
* Compare schematic sheet file and sheet name against search string. * Compare schematic sheet file and sheet name against search string.
* *
* @param aSearchData - Criteria to search against. * @param aSearchData - Criteria to search against.
* @param aCaseSensitive - True for case sensitive search. *
* @param aWholeWord - True to match whole word.
* @return True if this item matches the search criteria. * @return True if this item matches the search criteria.
*/ */
virtual bool Matches( wxFindReplaceData& aSearchData ); virtual bool Matches( wxFindReplaceData& aSearchData );
/**
* Resize this sheet to aSize and adjust all of the labels accordingly.
*
* @param aSize - The new size for this sheet.
*/
void Resize( const wxSize& aSize );
#if defined(DEBUG) #if defined(DEBUG)
// comment inherited by Doxygen from Base_Struct // comment inherited by Doxygen from Base_Struct
void Show( int nestLevel, std::ostream& os ); void Show( int nestLevel, std::ostream& os );
#endif #endif
protected:
/**
* Renumber labels in list.
*
* This method is used internally by SCH_SHEET to update the label numbering
* when the label list changes. Make sure you call this method any time a
* label is added or removed.
*/
void renumberLabels();
}; };
#endif /* CLASS_DRAWSHEET_H */ #endif /* CLASS_DRAWSHEET_H */
...@@ -16,20 +16,16 @@ ...@@ -16,20 +16,16 @@
#include "common.h" #include "common.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "drawtxt.h" #include "drawtxt.h"
#include "plot_common.h"
#include "program.h" #include "program.h"
#include "general.h" #include "general.h"
#include "protos.h" #include "protos.h"
/*******************************************************************/ SCH_SHEET_PIN::SCH_SHEET_PIN( SCH_SHEET* parent, const wxPoint& pos, const wxString& text ) :
SCH_SHEET_PIN::SCH_SHEET_PIN( SCH_SHEET* parent, SCH_ITEM( parent, DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE ), EDA_TextStruct( text )
const wxPoint& pos,
const wxString& text ) :
SCH_ITEM( parent, DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE ),
EDA_TextStruct( text )
{ {
/*******************************************************************/
wxASSERT( parent ); wxASSERT( parent );
wxASSERT( Pnext == NULL ); wxASSERT( Pnext == NULL );
m_Layer = LAYER_SHEETLABEL; m_Layer = LAYER_SHEETLABEL;
...@@ -41,12 +37,9 @@ SCH_SHEET_PIN::SCH_SHEET_PIN( SCH_SHEET* parent, ...@@ -41,12 +37,9 @@ SCH_SHEET_PIN::SCH_SHEET_PIN( SCH_SHEET* parent,
} }
/***********************************************************/
SCH_SHEET_PIN* SCH_SHEET_PIN::GenCopy() SCH_SHEET_PIN* SCH_SHEET_PIN::GenCopy()
{ {
/***********************************************************/ SCH_SHEET_PIN* newitem = new SCH_SHEET_PIN( (SCH_SHEET*) m_Parent, m_Pos, m_Text );
SCH_SHEET_PIN* newitem =
new SCH_SHEET_PIN( (SCH_SHEET*) m_Parent, m_Pos, m_Text );
newitem->m_Edge = m_Edge; newitem->m_Edge = m_Edge;
newitem->m_Shape = m_Shape; newitem->m_Shape = m_Shape;
...@@ -56,6 +49,12 @@ SCH_SHEET_PIN* SCH_SHEET_PIN::GenCopy() ...@@ -56,6 +49,12 @@ SCH_SHEET_PIN* SCH_SHEET_PIN::GenCopy()
} }
bool SCH_SHEET_PIN::operator==(const SCH_SHEET_PIN* aPin ) const
{
return aPin == this;
}
/** Function GetPenSize /** Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item * @return the size of the "pen" that be used to draw or plot this item
*/ */
...@@ -65,6 +64,16 @@ int SCH_SHEET_PIN::GetPenSize() ...@@ -65,6 +64,16 @@ int SCH_SHEET_PIN::GetPenSize()
} }
void SCH_SHEET_PIN::SetNumber( int aNumber )
{
wxASSERT( aNumber >= 2 );
m_Number = aNumber;
}
/*****************************************************************************/
/* Routine to create hierarchical labels */
/*****************************************************************************/ /*****************************************************************************/
void SCH_SHEET_PIN::Draw( WinEDA_DrawPanel* panel, void SCH_SHEET_PIN::Draw( WinEDA_DrawPanel* panel,
wxDC* DC, wxDC* DC,
...@@ -72,8 +81,6 @@ void SCH_SHEET_PIN::Draw( WinEDA_DrawPanel* panel, ...@@ -72,8 +81,6 @@ void SCH_SHEET_PIN::Draw( WinEDA_DrawPanel* panel,
int DrawMode, int DrawMode,
int Color ) int Color )
{ {
/*****************************************************************************/
/* Routine to create hierarchical labels */
GRTextHorizJustifyType side; GRTextHorizJustifyType side;
EDA_Colors txtcolor; EDA_Colors txtcolor;
int posx, tposx, posy; int posx, tposx, posy;
...@@ -117,6 +124,47 @@ void SCH_SHEET_PIN::Draw( WinEDA_DrawPanel* panel, ...@@ -117,6 +124,47 @@ void SCH_SHEET_PIN::Draw( WinEDA_DrawPanel* panel,
} }
void SCH_SHEET_PIN::Plot( PLOTTER* aPlotter )
{
wxASSERT( aPlotter != NULL );
EDA_Colors txtcolor = UNSPECIFIED_COLOR;
int posx, tposx, posy, size;
static std::vector <wxPoint> Poly;
txtcolor = ReturnLayerColor( GetLayer() );
posx = m_Pos.x;
posy = m_Pos.y;
size = m_Size.x;
GRTextHorizJustifyType side;
if( m_Edge )
{
tposx = posx - size;
side = GR_TEXT_HJUSTIFY_RIGHT;
}
else
{
tposx = posx + size + (size / 8);
side = GR_TEXT_HJUSTIFY_LEFT;
}
int thickness = GetPenSize();
aPlotter->set_current_line_width( thickness );
aPlotter->text( wxPoint( tposx, posy ), txtcolor, m_Text, TEXT_ORIENT_HORIZ,
wxSize( size, size ), side, GR_TEXT_VJUSTIFY_CENTER, thickness,
m_Italic, m_Bold );
/* Draw the associated graphic symbol */
CreateGraphicShape( Poly, m_Pos );
aPlotter->poly( Poly.size(), &Poly[0].x, NO_FILL );
}
/** function CreateGraphicShape /** function CreateGraphicShape
* Calculates the graphic shape (a polygon) associated to the text * Calculates the graphic shape (a polygon) associated to the text
* @param aCorner_list = list to fill with polygon corners coordinates * @param aCorner_list = list to fill with polygon corners coordinates
......
...@@ -180,13 +180,13 @@ void LIB_ALIAS::SetComponent( LIB_COMPONENT* aComponent ) ...@@ -180,13 +180,13 @@ void LIB_ALIAS::SetComponent( LIB_COMPONENT* aComponent )
LIB_COMPONENT::LIB_COMPONENT( const wxString& aName, CMP_LIBRARY* aLibrary ) : LIB_COMPONENT::LIB_COMPONENT( const wxString& aName, CMP_LIBRARY* aLibrary ) :
CMP_LIB_ENTRY( ROOT, aName, aLibrary ) CMP_LIB_ENTRY( ROOT, aName, aLibrary )
{ {
m_LastDate = 0; m_dateModified = 0;
unitCount = 1; unitCount = 1;
m_TextInside = 40; m_pinNameOffset = 40;
m_options = ENTRY_NORMAL; m_options = ENTRY_NORMAL;
m_UnitSelectionLocked = FALSE; m_unitsLocked = FALSE;
m_DrawPinNum = 1; m_showPinNumbers = true;
m_DrawPinName = 1; m_showPinNames = true;
// Add the MANDATORY_FIELDS in RAM only. These are assumed to be present // Add the MANDATORY_FIELDS in RAM only. These are assumed to be present
// when the field editors are invoked. // when the field editors are invoked.
...@@ -209,11 +209,11 @@ LIB_COMPONENT::LIB_COMPONENT( LIB_COMPONENT& aComponent, CMP_LIBRARY* aLibrary ) ...@@ -209,11 +209,11 @@ LIB_COMPONENT::LIB_COMPONENT( LIB_COMPONENT& aComponent, CMP_LIBRARY* aLibrary )
m_aliasListData = aComponent.m_aliasListData; m_aliasListData = aComponent.m_aliasListData;
m_FootprintList = aComponent.m_FootprintList; m_FootprintList = aComponent.m_FootprintList;
unitCount = aComponent.unitCount; unitCount = aComponent.unitCount;
m_UnitSelectionLocked = aComponent.m_UnitSelectionLocked; m_unitsLocked = aComponent.m_unitsLocked;
m_TextInside = aComponent.m_TextInside; m_pinNameOffset = aComponent.m_pinNameOffset;
m_DrawPinNum = aComponent.m_DrawPinNum; m_showPinNumbers = aComponent.m_showPinNumbers;
m_DrawPinName = aComponent.m_DrawPinName; m_showPinNames = aComponent.m_showPinNames;
m_LastDate = aComponent.m_LastDate; m_dateModified = aComponent.m_dateModified;
m_options = aComponent.m_options; m_options = aComponent.m_options;
BOOST_FOREACH( LIB_DRAW_ITEM& oldItem, aComponent.GetDrawItemList() ) BOOST_FOREACH( LIB_DRAW_ITEM& oldItem, aComponent.GetDrawItemList() )
...@@ -554,10 +554,10 @@ bool LIB_COMPONENT::Save( FILE* aFile ) ...@@ -554,10 +554,10 @@ bool LIB_COMPONENT::Save( FILE* aFile )
} }
if( fprintf( aFile, " %d %d %c %c %d %c %c\n", if( fprintf( aFile, " %d %d %c %c %d %c %c\n",
0, m_TextInside, 0, m_pinNameOffset,
m_DrawPinNum ? 'Y' : 'N', m_showPinNumbers ? 'Y' : 'N',
m_DrawPinName ? 'Y' : 'N', m_showPinNames ? 'Y' : 'N',
unitCount, m_UnitSelectionLocked ? 'L' : 'F', unitCount, m_unitsLocked ? 'L' : 'F',
m_options == ENTRY_POWER ? 'P' : 'N' ) < 0 ) m_options == ENTRY_POWER ? 'P' : 'N' ) < 0 )
return false; return false;
...@@ -688,7 +688,7 @@ bool LIB_COMPONENT::Load( FILE* aFile, char* aLine, int* aLineNum, ...@@ -688,7 +688,7 @@ bool LIB_COMPONENT::Load( FILE* aFile, char* aLine, int* aLineNum,
|| ( p = strtok( NULL, " \t\n" ) ) == NULL /* NumOfPins: */ || ( p = strtok( NULL, " \t\n" ) ) == NULL /* NumOfPins: */
|| sscanf( p, "%d", &unused ) != 1 || sscanf( p, "%d", &unused ) != 1
|| ( p = strtok( NULL, " \t\n" ) ) == NULL /* TextInside: */ || ( p = strtok( NULL, " \t\n" ) ) == NULL /* TextInside: */
|| sscanf( p, "%d", &m_TextInside ) != 1 || sscanf( p, "%d", &m_pinNameOffset ) != 1
|| ( p = strtok( NULL, " \t\n" ) ) == NULL /* DrawNums: */ || ( p = strtok( NULL, " \t\n" ) ) == NULL /* DrawNums: */
|| sscanf( p, "%c", &drawnum ) != 1 || sscanf( p, "%c", &drawnum ) != 1
|| ( p = strtok( NULL, " \t\n" ) ) == NULL /* DrawNums: */ || ( p = strtok( NULL, " \t\n" ) ) == NULL /* DrawNums: */
...@@ -712,8 +712,8 @@ bool LIB_COMPONENT::Load( FILE* aFile, char* aLine, int* aLineNum, ...@@ -712,8 +712,8 @@ bool LIB_COMPONENT::Load( FILE* aFile, char* aLine, int* aLineNum,
if( unitCount < 1 ) if( unitCount < 1 )
unitCount = 1; unitCount = 1;
m_DrawPinNum = ( drawnum == 'N' ) ? FALSE : true; m_showPinNumbers = ( drawnum == 'N' ) ? false : true;
m_DrawPinName = ( drawname == 'N' ) ? FALSE : true; m_showPinNames = ( drawname == 'N' ) ? false : true;
/* Copy part name and prefix. */ /* Copy part name and prefix. */
LIB_FIELD& value = GetValueField(); LIB_FIELD& value = GetValueField();
...@@ -743,7 +743,7 @@ bool LIB_COMPONENT::Load( FILE* aFile, char* aLine, int* aLineNum, ...@@ -743,7 +743,7 @@ bool LIB_COMPONENT::Load( FILE* aFile, char* aLine, int* aLineNum,
// Copy optional infos // Copy optional infos
if( ( p = strtok( NULL, " \t\n" ) ) != NULL && *p == 'L' ) if( ( p = strtok( NULL, " \t\n" ) ) != NULL && *p == 'L' )
m_UnitSelectionLocked = true; m_unitsLocked = true;
if( ( p = strtok( NULL, " \t\n" ) ) != NULL && *p == 'P' ) if( ( p = strtok( NULL, " \t\n" ) ) != NULL && *p == 'P' )
m_options = ENTRY_POWER; m_options = ENTRY_POWER;
...@@ -1101,15 +1101,15 @@ bool LIB_COMPONENT::SaveDateAndTime( FILE* aFile ) ...@@ -1101,15 +1101,15 @@ bool LIB_COMPONENT::SaveDateAndTime( FILE* aFile )
{ {
int year, mon, day, hour, min, sec; int year, mon, day, hour, min, sec;
if( m_LastDate == 0 ) if( m_dateModified == 0 )
return true; return true;
sec = m_LastDate & 63; sec = m_dateModified & 63;
min = ( m_LastDate >> 6 ) & 63; min = ( m_dateModified >> 6 ) & 63;
hour = ( m_LastDate >> 12 ) & 31; hour = ( m_dateModified >> 12 ) & 31;
day = ( m_LastDate >> 17 ) & 31; day = ( m_dateModified >> 17 ) & 31;
mon = ( m_LastDate >> 22 ) & 15; mon = ( m_dateModified >> 22 ) & 15;
year = ( m_LastDate >> 26 ) + 1990; year = ( m_dateModified >> 26 ) + 1990;
if ( fprintf( aFile, "Ti %d/%d/%d %d:%d:%d\n", if ( fprintf( aFile, "Ti %d/%d/%d %d:%d:%d\n",
year, mon, day, hour, min, sec ) < 0 ) year, mon, day, hour, min, sec ) < 0 )
...@@ -1134,7 +1134,7 @@ bool LIB_COMPONENT::LoadDateAndTime( char* aLine ) ...@@ -1134,7 +1134,7 @@ bool LIB_COMPONENT::LoadDateAndTime( char* aLine )
&year, &mon, &day, &hour, &min, &sec ) != 6 ) &year, &mon, &day, &hour, &min, &sec ) != 6 )
return false; return false;
m_LastDate = ( sec & 63 ) + ( ( min & 63 ) << 6 ) + m_dateModified = ( sec & 63 ) + ( ( min & 63 ) << 6 ) +
( ( hour & 31 ) << 12 ) + ( ( day & 31 ) << 17 ) + ( ( hour & 31 ) << 12 ) + ( ( day & 31 ) << 17 ) +
( ( mon & 15 ) << 22 ) + ( ( year - 1990 ) << 26 ); ( ( mon & 15 ) << 22 ) + ( ( year - 1990 ) << 26 );
...@@ -1192,7 +1192,7 @@ int LIB_COMPONENT::SelectItems( EDA_Rect& aRect, int aUnit, int aConvert, ...@@ -1192,7 +1192,7 @@ int LIB_COMPONENT::SelectItems( EDA_Rect& aRect, int aUnit, int aConvert,
continue; continue;
// Specific rules for pins. // Specific rules for pins.
if( aEditPinByPin || m_UnitSelectionLocked if( aEditPinByPin || m_unitsLocked
|| ( item.m_Convert && item.m_Convert != aConvert ) ) || ( item.m_Convert && item.m_Convert != aConvert ) )
continue; continue;
} }
......
This diff is collapsed.
...@@ -81,8 +81,8 @@ void NETLIST_OBJECT::Show( std::ostream& out, int ndx ) ...@@ -81,8 +81,8 @@ void NETLIST_OBJECT::Show( std::ostream& out, int ndx )
out << " <start " << m_Start << "/> <end " << m_End << "/>\n"; out << " <start " << m_Start << "/> <end " << m_End << "/>\n";
if( m_Label ) if( !m_Label.IsEmpty() )
out << " <label>" << m_Label->mb_str() << "</label>\n"; out << " <label>" << m_Label.mb_str() << "</label>\n";
if( m_Comp ) if( m_Comp )
m_Comp->Show( 1, out ); m_Comp->Show( 1, out );
...@@ -98,52 +98,39 @@ void NETLIST_OBJECT::Show( std::ostream& out, int ndx ) ...@@ -98,52 +98,39 @@ void NETLIST_OBJECT::Show( std::ostream& out, int ndx )
NETLIST_OBJECT::NETLIST_OBJECT() NETLIST_OBJECT::NETLIST_OBJECT()
{ {
m_Type = NET_ITEM_UNSPECIFIED; /* Type of this item (see NetObjetType enum) */ m_Type = NET_ITEM_UNSPECIFIED; /* Type of this item (see NetObjetType enum) */
m_Comp = NULL; /* Pointer on the library item that created this net object (the parent)*/ m_Comp = NULL; /* Pointer on the library item that created this net object
m_Link = NULL; /* For SCH_SHEET_PIN: * (the parent)*/
* Pointer to the hierarchy sheet that contains this SCH_SHEET_PIN m_Link = NULL; /* For SCH_SHEET_PIN:
* For Pins: pointer to the component that contains this pin * Pointer to the hierarchy sheet that contains this
*/ * SCH_SHEET_PIN For Pins: pointer to the component that
m_Flag = 0; /* flag used in calculations */ * contains this pin
m_ElectricalType = 0; /* Has meaning only for Pins and hierachical pins: electrical type */ */
m_NetCode = 0; /* net code for all items except BUS labels because a BUS label has m_Flag = 0; /* flag used in calculations */
* as many net codes as bus members m_ElectricalType = 0; /* Has meaning only for Pins and hierachical pins: electrical
*/ * type */
m_BusNetCode = 0; /* Used for BUS connections */ m_NetCode = 0; /* net code for all items except BUS labels because a BUS
m_Member = 0; /* for labels type NET_BUSLABELMEMBER ( bus member created from the BUS label ) * label has as many net codes as bus members
* member number */
*/ m_BusNetCode = 0; /* Used for BUS connections */
m_Member = 0; /* for labels type NET_BUSLABELMEMBER ( bus member created
* from the BUS label ) member number
*/
m_FlagOfConnection = UNCONNECTED; m_FlagOfConnection = UNCONNECTED;
m_PinNum = 0; /* pin number ( 1 long = 4 bytes -> 4 ascii codes) */ m_PinNum = 0; /* pin number ( 1 long = 4 bytes -> 4 ascii codes) */
m_Label = 0; /* For all labels:pointer on the text label */ m_NetNameCandidate = NULL; /* a pointer to a NETLIST_OBJECT type label connected to this
* object used to give a name to the net
*/
} }
// Copy constructor // Copy constructor
NETLIST_OBJECT::NETLIST_OBJECT( NETLIST_OBJECT& aSource ) NETLIST_OBJECT::NETLIST_OBJECT( NETLIST_OBJECT& aSource )
{ {
*this = aSource; *this = aSource;
m_Label = NULL; // set to null because some items are owner, so the delete operator can create problems
// if this member is copied here (if 2 different items are owner of the same object)
} }
NETLIST_OBJECT::~NETLIST_OBJECT() NETLIST_OBJECT::~NETLIST_OBJECT()
{ {
/* NETLIST_OBJECT is owner of m_Label only if its type is
* NET_HIERBUSLABELMEMBER, NET_GLOBBUSLABELMEMBER, NET_SHEETBUSLABELMEMBER or NET_BUSLABELMEMBER
* So we must delete m_Label only for these cases
* ( see the note in ConvertBustToMembers)
*/
switch( m_Type )
{
default:
break;
case NET_HIERBUSLABELMEMBER:
case NET_GLOBBUSLABELMEMBER:
case NET_SHEETBUSLABELMEMBER:
case NET_BUSLABELMEMBER:
SAFE_DELETE( m_Label );
break;
}
} }
...@@ -64,18 +64,18 @@ public: ...@@ -64,18 +64,18 @@ public:
* For Pins: pointer to the component * For Pins: pointer to the component
* that contains this pin * that contains this pin
*/ */
int m_Flag; /* flag used in calculations */ int m_Flag; /* flag used in calculations */
SCH_SHEET_PATH m_SheetList; SCH_SHEET_PATH m_SheetList;
int m_ElectricalType; /* Has meaning only for Pins and int m_ElectricalType; /* Has meaning only for Pins and
* hierarchical pins: electrical type */ * hierarchical pins: electrical type */
private: private:
int m_NetCode; /* net code for all items except BUS int m_NetCode; /* net code for all items except BUS
* labels because a BUS label has * labels because a BUS label has
* as many net codes as bus members * as many net codes as bus members
*/ */
public: public:
int m_BusNetCode; /* Used for BUS connections */ int m_BusNetCode; /* Used for BUS connections */
int m_Member; /* for labels type NET_BUSLABELMEMBER int m_Member; /* for labels type NET_BUSLABELMEMBER
* ( bus member created from the BUS * ( bus member created from the BUS
* label ) member number * label ) member number
*/ */
...@@ -84,12 +84,15 @@ public: ...@@ -84,12 +84,15 @@ public:
* connects to.*/ * connects to.*/
long m_PinNum; /* pin number ( 1 long = 4 bytes -> long m_PinNum; /* pin number ( 1 long = 4 bytes ->
* 4 ascii codes) */ * 4 ascii codes) */
const wxString* m_Label; /* For all labels:pointer on the text wxString m_Label; /* Label text. */
* label */
wxPoint m_Start; // Position of object or for segments: wxPoint m_Start; // Position of object or for segments:
// starting point // starting point
wxPoint m_End; // For segments (wire and buses): wxPoint m_End; // For segments (wire and buses):
// ending point // ending point
NETLIST_OBJECT* m_NetNameCandidate; /* a pointer to a label connected to the net,
* that can be used to give a name to the net
* NULL if no usable label
*/
#if defined(DEBUG) #if defined(DEBUG)
void Show( std::ostream& out, int ndx ); void Show( std::ostream& out, int ndx );
......
...@@ -809,8 +809,8 @@ void LIB_PIN::Draw( WinEDA_DrawPanel* aPanel, ...@@ -809,8 +809,8 @@ void LIB_PIN::Draw( WinEDA_DrawPanel* aPanel,
if( DrawPinText ) if( DrawPinText )
{ {
DrawPinTexts( aPanel, aDC, pos1, orient, Entry->m_TextInside, DrawPinTexts( aPanel, aDC, pos1, orient, Entry->GetPinNameOffset(),
Entry->m_DrawPinNum, Entry->m_DrawPinName, Entry->ShowPinNumbers(), Entry->ShowPinNames(),
aColor, aDrawMode ); aColor, aDrawMode );
} }
...@@ -1610,8 +1610,8 @@ void LIB_PIN::DoPlot( PLOTTER* plotter, const wxPoint& offset, bool fill, ...@@ -1610,8 +1610,8 @@ void LIB_PIN::DoPlot( PLOTTER* plotter, const wxPoint& offset, bool fill,
plotter->set_current_line_width( GetPenSize() ); plotter->set_current_line_width( GetPenSize() );
PlotPinSymbol( plotter, pos, m_PinLen, orient, m_PinShape ); PlotPinSymbol( plotter, pos, m_PinLen, orient, m_PinShape );
PlotPinTexts( plotter, pos, orient, GetParent()->m_TextInside, PlotPinTexts( plotter, pos, orient, GetParent()->GetPinNameOffset(),
GetParent()->m_DrawPinNum, GetParent()->m_DrawPinName, GetParent()->ShowPinNumbers(), GetParent()->ShowPinNames(),
GetPenSize() ); GetPenSize() );
} }
......
...@@ -659,7 +659,7 @@ void SCH_COMPONENT::ClearAnnotation( SCH_SHEET_PATH* aSheet ) ...@@ -659,7 +659,7 @@ void SCH_COMPONENT::ClearAnnotation( SCH_SHEET_PATH* aSheet )
Entry = CMP_LIBRARY::FindLibraryComponent( m_ChipName ); Entry = CMP_LIBRARY::FindLibraryComponent( m_ChipName );
if( Entry && Entry->m_UnitSelectionLocked ) if( Entry && Entry->UnitsLocked() )
KeepMulti = true; KeepMulti = true;
while( defRef.Last() == '?' ) while( defRef.Last() == '?' )
......
...@@ -415,18 +415,15 @@ DanglingEndHandle* RebuildEndList( EDA_BaseStruct* DrawList ) ...@@ -415,18 +415,15 @@ DanglingEndHandle* RebuildEndList( EDA_BaseStruct* DrawList )
case DRAW_SHEET_STRUCT_TYPE: case DRAW_SHEET_STRUCT_TYPE:
{ {
SCH_SHEET_PIN* pinsheet; SCH_SHEET* sheet = (SCH_SHEET*) DrawItem;
for( pinsheet = ( (SCH_SHEET*) DrawItem )->m_Label;
pinsheet; BOOST_FOREACH( SCH_SHEET_PIN pinsheet, sheet->GetSheetPins() )
pinsheet = pinsheet->Next() )
{ {
wxASSERT( pinsheet->Type() == wxASSERT( pinsheet.Type() == DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE );
DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE );
item = new DanglingEndHandle( SHEET_LABEL_END ); item = new DanglingEndHandle( SHEET_LABEL_END );
item->m_Item = &pinsheet;
item->m_Item = pinsheet; item->m_Pos = pinsheet.m_Pos;
item->m_Pos = pinsheet->m_Pos;
if( lastitem ) if( lastitem )
lastitem->m_Pnext = item; lastitem->m_Pnext = item;
......
...@@ -389,7 +389,6 @@ bool LocateAndDeleteItem( WinEDA_SchematicFrame* frame, wxDC* DC ) ...@@ -389,7 +389,6 @@ bool LocateAndDeleteItem( WinEDA_SchematicFrame* frame, wxDC* DC )
void EraseStruct( SCH_ITEM* DrawStruct, SCH_SCREEN* Screen ) void EraseStruct( SCH_ITEM* DrawStruct, SCH_SCREEN* Screen )
{ {
EDA_BaseStruct* DrawList; EDA_BaseStruct* DrawList;
SCH_SHEET_PIN* SheetLabel, * NextLabel;
if( DrawStruct == NULL ) if( DrawStruct == NULL )
return; return;
...@@ -401,44 +400,12 @@ void EraseStruct( SCH_ITEM* DrawStruct, SCH_SCREEN* Screen ) ...@@ -401,44 +400,12 @@ void EraseStruct( SCH_ITEM* DrawStruct, SCH_SCREEN* Screen )
if( DrawStruct->Type() == DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE ) if( DrawStruct->Type() == DRAW_HIERARCHICAL_PIN_SHEET_STRUCT_TYPE )
{ {
//this structure is attached to a sheet , which we must find. // This structure is attached to a sheet, get the parent sheet object.
DrawList = Screen->EEDrawList; SCH_SHEET_PIN* sheetLabel = (SCH_SHEET_PIN*) DrawStruct;
for( ; DrawList != NULL; DrawList = DrawList->Next() ) SCH_SHEET* sheet = sheetLabel->GetParent();
{ wxASSERT_MSG( sheet != NULL,
if( DrawList->Type() != DRAW_SHEET_STRUCT_TYPE ) wxT( "Sheet label parent not properly set, bad programmer!" ) );
continue; sheet->RemoveLabel( sheetLabel );
/* See if our item is in this Sheet */
SheetLabel = ( (SCH_SHEET*) DrawList )->m_Label;
if( SheetLabel == NULL )
continue;
if( SheetLabel == (SCH_SHEET_PIN*) DrawStruct )
{
( (SCH_SHEET*) DrawList )->m_Label =
(SCH_SHEET_PIN*) SheetLabel->Next();
SAFE_DELETE( DrawStruct );
return;
}
else
{
while( SheetLabel->Next() )
{
NextLabel = (SCH_SHEET_PIN*) SheetLabel->Next();
if( NextLabel == (SCH_SHEET_PIN*) DrawStruct )
{
SheetLabel->SetNext( (EDA_BaseStruct*) NextLabel->Next() );
SAFE_DELETE( DrawStruct );
return;
}
SheetLabel = NextLabel;
}
}
}
return; return;
} }
else else
......
This diff is collapsed.
This diff is collapsed.
...@@ -763,7 +763,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel() ...@@ -763,7 +763,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel()
} }
// Show the "Parts Locked" option? // Show the "Parts Locked" option?
if( !m_LibEntry || !m_LibEntry->m_UnitSelectionLocked ) if( !m_LibEntry || !m_LibEntry->UnitsLocked() )
{ {
D( printf( "partsAreLocked->false\n" ); ) D( printf( "partsAreLocked->false\n" ); )
partsAreLockedLabel->Show( false ); partsAreLockedLabel->Show( false );
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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