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
00d369ad
Commit
00d369ad
authored
Sep 10, 2009
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netclasses done
parent
c7cc6ea1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
94 deletions
+95
-94
CHANGELOG.txt
CHANGELOG.txt
+3
-4
dialog_design_rules.cpp
pcbnew/dialog_design_rules.cpp
+27
-29
dialog_design_rules.h
pcbnew/dialog_design_rules.h
+56
-52
dialog_design_rules_base.cpp
pcbnew/dialog_design_rules_base.cpp
+4
-4
dialog_design_rules_base.fbp
pcbnew/dialog_design_rules_base.fbp
+5
-5
No files found.
CHANGELOG.txt
View file @
00d369ad
...
@@ -7,12 +7,11 @@ email address.
...
@@ -7,12 +7,11 @@ email address.
2009-Sep-10 UPDATE Dick Hollenbeck <dick@softplc.com>
2009-Sep-10 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
================================================================================
++pcbnew
++pcbnew
More NETCLASS work, started on the UI also. Almost done
. Put NETCLASS support
Finished initial NETCLASS work, along with UI
. Put NETCLASS support
into DRC. Fixed DRC dialog so progress during DRC is sensible and visible.
into DRC. Fixed DRC dialog so progress during DRC is sensible and visible.
The specctra_export probably still needs a little work regarding VIAs.
The specctra_export probably still needs a little work regarding VIAs.
Don't install this version of PCBNEW if you need stability. You can compile
I compiled wxformbuilder from source, so you may need to upgrade to
and look but I would not install it quite yet. I compiled wxformbuilder
load my *.fbp files.
from source, so you may need to upgrade to load my *.fbp files.
Jean-Pierre @ todo: pcbnew/zones_test_and_combine_areas.cpp needs to
Jean-Pierre @ todo: pcbnew/zones_test_and_combine_areas.cpp needs to
use NETCLASS and not g_DesignSettings.m_TrackClearance
use NETCLASS and not g_DesignSettings.m_TrackClearance
...
...
pcbnew/dialog_design_rules.cpp
View file @
00d369ad
...
@@ -84,6 +84,9 @@ void DIALOG_DESIGN_RULES::Init()
...
@@ -84,6 +84,9 @@ void DIALOG_DESIGN_RULES::Init()
// copy all NETs into m_AllNets by adding them as NETCUPs.
// copy all NETs into m_AllNets by adding them as NETCUPs.
// @todo go fix m_Pcb->SynchronizeNetsAndNetClasses() so that the netcode==0 is not present in the BOARD::m_NetClasses
NETCLASS
*
netclass
;
NETCLASS
*
netclass
;
NETCLASSES
&
netclasses
=
m_Pcb
->
m_NetClasses
;
NETCLASSES
&
netclasses
=
m_Pcb
->
m_NetClasses
;
...
@@ -116,7 +119,7 @@ static bool sortByClassThenName( NETCUP* a, NETCUP* b )
...
@@ -116,7 +119,7 @@ static bool sortByClassThenName( NETCUP* a, NETCUP* b )
if
(
a
->
clazz
<
b
->
clazz
)
if
(
a
->
clazz
<
b
->
clazz
)
return
true
;
return
true
;
if
(
a
->
net
<
a
->
net
)
if
(
a
->
net
<
b
->
net
)
return
true
;
return
true
;
return
false
;
return
false
;
...
@@ -179,16 +182,14 @@ void DIALOG_DESIGN_RULES::setRowItem( wxListCtrl* aListCtrl, int aRow, NETCUP* a
...
@@ -179,16 +182,14 @@ void DIALOG_DESIGN_RULES::setRowItem( wxListCtrl* aListCtrl, int aRow, NETCUP* a
*/
*/
void
DIALOG_DESIGN_RULES
::
FillListBoxWithNetNames
(
wxListCtrl
*
aListCtrl
,
const
wxString
&
aNetClass
)
void
DIALOG_DESIGN_RULES
::
FillListBoxWithNetNames
(
wxListCtrl
*
aListCtrl
,
const
wxString
&
aNetClass
)
{
{
aListCtrl
->
ClearAll
();
aListCtrl
->
DeleteAllItems
();
#if 0 // out of time for troubleshooting this now.
PNETCUPS
ptrList
;
PNETCUPS
ptrList
;
// get a subset of m_AllNets in pointer form, sorted as desired.
// get a subset of m_AllNets in pointer form, sorted as desired.
makePointers
(
&
ptrList
,
aNetClass
);
makePointers
(
&
ptrList
,
aNetClass
);
#if defined(DEBUG)
#if
0 &&
defined(DEBUG)
int r = 0;
int r = 0;
for( PNETCUPS::iterator i = ptrList.begin(); i!=ptrList.end(); ++i, ++r )
for( PNETCUPS::iterator i = ptrList.begin(); i!=ptrList.end(); ++i, ++r )
{
{
...
@@ -206,9 +207,6 @@ void DIALOG_DESIGN_RULES::FillListBoxWithNetNames( wxListCtrl* aListCtrl, const
...
@@ -206,9 +207,6 @@ void DIALOG_DESIGN_RULES::FillListBoxWithNetNames( wxListCtrl* aListCtrl, const
}
}
aListCtrl
->
Show
();
aListCtrl
->
Show
();
#endif
}
}
...
@@ -469,42 +467,42 @@ void DIALOG_DESIGN_RULES::OnRightCBSelection( wxCommandEvent& event )
...
@@ -469,42 +467,42 @@ void DIALOG_DESIGN_RULES::OnRightCBSelection( wxCommandEvent& event )
}
}
/* Called on clicking the "<<<" or Copy Right to Left button:
void
DIALOG_DESIGN_RULES
::
moveSelectedItems
(
wxListCtrl
*
src
,
const
wxString
&
newClassName
)
* Selected items are moved from the right list to the left list
*/
void
DIALOG_DESIGN_RULES
::
OnRightToLeftCopyButton
(
wxCommandEvent
&
event
)
{
{
wxString
oldClassName
=
m_leftClassChoice
->
GetStringSelection
();
wxListItem
item
;
wxString
newClassName
=
m_rightClassChoice
->
GetStringSelection
();
wxString
netName
;
wxASSERT
(
oldClassName
!=
wxEmptyString
);
wxASSERT
(
newClassName
!=
wxEmptyString
);
for
(
int
row
=
0
;
row
<
m_rightListCtrl
->
GetItemCount
();
++
row
)
for
(
int
row
=
0
;
row
<
src
->
GetItemCount
();
++
row
)
{
{
if
(
!
m_rightListCtrl
->
GetItemState
(
row
,
wxLIST_STATE_SELECTED
)
)
if
(
!
src
->
GetItemState
(
row
,
wxLIST_STATE_SELECTED
)
)
continue
;
continue
;
/*
item
.
SetColumn
(
0
);
@todo: get the netName, call setNetClass()
item
.
SetId
(
row
);
wxString netName = m_rightListCtrl->OnGetItemText( row, 0 );
src
->
GetItem
(
item
);
netName
=
item
.
GetText
();
setNetClass
(
netName
,
newClassName
==
wildCard
?
NETCLASS
::
Default
:
newClassName
);
setNetClass
(
netName
,
newClassName
==
wildCard
?
NETCLASS
::
Default
:
newClassName
);
*/
}
}
}
void
DIALOG_DESIGN_RULES
::
OnRightToLeftCopyButton
(
wxCommandEvent
&
event
)
{
wxString
newClassName
=
m_leftClassChoice
->
GetStringSelection
();
moveSelectedItems
(
m_rightListCtrl
,
newClassName
);
FillListBoxWithNetNames
(
m_leftListCtrl
,
m_leftClassChoice
->
GetStringSelection
()
);
FillListBoxWithNetNames
(
m_leftListCtrl
,
m_leftClassChoice
->
GetStringSelection
()
);
FillListBoxWithNetNames
(
m_rightListCtrl
,
m_rightClassChoice
->
GetStringSelection
()
);
FillListBoxWithNetNames
(
m_rightListCtrl
,
m_rightClassChoice
->
GetStringSelection
()
);
}
}
/* Called on clicking the ">>>" or Copy Left to Right button:
* Selected items are moved from the left list to the right list
*/
void
DIALOG_DESIGN_RULES
::
OnLeftToRightCopyButton
(
wxCommandEvent
&
event
)
void
DIALOG_DESIGN_RULES
::
OnLeftToRightCopyButton
(
wxCommandEvent
&
event
)
{
{
// @todo factor code from above, or combine the two functions.
wxString
newClassName
=
m_rightClassChoice
->
GetStringSelection
();
moveSelectedItems
(
m_leftListCtrl
,
newClassName
);
FillListBoxWithNetNames
(
m_leftListCtrl
,
m_leftClassChoice
->
GetStringSelection
()
);
FillListBoxWithNetNames
(
m_leftListCtrl
,
m_leftClassChoice
->
GetStringSelection
()
);
FillListBoxWithNetNames
(
m_rightListCtrl
,
m_rightClassChoice
->
GetStringSelection
()
);
FillListBoxWithNetNames
(
m_rightListCtrl
,
m_rightClassChoice
->
GetStringSelection
()
);
...
...
pcbnew/dialog_design_rules.h
View file @
00d369ad
...
@@ -15,16 +15,18 @@ struct NETCUP
...
@@ -15,16 +15,18 @@ struct NETCUP
clazz
=
aClass
;
clazz
=
aClass
;
}
}
wxString
net
;
wxString
net
;
///< a net name
wxString
clazz
;
wxString
clazz
;
///< a class name
};
};
typedef
std
::
vector
<
NETCUP
>
NETCUPS
;
typedef
std
::
vector
<
NETCUP
>
NETCUPS
;
typedef
std
::
vector
<
NETCUP
*>
PNETCUPS
;
typedef
std
::
vector
<
NETCUP
*>
PNETCUPS
;
class
DIALOG_DESIGN_RULES
:
public
DIALOG_DESIGN_RULES_BASE
class
DIALOG_DESIGN_RULES
:
public
DIALOG_DESIGN_RULES_BASE
{
{
private
:
private
:
static
const
wxString
wildCard
;
static
const
wxString
wildCard
;
...
@@ -34,7 +36,7 @@ class DIALOG_DESIGN_RULES : public DIALOG_DESIGN_RULES_BASE
...
@@ -34,7 +36,7 @@ class DIALOG_DESIGN_RULES : public DIALOG_DESIGN_RULES_BASE
std
::
vector
<
wxString
>
m_NetClasses
;
std
::
vector
<
wxString
>
m_NetClasses
;
NETCUPS
m_AllNets
;
NETCUPS
m_AllNets
;
private
:
private
:
void
OnLayerCountClick
(
wxCommandEvent
&
event
);
void
OnLayerCountClick
(
wxCommandEvent
&
event
);
void
OnLayerGridLeftClick
(
wxGridEvent
&
event
){
event
.
Skip
();
}
void
OnLayerGridLeftClick
(
wxGridEvent
&
event
){
event
.
Skip
();
}
void
OnLayerGridRighttClick
(
wxGridEvent
&
event
){
event
.
Skip
();
}
void
OnLayerGridRighttClick
(
wxGridEvent
&
event
){
event
.
Skip
();
}
...
@@ -77,8 +79,10 @@ class DIALOG_DESIGN_RULES : public DIALOG_DESIGN_RULES_BASE
...
@@ -77,8 +79,10 @@ class DIALOG_DESIGN_RULES : public DIALOG_DESIGN_RULES_BASE
static
void
setRowItem
(
wxListCtrl
*
aListCtrl
,
int
aRow
,
NETCUP
*
aNetAndClass
);
static
void
setRowItem
(
wxListCtrl
*
aListCtrl
,
int
aRow
,
NETCUP
*
aNetAndClass
);
void
moveSelectedItems
(
wxListCtrl
*
src
,
const
wxString
&
newClassName
);
public
:
public
:
DIALOG_DESIGN_RULES
(
WinEDA_PcbFrame
*
parent
);
DIALOG_DESIGN_RULES
(
WinEDA_PcbFrame
*
parent
);
~
DIALOG_DESIGN_RULES
(
)
{
};
~
DIALOG_DESIGN_RULES
(
)
{
};
...
...
pcbnew/dialog_design_rules_base.cpp
View file @
00d369ad
...
@@ -94,7 +94,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
...
@@ -94,7 +94,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_leftClassChoice
->
SetSelection
(
0
);
m_leftClassChoice
->
SetSelection
(
0
);
leftNetSelectBoxSizer
->
Add
(
m_leftClassChoice
,
0
,
wxALL
|
wxEXPAND
,
5
);
leftNetSelectBoxSizer
->
Add
(
m_leftClassChoice
,
0
,
wxALL
|
wxEXPAND
,
5
);
m_leftListCtrl
=
new
wxListCtrl
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxLC_HRULES
|
wxLC_REPORT
|
wxLC_
SINGLE_SEL
|
wxLC_
VRULES
);
m_leftListCtrl
=
new
wxListCtrl
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxLC_HRULES
|
wxLC_REPORT
|
wxLC_VRULES
);
m_leftListCtrl
->
SetMinSize
(
wxSize
(
220
,
-
1
)
);
m_leftListCtrl
->
SetMinSize
(
wxSize
(
220
,
-
1
)
);
leftNetSelectBoxSizer
->
Add
(
m_leftListCtrl
,
1
,
wxALL
|
wxEXPAND
,
5
);
leftNetSelectBoxSizer
->
Add
(
m_leftListCtrl
,
1
,
wxALL
|
wxEXPAND
,
5
);
...
@@ -131,14 +131,14 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
...
@@ -131,14 +131,14 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_rightClassChoice
->
SetSelection
(
0
);
m_rightClassChoice
->
SetSelection
(
0
);
rghtNetSelectBoxSizer
->
Add
(
m_rightClassChoice
,
0
,
wxALL
|
wxEXPAND
,
5
);
rghtNetSelectBoxSizer
->
Add
(
m_rightClassChoice
,
0
,
wxALL
|
wxEXPAND
,
5
);
m_rightListCtrl
=
new
wxListCtrl
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxLC_HRULES
|
wxLC_REPORT
|
wxLC_
SINGLE_SEL
|
wxLC_
VRULES
);
m_rightListCtrl
=
new
wxListCtrl
(
this
,
wxID_ANY
,
wxDefaultPosition
,
wxDefaultSize
,
wxLC_HRULES
|
wxLC_REPORT
|
wxLC_VRULES
);
m_rightListCtrl
->
SetMinSize
(
wxSize
(
220
,
-
1
)
);
m_rightListCtrl
->
SetMinSize
(
wxSize
(
220
,
-
1
)
);
rghtNetSelectBoxSizer
->
Add
(
m_rightListCtrl
,
1
,
wxALL
|
wxEXPAND
,
5
);
rghtNetSelectBoxSizer
->
Add
(
m_rightListCtrl
,
1
,
wxALL
|
wxEXPAND
,
5
);
sbSizer4
->
Add
(
rghtNetSelectBoxSizer
,
1
,
wxALL
|
wxEXPAND
,
5
);
sbSizer4
->
Add
(
rghtNetSelectBoxSizer
,
0
,
wxALL
|
wxEXPAND
,
5
);
bMainSizer
->
Add
(
sbSizer4
,
1
,
wxALL
|
wxEXPAND
,
5
);
bMainSizer
->
Add
(
sbSizer4
,
2
,
wxALL
|
wxEXPAND
,
5
);
wxStaticBoxSizer
*
sbSizer2
;
wxStaticBoxSizer
*
sbSizer2
;
sbSizer2
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
this
,
wxID_ANY
,
_
(
"Messages:"
)
),
wxHORIZONTAL
);
sbSizer2
=
new
wxStaticBoxSizer
(
new
wxStaticBox
(
this
,
wxID_ANY
,
_
(
"Messages:"
)
),
wxHORIZONTAL
);
...
...
pcbnew/dialog_design_rules_base.fbp
View file @
00d369ad
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
<property
name=
"border"
>
5
</property>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"proportion"
>
1
</property>
<property
name=
"proportion"
>
1
</property>
<object
class=
"wxStaticBoxSizer"
expanded=
"
1
"
>
<object
class=
"wxStaticBoxSizer"
expanded=
"
0
"
>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label"
>
Net Classes:
</property>
<property
name=
"label"
>
Net Classes:
</property>
<property
name=
"minimum_size"
></property>
<property
name=
"minimum_size"
></property>
...
@@ -399,7 +399,7 @@
...
@@ -399,7 +399,7 @@
<object
class=
"sizeritem"
expanded=
"1"
>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"proportion"
>
1
</property>
<property
name=
"proportion"
>
2
</property>
<object
class=
"wxStaticBoxSizer"
expanded=
"0"
>
<object
class=
"wxStaticBoxSizer"
expanded=
"0"
>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"id"
>
wxID_ANY
</property>
<property
name=
"label"
>
Membership:
</property>
<property
name=
"label"
>
Membership:
</property>
...
@@ -492,7 +492,7 @@
...
@@ -492,7 +492,7 @@
<property
name=
"permission"
>
protected
</property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"pos"
></property>
<property
name=
"pos"
></property>
<property
name=
"size"
></property>
<property
name=
"size"
></property>
<property
name=
"style"
>
wxLC_HRULES|wxLC_REPORT|wxLC_
SINGLE_SEL|wxLC_
VRULES
</property>
<property
name=
"style"
>
wxLC_HRULES|wxLC_REPORT|wxLC_VRULES
</property>
<property
name=
"subclass"
></property>
<property
name=
"subclass"
></property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></property>
<property
name=
"validator_data_type"
></property>
<property
name=
"validator_data_type"
></property>
...
@@ -802,7 +802,7 @@
...
@@ -802,7 +802,7 @@
<object
class=
"sizeritem"
expanded=
"1"
>
<object
class=
"sizeritem"
expanded=
"1"
>
<property
name=
"border"
>
5
</property>
<property
name=
"border"
>
5
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"flag"
>
wxALL|wxEXPAND
</property>
<property
name=
"proportion"
>
1
</property>
<property
name=
"proportion"
>
0
</property>
<object
class=
"wxBoxSizer"
expanded=
"1"
>
<object
class=
"wxBoxSizer"
expanded=
"1"
>
<property
name=
"minimum_size"
></property>
<property
name=
"minimum_size"
></property>
<property
name=
"name"
>
rghtNetSelectBoxSizer
</property>
<property
name=
"name"
>
rghtNetSelectBoxSizer
</property>
...
@@ -883,7 +883,7 @@
...
@@ -883,7 +883,7 @@
<property
name=
"permission"
>
protected
</property>
<property
name=
"permission"
>
protected
</property>
<property
name=
"pos"
></property>
<property
name=
"pos"
></property>
<property
name=
"size"
></property>
<property
name=
"size"
></property>
<property
name=
"style"
>
wxLC_HRULES|wxLC_REPORT|wxLC_
SINGLE_SEL|wxLC_
VRULES
</property>
<property
name=
"style"
>
wxLC_HRULES|wxLC_REPORT|wxLC_VRULES
</property>
<property
name=
"subclass"
></property>
<property
name=
"subclass"
></property>
<property
name=
"tooltip"
></property>
<property
name=
"tooltip"
></property>
<property
name=
"validator_data_type"
></property>
<property
name=
"validator_data_type"
></property>
...
...
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