1 | /* export.h |
---|
2 | * Export to CAD-like formats (DXF, Skencil, SVG, EPS, HPGL) and also Compass |
---|
3 | * PLT. |
---|
4 | */ |
---|
5 | |
---|
6 | /* Copyright (C) 2004,2005,2012,2014,2015,2018 Olly Betts |
---|
7 | * |
---|
8 | * This program is free software; you can redistribute it and/or modify |
---|
9 | * it under the terms of the GNU General Public License as published by |
---|
10 | * the Free Software Foundation; either version 2 of the License, or |
---|
11 | * (at your option) any later version. |
---|
12 | * |
---|
13 | * This program is distributed in the hope that it will be useful, |
---|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | * GNU General Public License for more details. |
---|
17 | * |
---|
18 | * You should have received a copy of the GNU General Public License |
---|
19 | * along with this program; if not, write to the Free Software |
---|
20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
21 | */ |
---|
22 | |
---|
23 | #ifndef SURVEX_INCLUDED_EXPORT_H |
---|
24 | #define SURVEX_INCLUDED_EXPORT_H |
---|
25 | |
---|
26 | #include "wx.h" |
---|
27 | |
---|
28 | class Model; |
---|
29 | class SurveyFilter; |
---|
30 | |
---|
31 | // Order here needs to match order of extension array in export.cc. |
---|
32 | typedef enum { |
---|
33 | FMT_DXF, |
---|
34 | FMT_EPS, |
---|
35 | FMT_GPX, |
---|
36 | FMT_HPGL, |
---|
37 | FMT_JSON, |
---|
38 | FMT_KML, |
---|
39 | FMT_PLT, |
---|
40 | FMT_SK, |
---|
41 | FMT_POS, |
---|
42 | FMT_SVG, |
---|
43 | FMT_MAX_PLUS_ONE_ |
---|
44 | } export_format; |
---|
45 | |
---|
46 | struct format_info { |
---|
47 | const char* extension; |
---|
48 | int msg_filetype; |
---|
49 | unsigned mask; |
---|
50 | // Defaults for survexport (aven defaults to what is currently shown). |
---|
51 | unsigned defaults; |
---|
52 | }; |
---|
53 | |
---|
54 | extern const format_info export_format_info[]; |
---|
55 | |
---|
56 | #define LEGS 0x00000001 |
---|
57 | #define SURF 0x00000002 |
---|
58 | #define STNS 0x00000004 |
---|
59 | #define LABELS 0x00000008 |
---|
60 | #define XSECT 0x00000010 |
---|
61 | #define WALL1 0x00000020 |
---|
62 | #define WALL2 0x00000040 |
---|
63 | #define WALLS (WALL1|WALL2) |
---|
64 | #define PASG 0x00000080 |
---|
65 | #define EXPORT_3D 0x00000100 |
---|
66 | #define CENTRED 0x00000200 |
---|
67 | #define ENTS 0x00000400 |
---|
68 | #define FIXES 0x00000800 |
---|
69 | #define EXPORTS 0x00001000 |
---|
70 | #define PROJ 0x00002000 |
---|
71 | #define GRID 0x00004000 |
---|
72 | #define TEXT_HEIGHT 0x00008000 |
---|
73 | #define MARKER_SIZE 0x00010000 |
---|
74 | #define SCALE 0x00020000 |
---|
75 | #define FULL_COORDS 0x00040000 |
---|
76 | #define SPLAYS 0x00080000 |
---|
77 | #define CLAMP_TO_GROUND 0x00100000 |
---|
78 | |
---|
79 | #define DEFAULT_GRID_SPACING 100 // metres |
---|
80 | #define DEFAULT_TEXT_HEIGHT 0.6 |
---|
81 | #define DEFAULT_MARKER_SIZE 0.8 |
---|
82 | |
---|
83 | bool Export(const wxString &fnm_out, const wxString &title, |
---|
84 | const wxString &datestamp, |
---|
85 | const Model& model, |
---|
86 | const SurveyFilter* filter, |
---|
87 | double pan, double tilt, int show_mask, export_format format, |
---|
88 | double grid_, double text_height_, double marker_size_, |
---|
89 | double scale); |
---|
90 | |
---|
91 | #endif |
---|