Stefan Schuermans
initial version, DXFs can be read, some G-code can be produced
Stefan Schuermans commited be85cfc at 2013-01-20 20:53:53
/* 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 PATH_H
#define PATH_H
#include <vector>
#include "gcode.h"
#include "point.h"
#include "settings.h"
/// a 2D path, i.e. a number of connected lines in 2D space
class Path {
public:
typedef std::vector<Point> Points; ///< type for points of path
/**
* @brief add a new point to the end of the path
* @param[in] point point to add
*/
void addPoint(const Point &point);
/**
* @brief add a new point to the end of the path
* @param[in] x x coordinate of point to add
* @param[in] y y coordinate of point to add
*/
void addPoint(double x, double y);
/**
* @brief convert path to G-code
* @param[in] settings G-code creation settings
* @param[in,out] gcode new G-code is appended to existing G-code
*/
void toGCode(const Settings &settings, GCode &gcode) const;
Points mPoints; ///< points of path
};
#endif // #ifndef PATH_H
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX