BlinkenArea - GitList
Repositories
Blog
Wiki
dxfngc
Code
Commits
Branches
Tags
Search
Tree:
1030916
Branches
Tags
master
dxfngc
src
gcode.h
license CC-BY-SA --> GPL (more suitable for source code)
Stefan Schuermans
commited
1030916
at 2013-05-27 17:35:02
gcode.h
Blame
History
Raw
/* drawing (DXF) to G-code (NGC) converter * Copyright 2013 Stefan Schuermans <stefan@schuermans.info> * Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html */ #ifndef GCODE_H #define GCODE_H #include <iostream> #include <string> #include <vector> #include "gcmd.h" #include "point.h" /// G-code class GCode { public: /// type for G-code commands typedef std::vector<GCmd *> GCmds; /// consturctor GCode(); /// destructor ~GCode(); private: /// copy constructor disabled GCode(const GCode &); /// assignment operator disabled GCode & operator=(const GCode &); public: /** * @brief append fast move up command * @param[in] z z coordinate to move up to */ void appendUp(double z); /** * @brief append fast move command * @param[in] pt point to move to */ void appendFast(const Point &pt); /** * @brief append set feed rate command * @param[in] feed feed rate */ void appendFeed(double feed); /** * @brief append linear cut down command * @param[in] z z coordinate to cut down to */ void appendDown(double z); /** * @brief append linear cut command * @param[in] pt point to cut to */ void appendLinear(const Point &pt); /** * @brief append dwell command * @param[in] sec number of seconds to dwell (must be positive) */ void appendDwell(double sec); /** * @brief append custom command * @param[in] cmd custom command to append */ void appendCustom(const std::string &cmd); /** * @brief output G-code to stream * @param[in] strm stream to write G-code to * @param[in] digits number of digits to output after decimal point */ void toStrm(std::ostream &strm, unsigned int digits) const; /** * @brief output G-code to file * @param[in] strFileName name of file to write G-code to * @param[in] digits number of digits to output after decimal point * @return if writing G-code was successful */ bool toFile(const std::string &strFileName, unsigned int digits) const; /// G-code commands GCmds mGCmds; }; #endif // #ifndef GCODE_H