Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
c333da19
Commit
c333da19
authored
Jan 18, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some "todo" cleanup
parent
0d3fc601
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
5950 additions
and
28468 deletions
+5950
-28468
base_screen.cpp
common/base_screen.cpp
+2
-1
drawpanel.cpp
common/drawpanel.cpp
+0
-5
pic_programmer.brd
demos/pic_programmer/pic_programmer.brd
+5925
-28413
plot.cpp
eeschema/plot.cpp
+2
-6
schframe.cpp
eeschema/schframe.cpp
+2
-16
wxEeschemaStruct.h
include/wxEeschemaStruct.h
+0
-1
class_edge_mod.cpp
pcbnew/class_edge_mod.cpp
+3
-5
gen_modules_placefile.cpp
pcbnew/gen_modules_placefile.cpp
+16
-21
No files found.
common/base_screen.cpp
View file @
c333da19
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include "fctsys.h"
#include "fctsys.h"
#include "common.h"
#include "common.h"
#include "sch_item_struct.h"
/* Implement wxSize array for grid list implementation. */
/* Implement wxSize array for grid list implementation. */
#include <wx/arrimpl.cpp>
#include <wx/arrimpl.cpp>
...
@@ -498,7 +499,7 @@ EDA_BaseStruct* BASE_SCREEN::GetItemFromRedoList()
...
@@ -498,7 +499,7 @@ EDA_BaseStruct* BASE_SCREEN::GetItemFromRedoList()
*/
*/
void
BASE_SCREEN
::
Show
(
int
nestLevel
,
std
::
ostream
&
os
)
void
BASE_SCREEN
::
Show
(
int
nestLevel
,
std
::
ostream
&
os
)
{
{
EDA_BaseStruct
*
item
=
(
EDA_BaseStruct
*
)
EEDrawList
;
// @todo : use SCH_ITEM as type for item
SCH_ITEM
*
item
=
EEDrawList
;
// for now, make it look like XML, expand on this later.
// for now, make it look like XML, expand on this later.
NestedSpace
(
nestLevel
,
os
)
<<
'<'
<<
GetClass
().
Lower
().
mb_str
()
<<
NestedSpace
(
nestLevel
,
os
)
<<
'<'
<<
GetClass
().
Lower
().
mb_str
()
<<
...
...
common/drawpanel.cpp
View file @
c333da19
...
@@ -1188,11 +1188,6 @@ void WinEDA_DrawPanel::OnMouseEvent( wxMouseEvent& event )
...
@@ -1188,11 +1188,6 @@ void WinEDA_DrawPanel::OnMouseEvent( wxMouseEvent& event )
#endif
#endif
LastPanel
=
this
;
LastPanel
=
this
;
/* @todo: move this to where it is really needed, obviously not here in
* response to every mouse move event:
* m_Parent->SetToolbars();
*/
}
}
...
...
demos/pic_programmer/pic_programmer.brd
View file @
c333da19
This source diff could not be displayed because it is too large. You can
view the blob
instead.
eeschema/plot.cpp
View file @
c333da19
...
@@ -285,9 +285,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
...
@@ -285,9 +285,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
{
{
LibDrawPin
*
Pin
=
(
LibDrawPin
*
)
DEntry
;
LibDrawPin
*
Pin
=
(
LibDrawPin
*
)
DEntry
;
if
(
Pin
->
m_Attributs
&
PINNOTDRAW
)
if
(
Pin
->
m_Attributs
&
PINNOTDRAW
)
{
break
;
break
;
}
/* Calcul de l'orientation reelle de la Pin */
/* Calcul de l'orientation reelle de la Pin */
orient
=
Pin
->
ReturnPinDrawOrient
(
TransMat
);
orient
=
Pin
->
ReturnPinDrawOrient
(
TransMat
);
...
@@ -295,13 +293,12 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
...
@@ -295,13 +293,12 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
pos
=
TransformCoordinate
(
TransMat
,
Pin
->
m_Pos
)
+
DrawLibItem
->
m_Pos
;
pos
=
TransformCoordinate
(
TransMat
,
Pin
->
m_Pos
)
+
DrawLibItem
->
m_Pos
;
/* Dessin de la pin et du symbole special associe */
/* Dessin de la pin et du symbole special associe */
SetCurrentLineWidth
(
-
1
);
PlotPinSymbol
(
pos
,
Pin
->
m_PinLen
,
orient
,
Pin
->
m_PinShape
);
PlotPinSymbol
(
pos
,
Pin
->
m_PinLen
,
orient
,
Pin
->
m_PinShape
);
int
thickness
=
0
;
// @todo: calcultae the pen tickness
int
thickness
=
MAX
(
g_PlotLine_Width
,
g_DrawMinimunLineWidth
);;
Pin
->
PlotPinTexts
(
pos
,
orient
,
Pin
->
PlotPinTexts
(
pos
,
orient
,
Entry
->
m_TextInside
,
Entry
->
m_TextInside
,
Entry
->
m_DrawPinNum
,
Entry
->
m_DrawPinName
,
Entry
->
m_DrawPinNum
,
Entry
->
m_DrawPinName
,
thickness
,
false
);
thickness
,
false
);
}
}
break
;
break
;
...
@@ -471,7 +468,6 @@ static void PlotTextField( SCH_COMPONENT* DrawLibItem,
...
@@ -471,7 +468,6 @@ static void PlotTextField( SCH_COMPONENT* DrawLibItem,
thickness
=
MAX
(
g_PlotLine_Width
,
g_DrawMinimunLineWidth
);
thickness
=
MAX
(
g_PlotLine_Width
,
g_DrawMinimunLineWidth
);
SetCurrentLineWidth
(
thickness
);
SetCurrentLineWidth
(
thickness
);
//@todo not sure what to do here in terms of plotting components that may have multiple REFERENCE entries.
if
(
!
IsMulti
||
(
FieldNumber
!=
REFERENCE
)
)
if
(
!
IsMulti
||
(
FieldNumber
!=
REFERENCE
)
)
{
{
PlotGraphicText
(
g_PlotFormat
,
textpos
,
color
,
field
->
m_Text
,
PlotGraphicText
(
g_PlotFormat
,
textpos
,
color
,
field
->
m_Text
,
...
...
eeschema/schframe.cpp
View file @
c333da19
...
@@ -245,28 +245,14 @@ void WinEDA_SchematicFrame::SetSheetNumberAndCount()
...
@@ -245,28 +245,14 @@ void WinEDA_SchematicFrame::SetSheetNumberAndCount()
}
}
/***************************************************/
SCH_SCREEN
*
WinEDA_SchematicFrame
::
GetScreen
()
const
SCH_SCREEN
*
WinEDA_SchematicFrame
::
GetScreen
()
const
/***************************************************/
{
{
return
m_CurrentSheet
->
LastScreen
();
return
m_CurrentSheet
->
LastScreen
();
}
}
void
WinEDA_SchematicFrame
::
SetScreen
(
SCH_SCREEN
*
screen
)
{
//find it in the hierarchy, and set it.
//there is ambiguity in this function (there may be several
//instances of a given sheet, but irregardless it is useful
//for printing etc.
DrawSheetPath
sheetlist
;
if
(
g_RootSheet
->
LocatePathOfScreen
(
screen
,
&
sheetlist
)
)
{
*
m_CurrentSheet
=
sheetlist
;
m_CurrentSheet
->
UpdateAllScreenReferences
();
}
}
wxString
WinEDA_SchematicFrame
::
GetScreenDesc
()
wxString
WinEDA_SchematicFrame
::
GetScreenDesc
()
{
{
wxString
s
=
m_CurrentSheet
->
PathHumanReadable
();
wxString
s
=
m_CurrentSheet
->
PathHumanReadable
();
...
...
include/wxEeschemaStruct.h
View file @
c333da19
...
@@ -102,7 +102,6 @@ public:
...
@@ -102,7 +102,6 @@ public:
BASE_SCREEN
*
GetBaseScreen
()
const
;
BASE_SCREEN
*
GetBaseScreen
()
const
;
virtual
void
SetScreen
(
SCH_SCREEN
*
screen
);
virtual
wxString
GetScreenDesc
();
virtual
wxString
GetScreenDesc
();
void
InstallConfigFrame
(
const
wxPoint
&
pos
);
void
InstallConfigFrame
(
const
wxPoint
&
pos
);
...
...
pcbnew/class_edge_mod.cpp
View file @
c333da19
...
@@ -60,7 +60,7 @@ void EDGE_MODULE:: Copy( EDGE_MODULE* source ) // copy structure
...
@@ -60,7 +60,7 @@ void EDGE_MODULE:: Copy( EDGE_MODULE* source ) // copy structure
m_Layer
=
source
->
m_Layer
;
m_Layer
=
source
->
m_Layer
;
m_Width
=
source
->
m_Width
;
m_Width
=
source
->
m_Width
;
m_PolyPoints
=
source
->
m_PolyPoints
;
m_PolyPoints
=
source
->
m_PolyPoints
;
// std::vector copy
}
}
/***********************************/
/***********************************/
...
@@ -76,10 +76,8 @@ void EDGE_MODULE::SetDrawCoord()
...
@@ -76,10 +76,8 @@ void EDGE_MODULE::SetDrawCoord()
{
{
RotatePoint
(
&
m_Start
.
x
,
&
m_Start
.
y
,
Module
->
m_Orient
);
RotatePoint
(
&
m_Start
.
x
,
&
m_Start
.
y
,
Module
->
m_Orient
);
RotatePoint
(
&
m_End
.
x
,
&
m_End
.
y
,
Module
->
m_Orient
);
RotatePoint
(
&
m_End
.
x
,
&
m_End
.
y
,
Module
->
m_Orient
);
m_Start
.
x
+=
Module
->
m_Pos
.
x
;
m_Start
+=
Module
->
m_Pos
;
m_Start
.
y
+=
Module
->
m_Pos
.
y
;
m_End
+=
Module
->
m_Pos
;
m_End
.
x
+=
Module
->
m_Pos
.
x
;
m_End
.
y
+=
Module
->
m_Pos
.
y
;
}
}
}
}
...
...
pcbnew/gen_modules_placefile.cpp
View file @
c333da19
...
@@ -467,7 +467,7 @@ void WinEDA_PcbFrame::GenModuleReport( wxCommandEvent& event )
...
@@ -467,7 +467,7 @@ void WinEDA_PcbFrame::GenModuleReport( wxCommandEvent& event )
void
WriteDrawSegmentPcb
(
DRAWSEGMENT
*
PtDrawSegment
,
FILE
*
rptfile
)
void
WriteDrawSegmentPcb
(
DRAWSEGMENT
*
PtDrawSegment
,
FILE
*
rptfile
)
/*******************************************************************/
/*******************************************************************/
/* Sortie
d
sur rptfile d'un segment type drawing PCB:
/* Sortie sur rptfile d'un segment type drawing PCB:
* Les contours sont de differents type:
* Les contours sont de differents type:
* segment
* segment
* cercle
* cercle
...
@@ -495,12 +495,11 @@ void WriteDrawSegmentPcb( DRAWSEGMENT* PtDrawSegment, FILE* rptfile )
...
@@ -495,12 +495,11 @@ void WriteDrawSegmentPcb( DRAWSEGMENT* PtDrawSegment, FILE* rptfile )
{
{
case
S_CIRCLE
:
case
S_CIRCLE
:
rayon
=
hypot
(
dx
-
ux0
,
dy
-
uy0
);
rayon
=
hypot
(
dx
-
ux0
,
dy
-
uy0
);
sprintf
(
line
,
"$CIRCLE
\n
"
);
fputs
(
line
,
rptfile
);
fprintf
(
rptfile
,
"$CIRCLE
\n
"
);
sprintf
(
line
,
"centre %.6lf %.6lf
\n
"
,
ux0
,
uy0
);
fprintf
(
rptfile
,
"centre %.6lf %.6lf
\n
"
,
ux0
,
uy0
);
sprintf
(
line
,
"radius %.6lf
\n
"
,
rayon
);
fprintf
(
rptfile
,
"radius %.6lf
\n
"
,
rayon
);
sprintf
(
line
,
"width %.6lf
\n
"
,
width
);
fprintf
(
rptfile
,
"width %.6lf
\n
"
,
width
);
sprintf
(
line
,
"$EndCIRCLE
\n
"
);
fprintf
(
rptfile
,
"$EndCIRCLE
\n
"
);
fputs
(
line
,
rptfile
);
break
;
break
;
case
S_ARC
:
case
S_ARC
:
...
@@ -513,14 +512,12 @@ void WriteDrawSegmentPcb( DRAWSEGMENT* PtDrawSegment, FILE* rptfile )
...
@@ -513,14 +512,12 @@ void WriteDrawSegmentPcb( DRAWSEGMENT* PtDrawSegment, FILE* rptfile )
PtDrawSegment
->
m_Start
.
y
,
PtDrawSegment
->
m_Start
.
y
,
PtDrawSegment
->
m_Angle
);
PtDrawSegment
->
m_Angle
);
// @todo this is a bug, cannot sprintf into line more than once, should use fprintf instead
fprintf
(
rptfile
,
"$ARC
\n
"
);
sprintf
(
line
,
"$ARC
\n
"
);
fputs
(
line
,
rptfile
);
fprintf
(
rptfile
,
"centre %.6lf %.6lf
\n
"
,
ux0
,
uy0
);
sprintf
(
line
,
"centre %.6lf %.6lf
\n
"
,
ux0
,
uy0
);
fprintf
(
rptfile
,
"start %.6lf %.6lf
\n
"
,
endx
*
conv_unit
,
endy
*
conv_unit
);
sprintf
(
line
,
"start %.6lf %.6lf
\n
"
,
endx
*
conv_unit
,
endy
*
conv_unit
);
fprintf
(
rptfile
,
"end %.6lf %.6lf
\n
"
,
dx
,
dy
);
sprintf
(
line
,
"end %.6lf %.6lf
\n
"
,
dx
,
dy
);
fprintf
(
rptfile
,
"width %.6lf
\n
"
,
width
);
sprintf
(
line
,
"width %.6lf
\n
"
,
width
);
fprintf
(
rptfile
,
"$EndARC
\n
"
);
sprintf
(
line
,
"$EndARC
\n
"
);
fputs
(
line
,
rptfile
);
}
}
break
;
break
;
...
@@ -528,12 +525,10 @@ void WriteDrawSegmentPcb( DRAWSEGMENT* PtDrawSegment, FILE* rptfile )
...
@@ -528,12 +525,10 @@ void WriteDrawSegmentPcb( DRAWSEGMENT* PtDrawSegment, FILE* rptfile )
sprintf
(
line
,
"$LINE
\n
"
);
sprintf
(
line
,
"$LINE
\n
"
);
fputs
(
line
,
rptfile
);
fputs
(
line
,
rptfile
);
// @todo this is a bug, cannot sprintf into line more than once, should use fprintf instead
fprintf
(
rptfile
,
"start %.6lf %.6lf
\n
"
,
ux0
,
uy0
);
sprintf
(
line
,
"start %.6lf %.6lf
\n
"
,
ux0
,
uy0
);
fprintf
(
rptfile
,
"end %.6lf %.6lf
\n
"
,
dx
,
dy
);
sprintf
(
line
,
"end %.6lf %.6lf
\n
"
,
dx
,
dy
);
fprintf
(
rptfile
,
"width %.6lf
\n
"
,
width
);
sprintf
(
line
,
"width %.6lf
\n
"
,
width
);
fprintf
(
rptfile
,
"$EndLINE
\n
"
);
sprintf
(
line
,
"$EndLINE
\n
"
);
fputs
(
line
,
rptfile
);
break
;
break
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment