Changeset View
Standalone View
src/core/beddeform.h
- This file was added.
1 | /* AtCore | ||||
---|---|---|---|---|---|
2 | Copyright (C) <2019> | ||||
3 | | ||||
4 | Authors: | ||||
5 | Chris Rizzitello <rizzitello@kde.org> | ||||
6 | | ||||
7 | This library is free software; you can redistribute it and/or | ||||
8 | modify it under the terms of the GNU Lesser General Public | ||||
9 | License as published by the Free Software Foundation; either | ||||
10 | version 2.1 of the License, or (at your option) version 3, or any | ||||
11 | later version accepted by the membership of KDE e.V. (or its | ||||
12 | successor approved by the membership of KDE e.V.), which shall | ||||
13 | act as a proxy defined in Section 6 of version 3 of the license. | ||||
14 | | ||||
15 | This library is distributed in the hope that it will be useful, | ||||
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
18 | Lesser General Public License for more details. | ||||
19 | | ||||
20 | You should have received a copy of the GNU Lesser General Public | ||||
21 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||||
22 | */ | ||||
23 | #pragma once | ||||
24 | | ||||
25 | #include <QObject> | ||||
26 | | ||||
27 | #include "atcore_export.h" | ||||
28 | | ||||
29 | /** | ||||
30 | * @brief The Bed Deform class | ||||
31 | * | ||||
32 | * Read and hold data for the Bed Deformation of the printer | ||||
33 | */ | ||||
34 | | ||||
35 | class ATCORE_EXPORT BedDeform : public QObject | ||||
36 | { | ||||
37 | Q_OBJECT | ||||
38 | Q_PROPERTY(QVariantList bedDeformationGrid READ bedDeformationGrid NOTIFY dataChanged) | ||||
39 | public: | ||||
40 | /** | ||||
41 | * @brief BedDeform Create a new bedDeform object | ||||
42 | * @param parent: Objects parent | ||||
patrickelectric: Can you document this functions ? | |||||
43 | */ | ||||
44 | explicit BedDeform(QObject *parent = nullptr); | ||||
tcanabrava: const ref | |||||
rizzitello: Wouln't be a review if I didn't forget one const Ref :P | |||||
What is data in BedDeform ? What is the unit ? Should this be a QVector3D ? patrickelectric: What is data in BedDeform ? What is the unit ? Should this be a QVector3D ? | |||||
@rizzitello ping ^ patrickelectric: @rizzitello ping ^ | |||||
The data is a list of floats. These floats are how off the Z you are at each probe point, For example my machine has 9 points so i get a list of 9 floats that will be something like 0.25, 0.3 , 0 , 0.01 , .03 .... etc each value is just how high or low the probe is compared to where home was triggered. There is no point data as the grind stops are not returned with the command just that list of N floats, one for each probe point. rizzitello: The data is a list of floats. These floats are how off the Z you are at each probe point, For… | |||||
This Z points doe not provide any useful information without X,Y point information.
Ok, I understand that this is 4 points in Z, but where ? In the corner of the table ? in a 1cm centralized square in the center ? points around the edge of the 3D object that will be printed ? patrickelectric: This Z points doe not provide any useful information without X,Y point information.
e.g:
- My Z… | |||||
I don't know where they will be on your bed. This points are at the locations set when building the firmware, The user can set as many and places each in any spot. I do not know how to get the point locations from the FW. rizzitello: I don't know where they will be on your bed. This points are at the locations set when building… | |||||
I think we should store it as a QVector for now, this will not change existent code, will make it more frigidly to the qml, and also more future proof if the 3D Printer or the profile could provide such point information. patrickelectric: I think we should store it as a QVector for now, this will not change existent code, will make… | |||||
45 | /** | ||||
46 | * @brief decodeDeform Decode the deform list from the provided lines | ||||
47 | * @param rawData: raw returns containing deform data | ||||
48 | */ | ||||
49 | void decodeDeform(const QStringList &rawData); | ||||
50 | /** | ||||
51 | * @brief get bed Deform info | ||||
52 | * @return: bed Deform grid, Variant Format: QList<QList<double>> | ||||
53 | * The Inner QList<double> contains, | ||||
54 | * one row worth of offsets for the deformation grid. | ||||
55 | * the outer list is a list of rows data. | ||||
56 | * For a grid with 2x3 proble points the size of the inner list will be 2 and the outer list 3 | ||||
57 | * example: QVariant(QVariantList, (QVariant(double, 0.25), QVariant(double, 0.225)) | ||||
58 | * ,QVariant(QVariantList, (QVariant(double, 0.045), QVariant(double, 0.01)) | ||||
59 | * , QVariant(QVariantList, (QVariant(double, -0.168), QVariant(double, -0.24))) | ||||
60 | */ | ||||
61 | QVariantList bedDeformationGrid(); | ||||
62 | signals: | ||||
63 | void dataChanged(const QVariantList &data); | ||||
64 | private: | ||||
65 | struct BedDeformPrivate; | ||||
66 | BedDeformPrivate *d; | ||||
67 | }; |
Can you document this functions ?