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
708aef85
Commit
708aef85
authored
Jan 18, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
towards making KICAD_GOST a runtime option, hoping for unified paper size
parent
b594b4b2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
17 deletions
+26
-17
class_page_info.cpp
common/class_page_info.cpp
+22
-7
common.h
include/common.h
+4
-10
No files found.
common/class_page_info.cpp
View file @
708aef85
...
...
@@ -29,11 +29,14 @@
const
wxString
PAGE_INFO
::
Custom
(
wxT
(
"User"
)
);
// Standard page sizes in mils, all constants
// A4 see: https://lists.launchpad.net/kicad-developers/msg07389.html
#if defined(KICAD_GOST)
const
PAGE_INFO
PAGE_INFO
::
pageA4
(
wxSize
(
8268
,
11
700
),
wxT
(
"A4"
)
);
const
PAGE_INFO
PAGE_INFO
::
pageA4
(
wxSize
(
8268
,
11
693
),
wxT
(
"A4"
)
);
#else
const
PAGE_INFO
PAGE_INFO
::
pageA4
(
wxSize
(
11
700
,
8268
),
wxT
(
"A4"
)
);
const
PAGE_INFO
PAGE_INFO
::
pageA4
(
wxSize
(
11
693
,
8268
),
wxT
(
"A4"
)
);
#endif
const
PAGE_INFO
PAGE_INFO
::
pageA3
(
wxSize
(
16535
,
11700
),
wxT
(
"A3"
)
);
const
PAGE_INFO
PAGE_INFO
::
pageA2
(
wxSize
(
23400
,
16535
),
wxT
(
"A2"
)
);
const
PAGE_INFO
PAGE_INFO
::
pageA1
(
wxSize
(
33070
,
23400
),
wxT
(
"A1"
)
);
...
...
@@ -93,17 +96,29 @@ inline void PAGE_INFO::updatePortrait()
}
PAGE_INFO
::
PAGE_INFO
(
const
wxSize
&
aSizeMils
,
const
wxString
&
aType
)
:
m_type
(
aType
),
m_size
(
aSizeMils
)
{
#if defined(KICAD_GOST)
m_left_margin
=
GOST_LEFTMARGIN
;
m_right_margin
=
GOST_RIGHTMARGIN
;
m_top_margin
=
GOST_TOPMARGIN
;
m_bottom_margin
=
GOST_BOTTOMMARGIN
;
/*
#define GOST_LEFTMARGIN 800 // 20mm
#define GOST_RIGHTMARGIN 200 // 5mm
#define GOST_TOPMARGIN 200 // 5mm
#define GOST_BOTTOMMARGIN 200 // 5mm
*/
m_left_margin
=
800
;
// 20mm
m_right_margin
=
200
;
// 5mm
m_top_margin
=
200
;
// 5mm
m_bottom_margin
=
200
;
// 5mm
#else
m_left_margin
=
m_right_margin
=
m_top_margin
=
m_bottom_margin
=
400
;
m_left_margin
=
m_right_margin
=
m_top_margin
=
m_bottom_margin
=
400
;
#endif
updatePortrait
();
...
...
include/common.h
View file @
708aef85
...
...
@@ -112,13 +112,7 @@ enum EDA_UNITS_T {
UNSCALED_UNITS
=
2
};
#if defined(KICAD_GOST)
#define GOST_LEFTMARGIN 800 // 20mm
#define GOST_RIGHTMARGIN 200 // 5mm
#define GOST_TOPMARGIN 200 // 5mm
#define GOST_BOTTOMMARGIN 200 // 5mm
#endif
// forward declarations:
class
LibNameList
;
...
...
@@ -189,11 +183,11 @@ public:
// and either deci-mils or nanometers in PCBNew.
#if defined(PCBNEW)
# if defined(KICAD_NANOMETRE)
int
GetWidthIU
()
const
{
return
int
(
2.54e4
*
GetWidthMils
()
);
}
int
GetHeightIU
()
const
{
return
int
(
2.54e4
*
GetHeightMils
()
);
}
int
GetWidthIU
()
const
{
return
25400
*
GetWidthMils
(
);
}
int
GetHeightIU
()
const
{
return
25400
*
GetHeightMils
(
);
}
# else
int
GetWidthIU
()
const
{
return
int
(
10
*
GetWidthMils
()
);
}
int
GetHeightIU
()
const
{
return
int
(
10
*
GetHeightMils
()
);
}
int
GetWidthIU
()
const
{
return
10
*
GetWidthMils
(
);
}
int
GetHeightIU
()
const
{
return
10
*
GetHeightMils
(
);
}
# endif
const
wxSize
GetSizeIU
()
const
{
return
wxSize
(
GetWidthIU
(),
GetHeightIU
()
);
}
#elif defined(EESCHEMA)
...
...
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