20 template<
typename Vec>
36 float feedrate = 100.f;
39 operator bool()
const {
return valid(); }
74 static void parseFrame_(
const std::string_view& frame, std::vector<Command> & outCommands );
75 void applyCommand_(
const Command& command );
76 void applyCommandG_(
const Command& command );
77 MoveAction generateMoveAction_();
78 MoveAction generateReturnToHomeAction_();
79 void resetTemporaryStates_();
86 MoveAction moveArc_(
const Vector3f& newPoint,
const Vector3f& newAngles,
bool clockwise );
89 void updateWorkPlane_( WorkPlane wp );
92 void updateScaling_();
97 BaseAction2f getArcPoints2_(
const Vector2f& beginPoint,
const Vector2f& endPoint,
bool clockwise );
99 BaseAction3f getArcPoints3_(
const Vector3f& center,
const Vector3f& beginPoint,
const Vector3f& endPoint,
bool clockwise );
103 BaseAction3f getArcPoints3_(
float r,
const Vector3f& beginPoint,
const Vector3f& endPoint,
bool clockwise );
106 MoveAction getToolRotationPoints_(
const Vector3f& newRotationAngles );
111 void updateRotationAngleAndMatrix_(
const Vector3f& rotationAngles );
134 CoordType coordType_ = CoordType::Movement;
135 MoveMode moveMode_ = MoveMode::Idle;
136 WorkPlane workPlane_ = WorkPlane::xy;
140 bool absoluteCoordinates_ =
true;
141 Vector3f scaling_ = Vector3f::diagonal( 1.f );
142 bool inches_ =
false;
143 float feedrate_ = 100.f;
144 float feedrateMax_ = 0.f;
147 std::array<Matrix3f, 3> cacheRotationMatrix_;
152 std::optional<float> radius_;
153 std::optional<Vector3f> arcCenter_;
157 std::vector<std::string_view> gcodeSource_;
160 float accuracy_ = 1.e-3f;
161 CNCMachineSettings cncSettings_;
162 std::vector<int> rotationAxesOrderMap_ = {0, 1, 2};
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
#define MRMESH_CLASS
Definition MRMesh/MRMeshFwd.h:50
class with CNC machine emulation settings
Definition MRCNCMachineSettings.h:14
Definition MRGcodeProcessor.h:17
MRMESH_API MoveAction processLine(const std::string_view &line, std::vector< Command > &externalStorage)
const CNCMachineSettings & getCNCMachineSettings()
Definition MRGcodeProcessor.h:63
MRMESH_API void setCNCMachineSettings(const CNCMachineSettings &settings)
MRMESH_API std::vector< MoveAction > processSource()
MRMESH_API void setGcodeSource(const GcodeSource &gcodeSource)
arbitrary 3x3 matrix
Definition MRDotNet/MRMatrix3.h:8
represents a 3-dimentional float-typed vector
Definition MRDotNet/MRVector3.h:8
Definition MRCameraOrientationPlugin.h:8
std::vector< std::string > GcodeSource
Definition MRMesh/MRMeshFwd.h:517
MRMESH_CLASS Vector3b
Definition MRMesh/MRMeshFwd.h:137
Definition MRGcodeProcessor.h:22
std::vector< Vec > path
Definition MRGcodeProcessor.h:24
std::string warning
Definition MRGcodeProcessor.h:26
Definition MRGcodeProcessor.h:52
float value
Definition MRGcodeProcessor.h:54
char key
Definition MRGcodeProcessor.h:53
Definition MRGcodeProcessor.h:32
std::vector< Vector3f > toolDirection
Definition MRGcodeProcessor.h:34
bool valid() const
Definition MRGcodeProcessor.h:38
BaseAction3f action
Definition MRGcodeProcessor.h:33