15 #include "dxfPoints.h" 29 _preferred_extension =
".txt";
31 set_program_brief(
"extract points from AutoCAD .dxf files");
32 set_program_description
33 (
"This program reads an AutoCAD .dxf file and generates a simple " 34 "list of all the points contained within it, one per line, to a " 35 "text file, or to standard output.");
38 add_runline(
"[opts] input.dxf > output.txt");
39 add_runline(
"[opts] -o output.txt input.dxf");
40 add_runline(
"[opts] input.dxf output.txt");
64 if (_entity == EN_point) {
67 }
else if (_entity == EN_insert) {
81 nout <<
"You must specify the .dxf file to read on the command line.\n";
84 }
else if (args.size() != 1) {
85 nout <<
"You must specify only one .dxf file to read on the command line.\n";
89 _input_filename = args[0];
95 int main(
int argc,
char *argv[]) {
virtual void parse_command_line(int argc, char **argv)
Dispatches on each of the options on the command line, and passes the remaining parameters to handle_...
virtual void done_entity()
This is inherited from DXFFile, and gets called as each entity (face, line, whatever) has finished pr...
A simple program to read a dxf file and list the points contained within it to a text file...
This is the bare functionality (intended to be inherited from along with ProgramBase or some derivati...
ostream & get_output()
Returns an output stream that corresponds to the user's intended egg file output–either stdout...
void ocs_2_wcs()
Assuming the current entity is a planar-based entity, for instance, a 2-d polygon (as opposed to a 3-...
void process(Filename filename)
Opens the indicated filename and reads it as a DXF file.