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
fb0045a8
Commit
fb0045a8
authored
Jul 07, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix: Bottom layer not correctly handled in (PNS) Interactive router.
parent
a3b421b0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
17 deletions
+19
-17
graphics_abstraction_layer.h
include/gal/graphics_abstraction_layer.h
+3
-0
layers_id_colors_and_visibility.h
include/layers_id_colors_and_visibility.h
+1
-1
pns_layerset.h
pcbnew/router/pns_layerset.h
+1
-1
pns_line_placer.cpp
pcbnew/router/pns_line_placer.cpp
+4
-4
pns_router.cpp
pcbnew/router/pns_router.cpp
+5
-5
router_preview_item.cpp
pcbnew/router/router_preview_item.cpp
+3
-4
router_preview_item.h
pcbnew/router/router_preview_item.h
+2
-2
No files found.
include/gal/graphics_abstraction_layer.h
View file @
fb0045a8
...
@@ -255,6 +255,9 @@ public:
...
@@ -255,6 +255,9 @@ public:
*/
*/
inline
virtual
void
SetLayerDepth
(
double
aLayerDepth
)
inline
virtual
void
SetLayerDepth
(
double
aLayerDepth
)
{
{
assert
(
aLayerDepth
<=
depthRange
.
y
);
assert
(
aLayerDepth
>=
depthRange
.
x
);
layerDepth
=
aLayerDepth
;
layerDepth
=
aLayerDepth
;
}
}
...
...
include/layers_id_colors_and_visibility.h
View file @
fb0045a8
...
@@ -138,7 +138,7 @@ enum LAYER_ID
...
@@ -138,7 +138,7 @@ enum LAYER_ID
#define LAST_COPPER_LAYER brain dead
#define LAST_COPPER_LAYER brain dead
#define FIRST_LAYER brain dead
#define FIRST_LAYER brain dead
#define NB_LAYERS use LAYER_ID_COUNT instead
#define NB_LAYERS use LAYER_ID_COUNT instead
#define NB_COPPER_LAYERS was always a max, not a number, use MAX_CU_
COUNT
now.
#define NB_COPPER_LAYERS was always a max, not a number, use MAX_CU_
LAYERS
now.
*/
*/
...
...
pcbnew/router/pns_layerset.h
View file @
fb0045a8
...
@@ -108,7 +108,7 @@ public:
...
@@ -108,7 +108,7 @@ public:
///> Shortcut for comparisons/overlap tests
///> Shortcut for comparisons/overlap tests
static
PNS_LAYERSET
All
()
static
PNS_LAYERSET
All
()
{
{
return
PNS_LAYERSET
(
0
,
256
);
return
PNS_LAYERSET
(
0
,
64
);
}
}
private
:
private
:
...
...
pcbnew/router/pns_line_placer.cpp
View file @
fb0045a8
...
@@ -379,7 +379,7 @@ bool PNS_LINE_PLACER::handleViaPlacement( PNS_LINE& aHead )
...
@@ -379,7 +379,7 @@ bool PNS_LINE_PLACER::handleViaPlacement( PNS_LINE& aHead )
if
(
!
m_placingVia
)
if
(
!
m_placingVia
)
return
true
;
return
true
;
PNS_LAYERSET
allLayers
(
0
,
15
);
PNS_LAYERSET
allLayers
(
0
,
MAX_CU_LAYERS
-
1
);
PNS_VIA
v
(
aHead
.
CPoint
(
-
1
),
allLayers
,
m_viaDiameter
,
m_viaDrill
,
aHead
.
Net
()
);
PNS_VIA
v
(
aHead
.
CPoint
(
-
1
),
allLayers
,
m_viaDiameter
,
m_viaDrill
,
aHead
.
Net
()
);
VECTOR2I
force
;
VECTOR2I
force
;
...
@@ -439,7 +439,7 @@ bool PNS_LINE_PLACER::rhWalkOnly( const VECTOR2I& aP, PNS_LINE& aNewHead )
...
@@ -439,7 +439,7 @@ bool PNS_LINE_PLACER::rhWalkOnly( const VECTOR2I& aP, PNS_LINE& aNewHead )
}
}
else
if
(
m_placingVia
&&
viaOk
)
else
if
(
m_placingVia
&&
viaOk
)
{
{
PNS_LAYERSET
allLayers
(
0
,
15
);
PNS_LAYERSET
allLayers
(
0
,
MAX_CU_LAYERS
-
1
);
PNS_VIA
v1
(
walkFull
.
CPoint
(
-
1
),
allLayers
,
m_viaDiameter
,
m_viaDrill
);
PNS_VIA
v1
(
walkFull
.
CPoint
(
-
1
),
allLayers
,
m_viaDiameter
,
m_viaDrill
);
walkFull
.
AppendVia
(
v1
);
walkFull
.
AppendVia
(
v1
);
}
}
...
@@ -464,7 +464,7 @@ bool PNS_LINE_PLACER::rhMarkObstacles( const VECTOR2I& aP, PNS_LINE& aNewHead )
...
@@ -464,7 +464,7 @@ bool PNS_LINE_PLACER::rhMarkObstacles( const VECTOR2I& aP, PNS_LINE& aNewHead )
if
(
m_placingVia
)
if
(
m_placingVia
)
{
{
PNS_LAYERSET
allLayers
(
0
,
15
);
PNS_LAYERSET
allLayers
(
0
,
MAX_CU_LAYERS
-
1
);
PNS_VIA
v1
(
m_head
.
CPoint
(
-
1
),
allLayers
,
m_viaDiameter
,
m_viaDrill
);
PNS_VIA
v1
(
m_head
.
CPoint
(
-
1
),
allLayers
,
m_viaDiameter
,
m_viaDrill
);
m_head
.
AppendVia
(
v1
);
m_head
.
AppendVia
(
v1
);
}
}
...
@@ -507,7 +507,7 @@ bool PNS_LINE_PLACER::rhShoveOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead )
...
@@ -507,7 +507,7 @@ bool PNS_LINE_PLACER::rhShoveOnly ( const VECTOR2I& aP, PNS_LINE& aNewHead )
if
(
m_placingVia
)
if
(
m_placingVia
)
{
{
PNS_LAYERSET
allLayers
(
0
,
15
);
PNS_LAYERSET
allLayers
(
0
,
MAX_CU_LAYERS
-
1
);
PNS_VIA
v1
(
l
.
CPoint
(
-
1
),
allLayers
,
m_viaDiameter
,
m_viaDrill
);
PNS_VIA
v1
(
l
.
CPoint
(
-
1
),
allLayers
,
m_viaDiameter
,
m_viaDrill
);
PNS_VIA
v2
(
l2
.
CPoint
(
-
1
),
allLayers
,
m_viaDiameter
,
m_viaDrill
);
PNS_VIA
v2
(
l2
.
CPoint
(
-
1
),
allLayers
,
m_viaDiameter
,
m_viaDrill
);
...
...
pcbnew/router/pns_router.cpp
View file @
fb0045a8
...
@@ -116,12 +116,12 @@ private:
...
@@ -116,12 +116,12 @@ private:
PNS_ITEM
*
PNS_ROUTER
::
syncPad
(
D_PAD
*
aPad
)
PNS_ITEM
*
PNS_ROUTER
::
syncPad
(
D_PAD
*
aPad
)
{
{
PNS_LAYERSET
layers
(
0
,
15
);
PNS_LAYERSET
layers
(
0
,
MAX_CU_LAYERS
-
1
);
switch
(
aPad
->
GetAttribute
()
)
switch
(
aPad
->
GetAttribute
()
)
{
{
case
PAD_STANDARD
:
case
PAD_STANDARD
:
layers
=
PNS_LAYERSET
(
0
,
15
);
layers
=
PNS_LAYERSET
(
0
,
MAX_CU_LAYERS
-
1
);
// TODO necessary? it is already initialized
break
;
break
;
case
PAD_SMD
:
case
PAD_SMD
:
...
@@ -191,7 +191,7 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad )
...
@@ -191,7 +191,7 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad )
else
else
delta
=
VECTOR2I
(
0
,
(
sz
.
y
-
sz
.
x
)
/
2
);
delta
=
VECTOR2I
(
0
,
(
sz
.
y
-
sz
.
x
)
/
2
);
SHAPE_SEGMENT
*
shape
=
new
SHAPE_SEGMENT
(
c
-
delta
,
c
+
delta
,
SHAPE_SEGMENT
*
shape
=
new
SHAPE_SEGMENT
(
c
-
delta
,
c
+
delta
,
std
::
min
(
sz
.
x
,
sz
.
y
)
);
std
::
min
(
sz
.
x
,
sz
.
y
)
);
solid
->
SetShape
(
shape
);
solid
->
SetShape
(
shape
);
}
}
...
@@ -229,7 +229,7 @@ PNS_ITEM* PNS_ROUTER::syncVia( VIA* aVia )
...
@@ -229,7 +229,7 @@ PNS_ITEM* PNS_ROUTER::syncVia( VIA* aVia )
{
{
PNS_VIA
*
v
=
new
PNS_VIA
(
PNS_VIA
*
v
=
new
PNS_VIA
(
aVia
->
GetPosition
(),
aVia
->
GetPosition
(),
PNS_LAYERSET
(
0
,
15
),
PNS_LAYERSET
(
0
,
MAX_CU_LAYERS
-
1
),
aVia
->
GetWidth
(),
aVia
->
GetWidth
(),
aVia
->
GetDrillValue
(),
aVia
->
GetDrillValue
(),
aVia
->
GetNetCode
()
);
aVia
->
GetNetCode
()
);
...
@@ -260,7 +260,7 @@ int PNS_ROUTER::NextCopperLayer( bool aUp )
...
@@ -260,7 +260,7 @@ int PNS_ROUTER::NextCopperLayer( bool aUp )
l
=
0
;
l
=
0
;
if
(
l
<
0
)
if
(
l
<
0
)
l
=
MAX_CU_LAYERS
-
1
;
l
=
MAX_CU_LAYERS
-
1
;
if
(
mask
[
l
]
)
if
(
mask
[
l
]
)
return
l
;
return
l
;
...
...
pcbnew/router/router_preview_item.cpp
View file @
fb0045a8
...
@@ -41,7 +41,7 @@ ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM( const PNS_ITEM* aItem, VIEW_GROUP* aPa
...
@@ -41,7 +41,7 @@ ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM( const PNS_ITEM* aItem, VIEW_GROUP* aPa
m_shape
=
NULL
;
m_shape
=
NULL
;
m_clearance
=
-
1
;
m_clearance
=
-
1
;
m_originLayer
=
m_layer
=
ITEM_GAL_LAYER
(
GP_OVERLAY
);
m_originLayer
=
m_layer
=
ITEM_GAL_LAYER
(
GP_OVERLAY
);
if
(
aItem
)
if
(
aItem
)
Update
(
aItem
);
Update
(
aItem
);
...
@@ -59,7 +59,7 @@ void ROUTER_PREVIEW_ITEM::Update( const PNS_ITEM* aItem )
...
@@ -59,7 +59,7 @@ void ROUTER_PREVIEW_ITEM::Update( const PNS_ITEM* aItem )
assert
(
m_originLayer
>=
0
);
assert
(
m_originLayer
>=
0
);
m_layer
=
m_originLayer
;
m_layer
=
m_originLayer
;
m_color
=
getLayerColor
(
m_originLayer
);
m_color
=
getLayerColor
(
m_originLayer
);
m_color
.
a
=
0.8
;
m_color
.
a
=
0.8
;
m_depth
=
BaseOverlayDepth
-
aItem
->
Layers
().
Start
();
m_depth
=
BaseOverlayDepth
-
aItem
->
Layers
().
Start
();
...
@@ -70,7 +70,6 @@ void ROUTER_PREVIEW_ITEM::Update( const PNS_ITEM* aItem )
...
@@ -70,7 +70,6 @@ void ROUTER_PREVIEW_ITEM::Update( const PNS_ITEM* aItem )
case
PNS_ITEM
:
:
LINE
:
case
PNS_ITEM
:
:
LINE
:
m_type
=
PR_SHAPE
;
m_type
=
PR_SHAPE
;
m_width
=
(
(
PNS_LINE
*
)
aItem
)
->
Width
();
m_width
=
(
(
PNS_LINE
*
)
aItem
)
->
Width
();
break
;
break
;
case
PNS_ITEM
:
:
SEGMENT
:
case
PNS_ITEM
:
:
SEGMENT
:
...
@@ -174,7 +173,7 @@ void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const
...
@@ -174,7 +173,7 @@ void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const
if
(
m_clearance
>
0
)
if
(
m_clearance
>
0
)
{
{
aGal
->
SetLayerDepth
(
ClearanceOverlayDepth
);
aGal
->
SetLayerDepth
(
ClearanceOverlayDepth
);
aGal
->
SetStrokeColor
(
COLOR4D
(
DARKDARKGRAY
));
aGal
->
SetStrokeColor
(
COLOR4D
(
DARKDARKGRAY
)
);
aGal
->
SetLineWidth
(
m_width
+
2
*
m_clearance
);
aGal
->
SetLineWidth
(
m_width
+
2
*
m_clearance
);
aGal
->
DrawLine
(
s
->
GetSeg
().
A
,
s
->
GetSeg
().
B
);
aGal
->
DrawLine
(
s
->
GetSeg
().
A
,
s
->
GetSeg
().
B
);
}
}
...
...
pcbnew/router/router_preview_item.h
View file @
fb0045a8
...
@@ -84,7 +84,7 @@ public:
...
@@ -84,7 +84,7 @@ public:
aCount
=
1
;
aCount
=
1
;
}
}
void
drawLineChain
(
const
SHAPE_LINE_CHAIN
&
aL
,
KIGFX
::
GAL
*
aGal
)
const
;
void
drawLineChain
(
const
SHAPE_LINE_CHAIN
&
aL
,
KIGFX
::
GAL
*
aGal
)
const
;
private
:
private
:
const
KIGFX
::
COLOR4D
assignColor
(
int
aStyle
)
const
;
const
KIGFX
::
COLOR4D
assignColor
(
int
aStyle
)
const
;
...
@@ -105,7 +105,7 @@ private:
...
@@ -105,7 +105,7 @@ private:
// fixme: shouldn't this go to VIEW?
// fixme: shouldn't this go to VIEW?
static
const
int
ClearanceOverlayDepth
=
-
2000
;
static
const
int
ClearanceOverlayDepth
=
-
2000
;
static
const
int
BaseOverlayDepth
=
-
20
2
0
;
static
const
int
BaseOverlayDepth
=
-
20
1
0
;
static
const
int
ViaOverlayDepth
=
-
2046
;
static
const
int
ViaOverlayDepth
=
-
2046
;
double
m_depth
;
double
m_depth
;
...
...
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