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
5d5698d6
Commit
5d5698d6
authored
Nov 14, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
non-immediate aperture macro parameters
parent
39ba8945
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
gerbview.h
gerbview/gerbview.h
+15
-4
rs274d.cpp
gerbview/rs274d.cpp
+2
-2
No files found.
gerbview/gerbview.h
View file @
5d5698d6
...
@@ -132,9 +132,9 @@ public:
...
@@ -132,9 +132,9 @@ public:
*/
*/
bool
IsImmediate
()
const
{
return
index
==
-
1
;
}
bool
IsImmediate
()
const
{
return
index
==
-
1
;
}
int
GetIndex
()
const
unsigned
GetIndex
()
const
{
{
return
index
;
return
(
unsigned
)
index
;
}
}
void
SetIndex
(
int
aIndex
)
void
SetIndex
(
int
aIndex
)
...
@@ -235,6 +235,8 @@ typedef std::pair<APERTURE_MACRO_SET::iterator, bool> APERTURE_MACRO_SET_PAIR;
...
@@ -235,6 +235,8 @@ typedef std::pair<APERTURE_MACRO_SET::iterator, bool> APERTURE_MACRO_SET_PAIR;
*/
*/
class
D_CODE
class
D_CODE
{
{
friend
class
DCODE_PARAM
;
APERTURE_MACRO
*
m_Macro
;
///< no ownership, points to GERBER.m_aperture_macros element
APERTURE_MACRO
*
m_Macro
;
///< no ownership, points to GERBER.m_aperture_macros element
/**
/**
...
@@ -288,8 +290,17 @@ inline double DCODE_PARAM::GetValue( const D_CODE* aDcode ) const
...
@@ -288,8 +290,17 @@ inline double DCODE_PARAM::GetValue( const D_CODE* aDcode ) const
return
value
;
return
value
;
else
else
{
{
// get the parameter from aDcode
// the first one was numbered 1, not zero, as in $1, see page 19 of spec.
return
0
.
0
;
unsigned
ndx
=
GetIndex
()
-
1
;
// get the parameter from the aDcode
if
(
ndx
<
aDcode
->
m_am_params
.
size
()
)
return
aDcode
->
m_am_params
[
ndx
].
GetValue
(
NULL
);
else
{
wxASSERT
(
GetIndex
()
-
1
<
aDcode
->
m_am_params
.
size
()
);
return
0
.
0
;
}
}
}
}
}
...
...
gerbview/rs274d.cpp
View file @
5d5698d6
...
@@ -967,11 +967,11 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
...
@@ -967,11 +967,11 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
if
(
start
.
x
==
end
.
x
)
if
(
start
.
x
==
end
.
x
)
{
{
size
.
x
=
width
;
size
.
x
=
width
;
size
.
y
=
ABS
(
end
.
y
-
start
.
y
);
size
.
y
=
ABS
(
end
.
y
-
start
.
y
)
+
1
;
}
}
else
else
{
{
size
.
x
=
ABS
(
end
.
x
-
start
.
x
);
size
.
x
=
ABS
(
end
.
x
-
start
.
x
)
+
1
;
size
.
y
=
width
;
size
.
y
=
width
;
}
}
...
...
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