BlinkenArea - GitList
Repositories
Blog
Wiki
dxfngc
Code
Commits
Branches
Tags
Search
Tree:
e231ced
Branches
Tags
master
dxfngc
src
gcode.h
configuration of precision
Stefan Schuermans
commited
e231ced
at 2013-01-26 18:55:56
gcode.h
Blame
History
Raw
/* drawing (DXF) to G-code (NGC) converter * Copyright 2013 Stefan Schuermans <stefan@schuermans.info> * Copyleft: CC-BY-SA http://creativecommons.org/licenses/by-sa/3.0/ */ #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 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