-
-
Notifications
You must be signed in to change notification settings - Fork 557
/
Copy pathlinesegment.h
82 lines (63 loc) · 1.77 KB
/
linesegment.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 "LineSegment.java" class
// of "Universal GcodeSender" application written by Will Winder
// (https://github.com/winder/Universal-G-Code-Sender)
// Copyright 2015 Hayrullin Denis Ravilevich
#ifndef LINESEGMENT_H
#define LINESEGMENT_H
#include <QObject>
#include <QVector3D>
class LineSegment : public QObject
{
Q_OBJECT
public:
LineSegment(QObject *parent = 0);
LineSegment(QVector3D a, QVector3D b, int num);
LineSegment(LineSegment *initial);
~LineSegment();
int getLineNumber();
QList<QVector3D> getPointArray();
QList<double> getPoints();
QVector3D getStart();
void setStart(QVector3D vector);
QVector3D getEnd();
void setEnd(QVector3D vector);
void setToolHead(int head);
int getToolhead();
void setSpeed(double s);
double getSpeed();
void setIsZMovement(bool isZ);
bool isZMovement();
void setIsArc(bool isA);
bool isArc();
void setIsFastTraverse(bool isF);
bool isFastTraverse();
bool contains(QVector3D point);
bool drawn() const;
void setDrawn(bool drawn);
bool isMetric() const;
void setIsMetric(bool isMetric);
bool isAbsolute() const;
void setIsAbsolute(bool isAbsolute);
bool isHightlight() const;
void setIsHightlight(bool isHightlight);
int vertexIndex() const;
void setVertexIndex(int vertexIndex);
signals:
public slots:
private:
int m_toolhead;
double m_speed;
QVector3D m_first, m_second;
// Line properties
bool m_isZMovement;
bool m_isArc;
bool m_isFastTraverse;
int m_lineNumber;
bool m_drawn;
bool m_isMetric;
bool m_isAbsolute;
bool m_isHightlight;
int m_vertexIndex;
};
#endif // LINESEGMENT_H