fixing warning - thinking about SCAD
This commit is contained in:
parent
842e9efb80
commit
6a5c4756cc
4 changed files with 15 additions and 11 deletions
|
|
@ -54,7 +54,7 @@ namespace MatterHackers.MatterControl.Library
|
|||
public string Name => "Builder";
|
||||
|
||||
|
||||
private string compilerPath = UserSettings.Instance.get(UserSettingsKey.OpenScadPath) ?? "/usr/bin/openscad";
|
||||
private string compilerPath = UserSettings.Instance.get(UserSettingsKey.OpenScadPath) ?? "C:\\Program Files\\OpenSCAD\\openscad.exe";
|
||||
|
||||
public IEnumerable<Type> SupportedTypes() => new Type[]
|
||||
{
|
||||
|
|
@ -94,7 +94,7 @@ namespace MatterHackers.MatterControl.Library
|
|||
Width = 225
|
||||
};
|
||||
|
||||
FlowLayoutWidget actionButtons = new FlowLayoutWidget();
|
||||
var actionButtons = new FlowLayoutWidget();
|
||||
mainContainer.AddChild(actionButtons);
|
||||
|
||||
// TODO: This should use the same renaming and asset system as stl/amf assets
|
||||
|
|
@ -128,6 +128,7 @@ namespace MatterHackers.MatterControl.Library
|
|||
updateButton.Enabled = false;
|
||||
updateButton.ToolTipText = "OpenSCAD not installed".Localize();
|
||||
}
|
||||
|
||||
updateButton.Click += async (s, e) =>
|
||||
{
|
||||
using (var meshStream = AggContext.StaticData.OpenStream(Path.Combine("Stls", "openscad_logo.stl")))
|
||||
|
|
@ -136,7 +137,8 @@ namespace MatterHackers.MatterControl.Library
|
|||
}
|
||||
|
||||
// TODO: Use assets system
|
||||
string outputPath = Path.ChangeExtension(item.ScriptPath, ".stl");
|
||||
string folderToSaveStlsTo = Path.Combine(ApplicationDataStorage.Instance.ApplicationTempDataPath, "amf_to_stl");
|
||||
string outputPath = Path.Combine(folderToSaveStlsTo, Path.ChangeExtension(Path.GetFileName(item.ScriptPath), ".stl"));
|
||||
int err = await Task.Run(() => ExecuteScript(item.ScriptPath, outputPath));
|
||||
|
||||
if (err == 0)
|
||||
|
|
|
|||
|
|
@ -35,8 +35,11 @@ namespace MatterHackers.MatterControl.Library
|
|||
public class OpenScadObject3D : Object3D
|
||||
{
|
||||
public string AssetName { get; set; }
|
||||
|
||||
public string AssetUrl { get; set; }
|
||||
public Dictionary<string, string> Variables = new Dictionary<string, string>();
|
||||
|
||||
public Dictionary<string, string> Variables { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
public string ScriptPath { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,8 +27,9 @@ of the authors and should not be interpreted as representing official policies,
|
|||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using MatterHackers.Agg.Font;
|
||||
using MatterHackers.Agg.Transform;
|
||||
using MatterHackers.Agg.UI;
|
||||
|
|
@ -36,14 +37,11 @@ using MatterHackers.Agg.VertexSource;
|
|||
using MatterHackers.DataConverters3D;
|
||||
using MatterHackers.DataConverters3D.UndoCommands;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.CustomWidgets;
|
||||
using MatterHackers.MatterControl.DesignTools.Operations;
|
||||
using MatterHackers.PolygonMesh;
|
||||
using MatterHackers.VectorMath;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using MatterHackers.PolygonMesh;
|
||||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
|
|
@ -91,7 +89,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
|
||||
[Sortable]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public NamedTypeFace Font { get; set; } = new NamedTypeFace();
|
||||
public NamedTypeFace Font { get; set; } = NamedTypeFace.Nunito_Bold;
|
||||
|
||||
public override bool CanFlatten => true;
|
||||
|
||||
|
|
@ -108,6 +106,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
clone.Name = MapIfSymbol(newName);
|
||||
newContainer.Children.Add(clone);
|
||||
}
|
||||
|
||||
undoBuffer.AddAndDo(new ReplaceCommand(new[] { this }, new[] { newContainer }));
|
||||
newContainer.Name = this.Name + " - " + "Flattened".Localize();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit b02734921cc7768e5a9c546bd69bc415195d2823
|
||||
Subproject commit 97b31c19c67f1698bf3a4bec8a9211eb704f6c3a
|
||||
Loading…
Add table
Add a link
Reference in a new issue