Panda3D
Public Member Functions | List of all members
DXFPoints Class Reference

A simple program to read a dxf file and list the points contained within it to a text file. More...

#include "dxfPoints.h"

Inheritance diagram for DXFPoints:
ProgramBase WithOutputFile DXFFile MemoryBase

Public Member Functions

virtual void done_entity ()
 This is inherited from DXFFile, and gets called as each entity (face, line, whatever) has finished processing. More...
 
void run ()
 
- Public Member Functions inherited from ProgramBase
 ProgramBase (const std::string &name=std::string())
 
std::string get_exec_command () const
 Returns the command that invoked this program, as a shell-friendly string, suitable for pasting into the comments of output files. More...
 
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_args(). More...
 
void show_description ()
 Writes the program description to stderr. More...
 
void show_options ()
 Describes each of the available options to stderr. More...
 
void show_text (const std::string &text)
 Formats the indicated text to stderr with the known _terminal_width. More...
 
void show_text (const std::string &prefix, int indent_width, std::string text)
 Formats the indicated text and its prefix for output to stderr with the known _terminal_width. More...
 
void show_usage ()
 Writes the usage line(s) to stderr. More...
 
void write_man_page (std::ostream &out)
 Generates a man page in nroff syntax based on the description and options. More...
 
- Public Member Functions inherited from WithOutputFile
 WithOutputFile (bool allow_last_param, bool allow_stdout, bool binary_output)
 
void close_output ()
 Closes the output stream previously opened by get_output(). More...
 
std::ostream & get_output ()
 Returns an output stream that corresponds to the user's intended egg file output–either stdout, or the named output file. More...
 
Filename get_output_filename () const
 If has_output_filename() returns true, this is the filename that the user specified. More...
 
bool has_output_filename () const
 Returns true if the user specified an output filename, false otherwise (e.g. More...
 
- Public Member Functions inherited from DXFFile
virtual void begin_file ()
 A hook for user code, if desired. More...
 
virtual void begin_section ()
 A hook for user code, if desired. More...
 
virtual void done_vertex ()
 A hook for user code, if desired. More...
 
virtual void end_file ()
 A hook for user code, if desired. More...
 
virtual void end_section ()
 A hook for user code, if desired. More...
 
virtual void error ()
 A hook for user code, if desired. More...
 
const Colorget_color () const
 This is a convenience function to return the r,g,b color of the current entity (at the time of done_entity()). More...
 
virtual DXFLayernew_layer (const std::string &name)
 
void ocs_2_wcs ()
 Assuming the current entity is a planar-based entity, for instance, a 2-d polygon (as opposed to a 3-d polygon), this converts the coordinates from the funny planar coordinate system to the world coordinates. More...
 
void process (Filename filename)
 Opens the indicated filename and reads it as a DXF file. More...
 
void process (std::istream *in, bool owns_in)
 Reads the indicated stream as a DXF file. More...
 

Additional Inherited Members

- Public Types inherited from ProgramBase
typedef pdeque< std::string > Args
 
- Public Types inherited from DXFFile
enum  Entity {
  EN_unknown, EN_3dface, EN_point, EN_insert,
  EN_vertex, EN_polyline
}
 
enum  PolylineFlags {
  PF_closed = 0x01, PF_curve_fit = 0x02, PF_spline_fit = 0x04, PF_3d = 0x08,
  PF_3d_mesh = 0x10, PF_closed_n = 0x20, PF_polyface = 0x40, PF_continuous_linetype = 0x80
}
 
enum  Section {
  SE_unknown, SE_header, SE_tables, SE_blocks,
  SE_entities, SE_objects
}
 
enum  State {
  ST_top, ST_section, ST_entity, ST_verts,
  ST_error, ST_done
}
 
- Static Public Member Functions inherited from DXFFile
static int find_color (double r, double g, double b)
 Returns the index of the closest matching AutoCAD color to the indicated r, g, b. More...
 
- Public Attributes inherited from ProgramBase
Args _program_args
 
Filename _program_name
 
- Public Attributes inherited from DXFFile
int _color_index
 
Entity _entity
 
int _flags
 
DXFLayer_layer
 
DXFLayerMap _layers
 
LPoint3d _p
 
LPoint3d _q
 
LPoint3d _r
 
LPoint3d _s
 
Section _section
 
DXFVertices _verts
 
LVector3d _z
 
- Static Public Attributes inherited from DXFFile
static Color _colors [DXF_num_colors]
 

Detailed Description

A simple program to read a dxf file and list the points contained within it to a text file.

Definition at line 27 of file dxfPoints.h.

Member Function Documentation

◆ done_entity()

void DXFPoints::done_entity ( )
virtual

This is inherited from DXFFile, and gets called as each entity (face, line, whatever) has finished processing.

Reimplemented from DXFFile.

Definition at line 54 of file dxfPoints.cxx.

References WithOutputFile::get_output(), and DXFFile::ocs_2_wcs().


The documentation for this class was generated from the following files: