kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #07405
[PATCH] - A series paper sizes improvement.
I hope this is a final attempt to define the strict A series paper sizes.
Also there is a tiny GOST-type frame improvement.
Alexander.
=== modified file 'common/class_page_info.cpp'
--- common/class_page_info.cpp 2012-01-18 15:02:50 +0000
+++ common/class_page_info.cpp 2012-01-19 15:00:09 +0000
@@ -29,18 +29,28 @@
const wxString PAGE_INFO::Custom( wxT( "User" ) );
// Standard page sizes in mils, all constants
+#define A4_PAGE_SIZE_X ( 210 * 10000 / 254 )
+#define A4_PAGE_SIZE_Y ( 297 * 10000 / 254 )
+#define A3_PAGE_SIZE_X A4_PAGE_SIZE_Y
+#define A3_PAGE_SIZE_Y ( 420 * 10000 / 254 )
+#define A2_PAGE_SIZE_X A3_PAGE_SIZE_Y
+#define A2_PAGE_SIZE_Y ( 594 * 10000 / 254 )
+#define A1_PAGE_SIZE_X A2_PAGE_SIZE_Y
+#define A1_PAGE_SIZE_Y ( 841 * 10000 / 254 )
+#define A0_PAGE_SIZE_X A1_PAGE_SIZE_Y
+#define A0_PAGE_SIZE_Y ( 1189 * 10000 / 254 )
// A4 see: https://lists.launchpad.net/kicad-developers/msg07389.html
#if defined(KICAD_GOST)
-const PAGE_INFO PAGE_INFO::pageA4( wxSize( 8268, 11693 ), wxT( "A4" ) );
+const PAGE_INFO PAGE_INFO::pageA4( wxSize( A4_PAGE_SIZE_X, A4_PAGE_SIZE_Y ), wxT( "A4" ) );
#else
-const PAGE_INFO PAGE_INFO::pageA4( wxSize( 11693, 8268 ), wxT( "A4" ) );
+const PAGE_INFO PAGE_INFO::pageA4( wxSize( A4_PAGE_SIZE_Y, A4_PAGE_SIZE_X ), 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" ) );
-const PAGE_INFO PAGE_INFO::pageA0( wxSize( 46800, 33070 ), wxT( "A0" ) );
+const PAGE_INFO PAGE_INFO::pageA3( wxSize( A3_PAGE_SIZE_Y, A3_PAGE_SIZE_X ), wxT( "A3" ) );
+const PAGE_INFO PAGE_INFO::pageA2( wxSize( A2_PAGE_SIZE_Y, A2_PAGE_SIZE_X ), wxT( "A2" ) );
+const PAGE_INFO PAGE_INFO::pageA1( wxSize( A1_PAGE_SIZE_Y, A1_PAGE_SIZE_X ), wxT( "A1" ) );
+const PAGE_INFO PAGE_INFO::pageA0( wxSize( A0_PAGE_SIZE_Y, A0_PAGE_SIZE_X ), wxT( "A0" ) );
const PAGE_INFO PAGE_INFO::pageA( wxSize( 11000, 8500 ), wxT( "A" ) );
const PAGE_INFO PAGE_INFO::pageB( wxSize( 17000, 11000 ), wxT( "B" ) );
const PAGE_INFO PAGE_INFO::pageC( wxSize( 22000, 17000 ), wxT( "C" ) );
@@ -110,10 +120,10 @@
#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
+ m_left_margin = ( 20 * 10000 / 254 ); // 20mm
+ m_right_margin = // 5mm
+ m_top_margin = // 5mm
+ m_bottom_margin = ( 5 * 10000 / 254 ); // 5mm
#else
m_left_margin =
m_right_margin =
=== modified file 'include/worksheet.h'
--- include/worksheet.h 2011-02-27 10:16:54 +0000
+++ include/worksheet.h 2012-01-19 10:26:44 +0000
@@ -65,7 +65,7 @@
#define STAMP_60 60 * 10000 / 254
#define STAMP_25 25 * 10000 / 254
-#define STAMP_287 287 * 10000 / 254
+#define STAMP_287 ( 287 * 10000 / 254 + 1 )
#define STAMP_227 227 * 10000 / 254
#define STAMP_167 167 * 10000 / 254
#endif