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
f723c540
Commit
f723c540
authored
Oct 29, 2008
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleaning. Some comments translated into English.
Added: Zones unfill in polygon mode
parent
afd39b3d
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
223 additions
and
177 deletions
+223
-177
trigo.cpp
common/trigo.cpp
+14
-14
cleanup.cpp
eeschema/cleanup.cpp
+4
-3
locate.cpp
eeschema/locate.cpp
+2
-2
symbdraw.cpp
eeschema/symbdraw.cpp
+5
-5
locate.cpp
gerbview/locate.cpp
+1
-1
id.h
include/id.h
+2
-2
macros.h
include/macros.h
+1
-1
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+60
-56
class_module.cpp
pcbnew/class_module.cpp
+2
-1
class_module.h
pcbnew/class_module.h
+37
-32
class_pad.h
pcbnew/class_pad.h
+2
-2
class_zone.cpp
pcbnew/class_zone.cpp
+14
-0
class_zone.h
pcbnew/class_zone.h
+4
-7
connect.cpp
pcbnew/connect.cpp
+17
-19
cotation.cpp
pcbnew/cotation.cpp
+3
-3
edit.cpp
pcbnew/edit.cpp
+13
-3
graphpcb.cpp
pcbnew/graphpcb.cpp
+6
-6
onrightclick.cpp
pcbnew/onrightclick.cpp
+8
-2
plothpgl.cpp
pcbnew/plothpgl.cpp
+5
-5
ratsnest.cpp
pcbnew/ratsnest.cpp
+5
-5
zones_polygons_insulated_copper_islands.cpp
pcbnew/zones_polygons_insulated_copper_islands.cpp
+16
-6
PolyLine.cpp
polygon/PolyLine.cpp
+2
-2
No files found.
common/trigo.cpp
View file @
f723c540
...
@@ -133,7 +133,7 @@ bool DistanceTest( int seuil, int dx, int dy, int spot_cX, int spot_cY )
...
@@ -133,7 +133,7 @@ bool DistanceTest( int seuil, int dx, int dy, int spot_cX, int spot_cY )
* de piste soit horizontal dans le nouveau repere */
* de piste soit horizontal dans le nouveau repere */
int
angle
;
int
angle
;
angle
=
(
int
)
(
atan2
(
(
float
)
segY
,
(
float
)
segX
)
*
1800
/
M_PI
);
angle
=
(
int
)
(
atan2
(
(
double
)
segY
,
(
double
)
segX
)
*
1800
/
M_PI
);
cXrot
=
pointX
;
cYrot
=
pointY
;
cXrot
=
pointX
;
cYrot
=
pointY
;
RotatePoint
(
&
cXrot
,
&
cYrot
,
angle
);
/* Rotation du point a tester */
RotatePoint
(
&
cXrot
,
&
cYrot
,
angle
);
/* Rotation du point a tester */
...
@@ -224,7 +224,7 @@ void RotatePoint( int* pX, int* pY, int angle )
...
@@ -224,7 +224,7 @@ void RotatePoint( int* pX, int* pY, int angle )
* pour une rotation de centre 0, 0, et d'angle angle ( en 1/10 degre)
* pour une rotation de centre 0, 0, et d'angle angle ( en 1/10 degre)
*/
*/
{
{
float
fpx
,
fpy
;
double
fpx
,
fpy
;
int
tmp
;
int
tmp
;
while
(
angle
<
0
)
while
(
angle
<
0
)
...
@@ -262,7 +262,7 @@ void RotatePoint( int* pX, int* pY, int angle )
...
@@ -262,7 +262,7 @@ void RotatePoint( int* pX, int* pY, int angle )
fpx
=
(
*
pY
*
fsinus
[
angle
])
+
(
*
pX
*
fcosinus
[
angle
]);
fpx
=
(
*
pY
*
fsinus
[
angle
])
+
(
*
pX
*
fcosinus
[
angle
]);
fpy
=
(
*
pY
*
fcosinus
[
angle
])
-
(
*
pX
*
fsinus
[
angle
]);
fpy
=
(
*
pY
*
fcosinus
[
angle
])
-
(
*
pX
*
fsinus
[
angle
]);
*
pX
=
(
int
)
round
(
fpx
);
*
pX
=
(
int
)
round
(
fpx
);
*
pY
=
(
int
)
round
(
fpy
);
*
pY
=
(
int
)
round
(
fpy
);
}
}
}
}
...
@@ -280,9 +280,9 @@ void RotatePoint( int* pX, int* pY, int cx, int cy, int angle )
...
@@ -280,9 +280,9 @@ void RotatePoint( int* pX, int* pY, int cx, int cy, int angle )
{
{
int
ox
,
oy
;
int
ox
,
oy
;
ox
=
*
pX
-
cx
;
ox
=
*
pX
-
cx
;
oy
=
*
pY
-
cy
;
oy
=
*
pY
-
cy
;
RotatePoint
(
&
ox
,
&
oy
,
angle
);
RotatePoint
(
&
ox
,
&
oy
,
angle
);
*
pX
=
ox
+
cx
;
*
pX
=
ox
+
cx
;
...
@@ -302,9 +302,9 @@ void RotatePoint( wxPoint* point, int angle )
...
@@ -302,9 +302,9 @@ void RotatePoint( wxPoint* point, int angle )
{
{
int
ox
,
oy
;
int
ox
,
oy
;
ox
=
point
->
x
;
ox
=
point
->
x
;
oy
=
point
->
y
;
oy
=
point
->
y
;
RotatePoint
(
&
ox
,
&
oy
,
angle
);
RotatePoint
(
&
ox
,
&
oy
,
angle
);
point
->
x
=
ox
;
point
->
x
=
ox
;
point
->
y
=
oy
;
point
->
y
=
oy
;
...
@@ -323,9 +323,9 @@ void RotatePoint( wxPoint* point, const wxPoint& centre, int angle )
...
@@ -323,9 +323,9 @@ void RotatePoint( wxPoint* point, const wxPoint& centre, int angle )
{
{
int
ox
,
oy
;
int
ox
,
oy
;
ox
=
point
->
x
-
centre
.
x
;
ox
=
point
->
x
-
centre
.
x
;
oy
=
point
->
y
-
centre
.
y
;
oy
=
point
->
y
-
centre
.
y
;
RotatePoint
(
&
ox
,
&
oy
,
angle
);
RotatePoint
(
&
ox
,
&
oy
,
angle
);
point
->
x
=
ox
+
centre
.
x
;
point
->
x
=
ox
+
centre
.
x
;
point
->
y
=
oy
+
centre
.
y
;
point
->
y
=
oy
+
centre
.
y
;
...
@@ -339,11 +339,11 @@ void RotatePoint( double* pX, double* pY, double cx, double cy, int angle )
...
@@ -339,11 +339,11 @@ void RotatePoint( double* pX, double* pY, double cx, double cy, int angle )
{
{
double
ox
,
oy
;
double
ox
,
oy
;
ox
=
*
pX
-
cx
;
ox
=
*
pX
-
cx
;
oy
=
*
pY
-
cy
;
oy
=
*
pY
-
cy
;
RotatePoint
(
&
ox
,
&
oy
,
angle
);
RotatePoint
(
&
ox
,
&
oy
,
angle
);
*
pX
=
ox
+
cx
;
*
pX
=
ox
+
cx
;
*
pY
=
oy
+
cy
;
*
pY
=
oy
+
cy
;
}
}
...
@@ -390,8 +390,8 @@ void RotatePoint( double* pX, double* pY, int angle )
...
@@ -390,8 +390,8 @@ void RotatePoint( double* pX, double* pY, int angle )
{
{
double
fpx
=
(
*
pY
*
fsinus
[
angle
])
+
(
*
pX
*
fcosinus
[
angle
]);
double
fpx
=
(
*
pY
*
fsinus
[
angle
])
+
(
*
pX
*
fcosinus
[
angle
]);
double
fpy
=
(
*
pY
*
fcosinus
[
angle
])
-
(
*
pX
*
fsinus
[
angle
]);
double
fpy
=
(
*
pY
*
fcosinus
[
angle
])
-
(
*
pX
*
fsinus
[
angle
]);
*
pX
=
fpx
;
*
pX
=
fpx
;
*
pY
=
fpy
;
*
pY
=
fpy
;
}
}
}
}
...
...
eeschema/cleanup.cpp
View file @
f723c540
...
@@ -256,9 +256,10 @@ static int TstAlignSegment( EDA_DrawLineStruct* RefSegm,
...
@@ -256,9 +256,10 @@ static int TstAlignSegment( EDA_DrawLineStruct* RefSegm,
}
}
else
else
{
{
if
(
atan2
(
RefSegm
->
m_Start
.
x
-
RefSegm
->
m_End
.
x
,
RefSegm
->
m_Start
.
y
-
if
(
atan2
(
(
double
)(
RefSegm
->
m_Start
.
x
-
RefSegm
->
m_End
.
x
),
RefSegm
->
m_End
.
y
)
==
(
double
)(
RefSegm
->
m_Start
.
y
-
RefSegm
->
m_End
.
y
)
)
==
atan2
(
TstSegm
->
m_Start
.
x
-
TstSegm
->
m_End
.
x
,
TstSegm
->
m_Start
.
y
-
TstSegm
->
m_End
.
y
)
)
atan2
(
(
double
)(
TstSegm
->
m_Start
.
x
-
TstSegm
->
m_End
.
x
),
(
double
)(
TstSegm
->
m_Start
.
y
-
TstSegm
->
m_End
.
y
)
)
)
{
{
RefSegm
->
m_End
=
TstSegm
->
m_End
;
RefSegm
->
m_End
=
TstSegm
->
m_End
;
return
1
;
return
1
;
...
...
eeschema/locate.cpp
View file @
f723c540
...
@@ -834,7 +834,7 @@ LibEDA_BaseStruct* LocateDrawItem( SCH_SCREEN* Screen,
...
@@ -834,7 +834,7 @@ LibEDA_BaseStruct* LocateDrawItem( SCH_SCREEN* Screen,
break
;
break
;
dx
=
px
-
Arc
->
m_Pos
.
x
;
dx
=
px
-
Arc
->
m_Pos
.
x
;
dy
=
py
+
Arc
->
m_Pos
.
y
;
dy
=
py
+
Arc
->
m_Pos
.
y
;
ii
=
(
int
)
sqrt
(
dx
*
dx
+
dy
*
dy
);
ii
=
(
int
)
sqrt
(
((
double
)
dx
*
dx
)
+
((
double
)
dy
*
dy
)
);
if
(
abs
(
ii
-
Arc
->
m_Rayon
)
<=
seuil
)
if
(
abs
(
ii
-
Arc
->
m_Rayon
)
<=
seuil
)
return
DrawItem
;
return
DrawItem
;
}
}
...
@@ -1015,7 +1015,7 @@ int distance( int dx, int dy, int spot_cX, int spot_cY, int seuil )
...
@@ -1015,7 +1015,7 @@ int distance( int dx, int dy, int spot_cX, int spot_cY, int seuil )
* de piste soit horizontal dans le nouveau repere */
* de piste soit horizontal dans le nouveau repere */
int
angle
;
int
angle
;
angle
=
(
int
)
(
atan2
(
(
float
)
segY
,
(
float
)
segX
)
*
1800
/
M_PI
);
angle
=
(
int
)
(
atan2
(
(
double
)
segY
,
(
double
)
segX
)
*
1800
/
M_PI
);
cXrot
=
pointX
;
cYrot
=
pointY
;
cXrot
=
pointX
;
cYrot
=
pointY
;
RotatePoint
(
&
cXrot
,
&
cYrot
,
angle
);
/* Rotation du point a tester */
RotatePoint
(
&
cXrot
,
&
cYrot
,
angle
);
/* Rotation du point a tester */
RotatePoint
(
&
segX
,
&
segY
,
angle
);
/* Rotation du segment */
RotatePoint
(
&
segX
,
&
segY
,
angle
);
/* Rotation du segment */
...
...
eeschema/symbdraw.cpp
View file @
f723c540
...
@@ -575,7 +575,7 @@ static void SymbolDisplayDraw( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
...
@@ -575,7 +575,7 @@ static void SymbolDisplayDraw( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
case
COMPONENT_CIRCLE_DRAW_TYPE
:
case
COMPONENT_CIRCLE_DRAW_TYPE
:
dx
=
(
(
LibDrawCircle
*
)
CurrentDrawItem
)
->
m_Pos
.
x
-
mx
;
dx
=
(
(
LibDrawCircle
*
)
CurrentDrawItem
)
->
m_Pos
.
x
-
mx
;
dy
=
(
(
LibDrawCircle
*
)
CurrentDrawItem
)
->
m_Pos
.
y
+
my
;
dy
=
(
(
LibDrawCircle
*
)
CurrentDrawItem
)
->
m_Pos
.
y
+
my
;
(
(
LibDrawCircle
*
)
CurrentDrawItem
)
->
m_Rayon
=
(
int
)
sqrt
(
(
dx
*
dx
)
+
(
dy
*
dy
)
);
(
(
LibDrawCircle
*
)
CurrentDrawItem
)
->
m_Rayon
=
(
int
)
sqrt
(
(
(
double
)
dx
*
dx
)
+
((
double
)
dy
*
dy
)
);
(
(
LibDrawCircle
*
)
CurrentDrawItem
)
->
m_Fill
=
FlSymbol_Fill
;
(
(
LibDrawCircle
*
)
CurrentDrawItem
)
->
m_Fill
=
FlSymbol_Fill
;
break
;
break
;
...
@@ -745,7 +745,7 @@ static void ComputeArc( LibDrawArc* DrawItem, wxPoint ArcCentre )
...
@@ -745,7 +745,7 @@ static void ComputeArc( LibDrawArc* DrawItem, wxPoint ArcCentre )
/* calcul de cX et cY pour que l'arc passe par ArcStartX,Y et ArcEndX,Y */
/* calcul de cX et cY pour que l'arc passe par ArcStartX,Y et ArcEndX,Y */
dx
=
ArcEndX
-
ArcStartX
;
dy
=
ArcEndY
-
ArcStartY
;
dx
=
ArcEndX
-
ArcStartX
;
dy
=
ArcEndY
-
ArcStartY
;
cX
-=
ArcStartX
;
cY
-=
ArcStartY
;
cX
-=
ArcStartX
;
cY
-=
ArcStartY
;
angle
=
(
int
)
(
atan2
(
dy
,
dx
)
*
1800
/
M_PI
);
angle
=
(
int
)
(
atan2
(
(
double
)
dy
,
(
double
)
dx
)
*
1800
/
M_PI
);
RotatePoint
(
&
dx
,
&
dy
,
angle
);
/* Le segment dx, dy est horizontal */
RotatePoint
(
&
dx
,
&
dy
,
angle
);
/* Le segment dx, dy est horizontal */
/* -> dx = longueur, dy = 0 */
/* -> dx = longueur, dy = 0 */
RotatePoint
(
&
cX
,
&
cY
,
angle
);
RotatePoint
(
&
cX
,
&
cY
,
angle
);
...
@@ -759,14 +759,14 @@ static void ComputeArc( LibDrawArc* DrawItem, wxPoint ArcCentre )
...
@@ -759,14 +759,14 @@ static void ComputeArc( LibDrawArc* DrawItem, wxPoint ArcCentre )
dx
=
ArcStartX
-
DrawItem
->
m_Pos
.
x
;
dx
=
ArcStartX
-
DrawItem
->
m_Pos
.
x
;
dy
=
ArcStartY
-
DrawItem
->
m_Pos
.
y
;
dy
=
ArcStartY
-
DrawItem
->
m_Pos
.
y
;
DrawItem
->
m_Rayon
=
(
int
)
sqrt
(
(
dx
*
dx
)
+
(
dy
*
dy
)
);
DrawItem
->
m_Rayon
=
(
int
)
sqrt
(
(
(
double
)
dx
*
dx
)
+
((
double
)
dy
*
dy
)
);
DrawItem
->
t1
=
(
int
)
(
atan2
(
dy
,
dx
)
*
1800
/
M_PI
);
DrawItem
->
t1
=
(
int
)
(
atan2
(
(
double
)
dy
,
(
double
)
dx
)
*
1800
/
M_PI
);
dx
=
ArcEndX
-
DrawItem
->
m_Pos
.
x
;
dx
=
ArcEndX
-
DrawItem
->
m_Pos
.
x
;
dy
=
ArcEndY
-
DrawItem
->
m_Pos
.
y
;
dy
=
ArcEndY
-
DrawItem
->
m_Pos
.
y
;
DrawItem
->
t2
=
(
int
)
(
atan2
(
dy
,
dx
)
*
1800
/
M_PI
);
DrawItem
->
t2
=
(
int
)
(
atan2
(
(
double
)
dy
,
(
double
)
dx
)
*
1800
/
M_PI
);
DrawItem
->
m_ArcStart
.
x
=
ArcStartX
;
DrawItem
->
m_ArcStart
.
x
=
ArcStartX
;
DrawItem
->
m_ArcStart
.
y
=
ArcStartY
;
DrawItem
->
m_ArcStart
.
y
=
ArcStartY
;
...
...
gerbview/locate.cpp
View file @
f723c540
...
@@ -436,7 +436,7 @@ int distance( int seuil )
...
@@ -436,7 +436,7 @@ int distance( int seuil )
* de piste soit horizontal dans le nouveau repere */
* de piste soit horizontal dans le nouveau repere */
int
angle
;
int
angle
;
angle
=
(
int
)
(
atan2
(
(
float
)
segY
,
(
float
)
segX
)
*
1800
/
M_PI
);
angle
=
(
int
)
(
atan2
(
(
double
)
segY
,
(
double
)
segX
)
*
1800
/
M_PI
);
cXrot
=
pointX
;
cYrot
=
pointY
;
cXrot
=
pointX
;
cYrot
=
pointY
;
RotatePoint
(
&
cXrot
,
&
cYrot
,
angle
);
/* Rotation du point a tester */
RotatePoint
(
&
cXrot
,
&
cYrot
,
angle
);
/* Rotation du point a tester */
RotatePoint
(
&
segX
,
&
segY
,
angle
);
/* Rotation du segment */
RotatePoint
(
&
segX
,
&
segY
,
angle
);
/* Rotation du segment */
...
...
include/id.h
View file @
f723c540
...
@@ -570,8 +570,8 @@ enum main_id {
...
@@ -570,8 +570,8 @@ enum main_id {
ID_POPUP_PCB_PLACE_ZONE_OUTLINES
,
ID_POPUP_PCB_PLACE_ZONE_OUTLINES
,
ID_POPUP_PCB_DRAG_ZONE_OUTLINE_SEGMENT
,
ID_POPUP_PCB_DRAG_ZONE_OUTLINE_SEGMENT
,
ID_POPUP_PCB_PLACE_DRAGGED_ZONE_OUTLINE_SEGMENT
,
ID_POPUP_PCB_PLACE_DRAGGED_ZONE_OUTLINE_SEGMENT
,
ID_POPUP_PCB_REMOVE_FILLED_AREAS
,
ID_POPUP_PCB_REMOVE_FILLED_AREAS
_IN_ALL_ZONES
,
ID_POPUP_
ZONE_UNUSED4
,
ID_POPUP_
PCB_REMOVE_FILLED_AREAS_IN_CURRENT_ZONE
,
ID_POPUP_PCB_DELETE_MARKER
,
ID_POPUP_PCB_DELETE_MARKER
,
ID_POPUP_PCB_DELETE_COTATION
,
ID_POPUP_PCB_DELETE_COTATION
,
...
...
include/macros.h
View file @
f723c540
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
/* exchange 2 items */
/* exchange 2 items */
#define EXCHG( a, b ) { typeof(a)__temp__ = (a); (a) = (b); (b) = __temp__; }
#define EXCHG( a, b ) { typeof(a)
__temp__ = (a); (a) = (b); (b) = __temp__; }
/* inline functions to insert menuitems with a icon: */
/* inline functions to insert menuitems with a icon: */
static
inline
void
ADD_MENUITEM
(
wxMenu
*
menu
,
int
id
,
static
inline
void
ADD_MENUITEM
(
wxMenu
*
menu
,
int
id
,
...
...
internat/fr/kicad.mo
View file @
f723c540
No preview for this file type
internat/fr/kicad.po
View file @
f723c540
...
@@ -2,8 +2,8 @@ msgid ""
...
@@ -2,8 +2,8 @@ msgid ""
msgstr ""
msgstr ""
"Project-Id-Version: kicad\n"
"Project-Id-Version: kicad\n"
"Report-Msgid-Bugs-To: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-10-2
6 17:23
+0100\n"
"POT-Creation-Date: 2008-10-2
7 13:41
+0100\n"
"PO-Revision-Date: 2008-10-2
6 17:24
+0100\n"
"PO-Revision-Date: 2008-10-2
7 13:42
+0100\n"
"Last-Translator: \n"
"Last-Translator: \n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n"
"MIME-Version: 1.0\n"
...
@@ -347,7 +347,7 @@ msgstr "dimension"
...
@@ -347,7 +347,7 @@ msgstr "dimension"
#: pcbnew/class_marker.cpp:133
#: pcbnew/class_marker.cpp:133
#: pcbnew/class_text_mod.cpp:503
#: pcbnew/class_text_mod.cpp:503
#: pcbnew/class_track.cpp:853
#: pcbnew/class_track.cpp:853
#: pcbnew/class_zone.cpp:7
75
#: pcbnew/class_zone.cpp:7
89
msgid "Type"
msgid "Type"
msgstr "Type"
msgstr "Type"
...
@@ -370,7 +370,7 @@ msgstr "Segment"
...
@@ -370,7 +370,7 @@ msgstr "Segment"
#: pcbnew/class_pcb_text.cpp:190
#: pcbnew/class_pcb_text.cpp:190
#: pcbnew/class_text_mod.cpp:516
#: pcbnew/class_text_mod.cpp:516
#: pcbnew/class_track.cpp:910
#: pcbnew/class_track.cpp:910
#: pcbnew/class_zone.cpp:8
09
#: pcbnew/class_zone.cpp:8
23
msgid "Layer"
msgid "Layer"
msgstr "Couche"
msgstr "Couche"
...
@@ -571,12 +571,12 @@ msgid "Display"
...
@@ -571,12 +571,12 @@ msgid "Display"
msgstr "Affichage"
msgstr "Affichage"
#: pcbnew/class_track.cpp:869
#: pcbnew/class_track.cpp:869
#: pcbnew/class_zone.cpp:
797
#: pcbnew/class_zone.cpp:
811
msgid "NetName"
msgid "NetName"
msgstr "NetName"
msgstr "NetName"
#: pcbnew/class_track.cpp:874
#: pcbnew/class_track.cpp:874
#: pcbnew/class_zone.cpp:8
05
#: pcbnew/class_zone.cpp:8
19
msgid "NetCode"
msgid "NetCode"
msgstr "NetCode"
msgstr "NetCode"
...
@@ -588,27 +588,27 @@ msgstr "Standard"
...
@@ -588,27 +588,27 @@ msgstr "Standard"
msgid "Diam"
msgid "Diam"
msgstr "Diam"
msgstr "Diam"
#: pcbnew/class_zone.cpp:8
00
#: pcbnew/class_zone.cpp:8
14
msgid "Non Copper Zone"
msgid "Non Copper Zone"
msgstr "Zone non Cuivre"
msgstr "Zone non Cuivre"
#: pcbnew/class_zone.cpp:8
13
#: pcbnew/class_zone.cpp:8
27
msgid "Corners"
msgid "Corners"
msgstr "Sommets"
msgstr "Sommets"
#: pcbnew/class_zone.cpp:8
19
#: pcbnew/class_zone.cpp:8
33
msgid "No Grid"
msgid "No Grid"
msgstr "Pas de Grille"
msgstr "Pas de Grille"
#: pcbnew/class_zone.cpp:8
20
#: pcbnew/class_zone.cpp:8
34
msgid "Fill Grid"
msgid "Fill Grid"
msgstr "Grille de Remplissage"
msgstr "Grille de Remplissage"
#: pcbnew/class_zone.cpp:8
25
#: pcbnew/class_zone.cpp:8
39
msgid "Hatch lines"
msgid "Hatch lines"
msgstr "Lignes de Hachure"
msgstr "Lignes de Hachure"
#: pcbnew/class_zone.cpp:8
31
#: pcbnew/class_zone.cpp:8
45
msgid "Corners in DrawList"
msgid "Corners in DrawList"
msgstr "Sommets en Liste de dessin"
msgstr "Sommets en Liste de dessin"
...
@@ -1822,8 +1822,8 @@ msgid "Fill or Refill All Zones"
...
@@ -1822,8 +1822,8 @@ msgid "Fill or Refill All Zones"
msgstr "Remplir ou Re-remplir Toutes les Zones"
msgstr "Remplir ou Re-remplir Toutes les Zones"
#: pcbnew/onrightclick.cpp:345
#: pcbnew/onrightclick.cpp:345
msgid "Remove
filled area
s"
msgid "Remove
Filled Areas in All Zone
s"
msgstr "Supp
imer zones rempli
es"
msgstr "Supp
rimer le Remplissage de toutes les Zon
es"
#: pcbnew/onrightclick.cpp:350
#: pcbnew/onrightclick.cpp:350
#: pcbnew/onrightclick.cpp:359
#: pcbnew/onrightclick.cpp:359
...
@@ -2113,94 +2113,98 @@ msgstr "Addition d'une Zone Interdite"
...
@@ -2113,94 +2113,98 @@ msgstr "Addition d'une Zone Interdite"
msgid "Fill Zone"
msgid "Fill Zone"
msgstr "Remplir Zone"
msgstr "Remplir Zone"
#: pcbnew/onrightclick.cpp:678
#: pcbnew/onrightclick.cpp:680
msgid "Remove Filled Areas in Zone"
msgstr "Supprimer le Remplissage de la Zone"
#: pcbnew/onrightclick.cpp:684
msgid "Move Zone"
msgid "Move Zone"
msgstr "Déplace Zone"
msgstr "Déplace Zone"
#: pcbnew/onrightclick.cpp:68
1
#: pcbnew/onrightclick.cpp:68
7
msgid "Edit Zone Params"
msgid "Edit Zone Params"
msgstr "Editer Paramètres de la Zone"
msgstr "Editer Paramètres de la Zone"
#: pcbnew/onrightclick.cpp:6
86
#: pcbnew/onrightclick.cpp:6
92
msgid "Delete Cutout"
msgid "Delete Cutout"
msgstr "Supprimer Zone Interdite"
msgstr "Supprimer Zone Interdite"
#: pcbnew/onrightclick.cpp:6
89
#: pcbnew/onrightclick.cpp:6
95
msgid "Delete Zone Outline"
msgid "Delete Zone Outline"
msgstr "Supprimer Contour de Zone"
msgstr "Supprimer Contour de Zone"
#: pcbnew/onrightclick.cpp:71
1
#: pcbnew/onrightclick.cpp:71
7
#: pcbnew/onrightclick.cpp:7
56
#: pcbnew/onrightclick.cpp:7
62
#: pcbnew/onrightclick.cpp:
794
#: pcbnew/onrightclick.cpp:
800
#: pcbnew/onrightclick.cpp:86
0
#: pcbnew/onrightclick.cpp:86
6
msgid "Move"
msgid "Move"
msgstr "Move"
msgstr "Move"
#: pcbnew/onrightclick.cpp:7
14
#: pcbnew/onrightclick.cpp:7
20
#: pcbnew/onrightclick.cpp:
796
#: pcbnew/onrightclick.cpp:
802
msgid "Drag"
msgid "Drag"
msgstr "Drag"
msgstr "Drag"
#: pcbnew/onrightclick.cpp:7
18
#: pcbnew/onrightclick.cpp:7
24
msgid "Rotate +"
msgid "Rotate +"
msgstr "Rotation +"
msgstr "Rotation +"
#: pcbnew/onrightclick.cpp:72
2
#: pcbnew/onrightclick.cpp:72
8
msgid "Rotate -"
msgid "Rotate -"
msgstr "Rotation -"
msgstr "Rotation -"
#: pcbnew/onrightclick.cpp:72
3
#: pcbnew/onrightclick.cpp:72
9
msgid "Flip"
msgid "Flip"
msgstr "Change côté"
msgstr "Change côté"
#: pcbnew/onrightclick.cpp:7
27
#: pcbnew/onrightclick.cpp:7
33
#: pcbnew/onrightclick.cpp:76
1
#: pcbnew/onrightclick.cpp:76
7
#: pcbnew/onrightclick.cpp:8
65
#: pcbnew/onrightclick.cpp:8
71
msgid "Edit"
msgid "Edit"
msgstr "Editer"
msgstr "Editer"
#: pcbnew/onrightclick.cpp:73
3
#: pcbnew/onrightclick.cpp:73
9
msgid "Delete Module"
msgid "Delete Module"
msgstr "Supprimer Module"
msgstr "Supprimer Module"
#: pcbnew/onrightclick.cpp:7
59
#: pcbnew/onrightclick.cpp:7
65
#: pcbnew/onrightclick.cpp:86
3
#: pcbnew/onrightclick.cpp:86
9
msgid "Rotate"
msgid "Rotate"
msgstr "Rotation"
msgstr "Rotation"
#: pcbnew/onrightclick.cpp:
798
#: pcbnew/onrightclick.cpp:
804
msgid "Edit Pad"
msgid "Edit Pad"
msgstr "Edit Pad"
msgstr "Edit Pad"
#: pcbnew/onrightclick.cpp:80
2
#: pcbnew/onrightclick.cpp:80
8
msgid "New Pad Settings"
msgid "New Pad Settings"
msgstr "Nouvelles Caract. Pads"
msgstr "Nouvelles Caract. Pads"
#: pcbnew/onrightclick.cpp:80
3
#: pcbnew/onrightclick.cpp:80
9
msgid "Copy current pad settings to this pad"
msgid "Copy current pad settings to this pad"
msgstr "Copier les réglages courants pour ce pad"
msgstr "Copier les réglages courants pour ce pad"
#: pcbnew/onrightclick.cpp:8
06
#: pcbnew/onrightclick.cpp:8
12
msgid "Export Pad Settings"
msgid "Export Pad Settings"
msgstr "Exporte Caract. Pads"
msgstr "Exporte Caract. Pads"
#: pcbnew/onrightclick.cpp:8
07
#: pcbnew/onrightclick.cpp:8
13
msgid "Copy this pad settings to current pad settings"
msgid "Copy this pad settings to current pad settings"
msgstr "Copier les caractéristiques de ce pad vers les caractéristiques courantes"
msgstr "Copier les caractéristiques de ce pad vers les caractéristiques courantes"
#: pcbnew/onrightclick.cpp:81
3
#: pcbnew/onrightclick.cpp:81
9
msgid "Global Pad Settings"
msgid "Global Pad Settings"
msgstr "Edition Globale des pads"
msgstr "Edition Globale des pads"
#: pcbnew/onrightclick.cpp:8
15
#: pcbnew/onrightclick.cpp:8
21
msgid "Copy this pad settings to all pads in this footprint (or similar footprints)"
msgid "Copy this pad settings to all pads in this footprint (or similar footprints)"
msgstr "Copier les caractéristiques de ce pad vers tous les autres pads de ce module( ou modules similaires)"
msgstr "Copier les caractéristiques de ce pad vers tous les autres pads de ce module( ou modules similaires)"
#: pcbnew/onrightclick.cpp:8
27
#: pcbnew/onrightclick.cpp:8
33
msgid "Autoroute Pad"
msgid "Autoroute Pad"
msgstr "Autoroute Pad"
msgstr "Autoroute Pad"
#: pcbnew/onrightclick.cpp:8
28
#: pcbnew/onrightclick.cpp:8
34
msgid "Autoroute Net"
msgid "Autoroute Net"
msgstr "Autoroute Net"
msgstr "Autoroute Net"
...
@@ -2436,56 +2440,56 @@ msgstr "Erreur système sur écriture fichier \"%s\""
...
@@ -2436,56 +2440,56 @@ msgstr "Erreur système sur écriture fichier \"%s\""
msgid "Error writing to STRINGFORMATTER"
msgid "Error writing to STRINGFORMATTER"
msgstr "Error writing to STRINGFORMATTER"
msgstr "Error writing to STRINGFORMATTER"
#: pcbnew/edit.cpp:18
0
#: pcbnew/edit.cpp:18
1
#: pcbnew/editmod.cpp:45
#: pcbnew/editmod.cpp:45
msgid "Module Editor"
msgid "Module Editor"
msgstr "Ouvrir Editeur de modules"
msgstr "Ouvrir Editeur de modules"
#: pcbnew/edit.cpp:26
0
#: pcbnew/edit.cpp:26
1
msgid "Add Tracks"
msgid "Add Tracks"
msgstr "Addition de Pistes"
msgstr "Addition de Pistes"
#: pcbnew/edit.cpp:2
69
#: pcbnew/edit.cpp:2
70
msgid "Add Zones"
msgid "Add Zones"
msgstr "Addition de Zones"
msgstr "Addition de Zones"
#: pcbnew/edit.cpp:27
1
#: pcbnew/edit.cpp:27
2
msgid "Warning: Display Zone is OFF!!!"
msgid "Warning: Display Zone is OFF!!!"
msgstr "Attention: Affichage zones désactivé !!!"
msgstr "Attention: Affichage zones désactivé !!!"
#: pcbnew/edit.cpp:27
7
#: pcbnew/edit.cpp:27
8
msgid "Add Layer Alignment Target"
msgid "Add Layer Alignment Target"
msgstr "Ajouter Mire de superposition"
msgstr "Ajouter Mire de superposition"
#: pcbnew/edit.cpp:28
1
#: pcbnew/edit.cpp:28
2
msgid "Adjust Zero"
msgid "Adjust Zero"
msgstr "Ajuster Zéro"
msgstr "Ajuster Zéro"
#: pcbnew/edit.cpp:28
7
#: pcbnew/edit.cpp:28
8
msgid "Add Graphic"
msgid "Add Graphic"
msgstr "Addition éléments graphiques"
msgstr "Addition éléments graphiques"
#: pcbnew/edit.cpp:29
1
#: pcbnew/edit.cpp:29
2
msgid "Add Text"
msgid "Add Text"
msgstr "Ajout de Texte"
msgstr "Ajout de Texte"
#: pcbnew/edit.cpp:29
5
#: pcbnew/edit.cpp:29
6
msgid "Add Modules"
msgid "Add Modules"
msgstr "Addition de Modules"
msgstr "Addition de Modules"
#: pcbnew/edit.cpp:
299
#: pcbnew/edit.cpp:
300
msgid "Add Dimension"
msgid "Add Dimension"
msgstr "Ajout de cotes"
msgstr "Ajout de cotes"
#: pcbnew/edit.cpp:30
7
#: pcbnew/edit.cpp:30
8
msgid "Net Highlight"
msgid "Net Highlight"
msgstr "Surbrillance des équipotentielles"
msgstr "Surbrillance des équipotentielles"
#: pcbnew/edit.cpp:31
1
#: pcbnew/edit.cpp:31
2
msgid "Local Ratsnest"
msgid "Local Ratsnest"
msgstr "Montrer le chevelu général"
msgstr "Montrer le chevelu général"
#: pcbnew/edit.cpp:5
6
9
#: pcbnew/edit.cpp:5
7
9
msgid "Delete item"
msgid "Delete item"
msgstr "Suppression d'éléments"
msgstr "Suppression d'éléments"
...
@@ -9869,7 +9873,7 @@ msgstr "Hollandais"
...
@@ -9869,7 +9873,7 @@ msgstr "Hollandais"
msgid "Language"
msgid "Language"
msgstr "Langage"
msgstr "Langage"
#: 3d-viewer/3d_aux.cpp:20
7
#: 3d-viewer/3d_aux.cpp:20
6
msgid "Vertex "
msgid "Vertex "
msgstr "Vertex "
msgstr "Vertex "
...
...
pcbnew/class_module.cpp
View file @
f723c540
...
@@ -1060,7 +1060,8 @@ void MODULE::Display_Infos( WinEDA_DrawFrame* frame )
...
@@ -1060,7 +1060,8 @@ void MODULE::Display_Infos( WinEDA_DrawFrame* frame )
pos
+=
6
;
pos
+=
6
;
if
(
flag
)
// Affichage date de modification (utile en Module Editor)
if
(
flag
)
// Affichage date de modification (utile en Module Editor)
{
{
strcpy
(
Line
,
ctime
(
&
m_LastEdit_Time
)
);
time_t
edit_time
=
m_LastEdit_Time
;
strcpy
(
Line
,
ctime
(
&
edit_time
)
);
strtok
(
Line
,
"
\n\r
"
);
strtok
(
Line
,
"
\n\r
"
);
strcpy
(
bufcar
,
strtok
(
NULL
,
"
\n\r
"
)
);
strcat
(
bufcar
,
" "
);
strcpy
(
bufcar
,
strtok
(
NULL
,
"
\n\r
"
)
);
strcat
(
bufcar
,
" "
);
strcat
(
bufcar
,
strtok
(
NULL
,
"
\n\r
"
)
);
strcat
(
bufcar
,
", "
);
strcat
(
bufcar
,
strtok
(
NULL
,
"
\n\r
"
)
);
strcat
(
bufcar
,
", "
);
...
...
pcbnew/class_module.h
View file @
f723c540
...
@@ -20,13 +20,13 @@ class Struct3D_Master;
...
@@ -20,13 +20,13 @@ class Struct3D_Master;
/* Flags :*/
/* Flags :*/
enum
Mod_Attribut
/* Attributs
d'un module
*/
enum
Mod_Attribut
/* Attributs
used for modules
*/
{
{
MOD_DEFAULT
=
0
,
/* Type default */
MOD_DEFAULT
=
0
,
/* Type default */
MOD_CMS
=
1
,
/*
Pour module apparaissant dans les
MOD_CMS
=
1
,
/*
Set for modules listed in the automatic insertion list
*
fichiers de placement automatique (principalement modules CMS
*/
*
(usually SMD footprints)
*/
MOD_VIRTUAL
=
2
/*
Module virtuel constitue par un dessin sur circuit
MOD_VIRTUAL
=
2
/*
Virtuel component: when created by copper shapes on board
* (
connecteur, trou de percage
..) */
* (
Like edge card connectors, mounting hole.
..) */
};
};
...
@@ -41,34 +41,33 @@ public:
...
@@ -41,34 +41,33 @@ public:
wxPoint
m_Pos
;
// Real coord on board
wxPoint
m_Pos
;
// Real coord on board
D_PAD
*
m_Pads
;
/* Pad list (linked list) */
D_PAD
*
m_Pads
;
/* Pad list (linked list) */
BOARD_ITEM
*
m_Drawings
;
/* Graphic items list (linked list) */
BOARD_ITEM
*
m_Drawings
;
/* Graphic items list (linked list) */
Struct3D_Master
*
m_3D_Drawings
;
/*
Pointeur sur la liste des elements de trace 3D
*/
Struct3D_Master
*
m_3D_Drawings
;
/*
First item of the 3D shapes (linked list)
*/
TEXTE_MODULE
*
m_Reference
;
//
texte reference du composant
(U34, R18..)
TEXTE_MODULE
*
m_Reference
;
//
Component reference
(U34, R18..)
TEXTE_MODULE
*
m_Value
;
//
texte valeur du composant
(74LS00, 22K..)
TEXTE_MODULE
*
m_Value
;
//
Component value
(74LS00, 22K..)
wxString
m_LibRef
;
/*
nom du module en librairie
*/
wxString
m_LibRef
;
/*
Name of the module in library (and the default value when loading amodule from the library)
*/
wxString
m_AlternateReference
;
/* Used when m_Reference cannot be used to
wxString
m_AlternateReference
;
/* Used when m_Reference cannot be used to
* identify the footprint ( after a full reannotation of the schematic */
* identify the footprint ( after a full reannotation of the schematic */
int
m_Attributs
;
/* Flags
bits a bit ( voir enum
Mod_Attribut ) */
int
m_Attributs
;
/* Flags
(ORed bits) ( see
Mod_Attribut ) */
int
m_Orient
;
/* orientation
en 1/10 degr
es */
int
m_Orient
;
/* orientation
in 0.1 degre
es */
int
flag
;
/* flag utilise en trace rastnest et routage auto */
int
flag
;
/* flag utilise en trace rastnest et routage auto */
int
m_ModuleStatus
;
/* For autoplace: flags (LOCKED, AUTOPLACED) */
int
m_ModuleStatus
;
/* For autoplace: flags (LOCKED, AUTOPLACED) */
EDA_Rect
m_BoundaryBox
;
/* position/taille du cadre de reperage (coord locales)*/
EDA_Rect
m_BoundaryBox
;
/* Bounding box coordinates relatives to the anchor, orient 0*/
EDA_Rect
m_RealBoundaryBox
;
/* position/taille du module (coord relles) */
EDA_Rect
m_RealBoundaryBox
;
/* Bounding box : coordinates on board, real orientation */
int
m_PadNum
;
// Nombre total de pads
int
m_PadNum
;
// Pad count
int
m_AltPadNum
;
// en placement auto Nombre de pads actifs pour
int
m_AltPadNum
;
// Pad with netcode > 0 (active pads)count
// les calculs
int
m_CntRot90
;
// Automatic placement : cost ( 0..10 ) for 90 degrees rotaion (Horiz<->Vertical)
int
m_CntRot90
;
// Placement auto: cout ( 0..10 ) de la rotation 90 degre
int
m_CntRot180
;
// Automatic placement : cost ( 0..10 ) for 180 degrees rotaion (UP <->Down)
int
m_CntRot180
;
// Placement auto: cout ( 0..10 ) de la rotation 180 degre
wxSize
m_Ext
;
// Automatic placement margin around the module
wxSize
m_Ext
;
// marges de "garde": utilise en placement auto.
float
m_Surface
;
// Bounding box area
float
m_Surface
;
// surface du rectangle d'encadrement
unsigned
long
m_Link
;
// Temporary variable ( used in editions, ...)
unsigned
long
m_Link
;
// variable temporaire ( pour editions, ...)
long
m_LastEdit_Time
;
// Date de la derniere modification du module (gestion de librairies)
long
m_LastEdit_Time
;
// Date de la derniere modification du module (gestion de librairies)
wxString
m_Path
;
wxString
m_Path
;
wxString
m_Doc
;
//
Texte de description du module
wxString
m_Doc
;
//
Module Description (info for users)
wxString
m_KeyWord
;
//
Liste des mots cles relatifs au module
wxString
m_KeyWord
;
//
Keywords to select the module in lib
public
:
public
:
MODULE
(
BOARD
*
parent
);
MODULE
(
BOARD
*
parent
);
...
@@ -79,11 +78,17 @@ public:
...
@@ -79,11 +78,17 @@ public:
MODULE
*
Next
()
{
return
(
MODULE
*
)
Pnext
;
}
MODULE
*
Next
()
{
return
(
MODULE
*
)
Pnext
;
}
void
Set_Rectangle_Encadrement
();
/* mise a jour du rect d'encadrement
/** Function Set_Rectangle_Encadrement()
* en coord locales (orient 0 et origine = pos module) */
* Calculates the bounding box
* for orient 0 et origin = module anchor)
*/
void
Set_Rectangle_Encadrement
();
void
SetRectangleExinscrit
();
/* mise a jour du rect d'encadrement
/** function SetRectangleExinscrit()
* et de la surface en coord reelles */
* Calculates the real bounding box accordint to theboard position, and real orientaion
* and also calculates the area value (used in automatic placement)
*/
void
SetRectangleExinscrit
();
/**
/**
* Function GetBoundingBox
* Function GetBoundingBox
* returns the bounding box of this Footprint
* returns the bounding box of this Footprint
...
@@ -103,11 +108,11 @@ public:
...
@@ -103,11 +108,11 @@ public:
}
}
//
deplacement
s
//
Move
s
void
SetPosition
(
const
wxPoint
&
newpos
);
void
SetPosition
(
const
wxPoint
&
newpos
);
void
SetOrientation
(
int
newangle
);
void
SetOrientation
(
int
newangle
);
/*
supprime du chainage la structure Struc
t */
/*
Remove this from the linked lis
t */
void
UnLink
();
void
UnLink
();
...
@@ -151,7 +156,7 @@ public:
...
@@ -151,7 +156,7 @@ public:
/**
/**
* Function Read_GPCB_Descr
* Function Read_GPCB_Descr
* Read a footprint description in GPCB format
* Read a footprint description in GPCB format
(newlib version)
* @param CmpFullFileName = Full file name (there is one footprint per file.
* @param CmpFullFileName = Full file name (there is one footprint per file.
* this is also the footprint name
* this is also the footprint name
* @return bool - true if success reading else false.
* @return bool - true if success reading else false.
...
...
pcbnew/class_pad.h
View file @
f723c540
...
@@ -61,10 +61,10 @@ public:
...
@@ -61,10 +61,10 @@ public:
int
m_Orient
;
// in 1/10 degrees
int
m_Orient
;
// in 1/10 degrees
int
m_logical_connexion
;
// variable used in rastnest computations
int
m_logical_connexion
;
// variable used in rastnest computations
// handle
block
number in ratsnet connection
// handle
subnet (block)
number in ratsnet connection
int
m_physical_connexion
;
// variable used in rastnest computations
int
m_physical_connexion
;
// variable used in rastnest computations
// handle
block
number in track connection
// handle
physical subnet (block)
number in track connection
protected
:
protected
:
int
m_ZoneSubnet
;
// variable used in rastnest computations
int
m_ZoneSubnet
;
// variable used in rastnest computations
// handle block number in zone connection
// handle block number in zone connection
...
...
pcbnew/class_zone.cpp
View file @
f723c540
...
@@ -38,6 +38,20 @@ ZONE_CONTAINER::~ZONE_CONTAINER()
...
@@ -38,6 +38,20 @@ ZONE_CONTAINER::~ZONE_CONTAINER()
}
}
/** virtual function GetPosition
* @return a wxPoint, position of the first point of the outline
*/
wxPoint
&
ZONE_CONTAINER
::
GetPosition
()
{
static
wxPoint
pos
;
if
(
m_Poly
)
{
pos
=
GetCornerPosition
(
0
);
}
else
pos
=
wxPoint
(
0
,
0
);
return
pos
;
}
/*******************************************/
/*******************************************/
void
ZONE_CONTAINER
::
SetNet
(
int
anet_code
)
void
ZONE_CONTAINER
::
SetNet
(
int
anet_code
)
/*******************************************/
/*******************************************/
...
...
pcbnew/class_zone.h
View file @
f723c540
...
@@ -53,13 +53,10 @@ public:
...
@@ -53,13 +53,10 @@ public:
bool
Save
(
FILE
*
aFile
)
const
;
bool
Save
(
FILE
*
aFile
)
const
;
int
ReadDescr
(
FILE
*
aFile
,
int
*
aLineNum
=
NULL
);
int
ReadDescr
(
FILE
*
aFile
,
int
*
aLineNum
=
NULL
);
wxPoint
&
GetPosition
()
/** virtual function GetPosition
{
* @return a wxPoint, position of the first point of the outline
static
wxPoint
pos
;
*/
wxPoint
&
GetPosition
();
return
pos
;
}
void
UnLink
(
void
)
void
UnLink
(
void
)
{
{
...
...
pcbnew/connect.cpp
View file @
f723c540
...
@@ -267,9 +267,9 @@ void WinEDA_BasePcbFrame::test_connexions( wxDC* DC )
...
@@ -267,9 +267,9 @@ void WinEDA_BasePcbFrame::test_connexions( wxDC* DC )
/***************************************************/
/***************************************************/
/** Function testing the connections relative to all nets
/** Function testing the connections relative to all nets
* This function update
le status du chevelu
( flag CH_ACTIF = 0 if a connection is found, = 1 else)
* This function update
the status of the ratsnest
( flag CH_ACTIF = 0 if a connection is found, = 1 else)
* track segments are assumed to be sorted by net codes.
* track segments are assumed to be sorted by net codes.
* This is the case because when a new track is added, it is
put in the linked link
according to its net code.
* This is the case because when a new track is added, it is
inserted in the linked list
according to its net code.
* and when nets are changed (when a new netlist is read) tracks are sorted before using this function
* and when nets are changed (when a new netlist is read) tracks are sorted before using this function
* @param DC = current Device Context
* @param DC = current Device Context
*/
*/
...
@@ -443,18 +443,18 @@ static void calcule_connexite_1_net( TRACK* pt_start_conn, TRACK* pt_end_conn )
...
@@ -443,18 +443,18 @@ static void calcule_connexite_1_net( TRACK* pt_start_conn, TRACK* pt_end_conn )
#define POS_AFF_CHREF 62
#define POS_AFF_CHREF 62
/******************************************************************************/
/******************************************************************************/
static
D_PAD
*
SuperFast_Locate_Pad_Connecte
(
BOARD
*
p
cb
,
LISTE_PAD
*
pt_liste
,
static
D_PAD
*
SuperFast_Locate_Pad_Connecte
(
BOARD
*
aP
cb
,
LISTE_PAD
*
pt_liste
,
int
px
,
int
py
,
int
masque_layer
)
const
wxPoint
&
posref
,
int
masque_layer
)
/******************************************************************************/
/******************************************************************************/
/** Function SuperFast_Locate_Pad_Connecte
/** Function SuperFast_Locate_Pad_Connecte
* Locate the pad connected to a track ended at coord px, py
* Locate the pad connected to a track ended at coord px, py
* A track is seen as connected if the px, py position is same as the pad position
* A track is seen as connected if the px, py position is same as the pad position
* @param px = reference X coordinate
* @param aPcb = the board.
* @param py = reference Y coordinate
* @param masque_layer = Layers (bit to bit) to consider
* @param pt_liste = Pointers to pads buffer
* @param pt_liste = Pointers to pads buffer
* This buffer is a list like the list created by build_liste_pad, but sorted by increasing X pad coordinate
* This buffer is a list like the list created by build_liste_pad, but sorted by increasing X pad coordinate
* @param posref = reference coordinate
* @param masque_layer = Layers (bit to bit) to consider
* @return : pointer on the connected pad
* @return : pointer on the connected pad
* This function uses a fast search in this sorted pad list and it is faster than Fast_Locate_Pad_connecte(),
* This function uses a fast search in this sorted pad list and it is faster than Fast_Locate_Pad_connecte(),
* But this sorted pad list must be built before calling this function.
* But this sorted pad list must be built before calling this function.
...
@@ -464,10 +464,10 @@ static D_PAD* SuperFast_Locate_Pad_Connecte( BOARD* pcb, LISTE_PAD* pt_liste,
...
@@ -464,10 +464,10 @@ static D_PAD* SuperFast_Locate_Pad_Connecte( BOARD* pcb, LISTE_PAD* pt_liste,
{
{
D_PAD
*
pad
;
D_PAD
*
pad
;
LISTE_PAD
*
ptr_pad
,
*
lim
;
LISTE_PAD
*
ptr_pad
,
*
lim
;
int
nb_pad
=
p
cb
->
m_NbPads
;
int
nb_pad
=
aP
cb
->
m_NbPads
;
int
ii
;
int
ii
;
lim
=
pt_liste
+
(
p
cb
->
m_NbPads
-
1
);
lim
=
pt_liste
+
(
aP
cb
->
m_NbPads
-
1
);
ptr_pad
=
pt_liste
;
ptr_pad
=
pt_liste
;
while
(
nb_pad
)
while
(
nb_pad
)
{
{
...
@@ -478,14 +478,14 @@ static D_PAD* SuperFast_Locate_Pad_Connecte( BOARD* pcb, LISTE_PAD* pt_liste,
...
@@ -478,14 +478,14 @@ static D_PAD* SuperFast_Locate_Pad_Connecte( BOARD* pcb, LISTE_PAD* pt_liste,
if
(
(
ii
&
1
)
&&
(
ii
>
1
)
)
if
(
(
ii
&
1
)
&&
(
ii
>
1
)
)
nb_pad
++
;
nb_pad
++
;
if
(
pad
->
m_Pos
.
x
<
px
)
/* Must search after this item */
if
(
pad
->
m_Pos
.
x
<
p
osref
.
x
)
/* Must search after this item */
{
{
ptr_pad
+=
nb_pad
;
ptr_pad
+=
nb_pad
;
if
(
ptr_pad
>
lim
)
if
(
ptr_pad
>
lim
)
ptr_pad
=
lim
;
ptr_pad
=
lim
;
continue
;
continue
;
}
}
if
(
pad
->
m_Pos
.
x
>
px
)
/* Must search before this item */
if
(
pad
->
m_Pos
.
x
>
p
osref
.
x
)
/* Must search before this item */
{
{
ptr_pad
-=
nb_pad
;
ptr_pad
-=
nb_pad
;
if
(
ptr_pad
<
pt_liste
)
if
(
ptr_pad
<
pt_liste
)
...
@@ -493,13 +493,13 @@ static D_PAD* SuperFast_Locate_Pad_Connecte( BOARD* pcb, LISTE_PAD* pt_liste,
...
@@ -493,13 +493,13 @@ static D_PAD* SuperFast_Locate_Pad_Connecte( BOARD* pcb, LISTE_PAD* pt_liste,
continue
;
continue
;
}
}
if
(
pad
->
m_Pos
.
x
==
px
)
/* A suitable block is found (X coordinate matches the px reference: but wue must matches the Y coordinate */
if
(
pad
->
m_Pos
.
x
==
p
osref
.
x
)
/* A suitable block is found (X coordinate matches the px reference: but wue must matches the Y coordinate */
{
{
/* Search the beginning of the block */
/* Search the beginning of the block */
while
(
ptr_pad
>=
pt_liste
)
while
(
ptr_pad
>=
pt_liste
)
{
{
pad
=
*
ptr_pad
;
pad
=
*
ptr_pad
;
if
(
pad
->
m_Pos
.
x
==
px
)
if
(
pad
->
m_Pos
.
x
==
p
osref
.
x
)
ptr_pad
--
;
ptr_pad
--
;
else
else
break
;
break
;
...
@@ -513,10 +513,10 @@ static D_PAD* SuperFast_Locate_Pad_Connecte( BOARD* pcb, LISTE_PAD* pt_liste,
...
@@ -513,10 +513,10 @@ static D_PAD* SuperFast_Locate_Pad_Connecte( BOARD* pcb, LISTE_PAD* pt_liste,
return
NULL
;
/* outside suitable block */
return
NULL
;
/* outside suitable block */
pad
=
*
ptr_pad
;
pad
=
*
ptr_pad
;
if
(
pad
->
m_Pos
.
x
!=
px
)
if
(
pad
->
m_Pos
.
x
!=
p
osref
.
x
)
return
NULL
;
/* outside suitable block */
return
NULL
;
/* outside suitable block */
if
(
pad
->
m_Pos
.
y
!=
py
)
if
(
pad
->
m_Pos
.
y
!=
p
osref
.
y
)
continue
;
continue
;
/* A Pad if found here: but it must mach the layer */
/* A Pad if found here: but it must mach the layer */
...
@@ -615,8 +615,7 @@ void WinEDA_BasePcbFrame::reattribution_reference_piste( int affiche )
...
@@ -615,8 +615,7 @@ void WinEDA_BasePcbFrame::reattribution_reference_piste( int affiche )
/* Search for a pad on the segment starting point */
/* Search for a pad on the segment starting point */
pt_piste
->
start
=
SuperFast_Locate_Pad_Connecte
(
m_Pcb
,
pt_piste
->
start
=
SuperFast_Locate_Pad_Connecte
(
m_Pcb
,
&
sortedPads
[
0
],
&
sortedPads
[
0
],
pt_piste
->
m_Start
.
x
,
pt_piste
->
m_Start
,
pt_piste
->
m_Start
.
y
,
masque_layer
);
masque_layer
);
if
(
pt_piste
->
start
!=
NULL
)
if
(
pt_piste
->
start
!=
NULL
)
{
{
...
@@ -627,8 +626,7 @@ void WinEDA_BasePcbFrame::reattribution_reference_piste( int affiche )
...
@@ -627,8 +626,7 @@ void WinEDA_BasePcbFrame::reattribution_reference_piste( int affiche )
/* Search for a pad on the segment ending point */
/* Search for a pad on the segment ending point */
pt_piste
->
end
=
SuperFast_Locate_Pad_Connecte
(
m_Pcb
,
pt_piste
->
end
=
SuperFast_Locate_Pad_Connecte
(
m_Pcb
,
&
sortedPads
[
0
],
&
sortedPads
[
0
],
pt_piste
->
m_End
.
x
,
pt_piste
->
m_End
,
pt_piste
->
m_End
.
y
,
masque_layer
);
masque_layer
);
if
(
pt_piste
->
end
!=
NULL
)
if
(
pt_piste
->
end
!=
NULL
)
...
...
pcbnew/cotation.cpp
View file @
f723c540
...
@@ -330,7 +330,7 @@ static void Montre_Position_New_Cotation( WinEDA_DrawPanel* panel, wxDC* DC, boo
...
@@ -330,7 +330,7 @@ static void Montre_Position_New_Cotation( WinEDA_DrawPanel* panel, wxDC* DC, boo
/* Calcul de la direction de deplacement
/* Calcul de la direction de deplacement
* ( perpendiculaire a l'axe de la cote ) */
* ( perpendiculaire a l'axe de la cote ) */
angle
=
atan2
(
deltay
,
deltax
)
+
(
M_PI
/
2
);
angle
=
atan2
(
(
double
)
deltay
,
(
double
)
deltax
)
+
(
M_PI
/
2
);
deltax
=
pos
.
x
-
Cotation
->
TraitD_ox
;
deltax
=
pos
.
x
-
Cotation
->
TraitD_ox
;
deltay
=
pos
.
y
-
Cotation
->
TraitD_oy
;
deltay
=
pos
.
y
-
Cotation
->
TraitD_oy
;
...
@@ -405,10 +405,10 @@ static void Ajuste_Details_Cotation( COTATION* Cotation )
...
@@ -405,10 +405,10 @@ static void Ajuste_Details_Cotation( COTATION* Cotation )
deltay
=
Cotation
->
TraitD_oy
-
Cotation
->
TraitG_oy
;
deltay
=
Cotation
->
TraitD_oy
-
Cotation
->
TraitG_oy
;
/* Calcul de la cote */
/* Calcul de la cote */
mesure
=
(
int
)
(
hypot
(
(
float
)
deltax
,
(
float
)
deltay
)
+
0.5
);
mesure
=
(
int
)
(
hypot
(
(
double
)
deltax
,
(
double
)
deltay
)
+
0.5
);
if
(
deltax
||
deltay
)
if
(
deltax
||
deltay
)
angle
=
atan2
(
(
float
)
deltay
,
(
float
)
deltax
);
angle
=
atan2
(
(
double
)
deltay
,
(
double
)
deltax
);
else
else
angle
=
0.0
;
angle
=
0.0
;
...
...
pcbnew/edit.cpp
View file @
f723c540
...
@@ -68,7 +68,8 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -68,7 +68,8 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_PCB_STOP_CURRENT_EDGE_ZONE
:
case
ID_POPUP_PCB_STOP_CURRENT_EDGE_ZONE
:
case
ID_POPUP_PCB_DELETE_ZONE_LAST_CREATED_CORNER
:
case
ID_POPUP_PCB_DELETE_ZONE_LAST_CREATED_CORNER
:
case
ID_POPUP_PCB_FILL_ALL_ZONES
:
case
ID_POPUP_PCB_FILL_ALL_ZONES
:
case
ID_POPUP_PCB_REMOVE_FILLED_AREAS
:
case
ID_POPUP_PCB_REMOVE_FILLED_AREAS_IN_ALL_ZONES
:
case
ID_POPUP_PCB_REMOVE_FILLED_AREAS_IN_CURRENT_ZONE
:
case
ID_POPUP_PCB_PLACE_ZONE_CORNER
:
case
ID_POPUP_PCB_PLACE_ZONE_CORNER
:
case
ID_POPUP_PCB_PLACE_ZONE_OUTLINES
:
case
ID_POPUP_PCB_PLACE_ZONE_OUTLINES
:
case
ID_POPUP_PCB_EDIT_ZONE_PARAMS
:
case
ID_POPUP_PCB_EDIT_ZONE_PARAMS
:
...
@@ -543,8 +544,17 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -543,8 +544,17 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
Fill_All_Zones
(
&
dc
);
Fill_All_Zones
(
&
dc
);
break
;
break
;
case
ID_POPUP_PCB_REMOVE_FILLED_AREAS
:
// Remove all zones :
case
ID_POPUP_PCB_REMOVE_FILLED_AREAS_IN_CURRENT_ZONE
:
if
(
(
GetCurItem
())
->
Type
()
==
TYPEZONE_CONTAINER
)
{
((
ZONE_CONTAINER
*
)
GetCurItem
())
->
m_FilledPolysList
.
clear
();
GetScreen
()
->
SetModify
();
DrawPanel
->
Refresh
();
}
break
;
case
ID_POPUP_PCB_REMOVE_FILLED_AREAS_IN_ALL_ZONES
:
// Remove all zones :
if
(
m_Pcb
->
m_Zone
)
if
(
m_Pcb
->
m_Zone
)
{
{
m_Pcb
->
m_Zone
->
DeleteStructList
();
m_Pcb
->
m_Zone
->
DeleteStructList
();
...
...
pcbnew/graphpcb.cpp
View file @
f723c540
...
@@ -283,7 +283,7 @@ void TraceSegmentPcb( BOARD* Pcb, TRACK* pt_segm, int color, int marge, int op_l
...
@@ -283,7 +283,7 @@ void TraceSegmentPcb( BOARD* Pcb, TRACK* pt_segm, int color, int marge, int op_l
mask_layer
=
1
<<
Route_Layer_TOP
;
mask_layer
=
1
<<
Route_Layer_TOP
;
else
mask_layer
=
-
1
;
else
mask_layer
=
-
1
;
}
}
if
(
color
==
VIA_IMPOSSIBLE
)
if
(
color
==
VIA_IMPOSSIBLE
)
mask_layer
=
-
1
;
mask_layer
=
-
1
;
...
@@ -464,7 +464,7 @@ void TraceFilledRectangle( BOARD* Pcb,
...
@@ -464,7 +464,7 @@ void TraceFilledRectangle( BOARD* Pcb,
/*****************************************************************/
/*****************************************************************/
/* Fonction Surchargee.
/* Fonction Surchargee.
*
*
* Met a la valeur color l'ensemble des cellules du board inscrites dans
* Met a la valeur color l'ensemble des cellules du board inscrites dans
* le rectangle de coord ux0,uy0 ( angle haut a gauche )
* le rectangle de coord ux0,uy0 ( angle haut a gauche )
* a ux1,uy1 ( angle bas a droite )
* a ux1,uy1 ( angle bas a droite )
...
@@ -545,7 +545,7 @@ void TraceFilledRectangle( BOARD* Pcb, int ux0, int uy0, int ux1, int uy1, int a
...
@@ -545,7 +545,7 @@ void TraceFilledRectangle( BOARD* Pcb, int ux0, int uy0, int ux1, int uy1, int a
/***********************************************************************************/
/***********************************************************************************/
/* Fonction Surchargee.
/* Fonction Surchargee.
*
*
* Met a la valeur color l'ensemble des cellules du board inscrites dans
* Met a la valeur color l'ensemble des cellules du board inscrites dans
* le rectangle de coord ux0,uy0 ( angle haut a droite )
* le rectangle de coord ux0,uy0 ( angle haut a droite )
* a ux1,uy1 ( angle bas a gauche )
* a ux1,uy1 ( angle bas a gauche )
...
@@ -595,8 +595,8 @@ void TraceFilledRectangle( BOARD* Pcb, int ux0, int uy0, int ux1, int uy1, int a
...
@@ -595,8 +595,8 @@ void TraceFilledRectangle( BOARD* Pcb, int ux0, int uy0, int ux1, int uy1, int a
ux1
-=
Pcb
->
m_BoundaryBox
.
m_Pos
.
x
;
uy1
-=
Pcb
->
m_BoundaryBox
.
m_Pos
.
y
;
ux1
-=
Pcb
->
m_BoundaryBox
.
m_Pos
.
x
;
uy1
-=
Pcb
->
m_BoundaryBox
.
m_Pos
.
y
;
cx
=
(
ux0
+
ux1
)
/
2
;
cy
=
(
uy0
+
uy1
)
/
2
;
cx
=
(
ux0
+
ux1
)
/
2
;
cy
=
(
uy0
+
uy1
)
/
2
;
rayon
=
(
int
)
sqrt
(
(
float
)
(
cx
-
ux0
)
*
(
cx
-
ux0
)
rayon
=
(
int
)
sqrt
(
(
double
)
(
cx
-
ux0
)
*
(
cx
-
ux0
)
+
(
float
)
(
cy
-
uy0
)
*
(
cy
-
uy0
)
);
+
(
double
)
(
cy
-
uy0
)
*
(
cy
-
uy0
)
);
/* Calcul des coord limites des cellules appartenant au rectangle */
/* Calcul des coord limites des cellules appartenant au rectangle */
row_max
=
(
cy
+
rayon
)
/
g_GridRoutingSize
;
row_max
=
(
cy
+
rayon
)
/
g_GridRoutingSize
;
...
@@ -719,7 +719,7 @@ void DrawSegmentQcq( int ux0, int uy0, int ux1, int uy1, int lg, int layer,
...
@@ -719,7 +719,7 @@ void DrawSegmentQcq( int ux0, int uy0, int ux1, int uy1, int lg, int layer,
dx
=
ux1
-
ux0
;
dy
=
uy1
-
uy0
;
dx
=
ux1
-
ux0
;
dy
=
uy1
-
uy0
;
if
(
dx
)
if
(
dx
)
angle
=
(
int
)
(
atan2
(
dy
,
dx
)
*
1800
/
M_PI
);
angle
=
(
int
)
(
atan2
(
(
double
)
dy
,
(
double
)
dx
)
*
1800
/
M_PI
);
else
else
{
{
angle
=
900
;
if
(
dy
<
0
)
angle
=
900
;
if
(
dy
<
0
)
...
...
pcbnew/onrightclick.cpp
View file @
f723c540
...
@@ -341,8 +341,8 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
...
@@ -341,8 +341,8 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
aPopMenu
->
AppendSeparator
();
aPopMenu
->
AppendSeparator
();
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_FILL_ALL_ZONES
,
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_FILL_ALL_ZONES
,
_
(
"Fill or Refill All Zones"
),
fill_zone_xpm
);
_
(
"Fill or Refill All Zones"
),
fill_zone_xpm
);
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_REMOVE_FILLED_AREAS
,
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_REMOVE_FILLED_AREAS
_IN_ALL_ZONES
,
_
(
"Remove
filled area
s"
),
fill_zone_xpm
);
_
(
"Remove
Filled Areas in All Zone
s"
),
fill_zone_xpm
);
aPopMenu
->
AppendSeparator
();
aPopMenu
->
AppendSeparator
();
}
}
...
@@ -674,6 +674,12 @@ void WinEDA_PcbFrame::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu
...
@@ -674,6 +674,12 @@ void WinEDA_PcbFrame::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu
ADD_MENUITEM
(
zones_menu
,
ID_POPUP_PCB_FILL_ZONE
,
ADD_MENUITEM
(
zones_menu
,
ID_POPUP_PCB_FILL_ZONE
,
_
(
"Fill Zone"
),
fill_zone_xpm
);
_
(
"Fill Zone"
),
fill_zone_xpm
);
if
(
edge_zone
->
m_FilledPolysList
.
size
()
>
0
)
{
ADD_MENUITEM
(
zones_menu
,
ID_POPUP_PCB_REMOVE_FILLED_AREAS_IN_CURRENT_ZONE
,
_
(
"Remove Filled Areas in Zone"
),
fill_zone_xpm
);
}
ADD_MENUITEM
(
zones_menu
,
ID_POPUP_PCB_MOVE_ZONE_OUTLINES
,
ADD_MENUITEM
(
zones_menu
,
ID_POPUP_PCB_MOVE_ZONE_OUTLINES
,
_
(
"Move Zone"
),
move_xpm
);
_
(
"Move Zone"
),
move_xpm
);
...
...
pcbnew/plothpgl.cpp
View file @
f723c540
...
@@ -693,13 +693,13 @@ void trace_1_pad_TRAPEZE_HPGL( wxPoint padpos, wxSize size, wxSize delta,
...
@@ -693,13 +693,13 @@ void trace_1_pad_TRAPEZE_HPGL( wxPoint padpos, wxSize size, wxSize delta,
/* Calcul du demi angle d'inclinaison des cotes du trapeze */
/* Calcul du demi angle d'inclinaison des cotes du trapeze */
if
(
delta
.
y
)
/* Trapeze horizontal */
if
(
delta
.
y
)
/* Trapeze horizontal */
{
{
fangle
=
atan2
(
(
float
)
(
polygone
[
1
].
y
-
polygone
[
0
].
y
),
fangle
=
atan2
(
(
double
)
(
polygone
[
1
].
y
-
polygone
[
0
].
y
),
(
float
)
(
polygone
[
1
].
x
-
polygone
[
0
].
x
)
)
/
2
;
(
double
)
(
polygone
[
1
].
x
-
polygone
[
0
].
x
)
)
/
2
;
}
}
else
else
{
{
fangle
=
atan2
(
(
float
)
(
polygone
[
3
].
y
-
polygone
[
0
].
y
),
fangle
=
atan2
(
(
double
)
(
polygone
[
3
].
y
-
polygone
[
0
].
y
),
(
float
)
(
polygone
[
3
].
x
-
polygone
[
0
].
x
)
)
/
2
;
(
double
)
(
polygone
[
3
].
x
-
polygone
[
0
].
x
)
)
/
2
;
}
}
/* Trace du contour */
/* Trace du contour */
...
@@ -871,7 +871,7 @@ void trace_1_segment_HPGL( int pos_X0, int pos_Y0, int pos_X1, int pos_Y1,
...
@@ -871,7 +871,7 @@ void trace_1_segment_HPGL( int pos_X0, int pos_Y0, int pos_X1, int pos_Y1,
}
}
else
else
{
{
alpha
=
atan2
(
(
float
)
size
.
y
,
(
float
)
size
.
x
);
alpha
=
atan2
(
(
double
)
size
.
y
,
(
double
)
size
.
x
);
sin_alpha
=
sin
(
alpha
);
sin_alpha
=
sin
(
alpha
);
cos_alpha
=
cos
(
alpha
);
cos_alpha
=
cos
(
alpha
);
}
}
...
...
pcbnew/ratsnest.cpp
View file @
f723c540
...
@@ -28,7 +28,7 @@ static bool DisplayRastnestInProgress; // Enable the display of the ratsnes
...
@@ -28,7 +28,7 @@ static bool DisplayRastnestInProgress; // Enable the display of the ratsnes
* Building the general ratsnest:
* Building the general ratsnest:
* I used the "lee algoritm".
* I used the "lee algoritm".
* This is a 2 steps algoritm.
* This is a 2 steps algoritm.
* the m_logical_connexion member of pads handle a "block number" or a "cluster number"
* the m_logical_connexion member of pads handle a "block number" or a "cluster number"
or a "subnet number"
* initially, m_logical_connexion = 0 (pad not connected).
* initially, m_logical_connexion = 0 (pad not connected).
* Build_Board_Ratsnest( wxDC* DC ) Create this rastnest
* Build_Board_Ratsnest( wxDC* DC ) Create this rastnest
* for each net:
* for each net:
...
@@ -39,7 +39,7 @@ static bool DisplayRastnestInProgress; // Enable the display of the ratsnes
...
@@ -39,7 +39,7 @@ static bool DisplayRastnestInProgress; // Enable the display of the ratsnes
* link these 2 pads (i.e. create a ratsnest item)
* link these 2 pads (i.e. create a ratsnest item)
* the pads are grouped in a logical block ( a cluster).
* the pads are grouped in a logical block ( a cluster).
* until no pad without link found.
* until no pad without link found.
* Each logical block has a number called block number,
* Each logical block has a number called block number
or "subnet number"
,
* stored in m_logical_connexion member for each pad of the block.
* stored in m_logical_connexion member for each pad of the block.
* The first block has its block number = 1, the second is 2 ...
* The first block has its block number = 1, the second is 2 ...
* the function to do thas is gen_rats_pad_to_pad()
* the function to do thas is gen_rats_pad_to_pad()
...
@@ -1155,8 +1155,8 @@ char* WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
...
@@ -1155,8 +1155,8 @@ char* WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
tri_par_net
);
tri_par_net
);
/* Compute the internal ratsnet:
/* Compute the internal ratsnet:
* this is the same as general ratsnest, but considers onl
uy tje curra
nt footprint pads
* this is the same as general ratsnest, but considers onl
y the curre
nt footprint pads
* it is therefore not time consumming, and it is made onlu
once
* it is therefore not time consuming, and it is made only
once
*/
*/
local_liste_chevelu
=
(
CHEVELU
*
)
pt_liste_pad
;
// buffer chevelu a la suite de la liste des pads
local_liste_chevelu
=
(
CHEVELU
*
)
pt_liste_pad
;
// buffer chevelu a la suite de la liste des pads
nb_local_chevelu
=
0
;
nb_local_chevelu
=
0
;
...
@@ -1282,7 +1282,7 @@ calcul_chevelu_ext:
...
@@ -1282,7 +1282,7 @@ calcul_chevelu_ext:
local_chevelu
++
;
local_chevelu
++
;
}
}
/* return the new
t
free memory buffer address, in the general buffer */
/* return the new free memory buffer address, in the general buffer */
adr_max
=
MAX
(
adr_max
,
(
char
*
)
(
local_chevelu
+
1
)
);
adr_max
=
MAX
(
adr_max
,
(
char
*
)
(
local_chevelu
+
1
)
);
return
(
char
*
)
(
local_chevelu
+
1
);
/* the struct pointed by local_chevelu is used
return
(
char
*
)
(
local_chevelu
+
1
);
/* the struct pointed by local_chevelu is used
...
...
pcbnew/zones_polygons_insulated_copper_islands.cpp
View file @
f723c540
...
@@ -28,10 +28,10 @@ using namespace std;
...
@@ -28,10 +28,10 @@ using namespace std;
#include "zones.h"
#include "zones.h"
static
void
CalculateSubAreaBoundaryBox
(
EDA_Rect
&
aBbox
,
static
void
CalculateSubAreaBoundaryBox
(
EDA_Rect
&
aBbox
,
std
::
vector
<
CPolyPt
>
aPolysList
,
std
::
vector
<
CPolyPt
>
aPolysList
,
int
aIndexStart
,
int
aIndexStart
,
int
aIndexEnd
);
int
aIndexEnd
);
/* Local variables */
/* Local variables */
std
::
vector
<
wxPoint
>
s_ListPoints
;
// list of coordinates of pads and vias on this layer and on this net.
std
::
vector
<
wxPoint
>
s_ListPoints
;
// list of coordinates of pads and vias on this layer and on this net.
...
@@ -116,10 +116,20 @@ void ZONE_CONTAINER::Test_For_Copper_Island_And_Remove_Insulated_Islands( BOARD*
...
@@ -116,10 +116,20 @@ void ZONE_CONTAINER::Test_For_Copper_Island_And_Remove_Insulated_Islands( BOARD*
}
}
void
CalculateSubAreaBoundaryBox
(
EDA_Rect
&
aBbox
,
/******************************************************************/
void
CalculateSubAreaBoundaryBox
(
EDA_Rect
&
aBbox
,
std
::
vector
<
CPolyPt
>
aPolysList
,
std
::
vector
<
CPolyPt
>
aPolysList
,
int
aIndexStart
,
int
aIndexStart
,
int
aIndexEnd
)
int
aIndexEnd
)
/******************************************************************/
/** function CalculateSubAreaBoundaryBox
* Calculates the bounding box of a polygon stored in a vector <CPolyPt>
* @param aBbox = EDA_Rect to init as bounding box
* @param aPolysList = set of CPolyPt that are the corners of one or more polygons
* @param aIndexStart = index of the first corner of a polygon in aPolysList
* @param aIndexEnd = index of the last corner of a polygon in aPolysList
*/
{
{
CPolyPt
start_point
,
end_point
;
CPolyPt
start_point
,
end_point
;
...
...
polygon/PolyLine.cpp
View file @
f723c540
...
@@ -1535,8 +1535,8 @@ void CPolyLine::AppendArc( int xi, int yi, int xf, int yf, int xc, int yc, int n
...
@@ -1535,8 +1535,8 @@ void CPolyLine::AppendArc( int xi, int yi, int xf, int yf, int xc, int yc, int n
double
r
=
sqrt
(
(
double
)
(
xi
-
xc
)
*
(
xi
-
xc
)
+
(
double
)
(
yi
-
yc
)
*
(
yi
-
yc
)
);
double
r
=
sqrt
(
(
double
)
(
xi
-
xc
)
*
(
xi
-
xc
)
+
(
double
)
(
yi
-
yc
)
*
(
yi
-
yc
)
);
// get angles of start and finish
// get angles of start and finish
double
th_i
=
atan2
(
(
double
)
yi
-
yc
,
(
double
)
xi
-
xc
);
double
th_i
=
atan2
(
(
double
)
(
yi
-
yc
),
(
double
)
(
xi
-
xc
)
);
double
th_f
=
atan2
(
(
double
)
yf
-
yc
,
(
double
)
xf
-
xc
);
double
th_f
=
atan2
(
(
double
)
(
yf
-
yc
),
(
double
)
(
xf
-
xc
)
);
double
th_d
=
(
th_f
-
th_i
)
/
(
num
-
1
);
double
th_d
=
(
th_f
-
th_i
)
/
(
num
-
1
);
double
theta
=
th_i
;
double
theta
=
th_i
;
...
...
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