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
7bcb4ff3
Commit
7bcb4ff3
authored
Dec 29, 2010
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Plain Diff
merge from testing
parents
69801630
f6265fd2
Changes
78
Show whitespace changes
Inline
Side-by-side
Showing
78 changed files
with
450 additions
and
382 deletions
+450
-382
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
gerbview.cpp
gerbview/gerbview.cpp
+6
-0
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
06bitmap-contents.xml
packaging/mac-osx/osx-package.pmdoc/06bitmap-contents.xml
+1
-0
06bitmap.xml
packaging/mac-osx/osx-package.pmdoc/06bitmap.xml
+1
-0
index.xml
packaging/mac-osx/osx-package.pmdoc/index.xml
+1
-1
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
dragsegm.cpp
pcbnew/dragsegm.cpp
+2
-1
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 @
7bcb4ff3
...
...
@@ -386,12 +386,12 @@ void Pcb3D_GLCanvas::Draw3D_Track( TRACK* track )
/**
* Function Draw3D_SolidPolygonsInZones
* 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
;
int
layer
=
zone_c
->
GetLayer
();
int
layer
=
aZone
->
GetLayer
();
if
(
g_Parm_3D_Visu
.
m_BoardSettings
->
IsLayerVisible
(
layer
)
==
false
)
return
;
...
...
@@ -420,7 +420,7 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c )
// Draw solid areas contained in this zone
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
)
{
...
...
@@ -428,11 +428,11 @@ void Pcb3D_GLCanvas::Draw3D_SolidPolygonsInZones( ZONE_CONTAINER* zone_c )
gluTessBeginContour
(
tess
);
StartContour
=
0
;
}
v_data
[
0
]
=
zone_c
->
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
;
gluTessVertex
(
tess
,
v_data
,
&
zone_c
->
m_FilledPolysList
[
ii
]
);
v_data
[
0
]
=
aZone
->
m_FilledPolysList
[
ii
].
x
*
g_Parm_3D_Visu
.
m_BoardScale
;
v_data
[
1
]
=
-
aZone
->
m_FilledPolysList
[
ii
].
y
*
g_Parm_3D_Visu
.
m_BoardScale
;
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
);
gluTessEndPolygon
(
tess
);
...
...
3d-viewer/3d_viewer.h
View file @
7bcb4ff3
...
...
@@ -173,9 +173,9 @@ public:
/**
* Function Draw3D_SolidPolygonsInZones
* 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
...
...
common/common_plotGERBER_functions.cpp
View file @
7bcb4ff3
...
...
@@ -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
* @param aCentre = center coordinates
* @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
*/
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
)
{
wxASSERT
(
output_file
);
...
...
common/drawpanel.cpp
View file @
7bcb4ff3
...
...
@@ -944,9 +944,10 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC )
* Function DrawAuxiliaryAxis
* Draw the Auxiliary Axis, used in pcbnew which as origin coordinates
* 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
)
)
return
;
...
...
@@ -954,10 +955,10 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode )
int
Color
=
DARKRED
;
BASE_SCREEN
*
screen
=
GetScreen
();
GRSetDrawMode
(
DC
,
drawm
ode
);
GRSetDrawMode
(
aDC
,
aDrawM
ode
);
/* Draw the Y axis */
GRDashedLine
(
&
m_ClipBox
,
DC
,
GRDashedLine
(
&
m_ClipBox
,
a
DC
,
m_Parent
->
m_Auxiliary_Axis_Position
.
x
,
-
screen
->
ReturnPageSize
().
y
,
m_Parent
->
m_Auxiliary_Axis_Position
.
x
,
...
...
@@ -965,7 +966,7 @@ void WinEDA_DrawPanel::DrawAuxiliaryAxis( wxDC* DC, int drawmode )
0
,
Color
);
/* Draw the X axis */
GRDashedLine
(
&
m_ClipBox
,
DC
,
GRDashedLine
(
&
m_ClipBox
,
a
DC
,
-
screen
->
ReturnPageSize
().
x
,
m_Parent
->
m_Auxiliary_Axis_Position
.
y
,
screen
->
ReturnPageSize
().
x
,
...
...
@@ -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
();
...
...
@@ -985,10 +986,10 @@ void WinEDA_DrawPanel::DrawGridAxis( wxDC* DC, int drawmode )
int
Color
=
m_Parent
->
GetGridColor
();
GRSetDrawMode
(
DC
,
drawm
ode
);
GRSetDrawMode
(
aDC
,
aDrawM
ode
);
/* Draw the Y axis */
GRDashedLine
(
&
m_ClipBox
,
DC
,
GRDashedLine
(
&
m_ClipBox
,
a
DC
,
screen
->
m_GridOrigin
.
x
,
-
screen
->
ReturnPageSize
().
y
,
screen
->
m_GridOrigin
.
x
,
...
...
@@ -996,7 +997,7 @@ void WinEDA_DrawPanel::DrawGridAxis( wxDC* DC, int drawmode )
0
,
Color
);
/* Draw the X axis */
GRDashedLine
(
&
m_ClipBox
,
DC
,
GRDashedLine
(
&
m_ClipBox
,
a
DC
,
-
screen
->
ReturnPageSize
().
x
,
screen
->
m_GridOrigin
.
y
,
screen
->
ReturnPageSize
().
x
,
...
...
eeschema/class_libentry.h
View file @
7bcb4ff3
...
...
@@ -514,7 +514,7 @@ public:
* @return The draw object if found. Otherwise NULL.
*/
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.
...
...
eeschema/dialog_erc_listbox.h
View file @
7bcb4ff3
...
...
@@ -40,10 +40,8 @@ public:
/**
* Function SetList
* sets the DRC_ITEM_LIST for this listbox. Ownership of the DRC_ITEM_LIST
* is transferred to this ERC_HTML_LISTBOX.
* @param aList The DRC_ITEM_LIST* containing the DRC_ITEMs which will be
* Function AppendToList
* @param aItem The SCH_MARKER* to add to the current list which will be
* displayed in the wxHtmlListBox
*/
void
AppendToList
(
SCH_MARKER
*
aItem
)
...
...
@@ -87,7 +85,7 @@ public:
/**
* Function OnGetItem
* Function OnGetItem
Markup
* returns the html text associated with the given index 'n'.
* @param n An index into the list.
* @return wxString - the simple html text to show in the listbox.
...
...
eeschema/files-io.cpp
View file @
7bcb4ff3
...
...
@@ -308,7 +308,7 @@ bool SCH_EDIT_FRAME::LoadOneEEProject( const wxString& FileName, bool IsNew )
/**
* 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
()
{
...
...
eeschema/lib_circle.cpp
View file @
7bcb4ff3
...
...
@@ -70,7 +70,7 @@ bool LIB_CIRCLE::Load( char* aLine, wxString& aErrorMsg )
/**
* Function HitTest
* 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
*/
bool
LIB_CIRCLE
::
HitTest
(
const
wxPoint
&
aPosRef
)
...
...
eeschema/lib_circle.h
View file @
7bcb4ff3
...
...
@@ -50,10 +50,10 @@ public:
/**
* 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
*/
virtual
bool
HitTest
(
const
wxPoint
&
a
RefPos
);
virtual
bool
HitTest
(
const
wxPoint
&
a
PosRef
);
/**
* @param aPosRef - a wxPoint to test
...
...
eeschema/lib_field.h
View file @
7bcb4ff3
...
...
@@ -140,7 +140,7 @@ public:
/**
* 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
*/
bool
HitTest
(
const
wxPoint
&
aPosition
);
...
...
eeschema/lib_pin.cpp
View file @
7bcb4ff3
...
...
@@ -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
* for menus and dialogs .
*/
...
...
@@ -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
* for menus and dialogs .
...
...
eeschema/lib_pin.h
View file @
7bcb4ff3
...
...
@@ -147,7 +147,7 @@ public:
* @param aPosRef - a wxPoint to test
* @param aThreshold - max distance to this object (usually the half
* 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
*/
virtual
bool
HitTest
(
wxPoint
aPosRef
,
int
aThreshold
,
const
TRANSFORM
&
aTransform
);
...
...
eeschema/netform.cpp
View file @
7bcb4ff3
...
...
@@ -240,6 +240,8 @@ public:
/**
* Function WriteGENERICNetList
* 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.
*/
bool
WriteGENERICNetList
(
SCH_EDIT_FRAME
*
frame
,
const
wxString
&
aOutFileName
);
...
...
@@ -248,6 +250,8 @@ public:
* Function WriteNetListPCBNEW
* 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>
* else output ORCADPCB2 strict format.
*/
...
...
@@ -291,6 +295,8 @@ public:
* Are considered in placing orders in the netlist
* [.-] Or PSpice gnucap are beginning
* + + 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,
* else by net number.
*/
...
...
eeschema/netlist_control.cpp
View file @
7bcb4ff3
...
...
@@ -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
* @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
,
const
wxString
&
title
,
...
...
eeschema/netlist_control.h
View file @
7bcb4ff3
...
...
@@ -50,6 +50,16 @@ public:
wxBoxSizer
*
m_RightOptionsBoxSizer
;
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
,
int
id_NetType
,
int
idCheckBox
,
int
idCreateFile
,
bool
selected
);
...
...
eeschema/transform.h
View file @
7bcb4ff3
...
...
@@ -61,7 +61,7 @@ public:
/**
* 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.
*/
wxPoint
TransformCoordinate
(
const
wxPoint
&
aPoint
)
const
;
...
...
gerbview/gerbview.cpp
View file @
7bcb4ff3
...
...
@@ -10,6 +10,7 @@
#include "gestfich.h"
#include "gerbview.h"
#include "gerbview_id.h"
#include "wxGerberFrame.h"
#include "pcbplot.h"
#include "bitmaps.h"
...
...
@@ -78,6 +79,11 @@ bool WinEDA_App::OnInit()
wxFileName
fn
;
WinEDA_GerberFrame
*
frame
=
NULL
;
#ifdef __WXMAC__
wxApp
::
s_macAboutMenuItemId
=
ID_KICAD_ABOUT
;
wxApp
::
s_macPreferencesMenuItemId
=
ID_GERBVIEW_OPTIONS_SETUP
;
#endif
/* __WXMAC__ */
InitEDA_Appl
(
wxT
(
"GerbView"
),
APP_TYPE_GERBVIEW
);
if
(
m_Checker
&&
m_Checker
->
IsAnotherRunning
()
)
...
...
include/class_board_item.h
View file @
7bcb4ff3
...
...
@@ -155,11 +155,11 @@ public:
* Function MenuText
* returns the text to use in any menu type UI control which must uniquely
* 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
* @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 @
7bcb4ff3
...
...
@@ -178,9 +178,9 @@ public:
/**
* Function CursorRealPosition
* @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
...
...
include/wxBasePcbFrame.h
View file @
7bcb4ff3
...
...
@@ -300,7 +300,7 @@ public:
/**
* Function Select_1_Module_From_List
* 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
* == void, list all modules)
* @param aMask = Display filter (wildcart)( Mask = wxEmptyString if not
...
...
@@ -313,18 +313,52 @@ public:
* Ok
*/
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
);
MODULE
*
Load_Module_From_Library
(
const
wxString
&
library
,
wxDC
*
DC
);
// ratsnest functions
void
Compile_Ratsnest
(
wxDC
*
DC
,
bool
affiche
);
int
Test_1_Net_Ratsnest
(
wxDC
*
DC
,
int
net_code
);
void
build_ratsnest_module
(
wxDC
*
DC
,
MODULE
*
Module
);
/**
* Function Compile_Ratsnest
* 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
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
build_ratsnest_pad
(
BOARD_ITEM
*
ref
,
const
wxPoint
&
refpos
,
...
...
include/wxPcbStruct.h
View file @
7bcb4ff3
...
...
@@ -162,12 +162,12 @@ public:
* Print the page pointed by ActiveScreen, set by the calling print function
* @param aDC = wxDC given by the calling print function
* @param aPrint_Sheet_Ref = true to print page references
* @param aPrintMask
= not used here
* @param aPrintMirrorMode =
not used here (Set when printing in mirror mode)
* @param aPrintMask
Layer = a 32 bits mask: bit n = 1 -> layer n is printed
* @param aPrintMirrorMode =
true to plot mirrored
* @param aData = a pointer on an auxiliary data (NULL if not used)
*/
virtual
void
PrintPage
(
wxDC
*
aDC
,
bool
aPrint_Sheet_Ref
,
int
aPrintMask
,
bool
aPrintMirrorMode
,
int
aPrintMask
Layer
,
bool
aPrintMirrorMode
,
void
*
aData
=
NULL
);
void
GetKicadAbout
(
wxCommandEvent
&
event
);
...
...
@@ -713,7 +713,17 @@ public:
// Footprint edition (see also WinEDA_BasePcbFrame)
void
InstallModuleOptionsFrame
(
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
InstallExchangeModuleFrame
(
MODULE
*
ExchangeModuleModule
);
...
...
packaging/mac-osx/osx-package.pmdoc/06bitmap-contents.xml
0 → 100644
View file @
7bcb4ff3
<pkg-contents
spec=
"1.12"
><f
n=
"bitmap2component.app"
o=
"marco"
g=
"staff"
p=
"16877"
pt=
"/Users/marco/Development/kicad/kicad/bitmap2component/bitmap2component.app"
m=
"false"
t=
"file"
><f
n=
"Contents"
o=
"marco"
g=
"staff"
p=
"16877"
><f
n=
"Info.plist"
o=
"marco"
g=
"staff"
p=
"33188"
/><f
n=
"MacOS"
o=
"marco"
g=
"staff"
p=
"16877"
><f
n=
"bitmap2component"
o=
"marco"
g=
"staff"
p=
"33261"
/></f><f
n=
"Resources"
o=
"marco"
g=
"staff"
p=
"16877"
><f
n=
"bitmap2component.icns"
o=
"marco"
g=
"staff"
p=
"33188"
/></f></f></f></pkg-contents>
\ No newline at end of file
packaging/mac-osx/osx-package.pmdoc/06bitmap.xml
0 → 100644
View file @
7bcb4ff3
<pkgref
spec=
"1.12"
uuid=
"7E583994-AFBA-404C-916F-A1DFE3A2B504"
><config><identifier>
net.sourceforge.kicad.kicad.bitmap2component.pkg
</identifier><version>
1.0
</version><description/><post-install
type=
"none"
/><requireAuthorization/><installFrom
relative=
"true"
includeRoot=
"true"
>
../../bitmap2component/bitmap2component.app
</installFrom><installTo
mod=
"true"
relocatable=
"true"
>
/Applications/Kicad
</installTo><flags><followSymbolicLinks/></flags><packageStore
type=
"internal"
/><mod>
installFrom.isRelativeType
</mod><mod>
installTo.path
</mod><mod>
parent
</mod><mod>
installTo
</mod></config><contents><file-list>
06bitmap-contents.xml
</file-list><component
id=
"org.kicad-eda.bitmap2component"
path=
"/Users/marco/Development/kicad/kicad/bitmap2component/bitmap2component.app"
version=
""
isRelocatable=
"true"
><locator-info><token
title=
"pkmk-token-16"
><search-rule><combo
identifier=
"org.kicad-eda.bitmap2component"
default-path=
"/Applications/bitmap2component.app"
/></search-rule></token></locator-info></component><filter>
/CVS$
</filter><filter>
/\.svn$
</filter><filter>
/\.cvsignore$
</filter><filter>
/\.cvspass$
</filter><filter>
/\.DS_Store$
</filter></contents></pkgref>
\ No newline at end of file
packaging/mac-osx/osx-package.pmdoc/index.xml
View file @
7bcb4ff3
<pkmkdoc
spec=
"1.12"
><properties><title>
Kicad
</title><build>
/Users/marco/Development/Kicad-19-Sep-2010.mpkg
</build><organization>
net.sourceforge.kicad
</organization><userSees
ui=
"both"
/><min-target
os=
"2"
/><domain
anywhere=
"true"
/></properties><distribution><versions
min-spec=
"1.000000"
/><scripts></scripts></distribution><contents><choice
title=
"kicad"
id=
"choice12"
starts_selected=
"true"
starts_enabled=
"true"
starts_hidden=
"false"
><pkgref
id=
"net.sourceforge.kicad.kicad"
/></choice><choice
title=
"gerbview"
id=
"choice13"
starts_selected=
"true"
starts_enabled=
"true"
starts_hidden=
"false"
><pkgref
id=
"net.sourceforge.kicad.gerbview"
/></choice><choice
title=
"eeschema"
id=
"choice14"
starts_selected=
"true"
starts_enabled=
"true"
starts_hidden=
"false"
><pkgref
id=
"net.sourceforge.kicad.eeschema"
/></choice><choice
title=
"pcbnew"
id=
"choice15"
starts_selected=
"true"
starts_enabled=
"true"
starts_hidden=
"false"
><pkgref
id=
"net.sourceforge.kicad.pcbnew"
/></choice><choice
title=
"cvpcb"
id=
"choice16"
starts_selected=
"true"
starts_enabled=
"true"
starts_hidden=
"false"
><pkgref
id=
"net.sourceforge.kicad.cvpcb"
/></choice></contents><resources
bg-scale=
"none"
bg-align=
"topleft"
><locale
lang=
"en"
><resource
relative=
"true"
mod=
"true"
type=
"license"
>
../../AUTHORS.txt
</resource><resource
relative=
"true"
mod=
"true"
type=
"readme"
>
../../CHANGELOG.txt
</resource></locale></resources><flags/><item
type=
"file"
>
01kicad.xml
</item><item
type=
"file"
>
02gerbview.xml
</item><item
type=
"file"
>
03eeschema.xml
</item><item
type=
"file"
>
04pcbnew.xml
</item><item
type=
"file"
>
05cvpcb.xml
</item><mod>
properties.title
</mod><mod>
properties.anywhereDomain
</mod></pkmkdoc>
\ No newline at end of file
<pkmkdoc
spec=
"1.12"
><properties><title>
Kicad
</title><build>
/Users/marco/Development/Kicad-27-Dec-2010.mpkg
</build><organization>
net.sourceforge.kicad
</organization><userSees
ui=
"both"
/><min-target
os=
"2"
/><domain
anywhere=
"true"
/></properties><distribution><versions
min-spec=
"1.000000"
/><scripts></scripts></distribution><contents><choice
title=
"kicad"
id=
"choice12"
starts_selected=
"true"
starts_enabled=
"true"
starts_hidden=
"false"
><pkgref
id=
"net.sourceforge.kicad.kicad"
/></choice><choice
title=
"gerbview"
id=
"choice13"
starts_selected=
"true"
starts_enabled=
"true"
starts_hidden=
"false"
><pkgref
id=
"net.sourceforge.kicad.gerbview"
/></choice><choice
title=
"eeschema"
id=
"choice14"
starts_selected=
"true"
starts_enabled=
"true"
starts_hidden=
"false"
><pkgref
id=
"net.sourceforge.kicad.eeschema"
/></choice><choice
title=
"pcbnew"
id=
"choice15"
starts_selected=
"true"
starts_enabled=
"true"
starts_hidden=
"false"
><pkgref
id=
"net.sourceforge.kicad.pcbnew"
/></choice><choice
title=
"cvpcb"
id=
"choice16"
starts_selected=
"true"
starts_enabled=
"true"
starts_hidden=
"false"
><pkgref
id=
"net.sourceforge.kicad.cvpcb"
/></choice><choice
title=
"bitmap2component"
id=
"choice17"
starts_selected=
"true"
starts_enabled=
"true"
starts_hidden=
"false"
><pkgref
id=
"net.sourceforge.kicad.kicad.bitmap2component.pkg"
/></choice></contents><resources
bg-scale=
"none"
bg-align=
"topleft"
><locale
lang=
"en"
><resource
relative=
"true"
mod=
"true"
type=
"license"
>
../../AUTHORS.txt
</resource><resource
relative=
"true"
mod=
"true"
type=
"readme"
>
../../CHANGELOG.txt
</resource></locale></resources><flags/><item
type=
"file"
>
01kicad.xml
</item><item
type=
"file"
>
02gerbview.xml
</item><item
type=
"file"
>
03eeschema.xml
</item><item
type=
"file"
>
04pcbnew.xml
</item><item
type=
"file"
>
05cvpcb.xml
</item><item
type=
"file"
>
06bitmap.xml
</item><mod>
properties.title
</mod><mod>
properties.anywhereDomain
</mod></pkmkdoc>
\ No newline at end of file
pcbnew/autoplac.cpp
View file @
7bcb4ff3
...
...
@@ -660,7 +660,7 @@ int WinEDA_PcbFrame::RecherchePlacementModule( MODULE* Module, wxDC* DC )
if
(
Penalite
>=
0
)
/* c a d if the module can be placed. */
{
error
=
0
;
build_ratsnest_module
(
DC
,
Module
);
build_ratsnest_module
(
Module
);
cout
=
Compute_Ratsnest_PlaceModule
(
DC
);
DisplayChevelu
=
1
;
Score
=
cout
+
(
float
)
Penalite
;
...
...
@@ -1047,7 +1047,7 @@ static MODULE* PickModule( WinEDA_PcbFrame* pcbframe, wxDC* DC )
continue
;
pcbframe
->
GetBoard
()
->
m_Status_Pcb
&=
~
RATSNEST_ITEM_LOCAL_OK
;
Module
->
DisplayInfo
(
pcbframe
);
pcbframe
->
build_ratsnest_module
(
DC
,
Module
);
pcbframe
->
build_ratsnest_module
(
Module
);
/* Calculate external ratsnet. */
for
(
unsigned
ii
=
0
;
...
...
pcbnew/block.cpp
View file @
7bcb4ff3
...
...
@@ -378,12 +378,11 @@ bool WinEDA_PcbFrame::HandleBlockEnd( wxDC* DC )
/* Block operations: */
/*
*
/*
* Function Block_SelectItems
* Uses GetScreen()->m_BlockLocate
* select items within the selected block.
* selected items are put in the pick list
* @param none
*/
void
WinEDA_PcbFrame
::
Block_SelectItems
()
{
...
...
@@ -657,11 +656,10 @@ void WinEDA_PcbFrame::Block_Delete()
}
/*
*
/*
* Function Block_Rotate
* Rotate all items within the selected block.
* The rotation center is the center of the block
* @param none
*/
void
WinEDA_PcbFrame
::
Block_Rotate
()
{
...
...
@@ -726,7 +724,6 @@ void WinEDA_PcbFrame::Block_Rotate()
* Function Block_Flip
* flips items within the selected block.
* The flip center is the center of the block
* @param none
*/
void
WinEDA_PcbFrame
::
Block_Flip
()
{
...
...
@@ -788,12 +785,11 @@ void WinEDA_PcbFrame::Block_Flip()
}
/*
*
/*
* Function Block_Move
* moves all tracks and segments within the selected block.
* New location is determined by the current offset from the selected block's
* original location.
* @param none
*/
void
WinEDA_PcbFrame
::
Block_Move
()
{
...
...
@@ -849,12 +845,11 @@ void WinEDA_PcbFrame::Block_Move()
}
/*
*
/*
* Function Block_Duplicate
* duplicates all items within the selected block.
* New location is determined by the current offset from the selected block's
* original location.
* @param none
*/
void
WinEDA_PcbFrame
::
Block_Duplicate
()
{
...
...
pcbnew/board_items_to_polygon_shape_transform.cpp
View file @
7bcb4ff3
...
...
@@ -558,6 +558,7 @@ void D_PAD:: TransformShapeWithClearanceToPolygon( std:: vector < CPolyPt>& aCor
* @param aCornerBuffer = a buffer to store the polygon
* @param aPad = the current pad used to create the thermal shape
* @param aThermalGap = gap in thermal shape
* @param aCopperThickness = stubs thickness in thermal shape
* @param aMinThicknessValue = min copper thickness allowed
* @param aCircleToSegmentsCount = the number of segments to approximate a circle
* @param aCorrectionFactor = the correction to apply to circles radius to keep
...
...
pcbnew/board_undo_redo.cpp
View file @
7bcb4ff3
...
...
@@ -326,22 +326,17 @@ BOARD_ITEM* DuplicateStruct( BOARD_ITEM* aItem )
}
/*
*
/*
* 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_NEW
* UR_DELETED
* UR_MOVED
* UR_FLIPPED
* 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
,
UndoRedoOpType
aCommandType
,
...
...
pcbnew/class_board.cpp
View file @
7bcb4ff3
...
...
@@ -1180,15 +1180,15 @@ SEARCH_RESULT BOARD::Visit( INSPECTOR* inspector, const void* testData,
/**
* Function FindNet
* 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.
*/
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.
// zero is reserved for "no connection" and is not used.
// 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
(
net
)
// item can be NULL if anetcode is not valid
...
...
@@ -1196,7 +1196,7 @@ NETINFO_ITEM* BOARD::FindNet( int anetcode ) const
if
(
anetcode
!=
net
->
GetNet
()
)
{
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
...
...
@@ -1431,7 +1431,7 @@ out:
}
/*
*
/*
* Function RedrawAreasOutlines
* Redraw all areas outlines on layer aLayer ( redraw all if aLayer < 0 )
*/
...
...
@@ -1479,7 +1479,7 @@ void BOARD::RedrawFilledAreas( WinEDA_DrawPanel* panel,
* zone.
* 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.
* @param
r
efPos A wxPoint to test
* @param
aR
efPos A wxPoint to test
* @param aStartLayer the first layer 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
...
...
pcbnew/class_board.h
View file @
7bcb4ff3
...
...
@@ -270,7 +270,7 @@ public:
* Function SetEnabledLayers
* is a proxy function that calls the correspondent function in m_BoardSettings
* 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
);
...
...
@@ -278,7 +278,7 @@ public:
* Function IsLayerEnabled
* is a proxy function that calls the correspondent function in m_BoardSettings
* 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.
*/
bool
IsLayerEnabled
(
int
aLayer
)
const
...
...
@@ -310,7 +310,7 @@ public:
* Function SetVisibleLayers
* is a proxy function that calls the correspondent function in m_BoardSettings
* 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
);
...
...
@@ -529,9 +529,10 @@ public:
* and turns on or off the brilliance associated with that net according to the
* current value of global g_HighLight_Status
* @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.
*/
void
DrawHighLight
(
WinEDA_DrawPanel
*
aDrawPanel
,
wxDC
*
DC
,
int
aNetCode
);
void
DrawHighLight
(
WinEDA_DrawPanel
*
aDrawPanel
,
wxDC
*
a
DC
,
int
aNetCode
);
/**
* Function Visit
...
...
@@ -596,8 +597,6 @@ public:
* 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
* (this happens after reading a netlist)
* @param none
* @return none
*/
void
SynchronizeNetsAndNetClasses
();
...
...
@@ -713,7 +712,7 @@ public:
* 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
* 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 aEndLayer the last layer (-1 to ignore it) to test
* @return ZONE_CONTAINER* return a pointer to the ZONE_CONTAINER found, else NULL
...
...
@@ -726,7 +725,7 @@ public:
* Function RedrawAreasOutlines
* 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
,
int
aDrawMode
,
int
aLayer
);
...
...
@@ -735,7 +734,7 @@ public:
* Function RedrawFilledAreas
* 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
,
int
aDrawMode
,
int
aLayer
);
...
...
@@ -869,7 +868,8 @@ public:
* @param aModifiedZonesList = a PICKED_ITEMS_LIST * where to store deleted or added areas
* (useful in undo commands. Can be NULL
* @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 :
* -1 if arcs intersect other sides, so polygon can't be clipped
* 0 if no intersecting sides
...
...
pcbnew/class_dimension.cpp
View file @
7bcb4ff3
...
...
@@ -264,41 +264,41 @@ void DIMENSION::Move(const wxPoint& offset)
/**
* Function Rotate
* @param
center : Rotation point
* @param a
ngle : Rotation angle in 0.1 degrees
* @param
aRotCentre - the rotation point.
* @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
);
m_Text
->
m_Orient
+=
angle
;
RotatePoint
(
&
m_Text
->
m_Pos
,
aRotCentre
,
aA
ngle
);
m_Text
->
m_Orient
+=
a
A
ngle
;
if
(
m_Text
->
m_Orient
>=
3600
)
m_Text
->
m_Orient
-=
3600
;
if
(
(
m_Text
->
m_Orient
>
900
)
&&
(
m_Text
->
m_Orient
<
2700
)
)
m_Text
->
m_Orient
-=
1800
;
RotatePoint
(
&
Barre_ox
,
&
Barre_oy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
Barre_fx
,
&
Barre_fy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
TraitG_ox
,
&
TraitG_oy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
TraitG_fx
,
&
TraitG_fy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
TraitD_ox
,
&
TraitD_oy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
TraitD_fx
,
&
TraitD_fy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheG1_ox
,
&
FlecheG1_oy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheG1_fx
,
&
FlecheG1_fy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheG2_ox
,
&
FlecheG2_oy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheG2_fx
,
&
FlecheG2_fy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheD1_ox
,
&
FlecheD1_oy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheD1_fx
,
&
FlecheD1_fy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheD2_ox
,
&
FlecheD2_oy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
FlecheD2_fx
,
&
FlecheD2_fy
,
centre
.
x
,
centre
.
y
,
a
ngle
);
RotatePoint
(
&
Barre_ox
,
&
Barre_oy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
Barre_fx
,
&
Barre_fy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
TraitG_ox
,
&
TraitG_oy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
TraitG_fx
,
&
TraitG_fy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
TraitD_ox
,
&
TraitD_oy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
TraitD_fx
,
&
TraitD_fy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheG1_ox
,
&
FlecheG1_oy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheG1_fx
,
&
FlecheG1_fy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheG2_ox
,
&
FlecheG2_oy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheG2_fx
,
&
FlecheG2_fy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheD1_ox
,
&
FlecheD1_oy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheD1_fx
,
&
FlecheD1_fy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheD2_ox
,
&
FlecheD2_oy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
RotatePoint
(
&
FlecheD2_fx
,
&
FlecheD2_fy
,
aRotCentre
.
x
,
aRotCentre
.
y
,
aA
ngle
);
}
/**
* Function Flip
* 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
)
{
...
...
@@ -733,7 +733,7 @@ bool DIMENSION::HitTest( const wxPoint& ref_pos )
/**
* Function HitTest (overlaid)
* 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
*/
bool
DIMENSION
::
HitTest
(
EDA_Rect
&
refArea
)
...
...
pcbnew/class_dimension.h
View file @
7bcb4ff3
...
...
@@ -74,7 +74,7 @@ public:
/**
* Function Rotate
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
*/
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
...
...
@@ -82,7 +82,7 @@ public:
/**
* Function Flip
* 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
);
...
...
pcbnew/class_drawsegment.cpp
View file @
7bcb4ff3
...
...
@@ -50,7 +50,7 @@ void DRAWSEGMENT::Copy( DRAWSEGMENT* source )
/**
* Function Rotate
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
*/
void
DRAWSEGMENT
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
...
...
@@ -62,7 +62,7 @@ void DRAWSEGMENT::Rotate(const wxPoint& aRotCentre, int aAngle)
/**
* Function Flip
* 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
)
{
...
...
@@ -418,10 +418,10 @@ void DRAWSEGMENT::DisplayInfo( WinEDA_DrawFrame* frame )
/**
* Function HitTest
* 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
*/
bool
DRAWSEGMENT
::
HitTest
(
const
wxPoint
&
ref_p
os
)
bool
DRAWSEGMENT
::
HitTest
(
const
wxPoint
&
aRefP
os
)
{
int
ux0
=
m_Start
.
x
;
int
uy0
=
m_Start
.
y
;
...
...
@@ -430,8 +430,8 @@ bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos )
int
dx
=
m_End
.
x
-
ux0
;
int
dy
=
m_End
.
y
-
uy0
;
int
spot_cX
=
ref_p
os
.
x
-
ux0
;
int
spot_cY
=
ref_p
os
.
y
-
uy0
;
int
spot_cX
=
aRefP
os
.
x
-
ux0
;
int
spot_cY
=
aRefP
os
.
y
-
uy0
;
switch
(
m_Shape
){
case
S_CIRCLE
:
...
...
@@ -465,7 +465,7 @@ bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos )
case
S_CURVE
:
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
)
)
return
true
;
}
...
...
pcbnew/class_drawsegment.h
View file @
7bcb4ff3
...
...
@@ -80,16 +80,16 @@ public:
/**
* Function HitTest
* 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
*/
bool
HitTest
(
const
wxPoint
&
ref_p
os
);
bool
HitTest
(
const
wxPoint
&
aRefP
os
);
/**
* Function HitTest (overlayed)
* tests if the given EDA_Rect intersect this object.
* 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
*/
bool
HitTest
(
EDA_Rect
&
refArea
);
...
...
@@ -121,7 +121,7 @@ public:
/**
* Function Move
* 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
)
{
...
...
@@ -133,7 +133,7 @@ public:
/**
* Function Rotate
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
*/
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
...
...
@@ -141,7 +141,7 @@ public:
/**
* Function Flip
* 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
);
...
...
pcbnew/class_edge_mod.cpp
View file @
7bcb4ff3
...
...
@@ -499,7 +499,7 @@ int EDGE_MODULE::ReadDescr( char* Line, FILE* File,
* @param refPos A wxPoint to test
* @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
rayon
,
dist
;
...
...
@@ -515,8 +515,8 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos )
switch
(
m_Shape
)
{
case
S_SEGMENT
:
spot_cX
=
ref
_p
os
.
x
-
ux0
;
spot_cY
=
ref
_p
os
.
y
-
uy0
;
spot_cX
=
ref
P
os
.
x
-
ux0
;
spot_cY
=
ref
P
os
.
y
-
uy0
;
dx
=
uxf
-
ux0
;
dy
=
uyf
-
uy0
;
...
...
@@ -526,21 +526,21 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos )
case
S_CIRCLE
:
rayon
=
(
int
)
hypot
(
(
double
)
(
uxf
-
ux0
),
(
double
)
(
uyf
-
uy0
)
);
dist
=
(
int
)
hypot
(
(
double
)
(
ref
_p
os
.
x
-
ux0
),
(
double
)
(
ref
_p
os
.
y
-
uy0
)
);
dist
=
(
int
)
hypot
(
(
double
)
(
ref
P
os
.
x
-
ux0
),
(
double
)
(
ref
P
os
.
y
-
uy0
)
);
if
(
abs
(
rayon
-
dist
)
<=
m_Width
)
return
true
;
break
;
case
S_ARC
:
rayon
=
(
int
)
hypot
(
(
double
)
(
uxf
-
ux0
),
(
double
)
(
uyf
-
uy0
)
);
dist
=
(
int
)
hypot
(
(
double
)
(
ref
_p
os
.
x
-
ux0
),
(
double
)
(
ref
_p
os
.
y
-
uy0
)
);
dist
=
(
int
)
hypot
(
(
double
)
(
ref
P
os
.
x
-
ux0
),
(
double
)
(
ref
P
os
.
y
-
uy0
)
);
if
(
abs
(
rayon
-
dist
)
>
m_Width
)
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
endAngle
=
stAngle
+
m_Angle
;
...
...
pcbnew/class_marker_pcb.cpp
View file @
7bcb4ff3
...
...
@@ -82,7 +82,7 @@ void MARKER_PCB::DisplayInfo( WinEDA_DrawFrame* frame )
/**
* Function Rotate
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
*/
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
* 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
* @param
const wxPoint&
aCentre - the rotation point.
* @param aCentre - the rotation point.
*/
void
MARKER_PCB
::
Flip
(
const
wxPoint
&
aCentre
)
{
...
...
pcbnew/class_marker_pcb.h
View file @
7bcb4ff3
...
...
@@ -43,7 +43,7 @@ public:
/**
* Function Move
* 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
)
{
...
...
@@ -53,7 +53,7 @@ public:
/**
* Function Rotate
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
*/
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
...
...
@@ -61,7 +61,7 @@ public:
/**
* Function Flip
* 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
);
...
...
pcbnew/class_mire.cpp
View file @
7bcb4ff3
...
...
@@ -195,7 +195,7 @@ bool MIREPCB::HitTest( const wxPoint& refPos )
/**
* Function HitTest (overlayed)
* 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
*/
bool
MIREPCB
::
HitTest
(
EDA_Rect
&
refArea
)
...
...
@@ -209,7 +209,7 @@ bool MIREPCB::HitTest( EDA_Rect& refArea )
/**
* Function Rotate
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
*/
void
MIREPCB
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
...
...
@@ -221,7 +221,7 @@ void MIREPCB::Rotate(const wxPoint& aRotCentre, int aAngle)
/**
* Function Flip
* 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
)
{
...
...
pcbnew/class_mire.h
View file @
7bcb4ff3
...
...
@@ -31,7 +31,7 @@ public:
/**
* Function Move
* 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
)
{
...
...
@@ -41,7 +41,7 @@ public:
/**
* Function Rotate
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
*/
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
...
...
@@ -49,7 +49,7 @@ public:
/**
* Function Flip
* 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
);
...
...
pcbnew/class_module.cpp
View file @
7bcb4ff3
...
...
@@ -178,13 +178,13 @@ void MODULE::Copy( MODULE* aModule )
/**
* Function Draw
* Draws the footprint to the current Device Context
*
@param panel = The active Draw Panel (used to know the clip box)
*
@param DC = c
urrent Device Context
*
@param offset = draw offset (usually wxPoint(0,0)
*
@param draw_mode = GR_OR, GR_XOR, GR_AND
*
@param aPanel = draw panel, Used to know the clip box
*
@param aDC = C
urrent Device Context
*
@param aDrawMode = GR_OR, GR_XOR..
*
@param aOffset = draw offset (usually wxPoint(0,0)
*/
void
MODULE
::
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
int
draw_mode
,
const
wxPoint
&
o
ffset
)
void
MODULE
::
Draw
(
WinEDA_DrawPanel
*
aPanel
,
wxDC
*
a
DC
,
int
aDrawMode
,
const
wxPoint
&
aO
ffset
)
{
if
(
(
m_Flags
&
DO_NOT_DRAW
)
||
(
m_Flags
&
IS_MOVED
)
)
return
;
...
...
@@ -194,25 +194,25 @@ void MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
if
(
pad
->
m_Flags
&
IS_MOVED
)
continue
;
pad
->
Draw
(
panel
,
DC
,
draw_mode
,
o
ffset
);
pad
->
Draw
(
aPanel
,
aDC
,
aDrawMode
,
aO
ffset
);
}
BOARD
*
brd
=
GetBoard
();
// 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 */
if
(
brd
->
IsElementVisible
(
MOD_REFERENCES_VISIBLE
)
)
{
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
(
!
(
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
()
)
...
...
@@ -224,7 +224,7 @@ void MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
{
case
TYPE_TEXTE_MODULE
:
case
TYPE_EDGE_MODULE
:
item
->
Draw
(
panel
,
DC
,
draw_mode
,
o
ffset
);
item
->
Draw
(
aPanel
,
aDC
,
aDrawMode
,
aO
ffset
);
break
;
default
:
...
...
pcbnew/class_module.h
View file @
7bcb4ff3
...
...
@@ -100,7 +100,7 @@ public:
void
Copy
(
MODULE
*
Module
);
// Copy structure
/*
*
/*
* Function Add
* adds the given item to this MODULE and takes ownership of its memory.
* @param aBoardItem The item to add to this board.
...
...
@@ -154,14 +154,14 @@ public:
/**
* Function Move
* 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
);
/**
* Function Rotate
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
*/
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
...
...
@@ -169,14 +169,14 @@ public:
/**
* Function Flip
* 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
);
/**
* Function IsLocked
* (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
{
...
...
@@ -204,7 +204,7 @@ public:
* Function Save
* writes the data structures for this object out to a FILE in "*.brd"
* format.
*
a
@param aFile The FILE to write to.
* @param aFile The FILE to write to.
* @return bool - true if success writing else false.
*/
bool
Save
(
FILE
*
aFile
)
const
;
...
...
@@ -227,15 +227,15 @@ public:
/**
* Function Draw
* Draw the text according to the footprint pos and orient
* @param panel = draw panel, Used to know the clip box
* @param DC = Current Device Context
* @param offset = draw offset (usually wxPoint(0,0)
* @param aPanel = draw panel, Used to know the clip box
* @param aDC = Current Device Context
* @param aDrawMode = GR_OR, GR_XOR..
* @param aOffset = draw offset (usually wxPoint(0,0)
*/
void
Draw
(
WinEDA_DrawPanel
*
p
anel
,
wxDC
*
DC
,
void
Draw
(
WinEDA_DrawPanel
*
aP
anel
,
wxDC
*
a
DC
,
int
aDrawMode
,
const
wxPoint
&
o
ffset
=
ZeroOffset
);
const
wxPoint
&
aO
ffset
=
ZeroOffset
);
void
Draw3D
(
Pcb3D_GLCanvas
*
glcanvas
);
void
DrawEdgesOnly
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
...
...
@@ -293,7 +293,7 @@ public:
* Function FindPadByName
* returns a D_PAD* with a matching name. Note that names may not be
* 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
* found.
*/
...
...
pcbnew/class_module_transform_functions.cpp
View file @
7bcb4ff3
...
...
@@ -122,7 +122,7 @@ int ChangeSideMaskLayer( int masque )
/**
* Function Move (virtual)
* 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
)
{
...
...
@@ -134,7 +134,7 @@ void MODULE::Move(const wxPoint& aMoveVector)
/**
* Function Rotate
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
*/
void
MODULE
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
...
...
@@ -149,7 +149,7 @@ void MODULE::Rotate(const wxPoint& aRotCentre, int aAngle)
/**
* Function Flip
* 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
)
{
...
...
pcbnew/class_netclass.h
View file @
7bcb4ff3
...
...
@@ -84,6 +84,8 @@ public:
/**
* Constructor
* 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
* NULL tells me to copy from g_DesignSettings.
*/
...
...
@@ -205,6 +207,7 @@ public:
* Function ReadDescr
* reads the data structures for this object from a FILE in "*.brd" format.
* @param aFile The FILE to read to.
* @param aLineNum a pointer to a line number counter
* @return bool - true if success reading else false.
*/
bool
ReadDescr
(
FILE
*
aFile
,
int
*
aLineNum
);
...
...
pcbnew/class_netinfo.h
View file @
7bcb4ff3
...
...
@@ -361,7 +361,7 @@ public:
/**
* Function SetNetname
* @param
const wxString
: the new netname
* @param
aNetname
: the new netname
*/
void
SetNetname
(
const
wxString
&
aNetname
);
...
...
pcbnew/class_netinfo_item.cpp
View file @
7bcb4ff3
...
...
@@ -93,7 +93,7 @@ out:
/**
* Function SetNetname
* @param
const wxString
: the new netname
* @param
aNetname
: the new netname
*/
void
NETINFO_ITEM
::
SetNetname
(
const
wxString
&
aNetname
)
{
...
...
pcbnew/class_pad.cpp
View file @
7bcb4ff3
...
...
@@ -180,7 +180,7 @@ void D_PAD::SetPadName( const wxString& name )
/**
* Function SetNetname
* @param
const wxString
: the new netname
* @param
aNetname
: the new netname
*/
void
D_PAD
::
SetNetname
(
const
wxString
&
aNetname
)
{
...
...
@@ -772,17 +772,17 @@ bool D_PAD::IsOnLayer( int aLayer ) const
/**
* Function HitTest
* 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
*/
bool
D_PAD
::
HitTest
(
const
wxPoint
&
ref
_p
os
)
bool
D_PAD
::
HitTest
(
const
wxPoint
&
ref
P
os
)
{
int
dx
,
dy
;
double
dist
;
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. */
if
(
(
abs
(
delta
.
x
)
>
m_ShapeMaxRadius
)
||
(
abs
(
delta
.
y
)
>
m_ShapeMaxRadius
)
)
...
...
pcbnew/class_pad.h
View file @
7bcb4ff3
...
...
@@ -140,7 +140,7 @@ public:
/**
* Function SetNetname
* @param
const wxString
: the new netname
* @param
aNetname
: the new netname
*/
void
SetNetname
(
const
wxString
&
aNetname
);
...
...
@@ -230,8 +230,14 @@ public:
/* drawing functions */
void
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
int
aDrawMode
,
const
wxPoint
&
offset
=
ZeroOffset
);
/** Draw a pad:
* @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
);
...
...
@@ -247,7 +253,7 @@ public:
* Has meaning only for polygonal pads (trapezoid and rectangular)
* Build the Corner list of the polygonal shape,
* 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 aRotation = full rotation of the polygon
*/
...
...
@@ -341,7 +347,7 @@ public:
/**
* Function Move
* 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
)
{
...
...
pcbnew/class_pad_draw_functions.cpp
View file @
7bcb4ff3
...
...
@@ -45,7 +45,7 @@ PAD_DRAWINFO::PAD_DRAWINFO()
/** 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 aOffset = draw offset
*/
...
...
@@ -663,7 +663,7 @@ int D_PAD::BuildSegmentFromOvalShape(wxPoint& aSegStart, wxPoint& aSegEnd, int a
* Has meaning only for polygonal pads (trapeziod and rectangular)
* Build the Corner list of the polygonal shape,
* 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 aRotation = full rotation of the polygon, usually m_Orient
*/
...
...
pcbnew/class_pcb_layer_widget.h
View file @
7bcb4ff3
...
...
@@ -61,6 +61,8 @@ public:
/**
* 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
* effectively sets the overal size of the widget via the row height and bitmap
* button sizes.
...
...
pcbnew/class_pcb_text.cpp
View file @
7bcb4ff3
...
...
@@ -180,9 +180,8 @@ bool TEXTE_PCB::Save( FILE* aFile ) const
}
/*
*
/*
* Function Draw
* DrawMode = GR_OR, GR_XOR ..
* 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
* and the actual size is very important, especially for copper texts
...
...
@@ -258,7 +257,7 @@ void TEXTE_PCB::DisplayInfo( WinEDA_DrawFrame* frame )
/**
* Function Rotate
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
*/
void
TEXTE_PCB
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
...
...
@@ -275,7 +274,7 @@ void TEXTE_PCB::Rotate(const wxPoint& aRotCentre, int aAngle)
/**
* Function Flip
* 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
)
{
...
...
pcbnew/class_pcb_text.h
View file @
7bcb4ff3
...
...
@@ -28,7 +28,7 @@ public:
/**
* Function Move
* 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
)
{
...
...
@@ -38,7 +38,7 @@ public:
/**
* Function Rotate
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
*/
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
...
...
@@ -46,7 +46,7 @@ public:
/**
* Function Flip
* 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
);
...
...
pcbnew/class_text_mod.cpp
View file @
7bcb4ff3
...
...
@@ -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.
* @param aLine The current line which contains the first line of description.
* @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.
*/
int
TEXTE_MODULE
::
ReadDescr
(
char
*
aLine
,
FILE
*
aFile
,
int
*
aLineNum
)
...
...
@@ -276,10 +276,10 @@ EDA_Rect TEXTE_MODULE::GetTextRect( void ) const
/**
* Function HitTest
* 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
*/
bool
TEXTE_MODULE
::
HitTest
(
const
wxPoint
&
r
efPos
)
bool
TEXTE_MODULE
::
HitTest
(
const
wxPoint
&
aR
efPos
)
{
wxPoint
rel_pos
;
EDA_Rect
area
=
GetTextRect
();
...
...
@@ -288,7 +288,7 @@ bool TEXTE_MODULE::HitTest( const wxPoint& refPos )
* to test if refPos is within area (which is relative to an horizontal
* text)
*/
rel_pos
=
r
efPos
;
rel_pos
=
aR
efPos
;
RotatePoint
(
&
rel_pos
,
m_Pos
,
-
GetDrawRotation
()
);
if
(
area
.
Contains
(
rel_pos
)
)
...
...
pcbnew/class_text_mod.h
View file @
7bcb4ff3
...
...
@@ -80,12 +80,12 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
bool
Save
(
FILE
*
aFile
)
const
;
/**
* Function Read
Line
Descr
* Function ReadDescr
* Read description from a given line in "*.brd" format.
* @param aLine The current line which contains the first line of
* description.
* @param a
Lin
e The FILE to read next lines (currently not used).
* @param LineNum a point to the line count (currently not used).
* @param a
Fil
e The FILE to read next lines (currently not used).
* @param
a
LineNum a point to the line count (currently not used).
* @return int - > 0 if success reading else 0.
*/
int
ReadDescr
(
char
*
aLine
,
FILE
*
aFile
,
int
*
aLineNum
=
NULL
);
...
...
@@ -123,10 +123,10 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
/**
* Function HitTest
* 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
*/
bool
HitTest
(
const
wxPoint
&
posref
);
bool
HitTest
(
const
wxPoint
&
aRefPos
);
/**
* Function IsOnLayer
...
...
@@ -139,12 +139,12 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
*/
bool
IsOnLayer
(
int
aLayer
)
const
;
/*
*
/*
* Function IsOnOneOfTheseLayers
* 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
* 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.
* @return bool - true if on one of the given layers, else false.
* bool IsOnOneOfTheseLayers( int aLayerMask ) const;
...
...
pcbnew/class_track.cpp
View file @
7bcb4ff3
...
...
@@ -271,7 +271,7 @@ EDA_Rect TRACK::GetBoundingBox() const
/**
* Function Rotate
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
*/
void
TRACK
::
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
)
...
...
@@ -284,7 +284,7 @@ void TRACK::Rotate( const wxPoint& aRotCentre, int aAngle )
/**
* Function Flip
* 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
)
{
...
...
@@ -324,11 +324,6 @@ SEARCH_RESULT TRACK::Visit( INSPECTOR* inspector, const void* testData,
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
;
ReturnLayerPair
(
&
top_layer
,
&
bottom_layer
);
...
...
@@ -343,7 +338,6 @@ bool SEGVIA::IsOnLayer( int layer_number ) const
/***********************************/
int
TRACK
::
ReturnMaskLayer
()
/***********************************/
/* Return the mask layer for this.
* for a via, there is more than one layer used
*/
...
...
@@ -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
* 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
;
if
(
Type
()
==
TYPE_ZONE
)
track
=
Pcb
->
m_Zone
;
track
=
a
Pcb
->
m_Zone
;
else
track
=
Pcb
->
m_Track
;
track
=
a
Pcb
->
m_Track
;
for
(
;
track
;
track
=
track
->
Next
()
)
{
...
...
@@ -1136,10 +1128,10 @@ void TRACK::DisplayInfoBase( WinEDA_DrawFrame* frame )
/**
* Function HitTest
* 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
*/
bool
TRACK
::
HitTest
(
const
wxPoint
&
ref
_p
os
)
bool
TRACK
::
HitTest
(
const
wxPoint
&
ref
P
os
)
{
int
radius
=
m_Width
>>
1
;
...
...
@@ -1148,8 +1140,8 @@ bool TRACK::HitTest( const wxPoint& ref_pos )
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)
int
spot_cX
=
ref
_p
os
.
x
-
m_Start
.
x
;
int
spot_cY
=
ref
_p
os
.
y
-
m_Start
.
y
;
int
spot_cX
=
ref
P
os
.
x
-
m_Start
.
x
;
int
spot_cY
=
ref
P
os
.
y
-
m_Start
.
y
;
if
(
Type
()
==
TYPE_VIA
)
{
...
...
@@ -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.
* 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
*/
bool
TRACK
::
HitTest
(
EDA_Rect
&
refArea
)
...
...
pcbnew/class_track.h
View file @
7bcb4ff3
...
...
@@ -39,7 +39,6 @@ public:
BOARD_ITEM
*
start
;
// pointers to a connected item (pad or track)
BOARD_ITEM
*
end
;
// chain = 0 indique une connexion non encore traitee
int
m_Param
;
// Auxiliary variable ( used in some computations )
protected
:
...
...
@@ -64,7 +63,7 @@ public:
/**
* Function Move
* 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
)
{
...
...
@@ -75,7 +74,7 @@ public:
/**
* Function Rotate
* Rotate this object.
* @param
const wxPoint&
aRotCentre - the rotation point.
* @param aRotCentre - the rotation point.
* @param aAngle - the rotation angle in 0.1 degree.
*/
virtual
void
Rotate
(
const
wxPoint
&
aRotCentre
,
int
aAngle
);
...
...
@@ -83,7 +82,7 @@ public:
/**
* Function Flip
* 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
);
...
...
@@ -256,10 +255,10 @@ public:
bool
HitTest
(
const
wxPoint
&
refPos
);
/**
* Function HitTest (overla
ye
d)
* Function HitTest (overla
i
d)
* tests if the given wxRect intersect this object.
* 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
*/
bool
HitTest
(
EDA_Rect
&
refArea
);
...
...
@@ -346,9 +345,8 @@ public:
/**
* Function IsOnLayer
* 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
* via.
* @param aLayer The layer to test for.
* from BOARD_ITEM. Tests the starting and ending range of layers for the via.
* @param aLayer the layer to test for.
* @return bool - true if on given layer, else false.
*/
bool
IsOnLayer
(
int
aLayer
)
const
;
...
...
pcbnew/collectors.cpp
View file @
7bcb4ff3
...
...
@@ -128,11 +128,11 @@ const KICAD_T GENERAL_COLLECTOR::Tracks[] = {
* that it finds and does not do any displaying.
*
* @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,
* 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
;
MODULE
*
module
=
NULL
;
...
...
pcbnew/collectors.h
View file @
7bcb4ff3
...
...
@@ -378,7 +378,8 @@ public:
* Constructor GENERAL_COLLECTORS_GUIDE
* grabs stuff from global preferences and uses reasonable defaults.
* 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
)
{
...
...
pcbnew/dragsegm.cpp
View file @
7bcb4ff3
...
...
@@ -41,8 +41,9 @@ void Dessine_Segments_Dragges( WinEDA_DrawPanel* panel, wxDC* DC )
{
wxPoint
pos
;
Track
=
g_DragSegmentList
[
ii
].
m_Segm
;
#ifndef USE_WX_OVERLAY
Track
->
Draw
(
panel
,
DC
,
GR_XOR
);
// erase from screen at old position
#endif
pt_pad
=
g_DragSegmentList
[
ii
].
m_Pad_Start
;
if
(
pt_pad
)
{
...
...
pcbnew/drc.cpp
View file @
7bcb4ff3
...
...
@@ -140,24 +140,21 @@ int DRC::Drc( TRACK* aRefSegm, TRACK* aList )
}
/**************************************************************/
int
DRC
::
Drc
(
ZONE_CONTAINER
*
aArea
,
int
CornerIndex
)
/*************************************************************/
/**
* Function Drc
* tests the outline segment starting at CornerIndex and returns the result and displays the error
* in the status panel only if one exists.
* Test Edge inside other areas
* Test Edge too close other areas
* @param a
Edge
The areaparent which contains the corner.
* @param CornerIndex The starting point of the segment to test.
* @param a
Area
The areaparent which contains the corner.
* @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
*/
int
DRC
::
Drc
(
ZONE_CONTAINER
*
aArea
,
int
aCornerIndex
)
{
updatePointers
();
if
(
!
doEdgeZoneDrc
(
aArea
,
CornerIndex
)
)
if
(
!
doEdgeZoneDrc
(
aArea
,
a
CornerIndex
)
)
{
wxASSERT
(
m_currentMarker
);
m_currentMarker
->
DisplayInfo
(
m_mainWindow
);
...
...
pcbnew/drc_stuff.h
View file @
7bcb4ff3
...
...
@@ -374,11 +374,11 @@ public:
* in the status panel only if one exists.
* Test Edge inside other areas
* Test Edge too close other areas
* @param a
Edge
The areaparent which contains the corner.
* @param CornerIndex The starting point of the segment to test.
* @param a
Area
The areaparent which contains the corner.
* @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
*/
int
Drc
(
ZONE_CONTAINER
*
aArea
,
int
CornerIndex
);
int
Drc
(
ZONE_CONTAINER
*
aArea
,
int
a
CornerIndex
);
/**
* Function DrcBlind
...
...
pcbnew/edgemod.cpp
View file @
7bcb4ff3
...
...
@@ -210,11 +210,11 @@ void WinEDA_ModuleEditFrame::Edit_Edge_Layer( EDGE_MODULE* Edge )
/**
* Function Enter_Edge_Width
* Edition of
the edge items width
* Edition of
width of module outlines
* 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
*
@output
ModuleSegmentWidth (global) = new width
*
changes g_
ModuleSegmentWidth (global) = new width
*/
void
WinEDA_ModuleEditFrame
::
Enter_Edge_Width
(
EDGE_MODULE
*
aEdge
)
{
...
...
pcbnew/edit_track_width.cpp
View file @
7bcb4ff3
...
...
@@ -110,10 +110,10 @@ bool WinEDA_PcbFrame::SetTrackSegmentWidth( TRACK* aTrackItem,
/**
* Function Edit_TrackSegm_Width
* 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
*/
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
;
bool
change
=
SetTrackSegmentWidth
(
aTrackItem
,
&
itemsListPicker
,
false
);
...
...
@@ -122,14 +122,14 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem )
return
;
// No change
// The segment has changed: redraw it and save it in undo list
if
(
DC
)
if
(
a
DC
)
{
TRACK
*
oldsegm
=
(
TRACK
*
)
itemsListPicker
.
GetPickedItemLink
(
0
);
wxASSERT
(
oldsegm
);
DrawPanel
->
CursorOff
(
DC
);
// Erase cursor shape
oldsegm
->
Draw
(
DrawPanel
,
DC
,
GR_XOR
);
// Erase old track shape
aTrackItem
->
Draw
(
DrawPanel
,
DC
,
GR_OR
);
// Display new track shape
DrawPanel
->
CursorOn
(
DC
);
// Display cursor shape
DrawPanel
->
CursorOff
(
a
DC
);
// Erase cursor shape
oldsegm
->
Draw
(
DrawPanel
,
a
DC
,
GR_XOR
);
// Erase old track shape
aTrackItem
->
Draw
(
DrawPanel
,
a
DC
,
GR_OR
);
// Display new track shape
DrawPanel
->
CursorOn
(
a
DC
);
// Display cursor shape
}
SaveCopyInUndoList
(
itemsListPicker
,
UR_CHANGED
);
}
...
...
@@ -139,11 +139,10 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem )
* Function Edit_Track_Width
* 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
* @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
* @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
;
int
nb_segm
;
...
...
@@ -166,18 +165,18 @@ void WinEDA_PcbFrame::Edit_Track_Width( wxDC* DC, TRACK* aTrackSegment )
return
;
// 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
++
)
{
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
->
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
);
...
...
pcbnew/files.cpp
View file @
7bcb4ff3
...
...
@@ -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.
*/
bool
WinEDA_PcbFrame
::
LoadOnePcbFile
(
const
wxString
&
aFileName
,
bool
Append
,
bool
WinEDA_PcbFrame
::
LoadOnePcbFile
(
const
wxString
&
aFileName
,
bool
a
Append
,
bool
aForceFileDialog
)
{
int
ii
;
...
...
@@ -141,7 +141,7 @@ bool WinEDA_PcbFrame::LoadOnePcbFile( const wxString& aFileName, bool Append,
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 \
the changes?"
)
)
)
...
...
@@ -150,7 +150,7 @@ the changes?" ) ) )
m_TrackAndViasSizesList_Changed
=
true
;
if
(
Append
)
if
(
a
Append
)
{
GetScreen
()
->
m_FileName
=
wxEmptyString
;
OnModify
();
...
...
@@ -182,7 +182,7 @@ the changes?" ) ) )
fileName
.
SetExt
(
PcbFileExtension
);
}
if
(
!
Append
)
if
(
!
a
Append
)
Clear_Pcb
(
false
);
// pass false since we prompted above for a modified board
GetScreen
()
->
m_FileName
=
fileName
.
GetFullPath
();
...
...
@@ -224,7 +224,7 @@ this file again." ) );
// Reload the corresponding configuration file:
wxSetWorkingDirectory
(
wxPathOnly
(
GetScreen
()
->
m_FileName
)
);
if
(
Append
)
if
(
a
Append
)
ReadPcbFile
(
source
,
true
);
else
{
...
...
@@ -244,7 +244,7 @@ this file again." ) );
GetScreen
()
->
ClrModify
();
/* If append option: change the initial board name to <oldname>-append.brd */
if
(
Append
)
if
(
a
Append
)
{
wxString
new_filename
=
GetScreen
()
->
m_FileName
.
BeforeLast
(
'.'
);
if
(
!
new_filename
.
EndsWith
(
wxT
(
"-append"
)
)
)
...
...
pcbnew/hotkeys_board_editor.cpp
View file @
7bcb4ff3
...
...
@@ -24,7 +24,7 @@
* ** Commands are case insensitive **
* Some commands are relatives to the item under the mouse cursor
* @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
*/
void
WinEDA_PcbFrame
::
OnHotKey
(
wxDC
*
aDC
,
int
aHotkeyCode
,
EDA_ITEM
*
aItem
)
...
...
pcbnew/layer_widget.h
View file @
7bcb4ff3
...
...
@@ -188,7 +188,15 @@ protected:
public
:
/** 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
* 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.
*/
LAYER_WIDGET
(
wxWindow
*
aParent
,
wxWindow
*
aFocusOwner
,
int
aPointSize
=
-
1
,
...
...
@@ -315,6 +323,7 @@ public:
* not invoke OnRenderEnable().
* @param aId is the same unique id used when adding a ROW to the
* Render tab.
* @param isSet = the new checkbox state
*/
void
SetRenderState
(
int
aId
,
bool
isSet
);
...
...
@@ -350,6 +359,8 @@ public:
* Function OnLayerColorChange
* is called to notify client code about a layer color change. Derived
* 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
;
...
...
@@ -358,6 +369,7 @@ public:
* is called to notify client code whenever the user selects a different
* layer. Derived classes will handle this accordingly, and can deny
* the change by returning false.
* @param aLayer is the board layer to select
*/
virtual
bool
OnLayerSelect
(
int
aLayer
)
=
0
;
...
...
@@ -365,6 +377,8 @@ public:
* Function OnLayerVisible
* 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
* 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.
...
...
@@ -377,6 +391,7 @@ public:
* color.
* @param aId is the same id that was established in a Rendering row
* via the AddRenderRow() function.
* @param aColor is the new color
*/
virtual
void
OnRenderColorChange
(
int
aId
,
int
aColor
)
=
0
;
...
...
pcbnew/librairi.cpp
View file @
7bcb4ff3
...
...
@@ -36,7 +36,7 @@ static const wxString ModExportFileWildcard(
static
bool
CreateDocLibrary
(
const
wxString
&
LibName
);
/*
*
/*
* Function Import_Module
* Read a file containing only one footprint.
* Used to import (after exporting) a footprint
...
...
@@ -44,7 +44,6 @@ static bool CreateDocLibrary( const wxString& LibName );
* 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
* (One footprint per file, Newlib files have no special ext.)
* @param DC = Current Device Context (can be NULL)
*/
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
* So Create a new lib (which will contains one module) and export a footprint
* is basically the same thing
* @param DC = Current Device Context (can be NULL)
* @param createlib : true = use default lib path to create lib
* false = use current path or last used path to export
* footprint
* @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
WinEDA_ModuleEditFrame
::
Export_Module
(
MODULE
*
ptmod
,
bool
createl
ib
)
void
WinEDA_ModuleEditFrame
::
Export_Module
(
MODULE
*
aModule
,
bool
aCreateSysL
ib
)
{
wxFileName
fn
;
char
Line
[
1025
];
...
...
@@ -159,21 +157,21 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
wxString
msg
,
path
,
title
,
wildcard
;
wxConfig
*
Config
=
wxGetApp
().
m_EDA_Config
;
if
(
ptmod
==
NULL
)
if
(
aModule
==
NULL
)
return
;
ptmod
->
m_LibRef
=
ptmod
->
m_Reference
->
m_Text
;
fn
.
SetName
(
ptmod
->
m_LibRef
);
fn
.
SetExt
(
createl
ib
?
ModuleFileExtension
:
ModExportFileExtension
);
aModule
->
m_LibRef
=
aModule
->
m_Reference
->
m_Text
;
fn
.
SetName
(
aModule
->
m_LibRef
);
fn
.
SetExt
(
aCreateSysL
ib
?
ModuleFileExtension
:
ModExportFileExtension
);
if
(
createl
ib
)
if
(
aCreateSysL
ib
)
path
=
wxGetApp
().
ReturnLastVisitedLibraryPath
();
else
if
(
Config
)
Config
->
Read
(
EXPORT_IMPORT_LASTPATH_KEY
,
&
path
);
fn
.
SetPath
(
path
);
title
=
createl
ib
?
_
(
"Create New Library"
)
:
_
(
"Export Module"
);
wildcard
=
createl
ib
?
ModuleFileWildcard
:
ModExportFileWildcard
;
title
=
aCreateSysL
ib
?
_
(
"Create New Library"
)
:
_
(
"Export Module"
);
wildcard
=
aCreateSysL
ib
?
ModuleFileWildcard
:
ModExportFileWildcard
;
wxFileDialog
dlg
(
this
,
msg
,
fn
.
GetPath
(),
fn
.
GetFullName
(),
wildcard
,
wxFD_SAVE
|
wxFD_OVERWRITE_PROMPT
);
...
...
@@ -190,7 +188,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
return
;
}
if
(
!
createl
ib
&&
Config
)
// Save file path
if
(
!
aCreateSysL
ib
&&
Config
)
// Save file path
{
Config
->
Write
(
EXPORT_IMPORT_LASTPATH_KEY
,
fn
.
GetPath
()
);
}
...
...
@@ -202,7 +200,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
fprintf
(
file
,
"%s %s
\n
"
,
ENTETE_LIBRAIRIE
,
DateAndTime
(
Line
)
);
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
);
GetBoard
()
->
m_Modules
->
Save
(
file
);
...
...
pcbnew/loadcmp.cpp
View file @
7bcb4ff3
...
...
@@ -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
* 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
* @param aModuleName = module name to load
* @param aDisplayMessageError = true to display an error message if any.
...
...
pcbnew/magnetic_tracks_functions.cpp
View file @
7bcb4ff3
...
...
@@ -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
* "curpos". If yes, then curpos is adjusted appropriately according to that
* 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.
* @return bool - true if the position was adjusted magnetically, else false.
*/
...
...
pcbnew/module_editor_frame.h
View file @
7bcb4ff3
...
...
@@ -74,12 +74,12 @@ public:
* Print the page pointed by ActiveScreen, set by the calling print function
* @param aDC = wxDC given by the calling print function
* @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 aData = a pointer on an auxiliary data (NULL if not used)
*/
virtual
void
PrintPage
(
wxDC
*
aDC
,
bool
aPrint_Sheet_Ref
,
int
aPrintMask
,
bool
aPrintMirrorMode
,
int
aPrintMask
Layer
,
bool
aPrintMirrorMode
,
void
*
aData
=
NULL
);
// BOARD handling
...
...
@@ -142,7 +142,19 @@ public:
void
Transform
(
MODULE
*
module
,
int
transform
);
// 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
* Read a file containing only one footprint.
...
...
@@ -151,7 +163,6 @@ public:
* 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
* (One footprint per file, Newlib files have no special ext.)
* @param DC = Current Device Context (can be NULL)
*/
MODULE
*
Import_Module
(
);
...
...
@@ -188,11 +199,11 @@ public:
void
End_Edge_Module
(
EDGE_MODULE
*
Edge
);
/**
* Function Enter_Edge_Width
* Edition of
the edge items width
* Edition of
width of module outlines
* Ask for a new width.
* Change the width of EDGE_MODULE Edge if aEdge != 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
Start_Move_EdgeMod
(
EDGE_MODULE
*
drawitem
,
wxDC
*
DC
);
...
...
pcbnew/modules.cpp
View file @
7bcb4ff3
...
...
@@ -256,28 +256,27 @@ void Montre_Position_Empreinte( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
* 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 module = footprint to delete
* @param DC = currentDevice Context. if NULL: do not redraw new ratsnest and
* screen
* @param aPromptBeforeDeleting : if true: ask for confirmation before deleting
* @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
WinEDA_PcbFrame
::
Delete_Module
(
MODULE
*
m
odule
,
wxDC
*
DC
,
bool
WinEDA_PcbFrame
::
Delete_Module
(
MODULE
*
aM
odule
,
wxDC
*
a
DC
,
bool
aAskBeforeDeleting
)
{
wxString
msg
;
if
(
m
odule
==
NULL
)
if
(
aM
odule
==
NULL
)
return
FALSE
;
m
odule
->
DisplayInfo
(
this
);
aM
odule
->
DisplayInfo
(
this
);
/* Confirm module delete. */
if
(
aAskBeforeDeleting
)
{
msg
.
Printf
(
_
(
"Delete Module %s (value %s) ?"
),
GetChars
(
m
odule
->
m_Reference
->
m_Text
),
GetChars
(
m
odule
->
m_Value
->
m_Text
)
);
GetChars
(
aM
odule
->
m_Reference
->
m_Text
),
GetChars
(
aM
odule
->
m_Value
->
m_Text
)
);
if
(
!
IsOK
(
this
,
msg
)
)
{
return
FALSE
;
...
...
@@ -287,15 +286,15 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module,
OnModify
();
/* Remove module from list, and put it in undo command list */
m_Pcb
->
m_Modules
.
Remove
(
m
odule
);
m
odule
->
SetState
(
DELETED
,
ON
);
SaveCopyInUndoList
(
m
odule
,
UR_DELETED
);
m_Pcb
->
m_Modules
.
Remove
(
aM
odule
);
aM
odule
->
SetState
(
DELETED
,
ON
);
SaveCopyInUndoList
(
aM
odule
,
UR_DELETED
);
if
(
DC
&&
GetBoard
()
->
IsElementVisible
(
RATSNEST_VISIBLE
)
)
Compile_Ratsnest
(
DC
,
true
);
if
(
a
DC
&&
GetBoard
()
->
IsElementVisible
(
RATSNEST_VISIBLE
)
)
Compile_Ratsnest
(
a
DC
,
true
);
// Redraw the full screen to ensure perfect display of board and ratsnest.
if
(
DC
)
if
(
a
DC
)
DrawPanel
->
Refresh
();
return
true
;
...
...
@@ -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
)
{
...
...
@@ -559,7 +558,7 @@ void DrawModuleOutlines( WinEDA_DrawPanel* panel, wxDC* DC, MODULE* module )
if
(
g_Show_Module_Ratsnest
&&
panel
)
{
WinEDA_BasePcbFrame
*
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
GetParent
();
frame
->
build_ratsnest_module
(
DC
,
module
);
frame
->
build_ratsnest_module
(
module
);
frame
->
trace_ratsnest_module
(
DC
);
}
}
pcbnew/netlist.cpp
View file @
7bcb4ff3
...
...
@@ -81,8 +81,7 @@ static FILE * OpenNetlistFile( const wxString& aFullFileName );
static
void
AddToList
(
const
wxString
&
NameLibCmp
,
const
wxString
&
NameCmp
,
const
wxString
&
TimeStampPath
);
static
int
SetPadNetName
(
wxWindow
*
aFrame
,
char
*
Text
,
static
int
SetPadNetName
(
char
*
Text
,
MODULE
*
Module
,
wxTextCtrl
*
aMessageWindow
);
static
int
ReadListeModules
(
const
wxString
&
CmpFullFileName
,
...
...
@@ -315,7 +314,7 @@ bool WinEDA_PcbFrame::ReadPcbNetlist( const wxString& aNetlistFullFilename,
{
if
(
Module
)
{
SetPadNetName
(
NULL
,
Text
,
Module
,
aMessageWindow
);
SetPadNetName
(
Text
,
Module
,
aMessageWindow
);
}
State
--
;
}
...
...
@@ -579,8 +578,7 @@ is [%s] and netlist said [%s]\n" ),
* @param aMessageWindow = a wxTextCtrl to print error and warning message
* (can be NULL)
*/
int
SetPadNetName
(
wxWindow
*
frame
,
char
*
Text
,
int
SetPadNetName
(
char
*
Text
,
MODULE
*
Module
,
wxTextCtrl
*
aMessageWindow
)
{
...
...
@@ -784,7 +782,7 @@ void TestFor_Duplicate_Missing_And_Extra_Footprints( wxWindow* aFrame,
* Function BuildFootprintsListFromNetlistFile
* Fill BufName with footprints names read from the netlist.
* @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
*/
int
BuildFootprintsListFromNetlistFile
(
const
wxString
&
aNetlistFullFilename
,
...
...
pcbnew/print_board_functions.cpp
View file @
7bcb4ff3
...
...
@@ -26,7 +26,7 @@ static void Print_Module( WinEDA_DrawPanel* aPanel, wxDC* aDC, MODULE* aModule,
* Print the board, but only layers allowed by aPrintMaskLayer
* @param aDC = the print device context
* @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 aData = a pointer to an optional data (NULL if not used)
*/
...
...
@@ -107,7 +107,7 @@ void WinEDA_ModuleEditFrame::PrintPage( wxDC* aDC,
* Print the board, but only layers allowed by aPrintMaskLayer
* @param aDC = the print device context
* @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 aData = a pointer to an optional data (NULL if not used)
*/
...
...
pcbnew/ratsnest.cpp
View file @
7bcb4ff3
...
...
@@ -109,16 +109,15 @@ static bool DisplayRastnestInProgress; // Enable the display of the
* Create the entire board ratsnest.
* Must be called after a board change (changes for
* pads, footprints or a read netlist ).
*
*
@param display_status_pcb
: if true, display the computation results
*
@param aDC = the current device context (can be NULL)
*
@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
;
DisplayRastnestInProgress
=
TRUE
;
GetBoard
()
->
m_Status_Pcb
=
0
;
/* we want a full ratsnest computation,
* from the scratch */
MsgPanel
->
EraseMsgBox
();
...
...
@@ -126,13 +125,13 @@ void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb )
// Rebuild the full pads and net info list
RecalculateAllTracksNetcode
();
if
(
display_status_pcb
)
if
(
aDisplayStatus
)
{
msg
.
Printf
(
wxT
(
" %d"
),
m_Pcb
->
GetPadsCount
()
);
Affiche_1_Parametre
(
this
,
1
,
wxT
(
"pads"
),
msg
,
RED
);
}
if
(
display_status_pcb
)
if
(
aDisplayStatus
)
{
msg
.
Printf
(
wxT
(
" %d"
),
m_Pcb
->
m_NetInfo
->
GetCount
()
);
Affiche_1_Parametre
(
this
,
8
,
wxT
(
"Nets"
),
msg
,
CYAN
);
...
...
@@ -145,23 +144,23 @@ void WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC, bool display_status_pcb )
* This full ratsnest is not modified by track editing.
* 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
* connections) */
test_connexions
(
DC
);
test_connexions
(
a
DC
);
/* Compute the active ratsnest, i.e. the unconnected links
* it is faster than Build_Board_Ratsnest()
* because many optimizations and computations are already made
*/
Tst_Ratsnest
(
DC
,
0
);
Tst_Ratsnest
(
a
DC
,
0
);
// Redraw the active ratsnest ( if enabled )
if
(
GetBoard
()
->
IsElementVisible
(
RATSNEST_VISIBLE
)
&&
DC
)
DrawGeneralRatsnest
(
DC
,
0
);
if
(
GetBoard
()
->
IsElementVisible
(
RATSNEST_VISIBLE
)
&&
a
DC
)
DrawGeneralRatsnest
(
a
DC
,
0
);
if
(
display_status_pcb
)
if
(
aDisplayStatus
)
m_Pcb
->
DisplayInfo
(
this
);
}
...
...
@@ -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
* @param aRatsnestBuffer = a std::vector<RATSNEST_ITEM> buffer to fill with
* new ratsnest items
* @param aPadBuffer = a std::vector<D_PAD*> that is the list of pads to
* consider
* @param aPadBuffer = a std::vector<D_PAD*> that is the list of pads to consider
* @param aPadIdxStart = starting index (within the pad list) for search
* @param aPadIdxMax = ending index (within the pad list) for search
* @return blocks not connected count
...
...
@@ -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
* @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
*/
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
)
return
;
if
(
(
m_Pcb
->
m_Status_Pcb
&
DO_NOT_SHOW_GENERAL_RASTNEST
)
)
return
;
if
(
DC
==
NULL
)
if
(
a
DC
==
NULL
)
return
;
int
state
=
CH_VISIBLE
|
CH_ACTIF
;
for
(
unsigned
ii
=
0
;
ii
<
m_Pcb
->
GetRatsnestsCount
();
ii
++
)
...
...
@@ -538,9 +537,9 @@ void WinEDA_BasePcbFrame::DrawGeneralRatsnest( wxDC* DC, int net_code )
if
(
(
item
.
m_Status
&
state
)
!=
state
)
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 )
* 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
* (activate a logical connexion)
*
*
@param aRatsnestBuffer = the buffer to store NETINFO_ITEM* items
* @param net = the current NETINFO_ITEM for the current net
* output:
* .state member of the ratsnest
...
...
@@ -743,28 +742,26 @@ void WinEDA_BasePcbFrame::Tst_Ratsnest( wxDC* DC, int ref_netcode )
/**
* Function Test_1_Net_Ratsnest
* Compute the ratsnest relative to the net "net_code"
* @param DC - Device context to draw on.
* @param
ref_n
etcode = netcode used to compute the ratsnest.
* @param
a
DC - Device context to draw on.
* @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
;
DrawGeneralRatsnest
(
DC
,
ref_n
etcode
);
Tst_Ratsnest
(
DC
,
ref_n
etcode
);
DrawGeneralRatsnest
(
DC
,
ref_n
etcode
);
DrawGeneralRatsnest
(
aDC
,
aN
etcode
);
Tst_Ratsnest
(
aDC
,
aN
etcode
);
DrawGeneralRatsnest
(
aDC
,
aN
etcode
);
return
m_Pcb
->
GetRatsnestsCount
();
}
/**
* 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 guide a footprint placement
/*
* 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 Module = module to consider.
*
* The ratsnest has 2 sections:
* - 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 )
* pad (in an other footprint)
* 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
// code) for the footprint being moved
...
...
@@ -807,7 +804,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
s_localPadBuffer
.
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
)
continue
;
...
...
@@ -849,7 +846,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
for
(
unsigned
jj
=
0
;
jj
<
net
->
m_ListPad
.
size
();
jj
++
)
{
pad_externe
=
net
->
m_ListPad
[
jj
];
if
(
pad_externe
->
GetParent
()
==
Module
)
if
(
pad_externe
->
GetParent
()
==
a
Module
)
continue
;
pad_externe
->
SetSubRatsnest
(
0
);
...
...
@@ -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 */
int
icnt
=
gen_rats_pad_to_pad
(
m_Pcb
->
m_LocalRatsnest
,
s_localPadBuffer
,
ii
,
jj
,
0
);
ii
,
jj
,
0
);
/* b - second step of lee algorithm : build the block to block link
*list (Iteration) */
...
...
@@ -899,8 +894,7 @@ void WinEDA_BasePcbFrame::build_ratsnest_module( wxDC* DC, MODULE* Module )
{
icnt
=
gen_rats_block_to_block
(
m_Pcb
->
m_LocalRatsnest
,
s_localPadBuffer
,
ii
,
jj
);
ii
,
jj
);
}
ii
=
jj
;
...
...
pcbnew/track.cpp
View file @
7bcb4ff3
...
...
@@ -272,7 +272,7 @@ TRACK* Marque_Une_Piste( BOARD* aPcb,
* ref_pos on layers allowed in masque_layer
* - Put segments fount in aList
* 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 aLayerMask = the allowed layers for segments to search
* (1 layer when starting point is on a segment, but more than one when
...
...
pcbnew/zones_by_polygon_fill_functions.cpp
View file @
7bcb4ff3
...
...
@@ -34,18 +34,14 @@
#include "zones.h"
/**********************************************************************************/
void
WinEDA_PcbFrame
::
Delete_Zone_Fill
(
SEGZONE
*
aZone
,
long
aTimestamp
)
/**********************************************************************************/
/**
* Function Delete_Zone_Fill
* 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
* @param DC = current Device Context (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
*/
void
WinEDA_PcbFrame
::
Delete_Zone_Fill
(
SEGZONE
*
aZone
,
long
aTimestamp
)
{
bool
modify
=
false
;
unsigned
long
TimeStamp
;
...
...
pcbnew/zones_convert_brd_items_to_polygons_with_Kbool.cpp
View file @
7bcb4ff3
...
...
@@ -521,8 +521,8 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
/** AddPolygonCornersToBoolengine
* copy a set of polygons in a kbool engine
* @param aCornersBuffer = list of polygons defined by corners.
* @
param aBoolengine = the kbool engine to populate
* @
param aGroup = GROUP_A or GROUP_B
* @param aBoolengine = the kbool engine to populate
* @param aGroup = GROUP_A or GROUP_B
*/
void
AddPolygonCornersToBoolengine
(
std
::
vector
<
CPolyPt
>&
aCornersBuffer
,
Bool_Engine
*
aBoolengine
,
GroupType
aGroup
)
...
...
pcbnew/zones_functions_for_undo_redo.h
View file @
7bcb4ff3
...
...
@@ -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
* and set the type of operation in picker (UR_DELETED, UR_CHANGED)
* @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
*/
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
pcbnew/zones_test_and_combine_areas.cpp
View file @
7bcb4ff3
...
...
@@ -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
* can be NULL
* @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 bMessageBoxArc == true, shows message when clipping can't be done due to arcs.
* @return :
* -1 if arcs intersect other sides, so polygon can't be clipped
* 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