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
|
#include "opticaldesign.h"
// qt
#include <QSize>
OpticalDesign::OpticalDesign(QObject* parent)
: goodies::G_Object{parent}
{
const auto emitActualZBaseTextChanged = [this]() {
emit actualZBaseTextChanged(actualZBaseText());
};
connect(
this,
qOverload<>(&OpticalDesign::actualZBaseMmChanged),
this,
emitActualZBaseTextChanged
);
connect(
this,
qOverload<>(&OpticalDesign::scannerBodyFrontWallOffsetMmChanged),
this,
emitActualZBaseTextChanged
);
connect(
this,
qOverload<>(&OpticalDesign::scannerBodyWallThicknessMmChanged),
this,
emitActualZBaseTextChanged
);
}
void OpticalDesign::calculate() const
{
const auto F = get_focalDistanceMm();
const auto w = get_sensorPixelsWidth();
const auto h = get_sensorPixelsHeight();
const auto wMm = get_sensorWidthMm();
const auto hMm = get_sensorHeightMm();
const auto oAngle = get_opticalAxisAngleDegrees();
}
/*
double OpticalDesign::fullBodyOffset() const
{
return get_scannerBodyFrontWallOffsetMm() -
get_scannerBodyWallThicknessMm();
}
*/
QString OpticalDesign::actualZBaseText() const
{
constexpr int decimals{2};
return QStringLiteral("%1 (%2)")
.arg(get_actualZBaseMm(), 0, 'f', decimals)
.arg(
get_actualZBaseMm() + get_scannerBodyFrontWallOffsetMm() -
get_scannerBodyWallThicknessMm(),
0,
'f',
decimals
);
}
|