Design tools

This commit is contained in:
John Lewin 2017-03-15 16:17:06 -07:00
parent 69a77368b5
commit 907609b587
86 changed files with 4971 additions and 4664 deletions

View file

@ -88,7 +88,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
};
public SliceEngineMapping(string engineName)
{
{
this.Name = engineName;
}

View file

@ -95,6 +95,9 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
new ScaledSingleNumber("support_material_xy_distance", "supportXYDistance", 1000),
new ScaledSingleNumber("support_material_z_distance", "supportZDistance", 1000),
// This needs to be passed to cura (but not matter slice). The actual value is set in "support_material", "supportAngle" but is found in this value.
new VisibleButNotMappedToEngine("support_material_threshold"),
new SupportTypeMapping("support_type", "supportType"),
new MappedSetting("slowdown_below_layer_time", "minimalLayerTime"),

View file

@ -1,6 +1,7 @@
using MatterHackers.Agg;
using MatterHackers.Agg.PlatformAbstract;
using MatterHackers.Agg.UI;
using MatterHackers.DataConverters3D;
using MatterHackers.Localizations;
using MatterHackers.MatterControl.DataStorage;
using MatterHackers.MatterControl.PrintQueue;
@ -203,8 +204,10 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
extrudersUsed[0] = true;
return new string[] { fileToSlice };
case ".MCX":
case ".AMF":
List<MeshGroup> meshGroups = MeshFileIo.Load(fileToSlice);
// TODO: Once graph parsing is added to MatterSlice we can remove and avoid this flattening
List<MeshGroup> meshGroups = new List<MeshGroup> { Object3D.Load(fileToSlice).Flatten() };
if (meshGroups != null)
{
List<MeshGroup> extruderMeshGroups = new List<MeshGroup>();
@ -251,7 +254,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
if (doMergeInSlicer)
{
int meshCount = meshGroup.Meshes.Count;
for (int meshIndex =0; meshIndex< meshCount; meshIndex++)
for (int meshIndex =0; meshIndex< meshCount; meshIndex++)
{
Mesh mesh = meshGroup.Meshes[meshIndex];
if ((meshIndex % 2) == 0)
@ -318,8 +321,12 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
{
Directory.CreateDirectory(folderToSaveStlsTo);
}
MeshOutputSettings settings = new MeshOutputSettings();
settings.MaterialIndexsToSave = materialIndexsToSaveInThisSTL;
MeshOutputSettings settings = new MeshOutputSettings()
{
MaterialIndexsToSave = materialIndexsToSaveInThisSTL
};
string extruder1StlFileToSlice = Path.Combine(folderToSaveStlsTo, fileName);
MeshFileIo.Save(extruderMeshGroup, extruder1StlFileToSlice, settings);
return extruder1StlFileToSlice;
@ -340,7 +347,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
bool doMergeInSlicer = false;
string mergeRules = "";
doMergeInSlicer = ActiveSliceSettings.Instance.Helpers.ActiveSliceEngineType() == SlicingEngineTypes.MatterSlice;
string[] stlFileLocations = GetStlFileLocations(itemToSlice.FileLocation, doMergeInSlicer, ref mergeRules);
string[] stlFileLocations = GetStlFileLocations(itemToSlice.FileLocation, doMergeInSlicer, ref mergeRules);
string fileToSlice = stlFileLocations[0];
// check that the STL file is currently on disk
if (File.Exists(fileToSlice))