mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
added support Machinekit flavour GCode
This commit is contained in:
@@ -380,12 +380,14 @@ PrintConfigDef::build_def() {
|
||||
Options["gcode_flavor"].enum_values.push_back("makerware");
|
||||
Options["gcode_flavor"].enum_values.push_back("sailfish");
|
||||
Options["gcode_flavor"].enum_values.push_back("mach3");
|
||||
Options["gcode_flavor"].enum_values.push_back("machinekit");
|
||||
Options["gcode_flavor"].enum_values.push_back("no-extrusion");
|
||||
Options["gcode_flavor"].enum_labels.push_back("RepRap (Marlin/Sprinter/Repetier)");
|
||||
Options["gcode_flavor"].enum_labels.push_back("Teacup");
|
||||
Options["gcode_flavor"].enum_labels.push_back("MakerWare (MakerBot)");
|
||||
Options["gcode_flavor"].enum_labels.push_back("Sailfish (MakerBot)");
|
||||
Options["gcode_flavor"].enum_labels.push_back("Mach3/LinuxCNC");
|
||||
Options["gcode_flavor"].enum_labels.push_back("Machinekit");
|
||||
Options["gcode_flavor"].enum_labels.push_back("No extrusion");
|
||||
|
||||
Options["infill_acceleration"].type = coFloat;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
namespace Slic3r {
|
||||
|
||||
enum GCodeFlavor {
|
||||
gcfRepRap, gcfTeacup, gcfMakerWare, gcfSailfish, gcfMach3, gcfNoExtrusion,
|
||||
gcfRepRap, gcfTeacup, gcfMakerWare, gcfSailfish, gcfMach3, gcfMachinekit, gcfNoExtrusion,
|
||||
};
|
||||
|
||||
enum InfillPattern {
|
||||
@@ -29,6 +29,7 @@ template<> inline t_config_enum_values ConfigOptionEnum<GCodeFlavor>::get_enum_v
|
||||
keys_map["makerware"] = gcfMakerWare;
|
||||
keys_map["sailfish"] = gcfSailfish;
|
||||
keys_map["mach3"] = gcfMach3;
|
||||
keys_map["machinekit"] = gcfMachinekit;
|
||||
keys_map["no-extrusion"] = gcfNoExtrusion;
|
||||
return keys_map;
|
||||
}
|
||||
@@ -410,7 +411,7 @@ class GCodeConfig : public virtual StaticPrintConfig
|
||||
|
||||
std::string get_extrusion_axis() const
|
||||
{
|
||||
if (this->gcode_flavor.value == gcfMach3) {
|
||||
if ((this->gcode_flavor.value == gcfMach3) || (this->gcode_flavor.value == gcfMachinekit)) {
|
||||
return "A";
|
||||
} else if (this->gcode_flavor.value == gcfNoExtrusion) {
|
||||
return "";
|
||||
|
||||
@@ -4,7 +4,7 @@ use strict;
|
||||
use warnings;
|
||||
|
||||
use Slic3r::XS;
|
||||
use Test::More tests => 108;
|
||||
use Test::More tests => 110;
|
||||
|
||||
foreach my $config (Slic3r::Config->new, Slic3r::Config::Full->new) {
|
||||
$config->set('layer_height', 0.3);
|
||||
@@ -51,6 +51,8 @@ foreach my $config (Slic3r::Config->new, Slic3r::Config::Full->new) {
|
||||
is $config->serialize('gcode_flavor'), 'teacup', 'serialize enum';
|
||||
$config->set_deserialize('gcode_flavor', 'mach3');
|
||||
is $config->get('gcode_flavor'), 'mach3', 'deserialize enum (gcode_flavor)';
|
||||
$config->set_deserialize('gcode_flavor', 'machinekit');
|
||||
is $config->get('gcode_flavor'), 'machinekit', 'deserialize enum (gcode_flavor)';
|
||||
|
||||
$config->set_deserialize('fill_pattern', 'line');
|
||||
is $config->get('fill_pattern'), 'line', 'deserialize enum (fill_pattern)';
|
||||
|
||||
Reference in New Issue
Block a user