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
2a0524e1
Commit
2a0524e1
authored
Jun 28, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Plain Diff
Pcbnew: fixed a serious bug in zone filling, for pads with hole but not on all layers
parents
e1b5d49f
c580d5d7
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
52 additions
and
29 deletions
+52
-29
CHANGELOG.txt
CHANGELOG.txt
+9
-0
bitmap2cmp_gui.cpp
bitmap2component/bitmap2cmp_gui.cpp
+6
-6
bitmap2cmp_gui_base.cpp
bitmap2component/bitmap2cmp_gui_base.cpp
+1
-1
bitmap2cmp_gui_base.fbp
bitmap2component/bitmap2cmp_gui_base.fbp
+3
-3
pic_programmer.pro
demos/pic_programmer/pic_programmer.pro
+1
-1
class_netlist_object.cpp
eeschema/class_netlist_object.cpp
+1
-1
erc.cpp
eeschema/erc.cpp
+19
-15
netlist_control.cpp
eeschema/netlist_control.cpp
+9
-0
zones_convert_brd_items_to_polygons.cpp
pcbnew/zones_convert_brd_items_to_polygons.cpp
+3
-2
No files found.
CHANGELOG.txt
View file @
2a0524e1
...
...
@@ -4,6 +4,15 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with
email address.
2010-jun-24 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
++EESchema component library and hierarchical sheet label object improvements.
* Continue component library class clean up and encapsulation work.
* Change hierarchical sheet label container to boost::vector_ptr.
* Encapsulate hierarchical label handling in hierarchical sheet class.
* Convert some missed occurrences of wxString::GetData() to GetChars( wxString ).
* Fix some minor code formatting issues.
2010-jun-23, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++eeschema:
...
...
bitmap2component/bitmap2cmp_gui.cpp
View file @
2a0524e1
...
...
@@ -71,7 +71,7 @@ private:
void
OnLoadFile
(
wxCommandEvent
&
event
);
void
OnExportEeschema
(
wxCommandEvent
&
event
);
void
OnExportPcbnew
(
wxCommandEvent
&
event
);
void
Binarize
(
int
aThreshold
);
void
Binarize
(
double
aThreshold
);
// aThreshold = 0.0 (black level) to 1.0 (white level)
void
OnOptionsSelection
(
wxCommandEvent
&
event
);
void
OnThresholdChange
(
wxScrollEvent
&
event
);
void
NegateGreyscaleImage
(
);
...
...
@@ -196,18 +196,18 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
m_Greyscale_Bitmap
=
wxBitmap
(
m_Greyscale_Image
);
m_NB_Image
=
m_Greyscale_Image
;
Binarize
(
m_sliderThreshold
->
GetValue
()
);
Binarize
(
(
double
)
m_sliderThreshold
->
GetValue
()
/
m_sliderThreshold
->
GetMax
()
);
Refresh
();
}
void
BM2CMP_FRAME
::
Binarize
(
int
aThreshold
)
void
BM2CMP_FRAME
::
Binarize
(
double
aThreshold
)
{
unsigned
int
pixin
;
unsigned
char
pixout
;
int
h
=
m_Greyscale_Image
.
GetHeight
();
int
w
=
m_Greyscale_Image
.
GetWidth
();
unsigned
int
threshold
=
(
aThreshold
*
256
)
/
10
;
unsigned
int
threshold
=
(
int
)(
aThreshold
*
256
)
;
for
(
int
y
=
1
;
y
<
h
;
y
++
)
for
(
int
x
=
1
;
x
<
w
;
x
++
)
...
...
@@ -243,13 +243,13 @@ void BM2CMP_FRAME::OnOptionsSelection( wxCommandEvent& event )
{
NegateGreyscaleImage
(
);
m_Greyscale_Bitmap
=
wxBitmap
(
m_Greyscale_Image
);
Binarize
(
m_sliderThreshold
->
GetValue
()
);
Binarize
(
(
double
)
m_sliderThreshold
->
GetValue
()
/
m_sliderThreshold
->
GetMax
()
);
Refresh
();
}
void
BM2CMP_FRAME
::
OnThresholdChange
(
wxScrollEvent
&
event
)
{
Binarize
(
m_sliderThreshold
->
GetValue
()
);
Binarize
(
(
double
)
m_sliderThreshold
->
GetValue
()
/
m_sliderThreshold
->
GetMax
()
);
Refresh
();
}
...
...
bitmap2component/bitmap2cmp_gui_base.cpp
View file @
2a0524e1
...
...
@@ -87,7 +87,7 @@ BM2CMP_FRAME_BASE::BM2CMP_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxS
m_ThresholdText
->
Wrap
(
-
1
);
brightSizer
->
Add
(
m_ThresholdText
,
0
,
wxTOP
|
wxRIGHT
|
wxLEFT
,
5
);
m_sliderThreshold
=
new
wxSlider
(
this
,
wxID_ANY
,
5
,
0
,
10
,
wxDefaultPosition
,
wxDefaultSize
,
wxSL_AUTOTICKS
|
wxSL_HORIZONTAL
|
wxSL_LABELS
|
wxSL_TOP
);
m_sliderThreshold
=
new
wxSlider
(
this
,
wxID_ANY
,
25
,
0
,
50
,
wxDefaultPosition
,
wxDefaultSize
,
wxSL_AUTOTICKS
|
wxSL_HORIZONTAL
|
wxSL_TOP
);
brightSizer
->
Add
(
m_sliderThreshold
,
0
,
wxEXPAND
|
wxALIGN_CENTER_HORIZONTAL
|
wxBOTTOM
|
wxRIGHT
|
wxLEFT
,
5
);
bMainSizer
->
Add
(
brightSizer
,
0
,
wxEXPAND
,
5
);
...
...
bitmap2component/bitmap2cmp_gui_base.fbp
View file @
2a0524e1
...
...
@@ -670,7 +670,7 @@
<property
name=
"font"
></property>
<property
name=
"hidden"
>
0
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"maxValue"
>
1
0
</property>
<property
name=
"maxValue"
>
5
0
</property>
<property
name=
"maximum_size"
></property>
<property
name=
"minValue"
>
0
</property>
<property
name=
"minimum_size"
></property>
...
...
@@ -678,10 +678,10 @@
<property
name=
"permission"
>
protected
</property>
<property
name=
"pos"
></property>
<property
name=
"size"
></property>
<property
name=
"style"
>
wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_
LABELS|wxSL_
TOP
</property>
<property
name=
"style"
>
wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP
</property>
<property
name=
"subclass"
></property>
<property
name=
"tooltip"
></property>
<property
name=
"value"
>
5
</property>
<property
name=
"value"
>
2
5
</property>
<property
name=
"window_extra_style"
></property>
<property
name=
"window_name"
></property>
<property
name=
"window_style"
></property>
...
...
demos/pic_programmer/pic_programmer.pro
View file @
2a0524e1
update
=
2
3
/
06
/
2010
18
:
43
:
01
update
=
2
4
/
06
/
2010
21
:
06
:
23
last_client
=
pcbnew
[
general
]
version
=
1
...
...
eeschema/class_netlist_object.cpp
View file @
2a0524e1
...
...
@@ -81,7 +81,7 @@ void NETLIST_OBJECT::Show( std::ostream& out, int ndx )
out
<<
" <start "
<<
m_Start
<<
"/> <end "
<<
m_End
<<
"/>
\n
"
;
if
(
m_Label
)
if
(
!
m_Label
.
IsEmpty
()
)
out
<<
" <label>"
<<
m_Label
.
mb_str
()
<<
"</label>
\n
"
;
if
(
m_Comp
)
...
...
eeschema/erc.cpp
View file @
2a0524e1
...
...
@@ -174,8 +174,11 @@ static int MinimalReq[PIN_NMAX][PIN_NMAX] =
/** Function TestDuplicateSheetNames( )
* inside a given sheet, one cannot have sheets with duplicate names (file
* names can be duplicated).
* @return the error count
* @param aCreateMarker: true = create error markers in schematic,
* false = calculate error count only
*/
int
TestDuplicateSheetNames
()
int
TestDuplicateSheetNames
(
bool
aCreateMarker
)
{
int
err_count
=
0
;
EDA_ScreenList
ScreenList
;
// Created the list of screen
...
...
@@ -203,17 +206,20 @@ int TestDuplicateSheetNames()
(
(
SCH_SHEET
*
)
item_to_test
)
->
m_SheetName
)
==
0
)
{
/* Create a new marker type ERC error*/
SCH_MARKER
*
Marker
=
new
SCH_MARKER
();
Marker
->
m_TimeStamp
=
GetTimeStamp
();
Marker
->
SetData
(
ERCE_DUPLICATE_SHEET_NAME
,
(
(
SCH_SHEET
*
)
item_to_test
)
->
m_Pos
,
_
(
"Duplicate Sheet name"
),
(
(
SCH_SHEET
*
)
item_to_test
)
->
m_Pos
);
Marker
->
SetMarkerType
(
MARK_ERC
);
Marker
->
SetErrorLevel
(
ERR
);
Marker
->
SetNext
(
Screen
->
EEDrawList
);
Screen
->
EEDrawList
=
Marker
;
if
(
aCreateMarker
)
{
/* Create a new marker type ERC error*/
SCH_MARKER
*
Marker
=
new
SCH_MARKER
();
Marker
->
m_TimeStamp
=
GetTimeStamp
();
Marker
->
SetData
(
ERCE_DUPLICATE_SHEET_NAME
,
(
(
SCH_SHEET
*
)
item_to_test
)
->
m_Pos
,
_
(
"Duplicate Sheet name"
),
(
(
SCH_SHEET
*
)
item_to_test
)
->
m_Pos
);
Marker
->
SetMarkerType
(
MARK_ERC
);
Marker
->
SetErrorLevel
(
ERR
);
Marker
->
SetNext
(
Screen
->
EEDrawList
);
Screen
->
EEDrawList
=
Marker
;
}
err_count
++
;
}
}
...
...
@@ -279,9 +285,8 @@ void DIALOG_ERC::TestErc( wxArrayString* aMessagesList )
* inside a given sheet, one cannot have sheets with duplicate names (file
* names can be duplicated).
*/
int
errcnt
=
TestDuplicateSheetNames
();
int
errcnt
=
TestDuplicateSheetNames
(
true
);
g_EESchemaVar
.
NbErrorErc
+=
errcnt
;
g_EESchemaVar
.
NbWarningErc
+=
errcnt
;
m_Parent
->
BuildNetListBase
();
...
...
@@ -290,7 +295,6 @@ void DIALOG_ERC::TestErc( wxArrayString* aMessagesList )
for
(
unsigned
ii
=
0
;
ii
<
g_NetObjectslist
.
size
();
ii
++
)
g_NetObjectslist
[
ii
]
->
m_FlagOfConnection
=
UNCONNECTED
;
StartNet
=
OldItem
=
0
;
NetNbItems
=
0
;
MinConn
=
NOC
;
...
...
eeschema/netlist_control.cpp
View file @
2a0524e1
...
...
@@ -24,6 +24,8 @@
#include "protos.h"
#include "netlist_control.h"
//Imported function:
int
TestDuplicateSheetNames
(
bool
aCreateMarker
);
// ID for configuration:
#define CUSTOM_NETLIST_TITLE wxT( "CustomNetlistTitle" )
...
...
@@ -492,6 +494,13 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event )
return
;
}
// Test duplicate sheet names:
if
(
TestDuplicateSheetNames
(
false
)
>
0
)
{
if
(
!
IsOK
(
this
,
_
(
"Error: duplicate sheet names. Continue?"
)
)
)
return
;
}
/* Cleanup the entire hierarchy */
EDA_ScreenList
ScreenList
;
for
(
SCH_SCREEN
*
screen
=
ScreenList
.
GetFirst
();
...
...
pcbnew/zones_convert_brd_items_to_polygons.cpp
View file @
2a0524e1
...
...
@@ -216,11 +216,12 @@ void ZONE_CONTAINER::AddClearanceAreasPolygonsToPolysList( BOARD* aPcb )
have_poly_to_substract
=
false
;
D_PAD
dummyPad
((
MODULE
*
)
NULL
);
D_PAD
*
nextpad
;
for
(
MODULE
*
module
=
aPcb
->
m_Modules
;
module
;
module
=
module
->
Next
()
)
{
for
(
D_PAD
*
pad
=
module
->
m_Pads
;
pad
!=
NULL
;
pad
=
pad
->
Next
()
)
for
(
D_PAD
*
pad
=
module
->
m_Pads
;
pad
!=
NULL
;
pad
=
nextpad
)
{
nextpad
=
pad
->
Next
();
// pad pointer can be modified by next code, so calculate the next pad here
if
(
!
pad
->
IsOnLayer
(
GetLayer
()
)
)
{
/* Test fo pads that are on top or bottom only and have a hole.
* There are curious pads but they can be used for some components that are inside the
...
...
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