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
ea38af91
Commit
ea38af91
authored
Feb 02, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc update and some minor enhancements before Release Candidate
parent
f83bc3e3
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1589 additions
and
2100 deletions
+1589
-2100
3d_draw.cpp
3d-viewer/3d_draw.cpp
+59
-12
CHANGELOG.txt
CHANGELOG.txt
+8
-0
base_screen.cpp
common/base_screen.cpp
+19
-1
zoom.cpp
common/zoom.cpp
+5
-8
component_class.h
eeschema/component_class.h
+1
-1
program.h
eeschema/program.h
+1
-1
build_version.h
include/build_version.h
+2
-2
class_drawpanel.h
include/class_drawpanel.h
+165
-0
class_sch_screen.h
include/class_sch_screen.h
+0
-0
wxstruct.h
include/wxstruct.h
+4
-3
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+1325
-2069
pcbcfg.cpp
pcbnew/pcbcfg.cpp
+0
-3
No files found.
3d-viewer/3d_draw.cpp
View file @
ea38af91
...
...
@@ -108,7 +108,7 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
g_Parm_3D_Visu
.
m_BoardPos
.
y
=
-
g_Parm_3D_Visu
.
m_BoardPos
.
y
;
g_Parm_3D_Visu
.
m_Layers
=
pcb
->
m_BoardSettings
->
m_CopperLayerCount
;
g_Parm_3D_Visu
.
m_BoardScale
=
2.0
/
MAX
(
g_Parm_3D_Visu
.
m_BoardSize
.
x
,
g_Parm_3D_Visu
.
m_BoardSize
.
y
);
g_Parm_3D_Visu
.
m_BoardSize
.
y
);
double
epoxy_width
=
1.6
;
// epoxy width in mm
g_Parm_3D_Visu
.
m_Epoxy_Width
=
epoxy_width
/
2.54
*
1000
*
g_Parm_3D_Visu
.
m_BoardScale
;
...
...
@@ -190,8 +190,8 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
/* move the board in order to draw it with its centre at 0,0 3D coordinates */
glTranslatef
(
-
g_Parm_3D_Visu
.
m_BoardPos
.
x
*
g_Parm_3D_Visu
.
m_BoardScale
,
-
g_Parm_3D_Visu
.
m_BoardPos
.
y
*
g_Parm_3D_Visu
.
m_BoardScale
,
0.0
F
);
-
g_Parm_3D_Visu
.
m_BoardPos
.
y
*
g_Parm_3D_Visu
.
m_BoardScale
,
0.0
F
);
glNormal3f
(
0.0
,
0.0
,
1.0
);
// Normal is Z axis
/* draw tracks and vias : */
...
...
@@ -205,11 +205,58 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
if
(
g_Parm_3D_Visu
.
m_Draw3DZone
)
{
// Draw segments used to fill copper areas
for
(
segzone
=
pcb
->
m_Zone
;
segzone
!=
NULL
;
segzone
=
segzone
->
Next
()
)
{
if
(
segzone
->
Type
()
==
TYPE_ZONE
)
Draw3D_Track
(
segzone
);
}
// Draw copper areas outlines
for
(
ii
=
0
;
ii
<
pcb
->
GetAreaCount
();
ii
++
)
{
ZONE_CONTAINER
*
zone
=
pcb
->
GetArea
(
ii
);
if
(
zone
->
m_FilledPolysList
.
size
()
==
0
)
continue
;
if
(
zone
->
m_ZoneMinThickness
<=
1
)
continue
;
int
imax
=
zone
->
m_FilledPolysList
.
size
()
-
1
;
CPolyPt
*
firstcorner
=
&
zone
->
m_FilledPolysList
[
0
];
CPolyPt
*
begincorner
=
firstcorner
;
SEGZONE
dummysegment
(
pcb
);
dummysegment
.
SetLayer
(
zone
->
GetLayer
()
);
dummysegment
.
m_Width
=
zone
->
m_ZoneMinThickness
;
for
(
int
ic
=
1
;
ic
<=
imax
;
ic
++
)
{
CPolyPt
*
endcorner
=
&
zone
->
m_FilledPolysList
[
ic
];
if
(
begincorner
->
utility
==
0
)
// Draw only basic outlines, not extra segments
{
dummysegment
.
m_Start
.
x
=
begincorner
->
x
;
dummysegment
.
m_Start
.
y
=
begincorner
->
y
;
dummysegment
.
m_End
.
x
=
endcorner
->
x
;
dummysegment
.
m_End
.
y
=
endcorner
->
y
;
Draw3D_Track
(
&
dummysegment
);
}
if
(
(
endcorner
->
end_contour
)
||
(
ic
==
imax
)
)
// the last corner of a filled area is found: draw it
{
if
(
endcorner
->
utility
==
0
)
// Draw only basic outlines, not extra segments
{
dummysegment
.
m_Start
.
x
=
endcorner
->
x
;
dummysegment
.
m_Start
.
y
=
endcorner
->
y
;
dummysegment
.
m_End
.
x
=
firstcorner
->
x
;
dummysegment
.
m_End
.
y
=
firstcorner
->
y
;
Draw3D_Track
(
&
dummysegment
);
}
ic
++
;
if
(
ic
<
imax
-
1
)
begincorner
=
firstcorner
=
&
zone
->
m_FilledPolysList
[
ic
];
}
else
begincorner
=
endcorner
;
}
}
}
/* draw graphic items */
...
...
@@ -434,12 +481,12 @@ void Pcb3D_GLCanvas::Draw3D_DrawText( TEXTE_PCB* text )
s_Text3DWidth
=
text
->
m_Width
*
g_Parm_3D_Visu
.
m_BoardScale
;
glNormal3f
(
0.0
,
0.0
,
Get3DLayerSide
(
layer
)
);
DrawGraphicText
(
NULL
,
NULL
,
text
->
m_Pos
,
(
EDA_Colors
)
color
,
text
->
m_Text
,
text
->
m_Orient
,
text
->
m_Size
,
text
->
m_HJustify
,
text
->
m_VJustify
,
text
->
m_Width
,
text
->
m_Italic
,
Draw3dTextSegm
);
text
->
m_Pos
,
(
EDA_Colors
)
color
,
text
->
m_Text
,
text
->
m_Orient
,
text
->
m_Size
,
text
->
m_HJustify
,
text
->
m_VJustify
,
text
->
m_Width
,
text
->
m_Italic
,
Draw3dTextSegm
);
}
...
...
@@ -478,8 +525,8 @@ void MODULE::Draw3D( Pcb3D_GLCanvas* glcanvas )
glPushMatrix
();
glTranslatef
(
m_Pos
.
x
*
g_Parm_3D_Visu
.
m_BoardScale
,
-
m_Pos
.
y
*
g_Parm_3D_Visu
.
m_BoardScale
,
g_Parm_3D_Visu
.
m_LayerZcoord
[
m_Layer
]
);
-
m_Pos
.
y
*
g_Parm_3D_Visu
.
m_BoardScale
,
g_Parm_3D_Visu
.
m_LayerZcoord
[
m_Layer
]
);
if
(
m_Orient
)
{
...
...
@@ -755,7 +802,7 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
f_hole_coord
[
ii
][
0
]
=
-
hole
*
0.707
;
f_hole_coord
[
ii
][
1
]
=
hole
*
0.707
;
RotatePoint
(
&
f_hole_coord
[
ii
][
0
],
&
f_hole_coord
[
ii
][
1
],
angle
-
(
ii
*
450
)
);
angle
-
(
ii
*
450
)
);
f_hole_coord
[
ii
][
0
]
+=
drillx
;
f_hole_coord
[
ii
][
1
]
+=
drilly
;
}
...
...
CHANGELOG.txt
View file @
ea38af91
...
...
@@ -5,6 +5,14 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2009-feb-01 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
++All:
change filename drawpanel_wxstruct.h to class_drawpanel.h
and move class BASE_SCREEN description from drawpanel_wxstruct.h to a new file: class_base_screen.h
minor enhancement for window zoom command.
refinements in 3D zones drawing.
2009-jan-31 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
++All:
...
...
common/base_screen.cpp
View file @
ea38af91
...
...
@@ -35,7 +35,6 @@ BASE_SCREEN::BASE_SCREEN( KICAD_T aType ) : EDA_BaseStruct( aType )
m_Zoom
=
32
*
m_ZoomScalar
;
m_Grid
=
wxSize
(
50
,
50
);
/* Default grid size */
m_UserGridIsON
=
FALSE
;
m_Diviseur_Grille
=
1
;
m_Center
=
true
;
m_CurrentSheetDesc
=
&
g_Sheet_A4
;
...
...
@@ -118,6 +117,25 @@ wxPoint BASE_SCREEN::CursorRealPosition( const wxPoint& ScreenPos )
return
curpos
;
}
/** Function SetScalingFactor
* calculates the .m_Zoom member to have a given scaling facort
* @param the the current scale used to draw items on screen
* draw coordinates are user coordinates * GetScalingFactor( )
*/
void
BASE_SCREEN
::
SetScalingFactor
(
double
aScale
)
{
int
zoom
=
static_cast
<
int
>
(
ceil
(
aScale
*
m_ZoomScalar
)
);
// Limit zoom to max and min allowed values:
if
(
zoom
<
m_ZoomList
[
0
])
zoom
=
m_ZoomList
[
0
];
int
idxmax
=
m_ZoomList
.
GetCount
()
-
1
;
if
(
zoom
>
m_ZoomList
[
idxmax
])
zoom
=
m_ZoomList
[
idxmax
];
SetZoom
(
zoom
);
}
/**
* Calculate coordinate value for zooming.
*
...
...
common/zoom.cpp
View file @
ea38af91
...
...
@@ -81,21 +81,18 @@ void WinEDA_DrawFrame::Window_Zoom( EDA_Rect& Rect )
* @param Rect = selected area to show after zooming
*/
{
int
ii
,
jj
;
int
bestzoom
;
double
scalex
,
bestscale
;
wxSize
size
;
/* Compute the best zoom */
Rect
.
Normalize
();
size
=
DrawPanel
->
GetClientSize
();
// Use ceil to at least show the full rect
ii
=
static_cast
<
int
>
(
ceil
(
1.0
*
Rect
.
GetSize
().
x
/
size
.
x
)
);
jj
=
static_cast
<
int
>
(
ceil
(
1.0
*
Rect
.
GetSize
().
y
/
size
.
y
)
);
bestzoom
=
MAX
(
ii
,
jj
);
if
(
bestzoom
<=
0
)
bestzoom
=
1
;
scalex
=
(
double
)
Rect
.
GetSize
().
x
/
size
.
x
;
bestscale
=
(
double
)
Rect
.
GetSize
().
y
/
size
.
y
;
bestscale
=
MAX
(
bestscale
,
scalex
);
GetBaseScreen
()
->
Set
Zoom
(
bestzoom
*
GetBaseScreen
()
->
m_ZoomScalar
);
GetBaseScreen
()
->
Set
ScalingFactor
(
bestscale
);
GetBaseScreen
()
->
m_Curseur
=
Rect
.
Centre
();
Recadre_Trace
(
TRUE
);
}
...
...
eeschema/component_class.h
View file @
ea38af91
...
...
@@ -10,7 +10,7 @@
#endif
#include "base_struct.h"
#include "class_screen.h"
#include "class_sc
h_sc
reen.h"
#include <wx/arrstr.h>
#include <wx/dynarray.h>
...
...
eeschema/program.h
View file @
ea38af91
...
...
@@ -15,7 +15,7 @@
#include "sch_item_struct.h"
#include "component_class.h"
#include "class_screen.h"
#include "class_sc
h_sc
reen.h"
#include "class_drawsheet.h"
#include "class_drawsheetpath.h"
#include "class_text-label.h"
...
...
include/build_version.h
View file @
ea38af91
...
...
@@ -9,7 +9,7 @@ COMMON_GLOBL wxString g_BuildVersion
# include "config.h"
(
wxT
(
KICAD_SVN_VERSION
))
# else
(
wxT
(
"(20090
122
-unstable)"
))
/* main program version */
(
wxT
(
"(20090
201
-unstable)"
))
/* main program version */
# endif
#endif
;
...
...
@@ -20,7 +20,7 @@ COMMON_GLOBL wxString g_BuildAboutVersion
# include "config.h"
(
wxT
(
KICAD_ABOUT_VERSION
))
# else
(
wxT
(
"(20090
122
-unstable)"
))
/* svn date & rev (normally overridden) */
(
wxT
(
"(20090
201
-unstable)"
))
/* svn date & rev (normally overridden) */
# endif
#endif
;
...
...
include/
drawpanel_wxstruct
.h
→
include/
class_drawpanel
.h
View file @
ea38af91
This diff is collapsed.
Click to expand it.
include/class_screen.h
→
include/class_sc
h_sc
reen.h
View file @
ea38af91
File moved
include/wxstruct.h
View file @
ea38af91
...
...
@@ -22,11 +22,12 @@
#include "base_struct.h"
#include "appl_wxstruct.h"
#include "
drawpanel_wxstruct
.h"
#include "
class_drawpanel
.h"
#include "class_base_screen.h"
//C++ guarantees that operator delete checks its argument for null-ness
#ifndef SAFE_DELETE
#define SAFE_DELETE(p) delete (p); (p) = NULL;
//C++ guarantees that operator delete checks its argument for null-ness
#define SAFE_DELETE(p) delete (p); (p) = NULL;
#endif
#define INTERNAL_UNIT_TYPE 0 // Internal unit = inch
...
...
internat/fr/kicad.mo
View file @
ea38af91
No preview for this file type
internat/fr/kicad.po
View file @
ea38af91
This diff is collapsed.
Click to expand it.
pcbnew/pcbcfg.cpp
View file @
ea38af91
...
...
@@ -178,7 +178,6 @@ bool Read_Config( const wxString& project_name )
if
(
ScreenPcb
)
{
ScreenPcb
->
m_Diviseur_Grille
=
Pcbdiv_grille
;
ScreenPcb
->
AddGrid
(
g_UserGrid
,
g_UserGrid_Unit
,
ID_POPUP_GRID_USER
);
}
...
...
@@ -220,8 +219,6 @@ void WinEDA_PcbFrame::Update_config( wxWindow* displayframe )
if
(
FullFileName
.
IsEmpty
()
)
return
;
Pcbdiv_grille
=
GetScreen
()
->
m_Diviseur_Grille
;
/* ecriture de la configuration */
wxGetApp
().
WriteProjectConfig
(
FullFileName
,
wxT
(
"/pcbnew"
),
ParamCfgList
);
...
...
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