Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
ToolInformation.h
Go to the documentation of this file.
1#pragma once
2#include <ktm/global.h>
3#include <math/Types.h>
5
6namespace sf
7{
8
13{
14 public:
19
23 inline void clear();
24
25 // Assign all member at once.
26 void assign(double x, double y, double z, double xa, double ya, double za, double len);
27
34 bool read(const IniProfile& ini, const std::string& section = {});
35
41 void write(IniProfile& ini, const std::string& section = {});
42
43 //
44 // Displacement related items.
45 //
46
53 void setDisplacement(double angle_x, double angle_y, double beam_len);
54
59 void setDisplacement(Vector3D v);
60
64 double setDisplacementAngleX() const;
65
69 double setDisplacementAngleY() const;
70
74 double setDisplacementLength() const;
75
79 const Vector3D& getDisplacement() const;
80
81 //
82 // Beam related items.
83 //
84
92 void setBeam(double angle_x, double angle_y, double angle_z, double beam_len);
96 double getBeamAngleX() const;
100 double getBeamAngleY() const;
101
105 double getBeamAngleZ() const;
106
110 double getBeamLength() const;
111
115 const Matrix44& getBeamMatrix() const;
116
117 private:
118 // Displacement in 3D space of when attached to a manipulator.
119 Vector3D _displacement;
120 // Precalculated matrix for faster calculation.
121 Matrix44 _beam;
122 // Displacement angles.
123 double _displacementAngleX;
124 double _displacementAngleY;
125 double _displacementLength;
126 // Holds the deflection angle in around the X-axis of the beam.
127 double _beamAngleX;
128 // Holds the deflection angle in around the Y-axis of the beam.
129 double _beamAngleY;
130 // Holds the deflection angle in around the Z-axis of the beam.
131 double _beamAngleZ;
132 // Holds the length of beam inside the tool.
133 double _beamLength;
134};
135
144Vector3D _KTM_FUNC getToolBeamVector(const ToolInformation& tool, double beam_len, double a, double b);
145
154Vector3D _KTM_FUNC getBeamVector(const ToolInformation& tool, double beam_len, double a, double b);
155
156}// namespace sf
157
158// Include all inlined functions and template implementations.
159#include <ktm/ToolInformation.hpp>
Class for reading and writing ini-profiles.
Definition IniProfile.h:17
Holds the needed information on a tool to make calculations.
Definition ToolInformation.h:13
bool read(const IniProfile &ini, const std::string &section={})
Reads the class data from an ini-profile.
double getBeamAngleX() const
Gets the rotation angle around the Y-axis of the beam when it leaves the tool.
const Vector3D & getDisplacement() const
Gets the displacement 3D vector.
double getBeamAngleY() const
Gets the rotation angle around the Y-axis of the beam when it leaves the tool.
double setDisplacementAngleX() const
Gets the displacement angle around then X-axis when this tool is mounted.
void clear()
Clears all data members.
ToolInformation()
Default constructor.
void setDisplacement(double angle_x, double angle_y, double beam_len)
Sets the displacement using angles and length.
double setDisplacementAngleY() const
Gets the displacement angle around then Y-axis when this tool is mounted.
void assign(double x, double y, double z, double xa, double ya, double za, double len)
void setBeam(double angle_x, double angle_y, double angle_z, double beam_len)
Sets the angles of rotation around the X- and Y-axis when it leaves the tool.
double getBeamLength() const
Gets the length of beam inside the tool.
const Matrix44 & getBeamMatrix() const
Gets the matrix for rotating a beam.
double getBeamAngleZ() const
Gets the rotation angle around the Z-axis of the beam when it leaves the tool.
double setDisplacementLength() const
Gets the displacement angle around then Z-axis when this tool is mounted.
void setDisplacement(Vector3D v)
Sets the displacement using a vector.
void write(IniProfile &ini, const std::string &section={})
Writes the class data to an ini-profile.
#define _KTM_CLASS
Definition ktm/global.h:35
#define _KTM_FUNC
Definition ktm/global.h:34
Definition Application.h:10
Vector3D _KTM_FUNC getBeamVector(const ToolInformation &tool, double beam_len, double a, double b)
Not clear where it is used for.???
Vector3D _KTM_FUNC getToolBeamVector(const ToolInformation &tool, double beam_len, double a, double b)
Gets the vector which can be added to the xyz-axis position vector to get the focus position.