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
2ae221d9
Commit
2ae221d9
authored
Dec 03, 2011
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pcbnew: fix Bug #899373
parent
a37fdd97
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
clean.cpp
pcbnew/clean.cpp
+2
-2
gpcb_exchange.cpp
pcbnew/gpcb_exchange.cpp
+20
-5
No files found.
pcbnew/clean.cpp
View file @
2ae221d9
...
...
@@ -620,7 +620,7 @@ TRACK* MergeColinearSegmentIfPossible( BOARD* aPcb,
if
(
aEndType
==
START
)
{
// We must not have a pad, which is a always terminal point for a track
if
(
aPcb
->
GetPadFast
(
aTrackRef
->
m_Start
,
g_TabOneLayerMask
[
aTrackRef
->
GetLayer
()]
)
)
if
(
aPcb
->
GetPadFast
(
aTrackRef
->
m_Start
,
aTrackRef
->
ReturnMaskLayer
()
)
)
return
NULL
;
/* change the common point coordinate of pt_segm to use the other point
...
...
@@ -639,7 +639,7 @@ TRACK* MergeColinearSegmentIfPossible( BOARD* aPcb,
else
// aEndType == END
{
// We must not have a pad, which is a always terminal point for a track
if
(
aPcb
->
GetPadFast
(
aTrackRef
->
m_End
,
g_TabOneLayerMask
[
aTrackRef
->
GetLayer
()]
)
)
if
(
aPcb
->
GetPadFast
(
aTrackRef
->
m_End
,
aTrackRef
->
ReturnMaskLayer
()
)
)
return
NULL
;
/* change the common point coordinate of pt_segm to use the other point
...
...
pcbnew/gpcb_exchange.cpp
View file @
2ae221d9
...
...
@@ -78,6 +78,7 @@ static bool TestFlags( const wxString& flg_string, long flg_mask, const wxChar*
* ElementArc [X Y Width Height StartAngle DeltaAngle Thickness]
* ElementArc (X Y Width Height StartAngle DeltaAngle Thickness)
* (rotation in clockwise)
* ( Note: Pad is a SMD Pad in Pcbnew, and Pin is a through hole Pad in Pcbnew )
* Pad [rX1 rY1 rX2 rY2 Thickness Clearance Mask "Name" "Number" SFlags]
* Pad (rX1 rY1 rX2 rY2 Thickness Clearance Mask "Name" "Number" NFlags)
* Pad (aX1 aY1 aX2 aY2 Thickness "Name" "Number" NFlags)
...
...
@@ -369,12 +370,26 @@ bool MODULE::Read_GPCB_Descr( const wxString& CmpFullFileName )
{
Pad
->
SetPadName
(
params
[
10
]
);
}
// Calculate the Pad parameters.
// In Pcb the shape is a segment
// ibuf[0], ibuf[1] is the start point of the segment
// ibuf[2], ibuf[3] is the end point of the segment
// and me must convert the segment to an oval ( or rectangular) pad
// Pad pos = middle of the segment
// Pad Orientation = angle of the segment
// Pad size = lenght and thickness of the segment
wxPoint
delta
;
delta
.
x
=
ibuf
[
2
]
-
ibuf
[
0
];
delta
.
y
=
ibuf
[
3
]
-
ibuf
[
1
];
double
angle
=
atan2
(
(
double
)
delta
.
y
,
(
double
)
delta
.
x
);
// Negate angle (due to Y reversed axis) and convert it to internal units
angle
=
-
angle
*
1800.0
/
M_PI
;
Pad
->
SetOrientation
(
wxRound
(
angle
)
);
Pad
->
m_Pos
.
x
=
(
ibuf
[
0
]
+
ibuf
[
2
])
/
2
;
Pad
->
m_Pos
.
y
=
(
ibuf
[
1
]
+
ibuf
[
3
])
/
2
;
Pad
->
m_Size
.
x
=
ibuf
[
4
]
+
abs
(
ibuf
[
0
]
-
ibuf
[
2
]
);
Pad
->
m_Size
.
y
=
ibuf
[
4
]
+
abs
(
ibuf
[
1
]
-
ibuf
[
3
]
);
Pad
->
m_Pos
.
x
+=
m_Pos
.
x
;
Pad
->
m_Pos
.
y
+=
m_Pos
.
y
;
Pad
->
m_Size
.
x
=
wxRound
(
hypot
(
(
double
)
delta
.
x
,
(
double
)
delta
.
y
)
);
Pad
->
m_Size
.
y
=
ibuf
[
4
];
Pad
->
m_Pos
+=
m_Pos
;
if
(
!
TestFlags
(
params
[
iflgidx
],
0x0100
,
wxT
(
"square"
)
)
)
{
...
...
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