-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement basic translation from gcode ast to command list
CURA-10561
- Loading branch information
1 parent
3681de5
commit 13dda18
Showing
9 changed files
with
458 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifndef INCLUDE_DULCIFICUM_GCODE_TO_COMMAND_H | ||
#define INCLUDE_DULCIFICUM_GCODE_TO_COMMAND_H | ||
|
||
#include "dulcificum/gcode/ast/ast.h" | ||
#include "dulcificum/command_types.h" | ||
|
||
namespace dulcificum::gcode | ||
{ | ||
|
||
botcmd::CommandList toCommand(gcode::ast::ast_t& gcode); | ||
|
||
} // namespace dulcificum::gcode | ||
|
||
#endif // INCLUDE_DULCIFICUM_GCODE_TO_COMMAND_H |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#ifndef INCLUDE_DULCIFICUM_STATE_H | ||
#define INCLUDE_DULCIFICUM_STATE_H | ||
|
||
#include <cstddef> | ||
#include <map> | ||
#include <memory> | ||
#include <string_view> | ||
#include <variant> | ||
#include <vector> | ||
#include <set> | ||
|
||
namespace dulcificum | ||
{ | ||
|
||
enum class Positioning | ||
{ | ||
Absolute, | ||
Relative, | ||
}; | ||
|
||
struct State | ||
{ | ||
unsigned int num_extruders{ 2 }; | ||
unsigned int active_tool{ 0 }; | ||
|
||
unsigned int layer{ 0 }; | ||
std::string_view mesh{ "" }; | ||
std::string_view feature_type{ "" }; | ||
|
||
// needed for g92 commands, which set the current position | ||
// of the extruder, and thereby changing the origin | ||
double origin_x{ 0.0 }; | ||
double origin_y{ 0.0 }; | ||
double origin_z{ 0.0 }; | ||
|
||
double X{ 0.0 }; | ||
Positioning X_positioning{ Positioning::Absolute }; | ||
|
||
double Y{ 0.0 }; | ||
Positioning Y_positioning{ Positioning::Absolute }; | ||
|
||
double Z{ 0.0 }; | ||
Positioning Z_positioning{ Positioning::Absolute }; | ||
|
||
std::vector<double> E = std::vector<double>(num_extruders, 0.0); | ||
Positioning E_positioning{ Positioning::Absolute }; | ||
|
||
std::vector<double> F = std::vector<double>(num_extruders, 0.0); | ||
|
||
std::vector<double> extruder_temperatures = std::vector<double>(num_extruders, 0.0); | ||
|
||
double fan_speed { 0.0 }; | ||
|
||
double build_plate_temperature{ 0.0 }; | ||
|
||
double chamber_temperature{ 0.0 }; | ||
}; | ||
|
||
using state_t = State; | ||
|
||
} // namespace dulcificum | ||
|
||
#endif // INCLUDE_DULCIFICUM_STATE_H |
Oops, something went wrong.