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
32ff2421
Commit
32ff2421
authored
Apr 08, 2010
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pcbnew: fixed an inconsistency in DRC. (see changelog)
fixed others very minor bugs.
parent
47692df7
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
78 additions
and
67 deletions
+78
-67
CHANGELOG.txt
CHANGELOG.txt
+9
-0
build_version.cpp
common/build_version.cpp
+2
-2
class_gerbview_layer_widget.cpp
gerbview/class_gerbview_layer_widget.cpp
+10
-26
install.nsi
packaging/windows/nsis/install.nsi
+1
-1
class_board_connected_item.cpp
pcbnew/class_board_connected_item.cpp
+5
-15
class_pad.cpp
pcbnew/class_pad.cpp
+13
-12
class_pad.h
pcbnew/class_pad.h
+4
-4
class_track.cpp
pcbnew/class_track.cpp
+16
-0
class_track.h
pcbnew/class_track.h
+11
-0
dialog_drc.cpp
pcbnew/dialog_drc.cpp
+1
-0
drc.cpp
pcbnew/drc.cpp
+6
-7
No files found.
CHANGELOG.txt
View file @
32ff2421
...
@@ -4,6 +4,15 @@ KiCad ChangeLog 2010
...
@@ -4,6 +4,15 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with
Please add newer entries at the top, list the date and your name with
email address.
email address.
2010-apr-08, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++Pcbnew:
Drc: take in account the clearance "local parameters" for pads that have local parameters.
Until now, only NETCLASS clearance values were used.
(local parameters are used in zone filling)
But because a pad (or a footprint) can have a specific clearance value
Drc used now this value, and NETCLASS value only if no local value specified.
2010-mar-31, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
2010-mar-31, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
================================================================================
++Pcbnew
++Pcbnew
...
...
common/build_version.cpp
View file @
32ff2421
...
@@ -6,10 +6,10 @@
...
@@ -6,10 +6,10 @@
#endif
#endif
#ifndef KICAD_BUILD_VERSION
#ifndef KICAD_BUILD_VERSION
#define KICAD_BUILD_VERSION "(2010-0
3-30 SVN 2479
)"
#define KICAD_BUILD_VERSION "(2010-0
4-08 SVN 25xx
)"
#endif
#endif
#define VERSION_STABILITY "
final
"
#define VERSION_STABILITY "
unstable
"
/** Function GetBuildVersion()
/** Function GetBuildVersion()
* Return the build date and version
* Return the build date and version
...
...
gerbview/class_gerbview_layer_widget.cpp
View file @
32ff2421
...
@@ -76,7 +76,7 @@ GERBER_LAYER_WIDGET::GERBER_LAYER_WIDGET( WinEDA_GerberFrame* aParent, wxWindow*
...
@@ -76,7 +76,7 @@ GERBER_LAYER_WIDGET::GERBER_LAYER_WIDGET( WinEDA_GerberFrame* aParent, wxWindow*
}
}
AppendRenderRows
(
renderRows
,
DIM
(
renderRows
)
);
AppendRenderRows
(
renderRows
,
DIM
(
renderRows
)
);
// Update default tabs labels for gerbview
// Update default tabs labels for gerbview
SetLayersManagerTabsText
(
);
SetLayersManagerTabsText
(
);
...
@@ -143,6 +143,7 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
...
@@ -143,6 +143,7 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
int
rowCount
;
int
rowCount
;
int
menuId
=
event
.
GetId
();
int
menuId
=
event
.
GetId
();
bool
visible
;
bool
visible
;
int
visibleLayers
=
0
;
switch
(
menuId
)
switch
(
menuId
)
{
{
...
@@ -153,36 +154,19 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
...
@@ -153,36 +154,19 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
case
ID_SHOW_NO_COPPERS
:
case
ID_SHOW_NO_COPPERS
:
visible
=
false
;
visible
=
false
;
L_change_coppers
:
L_change_coppers
:
int
lastCu
=
-
1
;
rowCount
=
GetLayerRowCount
();
rowCount
=
GetLayerRowCount
();
for
(
int
row
=
rowCount
-
1
;
row
>=
0
;
--
row
)
for
(
int
row
=
0
;
row
<
rowCount
;
++
row
)
{
{
wxCheckBox
*
cb
=
(
wxCheckBox
*
)
getLayerComp
(
row
,
3
);
wxCheckBox
*
cb
=
(
wxCheckBox
*
)
getLayerComp
(
row
,
3
);
int
layer
=
getDecodedId
(
cb
->
GetId
()
);
cb
->
SetValue
(
visible
);
if
(
IsValidCopperLayerIndex
(
layer
)
)
if
(
visible
)
{
visibleLayers
|=
(
1
<<
row
);
lastCu
=
row
;
else
break
;
visibleLayers
&=
~
(
1
<<
row
);
}
}
}
for
(
int
row
=
0
;
row
<
rowCount
;
++
row
)
myframe
->
GetBoard
()
->
SetVisibleLayers
(
visibleLayers
);
{
myframe
->
DrawPanel
->
Refresh
();
wxCheckBox
*
cb
=
(
wxCheckBox
*
)
getLayerComp
(
row
,
3
);
int
layer
=
getDecodedId
(
cb
->
GetId
()
);
if
(
IsValidCopperLayerIndex
(
layer
)
)
{
cb
->
SetValue
(
visible
);
bool
isLastCopperLayer
=
(
row
==
lastCu
);
OnLayerVisible
(
layer
,
visible
,
isLastCopperLayer
);
if
(
isLastCopperLayer
)
break
;
}
}
break
;
break
;
}
}
}
}
...
...
packaging/windows/nsis/install.nsi
View file @
32ff2421
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
!define COPYRIGHT "Kicad Team (Jean-Pierre Charras et all)"
!define COPYRIGHT "Kicad Team (Jean-Pierre Charras et all)"
!define COMMENTS ""
!define COMMENTS ""
!define HELP_WEB_SITE "http://groups.yahoo.com/group/kicad-users/"
!define HELP_WEB_SITE "http://groups.yahoo.com/group/kicad-users/"
!define DEVEL_WEB_SITE "http
://groups.yahoo.com/group/kicad-devel
/"
!define DEVEL_WEB_SITE "http
s://launchpad.net/~kicad-developers
/"
!define WINGS3D_WEB_SITE "http://www.wings3d.com"
!define WINGS3D_WEB_SITE "http://www.wings3d.com"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
...
...
pcbnew/class_board_connected_item.cpp
View file @
32ff2421
...
@@ -78,27 +78,17 @@ int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const
...
@@ -78,27 +78,17 @@ int BOARD_CONNECTED_ITEM::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const
// and a call to wxASSERT can crash the application.
// and a call to wxASSERT can crash the application.
if
(
myclass
)
if
(
myclass
)
{
{
int
myClearance
=
myclass
->
GetClearance
();
// @todo : after GetNetClass() is reliably not returning NULL, remove the
// @todo : after GetNetClass() is reliably not returning NULL, remove the
// tests for if( myclass )
and if( hisclass )
// tests for if( myclass )
if
(
aItem
)
if
(
aItem
)
{
{
NETCLASS
*
hisclass
=
aItem
->
GetNetClass
();
int
hisClearance
=
aItem
->
GetClearance
();
if
(
hisclass
)
return
max
(
hisClearance
,
myClearance
);
{
int
hisClearance
=
hisclass
->
GetClearance
();
int
myClearance
=
myclass
->
GetClearance
();
return
max
(
hisClearance
,
myClearance
);
}
else
{
#ifdef __WXDEBUG__
wxLogWarning
(
wxT
(
"BOARD_CONNECTED_ITEM::GetClearance(): NULL hisclass"
)
);
#endif
}
}
}
return
my
class
->
GetClearance
()
;
return
my
Clearance
;
}
}
else
else
{
{
...
...
pcbnew/class_pad.cpp
View file @
32ff2421
...
@@ -201,37 +201,38 @@ void D_PAD::Copy( D_PAD* source )
...
@@ -201,37 +201,38 @@ void D_PAD::Copy( D_PAD* source )
/** Virtual function GetClearance
/** Virtual function GetClearance
* returns the clearance in
1/10000 inche
s. If \a aItem is not NULL then the
* returns the clearance in
internal unit
s. If \a aItem is not NULL then the
* returned clearance is the greater of this object's
NETCLASS
clearance and
* returned clearance is the greater of this object's clearance and
* aItem's
NETCLASS
clearance. If \a aItem is NULL, then this objects
* aItem's clearance. If \a aItem is NULL, then this objects
* clearance
* clearance
* is returned.
* is returned.
* @param aItem is another BOARD_CONNECTED_ITEM or NULL
* @param aItem is another BOARD_CONNECTED_ITEM or NULL
* @return int - the clearance in
1/10000 inche
s.
* @return int - the clearance in
internal unit
s.
*/
*/
int
D_PAD
::
GetClearance
(
BOARD_CONNECTED_ITEM
*
aItem
)
const
int
D_PAD
::
GetClearance
(
BOARD_CONNECTED_ITEM
*
aItem
)
const
{
{
// A pad can have specific clearance parameters that
// overrides its NETCLASS clearance value
int
clearance
=
m_LocalClearance
;
int
clearance
=
m_LocalClearance
;
if
(
clearance
==
0
)
if
(
clearance
==
0
)
{
{
// If local clearance is 0, use the parent footprint clearance value
if
(
GetParent
()
&&
(
(
MODULE
*
)
GetParent
()
)
->
m_LocalClearance
)
if
(
GetParent
()
&&
(
(
MODULE
*
)
GetParent
()
)
->
m_LocalClearance
)
clearance
=
(
(
MODULE
*
)
GetParent
()
)
->
m_LocalClearance
;
clearance
=
(
(
MODULE
*
)
GetParent
()
)
->
m_LocalClearance
;
}
}
if
(
clearance
==
0
)
if
(
clearance
==
0
)
// If the parent footprint clearance value = 0, use NETCLASS value
return
BOARD_CONNECTED_ITEM
::
GetClearance
(
aItem
);
return
BOARD_CONNECTED_ITEM
::
GetClearance
(
aItem
);
// We have a specific clearance.
// if aItem, return the biggest clearance
if
(
aItem
)
if
(
aItem
)
{
{
NETCLASS
*
hisclass
=
aItem
->
GetNetClass
();
int
hisClearance
=
aItem
->
GetClearance
();
if
(
hisclass
)
return
max
(
hisClearance
,
clearance
);
{
int
hisClearance
=
hisclass
->
GetClearance
();
return
max
(
hisClearance
,
clearance
);
}
}
}
// Return the specific clearance.
return
clearance
;
return
clearance
;
}
}
...
...
pcbnew/class_pad.h
View file @
32ff2421
...
@@ -160,12 +160,12 @@ public:
...
@@ -160,12 +160,12 @@ public:
/**
/**
* Function GetClearance
* Function GetClearance
* returns the clearance in
1/10000 inche
s. If \a aItem is not NULL then the
* returns the clearance in
internal unit
s. If \a aItem is not NULL then the
* returned clearance is the greater of this object's
NETCLASS
clearance and
* returned clearance is the greater of this object's clearance and
* aItem's
NETCLASS
clearance. If \a aItem is NULL, then this objects clearance
* aItem's clearance. If \a aItem is NULL, then this objects clearance
* is returned.
* is returned.
* @param aItem is another BOARD_CONNECTED_ITEM or NULL
* @param aItem is another BOARD_CONNECTED_ITEM or NULL
* @return int - the clearance in
1/10000 inche
s.
* @return int - the clearance in
internal unit
s.
*/
*/
virtual
int
GetClearance
(
BOARD_CONNECTED_ITEM
*
aItem
=
NULL
)
const
;
virtual
int
GetClearance
(
BOARD_CONNECTED_ITEM
*
aItem
=
NULL
)
const
;
...
...
pcbnew/class_track.cpp
View file @
32ff2421
...
@@ -107,6 +107,22 @@ TRACK* TRACK::Copy() const
...
@@ -107,6 +107,22 @@ TRACK* TRACK::Copy() const
return
NULL
;
// should never happen
return
NULL
;
// should never happen
}
}
/** Virtual function GetClearance
* returns the clearance in internal units. If \a aItem is not NULL then the
* returned clearance is the greater of this object's clearance and
* aItem's clearance. If \a aItem is NULL, then this objects
* clearance
* is returned.
* @param aItem is another BOARD_CONNECTED_ITEM or NULL
* @return int - the clearance in internal units.
*/
int
TRACK
::
GetClearance
(
BOARD_CONNECTED_ITEM
*
aItem
)
const
{
// Currently tracks have no specific clearance parameter
// on a per track or per segment basis.
// the NETCLASS clearance is used
return
BOARD_CONNECTED_ITEM
::
GetClearance
(
aItem
);
}
/**
/**
* Function GetDrillValue
* Function GetDrillValue
...
...
pcbnew/class_track.h
View file @
32ff2421
...
@@ -275,6 +275,17 @@ public:
...
@@ -275,6 +275,17 @@ public:
return
wxT
(
"TRACK"
);
return
wxT
(
"TRACK"
);
}
}
/**
* Function GetClearance
* returns the clearance in internal units. If \a aItem is not NULL then the
* returned clearance is the greater of this object's clearance and
* aItem's clearance. If \a aItem is NULL, then this objects clearance
* is returned.
* @param aItem is another BOARD_CONNECTED_ITEM or NULL
* @return int - the clearance in internal units.
*/
virtual
int
GetClearance
(
BOARD_CONNECTED_ITEM
*
aItem
=
NULL
)
const
;
#if defined (DEBUG)
#if defined (DEBUG)
...
...
pcbnew/dialog_drc.cpp
View file @
32ff2421
...
@@ -551,6 +551,7 @@ void DIALOG_DRC_CONTROL::RedrawDrawPanel()
...
@@ -551,6 +551,7 @@ void DIALOG_DRC_CONTROL::RedrawDrawPanel()
void
DIALOG_DRC_CONTROL
::
DelDRCMarkers
()
void
DIALOG_DRC_CONTROL
::
DelDRCMarkers
()
/*********************************************************/
/*********************************************************/
{
{
m_Parent
->
SetCurItem
(
NULL
);
// clear curr item, because it could be a DRC marker
m_ClearanceListBox
->
DeleteAllItems
();
m_ClearanceListBox
->
DeleteAllItems
();
m_UnconnectedListBox
->
DeleteAllItems
();
m_UnconnectedListBox
->
DeleteAllItems
();
}
}
...
...
pcbnew/drc.cpp
View file @
32ff2421
...
@@ -704,7 +704,6 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads )
...
@@ -704,7 +704,6 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads )
{
{
TRACK
*
track
;
TRACK
*
track
;
int
dx
,
dy
;
// utilise pour calcul des dim x et dim y des segments
int
dx
,
dy
;
// utilise pour calcul des dim x et dim y des segments
int
w_dist
;
int
layerMask
;
int
layerMask
;
int
net_code_ref
;
int
net_code_ref
;
wxPoint
shape_pos
;
wxPoint
shape_pos
;
...
@@ -813,7 +812,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads )
...
@@ -813,7 +812,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads )
D_PAD
pseudo_pad
(
(
MODULE
*
)
NULL
);
// construct this once outside following loop
D_PAD
pseudo_pad
(
(
MODULE
*
)
NULL
);
// construct this once outside following loop
// Compute the min distance to pads
// Compute the min distance to pads
w_dist
=
aRefSeg
->
m_Width
>>
1
;
int
refsegm_half_width
=
aRefSeg
->
m_Width
>>
1
;
if
(
testPads
)
if
(
testPads
)
{
{
...
@@ -842,7 +841,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads )
...
@@ -842,7 +841,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads )
m_spotcx
=
pseudo_pad
.
GetPosition
().
x
-
org_X
;
m_spotcx
=
pseudo_pad
.
GetPosition
().
x
-
org_X
;
m_spotcy
=
pseudo_pad
.
GetPosition
().
y
-
org_Y
;
m_spotcy
=
pseudo_pad
.
GetPosition
().
y
-
org_Y
;
if
(
!
checkClearanceSegmToPad
(
&
pseudo_pad
,
w_dist
,
netclass
->
GetClearance
()
))
if
(
!
checkClearanceSegmToPad
(
&
pseudo_pad
,
refsegm_half_width
,
netclass
->
GetClearance
()
))
{
{
m_currentMarker
=
fillMarker
(
aRefSeg
,
pad
,
m_currentMarker
=
fillMarker
(
aRefSeg
,
pad
,
DRCE_TRACK_NEAR_THROUGH_HOLE
,
m_currentMarker
);
DRCE_TRACK_NEAR_THROUGH_HOLE
,
m_currentMarker
);
...
@@ -863,7 +862,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads )
...
@@ -863,7 +862,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads )
m_spotcx
=
shape_pos
.
x
-
org_X
;
m_spotcx
=
shape_pos
.
x
-
org_X
;
m_spotcy
=
shape_pos
.
y
-
org_Y
;
m_spotcy
=
shape_pos
.
y
-
org_Y
;
if
(
!
checkClearanceSegmToPad
(
pad
,
w_dist
,
aRefSeg
->
GetClearance
(
pad
)
)
)
if
(
!
checkClearanceSegmToPad
(
pad
,
refsegm_half_width
,
aRefSeg
->
GetClearance
(
pad
)
)
)
{
{
m_currentMarker
=
fillMarker
(
aRefSeg
,
pad
,
m_currentMarker
=
fillMarker
(
aRefSeg
,
pad
,
DRCE_TRACK_NEAR_PAD
,
m_currentMarker
);
DRCE_TRACK_NEAR_PAD
,
m_currentMarker
);
...
@@ -897,7 +896,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads )
...
@@ -897,7 +896,7 @@ bool DRC::doTrackDrc( TRACK* aRefSeg, TRACK* aStart, bool testPads )
// the minimum distance = clearance plus half the reference track
// the minimum distance = clearance plus half the reference track
// width plus half the other track's width
// width plus half the other track's width
w_dist
=
aRefSeg
->
GetClearance
(
track
);
int
w_dist
=
aRefSeg
->
GetClearance
(
track
);
w_dist
+=
(
aRefSeg
->
m_Width
+
track
->
m_Width
)
/
2
;
w_dist
+=
(
aRefSeg
->
m_Width
+
track
->
m_Width
)
/
2
;
// If the reference segment is a via, we test it here
// If the reference segment is a via, we test it here
...
@@ -1423,7 +1422,7 @@ exit: // the only way out (hopefully) for simpler debugging
...
@@ -1423,7 +1422,7 @@ exit: // the only way out (hopefully) for simpler debugging
}
}
bool
DRC
::
checkClearanceSegmToPad
(
const
D_PAD
*
pad_to_test
,
int
w_segm
,
int
dist_min
)
bool
DRC
::
checkClearanceSegmToPad
(
const
D_PAD
*
pad_to_test
,
int
w_segm
,
int
aMinDist
)
{
{
int
p_dimx
;
int
p_dimx
;
int
p_dimy
;
// half the dimension of the pad
int
p_dimy
;
// half the dimension of the pad
...
@@ -1432,7 +1431,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
...
@@ -1432,7 +1431,7 @@ bool DRC::checkClearanceSegmToPad( const D_PAD* pad_to_test, int w_segm, int dis
int
seuil
;
int
seuil
;
int
deltay
;
int
deltay
;
seuil
=
w_segm
+
dist_min
;
seuil
=
w_segm
+
aMinDist
;
p_dimx
=
pad_to_test
->
m_Size
.
x
>>
1
;
p_dimx
=
pad_to_test
->
m_Size
.
x
>>
1
;
p_dimy
=
pad_to_test
->
m_Size
.
y
>>
1
;
p_dimy
=
pad_to_test
->
m_Size
.
y
>>
1
;
...
...
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