9d9be1079cd198f3da8fcf0ae570166b76264051
Stefan Schuermans initial version, DXFs can b...

Stefan Schuermans authored 11 years ago

1) /* drawing (DXF) to G-code (NGC) converter
2)  * Copyright 2013 Stefan Schuermans <stefan@schuermans.info>
3)  * Copyleft: CC-BY-SA http://creativecommons.org/licenses/by-sa/3.0/
4)  */
5) 
6) #ifndef POINT_H
7) #define POINT_H
8) 
9) /// point in 2D space
10) class Point {
11) public:
12)   Point();
13)   Point(double x, double y);
14)   double abs_sq() const;
15)   double abs() const;
16)   Point operator-() const;
17)   Point operator+(const Point &that) const;
18)   Point operator-(const Point &that) const;
19)   Point operator*(double factor) const;
20)   Point operator/(double factor) const;
21)   Point &operator+=(const Point &that);
22)   Point &operator-=(const Point &that);
23)   Point &operator*=(double factor);
24)   Point &operator/=(double factor);
Stefan Schuermans implement joining and impro...

Stefan Schuermans authored 11 years ago

25) 
26)   /**
27)    * @brief check if point is equal to another one
28)    * @param[in] that other point
29)    * @param[in] eqDist maximum distance of two points to be considered equal
30)    */
31)   bool equals(const Point &that, double eqDist) const;
32) 
Stefan Schuermans supoort rotation around z axis

Stefan Schuermans authored 11 years ago

33)   /**
34)    * @brief rotate around origin
35)    * @param[in] rad angle in radians
36)    * @return rotated point
37)    */
38)   Point rotate(double rad) const;
39)