-
-
Notifications
You must be signed in to change notification settings - Fork 557
/
Copy pathpointsegment.h
82 lines (69 loc) · 1.91 KB
/
pointsegment.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// This file is a part of "grblControl" application.
// This file was originally ported from "PointSegment.java" class
// of "Universal GcodeSender" application written by Will Winder
// (https://github.com/winder/Universal-G-Code-Sender)
// Copyright 2015 Hayrullin Denis Ravilevich
#ifndef POINTSEGMENT_H
#define POINTSEGMENT_H
#include <QObject>
#include <QVector3D>
#include "arcproperties.h"
class PointSegment : public QObject
{
Q_OBJECT
public:
enum planes {
XY,
ZX,
YZ
};
PointSegment(QObject *parent = 0);
PointSegment(PointSegment *ps);
PointSegment(const QVector3D *b, int num);
PointSegment(QVector3D *point, int num, QVector3D *center, double radius, bool clockwise);
~PointSegment();
void setPoint(QVector3D m_point);
QVector3D* point();
QVector<double> points();
void setToolHead(int head);
int getToolhead();
void setLineNumber(int num);
int getLineNumber();
void setSpeed(double s);
double getSpeed();
void setIsZMovement(bool isZ);
bool isZMovement();
void setIsMetric(bool m_isMetric);
bool isMetric();
void setIsArc(bool isA);
bool isArc();
void setIsFastTraverse(bool isF);
bool isFastTraverse();
void setArcCenter(QVector3D *center);
QVector<double> centerPoints();
QVector3D *center();
void setIsClockwise(bool clockwise);
bool isClockwise();
void setRadius(double rad);
double getRadius();
void convertToMetric();
bool isAbsolute() const;
void setIsAbsolute(bool isAbsolute);
planes plane() const;
void setPlane(const planes &plane);
signals:
public slots:
private:
ArcProperties *m_arcProperties;
int m_toolhead;
double m_speed;
QVector3D *m_point;
bool m_isMetric;
bool m_isZMovement;
bool m_isArc;
bool m_isFastTraverse;
bool m_isAbsolute;
int m_lineNumber;
planes m_plane;
};
#endif // POINTSEGMENT_H