Panda3D
Loading...
Searching...
No Matches
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.
 
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.
 
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().
 
void show_description ()
 Writes the program description to stderr.
 
void show_options ()
 Describes each of the available options to stderr.
 
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.
 
void show_text (const std::string &text)
 Formats the indicated text to stderr with the known _terminal_width.
 
void show_usage ()
 Writes the usage line(s) to stderr.
 
void write_man_page (std::ostream &out)
 Generates a man page in nroff syntax based on the description and options.
 
- 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().
 
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.
 
Filename get_output_filename () const
 If has_output_filename() returns true, this is the filename that the user specified.
 
bool has_output_filename () const
 Returns true if the user specified an output filename, false otherwise (e.g.
 
- Public Member Functions inherited from DXFFile
virtual void begin_file ()
 A hook for user code, if desired.
 
virtual void begin_section ()
 A hook for user code, if desired.
 
virtual void done_vertex ()
 A hook for user code, if desired.
 
virtual void end_file ()
 A hook for user code, if desired.
 
virtual void end_section ()
 A hook for user code, if desired.
 
virtual void error ()
 A hook for user code, if desired.
 
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()).
 
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.
 
void process (Filename filename)
 Opens the indicated filename and reads it as a DXF file.
 
void process (std::istream *in, bool owns_in)
 Reads the indicated stream as a DXF file.
 
- Public Member Functions inherited from MemoryBase
void operator delete (void *, void *)
 
void operator delete (void *ptr)
 
void operator delete[] (void *, void *)
 
void operator delete[] (void *ptr)
 
void * operator new (size_t size)
 
void * operator new (size_t size, void *ptr)
 
void * operator new[] (size_t size)
 
void * operator new[] (size_t size, void *ptr)
 

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.
 
- 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.

Constructor & Destructor Documentation

◆ DXFPoints()

DXFPoints::DXFPoints ( )

Definition at line 19 of file dxfPoints.cxx.

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 53 of file dxfPoints.cxx.

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

◆ run()

void DXFPoints::run ( )

Definition at line 43 of file dxfPoints.cxx.


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