add patch from Cirilo Bernardo (about IDF export) , and minor fixes.

This commit is contained in:
Cirilo Bernardo 2014-01-25 15:36:56 +01:00 committed by jean-pierre charras
commit 4f29440f5f
33 changed files with 10280 additions and 10019 deletions

View File

@ -59,7 +59,7 @@ void S3D_MATERIAL::SetMaterial()
void S3D_MASTER::Copy( S3D_MASTER* pattern )
{
m_Shape3DName = pattern->m_Shape3DName;
SetShape3DName( pattern->GetShape3DName() );
m_MatScale = pattern->m_MatScale;
m_MatRotation = pattern->m_MatRotation;
m_MatPosition = pattern->m_MatPosition;
@ -74,6 +74,7 @@ S3D_MASTER::S3D_MASTER( EDA_ITEM* aParent ) :
m_MatScale.x = m_MatScale.y = m_MatScale.z = 1.0;
m_3D_Drawings = NULL;
m_Materials = NULL;
m_ShapeType = FILE3D_NONE;
}
@ -96,6 +97,45 @@ S3D_MASTER:: ~S3D_MASTER()
}
bool S3D_MASTER::Is3DType( enum FILE3D_TYPE aShapeType )
{
// type 'none' is not valid and will always return false
if( aShapeType == FILE3D_NONE )
return false;
// no one is interested if we have no file
if( m_Shape3DName.empty() )
return false;
if( aShapeType == m_ShapeType )
return true;
return false;
}
void S3D_MASTER::SetShape3DName( const wxString& aShapeName )
{
m_ShapeType = FILE3D_NONE;
m_Shape3DName = aShapeName;
if( m_Shape3DName.empty() )
return;
wxFileName fn = m_Shape3DName;
wxString ext = fn.GetExt();
if( ext == wxT( "wrl" ) || ext == wxT( "x3d" ) )
m_ShapeType = FILE3D_VRML;
else if( ext == wxT( "idf" ) )
m_ShapeType = FILE3D_IDF;
else
m_ShapeType = FILE3D_UNKNOWN;
return;
}
STRUCT_3D_SHAPE::STRUCT_3D_SHAPE( EDA_ITEM* aParent ) :
EDA_ITEM( aParent, NOT_USED )
{

View File

@ -857,7 +857,7 @@ void MODULE::ReadAndInsert3DComponentShape( EDA_3D_CANVAS* glcanvas )
for( ; struct3D != NULL; struct3D = struct3D->Next() )
{
if( !struct3D->m_Shape3DName.IsEmpty() )
if( struct3D->Is3DType( S3D_MASTER::FILE3D_VRML ) )
struct3D->ReadData();
}

View File

@ -92,13 +92,24 @@ public:
class S3D_MASTER : public EDA_ITEM
{
public:
wxString m_Shape3DName; /* 3D shape name in 3D library */
S3D_VERTEX m_MatScale;
S3D_VERTEX m_MatRotation;
S3D_VERTEX m_MatPosition;
STRUCT_3D_SHAPE* m_3D_Drawings;
S3D_MATERIAL* m_Materials;
enum FILE3D_TYPE
{
FILE3D_NONE = 0,
FILE3D_VRML,
FILE3D_IDF,
FILE3D_UNKNOWN
};
private:
wxString m_Shape3DName; /* 3D shape name in 3D library */
FILE3D_TYPE m_ShapeType;
public:
S3D_MASTER( EDA_ITEM* aParent );
~S3D_MASTER();
@ -120,6 +131,20 @@ public:
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override
#endif
/**
* Function Is3DType
* returns true if the argument matches the type of model referred to
* by m_Shape3DName
*/
bool Is3DType( enum FILE3D_TYPE aShapeType );
const wxString& GetShape3DName( void )
{
return m_Shape3DName;
}
void SetShape3DName( const wxString& aShapeName );
};

View File

@ -171,10 +171,11 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" )
endif()
# quiet GCC 4.8.1 while in boost
# quiet GCC while in boost
if( GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8 )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs" )
endif()
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing" )
if( APPLE )
set( KICAD_BUILD_STATIC ON)

View File

@ -6,7 +6,7 @@
#endif
#ifndef KICAD_BUILD_VERSION
# define KICAD_BUILD_VERSION "(2013-jul-14)"
# define KICAD_BUILD_VERSION "(2014-jan-25)"
#endif
/**

View File

@ -97,4 +97,5 @@ const wxString PSFileWildcard( _( "PostScript files (.ps)|*.ps" ) );
const wxString ReportFileWildcard = _( "Report files (*.rpt)|*.rpt" );
const wxString FootprintPlaceFileWildcard = _( "Footprint place files (*.pos)|*.pos" );
const wxString Shapes3DFileWildcard( _( "Vrml and x3d files (*.wrl *.x3d)|*.wrl;*.x3d" ) );
const wxString IDF3DFileWildcard( _( "IDFv3 component files (*.idf)|*.idf" ) );
const wxString TextWildcard( _( "Text files (*.txt)|*.txt" ) );

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
(export (version D)
(design
(source F:/kicad-launchpad/testing/demos/complex_hierarchy/complex_hierarchy.sch)
(date "09/01/2014 08:56:21")
(tool "eeschema (2014-01-08 BZR 4616)-product"))
(date "25/01/2014 08:31:41")
(tool "eeschema (2014-01-22 BZR 4630)-product"))
(components
(comp (ref C10)
(value 10uF)

View File

@ -1,51 +1,22 @@
update=09/01/2014 08:59:03
update=25/01/2014 08:37:41
version=1
last_client=kicad
[cvpcb]
version=1
NetITyp=0
NetIExt=.net
PkgIExt=.pkg
NetDir=
LibDir=
NetType=0
NetIExt=net
[cvpcb/libraries]
EquName1=devcms
[eeschema]
version=1
LibDir=F:\\kicad\\share\\library
NetFmt=1
HPGLSpd=20
HPGLDm=15
HPGLNum=1
offX_A4=0
offY_A4=0
offX_A3=0
offY_A3=0
offX_A2=0
offY_A2=0
offX_A1=0
offY_A1=0
offX_A0=0
offY_A0=0
offX_A=0
offY_A=0
offX_B=0
offY_B=0
offX_C=0
offY_C=0
offX_D=0
offY_D=0
offX_E=0
offY_E=0
PageLayoutDescrFile=
SubpartIdSeparator=0
SubpartFirstId=65
LibDir=F:/kicad/share/library
NetFmtName=
RptD_X=0
RptD_Y=100
RptLab=1
SimCmd=
UseNetN=0
LabSize=60
PrintMonochrome=1
ShowSheetReferenceAndTitleBlock=1
[eeschema/libraries]
LibName1=power
LibName2=device
@ -57,32 +28,25 @@ LibName7=interface
LibName8=special
[pcbnew]
version=1
PadDrlX=320
PadDimH=600
PadDimV=600
BoardThickness=630
TxtPcbV=800
TxtPcbH=600
TxtModV=600
TxtModH=600
TxtModW=120
VEgarde=100
DrawLar=150
EdgeLar=150
TxtLar=120
MSegLar=150
PageLayoutDescrFile=
LastNetListRead=
UseCmpFile=1
PadDrill=0.8128
PadDrillOvalY=0.8128
PadSizeH=2.286
PadSizeV=2.286
PcbTextSizeV=2
PcbTextSizeH=2
PcbTextThickness=0.3
ModuleTextSizeV=1
ModuleTextSizeH=1
ModuleTextSizeThickness=0.2
SolderMaskClearance=0.254
SolderMaskMinWidth=0
DrawSegmentWidth=0.3
BoardOutlineThickness=0.09999999999999999
ModuleOutlineThickness=0.2
[pcbnew/libraries]
LibDir=
LibName1=sockets
LibName2=connect
LibName3=discret
LibName4=pin_array
LibName5=divers
LibName6=libcms
LibName7=display
LibName8=valves
LibName9=led
LibName10=dip_sockets
[general]
version=1

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,13 @@
EESchema-LIBRARY Version 2.3 Date: 27/11/2009 11:46:34
EESchema-LIBRARY Version 2.3
#encoding utf-8
#
# +3.3V
#
DEF +3.3V #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 -40 30 H I C CNN
F1 "+3.3V" 0 110 30 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
ALIAS +3,3V
DRAW
X +3.3V 1 0 0 0 U 30 30 0 0 W N
@ -16,8 +19,10 @@ ENDDEF
# 74AHC1G14
#
DEF 74AHC1G14 U 0 30 Y Y 1 F N
F0 "U" 195 115 60 H V C CNN
F1 "74AHC1G14" 300 -150 60 H V C CNN
F0 "U" 145 115 40 H V C CNN
F1 "74AHC1G14" 200 -100 40 H V C CNN
F2 "" 95 -135 30 H V C CNN
F3 "" 145 115 60 H V C CNN
DRAW
P 4 0 0 0 -150 150 -150 -150 150 0 -150 150 N
X GND 3 -50 -200 100 U 40 20 0 0 W
@ -34,6 +39,8 @@ ENDDEF
DEF 74LS125 U 0 30 Y Y 4 F N
F0 "U" 0 100 50 H V L BNN
F1 "74LS125" 50 -150 40 H V L TNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
X GND 7 -150 -150 0 U 50 30 0 0 W N
X VCC 14 -150 150 0 D 50 30 0 0 W N
@ -56,16 +63,18 @@ ENDDEF
# C
#
DEF C C 0 10 N Y 1 F N
F0 "C" 50 100 50 H V L CNN
F1 "C" 50 -100 50 H V L CNN
F0 "C" 0 100 40 H V L CNN
F1 "C" 6 -85 40 H V L CNN
F2 "" 38 -150 30 H V C CNN
F3 "" 0 100 30 H V C CNN
$FPLIST
SM*
C?
C1-1
$ENDFPLIST
DRAW
P 2 0 1 10 -100 -30 100 -30 N
P 2 0 1 10 -100 30 100 30 N
P 2 0 1 20 -80 -30 80 -30 N
P 2 0 1 20 -80 30 80 30 N
X ~ 1 0 200 170 D 40 40 1 1 P
X ~ 2 0 -200 170 U 40 40 1 1 P
ENDDRAW
@ -76,6 +85,8 @@ ENDDEF
DEF ~CONN_1 P 0 30 N N 1 F N
F0 "P" 80 0 40 H V L CNN
F1 "CONN_1" 0 55 30 H I C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
C 0 0 31 0 1 0 N
P 2 0 1 0 -30 0 -50 0 N
@ -88,6 +99,8 @@ ENDDEF
DEF CONN_13X2 P 0 10 Y N 1 F N
F0 "P" 0 700 60 H V C CNN
F1 "CONN_13X2" 0 0 50 V V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -100 650 100 -650 0 1 0 N
X P1 1 -400 600 300 R 40 30 1 1 P I
@ -124,6 +137,8 @@ ENDDEF
DEF CONN_2 P 0 40 Y N 1 F N
F0 "P" -50 0 40 V V C CNN
F1 "CONN_2" 50 0 40 V V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -100 150 100 -150 0 1 0 N
X P1 1 -350 100 250 R 60 60 1 1 P I
@ -136,6 +151,8 @@ ENDDEF
DEF CONN_20X2 P 0 10 Y N 1 F N
F0 "P" 0 1050 60 H V C CNN
F1 "CONN_20X2" 0 0 50 V V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -100 1000 100 -1000 0 1 0 N
X P1 1 -400 950 300 R 60 30 1 1 P I
@ -186,6 +203,8 @@ ENDDEF
DEF CONN_2X2 P 0 40 Y N 1 F N
F0 "P" 0 150 50 H V C CNN
F1 "CONN_2X2" 10 -130 40 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -100 100 100 -100 0 1 0 N
X 1 1 -400 50 300 R 60 60 1 1 P I
@ -200,6 +219,8 @@ ENDDEF
DEF CONN_3 K 0 40 Y N 1 F N
F0 "K" -50 0 50 V V C CNN
F1 "CONN_3" 50 0 40 V V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -100 150 100 -150 0 1 0 N
X P1 1 -350 100 250 R 60 60 1 1 P I
@ -213,6 +234,8 @@ ENDDEF
DEF CONN_30X2 P 0 10 Y N 1 F N
F0 "P" 0 1550 60 H V C CNN
F1 "CONN_30X2" 0 0 50 V V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -100 1500 100 -1500 0 1 0 N
X P1 1 -400 1450 300 R 60 30 1 1 P I
@ -284,6 +307,8 @@ ENDDEF
DEF CONN_4X2 P 0 40 Y N 1 F N
F0 "P" 0 250 50 H V C CNN
F1 "CONN_4X2" 0 0 40 V V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -100 200 100 -200 0 1 0 N
X 1 1 -400 150 300 R 60 60 1 1 P I
@ -302,6 +327,8 @@ ENDDEF
DEF CONN_6 P 0 30 Y N 1 F N
F0 "P" -50 0 60 V V C CNN
F1 "CONN_6" 50 0 60 V V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -100 300 100 -300 0 1 0 N
X 1 1 -350 250 250 R 60 60 1 1 P I
@ -316,15 +343,17 @@ ENDDEF
# CP
#
DEF CP C 0 10 N N 1 F N
F0 "C" 50 100 50 H V L CNN
F1 "CP" 50 -100 50 H V L CNN
F0 "C" 50 100 40 H V L CNN
F1 "CP" 50 -100 40 H V L CNN
F2 "" 100 -150 30 H V C CNN
F3 "" 50 100 30 H V C CNN
ALIAS CAPAPOL
$FPLIST
CP*
SM*
$ENDFPLIST
DRAW
P 4 0 1 8 -100 50 -100 -50 100 -50 100 50 N
P 4 0 1 8 -80 50 -80 -50 80 -50 80 50 N
P 4 0 1 0 -50 50 -50 -20 50 -20 50 50 F
X ~ 1 0 200 150 D 40 40 1 1 P
X ~ 2 0 -200 150 U 40 40 1 1 P
@ -333,9 +362,11 @@ ENDDEF
#
# CRYSTAL
#
DEF CRYSTAL X 0 40 N N 0 F N
DEF CRYSTAL X 0 40 N N 1 F N
F0 "X" 0 150 60 H V C CNN
F1 "CRYSTAL" 0 -150 60 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
P 2 0 1 16 -100 100 -100 -100 N
P 2 0 1 16 100 100 100 -100 N
@ -350,6 +381,8 @@ ENDDEF
DEF DB9 J 0 40 Y N 1 F N
F0 "J" 0 550 70 H V C CNN
F1 "DB9" 0 -550 70 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
$FPLIST
DB9*
$ENDFPLIST
@ -401,6 +434,8 @@ ENDDEF
DEF DIODE D 0 40 N N 1 F N
F0 "D" 0 100 40 H V C CNN
F1 "DIODE" 0 -100 40 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
$FPLIST
D?
S*
@ -418,6 +453,8 @@ ENDDEF
DEF FUSE F 0 10 Y Y 1 F N
F0 "F" 100 50 40 H V C CNN
F1 "FUSE" -100 -50 40 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
A -75 0 75 1 1799 0 1 0 N 0 0 -150 0
A 75 0 75 -1799 -1 0 1 0 N 0 0 150 0
@ -431,6 +468,8 @@ ENDDEF
DEF ~GND #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 0 30 H I C CNN
F1 "GND" 0 -70 30 H I C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N
X GND 1 0 0 0 U 30 30 1 1 W N
@ -442,6 +481,8 @@ ENDDEF
DEF GNDA #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 0 40 H I C CNN
F1 "GNDA" 0 -70 40 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N
X GNDA 1 0 0 0 U 40 40 1 1 W N
@ -450,9 +491,11 @@ ENDDEF
#
# INDUCTOR
#
DEF INDUCTOR L 0 40 N N 0 F N
DEF INDUCTOR L 0 40 N N 1 F N
F0 "L" -50 0 40 V V C CNN
F1 "INDUCTOR" 100 0 40 V V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
A 0 -150 50 -889 889 0 1 0 N 1 -199 1 -100
A 0 -49 51 -889 889 0 1 0 N 1 -99 1 2
@ -468,6 +511,8 @@ ENDDEF
DEF JACK_2P J 0 40 Y Y 1 F N
F0 "J" -350 -200 60 H V C CNN
F1 "JACK_2P" -150 250 60 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -450 150 -400 -100 0 1 0 F
S 300 -150 -400 200 0 1 0 N
@ -488,6 +533,8 @@ ENDDEF
DEF JUMPER JP 0 30 Y N 1 F N
F0 "JP" 0 150 60 H V C CNN
F1 "JUMPER" 0 -80 40 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
A 0 -26 125 1426 373 0 1 0 N -98 50 99 50
C -100 0 35 0 1 0 N
@ -502,6 +549,8 @@ ENDDEF
DEF LED D 0 40 Y N 1 F N
F0 "D" 0 100 50 H V C CNN
F1 "LED" 0 -100 50 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
$FPLIST
LED-3MM
LED-5MM
@ -526,6 +575,8 @@ ENDDEF
DEF LT1129_QPACK U 0 30 Y Y 1 F N
F0 "U" 250 450 60 H V C CNN
F1 "LT1129_QPACK" 500 -495 60 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
ALIAS LT_1129_QP
DRAW
S -500 -400 500 400 0 1 0 N
@ -542,6 +593,8 @@ ENDDEF
DEF MAX232 U 0 40 Y Y 1 F N
F0 "U" 0 850 70 H V C CNN
F1 "MAX232" 0 -850 70 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
ALIAS MAX202
DRAW
T 900 80 -530 40 0 0 0 RS232 Normal 0 C C
@ -573,6 +626,8 @@ ENDDEF
DEF MC34064P U 0 20 Y Y 1 F N
F0 "U" 50 200 60 H V C CNN
F1 "MC34064P" 300 -190 60 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
ALIAS MC33064P
DRAW
S -200 -150 200 150 0 1 0 N
@ -587,6 +642,8 @@ ENDDEF
DEF MCF5213-LQFP100 U 0 40 Y Y 1 F N
F0 "U" 1150 2700 60 H V L CNN
F1 "MCF5213-LQFP100" 600 -2650 60 H V L CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -1700 2600 1700 -2600 0 1 0 N
X VCC 1 -250 2850 250 D 30 30 1 1 W
@ -697,6 +754,8 @@ ENDDEF
DEF PCA82C251 U 0 0 Y Y 1 F N
F0 "U" 150 450 60 H V C CNN
F1 "PCA82C251" 300 -350 60 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
T 0 50 300 20 0 0 1 Volt Normal 1 C C
S -200 400 200 -300 0 1 0 N
@ -724,9 +783,11 @@ ENDDEF
#
# PNP
#
DEF PNP Q 0 0 Y Y 0 F N
DEF PNP Q 0 0 Y Y 1 F N
F0 "Q" 0 -150 60 H V R CNN
F1 "PNP" 0 150 60 H V R CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
C 50 0 111 0 1 10 N
P 2 0 1 0 0 0 100 100 N
@ -743,25 +804,29 @@ ENDDEF
# PWR_FLAG
#
DEF PWR_FLAG #FLG 0 0 N N 1 F P
F0 "#FLG" 0 270 30 H I C CNN
F1 "PWR_FLAG" 0 230 30 H V C CNN
F0 "#FLG" 0 95 30 H I C CNN
F1 "PWR_FLAG" 0 180 30 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
X pwr 1 0 0 0 U 20 20 0 0 w
P 3 0 1 0 0 0 0 100 0 100 N
P 5 0 1 0 0 100 -100 150 0 200 100 150 0 100 N
P 6 0 1 0 0 0 0 50 -75 100 0 150 75 100 0 50 N
ENDDRAW
ENDDEF
#
# R
#
DEF R R 0 0 N Y 1 F N
F0 "R" 80 0 50 V V C CNN
F1 "R" 0 0 50 V V C CNN
F0 "R" 80 0 40 V V C CNN
F1 "R" 7 1 40 V V C CNN
F2 "" -70 0 30 V V C CNN
F3 "" 0 0 30 H V C CNN
$FPLIST
R?
SM0603
SM0805
R?-*
SM1206
$ENDFPLIST
DRAW
S -40 150 40 -150 0 1 12 N
@ -775,6 +840,8 @@ ENDDEF
DEF SW_PUSH SW 0 40 N N 1 F N
F0 "SW" 150 110 50 H V C CNN
F1 "SW_PUSH" 0 -80 50 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -170 50 170 60 0 1 0 N
P 4 0 1 0 -40 60 -30 90 30 90 40 60 N
@ -785,9 +852,11 @@ ENDDEF
#
# SWITCH_INV
#
DEF SWITCH_INV SW 0 0 N Y 0 F N
DEF SWITCH_INV SW 0 0 N Y 1 F N
F0 "SW" -200 150 50 H V C CNN
F1 "SWITCH_INV" -150 -150 50 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
C -150 0 50 0 0 0 N
C 150 -100 50 0 0 0 N
@ -804,6 +873,8 @@ ENDDEF
DEF VCC #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 100 30 H I C CNN
F1 "VCC" 0 100 30 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
X VCC 1 0 0 0 U 20 20 0 0 W N
C 0 50 20 0 1 0 N
@ -816,6 +887,8 @@ ENDDEF
DEF VDD #PWR 0 0 Y Y 1 F P
F0 "#PWR" 0 100 30 H I C CNN
F1 "VDD" 0 110 30 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
X VDD 1 0 0 0 U 40 40 0 0 W N
C 0 60 20 0 1 0 N
@ -828,6 +901,8 @@ ENDDEF
DEF XCR3256-TQ144 U 0 20 Y Y 1 F N
F0 "U" 0 3500 70 H V C CNN
F1 "XCR3256-TQ144" 0 -3600 60 H V C CNN
F2 "" 0 0 60 H V C CNN
F3 "" 0 0 60 H V C CNN
DRAW
S -650 3400 650 -3500 0 1 0 N
X I1 1 950 -2900 300 L 50 50 1 1 P
@ -850,7 +925,6 @@ X G2 80 -950 -2500 300 R 50 50 1 1 P
X C14 90 -950 500 300 R 50 50 1 1 P
X J15 11 950 -1600 300 L 50 50 1 1 P
X N2 21 950 900 300 L 50 50 1 1 P
X P14 31 950 3100 300 L 50 50 1 1 P
X P4 31 950 2800 300 L 50 50 1 1 P
X O3 41 950 2000 300 L 50 50 1 1 P
X VCC 51 -450 3400 0 D 30 30 1 1 W N
@ -887,6 +961,7 @@ X E11 84 -950 -1600 300 R 50 50 1 1 P
X C3 94 -950 900 300 R 50 50 1 1 P
X L4 15 950 -400 300 L 50 50 1 1 P
X N11 25 950 1200 300 L 50 50 1 1 P
X P14 35 950 3100 300 L 50 50 1 1 P
X M15 45 950 700 300 L 50 50 1 1 P
X F1 55 -950 -1700 300 R 50 50 1 1 P
X F15 65 -950 -2300 300 R 50 50 1 1 P

View File

@ -1,37 +1,34 @@
update=10/01/2014 20:45:48
update=24/01/2014 13:22:43
last_client=eeschema
[pcbnew]
version=1
LastNetListRead=
UseCmpFile=1
PadDrill=0.000000000000
PadDrillOvalY=0.000000000000
PadSizeH=0.406400000000
PadSizeV=1.270000000000
PcbTextSizeV=2.032000000000
PcbTextSizeH=1.524000000000
PcbTextThickness=0.304800000000
ModuleTextSizeV=1.524000000000
ModuleTextSizeH=1.524000000000
ModuleTextSizeThickness=0.304800000000
SolderMaskClearance=0.200000000000
SolderMaskMinWidth=0.000000000000
DrawSegmentWidth=0.381000000000
BoardOutlineThickness=0.381000000000
ModuleOutlineThickness=0.152400000000
[pcbnew/libraries]
LibDir=
LibName1=sockets
LibName2=dip_sockets
LibName3=connect
LibName4=discret
LibName5=pin_array
LibName6=divers
LibName7=libcms
LibName8=display
LibName9=valves
[general]
version=1
[cvpcb]
version=1
NetIExt=net
[cvpcb/libraries]
EquName1=devcms
[pcbnew]
version=1
PageLayoutDescrFile=
LastNetListRead=
UseCmpFile=1
PadDrill=0
PadDrillOvalY=0
PadSizeH=0.4064
PadSizeV=1.27
PcbTextSizeV=2.032
PcbTextSizeH=1.524
PcbTextThickness=0.3048
ModuleTextSizeV=1.524
ModuleTextSizeH=1.524
ModuleTextSizeThickness=0.3048
SolderMaskClearance=0.2
SolderMaskMinWidth=0
DrawSegmentWidth=0.381
BoardOutlineThickness=0.381
ModuleOutlineThickness=0.1524
[pcbnew/libraries]
LibDir=
[eeschema]
version=1
PageLayoutDescrFile=
@ -51,24 +48,9 @@ LibName4=conn
LibName5=linear
LibName6=regul
LibName7=74xx
LibName8=cmos4000
LibName9=adc-dac
LibName10=memory
LibName11=xilinx
LibName12=special
LibName13=microcontrollers
LibName14=dsp
LibName15=microchip
LibName16=analog_switches
LibName17=motorola
LibName18=texas
LibName19=intel
LibName20=audio
LibName21=interface
LibName22=digital-audio
LibName23=philips
LibName24=display
LibName25=cypress
LibName26=siliconi
LibName27=contrib
LibName28=valves
LibName8=adc-dac
LibName9=memory
LibName10=xilinx
LibName11=special
LibName12=microcontrollers
LibName13=motorola

View File

@ -1,4 +1,4 @@
EESchema Schematic File Version 2 date 27/11/2009 11:46:34
EESchema Schematic File Version 2
LIBS:power
LIBS:device
LIBS:transistors
@ -6,31 +6,17 @@ LIBS:conn
LIBS:linear
LIBS:regul
LIBS:74xx
LIBS:cmos4000
LIBS:adc-dac
LIBS:memory
LIBS:xilinx
LIBS:special
LIBS:microcontrollers
LIBS:dsp
LIBS:microchip
LIBS:analog_switches
LIBS:motorola
LIBS:texas
LIBS:intel
LIBS:audio
LIBS:interface
LIBS:digital-audio
LIBS:philips
LIBS:display
LIBS:cypress
LIBS:siliconi
LIBS:contrib
LIBS:valves
LIBS:kit-dev-coldfire-xilinx_5213-cache
EELAYER 23 0
EELAYER 24 0
EELAYER END
$Descr A3 16535 11700
$Descr A3 16535 11693
encoding utf-8
Sheet 1 3
Title "Dev kit coldfire 5213"
Date "8 feb 2008"
@ -676,8 +662,10 @@ $Comp
L MCF5213-LQFP100 U1
U 1 1 46161C39
P 8150 4600
F 0 "U1" H 8200 4650 60 0000 L CNN
F 0 "U1" H 9100 7300 60 0000 L CNN
F 1 "MCF5213-LQFP100" H 8750 1950 60 0000 L CNN
F 2 "" H 8150 4600 60 0001 C CNN
F 3 "" H 8150 4600 60 0001 C CNN
1 8150 4600
1 0 0 -1
$EndComp
@ -687,6 +675,8 @@ U 1 1 462382A4
P 6450 9000
F 0 "#PWR01" H 6450 9000 40 0001 C CNN
F 1 "GNDA" H 6450 8930 40 0000 C CNN
F 2 "" H 6450 9000 60 0001 C CNN
F 3 "" H 6450 9000 60 0001 C CNN
1 6450 9000
1 0 0 -1
$EndComp
@ -696,6 +686,8 @@ U 1 1 46238286
P 6450 8750
F 0 "C18" H 6500 8850 50 0000 L CNN
F 1 "100nF" H 6500 8650 50 0000 L CNN
F 2 "" H 6450 8750 60 0001 C CNN
F 3 "" H 6450 8750 60 0001 C CNN
1 6450 8750
1 0 0 -1
$EndComp
@ -709,6 +701,8 @@ U 1 1 46602ECA
P 5350 6950
F 0 "#PWR02" H 5350 6950 40 0001 C CNN
F 1 "GNDA" H 5350 6880 40 0000 C CNN
F 2 "" H 5350 6950 60 0001 C CNN
F 3 "" H 5350 6950 60 0001 C CNN
1 5350 6950
1 0 0 -1
$EndComp
@ -718,6 +712,8 @@ U 1 1 465FE6C5
P 10150 10350
F 0 "GND1" H 10230 10350 40 0000 L CNN
F 1 "CONN_1" H 10150 10405 30 0001 C CNN
F 2 "" H 10150 10350 60 0001 C CNN
F 3 "" H 10150 10350 60 0001 C CNN
1 10150 10350
1 0 0 -1
$EndComp
@ -727,6 +723,8 @@ U 1 1 46555AB9
P 6100 7100
F 0 "#PWR03" H 6100 7100 40 0001 C CNN
F 1 "GNDA" H 6100 7030 40 0000 C CNN
F 2 "" H 6100 7100 60 0001 C CNN
F 3 "" H 6100 7100 60 0001 C CNN
1 6100 7100
1 0 0 -1
$EndComp
@ -736,6 +734,8 @@ U 1 1 46554FD2
P 13400 1700
F 0 "#PWR04" H 13400 1660 30 0001 C CNN
F 1 "+3.3V" H 13400 1810 30 0000 C CNN
F 2 "" H 13400 1700 60 0001 C CNN
F 3 "" H 13400 1700 60 0001 C CNN
1 13400 1700
1 0 0 -1
$EndComp
@ -745,6 +745,8 @@ U 1 1 46554FCD
P 13400 2100
F 0 "#PWR05" H 13400 2100 30 0001 C CNN
F 1 "GND" H 13400 2030 30 0001 C CNN
F 2 "" H 13400 2100 60 0001 C CNN
F 3 "" H 13400 2100 60 0001 C CNN
1 13400 2100
1 0 0 -1
$EndComp
@ -754,6 +756,8 @@ U 1 1 46554FB5
P 13350 1900
F 0 "U2" H 13545 2015 60 0000 C CNN
F 1 "74AHC1G14" H 13650 1750 60 0000 C CNN
F 2 "" H 13350 1900 60 0001 C CNN
F 3 "" H 13350 1900 60 0001 C CNN
1 13350 1900
-1 0 0 -1
$EndComp
@ -763,6 +767,8 @@ U 1 1 46545507
P 14150 4650
F 0 "CT1" H 14550 4700 60 0000 C CNN
F 1 "JUMPER" H 14150 4570 40 0000 C CNN
F 2 "" H 14150 4650 60 0001 C CNN
F 3 "" H 14150 4650 60 0001 C CNN
1 14150 4650
1 0 0 -1
$EndComp
@ -772,6 +778,8 @@ U 1 1 465451F6
P 2600 3650
F 0 "#PWR06" H 2600 3650 30 0001 C CNN
F 1 "GND" H 2600 3580 30 0001 C CNN
F 2 "" H 2600 3650 60 0001 C CNN
F 3 "" H 2600 3650 60 0001 C CNN
1 2600 3650
1 0 0 -1
$EndComp
@ -781,6 +789,8 @@ U 1 1 465451D4
P 2600 3350
F 0 "RST_SW1" H 2750 3460 50 0000 C CNN
F 1 "SW_PUSH" H 2600 3270 50 0000 C CNN
F 2 "" H 2600 3350 60 0001 C CNN
F 3 "" H 2600 3350 60 0001 C CNN
1 2600 3350
0 1 1 0
$EndComp
@ -810,6 +820,8 @@ U 1 1 4652AF7E
P 5500 9800
F 0 "#PWR07" H 5500 9900 30 0001 C CNN
F 1 "VCC" H 5500 9900 30 0000 C CNN
F 2 "" H 5500 9800 60 0001 C CNN
F 3 "" H 5500 9800 60 0001 C CNN
1 5500 9800
1 0 0 -1
$EndComp
@ -819,6 +831,8 @@ U 1 1 4652AF2F
P 6700 9000
F 0 "#FLG08" H 6700 9270 30 0001 C CNN
F 1 "PWR_FLAG" H 6700 9230 30 0000 C CNN
F 2 "" H 6700 9000 60 0001 C CNN
F 3 "" H 6700 9000 60 0001 C CNN
1 6700 9000
-1 0 0 1
$EndComp
@ -832,6 +846,8 @@ U 1 1 4652AE72
P 9250 10350
F 0 "#FLG09" H 9250 10620 30 0001 C CNN
F 1 "PWR_FLAG" H 9250 10580 30 0000 C CNN
F 2 "" H 9250 10350 60 0001 C CNN
F 3 "" H 9250 10350 60 0001 C CNN
1 9250 10350
-1 0 0 1
$EndComp
@ -958,6 +974,8 @@ U 1 1 46238A4E
P 1700 9450
F 0 "#PWR010" H 1700 9450 30 0001 C CNN
F 1 "GND" H 1700 9380 30 0001 C CNN
F 2 "" H 1700 9450 60 0001 C CNN
F 3 "" H 1700 9450 60 0001 C CNN
1 1700 9450
1 0 0 -1
$EndComp
@ -967,6 +985,8 @@ U 1 1 46238A48
P 2500 9400
F 0 "#PWR011" H 2500 9400 30 0001 C CNN
F 1 "GND" H 2500 9330 30 0001 C CNN
F 2 "" H 2500 9400 60 0001 C CNN
F 3 "" H 2500 9400 60 0001 C CNN
1 2500 9400
1 0 0 -1
$EndComp
@ -976,6 +996,8 @@ U 1 1 462389C7
P 2100 8850
F 0 "Y1" H 2100 9000 60 0000 C CNN
F 1 "8MHz" H 2100 8700 60 0000 C CNN
F 2 "" H 2100 8850 60 0001 C CNN
F 3 "" H 2100 8850 60 0001 C CNN
1 2100 8850
1 0 0 -1
$EndComp
@ -985,6 +1007,8 @@ U 1 1 462389C0
P 2500 9200
F 0 "C2" H 2550 9300 50 0000 L CNN
F 1 "10pF" H 2550 9100 50 0000 L CNN
F 2 "" H 2500 9200 60 0001 C CNN
F 3 "" H 2500 9200 60 0001 C CNN
1 2500 9200
1 0 0 -1
$EndComp
@ -994,6 +1018,8 @@ U 1 1 462389BC
P 1700 9250
F 0 "C1" H 1750 9350 50 0000 L CNN
F 1 "10pF" H 1750 9150 50 0000 L CNN
F 2 "" H 1700 9250 60 0001 C CNN
F 3 "" H 1700 9250 60 0001 C CNN
1 1700 9250
1 0 0 -1
$EndComp
@ -1003,6 +1029,8 @@ U 1 1 462389B6
P 2150 8450
F 0 "R1" V 2230 8450 50 0000 C CNN
F 1 "1M" V 2150 8450 50 0000 C CNN
F 2 "" H 2150 8450 60 0001 C CNN
F 3 "" H 2150 8450 60 0001 C CNN
1 2150 8450
0 1 1 0
$EndComp
@ -1012,6 +1040,8 @@ U 1 1 46238965
P 14450 5600
F 0 "ALLPST1" H 14450 5700 40 0000 C CNN
F 1 "CONN_1" H 14400 5640 30 0001 C CNN
F 2 "" H 14450 5600 60 0001 C CNN
F 3 "" H 14450 5600 60 0001 C CNN
1 14450 5600
-1 0 0 1
$EndComp
@ -1065,6 +1095,8 @@ U 1 1 462385BA
P 1900 4650
F 0 "#PWR012" H 1900 4650 30 0001 C CNN
F 1 "GND" H 1900 4580 30 0001 C CNN
F 2 "" H 1900 4650 60 0001 C CNN
F 3 "" H 1900 4650 60 0001 C CNN
1 1900 4650
1 0 0 -1
$EndComp
@ -1074,6 +1106,8 @@ U 1 1 46238597
P 2150 4600
F 0 "RED1" H 2150 4700 50 0000 C CNN
F 1 "LED_RESET1" H 2150 4500 50 0000 C CNN
F 2 "" H 2150 4600 60 0001 C CNN
F 3 "" H 2150 4600 60 0001 C CNN
1 2150 4600
-1 0 0 1
$EndComp
@ -1083,6 +1117,8 @@ U 1 1 4623857F
P 2650 4600
F 0 "R22" V 2750 4600 50 0000 C CNN
F 1 "270" V 2650 4600 50 0000 C CNN
F 2 "" H 2650 4600 60 0001 C CNN
F 3 "" H 2650 4600 60 0001 C CNN
1 2650 4600
0 1 1 0
$EndComp
@ -1094,6 +1130,8 @@ U 1 1 46238545
P 3500 4300
F 0 "R21" V 3600 4300 50 0000 C CNN
F 1 "4,7K" V 3500 4300 50 0000 C CNN
F 2 "" H 3500 4300 60 0001 C CNN
F 3 "" H 3500 4300 60 0001 C CNN
1 3500 4300
0 1 1 0
$EndComp
@ -1103,6 +1141,8 @@ U 1 1 46238539
P 2900 4100
F 0 "#PWR013" H 2900 4200 30 0001 C CNN
F 1 "VDD" H 2900 4210 30 0000 C CNN
F 2 "" H 2900 4100 60 0001 C CNN
F 3 "" H 2900 4100 60 0001 C CNN
1 2900 4100
1 0 0 -1
$EndComp
@ -1112,6 +1152,8 @@ U 1 1 46238531
P 8400 7550
F 0 "#PWR014" H 8400 7550 30 0001 C CNN
F 1 "GND" H 8400 7480 30 0001 C CNN
F 2 "" H 8400 7550 60 0001 C CNN
F 3 "" H 8400 7550 60 0001 C CNN
1 8400 7550
1 0 0 -1
$EndComp
@ -1121,6 +1163,8 @@ U 1 1 46238519
P 3000 4300
F 0 "Q1" H 3150 4300 60 0000 C CNN
F 1 "3906" H 2904 4450 60 0000 C CNN
F 2 "" H 3000 4300 60 0001 C CNN
F 3 "" H 3000 4300 60 0001 C CNN
1 3000 4300
-1 0 0 1
$EndComp
@ -1132,6 +1176,8 @@ U 1 1 462384A7
P 3250 2400
F 0 "#PWR015" H 3250 2360 30 0001 C CNN
F 1 "+3.3V" H 3250 2510 30 0000 C CNN
F 2 "" H 3250 2400 60 0001 C CNN
F 3 "" H 3250 2400 60 0001 C CNN
1 3250 2400
1 0 0 -1
$EndComp
@ -1141,6 +1187,8 @@ U 1 1 4623848E
P 2200 3500
F 0 "#PWR016" H 2200 3500 30 0001 C CNN
F 1 "GND" H 2200 3430 30 0001 C CNN
F 2 "" H 2200 3500 60 0001 C CNN
F 3 "" H 2200 3500 60 0001 C CNN
1 2200 3500
1 0 0 -1
$EndComp
@ -1150,6 +1198,8 @@ U 1 1 4623847B
P 3250 2650
F 0 "R15" V 3330 2650 50 0000 C CNN
F 1 "4,7K" V 3250 2650 50 0000 C CNN
F 2 "" H 3250 2650 60 0001 C CNN
F 3 "" H 3250 2650 60 0001 C CNN
1 3250 2650
1 0 0 -1
$EndComp
@ -1159,6 +1209,8 @@ U 1 1 4623846D
P 2850 3000
F 0 "D3" H 2850 3100 40 0000 C CNN
F 1 "BAT54" H 2850 2900 40 0000 C CNN
F 2 "" H 2850 3000 60 0001 C CNN
F 3 "" H 2850 3000 60 0001 C CNN
1 2850 3000
-1 0 0 1
$EndComp
@ -1168,6 +1220,8 @@ U 1 1 46238468
P 2200 3300
F 0 "C3" H 2250 3400 50 0000 L CNN
F 1 "1nF" H 2250 3200 50 0000 L CNN
F 2 "" H 2200 3300 60 0001 C CNN
F 3 "" H 2200 3300 60 0001 C CNN
1 2200 3300
1 0 0 -1
$EndComp
@ -1177,6 +1231,8 @@ U 1 1 4623840E
P 1150 2950
F 0 "#PWR017" H 1150 2910 30 0001 C CNN
F 1 "+3.3V" H 1150 3060 30 0000 C CNN
F 2 "" H 1150 2950 60 0001 C CNN
F 3 "" H 1150 2950 60 0001 C CNN
1 1150 2950
1 0 0 -1
$EndComp
@ -1186,6 +1242,8 @@ U 1 1 46238409
P 1550 3350
F 0 "#PWR018" H 1550 3350 30 0001 C CNN
F 1 "GND" H 1550 3280 30 0001 C CNN
F 2 "" H 1550 3350 60 0001 C CNN
F 3 "" H 1550 3350 60 0001 C CNN
1 1550 3350
1 0 0 -1
$EndComp
@ -1195,6 +1253,8 @@ U 1 1 462383E5
P 1550 3050
F 0 "LV1" H 1600 3250 60 0000 C CNN
F 1 "DS1818" H 1850 2860 60 0000 C CNN
F 2 "" H 1550 3050 60 0001 C CNN
F 3 "" H 1550 3050 60 0001 C CNN
1 1550 3050
1 0 0 -1
$EndComp
@ -1218,6 +1278,8 @@ U 1 1 462382CE
P 6150 8750
F 0 "C16" H 6200 8850 50 0000 L CNN
F 1 "10uF" H 6200 8650 50 0000 L CNN
F 2 "" H 6150 8750 60 0001 C CNN
F 3 "" H 6150 8750 60 0001 C CNN
1 6150 8750
1 0 0 -1
$EndComp
@ -1227,6 +1289,8 @@ U 1 1 462380EB
P 6150 9000
F 0 "#PWR019" H 6150 9000 40 0001 C CNN
F 1 "GNDA" H 6150 8930 40 0000 C CNN
F 2 "" H 6150 9000 60 0001 C CNN
F 3 "" H 6150 9000 60 0001 C CNN
1 6150 9000
1 0 0 -1
$EndComp
@ -1236,6 +1300,8 @@ U 1 1 462380D3
P 5350 9000
F 0 "#PWR020" H 5350 9000 30 0001 C CNN
F 1 "GND" H 5350 8930 30 0001 C CNN
F 2 "" H 5350 9000 60 0001 C CNN
F 3 "" H 5350 9000 60 0001 C CNN
1 5350 9000
1 0 0 -1
$EndComp
@ -1245,6 +1311,8 @@ U 1 1 462380B8
P 5700 8950
F 0 "FB1" V 5650 8950 40 0000 C CNN
F 1 "BEAD" V 5800 8950 40 0000 C CNN
F 2 "" H 5700 8950 60 0001 C CNN
F 3 "" H 5700 8950 60 0001 C CNN
1 5700 8950
0 -1 -1 0
$EndComp
@ -1254,6 +1322,8 @@ U 1 1 46238092
P 5700 8500
F 0 "L1" V 5650 8500 40 0000 C CNN
F 1 "10uH" V 5800 8500 40 0000 C CNN
F 2 "" H 5700 8500 60 0001 C CNN
F 3 "" H 5700 8500 60 0001 C CNN
1 5700 8500
0 -1 -1 0
$EndComp
@ -1263,6 +1333,8 @@ U 1 1 46238079
P 4950 8500
F 0 "VDDA1" H 4950 8650 60 0000 C CNN
F 1 "JUMPER" H 4950 8420 40 0000 C CNN
F 2 "" H 4950 8500 60 0001 C CNN
F 3 "" H 4950 8500 60 0001 C CNN
1 4950 8500
1 0 0 -1
$EndComp
@ -1272,6 +1344,8 @@ U 1 1 46238078
P 4600 8450
F 0 "#PWR021" H 4600 8410 30 0001 C CNN
F 1 "+3.3V" H 4600 8560 30 0000 C CNN
F 2 "" H 4600 8450 60 0001 C CNN
F 3 "" H 4600 8450 60 0001 C CNN
1 4600 8450
1 0 0 -1
$EndComp
@ -1293,6 +1367,8 @@ U 1 1 46237F86
P 12500 1900
F 0 "D1" H 12500 2000 40 0000 C CNN
F 1 "BAT54" H 12500 1800 40 0000 C CNN
F 2 "" H 12500 1900 60 0001 C CNN
F 3 "" H 12500 1900 60 0001 C CNN
1 12500 1900
1 0 0 -1
$EndComp
@ -1302,6 +1378,8 @@ U 1 1 46237F59
P 15450 1900
F 0 "#PWR022" H 15450 1860 30 0001 C CNN
F 1 "+3.3V" H 15450 2010 30 0000 C CNN
F 2 "" H 15450 1900 60 0001 C CNN
F 3 "" H 15450 1900 60 0001 C CNN
1 15450 1900
1 0 0 -1
$EndComp
@ -1311,6 +1389,8 @@ U 1 1 46237F50
P 15050 1900
F 0 "ABRT_SW1" H 15050 2050 50 0000 C CNN
F 1 "SW_PUSH" H 15050 1820 50 0000 C CNN
F 2 "" H 15050 1900 60 0001 C CNN
F 3 "" H 15050 1900 60 0001 C CNN
1 15050 1900
1 0 0 -1
$EndComp
@ -1320,6 +1400,8 @@ U 1 1 46237F11
P 14200 2500
F 0 "#PWR023" H 14200 2500 30 0001 C CNN
F 1 "GND" H 14200 2430 30 0001 C CNN
F 2 "" H 14200 2500 60 0001 C CNN
F 3 "" H 14200 2500 60 0001 C CNN
1 14200 2500
1 0 0 -1
$EndComp
@ -1329,6 +1411,8 @@ U 1 1 46237F0E
P 13950 2450
F 0 "#PWR024" H 13950 2450 30 0001 C CNN
F 1 "GND" H 13950 2380 30 0001 C CNN
F 2 "" H 13950 2450 60 0001 C CNN
F 3 "" H 13950 2450 60 0001 C CNN
1 13950 2450
1 0 0 -1
$EndComp
@ -1338,6 +1422,8 @@ U 1 1 46237E86
P 12800 900
F 0 "#PWR025" H 12800 860 30 0001 C CNN
F 1 "+3.3V" H 12800 1010 30 0000 C CNN
F 2 "" H 12800 900 60 0001 C CNN
F 3 "" H 12800 900 60 0001 C CNN
1 12800 900
1 0 0 -1
$EndComp
@ -1347,6 +1433,8 @@ U 1 1 46237E52
P 12800 1100
F 0 "LEDABRT1" H 12800 1200 50 0000 C CNN
F 1 "RED" H 12800 1000 50 0000 C CNN
F 2 "" H 12800 1100 60 0001 C CNN
F 3 "" H 12800 1100 60 0001 C CNN
1 12800 1100
0 1 1 0
$EndComp
@ -1356,6 +1444,8 @@ U 1 1 46237E3D
P 12800 1600
F 0 "R14" V 12880 1600 50 0000 C CNN
F 1 "270" V 12800 1600 50 0000 C CNN
F 2 "" H 12800 1600 60 0001 C CNN
F 3 "" H 12800 1600 60 0001 C CNN
1 12800 1600
1 0 0 -1
$EndComp
@ -1365,6 +1455,8 @@ U 1 1 46237E36
P 13950 2250
F 0 "C15" H 13700 2350 50 0000 L CNN
F 1 "100nF" H 13650 2150 50 0000 L CNN
F 2 "" H 13950 2250 60 0001 C CNN
F 3 "" H 13950 2250 60 0001 C CNN
1 13950 2250
1 0 0 -1
$EndComp
@ -1374,6 +1466,8 @@ U 1 1 46237E2F
P 14200 2250
F 0 "R12" V 14280 2250 50 0000 C CNN
F 1 "20K" V 14200 2250 50 0000 C CNN
F 2 "" H 14200 2250 60 0001 C CNN
F 3 "" H 14200 2250 60 0001 C CNN
1 14200 2250
1 0 0 -1
$EndComp
@ -1383,6 +1477,8 @@ U 1 1 46237E28
P 14450 1900
F 0 "R7" V 14530 1900 50 0000 C CNN
F 1 "1K" V 14450 1900 50 0000 C CNN
F 2 "" H 14450 1900 60 0001 C CNN
F 3 "" H 14450 1900 60 0001 C CNN
1 14450 1900
0 1 1 0
$EndComp
@ -1392,6 +1488,8 @@ U 1 1 46237E18
P 13350 1450
F 0 "#PWR026" H 13350 1410 30 0001 C CNN
F 1 "+3.3V" H 13350 1560 30 0000 C CNN
F 2 "" H 13350 1450 60 0001 C CNN
F 3 "" H 13350 1450 60 0001 C CNN
1 13350 1450
1 0 0 -1
$EndComp
@ -1401,6 +1499,8 @@ U 1 1 46237E07
P 13750 1450
F 0 "#PWR027" H 13750 1450 30 0001 C CNN
F 1 "GND" H 13750 1380 30 0001 C CNN
F 2 "" H 13750 1450 60 0001 C CNN
F 3 "" H 13750 1450 60 0001 C CNN
1 13750 1450
0 -1 -1 0
$EndComp
@ -1410,6 +1510,8 @@ U 1 1 46237DF9
P 13550 1450
F 0 "C14" H 13600 1550 50 0000 L CNN
F 1 "100nF" V 13350 1450 50 0000 L CNN
F 2 "" H 13550 1450 60 0001 C CNN
F 3 "" H 13550 1450 60 0001 C CNN
1 13550 1450
0 1 1 0
$EndComp
@ -1421,6 +1523,8 @@ U 1 1 461BE524
P 5250 3000
F 0 "#PWR028" H 5250 3100 30 0001 C CNN
F 1 "VDD" H 5250 3110 30 0000 C CNN
F 2 "" H 5250 3000 60 0001 C CNN
F 3 "" H 5250 3000 60 0001 C CNN
1 5250 3000
1 0 0 -1
$EndComp
@ -1430,6 +1534,8 @@ U 1 1 461BE50C
P 5500 3050
F 0 "R45" V 5600 2950 50 0000 C CNN
F 1 "4,7K" V 5500 3050 50 0000 C CNN
F 2 "" H 5500 3050 60 0001 C CNN
F 3 "" H 5500 3050 60 0001 C CNN
1 5500 3050
0 1 1 0
$EndComp
@ -1475,6 +1581,8 @@ U 1 1 461BE37E
P 7100 1850
F 0 "#PWR029" H 7100 1850 30 0001 C CNN
F 1 "GND" H 7100 1780 30 0001 C CNN
F 2 "" H 7100 1850 60 0001 C CNN
F 3 "" H 7100 1850 60 0001 C CNN
1 7100 1850
1 0 0 -1
$EndComp
@ -1484,6 +1592,8 @@ U 1 1 461BE36C
P 6750 1850
F 0 "#PWR030" H 6750 1850 30 0001 C CNN
F 1 "GND" H 6750 1780 30 0001 C CNN
F 2 "" H 6750 1850 60 0001 C CNN
F 3 "" H 6750 1850 60 0001 C CNN
1 6750 1850
1 0 0 -1
$EndComp
@ -1493,6 +1603,8 @@ U 1 1 461BE364
P 6750 1650
F 0 "C20" H 6800 1750 50 0000 L CNN
F 1 "1nF" H 6800 1550 50 0000 L CNN
F 2 "" H 6750 1650 60 0001 C CNN
F 3 "" H 6750 1650 60 0001 C CNN
1 6750 1650
1 0 0 -1
$EndComp
@ -1502,6 +1614,8 @@ U 1 1 461BE35C
P 7100 1650
F 0 "C21" H 7150 1750 50 0000 L CNN
F 1 "100nF" H 7150 1550 50 0000 L CNN
F 2 "" H 7100 1650 60 0001 C CNN
F 3 "" H 7100 1650 60 0001 C CNN
1 7100 1650
1 0 0 -1
$EndComp
@ -1511,6 +1625,8 @@ U 1 1 461BE327
P 6600 1200
F 0 "L2" V 6550 1200 40 0000 C CNN
F 1 "10uH" V 6700 1200 40 0000 C CNN
F 2 "" H 6600 1200 60 0001 C CNN
F 3 "" H 6600 1200 60 0001 C CNN
1 6600 1200
0 -1 -1 0
$EndComp
@ -1520,6 +1636,8 @@ U 1 1 461BE318
P 6250 1150
F 0 "#PWR031" H 6250 1110 30 0001 C CNN
F 1 "+3.3V" H 6250 1260 30 0000 C CNN
F 2 "" H 6250 1150 60 0001 C CNN
F 3 "" H 6250 1150 60 0001 C CNN
1 6250 1150
1 0 0 -1
$EndComp
@ -1529,6 +1647,8 @@ U 1 1 461BE2B7
P 4400 3350
F 0 "#PWR032" H 4400 3350 30 0001 C CNN
F 1 "GND" H 4400 3280 30 0001 C CNN
F 2 "" H 4400 3350 60 0001 C CNN
F 3 "" H 4400 3350 60 0001 C CNN
1 4400 3350
0 1 1 0
$EndComp
@ -1542,6 +1662,8 @@ U 1 1 461BE230
P 5850 3150
F 0 "R9" V 5930 3150 50 0000 C CNN
F 1 "0" V 5850 3150 50 0000 C CNN
F 2 "" H 5850 3150 60 0001 C CNN
F 3 "" H 5850 3150 60 0001 C CNN
1 5850 3150
0 1 1 0
$EndComp
@ -1551,6 +1673,8 @@ U 1 1 461BE20A
P 6150 2200
F 0 "#PWR033" H 6150 2200 30 0001 C CNN
F 1 "GND" H 6150 2130 30 0001 C CNN
F 2 "" H 6150 2200 60 0001 C CNN
F 3 "" H 6150 2200 60 0001 C CNN
1 6150 2200
0 1 1 0
$EndComp
@ -1592,6 +1716,8 @@ U 1 1 461BE128
P 4750 5000
F 0 "#PWR034" H 4750 5100 30 0001 C CNN
F 1 "VDD" H 4750 5110 30 0000 C CNN
F 2 "" H 4750 5000 60 0001 C CNN
F 3 "" H 4750 5000 60 0001 C CNN
1 4750 5000
1 0 0 -1
$EndComp
@ -1601,6 +1727,8 @@ U 1 1 461BE125
P 4150 5000
F 0 "#PWR035" H 4150 5100 30 0001 C CNN
F 1 "VDD" H 4150 5110 30 0000 C CNN
F 2 "" H 4150 5000 60 0001 C CNN
F 3 "" H 4150 5000 60 0001 C CNN
1 4150 5000
1 0 0 -1
$EndComp
@ -1610,6 +1738,8 @@ U 1 1 461BE054
P 5050 5650
F 0 "R13" V 5130 5650 50 0000 C CNN
F 1 "10K" V 5050 5650 50 0000 C CNN
F 2 "" H 5050 5650 60 0001 C CNN
F 3 "" H 5050 5650 60 0001 C CNN
1 5050 5650
0 1 1 0
$EndComp
@ -1619,6 +1749,8 @@ U 1 1 461BE051
P 4450 5550
F 0 "R11" V 4530 5550 50 0000 C CNN
F 1 "10K" V 4450 5550 50 0000 C CNN
F 2 "" H 4450 5550 60 0001 C CNN
F 3 "" H 4450 5550 60 0001 C CNN
1 4450 5550
0 1 1 0
$EndComp
@ -1628,6 +1760,8 @@ U 1 1 461BE04B
P 5050 5450
F 0 "R10" V 5130 5450 50 0000 C CNN
F 1 "10K" V 5050 5450 50 0000 C CNN
F 2 "" H 5050 5450 60 0001 C CNN
F 3 "" H 5050 5450 60 0001 C CNN
1 5050 5450
0 1 1 0
$EndComp
@ -1637,6 +1771,8 @@ U 1 1 461BE047
P 4450 5350
F 0 "R8" V 4530 5350 50 0000 C CNN
F 1 "10K" V 4450 5350 50 0000 C CNN
F 2 "" H 4450 5350 60 0001 C CNN
F 3 "" H 4450 5350 60 0001 C CNN
1 4450 5350
0 1 1 0
$EndComp
@ -1646,6 +1782,8 @@ U 1 1 461BE046
P 5050 5250
F 0 "R6" V 5130 5250 50 0000 C CNN
F 1 "10K" V 5050 5250 50 0000 C CNN
F 2 "" H 5050 5250 60 0001 C CNN
F 3 "" H 5050 5250 60 0001 C CNN
1 5050 5250
0 1 1 0
$EndComp
@ -1655,6 +1793,8 @@ U 1 1 461BE041
P 4450 5150
F 0 "R5" V 4530 5150 50 0000 C CNN
F 1 "10K" V 4450 5150 50 0000 C CNN
F 2 "" H 4450 5150 60 0001 C CNN
F 3 "" H 4450 5150 60 0001 C CNN
1 4450 5150
0 1 1 0
$EndComp
@ -1664,6 +1804,8 @@ U 1 1 461BE039
P 5050 5050
F 0 "R4" V 5130 5050 50 0000 C CNN
F 1 "10K" V 5050 5050 50 0000 C CNN
F 2 "" H 5050 5050 60 0001 C CNN
F 3 "" H 5050 5050 60 0001 C CNN
1 5050 5050
0 1 1 0
$EndComp
@ -1687,6 +1829,8 @@ U 1 1 461BBA34
P 13700 5000
F 0 "TA-1" H 13750 4900 40 0000 C CNN
F 1 "CONN_1" H 13650 5040 30 0001 C CNN
F 2 "" H 13700 5000 60 0001 C CNN
F 3 "" H 13700 5000 60 0001 C CNN
1 13700 5000
1 0 0 -1
$EndComp
@ -1699,6 +1843,8 @@ U 1 1 461BB93F
P 12500 4900
F 0 "#PWR036" H 12500 4860 30 0001 C CNN
F 1 "+3.3V" H 12500 5010 30 0000 C CNN
F 2 "" H 12500 4900 60 0001 C CNN
F 3 "" H 12500 4900 60 0001 C CNN
1 12500 4900
0 -1 -1 0
$EndComp
@ -1742,6 +1888,8 @@ U 1 1 461BB8C6
P 14050 5400
F 0 "#PWR037" H 14050 5400 30 0001 C CNN
F 1 "GND" H 14050 5330 30 0001 C CNN
F 2 "" H 14050 5400 60 0001 C CNN
F 3 "" H 14050 5400 60 0001 C CNN
1 14050 5400
1 0 0 -1
$EndComp
@ -1751,6 +1899,8 @@ U 1 1 461BB8C0
P 14050 5150
F 0 "R26" V 14130 5150 50 0000 C CNN
F 1 "10K" V 14050 5150 50 0000 C CNN
F 2 "" H 14050 5150 60 0001 C CNN
F 3 "" H 14050 5150 60 0001 C CNN
1 14050 5150
1 0 0 -1
$EndComp
@ -1760,6 +1910,8 @@ U 1 1 461BB894
P 14650 4950
F 0 "CLKOUT1" H 14700 4850 40 0000 C CNN
F 1 "CONN_1" H 14600 4990 30 0001 C CNN
F 2 "" H 14650 4950 60 0001 C CNN
F 3 "" H 14650 4950 60 0001 C CNN
1 14650 4950
1 0 0 -1
$EndComp
@ -1773,6 +1925,8 @@ U 1 1 461BB7AD
P 13800 2850
F 0 "#PWR038" H 13800 2950 30 0001 C CNN
F 1 "VDD" H 13800 2960 30 0000 C CNN
F 2 "" H 13800 2850 60 0001 C CNN
F 3 "" H 13800 2850 60 0001 C CNN
1 13800 2850
1 0 0 -1
$EndComp
@ -1782,6 +1936,8 @@ U 1 1 461BB799
P 14550 3200
F 0 "R20" V 14630 3200 50 0000 C CNN
F 1 "4,7K" V 14550 3200 50 0000 C CNN
F 2 "" H 14550 3200 60 0001 C CNN
F 3 "" H 14550 3200 60 0001 C CNN
1 14550 3200
1 0 0 -1
$EndComp
@ -1791,6 +1947,8 @@ U 1 1 461BB798
P 14300 3200
F 0 "R19" V 14380 3200 50 0000 C CNN
F 1 "4,7K" V 14300 3200 50 0000 C CNN
F 2 "" H 14300 3200 60 0001 C CNN
F 3 "" H 14300 3200 60 0001 C CNN
1 14300 3200
1 0 0 -1
$EndComp
@ -1800,6 +1958,8 @@ U 1 1 461BB795
P 14050 3200
F 0 "R18" V 14130 3200 50 0000 C CNN
F 1 "4,7K" V 14050 3200 50 0000 C CNN
F 2 "" H 14050 3200 60 0001 C CNN
F 3 "" H 14050 3200 60 0001 C CNN
1 14050 3200
1 0 0 -1
$EndComp
@ -1809,6 +1969,8 @@ U 1 1 461BB790
P 13800 3200
F 0 "R17" V 13880 3200 50 0000 C CNN
F 1 "4,7K" V 13800 3200 50 0000 C CNN
F 2 "" H 13800 3200 60 0001 C CNN
F 3 "" H 13800 3200 60 0001 C CNN
1 13800 3200
1 0 0 -1
$EndComp
@ -1828,6 +1990,8 @@ U 1 1 461BB742
P 5400 3750
F 0 "R46" V 5480 3750 50 0000 C CNN
F 1 "22" V 5400 3750 50 0000 C CNN
F 2 "" H 5400 3750 60 0001 C CNN
F 3 "" H 5400 3750 60 0001 C CNN
1 5400 3750
0 1 1 0
$EndComp
@ -1853,6 +2017,8 @@ U 1 1 461BB690
P 5600 3150
F 0 "#PWR039" H 5600 3150 30 0001 C CNN
F 1 "GND" H 5600 3080 30 0001 C CNN
F 2 "" H 5600 3150 60 0001 C CNN
F 3 "" H 5600 3150 60 0001 C CNN
1 5600 3150
0 1 1 0
$EndComp
@ -1862,6 +2028,8 @@ U 1 1 461BB68E
P 3750 2000
F 0 "#PWR040" H 3750 2000 30 0001 C CNN
F 1 "GND" H 3750 1930 30 0001 C CNN
F 2 "" H 3750 2000 60 0001 C CNN
F 3 "" H 3750 2000 60 0001 C CNN
1 3750 2000
0 1 1 0
$EndComp
@ -1871,6 +2039,8 @@ U 1 1 461BB662
P 4650 1100
F 0 "#PWR041" H 4650 1200 30 0001 C CNN
F 1 "VDD" H 4650 1210 30 0000 C CNN
F 2 "" H 4650 1100 60 0001 C CNN
F 3 "" H 4650 1100 60 0001 C CNN
1 4650 1100
1 0 0 -1
$EndComp
@ -1880,6 +2050,8 @@ U 1 1 461BB661
P 4650 1350
F 0 "R2" V 4730 1350 50 0000 C CNN
F 1 "4,7K" V 4650 1350 50 0000 C CNN
F 2 "" H 4650 1350 60 0001 C CNN
F 3 "" H 4650 1350 60 0001 C CNN
1 4650 1350
1 0 0 -1
$EndComp
@ -1889,6 +2061,8 @@ U 1 1 461BB660
P 4450 1100
F 0 "#PWR042" H 4450 1200 30 0001 C CNN
F 1 "VDD" H 4450 1210 30 0000 C CNN
F 2 "" H 4450 1100 60 0001 C CNN
F 3 "" H 4450 1100 60 0001 C CNN
1 4450 1100
1 0 0 -1
$EndComp
@ -1898,6 +2072,8 @@ U 1 1 461BB65F
P 4450 1350
F 0 "R25" V 4530 1350 50 0000 C CNN
F 1 "4,7K" V 4450 1350 50 0000 C CNN
F 2 "" H 4450 1350 60 0001 C CNN
F 3 "" H 4450 1350 60 0001 C CNN
1 4450 1350
1 0 0 -1
$EndComp
@ -1907,6 +2083,8 @@ U 1 1 461BB648
P 4050 2000
F 0 "CLK1" H 4050 2150 60 0000 C CNN
F 1 "JUMPER" H 4050 1920 40 0000 C CNN
F 2 "" H 4050 2000 60 0001 C CNN
F 3 "" H 4050 2000 60 0001 C CNN
1 4050 2000
1 0 0 -1
$EndComp
@ -1916,6 +2094,8 @@ U 1 1 461BB62E
P 4050 1650
F 0 "CLK0" H 4050 1800 60 0000 C CNN
F 1 "JUMPER" H 4050 1570 40 0000 C CNN
F 2 "" H 4050 1650 60 0001 C CNN
F 3 "" H 4050 1650 60 0001 C CNN
1 4050 1650
1 0 0 -1
$EndComp
@ -1925,6 +2105,8 @@ U 1 1 461BB60D
P 8400 1650
F 0 "#PWR043" H 8400 1750 30 0001 C CNN
F 1 "VDD" H 8400 1760 30 0000 C CNN
F 2 "" H 8400 1650 60 0001 C CNN
F 3 "" H 8400 1650 60 0001 C CNN
1 8400 1650
1 0 0 -1
$EndComp
@ -1934,6 +2116,8 @@ U 1 1 461BB5E5
P 7050 10100
F 0 "C6" H 7100 10200 50 0000 L CNN
F 1 "100nF" H 7100 10000 50 0000 L CNN
F 2 "" H 7050 10100 60 0001 C CNN
F 3 "" H 7050 10100 60 0001 C CNN
1 7050 10100
1 0 0 -1
$EndComp
@ -1943,6 +2127,8 @@ U 1 1 461BB525
P 5050 2800
F 0 "#PWR044" H 5050 2900 30 0001 C CNN
F 1 "VDD" H 5050 2910 30 0000 C CNN
F 2 "" H 5050 2800 60 0001 C CNN
F 3 "" H 5050 2800 60 0001 C CNN
1 5050 2800
1 0 0 -1
$EndComp
@ -1952,6 +2138,8 @@ U 1 1 461BAF82
P 3750 1650
F 0 "#PWR045" H 3750 1650 30 0001 C CNN
F 1 "GND" H 3750 1580 30 0001 C CNN
F 2 "" H 3750 1650 60 0001 C CNN
F 3 "" H 3750 1650 60 0001 C CNN
1 3750 1650
0 1 1 0
$EndComp
@ -1961,6 +2149,8 @@ U 1 1 461BAF5C
P 5050 3050
F 0 "R16" V 5130 3050 50 0000 C CNN
F 1 "4,7K" V 5050 3050 50 0000 C CNN
F 2 "" H 5050 3050 60 0001 C CNN
F 3 "" H 5050 3050 60 0001 C CNN
1 5050 3050
1 0 0 -1
$EndComp
@ -1970,6 +2160,8 @@ U 1 1 461BAF4F
P 4700 3350
F 0 "BDM_EN1" H 4700 3500 60 0000 C CNN
F 1 "JUMPER" H 4700 3270 40 0000 C CNN
F 2 "" H 4700 3350 60 0001 C CNN
F 3 "" H 4700 3350 60 0001 C CNN
1 4700 3350
1 0 0 -1
$EndComp
@ -1979,6 +2171,8 @@ U 1 1 461BAF37
P 13550 4600
F 0 "#PWR046" H 13550 4600 30 0001 C CNN
F 1 "GND" H 13550 4530 30 0001 C CNN
F 2 "" H 13550 4600 60 0001 C CNN
F 3 "" H 13550 4600 60 0001 C CNN
1 13550 4600
0 -1 -1 0
$EndComp
@ -1988,6 +2182,8 @@ U 1 1 461BAF13
P 12650 5000
F 0 "#PWR047" H 12650 5000 30 0001 C CNN
F 1 "GND" H 12650 4930 30 0001 C CNN
F 2 "" H 12650 5000 60 0001 C CNN
F 3 "" H 12650 5000 60 0001 C CNN
1 12650 5000
1 0 0 -1
$EndComp
@ -1997,6 +2193,8 @@ U 1 1 461BAEE7
P 13150 4300
F 0 "BDM_PORT1" H 13150 5000 60 0000 C CNN
F 1 "CONN_13X2" V 13150 4300 50 0000 C CNN
F 2 "" H 13150 4300 60 0001 C CNN
F 3 "" H 13150 4300 60 0001 C CNN
1 13150 4300
1 0 0 -1
$EndComp
@ -2006,6 +2204,8 @@ U 1 1 461BAEA3
P 6300 9800
F 0 "#PWR048" H 6300 9900 30 0001 C CNN
F 1 "VDD" H 6300 9910 30 0000 C CNN
F 2 "" H 6300 9800 60 0001 C CNN
F 3 "" H 6300 9800 60 0001 C CNN
1 6300 9800
1 0 0 -1
$EndComp
@ -2015,6 +2215,8 @@ U 1 1 46161D48
P 9650 10400
F 0 "#PWR049" H 9650 10400 30 0001 C CNN
F 1 "GND" H 9650 10330 30 0001 C CNN
F 2 "" H 9650 10400 60 0001 C CNN
F 3 "" H 9650 10400 60 0001 C CNN
1 9650 10400
1 0 0 -1
$EndComp
@ -2024,6 +2226,8 @@ U 1 1 46161D3C
P 9650 10100
F 0 "C17" H 9700 10200 50 0000 L CNN
F 1 "100uF" H 9700 10000 50 0000 L CNN
F 2 "" H 9650 10100 60 0001 C CNN
F 3 "" H 9650 10100 60 0001 C CNN
1 9650 10100
1 0 0 -1
$EndComp
@ -2033,6 +2237,8 @@ U 1 1 46161D18
P 5650 9800
F 0 "#PWR050" H 5650 9760 30 0001 C CNN
F 1 "+3.3V" H 5650 9910 30 0000 C CNN
F 2 "" H 5650 9800 60 0001 C CNN
F 3 "" H 5650 9800 60 0001 C CNN
1 5650 9800
1 0 0 -1
$EndComp
@ -2042,6 +2248,8 @@ U 1 1 46161CDA
P 9250 10100
F 0 "C12" H 9300 10200 50 0000 L CNN
F 1 "100nF" H 9300 10000 50 0000 L CNN
F 2 "" H 9250 10100 60 0001 C CNN
F 3 "" H 9250 10100 60 0001 C CNN
1 9250 10100
1 0 0 -1
$EndComp
@ -2051,6 +2259,8 @@ U 1 1 46161CD9
P 8900 10100
F 0 "C11" H 8950 10200 50 0000 L CNN
F 1 "100nF" H 8950 10000 50 0000 L CNN
F 2 "" H 8900 10100 60 0001 C CNN
F 3 "" H 8900 10100 60 0001 C CNN
1 8900 10100
1 0 0 -1
$EndComp
@ -2060,6 +2270,8 @@ U 1 1 46161CD8
P 8500 10100
F 0 "C10" H 8550 10200 50 0000 L CNN
F 1 "100nF" H 8550 10000 50 0000 L CNN
F 2 "" H 8500 10100 60 0001 C CNN
F 3 "" H 8500 10100 60 0001 C CNN
1 8500 10100
1 0 0 -1
$EndComp
@ -2069,6 +2281,8 @@ U 1 1 46161CD7
P 8150 10100
F 0 "C9" H 8200 10200 50 0000 L CNN
F 1 "100nF" H 8200 10000 50 0000 L CNN
F 2 "" H 8150 10100 60 0001 C CNN
F 3 "" H 8150 10100 60 0001 C CNN
1 8150 10100
1 0 0 -1
$EndComp
@ -2078,6 +2292,8 @@ U 1 1 46161CD4
P 7800 10100
F 0 "C8" H 7850 10200 50 0000 L CNN
F 1 "100nF" H 7850 10000 50 0000 L CNN
F 2 "" H 7800 10100 60 0001 C CNN
F 3 "" H 7800 10100 60 0001 C CNN
1 7800 10100
1 0 0 -1
$EndComp
@ -2087,6 +2303,8 @@ U 1 1 46161CD3
P 7450 10100
F 0 "C7" H 7500 10200 50 0000 L CNN
F 1 "100nF" H 7500 10000 50 0000 L CNN
F 2 "" H 7450 10100 60 0001 C CNN
F 3 "" H 7450 10100 60 0001 C CNN
1 7450 10100
1 0 0 -1
$EndComp
@ -2096,6 +2314,8 @@ U 1 1 46161CB8
P 6650 10100
F 0 "C5" H 6700 10200 50 0000 L CNN
F 1 "100nF" H 6700 10000 50 0000 L CNN
F 2 "" H 6650 10100 60 0001 C CNN
F 3 "" H 6650 10100 60 0001 C CNN
1 6650 10100
1 0 0 -1
$EndComp
@ -2105,6 +2325,8 @@ U 1 1 46161CB5
P 6300 10100
F 0 "C4" H 6350 10200 50 0000 L CNN
F 1 "100nF" H 6350 10000 50 0000 L CNN
F 2 "" H 6300 10100 60 0001 C CNN
F 3 "" H 6300 10100 60 0001 C CNN
1 6300 10100
1 0 0 -1
$EndComp

View File

@ -1,4 +1,4 @@
EESchema Schematic File Version 2 date 27/11/2009 11:46:34
EESchema Schematic File Version 2
LIBS:power
LIBS:device
LIBS:transistors
@ -6,31 +6,17 @@ LIBS:conn
LIBS:linear
LIBS:regul
LIBS:74xx
LIBS:cmos4000
LIBS:adc-dac
LIBS:memory
LIBS:xilinx
LIBS:special
LIBS:microcontrollers
LIBS:dsp
LIBS:microchip
LIBS:analog_switches
LIBS:motorola
LIBS:texas
LIBS:intel
LIBS:audio
LIBS:interface
LIBS:digital-audio
LIBS:philips
LIBS:display
LIBS:cypress
LIBS:siliconi
LIBS:contrib
LIBS:valves
LIBS:kit-dev-coldfire-xilinx_5213-cache
EELAYER 23 0
EELAYER 24 0
EELAYER END
$Descr A4 11700 8267
$Descr A4 11693 8268
encoding utf-8
Sheet 3 3
Title "Dev kit coldfire 5213"
Date "8 feb 2008"
@ -377,6 +363,8 @@ U 1 1 480DCF5A
P 3500 4100
F 0 "#PWR0105" H 3500 4100 30 0001 C CNN
F 1 "GND" H 3500 4030 30 0001 C CNN
F 2 "" H 3500 4100 60 0001 C CNN
F 3 "" H 3500 4100 60 0001 C CNN
1 3500 4100
0 1 1 0
$EndComp
@ -386,6 +374,8 @@ U 1 1 4791D619
P 10850 3900
F 0 "#PWR0106" H 10850 3860 30 0001 C CNN
F 1 "+3,3V" H 10850 4010 30 0000 C CNN
F 2 "" H 10850 3900 60 0001 C CNN
F 3 "" H 10850 3900 60 0001 C CNN
1 10850 3900
1 0 0 -1
$EndComp
@ -395,6 +385,8 @@ U 1 1 4791D59D
P 10450 3900
F 0 "R64" V 10530 3900 50 0000 C CNN
F 1 "3,3" V 10450 3900 50 0000 C CNN
F 2 "" H 10450 3900 60 0001 C CNN
F 3 "" H 10450 3900 60 0001 C CNN
1 10450 3900
0 1 1 0
$EndComp
@ -428,6 +420,8 @@ U 1 1 470F3BF2
P 3450 1250
F 0 "#PWR0107" H 3450 1250 30 0001 C CNN
F 1 "GND" H 3450 1180 30 0001 C CNN
F 2 "" H 3450 1250 60 0001 C CNN
F 3 "" H 3450 1250 60 0001 C CNN
1 3450 1250
1 0 0 -1
$EndComp
@ -476,6 +470,8 @@ U 1 1 46A76EB2
P 6600 1250
F 0 "P3" H 6600 1400 50 0000 C CNN
F 1 "CONN_2X2" H 6610 1120 40 0000 C CNN
F 2 "" H 6600 1250 60 0001 C CNN
F 3 "" H 6600 1250 60 0001 C CNN
1 6600 1250
-1 0 0 -1
$EndComp
@ -485,6 +481,8 @@ U 1 1 470F38BE
P 4550 4100
F 0 "U9" H 4600 4150 70 0000 C CNN
F 1 "XCR3256-TQ144" H 4550 500 60 0000 C CNN
F 2 "" H 4550 4100 60 0001 C CNN
F 3 "" H 4550 4100 60 0001 C CNN
1 4550 4100
1 0 0 -1
$EndComp
@ -584,6 +582,8 @@ U 1 1 46ADE620
P 9600 4000
F 0 "#PWR0108" H 9600 4000 30 0001 C CNN
F 1 "GND" H 9600 3930 30 0001 C CNN
F 2 "" H 9600 4000 60 0001 C CNN
F 3 "" H 9600 4000 60 0001 C CNN
1 9600 4000
0 -1 -1 0
$EndComp
@ -593,6 +593,8 @@ U 1 1 46ADE61B
P 9600 2100
F 0 "#PWR0109" H 9600 2100 30 0001 C CNN
F 1 "GND" H 9600 2030 30 0001 C CNN
F 2 "" H 9600 2100 60 0001 C CNN
F 3 "" H 9600 2100 60 0001 C CNN
1 9600 2100
0 -1 -1 0
$EndComp
@ -660,6 +662,8 @@ U 1 1 46ADE55A
P 9200 3050
F 0 "P4" H 9250 3100 60 0000 C CNN
F 1 "CONN_20X2" V 9200 3050 50 0000 C CNN
F 2 "" H 9200 3050 60 0001 C CNN
F 3 "" H 9200 3050 60 0001 C CNN
1 9200 3050
1 0 0 -1
$EndComp
@ -699,6 +703,8 @@ U 1 1 46A76BD3
P 2750 1300
F 0 "#PWR0110" H 2750 1260 30 0001 C CNN
F 1 "+3,3V" V 2750 1500 30 0000 C CNN
F 2 "" H 2750 1300 60 0001 C CNN
F 3 "" H 2750 1300 60 0001 C CNN
1 2750 1300
0 1 1 0
$EndComp
@ -708,6 +714,8 @@ U 1 1 46A76BD2
P 3550 650
F 0 "#PWR0111" H 3550 610 30 0001 C CNN
F 1 "+3,3V" H 3550 760 30 0000 C CNN
F 2 "" H 3550 650 60 0001 C CNN
F 3 "" H 3550 650 60 0001 C CNN
1 3550 650
1 0 0 -1
$EndComp
@ -717,6 +725,8 @@ U 1 1 46A76BCA
P 3300 650
F 0 "R57" V 3380 650 50 0000 C CNN
F 1 "4K7" V 3300 650 50 0000 C CNN
F 2 "" H 3300 650 60 0001 C CNN
F 3 "" H 3300 650 60 0001 C CNN
1 3300 650
0 1 1 0
$EndComp
@ -728,6 +738,8 @@ U 1 1 46A76BC5
P 9500 4950
F 0 "#PWR0112" H 9500 4950 40 0001 C CNN
F 1 "GND" H 9500 4880 40 0001 C CNN
F 2 "" H 9500 4950 60 0001 C CNN
F 3 "" H 9500 4950 60 0001 C CNN
1 9500 4950
0 -1 -1 0
$EndComp
@ -737,6 +749,8 @@ U 1 1 46A76BC4
P 9300 4950
F 0 "D8" H 9300 5050 50 0000 C CNN
F 1 "LED" H 9300 4850 50 0000 C CNN
F 2 "" H 9300 4950 60 0001 C CNN
F 3 "" H 9300 4950 60 0001 C CNN
1 9300 4950
1 0 0 -1
$EndComp
@ -746,6 +760,8 @@ U 1 1 46A76BC3
P 8800 4950
F 0 "R62" V 8880 4950 50 0000 C CNN
F 1 "1K" V 8800 4950 50 0000 C CNN
F 2 "" H 8800 4950 60 0001 C CNN
F 3 "" H 8800 4950 60 0001 C CNN
1 8800 4950
0 -1 -1 0
$EndComp
@ -755,6 +771,8 @@ U 1 1 46A76BC1
P 7650 6650
F 0 "#PWR0113" H 7650 6650 30 0001 C CNN
F 1 "GND" H 7650 6580 30 0001 C CNN
F 2 "" H 7650 6650 60 0001 C CNN
F 3 "" H 7650 6650 60 0001 C CNN
1 7650 6650
1 0 0 -1
$EndComp
@ -764,6 +782,8 @@ U 1 1 46A76BBF
P 7650 6050
F 0 "#PWR0114" H 7650 6010 30 0001 C CNN
F 1 "+3,3V" H 7650 6160 30 0000 C CNN
F 2 "" H 7650 6050 60 0001 C CNN
F 3 "" H 7650 6050 60 0001 C CNN
1 7650 6050
1 0 0 -1
$EndComp
@ -773,6 +793,8 @@ U 1 1 46A76BBC
P 10650 6350
F 0 "C61" H 10700 6450 50 0000 L CNN
F 1 "100nF" H 10650 6250 50 0000 L CNN
F 2 "" H 10650 6350 60 0001 C CNN
F 3 "" H 10650 6350 60 0001 C CNN
1 10650 6350
1 0 0 -1
$EndComp
@ -782,6 +804,8 @@ U 1 1 46A76BBB
P 10350 6350
F 0 "C60" H 10400 6450 50 0000 L CNN
F 1 "100nF" H 10350 6250 50 0000 L CNN
F 2 "" H 10350 6350 60 0001 C CNN
F 3 "" H 10350 6350 60 0001 C CNN
1 10350 6350
1 0 0 -1
$EndComp
@ -791,6 +815,8 @@ U 1 1 46A76BBA
P 10050 6350
F 0 "C59" H 10100 6450 50 0000 L CNN
F 1 "100nF" H 10050 6250 50 0000 L CNN
F 2 "" H 10050 6350 60 0001 C CNN
F 3 "" H 10050 6350 60 0001 C CNN
1 10050 6350
1 0 0 -1
$EndComp
@ -800,6 +826,8 @@ U 1 1 46A76BB5
P 8550 6350
F 0 "C54" H 8600 6450 50 0000 L CNN
F 1 "100nF" H 8550 6250 50 0000 L CNN
F 2 "" H 8550 6350 60 0001 C CNN
F 3 "" H 8550 6350 60 0001 C CNN
1 8550 6350
1 0 0 -1
$EndComp
@ -809,6 +837,8 @@ U 1 1 46A76BB4
P 8250 6350
F 0 "C53" H 8300 6450 50 0000 L CNN
F 1 "100nF" H 8250 6250 50 0000 L CNN
F 2 "" H 8250 6350 60 0001 C CNN
F 3 "" H 8250 6350 60 0001 C CNN
1 8250 6350
1 0 0 -1
$EndComp
@ -818,6 +848,8 @@ U 1 1 46A76BB3
P 7950 6350
F 0 "C52" H 8000 6450 50 0000 L CNN
F 1 "100nF" H 7950 6250 50 0000 L CNN
F 2 "" H 7950 6350 60 0001 C CNN
F 3 "" H 7950 6350 60 0001 C CNN
1 7950 6350
1 0 0 -1
$EndComp
@ -827,6 +859,8 @@ U 1 1 46A76BB2
P 7650 6350
F 0 "C51" H 7700 6450 50 0000 L CNN
F 1 "100nF" H 7650 6250 50 0000 L CNN
F 2 "" H 7650 6350 60 0001 C CNN
F 3 "" H 7650 6350 60 0001 C CNN
1 7650 6350
1 0 0 -1
$EndComp
@ -836,6 +870,8 @@ U 1 1 46A76BB1
P 9750 6350
F 0 "C58" H 9800 6450 50 0000 L CNN
F 1 "100nF" H 9750 6250 50 0000 L CNN
F 2 "" H 9750 6350 60 0001 C CNN
F 3 "" H 9750 6350 60 0001 C CNN
1 9750 6350
1 0 0 -1
$EndComp
@ -845,6 +881,8 @@ U 1 1 46A76BB0
P 9450 6350
F 0 "C57" H 9500 6450 50 0000 L CNN
F 1 "100nF" H 9450 6250 50 0000 L CNN
F 2 "" H 9450 6350 60 0001 C CNN
F 3 "" H 9450 6350 60 0001 C CNN
1 9450 6350
1 0 0 -1
$EndComp
@ -854,6 +892,8 @@ U 1 1 46A76BAF
P 9150 6350
F 0 "C56" H 9200 6450 50 0000 L CNN
F 1 "100nF" H 9150 6250 50 0000 L CNN
F 2 "" H 9150 6350 60 0001 C CNN
F 3 "" H 9150 6350 60 0001 C CNN
1 9150 6350
1 0 0 -1
$EndComp
@ -863,6 +903,8 @@ U 1 1 46A76BAE
P 8850 6350
F 0 "C55" H 8900 6450 50 0000 L CNN
F 1 "100nF" H 8850 6250 50 0000 L CNN
F 2 "" H 8850 6350 60 0001 C CNN
F 3 "" H 8850 6350 60 0001 C CNN
1 8850 6350
1 0 0 -1
$EndComp
@ -876,6 +918,8 @@ U 1 1 46A76BA9
P 9500 5250
F 0 "#PWR0115" H 9500 5250 40 0001 C CNN
F 1 "GND" H 9500 5180 40 0001 C CNN
F 2 "" H 9500 5250 60 0001 C CNN
F 3 "" H 9500 5250 60 0001 C CNN
1 9500 5250
0 -1 -1 0
$EndComp
@ -885,6 +929,8 @@ U 1 1 46A76BA8
P 9300 5250
F 0 "D9" H 9300 5350 50 0000 C CNN
F 1 "LED" H 9300 5150 50 0000 C CNN
F 2 "" H 9300 5250 60 0001 C CNN
F 3 "" H 9300 5250 60 0001 C CNN
1 9300 5250
1 0 0 -1
$EndComp
@ -894,6 +940,8 @@ U 1 1 46A76BA7
P 8800 5250
F 0 "R63" V 8880 5250 50 0000 C CNN
F 1 "1K" V 8800 5250 50 0000 C CNN
F 2 "" H 8800 5250 60 0001 C CNN
F 3 "" H 8800 5250 60 0001 C CNN
1 8800 5250
0 -1 -1 0
$EndComp
@ -909,6 +957,8 @@ U 1 1 46A76BA6
P 2350 1050
F 0 "P1" V 2300 1050 60 0000 C CNN
F 1 "CONN_6" V 2400 1050 60 0000 C CNN
F 2 "" H 2350 1050 60 0001 C CNN
F 3 "" H 2350 1050 60 0001 C CNN
1 2350 1050
-1 0 0 1
$EndComp
@ -918,6 +968,8 @@ U 1 1 46A76BA5
P 2700 1200
F 0 "#PWR0116" H 2700 1200 40 0001 C CNN
F 1 "GND" H 2700 1130 40 0001 C CNN
F 2 "" H 2700 1200 60 0001 C CNN
F 3 "" H 2700 1200 60 0001 C CNN
1 2700 1200
0 -1 -1 0
$EndComp

View File

@ -94,6 +94,7 @@ extern const wxString SVGFileWildcard;
extern const wxString ReportFileWildcard;
extern const wxString FootprintPlaceFileWildcard;
extern const wxString Shapes3DFileWildcard;
extern const wxString IDF3DFileWildcard;
extern const wxString DocModulesFileName;
extern const wxString LegacyFootprintLibPathWildcard;
extern const wxString KiCadFootprintLibFileWildcard;

View File

@ -36,15 +36,12 @@
#include <bezier_curves.h>
#include <class_drawpanel.h>
#include <class_pcb_screen.h>
#include <kicad_string.h>
#include <colors_selection.h>
#include <trigo.h>
#include <richio.h>
#include <pcbcommon.h>
#include <msgpanel.h>
#include <pcbnew.h>
#include <math_for_graphics.h>
#include <class_board.h>
#include <class_module.h>

View File

@ -146,7 +146,7 @@ MODULE::MODULE( const MODULE& aModule ) :
// Copy auxiliary data: 3D_Drawings info
for( S3D_MASTER* item = aModule.m_3D_Drawings; item; item = item->Next() )
{
if( item->m_Shape3DName.IsEmpty() ) // do not copy empty shapes.
if( item->GetShape3DName().IsEmpty() ) // do not copy empty shapes.
continue;
S3D_MASTER* t3d = m_3D_Drawings;
@ -270,12 +270,12 @@ void MODULE::Copy( MODULE* aModule )
for( S3D_MASTER* item = aModule->m_3D_Drawings; item; item = item->Next() )
{
if( item->m_Shape3DName.IsEmpty() ) // do not copy empty shapes.
if( item->GetShape3DName().IsEmpty() ) // do not copy empty shapes.
continue;
S3D_MASTER* t3d = m_3D_Drawings;
if( t3d && t3d->m_Shape3DName.IsEmpty() ) // The first entry can
if( t3d && t3d->GetShape3DName().IsEmpty() ) // The first entry can
{ // exist, but is empty : use it.
t3d->Copy( item );
}
@ -530,9 +530,9 @@ void MODULE::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
// Search the first active 3D shape in list
for( S3D_MASTER* struct3D = m_3D_Drawings; struct3D; struct3D = struct3D->Next() )
{
if( !struct3D->m_Shape3DName.IsEmpty() )
if( !struct3D->GetShape3DName().IsEmpty() )
{
msg = struct3D->m_Shape3DName;
msg = struct3D->GetShape3DName();
break;
}
}

View File

@ -249,12 +249,12 @@ void DIALOG_MODULE_BOARD_EDITOR::InitModeditProperties()
while( draw3D )
{
if( !draw3D->m_Shape3DName.IsEmpty() )
if( !draw3D->GetShape3DName().IsEmpty() )
{
S3D_MASTER* draw3DCopy = new S3D_MASTER( NULL );
draw3DCopy->Copy( draw3D );
m_Shapes3D_list.push_back( draw3DCopy );
m_3D_ShapeNameListBox->Append( draw3DCopy->m_Shape3DName );
m_3D_ShapeNameListBox->Append( draw3DCopy->GetShape3DName() );
}
draw3D = (S3D_MASTER*) draw3D->Next();
}
@ -428,11 +428,16 @@ void DIALOG_MODULE_BOARD_EDITOR::Browse3DLib( wxCommandEvent& event )
fullpath.Replace( wxT( "/" ), wxT( "\\" ) );
#endif
wxString fileFilters;
fileFilters = wxGetTranslation( Shapes3DFileWildcard );
fileFilters += wxChar( '|' );
fileFilters += wxGetTranslation( IDF3DFileWildcard );
fullfilename = EDA_FileSelector( _( "3D Shape:" ),
fullpath,
wxEmptyString,
wxEmptyString,
wxGetTranslation( Shapes3DFileWildcard ),
wxGetTranslation( fileFilters ),
this,
wxFD_OPEN,
true
@ -474,7 +479,7 @@ void DIALOG_MODULE_BOARD_EDITOR::Browse3DLib( wxCommandEvent& event )
// Store filename in Unix notation
shortfilename.Replace( wxT( "\\" ), wxT( "/" ) );
#endif
new3DShape->m_Shape3DName = shortfilename;
new3DShape->SetShape3DName( shortfilename );
m_Shapes3D_list.push_back( new3DShape );
m_3D_ShapeNameListBox->Append( shortfilename );
@ -606,7 +611,7 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event )
{
S3D_MASTER* draw3DCopy = m_Shapes3D_list[ii];
if( draw3DCopy->m_Shape3DName.IsEmpty() )
if( draw3DCopy->GetShape3DName().IsEmpty() )
continue;
if( draw3D == NULL )
@ -615,7 +620,7 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event )
m_CurrentModule->Models().Append( draw3D );
}
draw3D->m_Shape3DName = draw3DCopy->m_Shape3DName;
draw3D->SetShape3DName( draw3DCopy->GetShape3DName() );
draw3D->m_MatScale = draw3DCopy->m_MatScale;
draw3D->m_MatRotation = draw3DCopy->m_MatRotation;
draw3D->m_MatPosition = draw3DCopy->m_MatPosition;

View File

@ -98,12 +98,12 @@ void DIALOG_MODULE_MODULE_EDITOR::initModeditProperties()
while( draw3D )
{
if( !draw3D->m_Shape3DName.IsEmpty() )
if( !draw3D->GetShape3DName().IsEmpty() )
{
S3D_MASTER* draw3DCopy = new S3D_MASTER(NULL);
draw3DCopy->Copy( draw3D );
m_shapes3D_list.push_back( draw3DCopy );
m_3D_ShapeNameListBox->Append( draw3DCopy->m_Shape3DName );
m_3D_ShapeNameListBox->Append( draw3DCopy->GetShape3DName() );
}
draw3D = (S3D_MASTER*) draw3D->Next();
}
@ -292,11 +292,16 @@ void DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DLib( wxCommandEvent& event )
fullpath.Replace( wxT( "/" ), wxT( "\\" ) );
#endif
wxString fileFilters;
fileFilters = wxGetTranslation( Shapes3DFileWildcard );
fileFilters += wxChar( '|' );
fileFilters += wxGetTranslation( IDF3DFileWildcard );
fullfilename = EDA_FileSelector( _( "3D Shape:" ),
fullpath,
wxEmptyString,
wxEmptyString,
wxGetTranslation( Shapes3DFileWildcard ),
wxGetTranslation( fileFilters ),
this,
wxFD_OPEN,
true
@ -339,7 +344,7 @@ void DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DLib( wxCommandEvent& event )
shortfilename.Replace( wxT( "\\" ), wxT( "/" ) );
#endif
new3DShape->m_Shape3DName = shortfilename;
new3DShape->SetShape3DName( shortfilename );
m_shapes3D_list.push_back( new3DShape );
m_3D_ShapeNameListBox->Append( shortfilename );
@ -439,7 +444,7 @@ void DIALOG_MODULE_MODULE_EDITOR::OnOkClick( wxCommandEvent& event )
{
S3D_MASTER* draw3DCopy = m_shapes3D_list[ii];
if( draw3DCopy->m_Shape3DName.IsEmpty() )
if( draw3DCopy->GetShape3DName().IsEmpty() )
continue;
if( draw3D == NULL )
@ -448,7 +453,7 @@ void DIALOG_MODULE_MODULE_EDITOR::OnOkClick( wxCommandEvent& event )
m_currentModule->Models().Append( draw3D );
}
draw3D->m_Shape3DName = draw3DCopy->m_Shape3DName;
draw3D->SetShape3DName( draw3DCopy->GetShape3DName() );
draw3D->m_MatScale = draw3DCopy->m_MatScale;
draw3D->m_MatRotation = draw3DCopy->m_MatRotation;
draw3D->m_MatPosition = draw3DCopy->m_MatPosition;

View File

@ -64,7 +64,7 @@ public:
SetFocus();
m_idfThouOpt = false;
m_config->Read( OPTKEY_IDF_THOU, &m_idfThouOpt );
m_chkThou->SetValue( m_idfThouOpt );
m_rbUnitSelection->SetSelection( m_idfThouOpt ? 1 : 0 );
GetSizer()->SetSizeHints( this );
Centre();
@ -72,13 +72,13 @@ public:
~DIALOG_EXPORT_IDF3()
{
m_idfThouOpt = m_chkThou->GetValue();
m_idfThouOpt = m_rbUnitSelection->GetSelection() == 1;
m_config->Write( OPTKEY_IDF_THOU, m_idfThouOpt );
}
bool GetThouOption()
{
return m_chkThou->GetValue();
return m_rbUnitSelection->GetSelection() == 1;
}
wxFilePickerCtrl* FilePicker()

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -16,17 +16,22 @@ DIALOG_EXPORT_IDF3_BASE::DIALOG_EXPORT_IDF3_BASE( wxWindow* parent, wxWindowID i
wxBoxSizer* bSizerIDFFile;
bSizerIDFFile = new wxBoxSizer( wxVERTICAL );
m_txtBrdFile = new wxStaticText( this, wxID_ANY, wxT("IDF Board file"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerIDFFile->SetMinSize( wxSize( 500,-1 ) );
m_txtBrdFile = new wxStaticText( this, wxID_ANY, _("IDF board file"), wxDefaultPosition, wxDefaultSize, 0 );
m_txtBrdFile->Wrap( -1 );
bSizerIDFFile->Add( m_txtBrdFile, 0, wxALL, 5 );
bSizerIDFFile->Add( m_txtBrdFile, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_filePickerIDF = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, wxT("Select a board file"), wxT("*.emn"), wxDefaultPosition, wxDefaultSize, wxFLP_OVERWRITE_PROMPT|wxFLP_SAVE|wxFLP_USE_TEXTCTRL );
m_filePickerIDF->SetMinSize( wxSize( 420,30 ) );
m_filePickerIDF = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Select an IDF export filename"), wxT("*.emn"), wxDefaultPosition, wxSize( 450,-1 ), wxFLP_OVERWRITE_PROMPT|wxFLP_SAVE|wxFLP_USE_TEXTCTRL );
bSizerIDFFile->Add( m_filePickerIDF, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerIDFFile->Add( m_filePickerIDF, 0, wxALL, 5 );
wxString m_rbUnitSelectionChoices[] = { _("Millimeters"), _("Mils") };
int m_rbUnitSelectionNChoices = sizeof( m_rbUnitSelectionChoices ) / sizeof( wxString );
m_rbUnitSelection = new wxRadioBox( this, wxID_ANY, _("IDF File Units"), wxDefaultPosition, wxDefaultSize, m_rbUnitSelectionNChoices, m_rbUnitSelectionChoices, 1, wxRA_SPECIFY_COLS );
m_rbUnitSelection->SetSelection( 0 );
bSizerIDFFile->Add( m_rbUnitSelection, 0, wxALL, 5 );
m_chkThou = new wxCheckBox( this, wxID_ANY, wxT("unit: THOU"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerIDFFile->Add( m_chkThou, 0, wxALL, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerIDFFile->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );
@ -35,7 +40,7 @@ DIALOG_EXPORT_IDF3_BASE::DIALOG_EXPORT_IDF3_BASE( wxWindow* parent, wxWindowID i
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();
bSizerIDFFile->Add( m_sdbSizer1, 1, wxEXPAND, 5 );
bSizerIDFFile->Add( m_sdbSizer1, 0, wxALIGN_RIGHT, 5 );
this->SetSizer( bSizerIDFFile );

View File

@ -14,14 +14,16 @@
<property name="file">dialog_export_idf_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="internationalize">0</property>
<property name="internationalize">1</property>
<property name="name">dialog_export_idf3_base</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@ -42,7 +44,7 @@
<property name="minimum_size"></property>
<property name="name">DIALOG_EXPORT_IDF3_BASE</property>
<property name="pos"></property>
<property name="size">458,177</property>
<property name="size">424,191</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Export IDFv3</property>
@ -87,13 +89,13 @@
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="minimum_size">500,-1</property>
<property name="name">bSizerIDFFile</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
@ -123,7 +125,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">IDF Board file</property>
<property name="label">IDF board file</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -176,7 +178,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxFilePickerCtrl" expanded="1">
<property name="BottomDockable">1</property>
@ -209,10 +211,10 @@
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="message">Select a board file</property>
<property name="message">Select an IDF export filename</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">420,30</property>
<property name="minimum_size">-1,-1</property>
<property name="moveable">1</property>
<property name="name">m_filePickerIDF</property>
<property name="pane_border">1</property>
@ -223,7 +225,7 @@
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="size">450,-1</property>
<property name="style">wxFLP_OVERWRITE_PROMPT|wxFLP_SAVE|wxFLP_USE_TEXTCTRL</property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
@ -267,7 +269,7 @@
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<object class="wxRadioBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@ -281,7 +283,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="choices">&quot;Millimeters&quot; &quot;Mils&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
@ -296,7 +298,8 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">unit: THOU</property>
<property name="label">IDF File Units</property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -304,7 +307,7 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_chkThou</property>
<property name="name">m_rbUnitSelection</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
@ -312,9 +315,10 @@
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
@ -326,7 +330,88 @@
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND | wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticline1</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
@ -353,8 +438,8 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<property name="flag">wxALIGN_RIGHT</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="1">
<property name="Apply">0</property>
<property name="Cancel">1</property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// C++ code generated with wxFormBuilder (version Nov 6 2013)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -10,6 +10,7 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
#include "dialog_shim.h"
@ -20,7 +21,8 @@ class DIALOG_SHIM;
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/filepicker.h>
#include <wx/checkbox.h>
#include <wx/radiobox.h>
#include <wx/statline.h>
#include <wx/sizer.h>
#include <wx/button.h>
#include <wx/dialog.h>
@ -37,14 +39,15 @@ class DIALOG_EXPORT_IDF3_BASE : public DIALOG_SHIM
protected:
wxStaticText* m_txtBrdFile;
wxFilePickerCtrl* m_filePickerIDF;
wxCheckBox* m_chkThou;
wxRadioBox* m_rbUnitSelection;
wxStaticLine* m_staticline1;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
public:
DIALOG_EXPORT_IDF3_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Export IDFv3"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 458,177 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_EXPORT_IDF3_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Export IDFv3"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 424,191 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_EXPORT_IDF3_BASE();
};

View File

@ -34,6 +34,7 @@
#include <class_module.h>
#include <class_edge_mod.h>
#include <idf.h>
#include <3d_struct.h>
// assumed default graphical line thickness: 10000 IU == 0.1mm
#define LINE_WIDTH (100000)
@ -316,8 +317,50 @@ static void idf_export_module( BOARD* aPcb, MODULE* aModule,
}
}
// TODO
// add to the library item list
// add any valid models to the library item list
std::string refdes;
for( S3D_MASTER* modfile = aModule->Models(); modfile != 0; modfile = modfile->Next() )
{
if( !modfile->Is3DType( S3D_MASTER::FILE3D_IDF ) )
continue;
double rotz = modfile->m_MatRotation.z + aModule->GetOrientation()/10.0;
double locx = modfile->m_MatPosition.x;
double locy = modfile->m_MatPosition.y;
double locz = modfile->m_MatPosition.z;
bool top = ( aModule->GetLayer() == LAYER_N_BACK ) ? false : true;
refdes = TO_UTF8( aModule->GetReference() );
if( top )
{
locy = -locy;
RotatePoint( &locx, &locy, aModule->GetOrientation() );
locy = -locy;
}
if( !top )
{
RotatePoint( &locx, &locy, aModule->GetOrientation() );
locy = -locy;
rotz = 180.0 - rotz;
if( rotz >= 360.0 )
while( rotz >= 360.0 ) rotz -= 360.0;
if( rotz <= -360.0 )
while( rotz <= -360.0 ) rotz += 360.0;
}
locx += aModule->GetPosition().x * scale + dx;
locy += -aModule->GetPosition().y * scale + dy;
aIDFBoard.PlaceComponent(modfile->GetShape3DName(), refdes, locx, locy, locz, rotz, top);
}
return;
}
@ -332,14 +375,12 @@ bool Export_IDF3( BOARD* aPcb, const wxString& aFullFileName, double aUseThou )
SetLocaleTo_C_standard();
// NOTE:
// XXX We may enclose all this in a TRY .. CATCH block
idfBoard.Setup( aPcb->GetFileName(), aFullFileName, aUseThou,
aPcb->GetDesignSettings().GetBoardThickness() );
// set up the global offsets
EDA_RECT bbox = aPcb->ComputeBoundingBox( true );
idfBoard.SetOffset( bbox.Centre().x * idfBoard.GetScale(),
idfBoard.SetOffset( -bbox.Centre().x * idfBoard.GetScale(),
bbox.Centre().y * idfBoard.GetScale() );
// Export the board outline

View File

@ -1151,18 +1151,18 @@ static void export_vrml_module( MODEL_VRML& aModel, BOARD* aPcb, MODULE* aModule
// Export the object VRML model(s)
for( S3D_MASTER* vrmlm = aModule->Models(); vrmlm != 0; vrmlm = vrmlm->Next() )
{
wxString fname = vrmlm->m_Shape3DName;
if( fname.IsEmpty() )
if( !vrmlm->Is3DType( S3D_MASTER::FILE3D_VRML ) )
continue;
wxString fname = vrmlm->GetShape3DName();
if( !wxFileName::FileExists( fname ) )
{
wxFileName fn = fname;
fname = wxGetApp().FindLibraryPath( fn );
if( fname.IsEmpty() ) // keep "short" name if full filemane not found
fname = vrmlm->m_Shape3DName;
if( fname.IsEmpty() ) // keep "short" name if full filename not found
fname = vrmlm->GetShape3DName();
}
fname.Replace( wxT( "\\" ), wxT( "/" ) );

View File

@ -30,10 +30,17 @@
#include <list>
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <cctype>
#include <strings.h>
#include <appl_wxstruct.h>
#include <wx/file.h>
#include <wx/filename.h>
#include <macros.h>
#include <idf.h>
@ -49,6 +56,19 @@
// used in a flexible design.
#define IDF_MIN_BRD_THICKNESS (12000)
// START: a few routines to help IDF_LIB but which may be of general use in the future
// as IDF support develops
// fetch a line from the given input file and trim the ends
static bool FetchIDFLine( std::ifstream& aModel, std::string& aLine, bool& isComment );
// extract an IDF string and move the index to point to the character after the substring
static bool GetIDFString( const std::string& aLine, std::string& aIDFString,
bool& hasQuotes, int& aIndex );
// END: IDF_LIB helper routines
bool IDF_POINT::Matches( const IDF_POINT& aPoint, double aRadius )
{
double dx = x - aPoint.x;
@ -518,40 +538,32 @@ bool IDF_BOARD::Setup( wxString aBoardName,
bool IDF_BOARD::Finish( void )
{
// Steps to finalize the board and library files:
// 1. (emp) finalize the library file
// 2. (emn) close the BOARD_OUTLINE section
// 3. (emn) write out the DRILLED_HOLES section
// 1. (emn) close the BOARD_OUTLINE section
// 2. (emn) write out the DRILLED_HOLES section
// 3. (emp) finalize the library file
// 4. (emn) write out the COMPONENT_PLACEMENT section
// TODO:
// idfLib.Finish();
if( libFile != NULL )
{
fclose( libFile );
libFile = NULL;
}
if( layoutFile == NULL )
if( layoutFile == NULL || libFile == NULL )
return false;
// Finalize the board outline section
fprintf( layoutFile, ".END_BOARD_OUTLINE\n\n" );
// Write out the drill section
if( WriteDrills() )
{
fclose( layoutFile );
layoutFile = NULL;
return false;
}
bool ok = WriteDrills();
// TODO: Write out the component placement section
// IDF3::export_placement();
// populate the library (*.emp) file and write the
// PLACEMENT section
if( ok )
ok = IDFLib.WriteFiles( layoutFile, libFile );
fclose( libFile );
libFile = NULL;
fclose( layoutFile );
layoutFile = NULL;
return true;
return ok;
}
@ -753,6 +765,16 @@ bool IDF_BOARD::AddSlot( double aWidth, double aLength, double aOrientation,
}
bool IDF_BOARD::PlaceComponent( const wxString aComponentFile, const std::string aRefDes,
double aXLoc, double aYLoc, double aZLoc,
double aRotation, bool isOnTop )
{
return IDFLib.PlaceComponent( aComponentFile, aRefDes,
aXLoc, aYLoc, aZLoc,
aRotation, isOnTop );
}
bool IDF_BOARD::WriteDrills( void )
{
if( !layoutFile )
@ -936,27 +958,818 @@ void IDF3::GetOutline( std::list<IDF_SEGMENT*>& aLines,
}
bool IDF_LIB::WriteLib( FILE* aLibFile )
IDF_LIB::~IDF_LIB()
{
while( !components.empty() )
{
delete components.back();
components.pop_back();
}
}
bool IDF_LIB::writeLib( FILE* aLibFile )
{
if( !aLibFile )
return false;
// TODO: check stream integrity and return false as appropriate
// TODO: export models
// export models
std::list< IDF_COMP* >::const_iterator mbeg = components.begin();
std::list< IDF_COMP* >::const_iterator mend = components.end();
while( mbeg != mend )
{
if( !(*mbeg)->WriteLib( aLibFile ) )
return false;
++mbeg;
}
libWritten = true;
return true;
}
bool IDF_LIB::WriteBrd( FILE* aLayoutFile )
bool IDF_LIB::writeBrd( FILE* aLayoutFile )
{
if( !aLayoutFile )
if( !aLayoutFile || !libWritten )
return false;
if( components.empty() )
return true;
// TODO: check stream integrity and return false as appropriate
// TODO: write out the board placement information
// write out the board placement information
std::list< IDF_COMP* >::const_iterator mbeg = components.begin();
std::list< IDF_COMP* >::const_iterator mend = components.end();
fprintf( aLayoutFile, "\n.PLACEMENT\n" );
while( mbeg != mend )
{
if( !(*mbeg)->WritePlacement( aLayoutFile ) )
return false;
++mbeg;
}
fprintf( aLayoutFile, ".END_PLACEMENT\n" );
return true;
}
bool IDF_LIB::WriteFiles( FILE* aLayoutFile, FILE* aLibFile )
{
if( !aLayoutFile || !aLibFile )
return false;
libWritten = false;
regOutlines.clear();
if( !writeLib( aLibFile ) )
return false;
return writeBrd( aLayoutFile );
}
bool IDF_LIB::RegisterOutline( const std::string aGeomPartString )
{
std::set< std::string >::const_iterator it = regOutlines.find( aGeomPartString );
if( it != regOutlines.end() )
return true;
regOutlines.insert( aGeomPartString );
return false;
}
bool IDF_LIB::PlaceComponent( const wxString aComponentFile, const std::string aRefDes,
double aXLoc, double aYLoc, double aZLoc,
double aRotation, bool isOnTop )
{
IDF_COMP* comp = new IDF_COMP( this );
if( comp == NULL )
{
std::cerr << "IDF_LIB: *ERROR* could not allocate memory for a component\n";
return false;
}
components.push_back( comp );
if( !comp->PlaceComponent( aComponentFile, aRefDes,
aXLoc, aYLoc, aZLoc,
aRotation, isOnTop ) )
{
std::cerr << "IDF_LIB: file does not exist (or is symlink):\n";
std::cerr << " FILE: " << TO_UTF8( aComponentFile ) << "\n";
return false;
}
return true;
}
IDF_COMP::IDF_COMP( IDF_LIB* aParent )
{
parent = aParent;
}
bool IDF_COMP::PlaceComponent( const wxString aComponentFile, const std::string aRefDes,
double aXLoc, double aYLoc, double aZLoc,
double aRotation, bool isOnTop )
{
componentFile = aComponentFile;
refdes = aRefDes;
if( refdes.empty() || !refdes.compare("~") || !refdes.compare("0") )
refdes = "NOREFDES";
loc_x = aXLoc;
loc_y = aYLoc;
loc_z = aZLoc;
rotation = aRotation;
top = isOnTop;
if( !wxFileName::FileExists( aComponentFile ) )
{
wxFileName fn = aComponentFile;
wxString fname = wxGetApp().FindLibraryPath( fn );
if( fname.IsEmpty() )
return false;
else
componentFile = fname;
}
return true;
}
bool IDF_COMP::WritePlacement( FILE* aLayoutFile )
{
if( aLayoutFile == NULL )
{
std::cerr << "IDF_COMP: *ERROR* WritePlacement() invoked with aLayoutFile = NULL\n";
return false;
}
if( parent == NULL )
{
std::cerr << "IDF_COMP: *ERROR* no valid pointer \n";
return false;
}
if( componentFile.empty() )
{
std::cerr << "IDF_COMP: *BUG* empty componentFile name in WritePlacement()\n";
return false;
}
if( geometry.empty() && partno.empty() )
{
std::cerr << "IDF_COMP: *BUG* geometry and partno strings are empty in WritePlacement()\n";
return false;
}
// TODO: monitor stream integrity and respond accordingly
// PLACEMENT, RECORD 2:
fprintf( aLayoutFile, "\"%s\" \"%s\" \"%s\"\n",
geometry.c_str(), partno.c_str(), refdes.c_str() );
// PLACEMENT, RECORD 3:
if( rotation >= -MIN_ANG && rotation <= -MIN_ANG )
{
fprintf( aLayoutFile, "%.6f %.6f %.6f 0 %s ECAD\n",
loc_x, loc_y, loc_z, top ? "TOP" : "BOTTOM" );
}
else
{
fprintf( aLayoutFile, "%.6f %.6f %.6f %.3f %s ECAD\n",
loc_x, loc_y, loc_z, rotation, top ? "TOP" : "BOTTOM" );
}
return true;
}
bool IDF_COMP::WriteLib( FILE* aLibFile )
{
// 1. parse the file for the .ELECTRICAL or .MECHANICAL section
// and extract the Geometry and PartNumber strings
// 2. Register the name; check if it already exists
// 3. parse the rest of the file until .END_ELECTRICAL or
// .END_MECHANICAL; validate that each entry conforms
// to a valid outline
// 4. write lines to library file
//
// NOTE on parsing (the order matters):
// + store each line which begins with '#'
// + strip blanks from both ends of the line
// + drop each blank line
// + the first non-blank non-comment line must be
// .ELECTRICAL or .MECHANICAL (as per spec, case does not matter)
// + the first non-blank line after RECORD 1 must be RECORD 2
// + following RECORD 2, only blank lines, valid outline entries,
// and .END_{MECHANICAL,ELECTRICAL} are allowed
// + only a single outline may be specified; the order may be
// CW or CCW.
// + all valid lines are stored and written to the library file
//
// return: false if we do could not write model data; we may return
// true even if we could not read an IDF file for some reason, provided
// that the default model was written. In such a case, warnings will be
// written to stderr.
if( aLibFile == NULL )
{
std::cerr << "IDF_COMP: *ERROR* WriteLib() invoked with aLibFile = NULL\n";
return false;
}
if( parent == NULL )
{
std::cerr << "IDF_COMP: *ERROR* no valid pointer \n";
return false;
}
if( componentFile.empty() )
{
std::cerr << "IDF_COMP: *BUG* empty componentFile name in WriteLib()\n";
return false;
}
std::list< std::string > records;
std::ifstream model;
std::string fname = TO_UTF8( componentFile );
model.open( fname.c_str(), std::ios_base::in );
if( !model.is_open() )
{
std::cerr << "* IDF EXPORT: could not open file " << fname << "\n";
return substituteComponent( aLibFile );
}
std::string entryType; // will be one of ELECTRICAL or MECHANICAL
std::string endMark; // will be one of .END_ELECTRICAL or .END_MECHANICAL
std::string iline; // the input line
int state = 1;
bool isComment; // true if a line just read in is a comment line
bool isNewItem = false; // true if the outline is a previously unsaved IDF item
// some vars for parsing record 3
int loopIdx = -1; // direction of points in outline (0=CW, 1=CCW, -1=no points yet)
double firstX;
double firstY;
bool lineClosed = false; // true when outline has been closed; only one outline is permitted
while( state )
{
while( !FetchIDFLine( model, iline, isComment ) && model.good() );
if( !model.good() )
{
// this should not happen; we should at least
// have encountered the .END_ statement;
// however, we shall make a concession if the
// last line is an .END_ statement which had
// not been correctly terminated
if( !endMark.empty() && !strncasecmp( iline.c_str(), endMark.c_str(), 15 ) )
{
std::cerr << "IDF EXPORT: *WARNING* IDF file is not properly terminated\n";
std::cerr << "* FILE: " << fname << "\n";
records.push_back( endMark );
break;
}
std::cerr << "IDF EXPORT: *ERROR* faulty IDF file\n";
std::cerr << "* FILE: " << fname << "\n";
return substituteComponent( aLibFile );
}
switch( state )
{
case 1:
// accept comment lines, .ELECTRICAL, or .MECHANICAL;
// all others are simply ignored
if( isComment )
{
records.push_back( iline );
break;
}
if( !strncasecmp( iline.c_str(), ".electrical", 11 ) )
{
entryType = ".ELECTRICAL";
endMark = ".END_ELECTRICAL";
records.push_back( entryType );
state = 2;
break;
}
if( !strncasecmp( iline.c_str(), ".mechanical", 11 ) )
{
entryType = ".MECHANICAL";
endMark = ".END_MECHANICAL";
records.push_back( entryType );
state = 2;
break;
}
break;
case 2:
// accept only a RECORD 2 compliant line;
// anything else constitutes a malformed IDF file
if( isComment )
{
std::cerr << "IDF EXPORT: bad IDF file\n";
std::cerr << "* LINE: " << iline << "\n";
std::cerr << "* FILE: " << fname << "\n";
std::cerr << "* REASON: comment within "
<< entryType << " section\n";
model.close();
return substituteComponent( aLibFile );
}
if( !parseRec2( iline, isNewItem ) )
{
std::cerr << "IDF EXPORT: bad IDF file\n";
std::cerr << "* LINE: " << iline << "\n";
std::cerr << "* FILE: " << fname << "\n";
std::cerr << "* REASON: expecting RECORD 2 of "
<< entryType << " section\n";
model.close();
return substituteComponent( aLibFile );
}
if( isNewItem )
{
records.push_back( iline );
state = 3;
}
else
{
model.close();
return true;
}
break;
case 3:
// accept outline entries or end of section
if( isComment )
{
std::cerr << "IDF EXPORT: bad IDF file\n";
std::cerr << "* LINE: " << iline << "\n";
std::cerr << "* FILE: " << fname << "\n";
std::cerr << "* REASON: comment within "
<< entryType << " section\n";
model.close();
return substituteComponent( aLibFile );
}
if( !strncasecmp( iline.c_str(), endMark.c_str(), 15 ) )
{
records.push_back( endMark );
state = 0;
break;
}
if( lineClosed )
{
// there should be no further points
std::cerr << "IDF EXPORT: faulty IDF file\n";
std::cerr << "* LINE: " << iline << "\n";
std::cerr << "* FILE: " << fname << "\n";
std::cerr << "* REASON: more than 1 outline in "
<< entryType << " section\n";
model.close();
return substituteComponent( aLibFile );
}
if( !parseRec3( iline, loopIdx, firstX, firstY, lineClosed ) )
{
std::cerr << "IDF EXPORT: unexpected line in IDF file\n";
std::cerr << "* LINE: " << iline << "\n";
std::cerr << "* FILE: " << fname << "\n";
model.close();
return substituteComponent( aLibFile );
}
records.push_back( iline );
break;
default:
std::cerr << "IDF EXPORT: BUG in " << __FUNCTION__ << ": unexpected state\n";
model.close();
return substituteComponent( aLibFile );
break;
} // switch( state )
} // while( state )
model.close();
if( !lineClosed )
{
std::cerr << "IDF EXPORT: component outline not closed\n";
std::cerr << "* FILE: " << fname << "\n";
return substituteComponent( aLibFile );
}
std::list< std::string >::iterator lbeg = records.begin();
std::list< std::string >::iterator lend = records.end();
// TODO: check stream integrity
while( lbeg != lend )
{
fprintf( aLibFile, "%s\n", lbeg->c_str() );
++lbeg;
}
fprintf( aLibFile, "\n" );
return true;
}
bool IDF_COMP::substituteComponent( FILE* aLibFile )
{
// the component outline does not exist or could not be
// read; substitute a placeholder
// TODO: check the stream integrity
geometry = "NOGEOM";
partno = "NOPART";
if( parent->RegisterOutline( "NOGEOM_NOPART" ) )
return true;
fprintf( aLibFile, ".ELECTRICAL\n" );
fprintf( aLibFile, "\"NOGEOM\" \"NOPART\" MM 5\n" );
// TODO: for now we shall use a simple cylinder; a more intricate
// and readily recognized feature (a stylistic X) would be of
// much greater value.
fprintf( aLibFile, "0 0 0 0\n" );
fprintf( aLibFile, "0 2.5 0 360\n" );
fprintf( aLibFile, ".END_ELECTRICAL\n\n" );
return true;
}
bool IDF_COMP::parseRec2( const std::string aLine, bool& isNewItem )
{
// RECORD 2:
// + "Geometry Name"
// + "Part Number"
// + MM or THOU
// + height (float)
isNewItem = false;
int idx = 0;
bool quoted = false;
std::string entry;
if( !GetIDFString( aLine, entry, quoted, idx ) )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2 in model file (no Geometry Name entry)\n";
return false;
}
geometry = entry;
if( !GetIDFString( aLine, entry, quoted, idx ) )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2 in model file (no Part No. entry)\n";
return false;
}
partno = entry;
if( geometry.empty() && partno.empty() )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2 in model file\n";
std::cerr << " Geometry Name and Part Number are both empty.\n";
return false;
}
if( !GetIDFString( aLine, entry, quoted, idx ) )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2, missing FIELD 3\n";
return false;
}
if( strcasecmp( "MM", entry.c_str() ) && strcasecmp( "THOU", entry.c_str() ) )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2, invalid FIELD 3 \""
<< entry << "\"\n";
return false;
}
if( !GetIDFString( aLine, entry, quoted, idx ) )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2, missing FIELD 4\n";
return false;
}
if( quoted )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2, invalid FIELD 4 (quoted)\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
// ensure that we have a valid value
double val;
std::stringstream teststr;
teststr << entry;
if( !( teststr >> val ) )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 2, invalid FIELD 4 (must be numeric)\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
teststr.str( "" );
teststr << geometry << "_" << partno;
isNewItem = parent->RegisterOutline( teststr.str() );
return true;
}
bool IDF_COMP::parseRec3( const std::string aLine, int& aLoopIndex,
double& aX, double& aY, bool& aClosed )
{
// RECORD 3:
// + 0,1 (loop label)
// + X coord (float)
// + Y coord (float)
// + included angle (0 for line, +ang for CCW, -ang for CW, +360 for circle)
//
// notes:
// 1. first entry may not be a circle or arc
// 2. it would be nice, but not essential, to ensure that the
// winding is indeed as specified by the loop label
//
double x, y, ang;
bool ccw = false;
bool quoted = false;
int idx = 0;
std::string entry;
if( !GetIDFString( aLine, entry, quoted, idx ) )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, no data\n";
return false;
}
if( quoted )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 1 is quoted\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
if( entry.compare( "0" ) && entry.compare( "1" ) )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 1 is invalid (must be 0 or 1)\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
if( !entry.compare( "0" ) )
ccw = true;
if( aLoopIndex == 0 && !ccw )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, LOOP INDEX changed from 0 to 1\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
if( aLoopIndex == 1 && ccw )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, LOOP INDEX changed from 1 to 0\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
if( !GetIDFString( aLine, entry, quoted, idx ) )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 2 does not exist\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
if( quoted )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 2 is quoted\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
std::stringstream tstr;
tstr.str( entry );
if( !(tstr >> x ) )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, invalid X value in FIELD 2\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
if( !GetIDFString( aLine, entry, quoted, idx ) )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 3 does not exist\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
if( quoted )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 3 is quoted\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
tstr.clear();
tstr.str( entry );
if( !(tstr >> y ) )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, invalid Y value in FIELD 3\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
if( !GetIDFString( aLine, entry, quoted, idx ) )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 4 does not exist\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
if( quoted )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, FIELD 4 is quoted\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
tstr.clear();
tstr.str( entry );
if( !(tstr >> ang ) )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, invalid ANGLE value in FIELD 3\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
if( aLoopIndex == -1 )
{
// this is the first point; there are some special checks
aLoopIndex = ccw ? 0 : 1;
aX = x;
aY = y;
aClosed = false;
// ensure that the first point is not an arc specification
if( ang < -MIN_ANG || ang > MIN_ANG )
{
std::cerr << "IDF_COMP: *ERROR* invalid RECORD 3, first point has non-zero angle\n";
std::cerr << " LINE: " << aLine << "\n";
return false;
}
}
else
{
// does this close the outline?
if( ang < 0.0 ) ang = -ang;
ang -= 360.0;
if( ang > -MIN_ANG && ang < MIN_ANG )
{
// this is a circle; the loop is closed
aClosed = true;
}
else
{
x = (aX - x) * (aX - x);
y = (aY - y) * (aY - y) + x;
if( y <= 1e-6 )
{
// the points are close enough; the loop is closed
aClosed = true;
}
}
}
// NOTE:
// 1. ideally we would ensure that there are no arcs with a radius of 0; this entails
// actively calculating the last point as the previous entry could have been an instruction
// to create an arc. This check is sacrificed in the interest of speed.
// 2. a bad outline can be crafted by giving at least one valid segment and then introducing
// a circle; such a condition is not checked for here in the interest of speed.
// 3. a circle specified with an angle of -360 is invalid, but that condition is not
// tested here.
return true;
}
// fetch a line from the given input file and trim the ends
static bool FetchIDFLine( std::ifstream& aModel, std::string& aLine, bool& isComment )
{
aLine = "";
std::getline( aModel, aLine );
isComment = false;
// A comment begins with a '#' and must be the first character on the line
if( aLine[0] == '#' )
isComment = true;
while( !aLine.empty() && isspace( *aLine.begin() ) )
aLine.erase( aLine.begin() );
while( !aLine.empty() && isspace( *aLine.rbegin() ) )
aLine.erase( --aLine.end() );
if( aLine.empty() )
return false;
return true;
}
// extract an IDF string and move the index to point to the character after the substring
static bool GetIDFString( const std::string& aLine, std::string& aIDFString,
bool& hasQuotes, int& aIndex )
{
// 1. drop all leading spaces
// 2. if the first character is '"', read until the next '"',
// otherwise read until the next space or EOL.
std::ostringstream ostr;
int len = aLine.length();
int idx = aIndex;
if( idx < 0 || idx >= len )
return false;
while( isspace( aLine[idx] ) && idx < len ) ++idx;
if( idx == len )
{
aIndex = idx;
return false;
}
if( aLine[idx] == '"' )
{
hasQuotes = true;
++idx;
while( aLine[idx] != '"' && idx < len )
ostr << aLine[idx++];
if( idx == len )
{
std::cerr << "GetIDFString(): *ERROR*: unterminated quote mark in line:\n";
std::cerr << "LINE: " << aLine << "\n";
aIndex = idx;
return false;
}
++idx;
}
else
{
hasQuotes = false;
while( !isspace( aLine[idx] ) && idx < len )
ostr << aLine[idx++];
}
aIDFString = ostr.str();
aIndex = idx;
return true;
}

View File

@ -29,6 +29,8 @@
#define IDF_H
#include <wx/string.h>
#include <set>
#include <string>
#ifndef M_PI
#define M_PI 3.1415926535897932384626433832795028841
@ -46,6 +48,7 @@ class IDF_POINT;
class IDF_SEGMENT;
class IDF_DRILL_DATA;
class IDF_OUTLINE;
class IDF_LIB;
namespace IDF3 {
enum KEY_OWNER
@ -88,6 +91,20 @@ void GetOutline( std::list<IDF_SEGMENT*>& aLines,
}
/**
* @Struct IDF_POINT
* represents a vector of three doubles; this may be represent
* a point in space, or scaling, translation or rotation along
* three axes.
*/
struct IDF_VECTOR
{
double x;
double y;
double z;
};
/**
* @Class IDF_POINT
* represents a point
@ -287,6 +304,147 @@ public:
};
/**
* @Class IDF_COMP
* is responsible for parsing individual component files and rewriting relevant
* data to a library file.
*/
class IDF_COMP
{
private:
/// filename (full path) of the IDF component footprint
wxString componentFile;
/// reference designator; a valid designator or NOREFDES
std::string refdes;
/// overall translation of the part (component location + 3D offset)
double loc_x;
double loc_y;
double loc_z;
/// overall rotation of the part (3D Z rotation + component rotation)
double rotation;
/// true if the component is on the top of the board
bool top;
/// geometry of the package; for example, HORIZ, VERT, "HORIZ 0.2 inch"
std::string geometry;
/// package name or part number; for example "TO92" or "BC107"
std::string partno;
/// the owning IDF_LIB instance
IDF_LIB* parent;
/**
* Function substituteComponent
* places a substitute component footprint into the library file
* and creates an appropriate entry for the PLACEMENT section
* @param aLibFile is the library file to write to
* @return bool: true if data was successfully written
*/
bool substituteComponent( FILE* aLibFile );
// parse RECORD 2; return TRUE if all is OK, otherwise FALSE
bool parseRec2( const std::string aLine, bool& isNewItem );
// parse RECORD 3; return TRUE if all is OK, otherwise FALSE
bool parseRec3( const std::string aLine, int& aLoopIndex,
double& aX, double& aY, bool& aClosed );
public:
IDF_COMP( IDF_LIB* aParent );
/**
* Function PlaceComponent
* specifies the parameters of an IDF component outline placed on the board
* @param aComponentFile is the IDF component file to include
* @param aRefDes is the component reference designator; an empty string,
* '~' or '0' all default to "NOREFDES".
* @param aLocation is the overall translation of the part (board location + 3D offset)
* @param aRotation is the overall rotation of the part (component rotation + 3D Z rotation)
* @return bool: true if the specified component file exists
*/
bool PlaceComponent( const wxString aComponentFile, const std::string aRefDes,
double aXLoc, double aYLoc, double aZLoc,
double aRotation, bool isOnTop );
/**
* Function WriteLib
* parses the model file to extract information needed by the
* PLACEMENT section and writes data (if necessary) to the
* library file
* @param aLibFile is the library file to write to
* @return bool: true if data was successfully written
*/
bool WriteLib( FILE* aLibFile );
/**
* Function WritePlacement
* write the .PLACEMENT data of the component to the IDF board @param aLayoutFile
* @return bool: true if data was successfully written
*/
bool WritePlacement( FILE* aLayoutFile );
};
/**
* @Class IDF_LIB
* stores information on IDF models ( also has an inbuilt NOMODEL model )
* and is responsible for writing the ELECTRICAL sections of the library file
* (*.emp) and the PLACEMENT section of the board file.
*/
class IDF_LIB
{
/// a list of component outline names and a flag to indicate their save state
std::set< std::string > regOutlines;
std::list< IDF_COMP* > components;
bool libWritten;
/**
* Function writeLib
* writes all current library information to the output file
*/
bool writeLib( FILE* aLibFile );
/**
* Function writeBrd
* write placement information to the board file
*/
bool writeBrd( FILE* aLayoutFile );
public:
virtual ~IDF_LIB();
/**
* Function WriteFiles
* writes the library entries to the *.emp file (aLibFile) and the
* .PLACEMENT section to the *.emn file (aLayoutFile)
* @param aLayoutFile IDF board file
* @param aLibFile IDF library file
* @return bool: true if all data was written successfully
*/
bool WriteFiles( FILE* aLayoutFile, FILE* aLibFile );
/**
* Function RegisterOutline
* adds the given string to a list of current outline entities.
* @param aGeomPartString is a concatenation of the IDF component's
* geometry name and part name; this is used as a unique identifier
* to prevent redundant entries in the library output.
* @return bool: true if the string was already registered,
* false if it is a new registration.
*/
bool RegisterOutline( const std::string aGeomPartString );
bool PlaceComponent( const wxString aComponentFile, const std::string aRefDes,
double aXLoc, double aYLoc, double aZLoc,
double aRotation, bool isOnTop );
};
/**
* @Class IDF_BOARD
* contains objects necessary for the maintenance of the IDF board and library files.
@ -294,6 +452,7 @@ public:
class IDF_BOARD
{
private:
IDF_LIB IDFLib; ///< IDF library manager
std::list<IDF_DRILL_DATA*> drills; ///< IDF drill data
int outlineIndex; ///< next outline index to use
bool useThou; ///< true if output is THOU
@ -375,6 +534,10 @@ public:
* represent the Reference Designator association with a slot.
*/
bool AddSlot( double aWidth, double aLength, double aOrientation, double aX, double aY );
bool PlaceComponent( const wxString aComponentFile, const std::string aRefDes,
double aXLoc, double aYLoc, double aZLoc,
double aRotation, bool isOnTop );
};
@ -422,33 +585,4 @@ public:
bool Write( FILE* aLayoutFile );
};
/**
* @Class IDF_LIB
* stores information on IDF models ( also has an inbuilt NOMODEL model )
* and is responsible for writing the ELECTRICAL sections of the library file
* (*.emp) and the PLACEMENT section of the board file.
*/
class IDF_LIB
{
// TODO: IMPLEMENT
public:
/**
* Function WriteLib
* writes all current library information to the output file
*/
bool WriteLib( FILE* aLibFile );
// write placement information to the board file
bool WriteBrd( FILE* aLayoutFile );
// bool Finish( void )
// {
// TODO: Write out the library (*.emp) file
// idf_lib.Write( lib_file );
// TODO: fclose( lib_file );
// }
};
#endif // IDF_H

