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
Show 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 )
* de piste soit horizontal dans le nouveau repere */
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
;
RotatePoint
(
&
cXrot
,
&
cYrot
,
angle
);
/* Rotation du point a tester */
...
...
@@ -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)
*/
{
float
fpx
,
fpy
;
double
fpx
,
fpy
;
int
tmp
;
while
(
angle
<
0
)
...
...
eeschema/cleanup.cpp
View file @
f723c540
...
...
@@ -256,9 +256,10 @@ static int TstAlignSegment( EDA_DrawLineStruct* RefSegm,
}
else
{
if
(
atan2
(
RefSegm
->
m_Start
.
x
-
RefSegm
->
m_End
.
x
,
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
)
)
if
(
atan2
(
(
double
)(
RefSegm
->
m_Start
.
x
-
RefSegm
->
m_End
.
x
),
(
double
)(
RefSegm
->
m_Start
.
y
-
RefSegm
->
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
;
return
1
;
...
...
eeschema/locate.cpp
View file @
f723c540
...
...
@@ -834,7 +834,7 @@ LibEDA_BaseStruct* LocateDrawItem( SCH_SCREEN* Screen,
break
;
dx
=
px
-
Arc
->
m_Pos
.
x
;
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
)
return
DrawItem
;
}
...
...
@@ -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 */
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
;
RotatePoint
(
&
cXrot
,
&
cYrot
,
angle
);
/* Rotation du point a tester */
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 )
case
COMPONENT_CIRCLE_DRAW_TYPE
:
dx
=
(
(
LibDrawCircle
*
)
CurrentDrawItem
)
->
m_Pos
.
x
-
mx
;
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
;
break
;
...
...
@@ -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 */
dx
=
ArcEndX
-
ArcStartX
;
dy
=
ArcEndY
-
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 */
/* -> dx = longueur, dy = 0 */
RotatePoint
(
&
cX
,
&
cY
,
angle
);
...
...
@@ -759,14 +759,14 @@ static void ComputeArc( LibDrawArc* DrawItem, wxPoint ArcCentre )
dx
=
ArcStartX
-
DrawItem
->
m_Pos
.
x
;
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
;
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
.
y
=
ArcStartY
;
...
...
gerbview/locate.cpp
View file @
f723c540
...
...
@@ -436,7 +436,7 @@ int distance( int seuil )
* de piste soit horizontal dans le nouveau repere */
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
;
RotatePoint
(
&
cXrot
,
&
cYrot
,
angle
);
/* Rotation du point a tester */
RotatePoint
(
&
segX
,
&
segY
,
angle
);
/* Rotation du segment */
...
...
include/id.h
View file @
f723c540
...
...
@@ -570,8 +570,8 @@ enum main_id {
ID_POPUP_PCB_PLACE_ZONE_OUTLINES
,
ID_POPUP_PCB_DRAG_ZONE_OUTLINE_SEGMENT
,
ID_POPUP_PCB_PLACE_DRAGGED_ZONE_OUTLINE_SEGMENT
,
ID_POPUP_PCB_REMOVE_FILLED_AREAS
,
ID_POPUP_
ZONE_UNUSED4
,
ID_POPUP_PCB_REMOVE_FILLED_AREAS
_IN_ALL_ZONES
,
ID_POPUP_
PCB_REMOVE_FILLED_AREAS_IN_CURRENT_ZONE
,
ID_POPUP_PCB_DELETE_MARKER
,
ID_POPUP_PCB_DELETE_COTATION
,
...
...
include/macros.h
View file @
f723c540
...
...
@@ -49,7 +49,7 @@
/* 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: */
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 ""
msgstr ""
"Project-Id-Version: kicad\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-10-2
6 17:23
+0100\n"
"PO-Revision-Date: 2008-10-2
6 17:24
+0100\n"
"POT-Creation-Date: 2008-10-2
7 13:41
+0100\n"
"PO-Revision-Date: 2008-10-2
7 13:42
+0100\n"
"Last-Translator: \n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n"
...
...
@@ -347,7 +347,7 @@ msgstr "dimension"
#: pcbnew/class_marker.cpp:133
#: pcbnew/class_text_mod.cpp:503
#: pcbnew/class_track.cpp:853
#: pcbnew/class_zone.cpp:7
75
#: pcbnew/class_zone.cpp:7
89
msgid "Type"
msgstr "Type"
...
...
@@ -370,7 +370,7 @@ msgstr "Segment"
#: pcbnew/class_pcb_text.cpp:190
#: pcbnew/class_text_mod.cpp:516
#: pcbnew/class_track.cpp:910
#: pcbnew/class_zone.cpp:8
09
#: pcbnew/class_zone.cpp:8
23
msgid "Layer"
msgstr "Couche"
...
...
@@ -571,12 +571,12 @@ msgid "Display"
msgstr "Affichage"
#: pcbnew/class_track.cpp:869
#: pcbnew/class_zone.cpp:
797
#: pcbnew/class_zone.cpp:
811
msgid "NetName"
msgstr "NetName"
#: pcbnew/class_track.cpp:874
#: pcbnew/class_zone.cpp:8
05
#: pcbnew/class_zone.cpp:8
19
msgid "NetCode"
msgstr "NetCode"
...
...
@@ -588,27 +588,27 @@ msgstr "Standard"
msgid "Diam"
msgstr "Diam"
#: pcbnew/class_zone.cpp:8
00
#: pcbnew/class_zone.cpp:8
14
msgid "Non Copper Zone"
msgstr "Zone non Cuivre"
#: pcbnew/class_zone.cpp:8
13
#: pcbnew/class_zone.cpp:8
27
msgid "Corners"
msgstr "Sommets"
#: pcbnew/class_zone.cpp:8
19
#: pcbnew/class_zone.cpp:8
33
msgid "No Grid"
msgstr "Pas de Grille"
#: pcbnew/class_zone.cpp:8
20
#: pcbnew/class_zone.cpp:8
34
msgid "Fill Grid"
msgstr "Grille de Remplissage"
#: pcbnew/class_zone.cpp:8
25
#: pcbnew/class_zone.cpp:8
39
msgid "Hatch lines"
msgstr "Lignes de Hachure"
#: pcbnew/class_zone.cpp:8
31
#: pcbnew/class_zone.cpp:8
45
msgid "Corners in DrawList"
msgstr "Sommets en Liste de dessin"
...
...
@@ -1822,8 +1822,8 @@ msgid "Fill or Refill All Zones"
msgstr "Remplir ou Re-remplir Toutes les Zones"
#: pcbnew/onrightclick.cpp:345
msgid "Remove
filled area
s"
msgstr "Supp
imer zones rempli
es"
msgid "Remove
Filled Areas in All Zone
s"
msgstr "Supp
rimer le Remplissage de toutes les Zon
es"
#: pcbnew/onrightclick.cpp:350
#: pcbnew/onrightclick.cpp:359
...
...
@@ -2113,94 +2113,98 @@ msgstr "Addition d'une Zone Interdite"
msgid "Fill 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"
msgstr "Déplace Zone"
#: pcbnew/onrightclick.cpp:68
1
#: pcbnew/onrightclick.cpp:68
7
msgid "Edit Zone Params"
msgstr "Editer Paramètres de la Zone"
#: pcbnew/onrightclick.cpp:6
86
#: pcbnew/onrightclick.cpp:6
92
msgid "Delete Cutout"
msgstr "Supprimer Zone Interdite"
#: pcbnew/onrightclick.cpp:6
89
#: pcbnew/onrightclick.cpp:6
95
msgid "Delete Zone Outline"
msgstr "Supprimer Contour de Zone"
#: pcbnew/onrightclick.cpp:71
1
#: pcbnew/onrightclick.cpp:7
56
#: pcbnew/onrightclick.cpp:
794
#: pcbnew/onrightclick.cpp:86
0
#: pcbnew/onrightclick.cpp:71
7
#: pcbnew/onrightclick.cpp:7
62
#: pcbnew/onrightclick.cpp:
800
#: pcbnew/onrightclick.cpp:86
6
msgid "Move"
msgstr "Move"
#: pcbnew/onrightclick.cpp:7
14
#: pcbnew/onrightclick.cpp:
796
#: pcbnew/onrightclick.cpp:7
20
#: pcbnew/onrightclick.cpp:
802
msgid "Drag"
msgstr "Drag"
#: pcbnew/onrightclick.cpp:7
18
#: pcbnew/onrightclick.cpp:7
24
msgid "Rotate +"
msgstr "Rotation +"
#: pcbnew/onrightclick.cpp:72
2
#: pcbnew/onrightclick.cpp:72
8
msgid "Rotate -"
msgstr "Rotation -"
#: pcbnew/onrightclick.cpp:72
3
#: pcbnew/onrightclick.cpp:72
9
msgid "Flip"
msgstr "Change côté"
#: pcbnew/onrightclick.cpp:7
27
#: pcbnew/onrightclick.cpp:76
1
#: pcbnew/onrightclick.cpp:8
65
#: pcbnew/onrightclick.cpp:7
33
#: pcbnew/onrightclick.cpp:76
7
#: pcbnew/onrightclick.cpp:8
71
msgid "Edit"
msgstr "Editer"
#: pcbnew/onrightclick.cpp:73
3
#: pcbnew/onrightclick.cpp:73
9
msgid "Delete Module"
msgstr "Supprimer Module"
#: pcbnew/onrightclick.cpp:7
59
#: pcbnew/onrightclick.cpp:86
3
#: pcbnew/onrightclick.cpp:7
65
#: pcbnew/onrightclick.cpp:86
9
msgid "Rotate"
msgstr "Rotation"
#: pcbnew/onrightclick.cpp:
798
#: pcbnew/onrightclick.cpp:
804
msgid "Edit Pad"
msgstr "Edit Pad"
#: pcbnew/onrightclick.cpp:80
2
#: pcbnew/onrightclick.cpp:80
8
msgid "New Pad Settings"
msgstr "Nouvelles Caract. Pads"
#: pcbnew/onrightclick.cpp:80
3
#: pcbnew/onrightclick.cpp:80
9
msgid "Copy current pad settings to this pad"
msgstr "Copier les réglages courants pour ce pad"
#: pcbnew/onrightclick.cpp:8
06
#: pcbnew/onrightclick.cpp:8
12
msgid "Export Pad Settings"
msgstr "Exporte Caract. Pads"
#: pcbnew/onrightclick.cpp:8
07
#: pcbnew/onrightclick.cpp:8
13
msgid "Copy this pad settings to current pad settings"
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"
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)"
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"
msgstr "Autoroute Pad"
#: pcbnew/onrightclick.cpp:8
28
#: pcbnew/onrightclick.cpp:8
34
msgid "Autoroute Net"
msgstr "Autoroute Net"
...
...
@@ -2436,56 +2440,56 @@ msgstr "Erreur système sur écriture fichier \"%s\""
msgid "Error writing to STRINGFORMATTER"
msgstr "Error writing to STRINGFORMATTER"
#: pcbnew/edit.cpp:18
0
#: pcbnew/edit.cpp:18
1
#: pcbnew/editmod.cpp:45
msgid "Module Editor"
msgstr "Ouvrir Editeur de modules"
#: pcbnew/edit.cpp:26
0
#: pcbnew/edit.cpp:26
1
msgid "Add Tracks"
msgstr "Addition de Pistes"
#: pcbnew/edit.cpp:2
69
#: pcbnew/edit.cpp:2
70
msgid "Add Zones"
msgstr "Addition de Zones"
#: pcbnew/edit.cpp:27
1
#: pcbnew/edit.cpp:27
2
msgid "Warning: Display Zone is OFF!!!"
msgstr "Attention: Affichage zones désactivé !!!"
#: pcbnew/edit.cpp:27
7
#: pcbnew/edit.cpp:27
8
msgid "Add Layer Alignment Target"
msgstr "Ajouter Mire de superposition"
#: pcbnew/edit.cpp:28
1
#: pcbnew/edit.cpp:28
2
msgid "Adjust Zero"
msgstr "Ajuster Zéro"
#: pcbnew/edit.cpp:28
7
#: pcbnew/edit.cpp:28
8
msgid "Add Graphic"
msgstr "Addition éléments graphiques"
#: pcbnew/edit.cpp:29
1
#: pcbnew/edit.cpp:29
2
msgid "Add Text"
msgstr "Ajout de Texte"
#: pcbnew/edit.cpp:29
5
#: pcbnew/edit.cpp:29
6
msgid "Add Modules"
msgstr "Addition de Modules"
#: pcbnew/edit.cpp:
299
#: pcbnew/edit.cpp:
300
msgid "Add Dimension"
msgstr "Ajout de cotes"
#: pcbnew/edit.cpp:30
7
#: pcbnew/edit.cpp:30
8
msgid "Net Highlight"
msgstr "Surbrillance des équipotentielles"
#: pcbnew/edit.cpp:31
1
#: pcbnew/edit.cpp:31
2
msgid "Local Ratsnest"
msgstr "Montrer le chevelu général"
#: pcbnew/edit.cpp:5
6
9
#: pcbnew/edit.cpp:5
7
9
msgid "Delete item"
msgstr "Suppression d'éléments"
...
...
@@ -9869,7 +9873,7 @@ msgstr "Hollandais"
msgid "Language"
msgstr "Langage"
#: 3d-viewer/3d_aux.cpp:20
7
#: 3d-viewer/3d_aux.cpp:20
6
msgid "Vertex "
msgstr "Vertex "
...
...
pcbnew/class_module.cpp
View file @
f723c540
...
...
@@ -1060,7 +1060,8 @@ void MODULE::Display_Infos( WinEDA_DrawFrame* frame )
pos
+=
6
;
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
"
);
strcpy
(
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;
/* Flags :*/
enum
Mod_Attribut
/* Attributs
d'un module
*/
enum
Mod_Attribut
/* Attributs
used for modules
*/
{
MOD_DEFAULT
=
0
,
/* Type default */
MOD_CMS
=
1
,
/*
Pour module apparaissant dans les
*
fichiers de placement automatique (principalement modules CMS
*/
MOD_VIRTUAL
=
2
/*
Module virtuel constitue par un dessin sur circuit
* (
connecteur, trou de percage
..) */
MOD_CMS
=
1
,
/*
Set for modules listed in the automatic insertion list
*
(usually SMD footprints)
*/
MOD_VIRTUAL
=
2
/*
Virtuel component: when created by copper shapes on board
* (
Like edge card connectors, mounting hole.
..) */
};
...
...
@@ -41,34 +41,33 @@ public:
wxPoint
m_Pos
;
// Real coord on board
D_PAD
*
m_Pads
;
/* Pad 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
*/
TEXTE_MODULE
*
m_Reference
;
//
texte reference du composant
(U34, R18..)
TEXTE_MODULE
*
m_Value
;
//
texte valeur du composant
(74LS00, 22K..)
wxString
m_LibRef
;
/*
nom du module en librairie
*/
Struct3D_Master
*
m_3D_Drawings
;
/*
First item of the 3D shapes (linked list)
*/
TEXTE_MODULE
*
m_Reference
;
//
Component reference
(U34, R18..)
TEXTE_MODULE
*
m_Value
;
//
Component value
(74LS00, 22K..)
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
* identify the footprint ( after a full reannotation of the schematic */
int
m_Attributs
;
/* Flags
bits a bit ( voir enum
Mod_Attribut ) */
int
m_Orient
;
/* orientation
en 1/10 degr
es */
int
m_Attributs
;
/* Flags
(ORed bits) ( see
Mod_Attribut ) */
int
m_Orient
;
/* orientation
in 0.1 degre
es */
int
flag
;
/* flag utilise en trace rastnest et routage auto */
int
m_ModuleStatus
;
/* For autoplace: flags (LOCKED, AUTOPLACED) */
EDA_Rect
m_BoundaryBox
;
/* position/taille du cadre de reperage (coord locales)*/
EDA_Rect
m_RealBoundaryBox
;
/* position/taille du module (coord relles) */
int
m_PadNum
;
// Nombre total de pads
int
m_AltPadNum
;
// en placement auto Nombre de pads actifs pour
// les calculs
int
m_CntRot90
;
// Placement auto: cout ( 0..10 ) de la rotation 90 degre
int
m_CntRot180
;
// Placement auto: cout ( 0..10 ) de la rotation 180 degre
wxSize
m_Ext
;
// marges de "garde": utilise en placement auto.
float
m_Surface
;
// surface du rectangle d'encadrement
unsigned
long
m_Link
;
// variable temporaire ( pour editions, ...)
EDA_Rect
m_BoundaryBox
;
/* Bounding box coordinates relatives to the anchor, orient 0*/
EDA_Rect
m_RealBoundaryBox
;
/* Bounding box : coordinates on board, real orientation */
int
m_PadNum
;
// Pad count
int
m_AltPadNum
;
// Pad with netcode > 0 (active pads)count
int
m_CntRot90
;
// Automatic placement : cost ( 0..10 ) for 90 degrees rotaion (Horiz<->Vertical)
int
m_CntRot180
;
// Automatic placement : cost ( 0..10 ) for 180 degrees rotaion (UP <->Down)
wxSize
m_Ext
;
// Automatic placement margin around the module
float
m_Surface
;
// Bounding box area
unsigned
long
m_Link
;
// Temporary variable ( used in editions, ...)
long
m_LastEdit_Time
;
// Date de la derniere modification du module (gestion de librairies)
wxString
m_Path
;
wxString
m_Doc
;
//
Texte de description du module
wxString
m_KeyWord
;
//
Liste des mots cles relatifs au module
wxString
m_Doc
;
//
Module Description (info for users)
wxString
m_KeyWord
;
//
Keywords to select the module in lib
public
:
MODULE
(
BOARD
*
parent
);
...
...
@@ -79,11 +78,17 @@ public:
MODULE
*
Next
()
{
return
(
MODULE
*
)
Pnext
;
}
void
Set_Rectangle_Encadrement
();
/* mise a jour du rect d'encadrement
* en coord locales (orient 0 et origine = pos module) */
/** Function Set_Rectangle_Encadrement()
* Calculates the bounding box
* for orient 0 et origin = module anchor)
*/
void
Set_Rectangle_Encadrement
();
void
SetRectangleExinscrit
();
/* mise a jour du rect d'encadrement
* et de la surface en coord reelles */
/** function SetRectangleExinscrit()
* 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
* returns the bounding box of this Footprint
...
...
@@ -103,11 +108,11 @@ public:
}
//
deplacement
s
//
Move
s
void
SetPosition
(
const
wxPoint
&
newpos
);
void
SetOrientation
(
int
newangle
);
/*
supprime du chainage la structure Struc
t */
/*
Remove this from the linked lis
t */
void
UnLink
();
...
...
@@ -151,7 +156,7 @@ public:
/**
* 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.
* this is also the footprint name
* @return bool - true if success reading else false.
...
...
pcbnew/class_pad.h
View file @
f723c540
...
...
@@ -61,10 +61,10 @@ public:
int
m_Orient
;
// in 1/10 degrees
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
// handle
block
number in track connection
// handle
physical subnet (block)
number in track connection
protected
:
int
m_ZoneSubnet
;
// variable used in rastnest computations
// handle block number in zone connection
...
...
pcbnew/class_zone.cpp
View file @
f723c540
...
...
@@ -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
)
/*******************************************/
...
...
pcbnew/class_zone.h
View file @
f723c540
...
...
@@ -53,13 +53,10 @@ public:
bool
Save
(
FILE
*
aFile
)
const
;
int
ReadDescr
(
FILE
*
aFile
,
int
*
aLineNum
=
NULL
);
wxPoint
&
GetPosition
()
{
static
wxPoint
pos
;
return
pos
;
}
/** virtual function GetPosition
* @return a wxPoint, position of the first point of the outline
*/
wxPoint
&
GetPosition
();
void
UnLink
(
void
)
{
...
...
pcbnew/connect.cpp
View file @
f723c540
...
...
@@ -267,9 +267,9 @@ void WinEDA_BasePcbFrame::test_connexions( wxDC* DC )
/***************************************************/
/** 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.
* 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
* @param DC = current Device Context
*/
...
...
@@ -443,18 +443,18 @@ static void calcule_connexite_1_net( TRACK* pt_start_conn, TRACK* pt_end_conn )
#define POS_AFF_CHREF 62
/******************************************************************************/
static
D_PAD
*
SuperFast_Locate_Pad_Connecte
(
BOARD
*
p
cb
,
LISTE_PAD
*
pt_liste
,
int
px
,
int
py
,
int
masque_layer
)
static
D_PAD
*
SuperFast_Locate_Pad_Connecte
(
BOARD
*
aP
cb
,
LISTE_PAD
*
pt_liste
,
const
wxPoint
&
posref
,
int
masque_layer
)
/******************************************************************************/
/** Function SuperFast_Locate_Pad_Connecte
* 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
* @param px = reference X coordinate
* @param py = reference Y coordinate
* @param masque_layer = Layers (bit to bit) to consider
* @param aPcb = the board.
* @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
* @param posref = reference coordinate
* @param masque_layer = Layers (bit to bit) to consider
* @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(),
* 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,
{
D_PAD
*
pad
;
LISTE_PAD
*
ptr_pad
,
*
lim
;
int
nb_pad
=
p
cb
->
m_NbPads
;
int
nb_pad
=
aP
cb
->
m_NbPads
;
int
ii
;
lim
=
pt_liste
+
(
p
cb
->
m_NbPads
-
1
);
lim
=
pt_liste
+
(
aP
cb
->
m_NbPads
-
1
);
ptr_pad
=
pt_liste
;
while
(
nb_pad
)
{
...
...
@@ -478,14 +478,14 @@ static D_PAD* SuperFast_Locate_Pad_Connecte( BOARD* pcb, LISTE_PAD* pt_liste,
if
(
(
ii
&
1
)
&&
(
ii
>
1
)
)
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
;
if
(
ptr_pad
>
lim
)
ptr_pad
=
lim
;
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
;
if
(
ptr_pad
<
pt_liste
)
...
...
@@ -493,13 +493,13 @@ static D_PAD* SuperFast_Locate_Pad_Connecte( BOARD* pcb, LISTE_PAD* pt_liste,
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 */
while
(
ptr_pad
>=
pt_liste
)
{
pad
=
*
ptr_pad
;
if
(
pad
->
m_Pos
.
x
==
px
)
if
(
pad
->
m_Pos
.
x
==
p
osref
.
x
)
ptr_pad
--
;
else
break
;
...
...
@@ -513,10 +513,10 @@ static D_PAD* SuperFast_Locate_Pad_Connecte( BOARD* pcb, LISTE_PAD* pt_liste,
return
NULL
;
/* outside suitable block */
pad
=
*
ptr_pad
;
if
(
pad
->
m_Pos
.
x
!=
px
)
if
(
pad
->
m_Pos
.
x
!=
p
osref
.
x
)
return
NULL
;
/* outside suitable block */
if
(
pad
->
m_Pos
.
y
!=
py
)
if
(
pad
->
m_Pos
.
y
!=
p
osref
.
y
)
continue
;
/* A Pad if found here: but it must mach the layer */
...
...
@@ -615,8 +615,7 @@ void WinEDA_BasePcbFrame::reattribution_reference_piste( int affiche )
/* Search for a pad on the segment starting point */
pt_piste
->
start
=
SuperFast_Locate_Pad_Connecte
(
m_Pcb
,
&
sortedPads
[
0
],
pt_piste
->
m_Start
.
x
,
pt_piste
->
m_Start
.
y
,
pt_piste
->
m_Start
,
masque_layer
);
if
(
pt_piste
->
start
!=
NULL
)
{
...
...
@@ -627,8 +626,7 @@ void WinEDA_BasePcbFrame::reattribution_reference_piste( int affiche )
/* Search for a pad on the segment ending point */
pt_piste
->
end
=
SuperFast_Locate_Pad_Connecte
(
m_Pcb
,
&
sortedPads
[
0
],
pt_piste
->
m_End
.
x
,
pt_piste
->
m_End
.
y
,
pt_piste
->
m_End
,
masque_layer
);
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
/* Calcul de la direction de deplacement
* ( 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
;
deltay
=
pos
.
y
-
Cotation
->
TraitD_oy
;
...
...
@@ -405,10 +405,10 @@ static void Ajuste_Details_Cotation( COTATION* Cotation )
deltay
=
Cotation
->
TraitD_oy
-
Cotation
->
TraitG_oy
;
/* 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
)
angle
=
atan2
(
(
float
)
deltay
,
(
float
)
deltax
);
angle
=
atan2
(
(
double
)
deltay
,
(
double
)
deltax
);
else
angle
=
0.0
;
...
...
pcbnew/edit.cpp
View file @
f723c540
...
...
@@ -68,7 +68,8 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_PCB_STOP_CURRENT_EDGE_ZONE
:
case
ID_POPUP_PCB_DELETE_ZONE_LAST_CREATED_CORNER
:
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_OUTLINES
:
case
ID_POPUP_PCB_EDIT_ZONE_PARAMS
:
...
...
@@ -544,7 +545,16 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
Fill_All_Zones
(
&
dc
);
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
)
{
m_Pcb
->
m_Zone
->
DeleteStructList
();
...
...
pcbnew/graphpcb.cpp
View file @
f723c540
...
...
@@ -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
;
cx
=
(
ux0
+
ux1
)
/
2
;
cy
=
(
uy0
+
uy1
)
/
2
;
rayon
=
(
int
)
sqrt
(
(
float
)
(
cx
-
ux0
)
*
(
cx
-
ux0
)
+
(
float
)
(
cy
-
uy0
)
*
(
cy
-
uy0
)
);
rayon
=
(
int
)
sqrt
(
(
double
)
(
cx
-
ux0
)
*
(
cx
-
ux0
)
+
(
double
)
(
cy
-
uy0
)
*
(
cy
-
uy0
)
);
/* Calcul des coord limites des cellules appartenant au rectangle */
row_max
=
(
cy
+
rayon
)
/
g_GridRoutingSize
;
...
...
@@ -719,7 +719,7 @@ void DrawSegmentQcq( int ux0, int uy0, int ux1, int uy1, int lg, int layer,
dx
=
ux1
-
ux0
;
dy
=
uy1
-
uy0
;
if
(
dx
)
angle
=
(
int
)
(
atan2
(
dy
,
dx
)
*
1800
/
M_PI
);
angle
=
(
int
)
(
atan2
(
(
double
)
dy
,
(
double
)
dx
)
*
1800
/
M_PI
);
else
{
angle
=
900
;
if
(
dy
<
0
)
...
...
pcbnew/onrightclick.cpp
View file @
f723c540
...
...
@@ -341,8 +341,8 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
aPopMenu
->
AppendSeparator
();
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_FILL_ALL_ZONES
,
_
(
"Fill or Refill All Zones"
),
fill_zone_xpm
);
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_REMOVE_FILLED_AREAS
,
_
(
"Remove
filled area
s"
),
fill_zone_xpm
);
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_REMOVE_FILLED_AREAS
_IN_ALL_ZONES
,
_
(
"Remove
Filled Areas in All Zone
s"
),
fill_zone_xpm
);
aPopMenu
->
AppendSeparator
();
}
...
...
@@ -674,6 +674,12 @@ void WinEDA_PcbFrame::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu
ADD_MENUITEM
(
zones_menu
,
ID_POPUP_PCB_FILL_ZONE
,
_
(
"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
,
_
(
"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,
/* Calcul du demi angle d'inclinaison des cotes du trapeze */
if
(
delta
.
y
)
/* Trapeze horizontal */
{
fangle
=
atan2
(
(
float
)
(
polygone
[
1
].
y
-
polygone
[
0
].
y
),
(
float
)
(
polygone
[
1
].
x
-
polygone
[
0
].
x
)
)
/
2
;
fangle
=
atan2
(
(
double
)
(
polygone
[
1
].
y
-
polygone
[
0
].
y
),
(
double
)
(
polygone
[
1
].
x
-
polygone
[
0
].
x
)
)
/
2
;
}
else
{
fangle
=
atan2
(
(
float
)
(
polygone
[
3
].
y
-
polygone
[
0
].
y
),
(
float
)
(
polygone
[
3
].
x
-
polygone
[
0
].
x
)
)
/
2
;
fangle
=
atan2
(
(
double
)
(
polygone
[
3
].
y
-
polygone
[
0
].
y
),
(
double
)
(
polygone
[
3
].
x
-
polygone
[
0
].
x
)
)
/
2
;
}
/* Trace du contour */
...
...
@@ -871,7 +871,7 @@ void trace_1_segment_HPGL( int pos_X0, int pos_Y0, int pos_X1, int pos_Y1,
}
else
{
alpha
=
atan2
(
(
float
)
size
.
y
,
(
float
)
size
.
x
);
alpha
=
atan2
(
(
double
)
size
.
y
,
(
double
)
size
.
x
);
sin_alpha
=
sin
(
alpha
);
cos_alpha
=
cos
(
alpha
);
}
...
...
pcbnew/ratsnest.cpp
View file @
f723c540
...
...
@@ -28,7 +28,7 @@ static bool DisplayRastnestInProgress; // Enable the display of the ratsnes
* Building the general ratsnest:
* I used the "lee 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).
* Build_Board_Ratsnest( wxDC* DC ) Create this rastnest
* for each net:
...
...
@@ -39,7 +39,7 @@ static bool DisplayRastnestInProgress; // Enable the display of the ratsnes
* link these 2 pads (i.e. create a ratsnest item)
* the pads are grouped in a logical block ( a cluster).
* 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.
* The first block has its block number = 1, the second is 2 ...
* 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 )
tri_par_net
);
/* Compute the internal ratsnet:
* this is the same as general ratsnest, but considers onl
uy tje curra
nt footprint pads
* it is therefore not time consumming, and it is made onlu
once
* this is the same as general ratsnest, but considers onl
y the curre
nt footprint pads
* 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
nb_local_chevelu
=
0
;
...
...
@@ -1282,7 +1282,7 @@ calcul_chevelu_ext:
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
)
);
return
(
char
*
)
(
local_chevelu
+
1
);
/* the struct pointed by local_chevelu is used
...
...
pcbnew/zones_polygons_insulated_copper_islands.cpp
View file @
f723c540
...
...
@@ -116,10 +116,20 @@ void ZONE_CONTAINER::Test_For_Copper_Island_And_Remove_Insulated_Islands( BOARD*
}
/******************************************************************/
void
CalculateSubAreaBoundaryBox
(
EDA_Rect
&
aBbox
,
std
::
vector
<
CPolyPt
>
aPolysList
,
int
aIndexStart
,
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
;
...
...
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
double
r
=
sqrt
(
(
double
)
(
xi
-
xc
)
*
(
xi
-
xc
)
+
(
double
)
(
yi
-
yc
)
*
(
yi
-
yc
)
);
// get angles of start and finish
double
th_i
=
atan2
(
(
double
)
yi
-
yc
,
(
double
)
xi
-
xc
);
double
th_f
=
atan2
(
(
double
)
yf
-
yc
,
(
double
)
xf
-
xc
);
double
th_i
=
atan2
(
(
double
)
(
yi
-
yc
),
(
double
)
(
xi
-
xc
)
);
double
th_f
=
atan2
(
(
double
)
(
yf
-
yc
),
(
double
)
(
xf
-
xc
)
);
double
th_d
=
(
th_f
-
th_i
)
/
(
num
-
1
);
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