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
8d90da0a
Commit
8d90da0a
authored
Jan 08, 2008
by
CHARRAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reorder GENERAL_COLLECTOR lists in collectors.cpp due to markers change
parent
82a268a6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
134 additions
and
113 deletions
+134
-113
class_mire.cpp
pcbnew/class_mire.cpp
+0
-1
collectors.cpp
pcbnew/collectors.cpp
+131
-112
zones_by_polygon.cpp
pcbnew/zones_by_polygon.cpp
+3
-0
No files found.
pcbnew/class_mire.cpp
View file @
8d90da0a
...
@@ -215,7 +215,6 @@ bool MIREPCB::HitTest( const wxPoint& refPos )
...
@@ -215,7 +215,6 @@ bool MIREPCB::HitTest( const wxPoint& refPos )
int
dX
=
refPos
.
x
-
m_Pos
.
x
;
int
dX
=
refPos
.
x
-
m_Pos
.
x
;
int
dY
=
refPos
.
y
-
m_Pos
.
y
;
int
dY
=
refPos
.
y
-
m_Pos
.
y
;
int
rayon
=
m_Size
/
2
;
int
rayon
=
m_Size
/
2
;
return
abs
(
dX
)
<=
rayon
&&
abs
(
dY
)
<=
rayon
;
return
abs
(
dX
)
<=
rayon
&&
abs
(
dY
)
<=
rayon
;
}
}
...
...
pcbnew/collectors.cpp
View file @
8d90da0a
...
@@ -27,49 +27,48 @@
...
@@ -27,49 +27,48 @@
/* This module contains out of line member functions for classes given in
/* This module contains out of line member functions for classes given in
collectors.h. Those classes augment the functionality of class WinEDA_PcbFrame.
*
collectors.h. Those classes augment the functionality of class WinEDA_PcbFrame.
*/
*/
// see collectors.h
// see collectors.h
const
KICAD_T
GENERAL_COLLECTOR
::
AllBoardItems
[]
=
{
const
KICAD_T
GENERAL_COLLECTOR
::
AllBoardItems
[]
=
{
// there are some restrictions on the order of items in the general case.
// there are some restrictions on the order of items in the general case.
// all items in m_Drawings for instance should be contiguous.
// all items in m_Drawings for instance should be contiguous.
TYPETEXTE
,
// *** all items in a same list (shown here) must be contigous ****
TYPEDRAWSEGMENT
,
TYPEMARKER
,
// in m_markers
TYPEMARKER
,
TYPETEXTE
,
// in m_Drawings
TYPECOTATION
,
TYPEDRAWSEGMENT
,
// in m_Drawings
TYPEMIRE
,
TYPECOTATION
,
// in m_Drawings
TYPEVIA
,
TYPEMIRE
,
// in m_Drawings
TYPETRACK
,
TYPEVIA
,
// in m_Tracks
TYPEPAD
,
TYPETRACK
,
// in m_Tracks
TYPETEXTEMODULE
,
TYPEPAD
,
// in modules
TYPEMODULE
,
TYPETEXTEMODULE
,
// in modules
TYPEZONE
,
TYPEMODULE
,
// in m_Modules
TYPEZONE_CONTAINER
,
TYPEZONE
,
// in m_Zones
TYPEZONE_CONTAINER
,
// in m_ZoneDescriptorList
EOT
EOT
};
};
/*
/*
const KICAD_T GENERAL_COLLECTOR::PrimaryItems[] = {
* const KICAD_T GENERAL_COLLECTOR::PrimaryItems[] = {
TYPETEXTE,
* TYPETEXTE,
TYPEDRAWSEGMENT,
* TYPEDRAWSEGMENT,
TYPEMARKER,
* TYPECOTATION,
TYPECOTATION,
* TYPEVIA,
TYPEVIA,
* TYPETRACK,
TYPETRACK,
* TYPEMODULE,
TYPEMODULE,
* EOT
EOT
* };
};
*/
*/
const
KICAD_T
GENERAL_COLLECTOR
::
AllButZones
[]
=
{
const
KICAD_T
GENERAL_COLLECTOR
::
AllButZones
[]
=
{
TYPEMARKER
,
TYPETEXTE
,
TYPETEXTE
,
TYPEDRAWSEGMENT
,
TYPEDRAWSEGMENT
,
TYPEMARKER
,
TYPECOTATION
,
TYPECOTATION
,
TYPEMIRE
,
TYPEMIRE
,
TYPEVIA
,
TYPEVIA
,
...
@@ -138,48 +137,57 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
...
@@ -138,48 +137,57 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
#if 0 // debugging
#if 0 // debugging
static int breakhere = 0;
static int breakhere = 0;
switch( item->Type() )
switch( item->Type() )
{
{
case TYPEPAD:
case TYPEPAD:
{
{
MODULE* m = (MODULE*) item->GetParent();
MODULE* m = (MODULE*) item->GetParent();
if( m->GetReference() == wxT("Y2"
) )
if( m->GetReference() == wxT( "Y2"
) )
{
{
breakhere++;
breakhere++;
}
}
}
}
break;
break;
case TYPEVIA:
case TYPEVIA:
breakhere++;
breakhere++;
break;
break;
case TYPETRACK:
case TYPETRACK:
breakhere++;
breakhere++;
break;
break;
case TYPEZONE:
case TYPEZONE:
breakhere++;
breakhere++;
break;
break;
case TYPETEXTE:
case TYPETEXTE:
breakhere++;
breakhere++;
break;
break;
case TYPEDRAWSEGMENT:
case TYPEDRAWSEGMENT:
breakhere++;
breakhere++;
break;
break;
case TYPECOTATION:
case TYPECOTATION:
breakhere++;
breakhere++;
break;
break;
case TYPETEXTEMODULE:
case TYPETEXTEMODULE:
{
{
TEXTE_MODULE* tm = (TEXTE_MODULE*) item;
TEXTE_MODULE* tm = (TEXTE_MODULE*) item;
if( tm->m_Text == wxT("10uH"
) )
if( tm->m_Text == wxT( "10uH"
) )
{
{
breakhere++;
breakhere++;
}
}
}
}
break;
break;
case TYPEMODULE:
case TYPEMODULE:
{
{
MODULE* m = (MODULE*) item;
MODULE* m = (MODULE*) item;
if( m->GetReference() == wxT("C98"
) )
if( m->GetReference() == wxT( "C98"
) )
{
{
breakhere++;
breakhere++;
}
}
...
@@ -190,14 +198,16 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
...
@@ -190,14 +198,16 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
breakhere++;
breakhere++;
break;
break;
}
}
#endif
#endif
switch
(
item
->
Type
()
)
switch
(
item
->
Type
()
)
{
{
case
TYPEPAD
:
case
TYPEPAD
:
// if pad is a thru hole, then it can be visible when its parent module is not.
// if pad is a thru hole, then it can be visible when its parent module is not.
if
(
(
(
D_PAD
*
)
item
)
->
m_Attribut
!=
PAD_SMD
)
// a hole is present, so multiple layers
if
(
(
(
D_PAD
*
)
item
)
->
m_Attribut
!=
PAD_SMD
)
// a hole is present, so multiple layers
{
{
// there are no pad specific visibility controls at this time.
// there are no pad specific visibility controls at this time.
// proceed to the common tests below, but without the parent module test,
// proceed to the common tests below, but without the parent module test,
...
@@ -209,23 +219,32 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
...
@@ -209,23 +219,32 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
case
TYPEVIA
:
case
TYPEVIA
:
break
;
break
;
case
TYPETRACK
:
case
TYPETRACK
:
break
;
break
;
case
TYPEZONE
:
case
TYPEZONE
:
break
;
break
;
case
TYPEZONE_CONTAINER
:
case
TYPEZONE_CONTAINER
:
break
;
break
;
case
TYPETEXTE
:
case
TYPETEXTE
:
break
;
break
;
case
TYPEDRAWSEGMENT
:
case
TYPEDRAWSEGMENT
:
break
;
break
;
case
TYPECOTATION
:
case
TYPECOTATION
:
break
;
break
;
case
TYPEMIRE
:
break
;
case
TYPETEXTEMODULE
:
case
TYPETEXTEMODULE
:
module
=
(
MODULE
*
)
item
->
GetParent
();
module
=
(
MODULE
*
)
item
->
GetParent
();
if
(
m_Guide
->
IgnoreMTextsMarkedNoShow
()
&&
(
(
TEXTE_MODULE
*
)
item
)
->
m_NoShow
)
if
(
m_Guide
->
IgnoreMTextsMarkedNoShow
()
&&
(
(
TEXTE_MODULE
*
)
item
)
->
m_NoShow
)
goto
exit
;
goto
exit
;
if
(
module
)
if
(
module
)
...
@@ -266,7 +285,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
...
@@ -266,7 +285,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
// visibility controls. They all have their own separate visibility controls
// visibility controls. They all have their own separate visibility controls
if
(
module
||
m_Guide
->
IsLayerVisible
(
layer
)
||
!
m_Guide
->
IgnoreNonVisibleLayers
()
)
if
(
module
||
m_Guide
->
IsLayerVisible
(
layer
)
||
!
m_Guide
->
IgnoreNonVisibleLayers
()
)
{
{
if
(
!
m_Guide
->
IsLayerLocked
(
layer
)
||
!
m_Guide
->
IgnoreLockedLayers
()
)
if
(
!
m_Guide
->
IsLayerLocked
(
layer
)
||
!
m_Guide
->
IgnoreLockedLayers
()
)
{
{
if
(
!
item
->
IsLocked
()
||
!
m_Guide
->
IgnoreLockedItems
()
)
if
(
!
item
->
IsLocked
()
||
!
m_Guide
->
IgnoreLockedItems
()
)
{
{
...
@@ -293,7 +312,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
...
@@ -293,7 +312,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_BaseStruct* testItem, const void*
// visibility controls. They all have their own separate visibility controls
// visibility controls. They all have their own separate visibility controls
if
(
module
||
m_Guide
->
IsLayerVisible
(
layer
)
||
!
m_Guide
->
IgnoreNonVisibleLayers
()
)
if
(
module
||
m_Guide
->
IsLayerVisible
(
layer
)
||
!
m_Guide
->
IgnoreNonVisibleLayers
()
)
{
{
if
(
!
m_Guide
->
IsLayerLocked
(
layer
)
||
!
m_Guide
->
IgnoreLockedLayers
()
)
if
(
!
m_Guide
->
IsLayerLocked
(
layer
)
||
!
m_Guide
->
IgnoreLockedLayers
()
)
{
{
if
(
!
item
->
IsLocked
()
||
!
m_Guide
->
IgnoreLockedItems
()
)
if
(
!
item
->
IsLocked
()
||
!
m_Guide
->
IgnoreLockedItems
()
)
{
{
...
@@ -331,7 +350,7 @@ void GENERAL_COLLECTOR::Collect( BOARD_ITEM* aItem, const KICAD_T aScanList[],
...
@@ -331,7 +350,7 @@ void GENERAL_COLLECTOR::Collect( BOARD_ITEM* aItem, const KICAD_T aScanList[],
// visit the board or module with the INSPECTOR (me).
// visit the board or module with the INSPECTOR (me).
aItem
->
Visit
(
this
,
// INSPECTOR* inspector
aItem
->
Visit
(
this
,
// INSPECTOR* inspector
NULL
,
// const void* testData, not used here
NULL
,
// const void* testData, not used here
m_ScanTypes
);
m_ScanTypes
);
SetTimeNow
();
// when snapshot was taken
SetTimeNow
();
// when snapshot was taken
...
@@ -339,7 +358,7 @@ void GENERAL_COLLECTOR::Collect( BOARD_ITEM* aItem, const KICAD_T aScanList[],
...
@@ -339,7 +358,7 @@ void GENERAL_COLLECTOR::Collect( BOARD_ITEM* aItem, const KICAD_T aScanList[],
m_PrimaryLength
=
m_List
.
size
();
m_PrimaryLength
=
m_List
.
size
();
// append 2nd list onto end of the first list
// append 2nd list onto end of the first list
for
(
unsigned
i
=
0
;
i
<
m_List2nd
.
size
();
++
i
)
for
(
unsigned
i
=
0
;
i
<
m_List2nd
.
size
();
++
i
)
Append
(
m_List2nd
[
i
]
);
Append
(
m_List2nd
[
i
]
);
Empty2nd
();
Empty2nd
();
...
...
pcbnew/zones_by_polygon.cpp
View file @
8d90da0a
...
@@ -459,12 +459,15 @@ EDGE_ZONE* WinEDA_PcbFrame::Begin_Zone( wxDC* DC )
...
@@ -459,12 +459,15 @@ EDGE_ZONE* WinEDA_PcbFrame::Begin_Zone( wxDC* DC )
if
(
diag
==
ZONE_ABORT
)
if
(
diag
==
ZONE_ABORT
)
return
NULL
;
return
NULL
;
GetScreen
()
->
m_Active_Layer
=
s_Zone_Layer
;
// Set by the dialog frame
}
}
else
/* Start a new contour: init zone params (net and layer) from an existing zone */
else
/* Start a new contour: init zone params (net and layer) from an existing zone */
{
{
GetScreen
()
->
m_Active_Layer
=
s_Zone_Layer
=
s_CurrentZone
->
GetLayer
();
GetScreen
()
->
m_Active_Layer
=
s_Zone_Layer
=
s_CurrentZone
->
GetLayer
();
s_Zone_Hatching
=
s_CurrentZone
->
m_Poly
->
GetHatchStyle
();
s_Zone_Hatching
=
s_CurrentZone
->
m_Poly
->
GetHatchStyle
();
}
}
/* Show the Net */
/* Show the Net */
if
(
g_HightLigt_Status
&&
(
g_HightLigth_NetCode
!=
s_NetcodeSelection
)
)
if
(
g_HightLigt_Status
&&
(
g_HightLigth_NetCode
!=
s_NetcodeSelection
)
)
{
{
...
...
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