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
9ed0d8cd
Commit
9ed0d8cd
authored
May 05, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some key variables to English
parent
6ccee86a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
67 deletions
+85
-67
plot_rtn.cpp
pcbnew/plot_rtn.cpp
+85
-67
No files found.
pcbnew/plot_rtn.cpp
View file @
9ed0d8cd
...
@@ -98,8 +98,10 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -98,8 +98,10 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
if
(
!
Plot_Pads_All_Layers
)
if
(
!
Plot_Pads_All_Layers
)
continue
;
continue
;
}
}
shape_pos
=
pt_pad
->
ReturnShapePos
();
shape_pos
=
pt_pad
->
ReturnShapePos
();
pos
=
shape_pos
;
size
=
pt_pad
->
m_Size
;
pos
=
shape_pos
;
size
=
pt_pad
->
m_Size
;
switch
(
pt_pad
->
m_PadShape
&
0x7F
)
switch
(
pt_pad
->
m_PadShape
&
0x7F
)
{
{
...
@@ -202,7 +204,8 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
...
@@ -202,7 +204,8 @@ void WinEDA_BasePcbFrame::Plot_Serigraphie( int format_plot,
}
/* Fin Sequence de trace des Pads */
}
/* Fin Sequence de trace des Pads */
/* Trace Textes MODULES */
/* Trace Textes MODULES */
nb_items
=
0
;
Affiche_1_Parametre
(
this
,
64
,
wxT
(
"TxtMod"
),
wxEmptyString
,
LIGHTBLUE
);
nb_items
=
0
;
Affiche_1_Parametre
(
this
,
64
,
wxT
(
"TxtMod"
),
wxEmptyString
,
LIGHTBLUE
);
for
(
MODULE
*
Module
=
m_Pcb
->
m_Modules
;
Module
;
Module
=
Module
->
Next
()
)
for
(
MODULE
*
Module
=
m_Pcb
->
m_Modules
;
Module
;
Module
=
Module
->
Next
()
)
{
{
...
@@ -311,7 +314,7 @@ static void PlotTextModule( TEXTE_MODULE* pt_texte )
...
@@ -311,7 +314,7 @@ static void PlotTextModule( TEXTE_MODULE* pt_texte )
{
{
wxSize
size
;
wxSize
size
;
wxPoint
pos
;
wxPoint
pos
;
int
orient
,
epaisseur
,
no_miroir
;
int
orient
,
thickness
,
no_miroir
;
/* calcul des parametres du texte :*/
/* calcul des parametres du texte :*/
size
=
pt_texte
->
m_Size
;
size
=
pt_texte
->
m_Size
;
...
@@ -320,15 +323,15 @@ static void PlotTextModule( TEXTE_MODULE* pt_texte )
...
@@ -320,15 +323,15 @@ static void PlotTextModule( TEXTE_MODULE* pt_texte )
orient
=
pt_texte
->
GetDrawRotation
();
orient
=
pt_texte
->
GetDrawRotation
();
no_miroir
=
pt_texte
->
m_Miroir
&
1
;
no_miroir
=
pt_texte
->
m_Miroir
&
1
;
epaisseur
=
pt_texte
->
m_Width
;
thickness
=
pt_texte
->
m_Width
;
if
(
Plot_Mode
==
FILAIRE
)
if
(
Plot_Mode
==
FILAIRE
)
epaisseur
=
g_PlotLine_Width
;
thickness
=
g_PlotLine_Width
;
if
(
no_miroir
==
0
)
if
(
no_miroir
==
0
)
size
.
x
=
-
size
.
x
;
// Text is mirrored
size
.
x
=
-
size
.
x
;
// Text is mirrored
Plot_1_texte
(
format_plot
,
pt_texte
->
m_Text
,
Plot_1_texte
(
format_plot
,
pt_texte
->
m_Text
,
orient
,
epaisseur
,
orient
,
thickness
,
pos
.
x
,
pos
.
y
,
size
.
x
,
size
.
y
);
pos
.
x
,
pos
.
y
,
size
.
x
,
size
.
y
);
}
}
...
@@ -388,7 +391,7 @@ void PlotMirePcb( MIREPCB* Mire, int format_plot, int masque_layer )
...
@@ -388,7 +391,7 @@ void PlotMirePcb( MIREPCB* Mire, int format_plot, int masque_layer )
/*****************************************************************/
/*****************************************************************/
{
{
DRAWSEGMENT
*
DrawTmp
;
DRAWSEGMENT
*
DrawTmp
;
int
dx1
,
dx2
,
dy1
,
dy2
,
ra
yon
;
int
dx1
,
dx2
,
dy1
,
dy2
,
ra
dius
;
if
(
(
g_TabOneLayerMask
[
Mire
->
GetLayer
()]
&
masque_layer
)
==
0
)
if
(
(
g_TabOneLayerMask
[
Mire
->
GetLayer
()]
&
masque_layer
)
==
0
)
return
;
return
;
...
@@ -408,12 +411,14 @@ void PlotMirePcb( MIREPCB* Mire, int format_plot, int masque_layer )
...
@@ -408,12 +411,14 @@ void PlotMirePcb( MIREPCB* Mire, int format_plot, int masque_layer )
DrawTmp
->
m_Shape
=
S_SEGMENT
;
DrawTmp
->
m_Shape
=
S_SEGMENT
;
/* Trace des 2 traits */
/* Trace des 2 traits */
ra
yon
=
Mire
->
m_Size
/
2
;
ra
dius
=
Mire
->
m_Size
/
2
;
dx1
=
ra
yon
,
dy1
=
0
;
dx2
=
0
,
dy2
=
rayon
;
dx1
=
ra
dius
,
dy1
=
0
;
dx2
=
0
,
dy2
=
radius
;
if
(
Mire
->
m_Shape
)
/* Forme X */
if
(
Mire
->
m_Shape
)
/* Forme X */
{
{
dx1
=
dy1
=
(
rayon
*
7
)
/
5
;
dx2
=
dx1
;
dy2
=
-
dy1
;
dx1
=
dy1
=
(
radius
*
7
)
/
5
;
dx2
=
dx1
;
dy2
=
-
dy1
;
}
}
DrawTmp
->
m_Start
.
x
=
Mire
->
m_Pos
.
x
-
dx1
;
DrawTmp
->
m_Start
.
y
=
Mire
->
m_Pos
.
y
-
dy1
;
DrawTmp
->
m_Start
.
x
=
Mire
->
m_Pos
.
x
-
dx1
;
DrawTmp
->
m_Start
.
y
=
Mire
->
m_Pos
.
y
-
dy1
;
...
@@ -465,17 +470,17 @@ void Plot_1_EdgeModule( int format_plot, EDGE_MODULE* PtEdge )
...
@@ -465,17 +470,17 @@ void Plot_1_EdgeModule( int format_plot, EDGE_MODULE* PtEdge )
/* Trace les contours des modules */
/* Trace les contours des modules */
{
{
int
type_trace
;
/* forme a tracer (segment, cercle) */
int
type_trace
;
/* forme a tracer (segment, cercle) */
int
epaisseur
;
/* epaisseur
des segments */
int
thickness
;
/* thickness
des segments */
int
ra
yon
;
/* rayon
des cercles a tracer */
int
ra
dius
;
/* radius
des cercles a tracer */
int
StAngle
,
EndAngle
;
int
StAngle
,
EndAngle
;
wxPoint
pos
,
end
;
/* Coord des segments a tracer */
wxPoint
pos
,
end
;
/* Coord des segments a tracer */
if
(
PtEdge
->
Type
()
!=
TYPEEDGEMODULE
)
if
(
PtEdge
->
Type
()
!=
TYPEEDGEMODULE
)
return
;
return
;
type_trace
=
PtEdge
->
m_Shape
;
type_trace
=
PtEdge
->
m_Shape
;
epaisseur
=
PtEdge
->
m_Width
;
thickness
=
PtEdge
->
m_Width
;
if
(
Plot_Mode
==
FILAIRE
)
if
(
Plot_Mode
==
FILAIRE
)
epaisseur
=
g_PlotLine_Width
;
thickness
=
g_PlotLine_Width
;
pos
=
PtEdge
->
m_Start
;
pos
=
PtEdge
->
m_Start
;
end
=
PtEdge
->
m_End
;
end
=
PtEdge
->
m_End
;
...
@@ -488,32 +493,32 @@ void Plot_1_EdgeModule( int format_plot, EDGE_MODULE* PtEdge )
...
@@ -488,32 +493,32 @@ void Plot_1_EdgeModule( int format_plot, EDGE_MODULE* PtEdge )
switch
(
format_plot
)
switch
(
format_plot
)
{
{
case
PLOT_FORMAT_GERBER
:
case
PLOT_FORMAT_GERBER
:
PlotGERBERLine
(
pos
,
end
,
epaisseur
);
PlotGERBERLine
(
pos
,
end
,
thickness
);
break
;
break
;
case
PLOT_FORMAT_HPGL
:
case
PLOT_FORMAT_HPGL
:
trace_1_segment_HPGL
(
pos
.
x
,
pos
.
y
,
end
.
x
,
end
.
y
,
epaisseur
);
trace_1_segment_HPGL
(
pos
.
x
,
pos
.
y
,
end
.
x
,
end
.
y
,
thickness
);
break
;
break
;
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST
:
PlotFilledSegmentPS
(
pos
,
end
,
epaisseur
);
PlotFilledSegmentPS
(
pos
,
end
,
thickness
);
break
;
break
;
}
}
break
;
/* Fin trace segment simple */
break
;
/* Fin trace segment simple */
case
S_CIRCLE
:
case
S_CIRCLE
:
ra
yon
=
(
int
)
hypot
(
(
double
)
(
end
.
x
-
pos
.
x
),
(
double
)
(
end
.
y
-
pos
.
y
)
);
ra
dius
=
(
int
)
hypot
(
(
double
)
(
end
.
x
-
pos
.
x
),
(
double
)
(
end
.
y
-
pos
.
y
)
);
PlotCircle
(
format_plot
,
epaisseur
,
pos
,
rayon
);
PlotCircle
(
format_plot
,
thickness
,
pos
,
radius
);
break
;
break
;
case
S_ARC
:
case
S_ARC
:
ra
yon
=
(
int
)
hypot
(
(
double
)
(
end
.
x
-
pos
.
x
),
(
double
)
(
end
.
y
-
pos
.
y
)
);
ra
dius
=
(
int
)
hypot
(
(
double
)
(
end
.
x
-
pos
.
x
),
(
double
)
(
end
.
y
-
pos
.
y
)
);
StAngle
=
ArcTangente
(
end
.
y
-
pos
.
y
,
end
.
x
-
pos
.
x
);
StAngle
=
ArcTangente
(
end
.
y
-
pos
.
y
,
end
.
x
-
pos
.
x
);
EndAngle
=
StAngle
+
PtEdge
->
m_Angle
;
EndAngle
=
StAngle
+
PtEdge
->
m_Angle
;
if
(
StAngle
>
EndAngle
)
if
(
StAngle
>
EndAngle
)
EXCHG
(
StAngle
,
EndAngle
);
EXCHG
(
StAngle
,
EndAngle
);
PlotArc
(
format_plot
,
pos
,
StAngle
,
EndAngle
,
ra
yon
,
epaisseur
);
PlotArc
(
format_plot
,
pos
,
StAngle
,
EndAngle
,
ra
dius
,
thickness
);
break
;
break
;
case
S_POLYGON
:
case
S_POLYGON
:
...
@@ -528,17 +533,21 @@ void Plot_1_EdgeModule( int format_plot, EDGE_MODULE* PtEdge )
...
@@ -528,17 +533,21 @@ void Plot_1_EdgeModule( int format_plot, EDGE_MODULE* PtEdge )
source
=
PtEdge
->
m_PolyList
;
source
=
PtEdge
->
m_PolyList
;
for
(
ii
=
0
;
ii
<
PtEdge
->
m_PolyCount
;
ii
++
)
for
(
ii
=
0
;
ii
<
PtEdge
->
m_PolyCount
;
ii
++
)
{
{
int
x
,
y
;
int
x
=
*
source
++
;
x
=
*
source
;
source
++
;
y
=
*
source
;
source
++
;
int
y
=
*
source
++
;
if
(
Module
)
if
(
Module
)
{
{
RotatePoint
(
&
x
,
&
y
,
Module
->
m_Orient
);
RotatePoint
(
&
x
,
&
y
,
Module
->
m_Orient
);
x
+=
Module
->
m_Pos
.
x
;
x
+=
Module
->
m_Pos
.
x
;
y
+=
Module
->
m_Pos
.
y
;
y
+=
Module
->
m_Pos
.
y
;
}
}
x
+=
PtEdge
->
m_Start0
.
x
;
x
+=
PtEdge
->
m_Start0
.
x
;
y
+=
PtEdge
->
m_Start0
.
y
;
y
+=
PtEdge
->
m_Start0
.
y
;
*
ptr
=
x
;
ptr
++
;
*
ptr
=
y
;
ptr
++
;
*
ptr
++
=
x
;
*
ptr
++
=
y
;
}
}
PlotPolygon
(
format_plot
,
TRUE
,
PtEdge
->
m_PolyCount
,
ptr_base
);
PlotPolygon
(
format_plot
,
TRUE
,
PtEdge
->
m_PolyCount
,
ptr_base
);
...
@@ -554,7 +563,7 @@ void PlotTextePcb( TEXTE_PCB* pt_texte, int format_plot, int masque_layer )
...
@@ -554,7 +563,7 @@ void PlotTextePcb( TEXTE_PCB* pt_texte, int format_plot, int masque_layer )
/****************************************************************************/
/****************************************************************************/
/* Trace 1 Texte type PCB , c.a.d autre que les textes sur modules */
/* Trace 1 Texte type PCB , c.a.d autre que les textes sur modules */
{
{
int
no_miroir
,
orient
,
epaisseur
;
int
no_miroir
,
orient
,
thickness
;
wxPoint
pos
;
wxPoint
pos
;
wxSize
size
;
wxSize
size
;
...
@@ -568,19 +577,19 @@ void PlotTextePcb( TEXTE_PCB* pt_texte, int format_plot, int masque_layer )
...
@@ -568,19 +577,19 @@ void PlotTextePcb( TEXTE_PCB* pt_texte, int format_plot, int masque_layer )
pos
=
pt_texte
->
m_Pos
;
pos
=
pt_texte
->
m_Pos
;
orient
=
pt_texte
->
m_Orient
;
orient
=
pt_texte
->
m_Orient
;
no_miroir
=
pt_texte
->
m_Miroir
&
1
;
no_miroir
=
pt_texte
->
m_Miroir
&
1
;
epaisseur
=
pt_texte
->
m_Width
;
thickness
=
pt_texte
->
m_Width
;
if
(
no_miroir
==
FALSE
)
if
(
no_miroir
==
FALSE
)
size
.
x
=
-
size
.
x
;
size
.
x
=
-
size
.
x
;
Plot_1_texte
(
format_plot
,
pt_texte
->
m_Text
,
orient
,
Plot_1_texte
(
format_plot
,
pt_texte
->
m_Text
,
orient
,
epaisseur
,
pos
.
x
,
pos
.
y
,
size
.
x
,
size
.
y
);
thickness
,
pos
.
x
,
pos
.
y
,
size
.
x
,
size
.
y
);
}
}
/**********************************************************************/
/**********************************************************************/
void
Plot_1_texte
(
int
format_plot
,
const
wxString
&
Text
,
int
angle
,
void
Plot_1_texte
(
int
format_plot
,
const
wxString
&
Text
,
int
angle
,
int
epaisseur
,
int
cX
,
int
cY
,
int
size_h
,
int
size_v
,
int
thickness
,
int
cX
,
int
cY
,
int
size_h
,
int
size_v
,
bool
centreX
,
bool
centreY
)
bool
centreX
,
bool
centreY
)
/***********************************************************************/
/***********************************************************************/
...
@@ -600,7 +609,7 @@ void Plot_1_texte( int format_plot, const wxString& Text, int angle,
...
@@ -600,7 +609,7 @@ void Plot_1_texte( int format_plot, const wxString& Text, int angle,
int
sx
,
sy
;
/* coord du debut du caractere courant */
int
sx
,
sy
;
/* coord du debut du caractere courant */
int
nbcodes
=
Text
.
Len
();
int
nbcodes
=
Text
.
Len
();
espacement
=
(
(
10
*
size_h
)
/
9
)
+
(
(
size_h
>=
0
)
?
epaisseur
:
-
epaisseur
);
espacement
=
(
(
10
*
size_h
)
/
9
)
+
(
(
size_h
>=
0
)
?
thickness
:
-
thickness
);
/* calcul de la position du debut du texte */
/* calcul de la position du debut du texte */
if
(
centreX
)
if
(
centreX
)
...
@@ -657,15 +666,15 @@ void Plot_1_texte( int format_plot, const wxString& Text, int angle,
...
@@ -657,15 +666,15 @@ void Plot_1_texte( int format_plot, const wxString& Text, int angle,
switch
(
format_plot
)
switch
(
format_plot
)
{
{
case
PLOT_FORMAT_GERBER
:
case
PLOT_FORMAT_GERBER
:
PlotGERBERLine
(
wxPoint
(
ox
,
oy
),
wxPoint
(
fx
,
fy
),
epaisseur
);
PlotGERBERLine
(
wxPoint
(
ox
,
oy
),
wxPoint
(
fx
,
fy
),
thickness
);
break
;
break
;
case
PLOT_FORMAT_HPGL
:
case
PLOT_FORMAT_HPGL
:
trace_1_segment_HPGL
(
ox
,
oy
,
fx
,
fy
,
epaisseur
);
trace_1_segment_HPGL
(
ox
,
oy
,
fx
,
fy
,
thickness
);
break
;
break
;
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST
:
PlotFilledSegmentPS
(
wxPoint
(
ox
,
oy
),
wxPoint
(
fx
,
fy
),
epaisseur
);
PlotFilledSegmentPS
(
wxPoint
(
ox
,
oy
),
wxPoint
(
fx
,
fy
),
thickness
);
break
;
break
;
}
}
}
}
...
@@ -705,26 +714,27 @@ void PlotDrawSegment( DRAWSEGMENT* pt_segm, int Format, int masque_layer )
...
@@ -705,26 +714,27 @@ void PlotDrawSegment( DRAWSEGMENT* pt_segm, int Format, int masque_layer )
*/
*/
{
{
wxPoint
start
,
end
;
wxPoint
start
,
end
;
int
epaisseur
;
int
thickness
;
int
ra
yon
=
0
,
StAngle
=
0
,
EndAngle
=
0
;
int
ra
dius
=
0
,
StAngle
=
0
,
EndAngle
=
0
;
if
(
(
g_TabOneLayerMask
[
pt_segm
->
GetLayer
()]
&
masque_layer
)
==
0
)
if
(
(
g_TabOneLayerMask
[
pt_segm
->
GetLayer
()]
&
masque_layer
)
==
0
)
return
;
return
;
epaisseur
=
pt_segm
->
m_Width
;
thickness
=
pt_segm
->
m_Width
;
if
(
Plot_Mode
==
FILAIRE
)
if
(
Plot_Mode
==
FILAIRE
)
epaisseur
=
g_PlotLine_Width
;
thickness
=
g_PlotLine_Width
;
start
=
pt_segm
->
m_Start
;
end
=
pt_segm
->
m_End
;
start
=
pt_segm
->
m_Start
;
end
=
pt_segm
->
m_End
;
if
(
pt_segm
->
m_Shape
==
S_CIRCLE
)
if
(
pt_segm
->
m_Shape
==
S_CIRCLE
)
{
{
ra
yon
=
(
int
)
hypot
(
(
double
)
(
end
.
x
-
start
.
x
),
(
double
)
(
end
.
y
-
start
.
y
)
);
ra
dius
=
(
int
)
hypot
(
(
double
)
(
end
.
x
-
start
.
x
),
(
double
)
(
end
.
y
-
start
.
y
)
);
}
}
if
(
pt_segm
->
m_Shape
==
S_ARC
)
if
(
pt_segm
->
m_Shape
==
S_ARC
)
{
{
ra
yon
=
(
int
)
hypot
(
(
double
)
(
end
.
x
-
start
.
x
),
(
double
)
(
end
.
y
-
start
.
y
)
);
ra
dius
=
(
int
)
hypot
(
(
double
)
(
end
.
x
-
start
.
x
),
(
double
)
(
end
.
y
-
start
.
y
)
);
StAngle
=
ArcTangente
(
end
.
y
-
start
.
y
,
end
.
x
-
start
.
x
);
StAngle
=
ArcTangente
(
end
.
y
-
start
.
y
,
end
.
x
-
start
.
x
);
EndAngle
=
StAngle
+
pt_segm
->
m_Angle
;
EndAngle
=
StAngle
+
pt_segm
->
m_Angle
;
if
(
StAngle
>
EndAngle
)
if
(
StAngle
>
EndAngle
)
...
@@ -735,53 +745,53 @@ void PlotDrawSegment( DRAWSEGMENT* pt_segm, int Format, int masque_layer )
...
@@ -735,53 +745,53 @@ void PlotDrawSegment( DRAWSEGMENT* pt_segm, int Format, int masque_layer )
{
{
case
PLOT_FORMAT_GERBER
:
case
PLOT_FORMAT_GERBER
:
if
(
pt_segm
->
m_Shape
==
S_CIRCLE
)
if
(
pt_segm
->
m_Shape
==
S_CIRCLE
)
PlotCircle
(
PLOT_FORMAT_GERBER
,
epaisseur
,
start
,
rayon
);
PlotCircle
(
PLOT_FORMAT_GERBER
,
thickness
,
start
,
radius
);
else
if
(
pt_segm
->
m_Shape
==
S_ARC
)
else
if
(
pt_segm
->
m_Shape
==
S_ARC
)
PlotArc
(
PLOT_FORMAT_GERBER
,
start
,
PlotArc
(
PLOT_FORMAT_GERBER
,
start
,
StAngle
,
EndAngle
,
ra
yon
,
epaisseur
);
StAngle
,
EndAngle
,
ra
dius
,
thickness
);
else
else
PlotGERBERLine
(
start
,
end
,
epaisseur
);
PlotGERBERLine
(
start
,
end
,
thickness
);
break
;
break
;
case
PLOT_FORMAT_HPGL
:
case
PLOT_FORMAT_HPGL
:
if
(
pt_segm
->
m_Shape
==
S_CIRCLE
)
if
(
pt_segm
->
m_Shape
==
S_CIRCLE
)
PlotCircle
(
PLOT_FORMAT_HPGL
,
epaisseur
,
start
,
rayon
);
PlotCircle
(
PLOT_FORMAT_HPGL
,
thickness
,
start
,
radius
);
else
if
(
pt_segm
->
m_Shape
==
S_ARC
)
else
if
(
pt_segm
->
m_Shape
==
S_ARC
)
PlotArc
(
PLOT_FORMAT_HPGL
,
start
,
StAngle
,
EndAngle
,
ra
yon
,
epaisseur
);
PlotArc
(
PLOT_FORMAT_HPGL
,
start
,
StAngle
,
EndAngle
,
ra
dius
,
thickness
);
else
else
trace_1_segment_HPGL
(
start
.
x
,
start
.
y
,
end
.
x
,
end
.
y
,
epaisseur
);
trace_1_segment_HPGL
(
start
.
x
,
start
.
y
,
end
.
x
,
end
.
y
,
thickness
);
break
;
break
;
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST
:
if
(
pt_segm
->
m_Shape
==
S_CIRCLE
)
if
(
pt_segm
->
m_Shape
==
S_CIRCLE
)
PlotCircle
(
PLOT_FORMAT_POST
,
epaisseur
,
start
,
rayon
);
PlotCircle
(
PLOT_FORMAT_POST
,
thickness
,
start
,
radius
);
else
if
(
pt_segm
->
m_Shape
==
S_ARC
)
else
if
(
pt_segm
->
m_Shape
==
S_ARC
)
PlotArc
(
PLOT_FORMAT_POST
,
start
,
PlotArc
(
PLOT_FORMAT_POST
,
start
,
StAngle
,
EndAngle
,
ra
yon
,
epaisseur
);
StAngle
,
EndAngle
,
ra
dius
,
thickness
);
else
else
PlotFilledSegmentPS
(
start
,
end
,
epaisseur
);
PlotFilledSegmentPS
(
start
,
end
,
thickness
);
break
;
break
;
}
}
}
}
/*****************************************************************************/
/*****************************************************************************/
void
PlotCircle
(
int
format_plot
,
int
epaisseur
,
wxPoint
centre
,
int
rayon
)
void
PlotCircle
(
int
format_plot
,
int
thickness
,
wxPoint
centre
,
int
radius
)
/*****************************************************************************/
/*****************************************************************************/
/* routine de trace de 1 cercle de centre cx, cy */
/* routine de trace de 1 cercle de centre cx, cy */
{
{
switch
(
format_plot
)
switch
(
format_plot
)
{
{
case
PLOT_FORMAT_GERBER
:
case
PLOT_FORMAT_GERBER
:
PlotCircle_GERBER
(
centre
,
ra
yon
,
epaisseur
);
PlotCircle_GERBER
(
centre
,
ra
dius
,
thickness
);
break
;
break
;
case
PLOT_FORMAT_HPGL
:
case
PLOT_FORMAT_HPGL
:
trace_1_pastille_RONDE_HPGL
(
centre
,
ra
yon
*
2
,
FILAIRE
);
trace_1_pastille_RONDE_HPGL
(
centre
,
ra
dius
*
2
,
FILAIRE
);
break
;
break
;
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST
:
PlotCircle_PS
(
centre
,
ra
yon
*
2
,
epaisseur
);
PlotCircle_PS
(
centre
,
ra
dius
*
2
,
thickness
);
break
;
break
;
}
}
}
}
...
@@ -811,7 +821,7 @@ void PlotPolygon( int format_plot, bool Filled, int nbpoints, int* coord )
...
@@ -811,7 +821,7 @@ void PlotPolygon( int format_plot, bool Filled, int nbpoints, int* coord )
/************************************************************************/
/************************************************************************/
void
PlotArc
(
int
format_plot
,
wxPoint
centre
,
int
start_angle
,
int
end_angle
,
void
PlotArc
(
int
format_plot
,
wxPoint
centre
,
int
start_angle
,
int
end_angle
,
int
ra
yon
,
int
epaisseur
)
int
ra
dius
,
int
thickness
)
/************************************************************************/
/************************************************************************/
/* Polt 1 arc
/* Polt 1 arc
...
@@ -820,14 +830,14 @@ void PlotArc( int format_plot, wxPoint centre, int start_angle, int end_angle,
...
@@ -820,14 +830,14 @@ void PlotArc( int format_plot, wxPoint centre, int start_angle, int end_angle,
{
{
int
ii
;
int
ii
;
int
ox
,
oy
,
fx
,
fy
;
int
ox
,
oy
,
fx
,
fy
;
int
delta
;
/* increment (en 0.1 degres) angulaire pour trace de cercles */
int
delta
;
/* increment (en 0.1 degres) angulaire pour trace de cercles */
if
(
Plot_Mode
==
FILAIRE
)
if
(
Plot_Mode
==
FILAIRE
)
epaisseur
=
g_PlotLine_Width
;
thickness
=
g_PlotLine_Width
;
if
(
IsPostScript
(
format_plot
)
)
if
(
IsPostScript
(
format_plot
)
)
{
{
PlotArcPS
(
centre
,
start_angle
,
end_angle
,
ra
yon
,
epaisseur
);
PlotArcPS
(
centre
,
start_angle
,
end_angle
,
ra
dius
,
thickness
);
return
;
return
;
}
}
...
@@ -836,28 +846,33 @@ void PlotArc( int format_plot, wxPoint centre, int start_angle, int end_angle,
...
@@ -836,28 +846,33 @@ void PlotArc( int format_plot, wxPoint centre, int start_angle, int end_angle,
end_angle
=
-
end_angle
;
end_angle
=
-
end_angle
;
EXCHG
(
start_angle
,
end_angle
);
EXCHG
(
start_angle
,
end_angle
);
/* Correction pour petits cercles par rapport a l'
epaisseur
du trait */
/* Correction pour petits cercles par rapport a l'
thickness
du trait */
if
(
ra
yon
<
(
epaisseur
*
10
)
)
if
(
ra
dius
<
(
thickness
*
10
)
)
delta
=
225
;
/* 16 segm pour 360 deg */
delta
=
225
;
/* 16 segm pour 360 deg */
if
(
ra
yon
<
(
epaisseur
*
5
)
)
if
(
ra
dius
<
(
thickness
*
5
)
)
delta
=
300
;
/* 12 segm pour 360 deg */
delta
=
300
;
/* 12 segm pour 360 deg */
if
(
start_angle
>
end_angle
)
if
(
start_angle
>
end_angle
)
end_angle
+=
3600
;
end_angle
+=
3600
;
ox
=
rayon
;
oy
=
0
;
ox
=
radius
;
oy
=
0
;
RotatePoint
(
&
ox
,
&
oy
,
start_angle
);
RotatePoint
(
&
ox
,
&
oy
,
start_angle
);
delta
=
120
;
/* un cercle sera trace en 3600/delta = 30 segments / cercle*/
delta
=
120
;
/* un cercle sera trace en 3600/delta = 30 segments / cercle*/
for
(
ii
=
start_angle
+
delta
;
ii
<
end_angle
;
ii
+=
delta
)
for
(
ii
=
start_angle
+
delta
;
ii
<
end_angle
;
ii
+=
delta
)
{
{
fx
=
rayon
;
fy
=
0
;
fx
=
radius
;
fy
=
0
;
RotatePoint
(
&
fx
,
&
fy
,
ii
);
RotatePoint
(
&
fx
,
&
fy
,
ii
);
switch
(
format_plot
)
switch
(
format_plot
)
{
{
case
PLOT_FORMAT_GERBER
:
case
PLOT_FORMAT_GERBER
:
PlotGERBERLine
(
wxPoint
(
centre
.
x
+
ox
,
centre
.
y
+
oy
),
PlotGERBERLine
(
wxPoint
(
centre
.
x
+
ox
,
centre
.
y
+
oy
),
wxPoint
(
centre
.
x
+
fx
,
centre
.
y
+
fy
),
epaisseur
);
wxPoint
(
centre
.
x
+
fx
,
centre
.
y
+
fy
),
thickness
);
break
;
break
;
case
PLOT_FORMAT_HPGL
:
case
PLOT_FORMAT_HPGL
:
...
@@ -865,24 +880,27 @@ void PlotArc( int format_plot, wxPoint centre, int start_angle, int end_angle,
...
@@ -865,24 +880,27 @@ void PlotArc( int format_plot, wxPoint centre, int start_angle, int end_angle,
centre
.
y
+
oy
,
centre
.
y
+
oy
,
centre
.
x
+
fx
,
centre
.
x
+
fx
,
centre
.
y
+
fy
,
centre
.
y
+
fy
,
epaisseur
);
thickness
);
break
;
break
;
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST
:
break
;
break
;
}
}
ox
=
fx
;
oy
=
fy
;
ox
=
fx
;
oy
=
fy
;
}
}
fx
=
rayon
;
fy
=
0
;
fx
=
radius
;
fy
=
0
;
RotatePoint
(
&
fx
,
&
fy
,
end_angle
);
RotatePoint
(
&
fx
,
&
fy
,
end_angle
);
switch
(
format_plot
)
switch
(
format_plot
)
{
{
case
PLOT_FORMAT_GERBER
:
case
PLOT_FORMAT_GERBER
:
PlotGERBERLine
(
wxPoint
(
centre
.
x
+
ox
,
centre
.
y
+
oy
),
PlotGERBERLine
(
wxPoint
(
centre
.
x
+
ox
,
centre
.
y
+
oy
),
wxPoint
(
centre
.
x
+
fx
,
centre
.
y
+
fy
),
epaisseur
);
wxPoint
(
centre
.
x
+
fx
,
centre
.
y
+
fy
),
thickness
);
break
;
break
;
case
PLOT_FORMAT_HPGL
:
case
PLOT_FORMAT_HPGL
:
...
@@ -890,7 +908,7 @@ void PlotArc( int format_plot, wxPoint centre, int start_angle, int end_angle,
...
@@ -890,7 +908,7 @@ void PlotArc( int format_plot, wxPoint centre, int start_angle, int end_angle,
centre
.
y
+
oy
,
centre
.
y
+
oy
,
centre
.
x
+
fx
,
centre
.
x
+
fx
,
centre
.
y
+
fy
,
centre
.
y
+
fy
,
epaisseur
);
thickness
);
break
;
break
;
case
PLOT_FORMAT_POST
:
case
PLOT_FORMAT_POST
:
...
...
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