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
2dbb428b
Commit
2dbb428b
authored
Aug 22, 2012
by
Marco Mattila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pcbnew thermal stub removal for pads with locally defined thermal properties.
parent
0ebc3f06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
21 deletions
+23
-21
zones_convert_to_polygons_aux_functions.cpp
pcbnew/zones_convert_to_polygons_aux_functions.cpp
+23
-21
No files found.
pcbnew/zones_convert_to_polygons_aux_functions.cpp
View file @
2dbb428b
...
...
@@ -72,12 +72,14 @@ void BuildUnconnectedThermalStubsPolygonList( std::vector<CPolyPt>& aCornerBuffe
// half size of the pen used to draw/plot zones outlines
int
pen_radius
=
aZone
->
m_ZoneMinThickness
/
2
;
// Calculate thermal bridge half width
int
thermbridgeWidth
=
aZone
->
m_ThermalReliefCopperBridge
/
2
;
for
(
MODULE
*
module
=
aPcb
->
m_Modules
;
module
;
module
=
module
->
Next
()
)
{
for
(
D_PAD
*
pad
=
module
->
m_Pads
;
pad
!=
NULL
;
pad
=
pad
->
Next
()
)
{
// Calculate thermal bridge half width
int
thermalBridgeWidth
=
aZone
->
GetThermalReliefCopperBridge
(
pad
)
/
2
;
int
thermalReliefGap
=
aZone
->
GetThermalReliefGap
(
pad
);
// Rejects non-standard pads with tht-only thermal reliefs
if
(
aZone
->
GetPadConnection
(
pad
)
==
THT_THERMAL
&&
pad
->
GetAttribute
()
!=
PAD_STANDARD
)
...
...
@@ -95,15 +97,15 @@ void BuildUnconnectedThermalStubsPolygonList( std::vector<CPolyPt>& aCornerBuffe
continue
;
item_boundingbox
=
pad
->
GetBoundingBox
();
item_boundingbox
.
Inflate
(
aZone
->
m_T
hermalReliefGap
);
item_boundingbox
.
Inflate
(
t
hermalReliefGap
);
if
(
!
(
item_boundingbox
.
Intersects
(
zone_boundingbox
)
)
)
continue
;
// Thermal bridges are like a segment from a starting point inside the pad
// to an ending point outside the pad
wxPoint
startpoint
,
endpoint
;
endpoint
.
x
=
(
pad
->
GetSize
().
x
/
2
)
+
aZone
->
m_T
hermalReliefGap
;
endpoint
.
y
=
(
pad
->
GetSize
().
y
/
2
)
+
aZone
->
m_T
hermalReliefGap
;
endpoint
.
x
=
(
pad
->
GetSize
().
x
/
2
)
+
t
hermalReliefGap
;
endpoint
.
y
=
(
pad
->
GetSize
().
y
/
2
)
+
t
hermalReliefGap
;
int
copperThickness
=
aZone
->
GetThermalReliefCopperBridge
(
pad
)
-
aZone
->
m_ZoneMinThickness
;
if
(
copperThickness
<
0
)
...
...
@@ -149,31 +151,31 @@ void BuildUnconnectedThermalStubsPolygonList( std::vector<CPolyPt>& aCornerBuffe
switch
(
i
)
{
case
0
:
// lower stub
corners_buffer
.
push_back
(
wxPoint
(
-
therm
b
ridgeWidth
,
endpoint
.
y
)
);
corners_buffer
.
push_back
(
wxPoint
(
+
therm
b
ridgeWidth
,
endpoint
.
y
)
);
corners_buffer
.
push_back
(
wxPoint
(
+
therm
b
ridgeWidth
,
startpoint
.
y
)
);
corners_buffer
.
push_back
(
wxPoint
(
-
therm
b
ridgeWidth
,
startpoint
.
y
)
);
corners_buffer
.
push_back
(
wxPoint
(
-
therm
alB
ridgeWidth
,
endpoint
.
y
)
);
corners_buffer
.
push_back
(
wxPoint
(
+
therm
alB
ridgeWidth
,
endpoint
.
y
)
);
corners_buffer
.
push_back
(
wxPoint
(
+
therm
alB
ridgeWidth
,
startpoint
.
y
)
);
corners_buffer
.
push_back
(
wxPoint
(
-
therm
alB
ridgeWidth
,
startpoint
.
y
)
);
break
;
case
1
:
// upper stub
corners_buffer
.
push_back
(
wxPoint
(
-
therm
b
ridgeWidth
,
-
endpoint
.
y
)
);
corners_buffer
.
push_back
(
wxPoint
(
+
therm
b
ridgeWidth
,
-
endpoint
.
y
)
);
corners_buffer
.
push_back
(
wxPoint
(
+
therm
b
ridgeWidth
,
-
startpoint
.
y
)
);
corners_buffer
.
push_back
(
wxPoint
(
-
therm
b
ridgeWidth
,
-
startpoint
.
y
)
);
corners_buffer
.
push_back
(
wxPoint
(
-
therm
alB
ridgeWidth
,
-
endpoint
.
y
)
);
corners_buffer
.
push_back
(
wxPoint
(
+
therm
alB
ridgeWidth
,
-
endpoint
.
y
)
);
corners_buffer
.
push_back
(
wxPoint
(
+
therm
alB
ridgeWidth
,
-
startpoint
.
y
)
);
corners_buffer
.
push_back
(
wxPoint
(
-
therm
alB
ridgeWidth
,
-
startpoint
.
y
)
);
break
;
case
2
:
// right stub
corners_buffer
.
push_back
(
wxPoint
(
endpoint
.
x
,
-
therm
b
ridgeWidth
)
);
corners_buffer
.
push_back
(
wxPoint
(
endpoint
.
x
,
therm
b
ridgeWidth
)
);
corners_buffer
.
push_back
(
wxPoint
(
+
startpoint
.
x
,
therm
b
ridgeWidth
)
);
corners_buffer
.
push_back
(
wxPoint
(
+
startpoint
.
x
,
-
therm
b
ridgeWidth
)
);
corners_buffer
.
push_back
(
wxPoint
(
endpoint
.
x
,
-
therm
alB
ridgeWidth
)
);
corners_buffer
.
push_back
(
wxPoint
(
endpoint
.
x
,
therm
alB
ridgeWidth
)
);
corners_buffer
.
push_back
(
wxPoint
(
+
startpoint
.
x
,
therm
alB
ridgeWidth
)
);
corners_buffer
.
push_back
(
wxPoint
(
+
startpoint
.
x
,
-
therm
alB
ridgeWidth
)
);
break
;
case
3
:
// left stub
corners_buffer
.
push_back
(
wxPoint
(
-
endpoint
.
x
,
-
therm
b
ridgeWidth
)
);
corners_buffer
.
push_back
(
wxPoint
(
-
endpoint
.
x
,
therm
b
ridgeWidth
)
);
corners_buffer
.
push_back
(
wxPoint
(
-
startpoint
.
x
,
therm
b
ridgeWidth
)
);
corners_buffer
.
push_back
(
wxPoint
(
-
startpoint
.
x
,
-
therm
b
ridgeWidth
)
);
corners_buffer
.
push_back
(
wxPoint
(
-
endpoint
.
x
,
-
therm
alB
ridgeWidth
)
);
corners_buffer
.
push_back
(
wxPoint
(
-
endpoint
.
x
,
therm
alB
ridgeWidth
)
);
corners_buffer
.
push_back
(
wxPoint
(
-
startpoint
.
x
,
therm
alB
ridgeWidth
)
);
corners_buffer
.
push_back
(
wxPoint
(
-
startpoint
.
x
,
-
therm
alB
ridgeWidth
)
);
break
;
}
...
...
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