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
33f39fc2
Commit
33f39fc2
authored
Dec 07, 2014
by
Paul LeoNerd Evens
Committed by
Wayne Stambaugh
Dec 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Eagle footprint library import of arcs. (fixes lp:1399745)
parent
e373850d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
4 deletions
+29
-4
eagle_plugin.cpp
pcbnew/eagle_plugin.cpp
+29
-4
No files found.
pcbnew/eagle_plugin.cpp
View file @
33f39fc2
...
...
@@ -1938,14 +1938,39 @@ void EAGLE_PLUGIN::packageWire( MODULE* aModule, CPTREE& aTree ) const
wxPoint
end
(
kicad_x
(
w
.
x2
),
kicad_y
(
w
.
y2
)
);
int
width
=
kicad
(
w
.
width
);
EDGE_MODULE
*
dwg
=
new
EDGE_MODULE
(
aModule
,
S_SEGMENT
);
aModule
->
GraphicalItems
().
PushBack
(
dwg
);
EDGE_MODULE
*
dwg
;
if
(
!
w
.
curve
)
{
dwg
=
new
EDGE_MODULE
(
aModule
,
S_SEGMENT
);
dwg
->
SetStart0
(
start
);
dwg
->
SetEnd0
(
end
);
dwg
->
SetStart0
(
start
);
dwg
->
SetEnd0
(
end
);
}
else
{
dwg
=
new
EDGE_MODULE
(
aModule
,
S_ARC
);
// Eagle give us start and end.
// S_ARC wants start to give the centre, and end to give the start
double
dx
=
end
.
x
-
start
.
x
,
dy
=
end
.
y
-
start
.
y
;
wxPoint
mid
=
(
start
+
end
)
/
2
;
double
dlen
=
sqrt
(
dx
*
dx
+
dy
*
dy
);
double
dist
=
dlen
/
(
2
*
tan
(
DEG2RAD
(
*
w
.
curve
)
/
2
)
);
wxPoint
centre
(
mid
.
x
+
dist
*
(
dy
/
dlen
),
mid
.
y
-
dist
*
(
dx
/
dlen
)
);
dwg
->
SetStart0
(
centre
);
dwg
->
SetEnd0
(
start
);
dwg
->
SetAngle
(
*
w
.
curve
*
-
10.0
);
// KiCad rotates the other way
}
dwg
->
SetLayer
(
layer
);
dwg
->
SetWidth
(
width
);
aModule
->
GraphicalItems
().
PushBack
(
dwg
);
}
}
...
...
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