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
33 void read(IniProfile& ini, const std::string& section = {});
34
40 void write(IniProfile& ini, const std::string& section = {});
41
42 //
43 // Displacement related items.
44 //
45
52 void setDisplacement(double angle_x, double angle_y, double beam_len);
53
58 void setDisplacement(Vector3D v);
59
63 double setDisplacementAngleX() const;
64
68 double setDisplacementAngleY() const;
69
73 double setDisplacementLength() const;
74
78 const Vector3D& getDisplacement() const;
79
80 //
81 // Beam related items.
82 //
83
91 void setBeam(double angle_x, double angle_y, double angle_z, double beam_len);
95 double getBeamAngleX() const;
99 double getBeamAngleY() const;
100
104 double getBeamAngleZ() const;
105
109 double getBeamLength() const;
110
114 const Matrix44& getBeamMatrix() const;
115
116 private:
117 // Displacement in 3D space of when attached to a manipulator.
118 Vector3D _displacement;
119 // Precalculated matrix for faster calculation.
120 Matrix44 _beam;
121 // Displacement angles.
122 double _displacementAngleX;
123 double _displacementAngleY;
124 double _displacementLength;
125 // Holds the deflection angle in around the X-axis of the beam.
126 double _beamAngleX;
127 // Holds the deflection angle in around the Y-axis of the beam.
128 double _beamAngleY;
129 // Holds the deflection angle in around the Z-axis of the beam.
130 double _beamAngleZ;
131 // Holds the length of beam inside the tool.
132 double _beamLength;
133};
134
143Vector3D _KTM_FUNC getToolBeamVector(const ToolInformation& tool, double beam_len, double a, double b);
144
153Vector3D _KTM_FUNC getBeamVector(const ToolInformation& tool, double beam_len, double a, double b);
154
155}// namespace sf
156
157// Include all inlined functions and template implementations.
158#include <ktm/ToolInformation.hpp>
Class for reading and writing ini-profiles.
Definition IniProfile.h:16
Holds the needed information on a tool to make calculations.
Definition ToolInformation.h:13
double getBeamAngleX() const
Gets the rotation angle around the Y-axis of the beam when it leaves the tool.
void read(IniProfile &ini, const std::string &section={})
Reads the class data from an ini-profile.
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.