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
eb52f4ba
Commit
eb52f4ba
authored
Dec 07, 2011
by
Marco Mattila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix thermal relief gap calculation for circular pads in pcbnew.
parent
a089ae7a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
board_items_to_polygon_shape_transform.cpp
pcbnew/board_items_to_polygon_shape_transform.cpp
+6
-6
No files found.
pcbnew/board_items_to_polygon_shape_transform.cpp
View file @
eb52f4ba
...
...
@@ -615,8 +615,8 @@ void CreateThermalReliefPadPolygon( std::vector<CPolyPt>& aCornerBuffer,
// The pattern roughtly is a 90 deg arc pie
std
::
vector
<
wxPoint
>
corners_buffer
;
// Radius of outer arcs of the shape
:
int
outer_radius
=
dx
+
aThermalGap
;
// The radius of the outer arc is pad radius + aThermalGap
// Radius of outer arcs of the shape
corrected for arc approximation by lines
int
outer_radius
=
(
int
)
(
(
dx
+
aThermalGap
)
*
aCorrectionFactor
);
// Crosspoint of thermal spoke sides, the first point of polygon buffer
corners_buffer
.
push_back
(
wxPoint
(
copper_thickness
.
x
/
2
,
copper_thickness
.
y
/
2
)
);
...
...
@@ -660,7 +660,7 @@ void CreateThermalReliefPadPolygon( std::vector<CPolyPt>& aCornerBuffer,
// Now, add the 4 holes ( each is the pattern, rotated by 0, 90, 180 and 270 deg
// aThermalRot = 450 (45.0 degrees orientation) work fine.
int
angle_pad
=
aPad
.
m_Orient
;
// Pad orientation
int
angle_pad
=
aPad
.
GetOrientation
()
;
// Pad orientation
int
th_angle
=
aThermalRot
;
for
(
unsigned
ihole
=
0
;
ihole
<
4
;
ihole
++
)
...
...
@@ -763,7 +763,7 @@ void CreateThermalReliefPadPolygon( std::vector<CPolyPt>& aCornerBuffer,
/* Create 2 holes, rotated by pad rotation.
*/
int
angle
=
aPad
.
m_Orient
+
supp_angle
;
int
angle
=
aPad
.
GetOrientation
()
+
supp_angle
;
for
(
int
irect
=
0
;
irect
<
2
;
irect
++
)
{
...
...
@@ -791,7 +791,7 @@ void CreateThermalReliefPadPolygon( std::vector<CPolyPt>& aCornerBuffer,
}
// Now add corner 4 and 2 (2 is the corner 4 rotated by 180 deg
angle
=
aPad
.
m_Orient
+
supp_angle
;
angle
=
aPad
.
GetOrientation
()
+
supp_angle
;
for
(
int
irect
=
0
;
irect
<
2
;
irect
++
)
{
...
...
@@ -851,7 +851,7 @@ void CreateThermalReliefPadPolygon( std::vector<CPolyPt>& aCornerBuffer,
corners_buffer
.
push_back
(
wxPoint
(
-
copper_thickness
.
x
/
2
,
-
(
dy
-
aThermalGap
/
4
)
)
);
corners_buffer
.
push_back
(
wxPoint
(
-
(
aThermalGap
/
4
+
copper_thickness
.
x
/
2
),
-
dy
)
);
int
angle
=
aPad
.
m_Orient
;
int
angle
=
aPad
.
GetOrientation
()
;
int
rounding_radius
=
(
int
)
(
aThermalGap
*
aCorrectionFactor
);
// Corner rounding radius
int
angle_pg
;
// Polygon increment angle
...
...
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