Getting extruder selection to work on mcx files

This commit is contained in:
Lars Brubaker 2017-07-12 14:28:43 -07:00
parent cf17b749d4
commit a01ab7930d
7 changed files with 72 additions and 76 deletions

View file

@ -164,8 +164,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
{
foreach (Mesh mesh in meshGroup.Meshes)
{
MeshMaterialData material = MeshMaterialData.Get(mesh);
int extruderIndex = Math.Max(0, material.MaterialIndex - 1);
MeshExtruderData material = MeshExtruderData.Get(mesh);
int extruderIndex = Math.Max(0, material.ExtruderIndex - 1);
maxExtruderIndex = Math.Max(maxExtruderIndex, extruderIndex);
if (extruderIndex >= extruderCount)
{
@ -216,8 +216,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
mergeRules += ",{0}".FormatWith(savedStlCount);
}
}
int currentMeshMaterialIntdex = MeshMaterialData.Get(mesh).MaterialIndex;
if (materialsToInclude.Contains(currentMeshMaterialIntdex))
int meshExtruderIndex = MeshExtruderData.Get(mesh).ExtruderIndex;
if (materialsToInclude.Contains(meshExtruderIndex))
{
extruderFilesToSlice.Add(SaveAndGetFilePathForMesh(mesh));
}
@ -285,13 +285,13 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
filePath,
new MeshOutputSettings()
{
MaterialIndexsToSave = materialIndexsToSaveInThisSTL
ExtruderIndexesToSave = materialIndexsToSaveInThisSTL
});
return filePath;
}
public static bool runInProcess = false;
public static bool runInProcess = true;
private static Process slicerProcess = null;
private class SliceMessageReporter : IProgress<string>