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
2ddcbe1a
Commit
2ddcbe1a
authored
Oct 12, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eedchema: class_libentry.* : wxString GetLibraryName() is now virtual
parent
73fd4fb2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
5 deletions
+24
-5
class_libentry.cpp
eeschema/class_libentry.cpp
+14
-0
class_libentry.h
eeschema/class_libentry.h
+5
-1
rs274d.cpp
gerbview/rs274d.cpp
+5
-4
No files found.
eeschema/class_libentry.cpp
View file @
2ddcbe1a
...
...
@@ -80,6 +80,20 @@ wxString CMP_LIB_ENTRY::GetLibraryName()
return
wxString
(
_
(
"none"
)
);
}
wxString
LIB_COMPONENT
::
GetLibraryName
()
{
if
(
library
!=
NULL
)
return
library
->
GetName
();
return
wxString
(
_
(
"none"
)
);
}
wxString
LIB_ALIAS
::
GetLibraryName
()
{
if
(
GetComponent
()
)
return
GetComponent
()
->
GetLibraryName
();
return
wxString
(
_
(
"none"
)
);
}
/**
* Function SaveDoc
...
...
eeschema/class_libentry.h
View file @
2ddcbe1a
...
...
@@ -79,7 +79,7 @@ public:
return
wxT
(
"CMP_LIB_ENTRY"
);
}
wxString
GetLibraryName
();
virtual
wxString
GetLibraryName
();
CMP_LIBRARY
*
GetLibrary
()
{
return
library
;
}
...
...
@@ -185,6 +185,8 @@ public:
GetValueField
().
m_Text
=
aName
;
}
virtual
wxString
GetLibraryName
();
wxArrayString
GetAliasNames
(
bool
aIncludeRoot
=
true
)
const
;
size_t
GetAliasCount
()
const
{
return
m_aliases
.
size
();
}
...
...
@@ -614,6 +616,8 @@ public:
return
root
;
}
virtual
wxString
GetLibraryName
();
bool
IsRoot
()
const
{
return
name
.
CmpNoCase
(
root
->
GetName
()
)
==
0
;
}
bool
operator
==
(
const
LIB_ALIAS
*
aAlias
)
const
{
return
this
==
aAlias
;
}
...
...
gerbview/rs274d.cpp
View file @
2ddcbe1a
...
...
@@ -411,20 +411,21 @@ static void fillArcPOLY( BOARD* aPcb, GERBER_DRAW_ITEM* aGbrItem,
int
end_angle
=
wxRound
(
atan2
(
(
double
)
end
.
y
,
(
double
)
end
.
x
)
*
1800
/
M_PI
);
// dummyTrack has right geometric parameters, but
// fillArcGBRITEM calculate arc parameters for a draw function that expects
// fillArcGBRITEM calculate
s
arc parameters for a draw function that expects
// start_angle < end_angle. So ensure this is the case here:
// Due to the fact atan2 returns angles between -180 to + 180 degrees,
// this not always the case ( a modulo 360.0 degrees can be lost )
// this
is
not always the case ( a modulo 360.0 degrees can be lost )
if
(
start_angle
>
end_angle
)
end_angle
+=
3600
;
int
arc_angle
=
start_angle
-
end_angle
;
// Approximate arc by 36 segments per 360 degree
int
increment_angle
=
3600
/
36
;
const
int
increment_angle
=
3600
/
36
;
int
count
=
ABS
(
arc_angle
/
increment_angle
);
// calculate polygon corners
// when not clockwise, dummyGbrItem arc goes from end to start
// when arc is counter-clockwise, dummyGbrItem arc goes from end to start
// and we must always create a polygon from start to end.
wxPoint
start_arc
=
start
;
for
(
int
ii
=
0
;
ii
<=
count
;
ii
++
)
{
...
...
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