BlinkenArea - GitList
Repositories
Blog
Wiki
dxfngc
Code
Commits
Branches
Tags
Search
Tree:
1030916
Branches
Tags
master
dxfngc
src
path.h
license CC-BY-SA --> GPL (more suitable for source code)
Stefan Schuermans
commited
1030916
at 2013-05-27 17:35:02
path.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 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 prepend other path to this one * @param[in] other other path to prepend */ void prependPath(const Path &other); /** * @brief prepend other path in reverse to this one * @param[in] other other path to prepend */ void prependReversedPath(const Path &other); /** * @brief append other path to this one * @param[in] other other path to appepend */ void appendPath(const Path &other); /** * @brief append other path in reverse to this one * @param[in] other other path to appepend */ void appendReversedPath(const Path &other); /** * @brief remove points too close to each other * @param[in] eqDist maximum distance of two points to be considered equal */ void removeEqPoints(double eqDist); /** * @brief convert path to G-code * @param[in] settings G-code creation settings * @param[in] z z coordinate to use for G-code of path * @param[in,out] gcode new G-code is appended to existing G-code */ void toGCode(const Settings &settings, double z, GCode &gcode) const; Points mPoints; ///< points of path }; #endif // #ifndef PATH_H