View File

@ -1050,10 +1050,10 @@ void PCB_IO::format( MODULE* aModule, int aNestLevel ) const
// Save 3D info.
for( S3D_MASTER* t3D = aModule->Models(); t3D; t3D = t3D->Next() )
{
if( !t3D->m_Shape3DName.IsEmpty() )
if( !t3D->GetShape3DName().IsEmpty() )
{
m_out->Print( aNestLevel+1, "(model %s\n",
m_out->Quotew( t3D->m_Shape3DName ).c_str() );
m_out->Quotew( t3D->GetShape3DName() ).c_str() );
m_out->Print( aNestLevel+2, "(at (xyz %s %s %s))\n",
Double2Str( t3D->m_MatPosition.x ).c_str(),

View File

@ -1643,7 +1643,7 @@ void LEGACY_PLUGIN::load3D( MODULE* aModule )
{
S3D_MASTER* t3D = aModule->Models();
if( !t3D->m_Shape3DName.IsEmpty() )
if( !t3D->GetShape3DName().IsEmpty() )
{
S3D_MASTER* n3D = new S3D_MASTER( aModule );
@ -1659,7 +1659,7 @@ void LEGACY_PLUGIN::load3D( MODULE* aModule )
{
char buf[512];
ReadDelimitedText( buf, line + SZ( "Na" ), sizeof(buf) );
t3D->m_Shape3DName = FROM_UTF8( buf );
t3D->SetShape3DName( FROM_UTF8( buf ) );
}
else if( TESTLINE( "Sc" ) ) // Scale
@ -3513,11 +3513,11 @@ void LEGACY_PLUGIN::SaveModule3D( const MODULE* me ) const
{
for( S3D_MASTER* t3D = me->Models(); t3D; t3D = t3D->Next() )
{
if( !t3D->m_Shape3DName.IsEmpty() )
if( !t3D->GetShape3DName().IsEmpty() )
{
fprintf( m_fp, "$SHAPE3D\n" );
fprintf( m_fp, "Na %s\n", EscapedUTF8( t3D->m_Shape3DName ).c_str() );
fprintf( m_fp, "Na %s\n", EscapedUTF8( t3D->GetShape3DName() ).c_str() );
fprintf(m_fp,
#if defined(DEBUG)

View File

@ -205,7 +205,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// IDF3
AddMenuItem( submenuexport, ID_GEN_EXPORT_FILE_IDF3,
_( "I&DFv3 Board Shape Export" ), _( "Basic export of board shape only IDFv3 format" ),
_( "I&DFv3 Export" ), _( "IDFv3 board and component export" ),
KiBitmap( export_xpm ) );
AddMenuItem( filesMenu, submenuexport,

View File

@ -263,7 +263,7 @@ S3D_MASTER* PCB_PARSER::parse3DModel() throw( PARSE_ERROR )
std::auto_ptr< S3D_MASTER > n3D( new S3D_MASTER( NULL ) );
NeedSYMBOLorNUMBER();
n3D->m_Shape3DName = FromUTF8();
n3D->SetShape3DName( FromUTF8() );
for( token = NextTok(); token != T_RIGHT; token = NextTok() )
{