mattercontrol/SlicerConfiguration/Slic3rInfo.cs

44 lines
1.3 KiB
C#
Raw Normal View History

2015-04-08 15:20:10 -07:00
using MatterHackers.MatterControl.DataStorage;
using System.IO;
namespace MatterHackers.MatterControl.SlicerConfiguration
{
public class Slic3rInfo : SliceEngineInfo
{
2015-04-08 15:20:10 -07:00
public Slic3rInfo()
2014-08-20 12:14:45 -07:00
: base("Slic3r")
{
}
2015-04-08 15:20:10 -07:00
public override ActivePrinterProfile.SlicingEngineTypes GetSliceEngineType()
{
return ActivePrinterProfile.SlicingEngineTypes.Slic3r;
}
2015-04-08 15:20:10 -07:00
protected override string getWindowsPath()
{
string slic3rRelativePathWindows = Path.Combine("..", "Slic3r", "slic3r.exe");
if (!File.Exists(slic3rRelativePathWindows))
{
slic3rRelativePathWindows = Path.Combine(".", "Slic3r", "slic3r.exe");
}
return Path.GetFullPath(slic3rRelativePathWindows);
}
2015-04-08 15:20:10 -07:00
protected override string getMacPath()
{
string applicationPath = Path.Combine(ApplicationDataStorage.Instance.ApplicationPath, "Slic3r.app", "Contents", "MacOS", "slic3r");
return applicationPath;
}
2015-04-08 15:20:10 -07:00
protected override string getLinuxPath()
{
string slic3rRelativePathWindows = Path.Combine("..", "Slic3r", "bin","slic3r");
if (!File.Exists(slic3rRelativePathWindows))
{
slic3rRelativePathWindows = Path.Combine(".", "Slic3r", "bin","slic3r");
}
return Path.GetFullPath(slic3rRelativePathWindows);
}
}
2015-04-08 15:20:10 -07:00
}