2015-04-08 15:20:10 -07:00
|
|
|
|
using MatterHackers.MatterControl.DataStorage;
|
2014-08-19 18:08:40 -07:00
|
|
|
|
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")
|
2014-08-19 18:08:40 -07:00
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
public override ActivePrinterProfile.SlicingEngineTypes GetSliceEngineType()
|
|
|
|
|
|
{
|
|
|
|
|
|
return ActivePrinterProfile.SlicingEngineTypes.Slic3r;
|
|
|
|
|
|
}
|
2014-08-20 10:52:47 -07:00
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
protected override string getWindowsPath()
|
2014-08-19 18:08:40 -07:00
|
|
|
|
{
|
|
|
|
|
|
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()
|
2014-08-19 18:08:40 -07:00
|
|
|
|
{
|
|
|
|
|
|
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()
|
2014-08-19 18:08:40 -07:00
|
|
|
|
{
|
2015-06-16 12:35:15 -07:00
|
|
|
|
string slic3rRelativePathWindows = Path.Combine("..", "Slic3r", "bin","slic3r");
|
2014-08-19 18:08:40 -07:00
|
|
|
|
if (!File.Exists(slic3rRelativePathWindows))
|
|
|
|
|
|
{
|
2015-06-16 12:35:15 -07:00
|
|
|
|
slic3rRelativePathWindows = Path.Combine(".", "Slic3r", "bin","slic3r");
|
2014-08-19 18:08:40 -07:00
|
|
|
|
}
|
|
|
|
|
|
return Path.GetFullPath(slic3rRelativePathWindows);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|