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
a9010796
Commit
a9010796
authored
Dec 29, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doxygen comment warning fixes.
parent
f6def3ea
Changes
73
Show whitespace changes
Inline
Side-by-side
Showing
73 changed files
with
439 additions
and
380 deletions
+439
-380
3d_draw.cpp
3d-viewer/3d_draw.cpp
+8
-8
3d_viewer.h
3d-viewer/3d_viewer.h
+2
-2
common_plotGERBER_functions.cpp
common/common_plotGERBER_functions.cpp
+3
-1
drawpanel.cpp
common/drawpanel.cpp
+10
-9
class_libentry.h
eeschema/class_libentry.h
+1
-1
dialog_erc_listbox.h
eeschema/dialog_erc_listbox.h
+3
-5
files-io.cpp
eeschema/files-io.cpp
+1
-1
lib_circle.cpp
eeschema/lib_circle.cpp
+1
-1
lib_circle.h
eeschema/lib_circle.h
+2
-2
lib_field.h
eeschema/lib_field.h
+1
-1
lib_pin.cpp
eeschema/lib_pin.cpp
+2
-2
lib_pin.h
eeschema/lib_pin.h
+1
-1
netform.cpp
eeschema/netform.cpp
+6
-0
netlist_control.cpp
eeschema/netlist_control.cpp
+1
-7
netlist_control.h
eeschema/netlist_control.h
+10
-0
transform.h
eeschema/transform.h
+1
-1
class_board_item.h
include/class_board_item.h
+2
-2
class_drawpanel.h
include/class_drawpanel.h
+2
-2
wxBasePcbFrame.h
include/wxBasePcbFrame.h
+40
-6
wxPcbStruct.h
include/wxPcbStruct.h
+14
-4
autoplac.cpp
pcbnew/autoplac.cpp
+2
-2
block.cpp
pcbnew/block.cpp
+4
-9
board_items_to_polygon_shape_transform.cpp
pcbnew/board_items_to_polygon_shape_transform.cpp
+1
-0
board_undo_redo.cpp
pcbnew/board_undo_redo.cpp
+3
-8
class_board.cpp
pcbnew/class_board.cpp
+6
-6
class_board.h
pcbnew/class_board.h
+10
-10
class_dimension.cpp
pcbnew/class_dimension.cpp
+22
-22
class_dimension.h
pcbnew/class_dimension.h
+2
-2
class_drawsegment.cpp
pcbnew/class_drawsegment.cpp
+7
-7
class_drawsegment.h
pcbnew/class_drawsegment.h
+6
-6
class_edge_mod.cpp
pcbnew/class_edge_mod.cpp
+8
-8
class_marker_pcb.cpp
pcbnew/class_marker_pcb.cpp
+2
-2
class_marker_pcb.h
pcbnew/class_marker_pcb.h
+3
-3
class_mire.cpp
pcbnew/class_mire.cpp
+3
-3
class_mire.h
pcbnew/class_mire.h
+3
-3
class_module.cpp
pcbnew/class_module.cpp
+11
-11
class_module.h
pcbnew/class_module.h
+13
-13
class_module_transform_functions.cpp
pcbnew/class_module_transform_functions.cpp
+3
-3
class_netclass.h
pcbnew/class_netclass.h
+3
-0
class_netinfo.h
pcbnew/class_netinfo.h
+1
-1
class_netinfo_item.cpp
pcbnew/class_netinfo_item.cpp
+1
-1
class_pad.cpp
pcbnew/class_pad.cpp
+4
-4
class_pad.h
pcbnew/class_pad.h
+11
-5
class_pad_draw_functions.cpp
pcbnew/class_pad_draw_functions.cpp
+2
-2
class_pcb_layer_widget.h
pcbnew/class_pcb_layer_widget.h
+2
-0
class_pcb_text.cpp
pcbnew/class_pcb_text.cpp
+3
-4
class_pcb_text.h
pcbnew/class_pcb_text.h
+3
-3
class_text_mod.cpp
pcbnew/class_text_mod.cpp
+5
-5
class_text_mod.h
pcbnew/class_text_mod.h
+7
-7
class_track.cpp
pcbnew/class_track.cpp
+14
-22
class_track.h
pcbnew/class_track.h
+7
-9
collectors.cpp
pcbnew/collectors.cpp
+2
-2
collectors.h
pcbnew/collectors.h
+3
-2
drc.cpp
pcbnew/drc.cpp
+4
-7
drc_stuff.h
pcbnew/drc_stuff.h
+3
-3
edgemod.cpp
pcbnew/edgemod.cpp
+3
-3
edit_track_width.cpp
pcbnew/edit_track_width.cpp
+14
-15
files.cpp
pcbnew/files.cpp
+6
-6
hotkeys_board_editor.cpp
pcbnew/hotkeys_board_editor.cpp
+1
-1
layer_widget.h
pcbnew/layer_widget.h
+15
-0
librairi.cpp
pcbnew/librairi.cpp
+14
-16
loadcmp.cpp
pcbnew/loadcmp.cpp
+2
-2
magnetic_tracks_functions.cpp
pcbnew/magnetic_tracks_functions.cpp
+5
-0
module_editor_frame.h
pcbnew/module_editor_frame.h
+17
-6
modules.cpp
pcbnew/modules.cpp
+17
-18
netlist.cpp
pcbnew/netlist.cpp
+4
-6
print_board_functions.cpp
pcbnew/print_board_functions.cpp
+2
-2
ratsnest.cpp
pcbnew/ratsnest.cpp
+36
-42
track.cpp
pcbnew/track.cpp
+1
-1
zones_by_polygon_fill_functions.cpp
pcbnew/zones_by_polygon_fill_functions.cpp
+2
-6
zones_convert_brd_items_to_polygons_with_Kbool.cpp
pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp
+2
-2
zones_functions_for_undo_redo.h
pcbnew/zones_functions_for_undo_redo.h
+2
-2
zones_test_and_combine_areas.cpp
pcbnew/zones_test_and_combine_areas.cpp
+1
-1
No files found.
3d-viewer/3d_draw.cpp
View file @
a9010796
...
@@ -386,12 +386,12 @@ void Pcb3D_GLCanvas::Draw3D_Track( TRACK* track )
...
@@ -386,12 +386,12 @@ void Pcb3D_GLCanvas::Draw3D_Track( TRACK* track )
/**
/**
* Function Draw3D_SolidPolygonsInZones
* Function Draw3D_SolidPolygonsInZones
* draw all solid polygons used as filles areas in a zone
* draw all solid polygons used as filles areas in a zone
* @param aZone
_c
= the zone to draw
* @param aZone = the zone to draw
*/
*/
void
Pcb3D_GLCanvas
::
Draw3D_SolidPolygonsInZones
(
ZONE_CONTAINER
*
zone_c
)
void
Pcb3D_GLCanvas
::
Draw3D_SolidPolygonsInZones
(
ZONE_CONTAINER
*
aZone
)
{
{
double
zpos
;
double
zpos
;
int
layer
=
zone_c
->
GetLayer
();
int
layer
=
aZone
->
GetLayer
();
if
(
g_Parm_3D_Visu
.
m_BoardSettings
->
IsLayerVisible
(
layer
)
==
false
)
if
(
g_Parm_3D_Visu
.
m_BoardSettings
->
IsLayerVisible
(
layer
)
==
false
)
return
;
return
;
...
@@ -420,7 +420,7 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c )
...
@@ -420,7 +420,7 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c )
// Draw solid areas contained in this zone
// Draw solid areas contained in this zone
int
StartContour
=
1
;
int
StartContour
=
1
;
for
(
unsigned
ii
=
0
;
ii
<
zone_c
->
m_FilledPolysList
.
size
();
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
aZone
->
m_FilledPolysList
.
size
();
ii
++
)
{
{
if
(
StartContour
==
1
)
if
(
StartContour
==
1
)
{
{
...
@@ -428,11 +428,11 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c )
...
@@ -428,11 +428,11 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c )
gluTessBeginContour
(
tess
);
gluTessBeginContour
(
tess
);
StartContour
=
0
;
StartContour
=
0
;
}
}
v_data
[
0
]
=
zone_c
->
m_FilledPolysList
[
ii
].
x
*
g_Parm_3D_Visu
.
m_BoardScale
;
v_data
[
0
]
=
aZone
->
m_FilledPolysList
[
ii
].
x
*
g_Parm_3D_Visu
.
m_BoardScale
;
v_data
[
1
]
=
-
zone_c
->
m_FilledPolysList
[
ii
].
y
*
g_Parm_3D_Visu
.
m_BoardScale
;
v_data
[
1
]
=
-
aZone
->
m_FilledPolysList
[
ii
].
y
*
g_Parm_3D_Visu
.
m_BoardScale
;
gluTessVertex
(
tess
,
v_data
,
&
zone_c
->
m_FilledPolysList
[
ii
]
);
gluTessVertex
(
tess
,
v_data
,
&
aZone
->
m_FilledPolysList
[
ii
]
);
if
(
zone_c
->
m_FilledPolysList
[
ii
].
end_contour
==
1
)
if
(
aZone
->
m_FilledPolysList
[
ii
].
end_contour
==
1
)
{
{
gluTessEndContour
(
tess
);
gluTessEndContour
(
tess
);
gluTessEndPolygon
(
tess
);
gluTessEndPolygon
(
tess
);
...
...
3d-viewer/3d_viewer.h
View file @
a9010796
...
@@ -173,9 +173,9 @@ public:
...
@@ -173,9 +173,9 @@ public:
/**
/**
* Function Draw3D_SolidPolygonsInZones
* Function Draw3D_SolidPolygonsInZones
* draw all solid polygons used as filles areas in a zone
* draw all solid polygons used as filles areas in a zone
* @param aZone
_c
= the zone to draw
* @param aZone = the zone to draw
*/
*/
void
Draw3D_SolidPolygonsInZones
(
ZONE_CONTAINER
*
aZone
_c
);
void
Draw3D_SolidPolygonsInZones
(
ZONE_CONTAINER
*
aZone
);
/**
/**
* Function Draw3D_Polygon
* Function Draw3D_Polygon
...
...
common/common_plotGERBER_functions.cpp
View file @
a9010796
...
@@ -267,9 +267,11 @@ void GERBER_PLOTTER::rect( wxPoint p1, wxPoint p2, FILL_T fill, int width )
...
@@ -267,9 +267,11 @@ void GERBER_PLOTTER::rect( wxPoint p1, wxPoint p2, FILL_T fill, int width )
* Plot one circle as segments (6 to 16 depending on its radius
* Plot one circle as segments (6 to 16 depending on its radius
* @param aCentre = center coordinates
* @param aCentre = center coordinates
* @param aDiameter = diameter of the circle
* @param aDiameter = diameter of the circle
* @param aFill = plot option (NO_FILL, FILLED_SHAPE, FILLED_WITH_BG_BODYCOLOR)
* not used here: circles are always not filled the gerber. Filled circles are flashed
* @param aWidth = line width
* @param aWidth = line width
*/
*/
void
GERBER_PLOTTER
::
circle
(
wxPoint
aCentre
,
int
aDiameter
,
FILL_T
f
ill
,
void
GERBER_PLOTTER
::
circle
(
wxPoint
aCentre
,
int
aDiameter
,
FILL_T
aF
ill
,
int
aWidth
)
int
aWidth
)
{
{
wxASSERT
(
output_file
);
wxASSERT
(
output_file
);
...
...
common/drawpanel.cpp
View file @
a9010796
...
@@ -944,9 +944,10 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC )
...
@@ -944,9 +944,10 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC )
* Function DrawAuxiliaryAxis
* Function DrawAuxiliaryAxis
* Draw the Auxiliary Axis, used in pcbnew which as origin coordinates
* Draw the Auxiliary Axis, used in pcbnew which as origin coordinates
* for gerber and excellon files
* for gerber and excellon files
* @param DC = current Device Context
* @param aDC = current Device Context
* @param aDrawMode = draw mode (GR_COPY, GR_OR ..)
*/
*/
void
WinEDA_DrawPanel
::
DrawAuxiliaryAxis
(
wxDC
*
DC
,
int
drawm
ode
)
void
WinEDA_DrawPanel
::
DrawAuxiliaryAxis
(
wxDC
*
aDC
,
int
aDrawM
ode
)
{
{
if
(
m_Parent
->
m_Auxiliary_Axis_Position
==
wxPoint
(
0
,
0
)
)
if
(
m_Parent
->
m_Auxiliary_Axis_Position
==
wxPoint
(
0
,
0
)
)
return
;
return
;
...
@@ -954,10 +955,10 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode )
...
@@ -954,10 +955,10 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode )
int
Color
=
DARKRED
;
int
Color
=
DARKRED
;
BASE_SCREEN
*
screen
=
GetScreen
();
BASE_SCREEN
*
screen
=
GetScreen
();
GRSetDrawMode
(
DC
,
drawm
ode
);
GRSetDrawMode
(
aDC
,
aDrawM
ode
);
/* Draw the Y axis */
/* Draw the Y axis */
GRDashedLine
(
&
m_ClipBox
,
DC
,
GRDashedLine
(
&
m_ClipBox
,
a
DC
,
m_Parent
->
m_Auxiliary_Axis_Position
.
x
,
m_Parent
->
m_Auxiliary_Axis_Position
.
x
,
-
screen
->
ReturnPageSize
().
y
,
-
screen
->
ReturnPageSize
().
y
,
m_Parent
->
m_Auxiliary_Axis_Position
.
x
,
m_Parent
->
m_Auxiliary_Axis_Position
.
x
,
...
@@ -965,7 +966,7 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode )
...
@@ -965,7 +966,7 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode )
0
,
Color
);
0
,
Color
);
/* Draw the X axis */
/* Draw the X axis */
GRDashedLine
(
&
m_ClipBox
,
DC
,
GRDashedLine
(
&
m_ClipBox
,
a
DC
,
-
screen
->
ReturnPageSize
().
x
,
-
screen
->
ReturnPageSize
().
x
,
m_Parent
->
m_Auxiliary_Axis_Position
.
y
,
m_Parent
->
m_Auxiliary_Axis_Position
.
y
,
screen
->
ReturnPageSize
().
x
,
screen
->
ReturnPageSize
().
x
,
...
@@ -974,7 +975,7 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode )
...
@@ -974,7 +975,7 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode )
}
}
/********************************************************************/
/********************************************************************/
void
WinEDA_DrawPanel
::
DrawGridAxis
(
wxDC
*
DC
,
int
drawm
ode
)
void
WinEDA_DrawPanel
::
DrawGridAxis
(
wxDC
*
aDC
,
int
aDrawM
ode
)
/********************************************************************/
/********************************************************************/
{
{
BASE_SCREEN
*
screen
=
GetScreen
();
BASE_SCREEN
*
screen
=
GetScreen
();
...
@@ -985,10 +986,10 @@ void WinEDA_DrawPanel::DrawGridAxis( wxDC* DC, int drawmode )
...
@@ -985,10 +986,10 @@ void WinEDA_DrawPanel::DrawGridAxis( wxDC* DC, int drawmode )
int
Color
=
m_Parent
->
GetGridColor
();
int
Color
=
m_Parent
->
GetGridColor
();
GRSetDrawMode
(
DC
,
drawm
ode
);
GRSetDrawMode
(
aDC
,
aDrawM
ode
);
/* Draw the Y axis */
/* Draw the Y axis */
GRDashedLine
(
&
m_ClipBox
,
DC
,
GRDashedLine
(
&
m_ClipBox
,
a
DC
,
screen
->
m_GridOrigin
.
x
,
screen
->
m_GridOrigin
.
x
,
-
screen
->
ReturnPageSize
().
y
,
-
screen
->
ReturnPageSize
().
y
,
screen
->
m_GridOrigin
.
x
,
screen
->
m_GridOrigin
.
x
,
...
@@ -996,7 +997,7 @@ void WinEDA_DrawPanel::DrawGridAxis( wxDC* DC, int drawmode )
...
@@ -996,7 +997,7 @@ void WinEDA_DrawPanel::DrawGridAxis( wxDC* DC, int drawmode )
0
,
Color
);
0
,
Color
);
/* Draw the X axis */
/* Draw the X axis */
GRDashedLine
(
&
m_ClipBox
,
DC
,
GRDashedLine
(
&
m_ClipBox
,
a
DC
,
-
screen
->
ReturnPageSize
().
x
,
-
screen
->
ReturnPageSize
().
x
,
screen
->
m_GridOrigin
.
y
,
screen
->
m_GridOrigin
.
y
,
screen
->
ReturnPageSize
().
x
,
screen
->
ReturnPageSize
().
x
,
...
...
eeschema/class_libentry.h
View file @
a9010796
...
@@ -514,7 +514,7 @@ public:
...
@@ -514,7 +514,7 @@ public:
* @return The draw object if found. Otherwise NULL.
* @return The draw object if found. Otherwise NULL.
*/
*/
LIB_DRAW_ITEM
*
LocateDrawItem
(
int
aUnit
,
int
aConvert
,
KICAD_T
aType
,
LIB_DRAW_ITEM
*
LocateDrawItem
(
int
aUnit
,
int
aConvert
,
KICAD_T
aType
,
const
wxPoint
&
aPoint
,
const
TRANSFORM
&
aTransf
ro
m
);
const
wxPoint
&
aPoint
,
const
TRANSFORM
&
aTransf
or
m
);
/**
/**
* Return a reference to the draw item list.
* Return a reference to the draw item list.
...
...
eeschema/dialog_erc_listbox.h
View file @
a9010796
...
@@ -40,10 +40,8 @@ public:
...
@@ -40,10 +40,8 @@ public:
/**
/**
* Function SetList
* Function AppendToList
* sets the DRC_ITEM_LIST for this listbox. Ownership of the DRC_ITEM_LIST
* @param aItem The SCH_MARKER* to add to the current list which will be
* is transferred to this ERC_HTML_LISTBOX.
* @param aList The DRC_ITEM_LIST* containing the DRC_ITEMs which will be
* displayed in the wxHtmlListBox
* displayed in the wxHtmlListBox
*/
*/
void
AppendToList
(
SCH_MARKER
*
aItem
)
void
AppendToList
(
SCH_MARKER
*
aItem
)
...
@@ -87,7 +85,7 @@ public:
...
@@ -87,7 +85,7 @@ public:
/**
/**
* Function OnGetItem
* Function OnGetItem
Markup
* returns the html text associated with the given index 'n'.
* returns the html text associated with the given index 'n'.
* @param n An index into the list.
* @param n An index into the list.
* @return wxString - the simple html text to show in the listbox.
* @return wxString - the simple html text to show in the listbox.
...
...
eeschema/files-io.cpp
View file @
a9010796
...
@@ -308,7 +308,7 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew )
...
@@ -308,7 +308,7 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew )
/**
/**
* Save the entire project and create an archive for components.
* Save the entire project and create an archive for components.
*
*
* The library archive name is
<root_name>
-cache.lib
* The library archive name is
<root_name>
-cache.lib
*/
*/
void
SCH_EDIT_FRAME
::
SaveProject
()
void
SCH_EDIT_FRAME
::
SaveProject
()
{
{
...
...
eeschema/lib_circle.cpp
View file @
a9010796
...
@@ -70,7 +70,7 @@ bool LIB_CIRCLE::Load( char* aLine, wxString& aErrorMsg )
...
@@ -70,7 +70,7 @@ bool LIB_CIRCLE::Load( char* aLine, wxString& aErrorMsg )
/**
/**
* Function HitTest
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* tests if the given wxPoint is within the bounds of this object.
* @param a
RefPos
A wxPoint to test in eeschema space
* @param a
PosRef
A wxPoint to test in eeschema space
* @return - true if a hit, else false
* @return - true if a hit, else false
*/
*/
bool
LIB_CIRCLE
::
HitTest
(
const
wxPoint
&
aPosRef
)
bool
LIB_CIRCLE
::
HitTest
(
const
wxPoint
&
aPosRef
)
...
...
eeschema/lib_circle.h
View file @
a9010796
...
@@ -50,10 +50,10 @@ public:
...
@@ -50,10 +50,10 @@ public:
/**
/**
* Test if the given point is within the bounds of this object.
* Test if the given point is within the bounds of this object.
*
*
* @param a
RefPos
- A wxPoint to test
* @param a
PosRef
- A wxPoint to test
* @return bool - true if a hit, else false
* @return bool - true if a hit, else false
*/
*/
virtual
bool
HitTest
(
const
wxPoint
&
a
RefPos
);
virtual
bool
HitTest
(
const
wxPoint
&
a
PosRef
);
/**
/**
* @param aPosRef - a wxPoint to test
* @param aPosRef - a wxPoint to test
...
...
eeschema/lib_field.h
View file @
a9010796
...
@@ -140,7 +140,7 @@ public:
...
@@ -140,7 +140,7 @@ public:
/**
/**
* Test if the given point is within the bounds of this object.
* Test if the given point is within the bounds of this object.
*
*
* @param aPoition A point to test in field coordinate system
* @param aPo
s
ition A point to test in field coordinate system
* @return True if a hit, else false
* @return True if a hit, else false
*/
*/
bool
HitTest
(
const
wxPoint
&
aPosition
);
bool
HitTest
(
const
wxPoint
&
aPosition
);
...
...
eeschema/lib_pin.cpp
View file @
a9010796
...
@@ -1842,7 +1842,7 @@ wxArrayString LIB_PIN::GetElectricalTypeNames( void )
...
@@ -1842,7 +1842,7 @@ wxArrayString LIB_PIN::GetElectricalTypeNames( void )
/**
/**
* Get a list of pin electrical type
name
s.
* Get a list of pin electrical type
icon
s.
* @return List of valid pin electrical type bitmaps symbols in .xpm format
* @return List of valid pin electrical type bitmaps symbols in .xpm format
* for menus and dialogs .
* for menus and dialogs .
*/
*/
...
@@ -1853,7 +1853,7 @@ const char*** LIB_PIN::GetElectricalTypeSymbols( void )
...
@@ -1853,7 +1853,7 @@ const char*** LIB_PIN::GetElectricalTypeSymbols( void )
/**
/**
* Get a list of pin
electrical type name
s.
* Get a list of pin
orientation icon
s.
*
*
* @return List of valid pin orientation bitmaps symbols in .xpm format
* @return List of valid pin orientation bitmaps symbols in .xpm format
* for menus and dialogs .
* for menus and dialogs .
...
...
eeschema/lib_pin.h
View file @
a9010796
...
@@ -147,7 +147,7 @@ public:
...
@@ -147,7 +147,7 @@ public:
* @param aPosRef - a wxPoint to test
* @param aPosRef - a wxPoint to test
* @param aThreshold - max distance to this object (usually the half
* @param aThreshold - max distance to this object (usually the half
* thickness of a line)
* thickness of a line)
* @param aTrans
Mat
- the transform matrix
* @param aTrans
form
- the transform matrix
* @return - true if the point aPosRef is near this object
* @return - true if the point aPosRef is near this object
*/
*/
virtual
bool
HitTest
(
wxPoint
aPosRef
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
);
virtual
bool
HitTest
(
wxPoint
aPosRef
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
);
...
...
eeschema/netform.cpp
View file @
a9010796
...
@@ -240,6 +240,8 @@ public:
...
@@ -240,6 +240,8 @@ public:
/**
/**
* Function WriteGENERICNetList
* Function WriteGENERICNetList
* creates a generic netlist, now in XML.
* creates a generic netlist, now in XML.
* @param frame = the parent SCH_EDIT_FRAME frame
* @param aOutFileName = the full filename of the file to create
* @return bool - true if there were no errors, else false.
* @return bool - true if there were no errors, else false.
*/
*/
bool
WriteGENERICNetList
(
SCH_EDIT_FRAME
*
frame
,
const
wxString
&
aOutFileName
);
bool
WriteGENERICNetList
(
SCH_EDIT_FRAME
*
frame
,
const
wxString
&
aOutFileName
);
...
@@ -248,6 +250,8 @@ public:
...
@@ -248,6 +250,8 @@ public:
* Function WriteNetListPCBNEW
* Function WriteNetListPCBNEW
* generates a net list file (Format 2 improves ORCAD PCB)
* generates a net list file (Format 2 improves ORCAD PCB)
*
*
* @param frame = the parent SCH_EDIT_FRAME frame
* @param f = the file to write to
* @param with_pcbnew if true, then format Pcbnew (OrcadPcb2 + reviews and lists of net),<p>
* @param with_pcbnew if true, then format Pcbnew (OrcadPcb2 + reviews and lists of net),<p>
* else output ORCADPCB2 strict format.
* else output ORCADPCB2 strict format.
*/
*/
...
@@ -291,6 +295,8 @@ public:
...
@@ -291,6 +295,8 @@ public:
* Are considered in placing orders in the netlist
* Are considered in placing orders in the netlist
* [.-] Or PSpice gnucap are beginning
* [.-] Or PSpice gnucap are beginning
* + + Gnucap and PSpice are ultimately NetList
* + + Gnucap and PSpice are ultimately NetList
* @param frame = the parent SCH_EDIT_FRAME frame
* @param f = the file to write to
* @param use_netnames if true, then nodes are identified by the netname,
* @param use_netnames if true, then nodes are identified by the netname,
* else by net number.
* else by net number.
*/
*/
...
...
eeschema/netlist_control.cpp
View file @
a9010796
...
@@ -81,14 +81,8 @@ END_EVENT_TABLE()
...
@@ -81,14 +81,8 @@ END_EVENT_TABLE()
/*******************************/
/*******************************/
/*
*
Contructor to create a setup page for one netlist format.
/* Contructor to create a setup page for one netlist format.
* Used in Netlist format Dialog box creation
* Used in Netlist format Dialog box creation
* @param parent = wxNotebook * parent
* @param title = title (name) of the notebook page
* @param id_NetType = netlist type id
* @param idCheckBox = event ID attached to the "format is default" check box
* @param idCreateFile = event ID attached to the "create netlist" button
* @param selected - Please document me.
*/
*/
EDA_NoteBookPage
::
EDA_NoteBookPage
(
wxNotebook
*
parent
,
EDA_NoteBookPage
::
EDA_NoteBookPage
(
wxNotebook
*
parent
,
const
wxString
&
title
,
const
wxString
&
title
,
...
...
eeschema/netlist_control.h
View file @
a9010796
...
@@ -50,6 +50,16 @@ public:
...
@@ -50,6 +50,16 @@ public:
wxBoxSizer
*
m_RightOptionsBoxSizer
;
wxBoxSizer
*
m_RightOptionsBoxSizer
;
wxBoxSizer
*
m_LowBoxSizer
;
wxBoxSizer
*
m_LowBoxSizer
;
/** Contructor to create a setup page for one netlist format.
* Used in Netlist format Dialog box creation
* @param parent = wxNotebook * parent
* @param title = title (name) of the notebook page
* @param id_NetType = netlist type id
* @param idCheckBox = event ID attached to the "format is default" check box
* @param idCreateFile = event ID attached to the "create netlist" button
* @param selected = true to have this notebook page selected when the dialog is opened
* Only one page can be created with selected = true.
*/
EDA_NoteBookPage
(
wxNotebook
*
parent
,
const
wxString
&
title
,
EDA_NoteBookPage
(
wxNotebook
*
parent
,
const
wxString
&
title
,
int
id_NetType
,
int
idCheckBox
,
int
idCreateFile
,
int
id_NetType
,
int
idCheckBox
,
int
idCreateFile
,
bool
selected
);
bool
selected
);
...
...
eeschema/transform.h
View file @
a9010796
...
@@ -61,7 +61,7 @@ public:
...
@@ -61,7 +61,7 @@ public:
/**
/**
* Calculate new coordinate according to the transform.
* Calculate new coordinate according to the transform.
*
*
* @param aPo
sition
= The position to transform
* @param aPo
int
= The position to transform
* @return The transformed coordinate.
* @return The transformed coordinate.
*/
*/
wxPoint
TransformCoordinate
(
const
wxPoint
&
aPoint
)
const
;
wxPoint
TransformCoordinate
(
const
wxPoint
&
aPoint
)
const
;
...
...
include/class_board_item.h
View file @
a9010796
...
@@ -155,11 +155,11 @@ public:
...
@@ -155,11 +155,11 @@ public:
* Function MenuText
* Function MenuText
* returns the text to use in any menu type UI control which must uniquely
* returns the text to use in any menu type UI control which must uniquely
* identify this item.
* identify this item.
* @param a
Board
The PCB in which this item resides, needed for Net lookup.
* @param a
Pcb
The PCB in which this item resides, needed for Net lookup.
* @return wxString
* @return wxString
* @todo: maybe: make this virtual and split into each derived class
* @todo: maybe: make this virtual and split into each derived class
*/
*/
wxString
MenuText
(
const
BOARD
*
a
Board
)
const
;
wxString
MenuText
(
const
BOARD
*
a
Pcb
)
const
;
/**
/**
...
...
include/class_drawpanel.h
View file @
a9010796
...
@@ -178,9 +178,9 @@ public:
...
@@ -178,9 +178,9 @@ public:
/**
/**
* Function CursorRealPosition
* Function CursorRealPosition
* @return the position in user units of location ScreenPos
* @return the position in user units of location ScreenPos
* @param
ScreenPos
= the screen (in pixel) position to convert
* @param
aPosition
= the screen (in pixel) position to convert
*/
*/
wxPoint
CursorRealPosition
(
const
wxPoint
&
ScreenPos
);
wxPoint
CursorRealPosition
(
const
wxPoint
&
aPosition
);
/**
/**
* Function CursorScreenPosition
* Function CursorScreenPosition
...
...
include/wxBasePcbFrame.h
View file @
a9010796
...
@@ -300,7 +300,7 @@ public:
...
@@ -300,7 +300,7 @@ public:
/**
/**
* Function Select_1_Module_From_List
* Function Select_1_Module_From_List
* Display a list of modules found in active libraries or a given library
* Display a list of modules found in active libraries or a given library
* @param a
ctive_w
indow = the current window ( parent window )
* @param a
W
indow = the current window ( parent window )
* @param aLibraryFullFilename = library to list (if aLibraryFullFilename
* @param aLibraryFullFilename = library to list (if aLibraryFullFilename
* == void, list all modules)
* == void, list all modules)
* @param aMask = Display filter (wildcart)( Mask = wxEmptyString if not
* @param aMask = Display filter (wildcart)( Mask = wxEmptyString if not
...
@@ -313,18 +313,52 @@ public:
...
@@ -313,18 +313,52 @@ public:
* Ok
* Ok
*/
*/
wxString
Select_1_Module_From_List
(
wxString
Select_1_Module_From_List
(
WinEDA_DrawFrame
*
a
ctive_w
indow
,
const
wxString
&
aLibraryFullFilename
,
WinEDA_DrawFrame
*
a
W
indow
,
const
wxString
&
aLibraryFullFilename
,
const
wxString
&
aMask
,
const
wxString
&
aKeyWord
);
const
wxString
&
aMask
,
const
wxString
&
aKeyWord
);
MODULE
*
Load_Module_From_Library
(
const
wxString
&
library
,
wxDC
*
DC
);
MODULE
*
Load_Module_From_Library
(
const
wxString
&
library
,
wxDC
*
DC
);
// ratsnest functions
// ratsnest functions
void
Compile_Ratsnest
(
wxDC
*
DC
,
bool
affiche
);
/**
int
Test_1_Net_Ratsnest
(
wxDC
*
DC
,
int
net_code
);
* Function Compile_Ratsnest
void
build_ratsnest_module
(
wxDC
*
DC
,
MODULE
*
Module
);
* Create the entire board ratsnest.
* Must be called after a board change (changes for
* pads, footprints or a read netlist ).
* @param aDC = the current device context (can be NULL)
* @param aDisplayStatus : if true, display the computation results
*/
void
Compile_Ratsnest
(
wxDC
*
aDC
,
bool
aDisplayStatus
);
/**
* Function Test_1_Net_Ratsnest
* Compute the ratsnest relative to the net "net_code"
* @param aDC - Device context to draw on.
* @param aNetcode = netcode used to compute the ratsnest.
*/
int
Test_1_Net_Ratsnest
(
wxDC
*
aDC
,
int
aNetcode
);
/**
* Function build_ratsnest_module
* Build a ratsnest relative to one footprint. This is a simplified computation
* used only in move footprint. It is not optimal, but it is fast and sufficient
* to help a footprint placement
* It shows the connections from a pad to the nearest connected pad
* @param aModule = module to consider.
*/
void
build_ratsnest_module
(
MODULE
*
aModule
);
void
trace_ratsnest_module
(
wxDC
*
DC
);
void
trace_ratsnest_module
(
wxDC
*
DC
);
void
Build_Board_Ratsnest
(
wxDC
*
DC
);
void
Build_Board_Ratsnest
(
wxDC
*
DC
);
void
DrawGeneralRatsnest
(
wxDC
*
DC
,
int
net_code
=
0
);
/**
* function Displays the general ratsnest
* Only ratsnest with the status bit CH_VISIBLE is set are displayed
* @param aDC = the current device context (can be NULL)
* @param aNetcode if > 0, Display only the ratsnest relative to the
* corresponding net_code
*/
void
DrawGeneralRatsnest
(
wxDC
*
aDC
,
int
aNetcode
=
0
);
void
trace_ratsnest_pad
(
wxDC
*
DC
);
void
trace_ratsnest_pad
(
wxDC
*
DC
);
void
build_ratsnest_pad
(
BOARD_ITEM
*
ref
,
void
build_ratsnest_pad
(
BOARD_ITEM
*
ref
,
const
wxPoint
&
refpos
,
const
wxPoint
&
refpos
,
...
...
include/wxPcbStruct.h
View file @
a9010796
...
@@ -162,12 +162,12 @@ public:
...
@@ -162,12 +162,12 @@ public:
* Print the page pointed by ActiveScreen, set by the calling print function
* Print the page pointed by ActiveScreen, set by the calling print function
* @param aDC = wxDC given by the calling print function
* @param aDC = wxDC given by the calling print function
* @param aPrint_Sheet_Ref = true to print page references
* @param aPrint_Sheet_Ref = true to print page references
* @param aPrintMask
= not used here
* @param aPrintMask
Layer = a 32 bits mask: bit n = 1 -> layer n is printed
* @param aPrintMirrorMode =
not used here (Set when printing in mirror mode)
* @param aPrintMirrorMode =
true to plot mirrored
* @param aData = a pointer on an auxiliary data (NULL if not used)
* @param aData = a pointer on an auxiliary data (NULL if not used)
*/
*/
virtual
void
PrintPage
(
wxDC
*
aDC
,
bool
aPrint_Sheet_Ref
,
virtual
void
PrintPage
(
wxDC
*
aDC
,
bool
aPrint_Sheet_Ref
,
int
aPrintMask
,
bool
aPrintMirrorMode
,
int
aPrintMask
Layer
,
bool
aPrintMirrorMode
,
void
*
aData
=
NULL
);
void
*
aData
=
NULL
);
void
GetKicadAbout
(
wxCommandEvent
&
event
);
void
GetKicadAbout
(
wxCommandEvent
&
event
);
...
@@ -713,7 +713,17 @@ public:
...
@@ -713,7 +713,17 @@ public:
// Footprint edition (see also WinEDA_BasePcbFrame)
// Footprint edition (see also WinEDA_BasePcbFrame)
void
InstallModuleOptionsFrame
(
MODULE
*
Module
,
wxDC
*
DC
);
void
InstallModuleOptionsFrame
(
MODULE
*
Module
,
wxDC
*
DC
);
void
StartMove_Module
(
MODULE
*
module
,
wxDC
*
DC
);
void
StartMove_Module
(
MODULE
*
module
,
wxDC
*
DC
);
bool
Delete_Module
(
MODULE
*
module
,
wxDC
*
DC
,
bool
aAskBeforeDeleting
);
/**
* Function Delete Module
* Remove a footprint from m_Modules linked list and put it in undelete buffer
* The ratsnest and pad list are recalculated
* @param aModule = footprint to delete
* @param aDC = currentDevice Context. if NULL: do not redraw new ratsnest
* @param aAskBeforeDeleting : if true: ask for confirmation before deleting
*/
bool
Delete_Module
(
MODULE
*
aModule
,
wxDC
*
aDC
,
bool
aAskBeforeDeleting
);
void
Change_Side_Module
(
MODULE
*
Module
,
wxDC
*
DC
);
void
Change_Side_Module
(
MODULE
*
Module
,
wxDC
*
DC
);
void
InstallExchangeModuleFrame
(
MODULE
*
ExchangeModuleModule
);
void
InstallExchangeModuleFrame
(
MODULE
*
ExchangeModuleModule
);
...
...
pcbnew/autoplac.cpp
View file @
a9010796
...
@@ -660,7 +660,7 @@ int WinEDA_PcbFrame::RecherchePlacementModule( MODULE* Module, wxDC* DC )
...
@@ -660,7 +660,7 @@ int WinEDA_PcbFrame::RecherchePlacementModule( MODULE* Module, wxDC* DC )
if
(
Penalite
>=
0
)
/* c a d if the module can be placed. */
if
(
Penalite
>=
0
)
/* c a d if the module can be placed. */
{
{
error
=
0
;
error
=
0
;
build_ratsnest_module
(
DC
,
Module
);
build_ratsnest_module
(
Module
);
cout
=
Compute_Ratsnest_PlaceModule
(
DC
);
cout
=
Compute_Ratsnest_PlaceModule
(
DC
);
DisplayChevelu
=
1
;
DisplayChevelu
=
1
;
Score
=
cout
+
(
float
)
Penalite
;
Score
=
cout
+
(
float
)
Penalite
;
...
@@ -1047,7 +1047,7 @@ static MODULE* PickModule( WinEDA_PcbFrame* pcbframe, wxDC* DC )
...
@@ -1047,7 +1047,7 @@ static MODULE* PickModule( WinEDA_PcbFrame* pcbframe, wxDC* DC )
continue
;
continue
;
pcbframe
->
GetBoard
()
->
m_Status_Pcb
&=
~
RATSNEST_ITEM_LOCAL_OK
;
pcbframe
->
GetBoard
()
->
m_Status_Pcb
&=
~
RATSNEST_ITEM_LOCAL_OK
;
Module
->
DisplayInfo
(
pcbframe
);
Module
->
DisplayInfo
(
pcbframe
);
pcbframe
->
build_ratsnest_module
(
DC
,
Module
);
pcbframe
->
build_ratsnest_module
(
Module
);
/* Calculate external ratsnet. */
/* Calculate external ratsnet. */
for
(
unsigned
ii
=
0
;
for
(
unsigned
ii
=
0
;
...
...
pcbnew/block.cpp
View file @
a9010796
...
@@ -378,12 +378,11 @@ bool WinEDA_PcbFrame::HandleBlockEnd( wxDC* DC )
...
@@ -378,12 +378,11 @@ bool WinEDA_PcbFrame::HandleBlockEnd( wxDC* DC )
/* Block operations: */
/* Block operations: */
/*
*
/*
* Function Block_SelectItems
* Function Block_SelectItems
* Uses GetScreen()->m_BlockLocate
* Uses GetScreen()->m_BlockLocate
* select items within the selected block.
* select items within the selected block.
* selected items are put in the pick list
* selected items are put in the pick list
* @param none
*/
*/
void
WinEDA_PcbFrame
::
Block_SelectItems
()
void
WinEDA_PcbFrame
::
Block_SelectItems
()
{
{
...
@@ -657,11 +656,10 @@ void WinEDA_PcbFrame::Block_Delete()
...
@@ -657,11 +656,10 @@ void WinEDA_PcbFrame::Block_Delete()
}
}
/*
*
/*
* Function Block_Rotate
* Function Block_Rotate
* Rotate all items within the selected block.
* Rotate all items within the selected block.
* The rotation center is the center of the block
* The rotation center is the center of the block
* @param none
*/
*/
void
WinEDA_PcbFrame
::
Block_Rotate
()
void
WinEDA_PcbFrame
::
Block_Rotate
()
{
{
...
@@ -726,7 +724,6 @@ void WinEDA_PcbFrame::Block_Rotate()
...
@@ -726,7 +724,6 @@ void WinEDA_PcbFrame::Block_Rotate()
* Function Block_Flip
* Function Block_Flip
* flips items within the selected block.
* flips items within the selected block.
* The flip center is the center of the block
* The flip center is the center of the block
* @param none
*/
*/
void
WinEDA_PcbFrame
::
Block_Flip
()
void
WinEDA_PcbFrame
::
Block_Flip
()
{
{
...
@@ -788,12 +785,11 @@ void WinEDA_PcbFrame::Block_Flip()
...
@@ -788,12 +785,11 @@ void WinEDA_PcbFrame::Block_Flip()
}
}
/*
*
/*
* Function Block_Move
* Function Block_Move
* moves all tracks and segments within the selected block.
* moves all tracks and segments within the selected block.
* New location is determined by the current offset from the selected block's
* New location is determined by the current offset from the selected block's
* original location.
* original location.
* @param none
*/
*/
void
WinEDA_PcbFrame
::
Block_Move
()
void
WinEDA_PcbFrame
::
Block_Move
()
{
{
...
@@ -849,12 +845,11 @@ void WinEDA_PcbFrame::Block_Move()
...
@@ -849,12 +845,11 @@ void WinEDA_PcbFrame::Block_Move()
}
}
/*
*
/*
* Function Block_Duplicate
* Function Block_Duplicate
* duplicates all items within the selected block.
* duplicates all items within the selected block.
* New location is determined by the current offset from the selected block's
* New location is determined by the current offset from the selected block's
* original location.
* original location.
* @param none
*/
*/
void
WinEDA_PcbFrame
::
Block_Duplicate
()
void
WinEDA_PcbFrame
::
Block_Duplicate
()
{
{
...
...
pcbnew/board_items_to_polygon_shape_transform.cpp
View file @
a9010796
...
@@ -558,6 +558,7 @@ void D_PAD:: TransformShapeWithClearanceToPolygon( std:: vector < CPolyPt>& aCor
...
@@ -558,6 +558,7 @@ void D_PAD:: TransformShapeWithClearanceToPolygon( std:: vector < CPolyPt>& aCor
* @param aCornerBuffer = a buffer to store the polygon
* @param aCornerBuffer = a buffer to store the polygon
* @param aPad = the current pad used to create the thermal shape
* @param aPad = the current pad used to create the thermal shape
* @param aThermalGap = gap in thermal shape
* @param aThermalGap = gap in thermal shape
* @param aCopperThickness = stubs thickness in thermal shape
* @param aMinThicknessValue = min copper thickness allowed
* @param aMinThicknessValue = min copper thickness allowed
* @param aCircleToSegmentsCount = the number of segments to approximate a circle
* @param aCircleToSegmentsCount = the number of segments to approximate a circle
* @param aCorrectionFactor = the correction to apply to circles radius to keep
* @param aCorrectionFactor = the correction to apply to circles radius to keep
...
...
pcbnew/board_undo_redo.cpp
View file @
a9010796
...
@@ -326,22 +326,17 @@ BOARD_ITEM* DuplicateStruct( BOARD_ITEM* aItem )
...
@@ -326,22 +326,17 @@ BOARD_ITEM* DuplicateStruct( BOARD_ITEM* aItem )
}
}
/*
*
/*
* Function SaveCopyInUndoList
* Function SaveCopyInUndoList
* Create a copy of the current
schematic
item, and put it in the undo list.
* Create a copy of the current
board
item, and put it in the undo list.
*
*
*
flag_type_command
=
*
aCommandType
=
* UR_CHANGED
* UR_CHANGED
* UR_NEW
* UR_NEW
* UR_DELETED
* UR_DELETED
* UR_MOVED
* UR_MOVED
* UR_FLIPPED
* UR_FLIPPED
* UR_ROTATED
* UR_ROTATED
*
* If it is a delete command, items are put on list with the .Flags member set to UR_DELETED.
* When it will be really deleted, the EEDrawList and the subhierarchy will be deleted.
* If it is only a copy, the EEDrawList and the subhierarchy must NOT be deleted.
*
*/
*/
void
WinEDA_PcbFrame
::
SaveCopyInUndoList
(
BOARD_ITEM
*
aItem
,
void
WinEDA_PcbFrame
::
SaveCopyInUndoList
(
BOARD_ITEM
*
aItem
,
UndoRedoOpType
aCommandType
,
UndoRedoOpType
aCommandType
,
...
...
pcbnew/class_board.cpp
View file @
a9010796
...
@@ -1180,15 +1180,15 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR* inspector, const void* testData,
...
@@ -1180,15 +1180,15 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR* inspector, const void* testData,
/**
/**
* Function FindNet
* Function FindNet
* searches for a net with the given netcode.
* searches for a net with the given netcode.
* @param a
n
etcode The netcode to search for.
* @param a
N
etcode The netcode to search for.
* @return NETINFO_ITEM* - the net or NULL if not found.
* @return NETINFO_ITEM* - the net or NULL if not found.
*/
*/
NETINFO_ITEM
*
BOARD
::
FindNet
(
int
a
n
etcode
)
const
NETINFO_ITEM
*
BOARD
::
FindNet
(
int
a
N
etcode
)
const
{
{
// the first valid netcode is 1 and the last is m_NetInfo->GetCount()-1.
// the first valid netcode is 1 and the last is m_NetInfo->GetCount()-1.
// zero is reserved for "no connection" and is not used.
// zero is reserved for "no connection" and is not used.
// NULL is returned for non valid netcodes
// NULL is returned for non valid netcodes
NETINFO_ITEM
*
net
=
m_NetInfo
->
GetNetItem
(
a
n
etcode
);
NETINFO_ITEM
*
net
=
m_NetInfo
->
GetNetItem
(
a
N
etcode
);
#if defined(DEBUG)
#if defined(DEBUG)
if
(
net
)
// item can be NULL if anetcode is not valid
if
(
net
)
// item can be NULL if anetcode is not valid
...
@@ -1196,7 +1196,7 @@ NETINFO_ITEM* BOARD::FindNet( int anetcode ) const
...
@@ -1196,7 +1196,7 @@ NETINFO_ITEM* BOARD::FindNet( int anetcode ) const
if
(
anetcode
!=
net
->
GetNet
()
)
if
(
anetcode
!=
net
->
GetNet
()
)
{
{
printf
(
"FindNet() anetcode %d != GetNet() %d (net: %s)
\n
"
,
printf
(
"FindNet() anetcode %d != GetNet() %d (net: %s)
\n
"
,
a
n
etcode
,
net
->
GetNet
(),
CONV_TO_UTF8
(
net
->
GetNetname
()
)
);
a
N
etcode
,
net
->
GetNet
(),
CONV_TO_UTF8
(
net
->
GetNetname
()
)
);
}
}
}
}
#endif
#endif
...
@@ -1431,7 +1431,7 @@ out:
...
@@ -1431,7 +1431,7 @@ out:
}
}
/*
*
/*
* Function RedrawAreasOutlines
* Function RedrawAreasOutlines
* Redraw all areas outlines on layer aLayer ( redraw all if aLayer < 0 )
* Redraw all areas outlines on layer aLayer ( redraw all if aLayer < 0 )
*/
*/
...
@@ -1479,7 +1479,7 @@ void BOARD::RedrawFilledAreas( WinEDA_DrawPanel* panel,
...
@@ -1479,7 +1479,7 @@ void BOARD::RedrawFilledAreas( WinEDA_DrawPanel* panel,
* zone.
* zone.
* the test is made on zones on layer from aStartLayer to aEndLayer
* the test is made on zones on layer from aStartLayer to aEndLayer
* Note: if a zone has its flag BUSY (in .m_State) is set, it is ignored.
* Note: if a zone has its flag BUSY (in .m_State) is set, it is ignored.
* @param
r
efPos A wxPoint to test
* @param
aR
efPos A wxPoint to test
* @param aStartLayer the first layer to test
* @param aStartLayer the first layer to test
* @param aEndLayer the last layer (-1 to ignore it) to test
* @param aEndLayer the last layer (-1 to ignore it) to test
* @return ZONE_CONTAINER* return a pointer to the ZONE_CONTAINER found, else
* @return ZONE_CONTAINER* return a pointer to the ZONE_CONTAINER found, else
...
...
pcbnew/class_board.h
View file @
a9010796
...
@@ -270,7 +270,7 @@ public:
...
@@ -270,7 +270,7 @@ public:
* Function SetEnabledLayers
* Function SetEnabledLayers
* is a proxy function that calls the correspondent function in m_BoardSettings
* is a proxy function that calls the correspondent function in m_BoardSettings
* Changes the bit-mask of enabled layers
* Changes the bit-mask of enabled layers
* @param aMask = The new bit-mask of enabled layers
* @param a
Layer
Mask = The new bit-mask of enabled layers
*/
*/
void
SetEnabledLayers
(
int
aLayerMask
);
void
SetEnabledLayers
(
int
aLayerMask
);
...
@@ -278,7 +278,7 @@ public:
...
@@ -278,7 +278,7 @@ public:
* Function IsLayerEnabled
* Function IsLayerEnabled
* is a proxy function that calls the correspondent function in m_BoardSettings
* is a proxy function that calls the correspondent function in m_BoardSettings
* tests whether a given layer is enabled
* tests whether a given layer is enabled
* @param aLayer
Index = The index of t
he layer to be tested
* @param aLayer
= T
he layer to be tested
* @return bool - true if the layer is visible.
* @return bool - true if the layer is visible.
*/
*/
bool
IsLayerEnabled
(
int
aLayer
)
const
bool
IsLayerEnabled
(
int
aLayer
)
const
...
@@ -310,7 +310,7 @@ public:
...
@@ -310,7 +310,7 @@ public:
* Function SetVisibleLayers
* Function SetVisibleLayers
* is a proxy function that calls the correspondent function in m_BoardSettings
* is a proxy function that calls the correspondent function in m_BoardSettings
* changes the bit-mask of visible layers
* changes the bit-mask of visible layers
* @param aMask = The new bit-mask of visible layers
* @param a
Layer
Mask = The new bit-mask of visible layers
*/
*/
void
SetVisibleLayers
(
int
aLayerMask
);
void
SetVisibleLayers
(
int
aLayerMask
);
...
@@ -529,9 +529,10 @@ public:
...
@@ -529,9 +529,10 @@ public:
* and turns on or off the brilliance associated with that net according to the
* and turns on or off the brilliance associated with that net according to the
* current value of global g_HighLight_Status
* current value of global g_HighLight_Status
* @param aDrawPanel is needed for the clipping support.
* @param aDrawPanel is needed for the clipping support.
* @param aDC = the curent device context
* @param aNetCode is the net number to highlight or to dim.
* @param aNetCode is the net number to highlight or to dim.
*/
*/
void
DrawHighLight
(
WinEDA_DrawPanel
*
aDrawPanel
,
wxDC
*
DC
,
int
aNetCode
);
void
DrawHighLight
(
WinEDA_DrawPanel
*
aDrawPanel
,
wxDC
*
a
DC
,
int
aNetCode
);
/**
/**
* Function Visit
* Function Visit
...
@@ -596,8 +597,6 @@ public:
...
@@ -596,8 +597,6 @@ public:
* Must be called after a Design Rules edition, or after reading a netlist (or editing the list of nets)
* Must be called after a Design Rules edition, or after reading a netlist (or editing the list of nets)
* Also this function removes the non existing nets in netclasses and add net nets in default netclass
* Also this function removes the non existing nets in netclasses and add net nets in default netclass
* (this happens after reading a netlist)
* (this happens after reading a netlist)
* @param none
* @return none
*/
*/
void
SynchronizeNetsAndNetClasses
();
void
SynchronizeNetsAndNetClasses
();
...
@@ -713,7 +712,7 @@ public:
...
@@ -713,7 +712,7 @@ public:
* tests if the given wxPoint is within the bounds of a filled area of this zone.
* tests if the given wxPoint is within the bounds of a filled area of this zone.
* the test is made on zones on layer from aStartLayer to aEndLayer
* the test is made on zones on layer from aStartLayer to aEndLayer
* Note: if a zone has its flag BUSY (in .m_State) is set, it is ignored.
* Note: if a zone has its flag BUSY (in .m_State) is set, it is ignored.
* @param
r
efPos A wxPoint to test
* @param
aR
efPos A wxPoint to test
* @param aStartLayer the first layer to test
* @param aStartLayer the first layer to test
* @param aEndLayer the last layer (-1 to ignore it) to test
* @param aEndLayer the last layer (-1 to ignore it) to test
* @return ZONE_CONTAINER* return a pointer to the ZONE_CONTAINER found, else NULL
* @return ZONE_CONTAINER* return a pointer to the ZONE_CONTAINER found, else NULL
...
@@ -726,7 +725,7 @@ public:
...
@@ -726,7 +725,7 @@ public:
* Function RedrawAreasOutlines
* Function RedrawAreasOutlines
* Redraw all areas outlines on layer aLayer ( redraw all if aLayer < 0 )
* Redraw all areas outlines on layer aLayer ( redraw all if aLayer < 0 )
*/
*/
void
RedrawAreasOutlines
(
WinEDA_DrawPanel
*
p
anel
,
void
RedrawAreasOutlines
(
WinEDA_DrawPanel
*
aP
anel
,
wxDC
*
aDC
,
wxDC
*
aDC
,
int
aDrawMode
,
int
aDrawMode
,
int
aLayer
);
int
aLayer
);
...
@@ -735,7 +734,7 @@ public:
...
@@ -735,7 +734,7 @@ public:
* Function RedrawFilledAreas
* Function RedrawFilledAreas
* Redraw all filled areas on layer aLayer ( redraw all if aLayer < 0 )
* Redraw all filled areas on layer aLayer ( redraw all if aLayer < 0 )
*/
*/
void
RedrawFilledAreas
(
WinEDA_DrawPanel
*
p
anel
,
void
RedrawFilledAreas
(
WinEDA_DrawPanel
*
aP
anel
,
wxDC
*
aDC
,
wxDC
*
aDC
,
int
aDrawMode
,
int
aDrawMode
,
int
aLayer
);
int
aLayer
);
...
@@ -869,7 +868,8 @@ public:
...
@@ -869,7 +868,8 @@ public:
* @param aModifiedZonesList = a PICKED_ITEMS_LIST * where to store deleted or added areas
* @param aModifiedZonesList = a PICKED_ITEMS_LIST * where to store deleted or added areas
* (useful in undo commands. Can be NULL
* (useful in undo commands. Can be NULL
* @param modified_area = area to test
* @param modified_area = area to test
* @param bMessageBox : if TRUE, shows message boxes when clipping occurs.
* @param bMessageBoxInt : if TRUE, shows message boxes when clipping occurs.
* @param bMessageBoxArc if true, shows message when clipping can't be done due to arcs.
* @return :
* @return :
* -1 if arcs intersect other sides, so polygon can't be clipped
* -1 if arcs intersect other sides, so polygon can't be clipped
* 0 if no intersecting sides
* 0 if no intersecting sides
...
...
pcbnew/class_dimension.cpp
View file @
a9010796
...
@@ -264,41 +264,41 @@ void DIMENSION::Move(const wxPoint& offset)
...
@@ -264,41 +264,41 @@ void DIMENSION::Move(const wxPoint& offset)
/**
/**
* Function Rotate
* Function Rotate
* @param
center : Rotation point
* @param
aRotCentre - the rotation point.
* @param a
ngle : Rotation angle in 0.1 degrees
* @param a
Angle - the rotation angle in 0.1 degree.
*/
*/
void
DIMENSION
::
Rotate
(
const
wxPoint
&
centre
,
int
a
ngle
)
void
DIMENSION
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aA
ngle
)
{
{
RotatePoint
(
&
m_Pos
,
centre
,
a
ngle
);
RotatePoint
(
&
m_Pos
,
aRotCentre
,
aA
ngle
);
RotatePoint
(
&
m_Text
->
m_Pos
,
centre
,
a
ngle
);
RotatePoint
(
&
m_Text
->
m_Pos
,
aRotCentre
,
aA
ngle
);
m_Text
->
m_Orient
+=
angle
;
m_Text
->
m_Orient
+=
a
A
ngle
;
if
(
m_Text
->
m_Orient
>=
3600
)
if
(
m_Text
->
m_Orient
>=
3600
)
m_Text
->
m_Orient
-=
3600
;
m_Text
->
m_Orient
-=
3600
;
if
(
(
m_Text
->
m_Orient
>
900
)
&&
(
m_Text
->
m_Orient
<
2700
)
)
if
(
(
m_Text
->
m_Orient
>
900
)
&&
(
m_Text
->
m_Orient
<
2700
)
)
m_Text
->
m_Orient
-=
1800
;
m_Text
->
m_Orient
-=
1800
;
RotatePoint
(
&
Barre_ox
,
&
Barre_oy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
Barre_ox
,
&
Barre_oy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
Barre_fx
,
&
Barre_fy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
Barre_fx
,
&
Barre_fy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
TraitG_ox
,
&
TraitG_oy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
TraitG_ox
,
&
TraitG_oy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
TraitG_fx
,
&
TraitG_fy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
TraitG_fx
,
&
TraitG_fy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
TraitD_ox
,
&
TraitD_oy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
TraitD_ox
,
&
TraitD_oy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
TraitD_fx
,
&
TraitD_fy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
TraitD_fx
,
&
TraitD_fy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheG1_ox
,
&
FlecheG1_oy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheG1_ox
,
&
FlecheG1_oy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheG1_fx
,
&
FlecheG1_fy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheG1_fx
,
&
FlecheG1_fy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheG2_ox
,
&
FlecheG2_oy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheG2_ox
,
&
FlecheG2_oy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheG2_fx
,
&
FlecheG2_fy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheG2_fx
,
&
FlecheG2_fy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheD1_ox
,
&
FlecheD1_oy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheD1_ox
,
&
FlecheD1_oy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheD1_fx
,
&
FlecheD1_fy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheD1_fx
,
&
FlecheD1_fy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheD2_ox
,
&
FlecheD2_oy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheD2_ox
,
&
FlecheD2_oy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheD2_fx
,
&
FlecheD2_fy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheD2_fx
,
&
FlecheD2_fy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
}
}
/**
/**
* Function Flip
* Function Flip
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
void
DIMENSION
::
Flip
(
const
wxPoint
&
aCentre
)
void
DIMENSION
::
Flip
(
const
wxPoint
&
aCentre
)
{
{
...
@@ -733,7 +733,7 @@ bool DIMENSION::HitTest( const wxPoint& ref_pos )
...
@@ -733,7 +733,7 @@ bool DIMENSION::HitTest( const wxPoint& ref_pos )
/**
/**
* Function HitTest (overlaid)
* Function HitTest (overlaid)
* tests if the given EDA_Rect intersect this object.
* tests if the given EDA_Rect intersect this object.
* @param
EDA_Rect
: the given EDA_Rect
* @param
refArea
: the given EDA_Rect
* @return bool - true if a hit, else false
* @return bool - true if a hit, else false
*/
*/
bool
DIMENSION
::
HitTest
(
EDA_Rect
&
refArea
)
bool
DIMENSION
::
HitTest
(
EDA_Rect
&
refArea
)
...
...
pcbnew/class_dimension.h
View file @
a9010796
...
@@ -74,7 +74,7 @@ public:
...
@@ -74,7 +74,7 @@ public:
/**
/**
* Function Rotate
* Function Rotate
* Rotate this object.
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
* @param aAngle - the rotation angle in 0.1 degree.
*/
*/
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
...
@@ -82,7 +82,7 @@ public:
...
@@ -82,7 +82,7 @@ public:
/**
/**
* Function Flip
* Function Flip
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
...
...
pcbnew/class_drawsegment.cpp
View file @
a9010796
...
@@ -50,7 +50,7 @@ void DRAWSEGMENT::Copy( DRAWSEGMENT* source )
...
@@ -50,7 +50,7 @@ void DRAWSEGMENT::Copy( DRAWSEGMENT* source )
/**
/**
* Function Rotate
* Function Rotate
* Rotate this object.
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
* @param aAngle - the rotation angle in 0.1 degree.
*/
*/
void
DRAWSEGMENT
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
void
DRAWSEGMENT
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
...
@@ -62,7 +62,7 @@ void DRAWSEGMENT::Rotate(const wxPoint& aRotCentre, int aAngle)
...
@@ -62,7 +62,7 @@ void DRAWSEGMENT::Rotate(const wxPoint& aRotCentre, int aAngle)
/**
/**
* Function Flip
* Function Flip
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
void
DRAWSEGMENT
::
Flip
(
const
wxPoint
&
aCentre
)
void
DRAWSEGMENT
::
Flip
(
const
wxPoint
&
aCentre
)
{
{
...
@@ -418,10 +418,10 @@ void DRAWSEGMENT::DisplayInfo( WinEDA_DrawFrame* frame )
...
@@ -418,10 +418,10 @@ void DRAWSEGMENT::DisplayInfo( WinEDA_DrawFrame* frame )
/**
/**
* Function HitTest
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* tests if the given wxPoint is within the bounds of this object.
* @param
ref_p
os A wxPoint to test
* @param
aRefP
os A wxPoint to test
* @return bool - true if a hit, else false
* @return bool - true if a hit, else false
*/
*/
bool
DRAWSEGMENT
::
HitTest
(
const
wxPoint
&
ref_p
os
)
bool
DRAWSEGMENT
::
HitTest
(
const
wxPoint
&
aRefP
os
)
{
{
int
ux0
=
m_Start
.
x
;
int
ux0
=
m_Start
.
x
;
int
uy0
=
m_Start
.
y
;
int
uy0
=
m_Start
.
y
;
...
@@ -430,8 +430,8 @@ bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos )
...
@@ -430,8 +430,8 @@ bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos )
int
dx
=
m_End
.
x
-
ux0
;
int
dx
=
m_End
.
x
-
ux0
;
int
dy
=
m_End
.
y
-
uy0
;
int
dy
=
m_End
.
y
-
uy0
;
int
spot_cX
=
ref_p
os
.
x
-
ux0
;
int
spot_cX
=
aRefP
os
.
x
-
ux0
;
int
spot_cY
=
ref_p
os
.
y
-
uy0
;
int
spot_cY
=
aRefP
os
.
y
-
uy0
;
switch
(
m_Shape
){
switch
(
m_Shape
){
case
S_CIRCLE
:
case
S_CIRCLE
:
...
@@ -465,7 +465,7 @@ bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos )
...
@@ -465,7 +465,7 @@ bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos )
case
S_CURVE
:
case
S_CURVE
:
for
(
unsigned
int
i
=
1
;
i
<
m_BezierPoints
.
size
();
i
++
)
for
(
unsigned
int
i
=
1
;
i
<
m_BezierPoints
.
size
();
i
++
)
{
{
if
(
TestSegmentHit
(
ref_p
os
,
m_BezierPoints
[
i
-
1
],
if
(
TestSegmentHit
(
aRefP
os
,
m_BezierPoints
[
i
-
1
],
m_BezierPoints
[
i
-
1
],
m_Width
/
2
)
)
m_BezierPoints
[
i
-
1
],
m_Width
/
2
)
)
return
true
;
return
true
;
}
}
...
...
pcbnew/class_drawsegment.h
View file @
a9010796
...
@@ -80,16 +80,16 @@ public:
...
@@ -80,16 +80,16 @@ public:
/**
/**
* Function HitTest
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* tests if the given wxPoint is within the bounds of this object.
* @param
ref_p
os A wxPoint to test
* @param
aRefP
os A wxPoint to test
* @return bool - true if a hit, else false
* @return bool - true if a hit, else false
*/
*/
bool
HitTest
(
const
wxPoint
&
ref_p
os
);
bool
HitTest
(
const
wxPoint
&
aRefP
os
);
/**
/**
* Function HitTest (overlayed)
* Function HitTest (overlayed)
* tests if the given EDA_Rect intersect this object.
* tests if the given EDA_Rect intersect this object.
* For now, an ending point must be inside this rect.
* For now, an ending point must be inside this rect.
* @param ref
Pos
the given EDA_Rect to test
* @param ref
Area
the given EDA_Rect to test
* @return bool - true if a hit, else false
* @return bool - true if a hit, else false
*/
*/
bool
HitTest
(
EDA_Rect
&
refArea
);
bool
HitTest
(
EDA_Rect
&
refArea
);
...
@@ -121,7 +121,7 @@ public:
...
@@ -121,7 +121,7 @@ public:
/**
/**
* Function Move
* Function Move
* move this object.
* move this object.
* @param
const wxPoint&
aMoveVector - the move vector for this object.
* @param aMoveVector - the move vector for this object.
*/
*/
virtual
void
Move
(
const
wxPoint
&
aMoveVector
)
virtual
void
Move
(
const
wxPoint
&
aMoveVector
)
{
{
...
@@ -133,7 +133,7 @@ public:
...
@@ -133,7 +133,7 @@ public:
/**
/**
* Function Rotate
* Function Rotate
* Rotate this object.
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
* @param aAngle - the rotation angle in 0.1 degree.
*/
*/
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
...
@@ -141,7 +141,7 @@ public:
...
@@ -141,7 +141,7 @@ public:
/**
/**
* Function Flip
* Function Flip
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
...
...
pcbnew/class_edge_mod.cpp
View file @
a9010796
...
@@ -499,7 +499,7 @@ int EDGE_MODULE::ReadDescr( char* Line, FILE* File,
...
@@ -499,7 +499,7 @@ int EDGE_MODULE::ReadDescr( char* Line, FILE* File,
* @param refPos A wxPoint to test
* @param refPos A wxPoint to test
* @return bool - true if a hit, else false
* @return bool - true if a hit, else false
*/
*/
bool
EDGE_MODULE
::
HitTest
(
const
wxPoint
&
ref
_p
os
)
bool
EDGE_MODULE
::
HitTest
(
const
wxPoint
&
ref
P
os
)
{
{
int
uxf
,
uyf
;
int
uxf
,
uyf
;
int
rayon
,
dist
;
int
rayon
,
dist
;
...
@@ -515,8 +515,8 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos )
...
@@ -515,8 +515,8 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos )
switch
(
m_Shape
)
switch
(
m_Shape
)
{
{
case
S_SEGMENT
:
case
S_SEGMENT
:
spot_cX
=
ref
_p
os
.
x
-
ux0
;
spot_cX
=
ref
P
os
.
x
-
ux0
;
spot_cY
=
ref
_p
os
.
y
-
uy0
;
spot_cY
=
ref
P
os
.
y
-
uy0
;
dx
=
uxf
-
ux0
;
dx
=
uxf
-
ux0
;
dy
=
uyf
-
uy0
;
dy
=
uyf
-
uy0
;
...
@@ -526,21 +526,21 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos )
...
@@ -526,21 +526,21 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos )
case
S_CIRCLE
:
case
S_CIRCLE
:
rayon
=
(
int
)
hypot
(
(
double
)
(
uxf
-
ux0
),
(
double
)
(
uyf
-
uy0
)
);
rayon
=
(
int
)
hypot
(
(
double
)
(
uxf
-
ux0
),
(
double
)
(
uyf
-
uy0
)
);
dist
=
(
int
)
hypot
(
(
double
)
(
ref
_p
os
.
x
-
ux0
),
dist
=
(
int
)
hypot
(
(
double
)
(
ref
P
os
.
x
-
ux0
),
(
double
)
(
ref
_p
os
.
y
-
uy0
)
);
(
double
)
(
ref
P
os
.
y
-
uy0
)
);
if
(
abs
(
rayon
-
dist
)
<=
m_Width
)
if
(
abs
(
rayon
-
dist
)
<=
m_Width
)
return
true
;
return
true
;
break
;
break
;
case
S_ARC
:
case
S_ARC
:
rayon
=
(
int
)
hypot
(
(
double
)
(
uxf
-
ux0
),
(
double
)
(
uyf
-
uy0
)
);
rayon
=
(
int
)
hypot
(
(
double
)
(
uxf
-
ux0
),
(
double
)
(
uyf
-
uy0
)
);
dist
=
(
int
)
hypot
(
(
double
)
(
ref
_p
os
.
x
-
ux0
),
dist
=
(
int
)
hypot
(
(
double
)
(
ref
P
os
.
x
-
ux0
),
(
double
)
(
ref
_p
os
.
y
-
uy0
)
);
(
double
)
(
ref
P
os
.
y
-
uy0
)
);
if
(
abs
(
rayon
-
dist
)
>
m_Width
)
if
(
abs
(
rayon
-
dist
)
>
m_Width
)
break
;
break
;
int
mouseAngle
=
(
int
)
ArcTangente
(
ref
_pos
.
y
-
uy0
,
ref_p
os
.
x
-
ux0
);
int
mouseAngle
=
(
int
)
ArcTangente
(
ref
Pos
.
y
-
uy0
,
refP
os
.
x
-
ux0
);
int
stAngle
=
(
int
)
ArcTangente
(
uyf
-
uy0
,
uxf
-
ux0
);
int
stAngle
=
(
int
)
ArcTangente
(
uyf
-
uy0
,
uxf
-
ux0
);
int
endAngle
=
stAngle
+
m_Angle
;
int
endAngle
=
stAngle
+
m_Angle
;
...
...
pcbnew/class_marker_pcb.cpp
View file @
a9010796
...
@@ -82,7 +82,7 @@ void MARKER_PCB::DisplayInfo( WinEDA_DrawFrame* frame )
...
@@ -82,7 +82,7 @@ void MARKER_PCB::DisplayInfo( WinEDA_DrawFrame* frame )
/**
/**
* Function Rotate
* Function Rotate
* Rotate this object.
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
* @param aAngle - the rotation angle in 0.1 degree.
*/
*/
void
MARKER_PCB
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
void
MARKER_PCB
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
...
@@ -95,7 +95,7 @@ void MARKER_PCB::Rotate(const wxPoint& aRotCentre, int aAngle)
...
@@ -95,7 +95,7 @@ void MARKER_PCB::Rotate(const wxPoint& aRotCentre, int aAngle)
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* this function has not reeally sense for a marker.
* this function has not reeally sense for a marker.
* It moves just the marker to keep its position on board, when the board is flipped
* It moves just the marker to keep its position on board, when the board is flipped
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
void
MARKER_PCB
::
Flip
(
const
wxPoint
&
aCentre
)
void
MARKER_PCB
::
Flip
(
const
wxPoint
&
aCentre
)
{
{
...
...
pcbnew/class_marker_pcb.h
View file @
a9010796
...
@@ -43,7 +43,7 @@ public:
...
@@ -43,7 +43,7 @@ public:
/**
/**
* Function Move
* Function Move
* move this object.
* move this object.
* @param
const wxPoint&
aMoveVector - the move vector for this object.
* @param aMoveVector - the move vector for this object.
*/
*/
virtual
void
Move
(
const
wxPoint
&
aMoveVector
)
virtual
void
Move
(
const
wxPoint
&
aMoveVector
)
{
{
...
@@ -53,7 +53,7 @@ public:
...
@@ -53,7 +53,7 @@ public:
/**
/**
* Function Rotate
* Function Rotate
* Rotate this object.
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
* @param aAngle - the rotation angle in 0.1 degree.
*/
*/
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
...
@@ -61,7 +61,7 @@ public:
...
@@ -61,7 +61,7 @@ public:
/**
/**
* Function Flip
* Function Flip
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
...
...
pcbnew/class_mire.cpp
View file @
a9010796
...
@@ -195,7 +195,7 @@ bool MIREPCB::HitTest( const wxPoint& refPos )
...
@@ -195,7 +195,7 @@ bool MIREPCB::HitTest( const wxPoint& refPos )
/**
/**
* Function HitTest (overlayed)
* Function HitTest (overlayed)
* tests if the given EDA_Rect intersect this object.
* tests if the given EDA_Rect intersect this object.
* @param
EDA_Rect
: the given EDA_Rect
* @param
refArea
: the given EDA_Rect
* @return bool - true if a hit, else false
* @return bool - true if a hit, else false
*/
*/
bool
MIREPCB
::
HitTest
(
EDA_Rect
&
refArea
)
bool
MIREPCB
::
HitTest
(
EDA_Rect
&
refArea
)
...
@@ -209,7 +209,7 @@ bool MIREPCB::HitTest( EDA_Rect& refArea )
...
@@ -209,7 +209,7 @@ bool MIREPCB::HitTest( EDA_Rect& refArea )
/**
/**
* Function Rotate
* Function Rotate
* Rotate this object.
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
* @param aAngle - the rotation angle in 0.1 degree.
*/
*/
void
MIREPCB
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
void
MIREPCB
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
...
@@ -221,7 +221,7 @@ void MIREPCB::Rotate(const wxPoint& aRotCentre, int aAngle)
...
@@ -221,7 +221,7 @@ void MIREPCB::Rotate(const wxPoint& aRotCentre, int aAngle)
/**
/**
* Function Flip
* Function Flip
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
void
MIREPCB
::
Flip
(
const
wxPoint
&
aCentre
)
void
MIREPCB
::
Flip
(
const
wxPoint
&
aCentre
)
{
{
...
...
pcbnew/class_mire.h
View file @
a9010796
...
@@ -31,7 +31,7 @@ public:
...
@@ -31,7 +31,7 @@ public:
/**
/**
* Function Move
* Function Move
* move this object.
* move this object.
* @param
const wxPoint&
aMoveVector - the move vector for this object.
* @param aMoveVector - the move vector for this object.
*/
*/
virtual
void
Move
(
const
wxPoint
&
aMoveVector
)
virtual
void
Move
(
const
wxPoint
&
aMoveVector
)
{
{
...
@@ -41,7 +41,7 @@ public:
...
@@ -41,7 +41,7 @@ public:
/**
/**
* Function Rotate
* Function Rotate
* Rotate this object.
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
* @param aAngle - the rotation angle in 0.1 degree.
*/
*/
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
...
@@ -49,7 +49,7 @@ public:
...
@@ -49,7 +49,7 @@ public:
/**
/**
* Function Flip
* Function Flip
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
...
...
pcbnew/class_module.cpp
View file @
a9010796
...
@@ -178,13 +178,13 @@ void MODULE::Copy( MODULE* aModule )
...
@@ -178,13 +178,13 @@ void MODULE::Copy( MODULE* aModule )
/**
/**
* Function Draw
* Function Draw
* Draws the footprint to the current Device Context
* Draws the footprint to the current Device Context
*
@param panel = The active Draw Panel (used to know the clip box)
*
@param aPanel = draw panel, Used to know the clip box
*
@param DC = c
urrent Device Context
*
@param aDC = C
urrent Device Context
*
@param offset = draw offset (usually wxPoint(0,0)
*
@param aDrawMode = GR_OR, GR_XOR..
*
@param draw_mode = GR_OR, GR_XOR, GR_AND
*
@param aOffset = draw offset (usually wxPoint(0,0)
*/
*/
void
MODULE
::
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
void
MODULE
::
Draw
(
WinEDA_DrawPanel
*
aPanel
,
wxDC
*
a
DC
,
int
draw_mode
,
const
wxPoint
&
o
ffset
)
int
aDrawMode
,
const
wxPoint
&
aO
ffset
)
{
{
if
(
(
m_Flags
&
DO_NOT_DRAW
)
||
(
m_Flags
&
IS_MOVED
)
)
if
(
(
m_Flags
&
DO_NOT_DRAW
)
||
(
m_Flags
&
IS_MOVED
)
)
return
;
return
;
...
@@ -194,25 +194,25 @@ void MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
...
@@ -194,25 +194,25 @@ void MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
if
(
pad
->
m_Flags
&
IS_MOVED
)
if
(
pad
->
m_Flags
&
IS_MOVED
)
continue
;
continue
;
pad
->
Draw
(
panel
,
DC
,
draw_mode
,
o
ffset
);
pad
->
Draw
(
aPanel
,
aDC
,
aDrawMode
,
aO
ffset
);
}
}
BOARD
*
brd
=
GetBoard
();
BOARD
*
brd
=
GetBoard
();
// Draws footprint anchor
// Draws footprint anchor
DrawAncre
(
panel
,
DC
,
offset
,
DIM_ANCRE_MODULE
,
draw_m
ode
);
DrawAncre
(
aPanel
,
aDC
,
aOffset
,
DIM_ANCRE_MODULE
,
aDrawM
ode
);
/* Draw graphic items */
/* Draw graphic items */
if
(
brd
->
IsElementVisible
(
MOD_REFERENCES_VISIBLE
)
)
if
(
brd
->
IsElementVisible
(
MOD_REFERENCES_VISIBLE
)
)
{
{
if
(
!
(
m_Reference
->
m_Flags
&
IS_MOVED
)
)
if
(
!
(
m_Reference
->
m_Flags
&
IS_MOVED
)
)
m_Reference
->
Draw
(
panel
,
DC
,
draw_mode
,
o
ffset
);
m_Reference
->
Draw
(
aPanel
,
aDC
,
aDrawMode
,
aO
ffset
);
}
}
if
(
brd
->
IsElementVisible
(
MOD_VALUES_VISIBLE
)
)
if
(
brd
->
IsElementVisible
(
MOD_VALUES_VISIBLE
)
)
{
{
if
(
!
(
m_Value
->
m_Flags
&
IS_MOVED
)
)
if
(
!
(
m_Value
->
m_Flags
&
IS_MOVED
)
)
m_Value
->
Draw
(
panel
,
DC
,
draw_mode
,
o
ffset
);
m_Value
->
Draw
(
aPanel
,
aDC
,
aDrawMode
,
aO
ffset
);
}
}
for
(
BOARD_ITEM
*
item
=
m_Drawings
;
item
;
item
=
item
->
Next
()
)
for
(
BOARD_ITEM
*
item
=
m_Drawings
;
item
;
item
=
item
->
Next
()
)
...
@@ -224,7 +224,7 @@ void MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
...
@@ -224,7 +224,7 @@ void MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
{
{
case
TYPE_TEXTE_MODULE
:
case
TYPE_TEXTE_MODULE
:
case
TYPE_EDGE_MODULE
:
case
TYPE_EDGE_MODULE
:
item
->
Draw
(
panel
,
DC
,
draw_mode
,
o
ffset
);
item
->
Draw
(
aPanel
,
aDC
,
aDrawMode
,
aO
ffset
);
break
;
break
;
default
:
default
:
...
...
pcbnew/class_module.h
View file @
a9010796
...
@@ -100,7 +100,7 @@ public:
...
@@ -100,7 +100,7 @@ public:
void
Copy
(
MODULE
*
Module
);
// Copy structure
void
Copy
(
MODULE
*
Module
);
// Copy structure
/*
*
/*
* Function Add
* Function Add
* adds the given item to this MODULE and takes ownership of its memory.
* adds the given item to this MODULE and takes ownership of its memory.
* @param aBoardItem The item to add to this board.
* @param aBoardItem The item to add to this board.
...
@@ -154,14 +154,14 @@ public:
...
@@ -154,14 +154,14 @@ public:
/**
/**
* Function Move
* Function Move
* move this object.
* move this object.
* @param
const wxPoint&
aMoveVector - the move vector for this object.
* @param aMoveVector - the move vector for this object.
*/
*/
virtual
void
Move
(
const
wxPoint
&
aMoveVector
);
virtual
void
Move
(
const
wxPoint
&
aMoveVector
);
/**
/**
* Function Rotate
* Function Rotate
* Rotate this object.
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
* @param aAngle - the rotation angle in 0.1 degree.
*/
*/
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
...
@@ -169,14 +169,14 @@ public:
...
@@ -169,14 +169,14 @@ public:
/**
/**
* Function Flip
* Function Flip
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
/**
/**
* Function IsLocked
* Function IsLocked
* (virtual from BOARD_ITEM )
* (virtual from BOARD_ITEM )
* @return
s
bool - true if the MODULE is locked, else false
* @return bool - true if the MODULE is locked, else false
*/
*/
bool
IsLocked
()
const
bool
IsLocked
()
const
{
{
...
@@ -204,7 +204,7 @@ public:
...
@@ -204,7 +204,7 @@ public:
* Function Save
* Function Save
* writes the data structures for this object out to a FILE in "*.brd"
* writes the data structures for this object out to a FILE in "*.brd"
* format.
* format.
*
a
@param aFile The FILE to write to.
* @param aFile The FILE to write to.
* @return bool - true if success writing else false.
* @return bool - true if success writing else false.
*/
*/
bool
Save
(
FILE
*
aFile
)
const
;
bool
Save
(
FILE
*
aFile
)
const
;
...
@@ -227,15 +227,15 @@ public:
...
@@ -227,15 +227,15 @@ public:
/**
/**
* Function Draw
* Function Draw
* Draw the text according to the footprint pos and orient
* Draw the text according to the footprint pos and orient
* @param panel = draw panel, Used to know the clip box
* @param aPanel = draw panel, Used to know the clip box
* @param DC = Current Device Context
* @param aDC = Current Device Context
* @param offset = draw offset (usually wxPoint(0,0)
* @param aDrawMode = GR_OR, GR_XOR..
* @param aDrawMode = GR_OR, GR_XOR..
* @param aOffset = draw offset (usually wxPoint(0,0)
*/
*/
void
Draw
(
WinEDA_DrawPanel
*
p
anel
,
void
Draw
(
WinEDA_DrawPanel
*
aP
anel
,
wxDC
*
DC
,
wxDC
*
a
DC
,
int
aDrawMode
,
int
aDrawMode
,
const
wxPoint
&
o
ffset
=
ZeroOffset
);
const
wxPoint
&
aO
ffset
=
ZeroOffset
);
void
Draw3D
(
Pcb3D_GLCanvas
*
glcanvas
);
void
Draw3D
(
Pcb3D_GLCanvas
*
glcanvas
);
void
DrawEdgesOnly
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
void
DrawEdgesOnly
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
...
@@ -293,7 +293,7 @@ public:
...
@@ -293,7 +293,7 @@ public:
* Function FindPadByName
* Function FindPadByName
* returns a D_PAD* with a matching name. Note that names may not be
* returns a D_PAD* with a matching name. Note that names may not be
* unique, depending on how the foot print was created.
* unique, depending on how the foot print was created.
* @param
* @param
aPadName the pad name to find
* @return D_PAD* - The first matching name is returned, or NULL if not
* @return D_PAD* - The first matching name is returned, or NULL if not
* found.
* found.
*/
*/
...
...
pcbnew/class_module_transform_functions.cpp
View file @
a9010796
...
@@ -122,7 +122,7 @@ int ChangeSideMaskLayer( int masque )
...
@@ -122,7 +122,7 @@ int ChangeSideMaskLayer( int masque )
/**
/**
* Function Move (virtual)
* Function Move (virtual)
* move this object.
* move this object.
* @param
const wxPoint&
aMoveVector - the move vector for this object.
* @param aMoveVector - the move vector for this object.
*/
*/
void
MODULE
::
Move
(
const
wxPoint
&
aMoveVector
)
void
MODULE
::
Move
(
const
wxPoint
&
aMoveVector
)
{
{
...
@@ -134,7 +134,7 @@ void MODULE::Move(const wxPoint& aMoveVector)
...
@@ -134,7 +134,7 @@ void MODULE::Move(const wxPoint& aMoveVector)
/**
/**
* Function Rotate
* Function Rotate
* Rotate this object.
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
* @param aAngle - the rotation angle in 0.1 degree.
*/
*/
void
MODULE
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
void
MODULE
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
...
@@ -149,7 +149,7 @@ void MODULE::Rotate(const wxPoint& aRotCentre, int aAngle)
...
@@ -149,7 +149,7 @@ void MODULE::Rotate(const wxPoint& aRotCentre, int aAngle)
/**
/**
* Function Flip
* Function Flip
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
void
MODULE
::
Flip
(
const
wxPoint
&
aCentre
)
void
MODULE
::
Flip
(
const
wxPoint
&
aCentre
)
{
{
...
...
pcbnew/class_netclass.h
View file @
a9010796
...
@@ -84,6 +84,8 @@ public:
...
@@ -84,6 +84,8 @@ public:
/**
/**
* Constructor
* Constructor
* stuffs a NETCLASS instance with aParent, aName, and optionally the initialParameters
* stuffs a NETCLASS instance with aParent, aName, and optionally the initialParameters
* @param aParent = the parent board
* @param aName = the name of this new netclass
* @param initialParameters is a NETCLASS to copy parameters from, or if
* @param initialParameters is a NETCLASS to copy parameters from, or if
* NULL tells me to copy from g_DesignSettings.
* NULL tells me to copy from g_DesignSettings.
*/
*/
...
@@ -205,6 +207,7 @@ public:
...
@@ -205,6 +207,7 @@ public:
* Function ReadDescr
* Function ReadDescr
* reads the data structures for this object from a FILE in "*.brd" format.
* reads the data structures for this object from a FILE in "*.brd" format.
* @param aFile The FILE to read to.
* @param aFile The FILE to read to.
* @param aLineNum a pointer to a line number counter
* @return bool - true if success reading else false.
* @return bool - true if success reading else false.
*/
*/
bool
ReadDescr
(
FILE
*
aFile
,
int
*
aLineNum
);
bool
ReadDescr
(
FILE
*
aFile
,
int
*
aLineNum
);
...
...
pcbnew/class_netinfo.h
View file @
a9010796
...
@@ -361,7 +361,7 @@ public:
...
@@ -361,7 +361,7 @@ public:
/**
/**
* Function SetNetname
* Function SetNetname
* @param
const wxString
: the new netname
* @param
aNetname
: the new netname
*/
*/
void
SetNetname
(
const
wxString
&
aNetname
);
void
SetNetname
(
const
wxString
&
aNetname
);
...
...
pcbnew/class_netinfo_item.cpp
View file @
a9010796
...
@@ -93,7 +93,7 @@ out:
...
@@ -93,7 +93,7 @@ out:
/**
/**
* Function SetNetname
* Function SetNetname
* @param
const wxString
: the new netname
* @param
aNetname
: the new netname
*/
*/
void
NETINFO_ITEM
::
SetNetname
(
const
wxString
&
aNetname
)
void
NETINFO_ITEM
::
SetNetname
(
const
wxString
&
aNetname
)
{
{
...
...
pcbnew/class_pad.cpp
View file @
a9010796
...
@@ -180,7 +180,7 @@ void D_PAD::SetPadName( const wxString& name )
...
@@ -180,7 +180,7 @@ void D_PAD::SetPadName( const wxString& name )
/**
/**
* Function SetNetname
* Function SetNetname
* @param
const wxString
: the new netname
* @param
aNetname
: the new netname
*/
*/
void
D_PAD
::
SetNetname
(
const
wxString
&
aNetname
)
void
D_PAD
::
SetNetname
(
const
wxString
&
aNetname
)
{
{
...
@@ -772,17 +772,17 @@ bool D_PAD::IsOnLayer( int aLayer ) const
...
@@ -772,17 +772,17 @@ bool D_PAD::IsOnLayer( int aLayer ) const
/**
/**
* Function HitTest
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* tests if the given wxPoint is within the bounds of this object.
* @param ref
_p
os A wxPoint to test
* @param ref
P
os A wxPoint to test
* @return bool - true if a hit, else false
* @return bool - true if a hit, else false
*/
*/
bool
D_PAD
::
HitTest
(
const
wxPoint
&
ref
_p
os
)
bool
D_PAD
::
HitTest
(
const
wxPoint
&
ref
P
os
)
{
{
int
dx
,
dy
;
int
dx
,
dy
;
double
dist
;
double
dist
;
wxPoint
shape_pos
=
ReturnShapePos
();
wxPoint
shape_pos
=
ReturnShapePos
();
wxPoint
delta
=
ref
_p
os
-
shape_pos
;
wxPoint
delta
=
ref
P
os
-
shape_pos
;
/* Quick test: a test point must be inside the circle. */
/* Quick test: a test point must be inside the circle. */
if
(
(
abs
(
delta
.
x
)
>
m_ShapeMaxRadius
)
||
(
abs
(
delta
.
y
)
>
m_ShapeMaxRadius
)
)
if
(
(
abs
(
delta
.
x
)
>
m_ShapeMaxRadius
)
||
(
abs
(
delta
.
y
)
>
m_ShapeMaxRadius
)
)
...
...
pcbnew/class_pad.h
View file @
a9010796
...
@@ -140,7 +140,7 @@ public:
...
@@ -140,7 +140,7 @@ public:
/**
/**
* Function SetNetname
* Function SetNetname
* @param
const wxString
: the new netname
* @param
aNetname
: the new netname
*/
*/
void
SetNetname
(
const
wxString
&
aNetname
);
void
SetNetname
(
const
wxString
&
aNetname
);
...
@@ -230,8 +230,14 @@ public:
...
@@ -230,8 +230,14 @@ public:
/* drawing functions */
/* drawing functions */
void
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
/** Draw a pad:
int
aDrawMode
,
const
wxPoint
&
offset
=
ZeroOffset
);
* @param aPanel = the WinEDA_DrawPanel panel
* @param aDC = the current device context
* @param aDraw_mode = mode: GR_OR, GR_XOR, GR_AND...
* @param aOffset = draw offset
*/
void
Draw
(
WinEDA_DrawPanel
*
aPanel
,
wxDC
*
aDC
,
int
aDrawMode
,
const
wxPoint
&
aOffset
=
ZeroOffset
);
void
Draw3D
(
Pcb3D_GLCanvas
*
glcanvas
);
void
Draw3D
(
Pcb3D_GLCanvas
*
glcanvas
);
...
@@ -247,7 +253,7 @@ public:
...
@@ -247,7 +253,7 @@ public:
* Has meaning only for polygonal pads (trapezoid and rectangular)
* Has meaning only for polygonal pads (trapezoid and rectangular)
* Build the Corner list of the polygonal shape,
* Build the Corner list of the polygonal shape,
* depending on shape, extra size (clearance ...) and orientation
* depending on shape, extra size (clearance ...) and orientation
* @param aCoord
[4] = a buffer to fill
.
* @param aCoord
= a buffer to fill (4 corners)
.
* @param aInflateValue = wxSize: the clearance or margin value. value > 0: inflate, < 0 deflate
* @param aInflateValue = wxSize: the clearance or margin value. value > 0: inflate, < 0 deflate
* @param aRotation = full rotation of the polygon
* @param aRotation = full rotation of the polygon
*/
*/
...
@@ -341,7 +347,7 @@ public:
...
@@ -341,7 +347,7 @@ public:
/**
/**
* Function Move
* Function Move
* move this object.
* move this object.
* @param
const wxPoint&
aMoveVector - the move vector for this object.
* @param aMoveVector - the move vector for this object.
*/
*/
virtual
void
Move
(
const
wxPoint
&
aMoveVector
)
virtual
void
Move
(
const
wxPoint
&
aMoveVector
)
{
{
...
...
pcbnew/class_pad_draw_functions.cpp
View file @
a9010796
...
@@ -45,7 +45,7 @@ PAD_DRAWINFO::PAD_DRAWINFO()
...
@@ -45,7 +45,7 @@ PAD_DRAWINFO::PAD_DRAWINFO()
/** Draw a pad:
/** Draw a pad:
* @param a
DC = device context
* @param a
Panel = the WinEDA_DrawPanel panel
* @param aDraw_mode = mode: GR_OR, GR_XOR, GR_AND...
* @param aDraw_mode = mode: GR_OR, GR_XOR, GR_AND...
* @param aOffset = draw offset
* @param aOffset = draw offset
*/
*/
...
@@ -663,7 +663,7 @@ int D_PAD::BuildSegmentFromOvalShape(wxPoint& aSegStart, wxPoint& aSegEnd, int a
...
@@ -663,7 +663,7 @@ int D_PAD::BuildSegmentFromOvalShape(wxPoint& aSegStart, wxPoint& aSegEnd, int a
* Has meaning only for polygonal pads (trapeziod and rectangular)
* Has meaning only for polygonal pads (trapeziod and rectangular)
* Build the Corner list of the polygonal shape,
* Build the Corner list of the polygonal shape,
* depending on shape, extra size (clearance ...) and orientation
* depending on shape, extra size (clearance ...) and orientation
* @param aCoord
[4]
= a buffer to fill.
* @param aCoord = a buffer to fill.
* @param aInflateValue = wxSize: the clearance or margin value. value > 0: inflate, < 0 deflate
* @param aInflateValue = wxSize: the clearance or margin value. value > 0: inflate, < 0 deflate
* @param aRotation = full rotation of the polygon, usually m_Orient
* @param aRotation = full rotation of the polygon, usually m_Orient
*/
*/
...
...
pcbnew/class_pcb_layer_widget.h
View file @
a9010796
...
@@ -61,6 +61,8 @@ public:
...
@@ -61,6 +61,8 @@ public:
/**
/**
* Constructor
* Constructor
* @param aParent is the parent window
* @param aFocusOwner is the window that should be sent the focus after
* @param aPointSize is the font point size to use within the widget. This
* @param aPointSize is the font point size to use within the widget. This
* effectively sets the overal size of the widget via the row height and bitmap
* effectively sets the overal size of the widget via the row height and bitmap
* button sizes.
* button sizes.
...
...
pcbnew/class_pcb_text.cpp
View file @
a9010796
...
@@ -180,9 +180,8 @@ bool TEXTE_PCB::Save( FILE* aFile ) const
...
@@ -180,9 +180,8 @@ bool TEXTE_PCB::Save( FILE* aFile ) const
}
}
/*
*
/*
* Function Draw
* Function Draw
* DrawMode = GR_OR, GR_XOR ..
* Like tracks, texts are drawn in filled or sketch mode, never in line mode
* Like tracks, texts are drawn in filled or sketch mode, never in line mode
* because the line mode does not keep the actual size of the text
* because the line mode does not keep the actual size of the text
* and the actual size is very important, especially for copper texts
* and the actual size is very important, especially for copper texts
...
@@ -258,7 +257,7 @@ void TEXTE_PCB::DisplayInfo( WinEDA_DrawFrame* frame )
...
@@ -258,7 +257,7 @@ void TEXTE_PCB::DisplayInfo( WinEDA_DrawFrame* frame )
/**
/**
* Function Rotate
* Function Rotate
* Rotate this object.
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
* @param aAngle - the rotation angle in 0.1 degree.
*/
*/
void
TEXTE_PCB
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
void
TEXTE_PCB
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
...
@@ -275,7 +274,7 @@ void TEXTE_PCB::Rotate(const wxPoint& aRotCentre, int aAngle)
...
@@ -275,7 +274,7 @@ void TEXTE_PCB::Rotate(const wxPoint& aRotCentre, int aAngle)
/**
/**
* Function Flip
* Function Flip
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
void
TEXTE_PCB
::
Flip
(
const
wxPoint
&
aCentre
)
void
TEXTE_PCB
::
Flip
(
const
wxPoint
&
aCentre
)
{
{
...
...
pcbnew/class_pcb_text.h
View file @
a9010796
...
@@ -28,7 +28,7 @@ public:
...
@@ -28,7 +28,7 @@ public:
/**
/**
* Function Move
* Function Move
* move this object.
* move this object.
* @param
const wxPoint&
aMoveVector - the move vector for this object.
* @param aMoveVector - the move vector for this object.
*/
*/
virtual
void
Move
(
const
wxPoint
&
aMoveVector
)
virtual
void
Move
(
const
wxPoint
&
aMoveVector
)
{
{
...
@@ -38,7 +38,7 @@ public:
...
@@ -38,7 +38,7 @@ public:
/**
/**
* Function Rotate
* Function Rotate
* Rotate this object.
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
* @param aAngle - the rotation angle in 0.1 degree.
*/
*/
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
...
@@ -46,7 +46,7 @@ public:
...
@@ -46,7 +46,7 @@ public:
/**
/**
* Function Flip
* Function Flip
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
...
...
pcbnew/class_text_mod.cpp
View file @
a9010796
...
@@ -93,11 +93,11 @@ bool TEXTE_MODULE::Save( FILE* aFile ) const
...
@@ -93,11 +93,11 @@ bool TEXTE_MODULE::Save( FILE* aFile ) const
/**
/**
* Function Read
Line
Descr
* Function ReadDescr
* Read description from a given line in "*.brd" format.
* Read description from a given line in "*.brd" format.
* @param aLine The current line which contains the first line of description.
* @param aLine The current line which contains the first line of description.
* @param aLine The FILE to read next lines (currently not used).
* @param aLine The FILE to read next lines (currently not used).
* @param LineNum a point to the line count (currently not used).
* @param
a
LineNum a point to the line count (currently not used).
* @return int - > 0 if success reading else 0.
* @return int - > 0 if success reading else 0.
*/
*/
int
TEXTE_MODULE
::
ReadDescr
(
char
*
aLine
,
FILE
*
aFile
,
int
*
aLineNum
)
int
TEXTE_MODULE
::
ReadDescr
(
char
*
aLine
,
FILE
*
aFile
,
int
*
aLineNum
)
...
@@ -276,10 +276,10 @@ EDA_Rect TEXTE_MODULE::GetTextRect( void ) const
...
@@ -276,10 +276,10 @@ EDA_Rect TEXTE_MODULE::GetTextRect( void ) const
/**
/**
* Function HitTest
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* tests if the given wxPoint is within the bounds of this object.
* @param
r
efPos A wxPoint to test
* @param
aR
efPos A wxPoint to test
* @return true if a hit, else false
* @return true if a hit, else false
*/
*/
bool
TEXTE_MODULE
::
HitTest
(
const
wxPoint
&
r
efPos
)
bool
TEXTE_MODULE
::
HitTest
(
const
wxPoint
&
aR
efPos
)
{
{
wxPoint
rel_pos
;
wxPoint
rel_pos
;
EDA_Rect
area
=
GetTextRect
();
EDA_Rect
area
=
GetTextRect
();
...
@@ -288,7 +288,7 @@ bool TEXTE_MODULE::HitTest( const wxPoint& refPos )
...
@@ -288,7 +288,7 @@ bool TEXTE_MODULE::HitTest( const wxPoint& refPos )
* to test if refPos is within area (which is relative to an horizontal
* to test if refPos is within area (which is relative to an horizontal
* text)
* text)
*/
*/
rel_pos
=
r
efPos
;
rel_pos
=
aR
efPos
;
RotatePoint
(
&
rel_pos
,
m_Pos
,
-
GetDrawRotation
()
);
RotatePoint
(
&
rel_pos
,
m_Pos
,
-
GetDrawRotation
()
);
if
(
area
.
Contains
(
rel_pos
)
)
if
(
area
.
Contains
(
rel_pos
)
)
...
...
pcbnew/class_text_mod.h
View file @
a9010796
...
@@ -80,12 +80,12 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
...
@@ -80,12 +80,12 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
bool
Save
(
FILE
*
aFile
)
const
;
bool
Save
(
FILE
*
aFile
)
const
;
/**
/**
* Function Read
Line
Descr
* Function ReadDescr
* Read description from a given line in "*.brd" format.
* Read description from a given line in "*.brd" format.
* @param aLine The current line which contains the first line of
* @param aLine The current line which contains the first line of
* description.
* description.
* @param a
Lin
e The FILE to read next lines (currently not used).
* @param a
Fil
e The FILE to read next lines (currently not used).
* @param LineNum a point to the line count (currently not used).
* @param
a
LineNum a point to the line count (currently not used).
* @return int - > 0 if success reading else 0.
* @return int - > 0 if success reading else 0.
*/
*/
int
ReadDescr
(
char
*
aLine
,
FILE
*
aFile
,
int
*
aLineNum
=
NULL
);
int
ReadDescr
(
char
*
aLine
,
FILE
*
aFile
,
int
*
aLineNum
=
NULL
);
...
@@ -123,10 +123,10 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
...
@@ -123,10 +123,10 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
/**
/**
* Function HitTest
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* tests if the given wxPoint is within the bounds of this object.
* @param
posref
A wxPoint to test
* @param
aRefPos
A wxPoint to test
* @return bool - true if a hit, else false
* @return bool - true if a hit, else false
*/
*/
bool
HitTest
(
const
wxPoint
&
posref
);
bool
HitTest
(
const
wxPoint
&
aRefPos
);
/**
/**
* Function IsOnLayer
* Function IsOnLayer
...
@@ -139,12 +139,12 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
...
@@ -139,12 +139,12 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
*/
*/
bool
IsOnLayer
(
int
aLayer
)
const
;
bool
IsOnLayer
(
int
aLayer
)
const
;
/*
*
/*
* Function IsOnOneOfTheseLayers
* Function IsOnOneOfTheseLayers
* returns true if this object is on one of the given layers. Is virtual
* returns true if this object is on one of the given layers. Is virtual
* so objects like D_PAD, which reside on multiple layers, can do their own
* so objects like D_PAD, which reside on multiple layers, can do their own
* form of testing.
* form of testing.
* virtual inheritance from BOARD_ITEM.
* virtual inheritance from BOARD_ITEM.
(not yet written)
* @param aLayerMask The bit-mapped set of layers to test for.
* @param aLayerMask The bit-mapped set of layers to test for.
* @return bool - true if on one of the given layers, else false.
* @return bool - true if on one of the given layers, else false.
* bool IsOnOneOfTheseLayers( int aLayerMask ) const;
* bool IsOnOneOfTheseLayers( int aLayerMask ) const;
...
...
pcbnew/class_track.cpp
View file @
a9010796
...
@@ -271,7 +271,7 @@ EDA_Rect TRACK::GetBoundingBox() const
...
@@ -271,7 +271,7 @@ EDA_Rect TRACK::GetBoundingBox() const
/**
/**
* Function Rotate
* Function Rotate
* Rotate this object.
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
* @param aAngle - the rotation angle in 0.1 degree.
*/
*/
void
TRACK
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
void
TRACK
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
...
@@ -284,7 +284,7 @@ void TRACK::Rotate( const wxPoint& aRotCentre, int aAngle )
...
@@ -284,7 +284,7 @@ void TRACK::Rotate( const wxPoint& aRotCentre, int aAngle )
/**
/**
* Function Flip
* Function Flip
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
void
TRACK
::
Flip
(
const
wxPoint
&
aCentre
)
void
TRACK
::
Flip
(
const
wxPoint
&
aCentre
)
{
{
...
@@ -324,11 +324,6 @@ SEARCH_RESULT TRACK::Visit( INSPECTOR* inspector, const void* testData,
...
@@ -324,11 +324,6 @@ SEARCH_RESULT TRACK::Visit( INSPECTOR* inspector, const void* testData,
bool
SEGVIA
::
IsOnLayer
(
int
layer_number
)
const
bool
SEGVIA
::
IsOnLayer
(
int
layer_number
)
const
/***********************************************/
/***********************************************/
{
{
/**
* @param layer_number = layer number to test
* @return true if the via is on the layer layer_number
*/
int
bottom_layer
,
top_layer
;
int
bottom_layer
,
top_layer
;
ReturnLayerPair
(
&
top_layer
,
&
bottom_layer
);
ReturnLayerPair
(
&
top_layer
,
&
bottom_layer
);
...
@@ -343,7 +338,6 @@ bool SEGVIA::IsOnLayer( int layer_number ) const
...
@@ -343,7 +338,6 @@ bool SEGVIA::IsOnLayer( int layer_number ) const
/***********************************/
/***********************************/
int
TRACK
::
ReturnMaskLayer
()
int
TRACK
::
ReturnMaskLayer
()
/***********************************/
/***********************************/
/* Return the mask layer for this.
/* Return the mask layer for this.
* for a via, there is more than one layer used
* for a via, there is more than one layer used
*/
*/
...
@@ -432,22 +426,20 @@ void SEGVIA::ReturnLayerPair( int* top_layer, int* bottom_layer ) const
...
@@ -432,22 +426,20 @@ void SEGVIA::ReturnLayerPair( int* top_layer, int* bottom_layer ) const
}
}
/***********************************************/
/*
TRACK
*
TRACK
::
GetBestInsertPoint
(
BOARD
*
Pcb
)
* Function GetBestInsertPoint
/***********************************************/
/**
* Search the "best" insertion point within the track linked list
* Search the "best" insertion point within the track linked list
* the best point is the of the corresponding net code section
* the best point is the of the corresponding net code section
*
@
return the item found in the linked list (or NULL if no track)
* return the item found in the linked list (or NULL if no track)
*/
*/
TRACK
*
TRACK
::
GetBestInsertPoint
(
BOARD
*
aPcb
)
{
{
TRACK
*
track
;
TRACK
*
track
;
if
(
Type
()
==
TYPE_ZONE
)
if
(
Type
()
==
TYPE_ZONE
)
track
=
Pcb
->
m_Zone
;
track
=
a
Pcb
->
m_Zone
;
else
else
track
=
Pcb
->
m_Track
;
track
=
a
Pcb
->
m_Track
;
for
(
;
track
;
track
=
track
->
Next
()
)
for
(
;
track
;
track
=
track
->
Next
()
)
{
{
...
@@ -1136,10 +1128,10 @@ void TRACK::DisplayInfoBase( WinEDA_DrawFrame* frame )
...
@@ -1136,10 +1128,10 @@ void TRACK::DisplayInfoBase( WinEDA_DrawFrame* frame )
/**
/**
* Function HitTest
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* tests if the given wxPoint is within the bounds of this object.
* @param ref
_p
os A wxPoint to test
* @param ref
P
os A wxPoint to test
* @return bool - true if a hit, else false
* @return bool - true if a hit, else false
*/
*/
bool
TRACK
::
HitTest
(
const
wxPoint
&
ref
_p
os
)
bool
TRACK
::
HitTest
(
const
wxPoint
&
ref
P
os
)
{
{
int
radius
=
m_Width
>>
1
;
int
radius
=
m_Width
>>
1
;
...
@@ -1148,8 +1140,8 @@ bool TRACK::HitTest( const wxPoint& ref_pos )
...
@@ -1148,8 +1140,8 @@ bool TRACK::HitTest( const wxPoint& ref_pos )
int
dy
=
m_End
.
y
-
m_Start
.
y
;
int
dy
=
m_End
.
y
-
m_Start
.
y
;
// (spot_cX, spot_cY) is a vector from m_Start to ref_pos (an origin of m_Start)
// (spot_cX, spot_cY) is a vector from m_Start to ref_pos (an origin of m_Start)
int
spot_cX
=
ref
_p
os
.
x
-
m_Start
.
x
;
int
spot_cX
=
ref
P
os
.
x
-
m_Start
.
x
;
int
spot_cY
=
ref
_p
os
.
y
-
m_Start
.
y
;
int
spot_cY
=
ref
P
os
.
y
-
m_Start
.
y
;
if
(
Type
()
==
TYPE_VIA
)
if
(
Type
()
==
TYPE_VIA
)
{
{
...
@@ -1167,10 +1159,10 @@ bool TRACK::HitTest( const wxPoint& ref_pos )
...
@@ -1167,10 +1159,10 @@ bool TRACK::HitTest( const wxPoint& ref_pos )
/**
/**
* Function HitTest (overla
ye
d)
* Function HitTest (overla
i
d)
* tests if the given EDA_Rect intersect this object.
* tests if the given EDA_Rect intersect this object.
* For now, an ending point must be inside this rect.
* For now, an ending point must be inside this rect.
* @param refArea
: the given EDA_Rec
t
* @param refArea
an EDA_Rect to tes
t
* @return bool - true if a hit, else false
* @return bool - true if a hit, else false
*/
*/
bool
TRACK
::
HitTest
(
EDA_Rect
&
refArea
)
bool
TRACK
::
HitTest
(
EDA_Rect
&
refArea
)
...
...
pcbnew/class_track.h
View file @
a9010796
...
@@ -39,7 +39,6 @@ public:
...
@@ -39,7 +39,6 @@ public:
BOARD_ITEM
*
start
;
// pointers to a connected item (pad or track)
BOARD_ITEM
*
start
;
// pointers to a connected item (pad or track)
BOARD_ITEM
*
end
;
BOARD_ITEM
*
end
;
// chain = 0 indique une connexion non encore traitee
int
m_Param
;
// Auxiliary variable ( used in some computations )
int
m_Param
;
// Auxiliary variable ( used in some computations )
protected
:
protected
:
...
@@ -64,7 +63,7 @@ public:
...
@@ -64,7 +63,7 @@ public:
/**
/**
* Function Move
* Function Move
* move this object.
* move this object.
* @param
const wxPoint&
aMoveVector - the move vector for this object.
* @param aMoveVector - the move vector for this object.
*/
*/
virtual
void
Move
(
const
wxPoint
&
aMoveVector
)
virtual
void
Move
(
const
wxPoint
&
aMoveVector
)
{
{
...
@@ -75,7 +74,7 @@ public:
...
@@ -75,7 +74,7 @@ public:
/**
/**
* Function Rotate
* Function Rotate
* Rotate this object.
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
* @param aAngle - the rotation angle in 0.1 degree.
*/
*/
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
...
@@ -83,7 +82,7 @@ public:
...
@@ -83,7 +82,7 @@ public:
/**
/**
* Function Flip
* Function Flip
* Flip this object, i.e. change the board side for this object
* Flip this object, i.e. change the board side for this object
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
*/
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
...
@@ -256,10 +255,10 @@ public:
...
@@ -256,10 +255,10 @@ public:
bool
HitTest
(
const
wxPoint
&
refPos
);
bool
HitTest
(
const
wxPoint
&
refPos
);
/**
/**
* Function HitTest (overla
ye
d)
* Function HitTest (overla
i
d)
* tests if the given wxRect intersect this object.
* tests if the given wxRect intersect this object.
* For now, an ending point must be inside this rect.
* For now, an ending point must be inside this rect.
* @param ref
Pos A wxPoin
t to test
* @param ref
Area an EDA_Rec
t to test
* @return bool - true if a hit, else false
* @return bool - true if a hit, else false
*/
*/
bool
HitTest
(
EDA_Rect
&
refArea
);
bool
HitTest
(
EDA_Rect
&
refArea
);
...
@@ -346,9 +345,8 @@ public:
...
@@ -346,9 +345,8 @@ public:
/**
/**
* Function IsOnLayer
* Function IsOnLayer
* tests to see if this object is on the given layer. Is virtual
* tests to see if this object is on the given layer. Is virtual
* from BOARD_ITEM. Tests the starting and ending range of layers for the
* from BOARD_ITEM. Tests the starting and ending range of layers for the via.
* via.
* @param aLayer the layer to test for.
* @param aLayer The layer to test for.
* @return bool - true if on given layer, else false.
* @return bool - true if on given layer, else false.
*/
*/
bool
IsOnLayer
(
int
aLayer
)
const
;
bool
IsOnLayer
(
int
aLayer
)
const
;
...
...
pcbnew/collectors.cpp
View file @
a9010796
...
@@ -128,11 +128,11 @@ const KICAD_T GENERAL_COLLECTOR::Tracks[] = {
...
@@ -128,11 +128,11 @@ const KICAD_T GENERAL_COLLECTOR::Tracks[] = {
* that it finds and does not do any displaying.
* that it finds and does not do any displaying.
*
*
* @param testItem An EDA_ITEM to examine.
* @param testItem An EDA_ITEM to examine.
* @param
notUsed The const void* testData
.
* @param
testData The const void* testData, not used here
.
* @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan,
* @return SEARCH_RESULT - SEARCH_QUIT if the Iterator is to stop the scan,
* else SCAN_CONTINUE;
* else SCAN_CONTINUE;
*/
*/
SEARCH_RESULT
GENERAL_COLLECTOR
::
Inspect
(
EDA_ITEM
*
testItem
,
const
void
*
notUsed
)
SEARCH_RESULT
GENERAL_COLLECTOR
::
Inspect
(
EDA_ITEM
*
testItem
,
const
void
*
testData
)
{
{
BOARD_ITEM
*
item
=
(
BOARD_ITEM
*
)
testItem
;
BOARD_ITEM
*
item
=
(
BOARD_ITEM
*
)
testItem
;
MODULE
*
module
=
NULL
;
MODULE
*
module
=
NULL
;
...
...
pcbnew/collectors.h
View file @
a9010796
...
@@ -378,7 +378,8 @@ public:
...
@@ -378,7 +378,8 @@ public:
* Constructor GENERAL_COLLECTORS_GUIDE
* Constructor GENERAL_COLLECTORS_GUIDE
* grabs stuff from global preferences and uses reasonable defaults.
* grabs stuff from global preferences and uses reasonable defaults.
* Add more constructors as needed.
* Add more constructors as needed.
* @param settings The BOARD_DESIGN_SETTINGS to reference.
* @param aVisibleLayerMask = current visible layers (bit mask)
* @param aPreferredLayer = the layer to search first
*/
*/
GENERAL_COLLECTORS_GUIDE
(
int
aVisibleLayerMask
,
int
aPreferredLayer
)
GENERAL_COLLECTORS_GUIDE
(
int
aVisibleLayerMask
,
int
aPreferredLayer
)
{
{
...
...
pcbnew/drc.cpp
View file @
a9010796
...
@@ -140,24 +140,21 @@ int DRC::Drc( TRACK* aRefSegm, TRACK* aList )
...
@@ -140,24 +140,21 @@ int DRC::Drc( TRACK* aRefSegm, TRACK* aList )
}
}
/**************************************************************/
int
DRC
::
Drc
(
ZONE_CONTAINER
*
aArea
,
int
CornerIndex
)
/*************************************************************/
/**
/**
* Function Drc
* Function Drc
* tests the outline segment starting at CornerIndex and returns the result and displays the error
* tests the outline segment starting at CornerIndex and returns the result and displays the error
* in the status panel only if one exists.
* in the status panel only if one exists.
* Test Edge inside other areas
* Test Edge inside other areas
* Test Edge too close other areas
* Test Edge too close other areas
* @param a
Edge
The areaparent which contains the corner.
* @param a
Area
The areaparent which contains the corner.
* @param CornerIndex The starting point of the segment to test.
* @param
a
CornerIndex The starting point of the segment to test.
* @return int - BAD_DRC (1) if DRC error or OK_DRC (0) if OK
* @return int - BAD_DRC (1) if DRC error or OK_DRC (0) if OK
*/
*/
int
DRC
::
Drc
(
ZONE_CONTAINER
*
aArea
,
int
aCornerIndex
)
{
{
updatePointers
();
updatePointers
();
if
(
!
doEdgeZoneDrc
(
aArea
,
CornerIndex
)
)
if
(
!
doEdgeZoneDrc
(
aArea
,
a
CornerIndex
)
)
{
{
wxASSERT
(
m_currentMarker
);
wxASSERT
(
m_currentMarker
);
m_currentMarker
->
DisplayInfo
(
m_mainWindow
);
m_currentMarker
->
DisplayInfo
(
m_mainWindow
);
...
...
pcbnew/drc_stuff.h
View file @
a9010796
...
@@ -374,11 +374,11 @@ public:
...
@@ -374,11 +374,11 @@ public:
* in the status panel only if one exists.
* in the status panel only if one exists.
* Test Edge inside other areas
* Test Edge inside other areas
* Test Edge too close other areas
* Test Edge too close other areas
* @param a
Edge
The areaparent which contains the corner.
* @param a
Area
The areaparent which contains the corner.
* @param CornerIndex The starting point of the segment to test.
* @param
a
CornerIndex The starting point of the segment to test.
* @return int - BAD_DRC (1) if DRC error or OK_DRC (0) if OK
* @return int - BAD_DRC (1) if DRC error or OK_DRC (0) if OK
*/
*/
int
Drc
(
ZONE_CONTAINER
*
aArea
,
int
CornerIndex
);
int
Drc
(
ZONE_CONTAINER
*
aArea
,
int
a
CornerIndex
);
/**
/**
* Function DrcBlind
* Function DrcBlind
...
...
pcbnew/edgemod.cpp
View file @
a9010796
...
@@ -210,11 +210,11 @@ void WinEDA_ModuleEditFrame::Edit_Edge_Layer( EDGE_MODULE* Edge )
...
@@ -210,11 +210,11 @@ void WinEDA_ModuleEditFrame::Edit_Edge_Layer( EDGE_MODULE* Edge )
/**
/**
* Function Enter_Edge_Width
* Function Enter_Edge_Width
* Edition of
the edge items width
* Edition of
width of module outlines
* Ask for a new width.
* Ask for a new width.
* Change the width of EDGE_MODULE Edge if aEdge != NULL
* Change the width of EDGE_MODULE
a
Edge if aEdge != NULL
* @param aEdge = edge to edit, or NULL
* @param aEdge = edge to edit, or NULL
*
@output
ModuleSegmentWidth (global) = new width
*
changes g_
ModuleSegmentWidth (global) = new width
*/
*/
void
WinEDA_ModuleEditFrame
::
Enter_Edge_Width
(
EDGE_MODULE
*
aEdge
)
void
WinEDA_ModuleEditFrame
::
Enter_Edge_Width
(
EDGE_MODULE
*
aEdge
)
{
{
...
...
pcbnew/edit_track_width.cpp
View file @
a9010796
...
@@ -110,10 +110,10 @@ bool WinEDA_PcbFrame::SetTrackSegmentWidth( TRACK* aTrackItem,
...
@@ -110,10 +110,10 @@ bool WinEDA_PcbFrame::SetTrackSegmentWidth( TRACK* aTrackItem,
/**
/**
* Function Edit_TrackSegm_Width
* Function Edit_TrackSegm_Width
* Modify one track segment width or one via diameter (using DRC control).
* Modify one track segment width or one via diameter (using DRC control).
* @param
DC = the curred device context (can be NULL)
* @param
a
DC = the curred device context (can be NULL)
* @param aTrackItem = the track segment or via to modify
* @param aTrackItem = the track segment or via to modify
*/
*/
void
WinEDA_PcbFrame
::
Edit_TrackSegm_Width
(
wxDC
*
DC
,
TRACK
*
aTrackItem
)
void
WinEDA_PcbFrame
::
Edit_TrackSegm_Width
(
wxDC
*
a
DC
,
TRACK
*
aTrackItem
)
{
{
PICKED_ITEMS_LIST
itemsListPicker
;
PICKED_ITEMS_LIST
itemsListPicker
;
bool
change
=
SetTrackSegmentWidth
(
aTrackItem
,
&
itemsListPicker
,
false
);
bool
change
=
SetTrackSegmentWidth
(
aTrackItem
,
&
itemsListPicker
,
false
);
...
@@ -122,14 +122,14 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem )
...
@@ -122,14 +122,14 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem )
return
;
// No change
return
;
// No change
// The segment has changed: redraw it and save it in undo list
// The segment has changed: redraw it and save it in undo list
if
(
DC
)
if
(
a
DC
)
{
{
TRACK
*
oldsegm
=
(
TRACK
*
)
itemsListPicker
.
GetPickedItemLink
(
0
);
TRACK
*
oldsegm
=
(
TRACK
*
)
itemsListPicker
.
GetPickedItemLink
(
0
);
wxASSERT
(
oldsegm
);
wxASSERT
(
oldsegm
);
DrawPanel
->
CursorOff
(
DC
);
// Erase cursor shape
DrawPanel
->
CursorOff
(
a
DC
);
// Erase cursor shape
oldsegm
->
Draw
(
DrawPanel
,
DC
,
GR_XOR
);
// Erase old track shape
oldsegm
->
Draw
(
DrawPanel
,
a
DC
,
GR_XOR
);
// Erase old track shape
aTrackItem
->
Draw
(
DrawPanel
,
DC
,
GR_OR
);
// Display new track shape
aTrackItem
->
Draw
(
DrawPanel
,
a
DC
,
GR_OR
);
// Display new track shape
DrawPanel
->
CursorOn
(
DC
);
// Display cursor shape
DrawPanel
->
CursorOn
(
a
DC
);
// Display cursor shape
}
}
SaveCopyInUndoList
(
itemsListPicker
,
UR_CHANGED
);
SaveCopyInUndoList
(
itemsListPicker
,
UR_CHANGED
);
}
}
...
@@ -139,11 +139,10 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem )
...
@@ -139,11 +139,10 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem )
* Function Edit_Track_Width
* Function Edit_Track_Width
* Modify a full track width (using DRC control).
* Modify a full track width (using DRC control).
* a full track is the set of track segments between 2 ends: pads or a point that has more than 2 segments ends connected
* a full track is the set of track segments between 2 ends: pads or a point that has more than 2 segments ends connected
* @param
DC = the curred device context (can be NULL)
* @param
a
DC = the curred device context (can be NULL)
* @param aTrackSegment = a segment or via on the track to change
* @param aTrackSegment = a segment or via on the track to change
* @return none
*/
*/
void
WinEDA_PcbFrame
::
Edit_Track_Width
(
wxDC
*
DC
,
TRACK
*
aTrackSegment
)
void
WinEDA_PcbFrame
::
Edit_Track_Width
(
wxDC
*
a
DC
,
TRACK
*
aTrackSegment
)
{
{
TRACK
*
pt_track
;
TRACK
*
pt_track
;
int
nb_segm
;
int
nb_segm
;
...
@@ -166,18 +165,18 @@ void WinEDA_PcbFrame::Edit_Track_Width( wxDC* DC, TRACK* aTrackSegment )
...
@@ -166,18 +165,18 @@ void WinEDA_PcbFrame::Edit_Track_Width( wxDC* DC, TRACK* aTrackSegment )
return
;
return
;
// Some segment have changed: redraw them and save in undo list
// Some segment have changed: redraw them and save in undo list
if
(
DC
)
if
(
a
DC
)
{
{
DrawPanel
->
CursorOff
(
DC
);
// Erase cursor shape
DrawPanel
->
CursorOff
(
a
DC
);
// Erase cursor shape
for
(
unsigned
ii
=
0
;
ii
<
itemsListPicker
.
GetCount
();
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
itemsListPicker
.
GetCount
();
ii
++
)
{
{
TRACK
*
segm
=
(
TRACK
*
)
itemsListPicker
.
GetPickedItemLink
(
ii
);
TRACK
*
segm
=
(
TRACK
*
)
itemsListPicker
.
GetPickedItemLink
(
ii
);
segm
->
Draw
(
DrawPanel
,
DC
,
GR_XOR
);
// Erase old track shape
segm
->
Draw
(
DrawPanel
,
a
DC
,
GR_XOR
);
// Erase old track shape
segm
=
(
TRACK
*
)
itemsListPicker
.
GetPickedItem
(
ii
);
segm
=
(
TRACK
*
)
itemsListPicker
.
GetPickedItem
(
ii
);
segm
->
Draw
(
DrawPanel
,
DC
,
GR_OR
);
// Display new track shape
segm
->
Draw
(
DrawPanel
,
a
DC
,
GR_OR
);
// Display new track shape
}
}
DrawPanel
->
CursorOn
(
DC
);
// Display cursor shape
DrawPanel
->
CursorOn
(
a
DC
);
// Display cursor shape
}
}
SaveCopyInUndoList
(
itemsListPicker
,
UR_CHANGED
);
SaveCopyInUndoList
(
itemsListPicker
,
UR_CHANGED
);
...
...
pcbnew/files.cpp
View file @
a9010796
...
@@ -131,7 +131,7 @@ void WinEDA_PcbFrame::Files_io( wxCommandEvent& event )
...
@@ -131,7 +131,7 @@ void WinEDA_PcbFrame::Files_io( wxCommandEvent& event )
*
*
* @return False if file load fails or is cancelled by the user, otherwise true.
* @return False if file load fails or is cancelled by the user, otherwise true.
*/
*/
bool
WinEDA_PcbFrame
::
LoadOnePcbFile
(
const
wxString
&
aFileName
,
bool
Append
,
bool
WinEDA_PcbFrame
::
LoadOnePcbFile
(
const
wxString
&
aFileName
,
bool
a
Append
,
bool
aForceFileDialog
)
bool
aForceFileDialog
)
{
{
int
ii
;
int
ii
;
...
@@ -141,7 +141,7 @@ bool WinEDA_PcbFrame::LoadOnePcbFile( const wxString& aFileName, bool Append,
...
@@ -141,7 +141,7 @@ bool WinEDA_PcbFrame::LoadOnePcbFile( const wxString& aFileName, bool Append,
ActiveScreen
=
GetScreen
();
ActiveScreen
=
GetScreen
();
if
(
GetScreen
()
->
IsModify
()
&&
!
Append
)
if
(
GetScreen
()
->
IsModify
()
&&
!
a
Append
)
{
{
if
(
!
IsOK
(
this
,
_
(
"The current board has been modified. Do you wish to discard \
if
(
!
IsOK
(
this
,
_
(
"The current board has been modified. Do you wish to discard \
the changes?"
)
)
)
the changes?"
)
)
)
...
@@ -150,7 +150,7 @@ the changes?" ) ) )
...
@@ -150,7 +150,7 @@ the changes?" ) ) )
m_TrackAndViasSizesList_Changed
=
true
;
m_TrackAndViasSizesList_Changed
=
true
;
if
(
Append
)
if
(
a
Append
)
{
{
GetScreen
()
->
m_FileName
=
wxEmptyString
;
GetScreen
()
->
m_FileName
=
wxEmptyString
;
OnModify
();
OnModify
();
...
@@ -182,7 +182,7 @@ the changes?" ) ) )
...
@@ -182,7 +182,7 @@ the changes?" ) ) )
fileName
.
SetExt
(
PcbFileExtension
);
fileName
.
SetExt
(
PcbFileExtension
);
}
}
if
(
!
Append
)
if
(
!
a
Append
)
Clear_Pcb
(
false
);
// pass false since we prompted above for a modified board
Clear_Pcb
(
false
);
// pass false since we prompted above for a modified board
GetScreen
()
->
m_FileName
=
fileName
.
GetFullPath
();
GetScreen
()
->
m_FileName
=
fileName
.
GetFullPath
();
...
@@ -224,7 +224,7 @@ this file again." ) );
...
@@ -224,7 +224,7 @@ this file again." ) );
// Reload the corresponding configuration file:
// Reload the corresponding configuration file:
wxSetWorkingDirectory
(
wxPathOnly
(
GetScreen
()
->
m_FileName
)
);
wxSetWorkingDirectory
(
wxPathOnly
(
GetScreen
()
->
m_FileName
)
);
if
(
Append
)
if
(
a
Append
)
ReadPcbFile
(
source
,
true
);
ReadPcbFile
(
source
,
true
);
else
else
{
{
...
@@ -244,7 +244,7 @@ this file again." ) );
...
@@ -244,7 +244,7 @@ this file again." ) );
GetScreen
()
->
ClrModify
();
GetScreen
()
->
ClrModify
();
/* If append option: change the initial board name to <oldname>-append.brd */
/* If append option: change the initial board name to <oldname>-append.brd */
if
(
Append
)
if
(
a
Append
)
{
{
wxString
new_filename
=
GetScreen
()
->
m_FileName
.
BeforeLast
(
'.'
);
wxString
new_filename
=
GetScreen
()
->
m_FileName
.
BeforeLast
(
'.'
);
if
(
!
new_filename
.
EndsWith
(
wxT
(
"-append"
)
)
)
if
(
!
new_filename
.
EndsWith
(
wxT
(
"-append"
)
)
)
...
...
pcbnew/hotkeys_board_editor.cpp
View file @
a9010796
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
* ** Commands are case insensitive **
* ** Commands are case insensitive **
* Some commands are relatives to the item under the mouse cursor
* Some commands are relatives to the item under the mouse cursor
* @param aDC = current device context
* @param aDC = current device context
* @param
hotkey
= hotkey code (ascii or wxWidget code for special keys)
* @param
aHotkeyCode
= hotkey code (ascii or wxWidget code for special keys)
* @param aItem = NULL or pointer on a EDA_ITEM under the mouse cursor
* @param aItem = NULL or pointer on a EDA_ITEM under the mouse cursor
*/
*/
void
WinEDA_PcbFrame
::
OnHotKey
(
wxDC
*
aDC
,
int
aHotkeyCode
,
EDA_ITEM
*
aItem
)
void
WinEDA_PcbFrame
::
OnHotKey
(
wxDC
*
aDC
,
int
aHotkeyCode
,
EDA_ITEM
*
aItem
)
...
...
pcbnew/layer_widget.h
View file @
a9010796
...
@@ -188,7 +188,15 @@ protected:
...
@@ -188,7 +188,15 @@ protected:
public
:
public
:
/** Constructor
/** Constructor
* @param aParent is the parent window
* @param aFocusOwner is the window that should be sent the focus after
* @param aFocusOwner is the window that should be sent the focus after
* @param aPointSize is the font point size to use within the widget. This
* effectively sets the overal size of the widget via the row height and bitmap
* button sizes.
* @param id is the wxWindow id ( default = wxID_ANY)
* @param pos is the window position
* @param size is the window size
* @param style is the window style
* every operation.
* every operation.
*/
*/
LAYER_WIDGET
(
wxWindow
*
aParent
,
wxWindow
*
aFocusOwner
,
int
aPointSize
=
-
1
,
LAYER_WIDGET
(
wxWindow
*
aParent
,
wxWindow
*
aFocusOwner
,
int
aPointSize
=
-
1
,
...
@@ -315,6 +323,7 @@ public:
...
@@ -315,6 +323,7 @@ public:
* not invoke OnRenderEnable().
* not invoke OnRenderEnable().
* @param aId is the same unique id used when adding a ROW to the
* @param aId is the same unique id used when adding a ROW to the
* Render tab.
* Render tab.
* @param isSet = the new checkbox state
*/
*/
void
SetRenderState
(
int
aId
,
bool
isSet
);
void
SetRenderState
(
int
aId
,
bool
isSet
);
...
@@ -350,6 +359,8 @@ public:
...
@@ -350,6 +359,8 @@ public:
* Function OnLayerColorChange
* Function OnLayerColorChange
* is called to notify client code about a layer color change. Derived
* is called to notify client code about a layer color change. Derived
* classes will handle this accordingly.
* classes will handle this accordingly.
* @param aLayer is the board layer to change
* @param aColor is the new color
*/
*/
virtual
void
OnLayerColorChange
(
int
aLayer
,
int
aColor
)
=
0
;
virtual
void
OnLayerColorChange
(
int
aLayer
,
int
aColor
)
=
0
;
...
@@ -358,6 +369,7 @@ public:
...
@@ -358,6 +369,7 @@ public:
* is called to notify client code whenever the user selects a different
* is called to notify client code whenever the user selects a different
* layer. Derived classes will handle this accordingly, and can deny
* layer. Derived classes will handle this accordingly, and can deny
* the change by returning false.
* the change by returning false.
* @param aLayer is the board layer to select
*/
*/
virtual
bool
OnLayerSelect
(
int
aLayer
)
=
0
;
virtual
bool
OnLayerSelect
(
int
aLayer
)
=
0
;
...
@@ -365,6 +377,8 @@ public:
...
@@ -365,6 +377,8 @@ public:
* Function OnLayerVisible
* Function OnLayerVisible
* is called to notify client code about a layer visibility change.
* is called to notify client code about a layer visibility change.
*
*
* @param aLayer is the board layer to select
* @param isVisible is the new vosible state
* @param isFinal is true when this is the last of potentially several
* @param isFinal is true when this is the last of potentially several
* such calls, and can be used to decide when to update the screen only
* such calls, and can be used to decide when to update the screen only
* one time instead of several times in the midst of a multiple layer change.
* one time instead of several times in the midst of a multiple layer change.
...
@@ -377,6 +391,7 @@ public:
...
@@ -377,6 +391,7 @@ public:
* color.
* color.
* @param aId is the same id that was established in a Rendering row
* @param aId is the same id that was established in a Rendering row
* via the AddRenderRow() function.
* via the AddRenderRow() function.
* @param aColor is the new color
*/
*/
virtual
void
OnRenderColorChange
(
int
aId
,
int
aColor
)
=
0
;
virtual
void
OnRenderColorChange
(
int
aId
,
int
aColor
)
=
0
;
...
...
pcbnew/librairi.cpp
View file @
a9010796
...
@@ -36,7 +36,7 @@ static const wxString ModExportFileWildcard(
...
@@ -36,7 +36,7 @@ static const wxString ModExportFileWildcard(
static
bool
CreateDocLibrary
(
const
wxString
&
LibName
);
static
bool
CreateDocLibrary
(
const
wxString
&
LibName
);
/*
*
/*
* Function Import_Module
* Function Import_Module
* Read a file containing only one footprint.
* Read a file containing only one footprint.
* Used to import (after exporting) a footprint
* Used to import (after exporting) a footprint
...
@@ -44,7 +44,6 @@ static bool CreateDocLibrary( const wxString& LibName );
...
@@ -44,7 +44,6 @@ static bool CreateDocLibrary( const wxString& LibName );
* This is the same format as .mod files but restricted to only one footprint
* This is the same format as .mod files but restricted to only one footprint
* The import function can also read gpcb footprint file, in Newlib format
* The import function can also read gpcb footprint file, in Newlib format
* (One footprint per file, Newlib files have no special ext.)
* (One footprint per file, Newlib files have no special ext.)
* @param DC = Current Device Context (can be NULL)
*/
*/
MODULE
*
WinEDA_ModuleEditFrame
::
Import_Module
(
)
MODULE
*
WinEDA_ModuleEditFrame
::
Import_Module
(
)
{
{
...
@@ -146,12 +145,11 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( )
...
@@ -146,12 +145,11 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( )
* This is the same format as .mod files but restricted to only one footprint
* This is the same format as .mod files but restricted to only one footprint
* So Create a new lib (which will contains one module) and export a footprint
* So Create a new lib (which will contains one module) and export a footprint
* is basically the same thing
* is basically the same thing
* @param DC = Current Device Context (can be NULL)
* @param aModule = the module to export
* @param createlib : true = use default lib path to create lib
* @param aCreateSysLib : true = use default lib path to create lib
* false = use current path or last used path to export
* false = use current path or last used path to export the footprint
* footprint
*/
*/
void
WinEDA_ModuleEditFrame
::
Export_Module
(
MODULE
*
ptmod
,
bool
createl
ib
)
void
WinEDA_ModuleEditFrame
::
Export_Module
(
MODULE
*
aModule
,
bool
aCreateSysL
ib
)
{
{
wxFileName
fn
;
wxFileName
fn
;
char
Line
[
1025
];
char
Line
[
1025
];
...
@@ -159,21 +157,21 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
...
@@ -159,21 +157,21 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
wxString
msg
,
path
,
title
,
wildcard
;
wxString
msg
,
path
,
title
,
wildcard
;
wxConfig
*
Config
=
wxGetApp
().
m_EDA_Config
;
wxConfig
*
Config
=
wxGetApp
().
m_EDA_Config
;
if
(
ptmod
==
NULL
)
if
(
aModule
==
NULL
)
return
;
return
;
ptmod
->
m_LibRef
=
ptmod
->
m_Reference
->
m_Text
;
aModule
->
m_LibRef
=
aModule
->
m_Reference
->
m_Text
;
fn
.
SetName
(
ptmod
->
m_LibRef
);
fn
.
SetName
(
aModule
->
m_LibRef
);
fn
.
SetExt
(
createl
ib
?
ModuleFileExtension
:
ModExportFileExtension
);
fn
.
SetExt
(
aCreateSysL
ib
?
ModuleFileExtension
:
ModExportFileExtension
);
if
(
createl
ib
)
if
(
aCreateSysL
ib
)
path
=
wxGetApp
().
ReturnLastVisitedLibraryPath
();
path
=
wxGetApp
().
ReturnLastVisitedLibraryPath
();
else
if
(
Config
)
else
if
(
Config
)
Config
->
Read
(
EXPORT_IMPORT_LASTPATH_KEY
,
&
path
);
Config
->
Read
(
EXPORT_IMPORT_LASTPATH_KEY
,
&
path
);
fn
.
SetPath
(
path
);
fn
.
SetPath
(
path
);
title
=
createl
ib
?
_
(
"Create New Library"
)
:
_
(
"Export Module"
);
title
=
aCreateSysL
ib
?
_
(
"Create New Library"
)
:
_
(
"Export Module"
);
wildcard
=
createl
ib
?
ModuleFileWildcard
:
ModExportFileWildcard
;
wildcard
=
aCreateSysL
ib
?
ModuleFileWildcard
:
ModExportFileWildcard
;
wxFileDialog
dlg
(
this
,
msg
,
fn
.
GetPath
(),
fn
.
GetFullName
(),
wildcard
,
wxFileDialog
dlg
(
this
,
msg
,
fn
.
GetPath
(),
fn
.
GetFullName
(),
wildcard
,
wxFD_SAVE
|
wxFD_OVERWRITE_PROMPT
);
wxFD_SAVE
|
wxFD_OVERWRITE_PROMPT
);
...
@@ -190,7 +188,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
...
@@ -190,7 +188,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
return
;
return
;
}
}
if
(
!
createl
ib
&&
Config
)
// Save file path
if
(
!
aCreateSysL
ib
&&
Config
)
// Save file path
{
{
Config
->
Write
(
EXPORT_IMPORT_LASTPATH_KEY
,
fn
.
GetPath
()
);
Config
->
Write
(
EXPORT_IMPORT_LASTPATH_KEY
,
fn
.
GetPath
()
);
}
}
...
@@ -202,7 +200,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
...
@@ -202,7 +200,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
fprintf
(
file
,
"%s %s
\n
"
,
ENTETE_LIBRAIRIE
,
DateAndTime
(
Line
)
);
fprintf
(
file
,
"%s %s
\n
"
,
ENTETE_LIBRAIRIE
,
DateAndTime
(
Line
)
);
fputs
(
"$INDEX
\n
"
,
file
);
fputs
(
"$INDEX
\n
"
,
file
);
fprintf
(
file
,
"%s
\n
"
,
CONV_TO_UTF8
(
ptmod
->
m_LibRef
)
);
fprintf
(
file
,
"%s
\n
"
,
CONV_TO_UTF8
(
aModule
->
m_LibRef
)
);
fputs
(
"$EndINDEX
\n
"
,
file
);
fputs
(
"$EndINDEX
\n
"
,
file
);
GetBoard
()
->
m_Modules
->
Save
(
file
);
GetBoard
()
->
m_Modules
->
Save
(
file
);
...
...
pcbnew/loadcmp.cpp
View file @
a9010796
...
@@ -201,7 +201,7 @@ MODULE* WinEDA_BasePcbFrame::Load_Module_From_Library( const wxString& library,
...
@@ -201,7 +201,7 @@ MODULE* WinEDA_BasePcbFrame::Load_Module_From_Library( const wxString& library,
*
*
* Read active libraries or one library to find and load a given module
* Read active libraries or one library to find and load a given module
* If found the module is linked to the tail of linked list of modules
* If found the module is linked to the tail of linked list of modules
* @param aLibrary: the full filename of the library to read. If empty,
* @param aLibrary
FullFilename
: the full filename of the library to read. If empty,
* all active libraries are read
* all active libraries are read
* @param aModuleName = module name to load
* @param aModuleName = module name to load
* @param aDisplayMessageError = true to display an error message if any.
* @param aDisplayMessageError = true to display an error message if any.
...
...
pcbnew/magnetic_tracks_functions.cpp
View file @
a9010796
...
@@ -92,6 +92,11 @@ bool Project( wxPoint* res, wxPoint on_grid, const TRACK* track )
...
@@ -92,6 +92,11 @@ bool Project( wxPoint* res, wxPoint on_grid, const TRACK* track )
* tests to see if there are any magnetic items within near reach of the given
* tests to see if there are any magnetic items within near reach of the given
* "curpos". If yes, then curpos is adjusted appropriately according to that
* "curpos". If yes, then curpos is adjusted appropriately according to that
* near magnetic item and true is returned.
* near magnetic item and true is returned.
* @param m_Pcb = the current board
* @param frame = the current frame
* @param aCurrentTool = the current tool id (from vertical right toolbar)
* @param grid = the grid size
* @param on_grid = TODO
* @param curpos The initial position, and what to adjust if a change is needed.
* @param curpos The initial position, and what to adjust if a change is needed.
* @return bool - true if the position was adjusted magnetically, else false.
* @return bool - true if the position was adjusted magnetically, else false.
*/
*/
...
...
pcbnew/module_editor_frame.h
View file @
a9010796
...
@@ -74,12 +74,12 @@ public:
...
@@ -74,12 +74,12 @@ public:
* Print the page pointed by ActiveScreen, set by the calling print function
* Print the page pointed by ActiveScreen, set by the calling print function
* @param aDC = wxDC given by the calling print function
* @param aDC = wxDC given by the calling print function
* @param aPrint_Sheet_Ref = true to print page references
* @param aPrint_Sheet_Ref = true to print page references
* @param aPrintMask = not used here
* @param aPrintMask
Layer
= not used here
* @param aPrintMirrorMode = not used here (Set when printing in mirror mode)
* @param aPrintMirrorMode = not used here (Set when printing in mirror mode)
* @param aData = a pointer on an auxiliary data (NULL if not used)
* @param aData = a pointer on an auxiliary data (NULL if not used)
*/
*/
virtual
void
PrintPage
(
wxDC
*
aDC
,
bool
aPrint_Sheet_Ref
,
virtual
void
PrintPage
(
wxDC
*
aDC
,
bool
aPrint_Sheet_Ref
,
int
aPrintMask
,
bool
aPrintMirrorMode
,
int
aPrintMask
Layer
,
bool
aPrintMirrorMode
,
void
*
aData
=
NULL
);
void
*
aData
=
NULL
);
// BOARD handling
// BOARD handling
...
@@ -142,7 +142,19 @@ public:
...
@@ -142,7 +142,19 @@ public:
void
Transform
(
MODULE
*
module
,
int
transform
);
void
Transform
(
MODULE
*
module
,
int
transform
);
// importing / exporting Footprint
// importing / exporting Footprint
void
Export_Module
(
MODULE
*
ptmod
,
bool
createlib
);
/**
* Function Export_Module
* Create a file containing only one footprint.
* Used to export a footprint
* Exported files have the standard ext .emp
* This is the same format as .mod files but restricted to only one footprint
* So Create a new lib (which will contains one module) and export a footprint
* is basically the same thing
* @param aModule = the module to export
* @param aCreateSysLib : true = use default lib path to create lib
* false = use current path or last used path to export the footprint
*/
void
Export_Module
(
MODULE
*
aModule
,
bool
aCreateSysLib
);
/**
/**
* Function Import_Module
* Function Import_Module
* Read a file containing only one footprint.
* Read a file containing only one footprint.
...
@@ -151,7 +163,6 @@ public:
...
@@ -151,7 +163,6 @@ public:
* This is the same format as .mod files but restricted to only one footprint
* This is the same format as .mod files but restricted to only one footprint
* The import function can also read gpcb footprint file, in Newlib format
* The import function can also read gpcb footprint file, in Newlib format
* (One footprint per file, Newlib files have no special ext.)
* (One footprint per file, Newlib files have no special ext.)
* @param DC = Current Device Context (can be NULL)
*/
*/
MODULE
*
Import_Module
(
);
MODULE
*
Import_Module
(
);
...
@@ -188,11 +199,11 @@ public:
...
@@ -188,11 +199,11 @@ public:
void
End_Edge_Module
(
EDGE_MODULE
*
Edge
);
void
End_Edge_Module
(
EDGE_MODULE
*
Edge
);
/**
/**
* Function Enter_Edge_Width
* Function Enter_Edge_Width
* Edition of
the edge items width
* Edition of
width of module outlines
* Ask for a new width.
* Ask for a new width.
* Change the width of EDGE_MODULE Edge if aEdge != NULL
* Change the width of EDGE_MODULE Edge if aEdge != NULL
* @param aEdge = edge to edit, or NULL
* @param aEdge = edge to edit, or NULL
*
@output
ModuleSegmentWidth (global) = new width
*
changes
ModuleSegmentWidth (global) = new width
*/
*/
void
Enter_Edge_Width
(
EDGE_MODULE
*
aEdge
);
void
Enter_Edge_Width
(
EDGE_MODULE
*
aEdge
);
void
Start_Move_EdgeMod
(
EDGE_MODULE
*
drawitem
,
wxDC
*
DC
);
void
Start_Move_EdgeMod
(
EDGE_MODULE
*
drawitem
,
wxDC
*
DC
);
...
...
pcbnew/modules.cpp
View file @
a9010796
...
@@ -256,28 +256,27 @@ void Montre_Position_Empreinte( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
...
@@ -256,28 +256,27 @@ void Montre_Position_Empreinte( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
* Function Delete Module
* Function Delete Module
* Remove a footprint from m_Modules linked list and put it in undelete buffer
* Remove a footprint from m_Modules linked list and put it in undelete buffer
* The ratsnest and pad list are recalculated
* The ratsnest and pad list are recalculated
* @param module = footprint to delete
* @param aModule = footprint to delete
* @param DC = currentDevice Context. if NULL: do not redraw new ratsnest and
* @param aDC = currentDevice Context. if NULL: do not redraw new ratsnest
* screen
* @param aAskBeforeDeleting : if true: ask for confirmation before deleting
* @param aPromptBeforeDeleting : if true: ask for confirmation before deleting
*/
*/
bool
WinEDA_PcbFrame
::
Delete_Module
(
MODULE
*
m
odule
,
bool
WinEDA_PcbFrame
::
Delete_Module
(
MODULE
*
aM
odule
,
wxDC
*
DC
,
wxDC
*
a
DC
,
bool
aAskBeforeDeleting
)
bool
aAskBeforeDeleting
)
{
{
wxString
msg
;
wxString
msg
;
if
(
m
odule
==
NULL
)
if
(
aM
odule
==
NULL
)
return
FALSE
;
return
FALSE
;
m
odule
->
DisplayInfo
(
this
);
aM
odule
->
DisplayInfo
(
this
);
/* Confirm module delete. */
/* Confirm module delete. */
if
(
aAskBeforeDeleting
)
if
(
aAskBeforeDeleting
)
{
{
msg
.
Printf
(
_
(
"Delete Module %s (value %s) ?"
),
msg
.
Printf
(
_
(
"Delete Module %s (value %s) ?"
),
GetChars
(
m
odule
->
m_Reference
->
m_Text
),
GetChars
(
aM
odule
->
m_Reference
->
m_Text
),
GetChars
(
m
odule
->
m_Value
->
m_Text
)
);
GetChars
(
aM
odule
->
m_Value
->
m_Text
)
);
if
(
!
IsOK
(
this
,
msg
)
)
if
(
!
IsOK
(
this
,
msg
)
)
{
{
return
FALSE
;
return
FALSE
;
...
@@ -287,15 +286,15 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module,
...
@@ -287,15 +286,15 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module,
OnModify
();
OnModify
();
/* Remove module from list, and put it in undo command list */
/* Remove module from list, and put it in undo command list */
m_Pcb
->
m_Modules
.
Remove
(
m
odule
);
m_Pcb
->
m_Modules
.
Remove
(
aM
odule
);
m
odule
->
SetState
(
DELETED
,
ON
);
aM
odule
->
SetState
(
DELETED
,
ON
);
SaveCopyInUndoList
(
m
odule
,
UR_DELETED
);
SaveCopyInUndoList
(
aM
odule
,
UR_DELETED
);
if
(
DC
&&
GetBoard
()
->
IsElementVisible
(
RATSNEST_VISIBLE
)
)
if
(
a
DC
&&
GetBoard
()
->
IsElementVisible
(
RATSNEST_VISIBLE
)
)
Compile_Ratsnest
(
DC
,
true
);
Compile_Ratsnest
(
a
DC
,
true
);
// Redraw the full screen to ensure perfect display of board and ratsnest.
// Redraw the full screen to ensure perfect display of board and ratsnest.
if
(
DC
)
if
(
a
DC
)
DrawPanel
->
Refresh
();
DrawPanel
->
Refresh
();
return
true
;
return
true
;
...
@@ -531,7 +530,7 @@ void WinEDA_BasePcbFrame::Rotate_Module( wxDC* DC, MODULE* module,
...
@@ -531,7 +530,7 @@ void WinEDA_BasePcbFrame::Rotate_Module( wxDC* DC, MODULE* module,
/*************************************************/
/*************************************************/
/* Redraw
mode XOR the silhouette of the
module. */
/* Redraw
in XOR mode the outlines of a
module. */
/*************************************************/
/*************************************************/
void
DrawModuleOutlines
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
MODULE
*
module
)
void
DrawModuleOutlines
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
MODULE
*
module
)
{
{
...
@@ -559,7 +558,7 @@ void DrawModuleOutlines( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* module )
...
@@ -559,7 +558,7 @@ void DrawModuleOutlines( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* module )
if
(
g_Show_Module_Ratsnest
&&
panel
)
if
(
g_Show_Module_Ratsnest
&&
panel
)
{
{
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
();
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
();
frame
->
build_ratsnest_module
(
DC
,
module
);
frame
->
build_ratsnest_module
(
module
);
frame
->
trace_ratsnest_module
(
DC
);
frame
->
trace_ratsnest_module
(
DC
);
}
}
}
}
pcbnew/netlist.cpp
View file @
a9010796
...
@@ -81,8 +81,7 @@ static FILE * OpenNetlistFile( const wxString& aFullFileName );
...
@@ -81,8 +81,7 @@ static FILE * OpenNetlistFile( const wxString& aFullFileName );
static
void
AddToList
(
const
wxString
&
NameLibCmp
,
static
void
AddToList
(
const
wxString
&
NameLibCmp
,
const
wxString
&
NameCmp
,
const
wxString
&
NameCmp
,
const
wxString
&
TimeStampPath
);
const
wxString
&
TimeStampPath
);
static
int
SetPadNetName
(
wxWindow
*
aFrame
,
static
int
SetPadNetName
(
char
*
Text
,
char
*
Text
,
MODULE
*
Module
,
MODULE
*
Module
,
wxTextCtrl
*
aMessageWindow
);
wxTextCtrl
*
aMessageWindow
);
static
int
ReadListeModules
(
const
wxString
&
CmpFullFileName
,
static
int
ReadListeModules
(
const
wxString
&
CmpFullFileName
,
...
@@ -315,7 +314,7 @@ bool WinEDA_PcbFrame::ReadPcbNetlist( const wxString& aNetlistFullFilename,
...
@@ -315,7 +314,7 @@ bool WinEDA_PcbFrame::ReadPcbNetlist( const wxString& aNetlistFullFilename,
{
{
if
(
Module
)
if
(
Module
)
{
{
SetPadNetName
(
NULL
,
Text
,
Module
,
aMessageWindow
);
SetPadNetName
(
Text
,
Module
,
aMessageWindow
);
}
}
State
--
;
State
--
;
}
}
...
@@ -579,8 +578,7 @@ is [%s] and netlist said [%s]\n" ),
...
@@ -579,8 +578,7 @@ is [%s] and netlist said [%s]\n" ),
* @param aMessageWindow = a wxTextCtrl to print error and warning message
* @param aMessageWindow = a wxTextCtrl to print error and warning message
* (can be NULL)
* (can be NULL)
*/
*/
int
SetPadNetName
(
wxWindow
*
frame
,
int
SetPadNetName
(
char
*
Text
,
char
*
Text
,
MODULE
*
Module
,
MODULE
*
Module
,
wxTextCtrl
*
aMessageWindow
)
wxTextCtrl
*
aMessageWindow
)
{
{
...
@@ -784,7 +782,7 @@ void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* aFrame,
...
@@ -784,7 +782,7 @@ void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* aFrame,
* Function BuildFootprintsListFromNetlistFile
* Function BuildFootprintsListFromNetlistFile
* Fill BufName with footprints names read from the netlist.
* Fill BufName with footprints names read from the netlist.
* @param aNetlistFullFilename = netlist file name
* @param aNetlistFullFilename = netlist file name
* @param BufName = wxArrayString to fill with footprint names
* @param
a
BufName = wxArrayString to fill with footprint names
* @return Footprint count, or -1 if netlist file cannot opened
* @return Footprint count, or -1 if netlist file cannot opened
*/
*/
int
BuildFootprintsListFromNetlistFile
(
const
wxString
&
aNetlistFullFilename
,
int
BuildFootprintsListFromNetlistFile
(
const
wxString
&
aNetlistFullFilename
,
...
...
pcbnew/print_board_functions.cpp
View file @
a9010796
...
@@ -26,7 +26,7 @@ static void Print_Module( WinEDA_DrawPanel* aPanel, wxDC* aDC, MODULE* aModule,
...
@@ -26,7 +26,7 @@ static void Print_Module( WinEDA_DrawPanel* aPanel, wxDC* aDC, MODULE* aModule,
* Print the board, but only layers allowed by aPrintMaskLayer
* Print the board, but only layers allowed by aPrintMaskLayer
* @param aDC = the print device context
* @param aDC = the print device context
* @param aPrint_Sheet_Ref = true to print frame references
* @param aPrint_Sheet_Ref = true to print frame references
* @param aPrint
_Sheet_Ref
= a 32 bits mask: bit n = 1 -> layer n is printed
* @param aPrint
MaskLayer
= a 32 bits mask: bit n = 1 -> layer n is printed
* @param aPrintMirrorMode = true to plot mirrored
* @param aPrintMirrorMode = true to plot mirrored
* @param aData = a pointer to an optional data (NULL if not used)
* @param aData = a pointer to an optional data (NULL if not used)
*/
*/
...
@@ -107,7 +107,7 @@ void WinEDA_ModuleEditFrame::PrintPage( wxDC* aDC,
...
@@ -107,7 +107,7 @@ void WinEDA_ModuleEditFrame::PrintPage( wxDC* aDC,
* Print the board, but only layers allowed by aPrintMaskLayer
* Print the board, but only layers allowed by aPrintMaskLayer
* @param aDC = the print device context
* @param aDC = the print device context
* @param aPrint_Sheet_Ref = true to print frame references
* @param aPrint_Sheet_Ref = true to print frame references
* @param aPrint
_Sheet_Ref
= a 32 bits mask: bit n = 1 -> layer n is printed
* @param aPrint
MaskLayer
= a 32 bits mask: bit n = 1 -> layer n is printed
* @param aPrintMirrorMode = true to plot mirrored
* @param aPrintMirrorMode = true to plot mirrored
* @param aData = a pointer to an optional data (NULL if not used)
* @param aData = a pointer to an optional data (NULL if not used)
*/
*/
...
...
pcbnew/ratsnest.cpp
View file @
a9010796
...
@@ -109,16 +109,15 @@ static bool DisplayRastnestInProgress; // Enable the display of the
...
@@ -109,16 +109,15 @@ static bool DisplayRastnestInProgress; // Enable the display of the
* Create the entire board ratsnest.
* Create the entire board ratsnest.
* Must be called after a board change (changes for
* Must be called after a board change (changes for
* pads, footprints or a read netlist ).
* pads, footprints or a read netlist ).
*
*
@param aDC = the current device context (can be NULL)
*
@param display_status_pcb
: if true, display the computation results
*
@param aDisplayStatus
: if true, display the computation results
*/
*/
void
WinEDA_BasePcbFrame
::
Compile_Ratsnest
(
wxDC
*
DC
,
bool
display_status_pcb
)
void
WinEDA_BasePcbFrame
::
Compile_Ratsnest
(
wxDC
*
aDC
,
bool
aDisplayStatus
)
{
{
wxString
msg
;
wxString
msg
;
DisplayRastnestInProgress
=
TRUE
;
DisplayRastnestInProgress
=
TRUE
;
GetBoard
()
->
m_Status_Pcb
=
0
;
/* we want a full ratsnest computation,
GetBoard
()
->
m_Status_Pcb
=
0
;
/* we want a full ratsnest computation,
* from the scratch */
* from the scratch */
MsgPanel
->
EraseMsgBox
();
MsgPanel
->
EraseMsgBox
();
...
@@ -126,13 +125,13 @@ void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb )
...
@@ -126,13 +125,13 @@ void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb )
// Rebuild the full pads and net info list
// Rebuild the full pads and net info list
RecalculateAllTracksNetcode
();
RecalculateAllTracksNetcode
();
if
(
display_status_pcb
)
if
(
aDisplayStatus
)
{
{
msg
.
Printf
(
wxT
(
" %d"
),
m_Pcb
->
GetPadsCount
()
);
msg
.
Printf
(
wxT
(
" %d"
),
m_Pcb
->
GetPadsCount
()
);
Affiche_1_Parametre
(
this
,
1
,
wxT
(
"pads"
),
msg
,
RED
);
Affiche_1_Parametre
(
this
,
1
,
wxT
(
"pads"
),
msg
,
RED
);
}
}
if
(
display_status_pcb
)
if
(
aDisplayStatus
)
{
{
msg
.
Printf
(
wxT
(
" %d"
),
m_Pcb
->
m_NetInfo
->
GetCount
()
);
msg
.
Printf
(
wxT
(
" %d"
),
m_Pcb
->
m_NetInfo
->
GetCount
()
);
Affiche_1_Parametre
(
this
,
8
,
wxT
(
"Nets"
),
msg
,
CYAN
);
Affiche_1_Parametre
(
this
,
8
,
wxT
(
"Nets"
),
msg
,
CYAN
);
...
@@ -145,23 +144,23 @@ void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb )
...
@@ -145,23 +144,23 @@ void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb )
* This full ratsnest is not modified by track editing.
* This full ratsnest is not modified by track editing.
* It changes only when a netlist is read, or footprints are modified
* It changes only when a netlist is read, or footprints are modified
*/
*/
Build_Board_Ratsnest
(
DC
);
Build_Board_Ratsnest
(
a
DC
);
/* Compute the pad connections due to the existing tracks (physical
/* Compute the pad connections due to the existing tracks (physical
* connections) */
* connections) */
test_connexions
(
DC
);
test_connexions
(
a
DC
);
/* Compute the active ratsnest, i.e. the unconnected links
/* Compute the active ratsnest, i.e. the unconnected links
* it is faster than Build_Board_Ratsnest()
* it is faster than Build_Board_Ratsnest()
* because many optimizations and computations are already made
* because many optimizations and computations are already made
*/
*/
Tst_Ratsnest
(
DC
,
0
);
Tst_Ratsnest
(
a
DC
,
0
);
// Redraw the active ratsnest ( if enabled )
// Redraw the active ratsnest ( if enabled )
if
(
GetBoard
()
->
IsElementVisible
(
RATSNEST_VISIBLE
)
&&
DC
)
if
(
GetBoard
()
->
IsElementVisible
(
RATSNEST_VISIBLE
)
&&
a
DC
)
DrawGeneralRatsnest
(
DC
,
0
);
DrawGeneralRatsnest
(
a
DC
,
0
);
if
(
display_status_pcb
)
if
(
aDisplayStatus
)
m_Pcb
->
DisplayInfo
(
this
);
m_Pcb
->
DisplayInfo
(
this
);
}
}
...
@@ -203,8 +202,7 @@ static int sort_by_length( const void* o1, const void* o2 )
...
@@ -203,8 +202,7 @@ static int sort_by_length( const void* o1, const void* o2 )
* the D_PAD member m_SubRatsnest handles the block number
* the D_PAD member m_SubRatsnest handles the block number
* @param aRatsnestBuffer = a std::vector<RATSNEST_ITEM> buffer to fill with
* @param aRatsnestBuffer = a std::vector<RATSNEST_ITEM> buffer to fill with
* new ratsnest items
* new ratsnest items
* @param aPadBuffer = a std::vector<D_PAD*> that is the list of pads to
* @param aPadBuffer = a std::vector<D_PAD*> that is the list of pads to consider
* consider
* @param aPadIdxStart = starting index (within the pad list) for search
* @param aPadIdxStart = starting index (within the pad list) for search
* @param aPadIdxMax = ending index (within the pad list) for search
* @param aPadIdxMax = ending index (within the pad list) for search
* @return blocks not connected count
* @return blocks not connected count
...
@@ -518,18 +516,19 @@ void WinEDA_BasePcbFrame::Build_Board_Ratsnest( wxDC* DC )
...
@@ -518,18 +516,19 @@ void WinEDA_BasePcbFrame::Build_Board_Ratsnest( wxDC* DC )
/**
/**
* Displays the general ratsnest
*
function
Displays the general ratsnest
* Only ratsnest with the status bit CH_VISIBLE is set are displayed
* Only ratsnest with the status bit CH_VISIBLE is set are displayed
* @param netcode if > 0, Display only the ratsnest relative to the
* @param aDC = the current device context (can be NULL)
* @param aNetcode if > 0, Display only the ratsnest relative to the
* corresponding net_code
* corresponding net_code
*/
*/
void
WinEDA_BasePcbFrame
::
DrawGeneralRatsnest
(
wxDC
*
DC
,
int
net_
code
)
void
WinEDA_BasePcbFrame
::
DrawGeneralRatsnest
(
wxDC
*
aDC
,
int
aNet
code
)
{
{
if
(
(
m_Pcb
->
m_Status_Pcb
&
LISTE_RATSNEST_ITEM_OK
)
==
0
)
if
(
(
m_Pcb
->
m_Status_Pcb
&
LISTE_RATSNEST_ITEM_OK
)
==
0
)
return
;
return
;
if
(
(
m_Pcb
->
m_Status_Pcb
&
DO_NOT_SHOW_GENERAL_RASTNEST
)
)
if
(
(
m_Pcb
->
m_Status_Pcb
&
DO_NOT_SHOW_GENERAL_RASTNEST
)
)
return
;
return
;
if
(
DC
==
NULL
)
if
(
a
DC
==
NULL
)
return
;
return
;
int
state
=
CH_VISIBLE
|
CH_ACTIF
;
int
state
=
CH_VISIBLE
|
CH_ACTIF
;
for
(
unsigned
ii
=
0
;
ii
<
m_Pcb
->
GetRatsnestsCount
();
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
m_Pcb
->
GetRatsnestsCount
();
ii
++
)
...
@@ -538,9 +537,9 @@ void WinEDA_BasePcbFrame::DrawGeneralRatsnest( wxDC* DC, int net_code )
...
@@ -538,9 +537,9 @@ void WinEDA_BasePcbFrame::DrawGeneralRatsnest( wxDC* DC, int net_code )
if
(
(
item
.
m_Status
&
state
)
!=
state
)
if
(
(
item
.
m_Status
&
state
)
!=
state
)
continue
;
continue
;
if
(
(
net_code
<=
0
)
||
(
net_
code
==
item
.
GetNet
()
)
)
if
(
(
aNetcode
<=
0
)
||
(
aNet
code
==
item
.
GetNet
()
)
)
{
{
item
.
Draw
(
DrawPanel
,
DC
,
GR_XOR
,
wxPoint
(
0
,
0
)
);
item
.
Draw
(
DrawPanel
,
a
DC
,
GR_XOR
,
wxPoint
(
0
,
0
)
);
}
}
}
}
}
}
...
@@ -556,7 +555,7 @@ void WinEDA_BasePcbFrame::DrawGeneralRatsnest( wxDC* DC, int net_code )
...
@@ -556,7 +555,7 @@ void WinEDA_BasePcbFrame::DrawGeneralRatsnest( wxDC* DC, int net_code )
* The analysis is not made pads to pads but uses the general ratsnest list.
* The analysis is not made pads to pads but uses the general ratsnest list.
* The function activate the smallest ratsnest between block 1 and the block n
* The function activate the smallest ratsnest between block 1 and the block n
* (activate a logical connexion)
* (activate a logical connexion)
*
*
@param aRatsnestBuffer = the buffer to store NETINFO_ITEM* items
* @param net = the current NETINFO_ITEM for the current net
* @param net = the current NETINFO_ITEM for the current net
* output:
* output:
* .state member of the ratsnest
* .state member of the ratsnest
...
@@ -743,28 +742,26 @@ void WinEDA_BasePcbFrame::Tst_Ratsnest( wxDC* DC, int ref_netcode )
...
@@ -743,28 +742,26 @@ void WinEDA_BasePcbFrame::Tst_Ratsnest( wxDC* DC, int ref_netcode )
/**
/**
* Function Test_1_Net_Ratsnest
* Function Test_1_Net_Ratsnest
* Compute the ratsnest relative to the net "net_code"
* Compute the ratsnest relative to the net "net_code"
* @param DC - Device context to draw on.
* @param
a
DC - Device context to draw on.
* @param
ref_n
etcode = netcode used to compute the ratsnest.
* @param
aN
etcode = netcode used to compute the ratsnest.
*/
*/
int
WinEDA_BasePcbFrame
::
Test_1_Net_Ratsnest
(
wxDC
*
DC
,
int
ref_n
etcode
)
int
WinEDA_BasePcbFrame
::
Test_1_Net_Ratsnest
(
wxDC
*
aDC
,
int
aN
etcode
)
{
{
DisplayRastnestInProgress
=
FALSE
;
DisplayRastnestInProgress
=
FALSE
;
DrawGeneralRatsnest
(
DC
,
ref_n
etcode
);
DrawGeneralRatsnest
(
aDC
,
aN
etcode
);
Tst_Ratsnest
(
DC
,
ref_n
etcode
);
Tst_Ratsnest
(
aDC
,
aN
etcode
);
DrawGeneralRatsnest
(
DC
,
ref_n
etcode
);
DrawGeneralRatsnest
(
aDC
,
aN
etcode
);
return
m_Pcb
->
GetRatsnestsCount
();
return
m_Pcb
->
GetRatsnestsCount
();
}
}
/**
/*
* Build a ratsnest relative to one footprint. This is a simplified
* Function build_ratsnest_module
* computation
* Build a ratsnest relative to one footprint. This is a simplified computation
* used only in move footprint. It is not optimal, but it is fast and
* used only in move footprint. It is not optimal, but it is fast and sufficient
* sufficient
* to help a footprint placement
* to guide a footprint placement
* It shows the connections from a pad to the nearest connected pad
* It shows the connections from a pad to the nearest connected pad
* @param Module = module to consider.
*
*
* The ratsnest has 2 sections:
* The ratsnest has 2 sections:
* - An "internal" ratsnest relative to pads of this footprint which are
* - An "internal" ratsnest relative to pads of this footprint which are
...
@@ -774,7 +771,7 @@ int WinEDA_BasePcbFrame::Test_1_Net_Ratsnest( wxDC* DC, int ref_netcode )
...
@@ -774,7 +771,7 @@ int WinEDA_BasePcbFrame::Test_1_Net_Ratsnest( wxDC* DC, int ref_netcode )
* pad (in an other footprint)
* pad (in an other footprint)
* The ratsnest section must be computed for each new position
* The ratsnest section must be computed for each new position
*/
*/
void
WinEDA_BasePcbFrame
::
build_ratsnest_module
(
wxDC
*
DC
,
MODULE
*
Module
)
void
WinEDA_BasePcbFrame
::
build_ratsnest_module
(
MODULE
*
a
Module
)
{
{
static
unsigned
pads_module_count
;
// node count (node = pad with a net
static
unsigned
pads_module_count
;
// node count (node = pad with a net
// code) for the footprint being moved
// code) for the footprint being moved
...
@@ -807,7 +804,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
...
@@ -807,7 +804,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
s_localPadBuffer
.
clear
();
s_localPadBuffer
.
clear
();
m_Pcb
->
m_LocalRatsnest
.
clear
();
m_Pcb
->
m_LocalRatsnest
.
clear
();
for
(
pad_ref
=
Module
->
m_Pads
;
pad_ref
!=
NULL
;
pad_ref
=
pad_ref
->
Next
()
)
for
(
pad_ref
=
a
Module
->
m_Pads
;
pad_ref
!=
NULL
;
pad_ref
=
pad_ref
->
Next
()
)
{
{
if
(
pad_ref
->
GetNet
()
==
0
)
if
(
pad_ref
->
GetNet
()
==
0
)
continue
;
continue
;
...
@@ -849,7 +846,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
...
@@ -849,7 +846,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
for
(
unsigned
jj
=
0
;
jj
<
net
->
m_ListPad
.
size
();
jj
++
)
for
(
unsigned
jj
=
0
;
jj
<
net
->
m_ListPad
.
size
();
jj
++
)
{
{
pad_externe
=
net
->
m_ListPad
[
jj
];
pad_externe
=
net
->
m_ListPad
[
jj
];
if
(
pad_externe
->
GetParent
()
==
Module
)
if
(
pad_externe
->
GetParent
()
==
a
Module
)
continue
;
continue
;
pad_externe
->
SetSubRatsnest
(
0
);
pad_externe
->
SetSubRatsnest
(
0
);
...
@@ -889,9 +886,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
...
@@ -889,9 +886,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
/* a - first step of lee algorithm : build the pad to pad link list */
/* a - first step of lee algorithm : build the pad to pad link list */
int
icnt
=
gen_rats_pad_to_pad
(
m_Pcb
->
m_LocalRatsnest
,
int
icnt
=
gen_rats_pad_to_pad
(
m_Pcb
->
m_LocalRatsnest
,
s_localPadBuffer
,
s_localPadBuffer
,
ii
,
ii
,
jj
,
0
);
jj
,
0
);
/* b - second step of lee algorithm : build the block to block link
/* b - second step of lee algorithm : build the block to block link
*list (Iteration) */
*list (Iteration) */
...
@@ -899,8 +894,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
...
@@ -899,8 +894,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
{
{
icnt
=
gen_rats_block_to_block
(
m_Pcb
->
m_LocalRatsnest
,
icnt
=
gen_rats_block_to_block
(
m_Pcb
->
m_LocalRatsnest
,
s_localPadBuffer
,
s_localPadBuffer
,
ii
,
ii
,
jj
);
jj
);
}
}
ii
=
jj
;
ii
=
jj
;
...
...
pcbnew/track.cpp
View file @
a9010796
...
@@ -272,7 +272,7 @@ TRACK* Marque_Une_Piste( BOARD* aPcb,
...
@@ -272,7 +272,7 @@ TRACK* Marque_Une_Piste( BOARD* aPcb,
* ref_pos on layers allowed in masque_layer
* ref_pos on layers allowed in masque_layer
* - Put segments fount in aList
* - Put segments fount in aList
* Vias are put in list but their flags BUSY is not set
* Vias are put in list but their flags BUSY is not set
* @param Pcb = the board
* @param
a
Pcb = the board
* @param aRef_pos = the reference coordinate of the starting search
* @param aRef_pos = the reference coordinate of the starting search
* @param aLayerMask = the allowed layers for segments to search
* @param aLayerMask = the allowed layers for segments to search
* (1 layer when starting point is on a segment, but more than one when
* (1 layer when starting point is on a segment, but more than one when
...
...
pcbnew/zones_by_polygon_fill_functions.cpp
View file @
a9010796
...
@@ -34,18 +34,14 @@
...
@@ -34,18 +34,14 @@
#include "zones.h"
#include "zones.h"
/**********************************************************************************/
void
WinEDA_PcbFrame
::
Delete_Zone_Fill
(
SEGZONE
*
aZone
,
long
aTimestamp
)
/**********************************************************************************/
/**
/**
* Function Delete_Zone_Fill
* Function Delete_Zone_Fill
* Remove the zone fillig which include the segment aZone, or the zone which have the given time stamp.
* Remove the zone fillig which include the segment aZone, or the zone which have the given time stamp.
* A zone is a group of segments which have the same TimeStamp
* A zone is a group of segments which have the same TimeStamp
* @param DC = current Device Context (can be NULL)
* @param aZone = zone segment within the zone to delete. Can be NULL
* @param aZone = zone segment within the zone to delete. Can be NULL
* @param aTimestamp = Timestamp for the zone to delete, used if aZone == NULL
* @param aTimestamp = Timestamp for the zone to delete, used if aZone == NULL
*/
*/
void
WinEDA_PcbFrame
::
Delete_Zone_Fill
(
SEGZONE
*
aZone
,
long
aTimestamp
)
{
{
bool
modify
=
false
;
bool
modify
=
false
;
unsigned
long
TimeStamp
;
unsigned
long
TimeStamp
;
...
...
pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp
View file @
a9010796
...
@@ -521,8 +521,8 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
...
@@ -521,8 +521,8 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
/** AddPolygonCornersToBoolengine
/** AddPolygonCornersToBoolengine
* copy a set of polygons in a kbool engine
* copy a set of polygons in a kbool engine
* @param aCornersBuffer = list of polygons defined by corners.
* @param aCornersBuffer = list of polygons defined by corners.
* @
param aBoolengine = the kbool engine to populate
* @param aBoolengine = the kbool engine to populate
* @
param aGroup = GROUP_A or GROUP_B
* @param aGroup = GROUP_A or GROUP_B
*/
*/
void
AddPolygonCornersToBoolengine
(
std
::
vector
<
CPolyPt
>&
aCornersBuffer
,
void
AddPolygonCornersToBoolengine
(
std
::
vector
<
CPolyPt
>&
aCornersBuffer
,
Bool_Engine
*
aBoolengine
,
GroupType
aGroup
)
Bool_Engine
*
aBoolengine
,
GroupType
aGroup
)
...
...
pcbnew/zones_functions_for_undo_redo.h
View file @
a9010796
...
@@ -63,9 +63,9 @@ int SaveCopyOfZones(PICKED_ITEMS_LIST & aPickList, BOARD* aPcb, int aNetCode, in
...
@@ -63,9 +63,9 @@ int SaveCopyOfZones(PICKED_ITEMS_LIST & aPickList, BOARD* aPcb, int aNetCode, in
* check a pick list to remove zones identical to their copies
* check a pick list to remove zones identical to their copies
* and set the type of operation in picker (UR_DELETED, UR_CHANGED)
* and set the type of operation in picker (UR_DELETED, UR_CHANGED)
* @param aPickList = the main pick list
* @param aPickList = the main pick list
* @param a
DeletedList = the list of dleted item
s
* @param a
AuxiliaryList = the list of deleted or added (new created) items after calculation
s
* @param aPcb = the Board
* @param aPcb = the Board
*/
*/
void
UpdateCopyOfZonesList
(
PICKED_ITEMS_LIST
&
aPickList
,
PICKED_ITEMS_LIST
&
a
Deleted
List
,
BOARD
*
aPcb
);
void
UpdateCopyOfZonesList
(
PICKED_ITEMS_LIST
&
aPickList
,
PICKED_ITEMS_LIST
&
a
Auxiliary
List
,
BOARD
*
aPcb
);
#endif // ZONES_FUNCTIONS_TO_UNDO_REDO_H
#endif // ZONES_FUNCTIONS_TO_UNDO_REDO_H
pcbnew/zones_test_and_combine_areas.cpp
View file @
a9010796
...
@@ -328,8 +328,8 @@ int BOARD::ClipAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList,
...
@@ -328,8 +328,8 @@ int BOARD::ClipAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList,
* @param aModifiedZonesList = a PICKED_ITEMS_LIST * where to store deleted or added areas (useful in undo commands
* @param aModifiedZonesList = a PICKED_ITEMS_LIST * where to store deleted or added areas (useful in undo commands
* can be NULL
* can be NULL
* @param modified_area = area to test
* @param modified_area = area to test
* @param bMessageBoxArc if true, shows message when clipping can't be done due to arcs.
* @param bMessageBoxInt == true, shows message when clipping occurs.
* @param bMessageBoxInt == true, shows message when clipping occurs.
* @param bMessageBoxArc == true, shows message when clipping can't be done due to arcs.
* @return :
* @return :
* -1 if arcs intersect other sides, so polygon can't be clipped
* -1 if arcs intersect other sides, so polygon can't be clipped
* 0 if no intersecting sides
* 0 if no intersecting sides
...
...
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