initial version, DXFs can b...
Stefan Schuermans authored 12 years ago
|
1) /* drawing (DXF) to G-code (NGC) converter
2) * Copyright 2013 Stefan Schuermans <stefan@schuermans.info>
|
license CC-BY-SA --> GPL (m...
Stefan Schuermans authored 11 years ago
|
3) * Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html
|
initial version, DXFs can b...
Stefan Schuermans authored 12 years ago
|
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);
|
implement joining and impro...
Stefan Schuermans authored 12 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)
|
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)
|