forked from Ultimaker/CuraEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.h
105 lines (90 loc) · 2.81 KB
/
settings.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#ifndef SETTINGS_H
#define SETTINGS_H
#include <utils/floatpoint.h>
#include <vector>
class _ConfigSettingIndex
{
public:
const char* key;
int* ptr;
_ConfigSettingIndex(const char* key, int* ptr) : key(key), ptr(ptr) {}
};
#define FIX_HORRIBLE_UNION_ALL_TYPE_A 0x01
#define FIX_HORRIBLE_UNION_ALL_TYPE_B 0x02
#define FIX_HORRIBLE_EXTENSIVE_STITCHING 0x04
#define FIX_HORRIBLE_KEEP_NONE_CLOSED 0x10
/**
* RepRap flavored GCode is Marlin/Sprinter/Repetier based GCode.
* This is the most commonly used GCode set.
* G0 for moves, G1 for extrusion.
* E values give mm of filament extrusion.
* Retraction is done on E values with G1. Start/end code is added.
* M106 Sxxx and M107 are used to turn the fan on/off.
**/
#define GCODE_FLAVOR_REPRAP 0
/**
* UltiGCode flavored is Marlin based GCode.
* UltiGCode uses less settings on the slicer and puts more settings in the firmware. This makes for more hardware/material independed GCode.
* G0 for moves, G1 for extrusion.
* E values give mm^3 of filament extrusion. Ignores the filament diameter setting.
* Retraction is done with G10 and G11. Retraction settings are ignored. G10 S1 is used for multi-extruder switch retraction.
* Start/end code is not added.
* M106 Sxxx and M107 are used to turn the fan on/off.
**/
#define GCODE_FLAVOR_ULTIGCODE 1
class ConfigSettings
{
private:
std::vector<_ConfigSettingIndex> _index;
public:
int layerThickness;
int initialLayerThickness;
int filamentDiameter;
int filamentFlow;
int extrusionWidth;
int insetCount;
int downSkinCount;
int upSkinCount;
int sparseInfillLineDistance;
int infillOverlap;
int skirtDistance;
int skirtLineCount;
int retractionAmount;
int retractionAmountExtruderSwitch;
int retractionSpeed;
int multiVolumeOverlap;
int initialSpeedupLayers;
int initialLayerSpeed;
int printSpeed;
int infillSpeed;
int moveSpeed;
int fanOnLayerNr;
//Support material
int supportAngle;
int supportEverywhere;
int supportLineWidth;
//Cool settings
int minimalLayerTime;
int minimalFeedrate;
int coolHeadLift;
int fanSpeedMin;
int fanSpeedMax;
//Raft settings
int raftMargin;
int raftLineSpacing;
int raftBaseThickness;
int raftBaseLinewidth;
int raftInterfaceThickness;
int raftInterfaceLinewidth;
FMatrix3x3 matrix;
IntPoint objectPosition;
int objectSink;
int fixHorrible;
int gcodeFlavor;
IntPoint extruderOffset[16];
const char* startCode;
const char* endCode;
ConfigSettings();
bool setSetting(const char* key, const char* value);
};
#endif//SETTINGS_H