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 CuraEngineInfo : SliceEngineInfo
|
|
|
|
|
|
{
|
|
|
|
|
|
public CuraEngineInfo()
|
2015-04-08 15:20:10 -07:00
|
|
|
|
: base("CuraEngine")
|
2014-08-19 18:08:40 -07:00
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
public override ActivePrinterProfile.SlicingEngineTypes GetSliceEngineType()
|
|
|
|
|
|
{
|
|
|
|
|
|
return ActivePrinterProfile.SlicingEngineTypes.CuraEngine;
|
|
|
|
|
|
}
|
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 curaEngineRelativePath = Path.Combine("..", "CuraEngine.exe");
|
|
|
|
|
|
if (!File.Exists(curaEngineRelativePath))
|
|
|
|
|
|
{
|
|
|
|
|
|
curaEngineRelativePath = Path.Combine(".", "CuraEngine.exe");
|
|
|
|
|
|
}
|
|
|
|
|
|
return Path.GetFullPath(curaEngineRelativePath);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
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, "CuraEngine");
|
|
|
|
|
|
return applicationPath;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
protected override string getLinuxPath()
|
2014-08-19 18:08:40 -07:00
|
|
|
|
{
|
|
|
|
|
|
string curaEngineRelativePath = Path.Combine("..", "CuraEngine.exe");
|
|
|
|
|
|
if (!File.Exists(curaEngineRelativePath))
|
|
|
|
|
|
{
|
|
|
|
|
|
curaEngineRelativePath = Path.Combine(".", "CuraEngine.exe");
|
|
|
|
|
|
}
|
|
|
|
|
|
return Path.GetFullPath(curaEngineRelativePath);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|