25 _preferred_extension =
".txt";
27 set_program_brief(
"extract points from AutoCAD .dxf files");
28 set_program_description
29 (
"This program reads an AutoCAD .dxf file and generates a simple " 30 "list of all the points contained within it, one per line, to a " 31 "text file, or to standard output.");
34 add_runline(
"[opts] input.dxf > output.txt");
35 add_runline(
"[opts] -o output.txt input.dxf");
36 add_runline(
"[opts] input.dxf output.txt");
55 if (_entity == EN_point) {
58 }
else if (_entity == EN_insert) {
70 nout <<
"You must specify the .dxf file to read on the command line.\n";
73 }
else if (args.size() != 1) {
74 nout <<
"You must specify only one .dxf file to read on the command line.\n";
78 _input_filename = args[0];
84 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...
void ocs_2_wcs()
Assuming the current entity is a planar-based entity, for instance, a 2-d polygon (as opposed to a 3-...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void process(Filename filename)
Opens the indicated filename and reads it as a DXF file.
std::ostream & get_output()
Returns an output stream that corresponds to the user's intended egg file output–either stdout,...