forked from MatterHackers/MatterSlice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGCodePathConfig.cs
58 lines (50 loc) · 1.84 KB
/
GCodePathConfig.cs
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
/*
This file is part of MatterSlice. A commandline utility for
generating 3D printing GCode.
Copyright (C) 2013 David Braam
Copyright (c) 2014, Lars Brubaker
MatterSlice is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace MatterHackers.MatterSlice
{
/// <summary>
/// Contains the configuration for moves/extrusion actions. This defines at which width the line is printed and at which speed.
/// </summary>
public class GCodePathConfig
{
public bool closedLoop = true;
public bool DoSeamHiding { get; set; }
public string gcodeComment;
public int lineWidth_um;
public double speed;
public bool spiralize;
public GCodePathConfig(string configName)
{
this.Name = configName;
}
public string Name { get; set; }
/// <summary>
/// Set the data for a path config. This is used to define how different parts (infill, perimeters) are written to gcode.
/// </summary>
/// <param name="speed"></param>
/// <param name="lineWidth_um"></param>
/// <param name="gcodeComment"></param>
/// <param name="closedLoop"></param>
public void SetData(double speed, int lineWidth_um, string gcodeComment, bool closedLoop = true)
{
this.closedLoop = closedLoop;
this.speed = speed;
this.lineWidth_um = lineWidth_um;
this.gcodeComment = gcodeComment;
}
}
}