Merge pull request #4312 from jlewin/master
Use inverse transform on currentPos
This commit is contained in:
commit
80502c2407
6 changed files with 187 additions and 111 deletions
|
|
@ -676,7 +676,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
}
|
||||
}
|
||||
|
||||
public IEnumerable<PrinterSettingsLayer> defaultLayerCascade
|
||||
private IEnumerable<PrinterSettingsLayer> defaultLayerCascade
|
||||
{
|
||||
get
|
||||
{
|
||||
|
|
@ -703,6 +703,9 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
yield return this.BaseLayer;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<PrinterSettingsLayer> GetDefaultLayerCascade() => defaultLayerCascade;
|
||||
|
||||
[JsonIgnore]
|
||||
public SettingsHelpers Helpers { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -50,8 +50,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
static CalibrationLine()
|
||||
{
|
||||
int glyphCenter = glyphSize / 2;
|
||||
CalibrationLine.CreateGlyphs(glyphCenter);
|
||||
CalibrationLine.CreateGlyphs();
|
||||
}
|
||||
|
||||
public CalibrationLine(FlowDirection parentDirection, int glyphIndex, ThemeConfig theme)
|
||||
|
|
@ -131,13 +130,13 @@ namespace MatterHackers.MatterControl
|
|||
var centerX = this.LocalBounds.XCenter + .5;
|
||||
var centerY = this.LocalBounds.YCenter - .5;
|
||||
|
||||
var start = new Vector2(centerX, (glyph == null) ? 20 : 9);
|
||||
var start = new Vector2(centerX, (glyph == null) ? 20 : (this.IsNegative) ? 6 : 9 );
|
||||
var end = new Vector2(centerX, this.LocalBounds.Height);
|
||||
|
||||
if (!verticalLine)
|
||||
{
|
||||
start = new Vector2(0, centerY);
|
||||
end = new Vector2(this.LocalBounds.Width - ((glyph == null) ? 20 : 9), centerY);
|
||||
end = new Vector2(this.LocalBounds.Width - ((glyph == null) ? 20 : (this.IsNegative) ? 6 : 9), centerY);
|
||||
}
|
||||
|
||||
graphics2D.Line(start, end, lineColor, 1);
|
||||
|
|
@ -145,73 +144,66 @@ namespace MatterHackers.MatterControl
|
|||
// Draw line end
|
||||
if (glyph != null)
|
||||
{
|
||||
int offset = IsNegative ? 18 : 11;
|
||||
|
||||
graphics2D.Render(
|
||||
glyph,
|
||||
verticalLine ? new Vector2(centerX, 11) : new Vector2(this.Width - 11, centerY),
|
||||
verticalLine ? new Vector2(centerX, offset) : new Vector2(this.Width - offset, centerY),
|
||||
lineColor);
|
||||
}
|
||||
|
||||
// Draw negative adornment after glyphs
|
||||
if (glyph != null
|
||||
&& this.IsNegative)
|
||||
{
|
||||
graphics2D.Line(
|
||||
verticalLine ? new Vector2(centerX, 0) : new Vector2(this.Width - 5, centerY),
|
||||
verticalLine ? new Vector2(centerX, 5) : new Vector2(this.Width, centerY),
|
||||
lineColor,
|
||||
1);
|
||||
}
|
||||
|
||||
base.OnDraw(graphics2D);
|
||||
}
|
||||
|
||||
private static void CreateGlyphs(int glyphCenter)
|
||||
private static void CreateGlyphs()
|
||||
{
|
||||
Glyphs = new Dictionary<int, IVertexSource>();
|
||||
|
||||
var half = -(glyphSize / 2);
|
||||
var half = glyphSize / 2;
|
||||
|
||||
var triangle = new VertexStorage();
|
||||
triangle.MoveTo(0, 0);
|
||||
triangle.MoveTo(half, glyphSize);
|
||||
triangle.LineTo(0, 0);
|
||||
triangle.LineTo(glyphSize, 0);
|
||||
triangle.LineTo(glyphSize / 2, glyphSize);
|
||||
triangle.LineTo(half, glyphSize);
|
||||
triangle.ClosePolygon();
|
||||
|
||||
//triangle.ClosePolygon();
|
||||
|
||||
var square = new VertexStorage();
|
||||
square.MoveTo(0, 0);
|
||||
square.MoveTo(half, glyphSize);
|
||||
square.LineTo(0, glyphSize);
|
||||
square.LineTo(0, 0);
|
||||
square.LineTo(glyphSize, 0);
|
||||
square.LineTo(glyphSize, glyphSize);
|
||||
square.LineTo(0, glyphSize);
|
||||
square.LineTo(half, glyphSize);
|
||||
square.ClosePolygon();
|
||||
|
||||
var diamond = new VertexStorage();
|
||||
diamond.MoveTo(glyphCenter, 0);
|
||||
diamond.LineTo(glyphSize, glyphCenter);
|
||||
diamond.LineTo(glyphCenter, glyphSize);
|
||||
diamond.LineTo(0, glyphCenter);
|
||||
diamond.MoveTo(half, glyphSize);
|
||||
diamond.LineTo(0, half);
|
||||
diamond.LineTo(half, 0);
|
||||
diamond.LineTo(glyphSize, half);
|
||||
diamond.LineTo(half, glyphSize);
|
||||
diamond.ClosePolygon();
|
||||
|
||||
var circle = new Ellipse(new Vector2(glyphCenter, glyphCenter), glyphCenter);
|
||||
var circle = new Ellipse(Vector2.Zero, half).Rotate(90, AngleType.Degrees).Translate(half, half);
|
||||
|
||||
var center = new VertexStorage();
|
||||
center.MoveTo(0, 0);
|
||||
center.LineTo(glyphCenter, glyphSize);
|
||||
center.LineTo(glyphSize, 0);
|
||||
center.LineTo(glyphCenter, glyphSize - 4);
|
||||
center.LineTo(0, 0);
|
||||
center.ClosePolygon();
|
||||
var chevron = new VertexStorage();
|
||||
chevron.MoveTo(half, glyphSize);
|
||||
chevron.LineTo(0, 0);
|
||||
chevron.LineTo(half, glyphSize - 4);
|
||||
chevron.LineTo(glyphSize, 0);
|
||||
chevron.LineTo(half, glyphSize);
|
||||
chevron.ClosePolygon();
|
||||
|
||||
var transform = Affine.NewTranslation(-glyphSize / 2, -glyphSize);
|
||||
Glyphs.Add(0, new VertexSourceApplyTransform(triangle, transform));
|
||||
Glyphs.Add(5, new VertexSourceApplyTransform(diamond, transform));
|
||||
Glyphs.Add(10, new VertexSourceApplyTransform(square, transform));
|
||||
Glyphs.Add(15, new VertexSourceApplyTransform(circle, transform));
|
||||
Glyphs.Add(15, new VertexSourceApplyTransform(chevron, transform));
|
||||
|
||||
Glyphs.Add(20, new VertexSourceApplyTransform(center, transform));
|
||||
Glyphs.Add(20, new VertexSourceApplyTransform(circle, transform));
|
||||
|
||||
Glyphs.Add(25, new VertexSourceApplyTransform(circle, transform));
|
||||
Glyphs.Add(25, new VertexSourceApplyTransform(chevron, transform));
|
||||
Glyphs.Add(30, new VertexSourceApplyTransform(square, transform));
|
||||
Glyphs.Add(35, new VertexSourceApplyTransform(diamond, transform));
|
||||
Glyphs.Add(40, new VertexSourceApplyTransform(triangle, transform));
|
||||
|
|
|
|||
|
|
@ -44,8 +44,9 @@ namespace MatterHackers.MatterControl
|
|||
private StringBuilder sb;
|
||||
private StringWriter writer;
|
||||
private double currentE = 0;
|
||||
|
||||
public Affine Transform { get; set; } = Affine.NewIdentity();
|
||||
private bool retracted = false;
|
||||
private double currentSpeed = 0;
|
||||
private double layerHeight = 0.2;
|
||||
|
||||
public GCodeSketch()
|
||||
{
|
||||
|
|
@ -53,22 +54,19 @@ namespace MatterHackers.MatterControl
|
|||
writer = new StringWriter(sb);
|
||||
}
|
||||
|
||||
public double RetractLength { get; set; } = 1.2;
|
||||
|
||||
public double RetractSpeed { get; set; }
|
||||
|
||||
public double TravelSpeed { get; set; }
|
||||
|
||||
public Vector2 CurrentPosition { get; private set; }
|
||||
|
||||
private int _speed = 1500;
|
||||
public Affine Transform { get; set; } = Affine.NewIdentity();
|
||||
|
||||
public int Speed
|
||||
{
|
||||
get => _speed;
|
||||
set
|
||||
{
|
||||
if (value != _speed)
|
||||
{
|
||||
_speed = value;
|
||||
writer.WriteLine("G1 F{0}", _speed);
|
||||
}
|
||||
}
|
||||
}
|
||||
public double Speed { get; set; } = 1500;
|
||||
|
||||
public double RetractLift { get; internal set; }
|
||||
|
||||
public void SetTool(string toolChange)
|
||||
{
|
||||
|
|
@ -81,32 +79,61 @@ namespace MatterHackers.MatterControl
|
|||
this.MoveTo(new Vector2(x, y), retract);
|
||||
}
|
||||
|
||||
private double retractAmount = 1.2;
|
||||
private bool retracted = false;
|
||||
|
||||
public void MoveTo(Vector2 position, bool retract = false)
|
||||
{
|
||||
//if (retract)
|
||||
//{
|
||||
// currentE -= retractAmount;
|
||||
// retracted = true;
|
||||
// writer.WriteLine("G1 E{0:0.###}", currentE);
|
||||
//}
|
||||
if (retract)
|
||||
{
|
||||
this.Retract();
|
||||
}
|
||||
|
||||
position = Transform.Transform(position);
|
||||
|
||||
writer.WriteLine("G1 X{0:0.###} Y{1:0.###}", position.X, position.Y);
|
||||
this.WriteSpeedLine(
|
||||
string.Format(
|
||||
"G1 X{0:0.###} Y{1:0.###}",
|
||||
position.X,
|
||||
position.Y),
|
||||
this.TravelSpeed);
|
||||
|
||||
this.CurrentPosition = position;
|
||||
}
|
||||
|
||||
private void Retract()
|
||||
{
|
||||
currentE -= this.RetractLength;
|
||||
retracted = true;
|
||||
|
||||
this.WriteSpeedLine(
|
||||
string.Format("G1 E{0:0.###}", currentE),
|
||||
this.RetractSpeed);
|
||||
}
|
||||
|
||||
private void Unretract()
|
||||
{
|
||||
// Unretract
|
||||
currentE += RetractLength;
|
||||
retracted = false;
|
||||
|
||||
this.WriteSpeedLine(
|
||||
string.Format("G1 E{0:0.###}", currentE),
|
||||
this.RetractSpeed);
|
||||
}
|
||||
|
||||
public void PenUp()
|
||||
{
|
||||
writer.WriteLine("G1 Z0.8 E{0:0.###}", currentE - 1.2);
|
||||
this.Retract();
|
||||
this.WriteSpeedLine(
|
||||
string.Format("G1 Z{0:0.###}", layerHeight + this.RetractLift),
|
||||
this.TravelSpeed);
|
||||
}
|
||||
|
||||
public void PenDown()
|
||||
{
|
||||
writer.WriteLine("G1 Z0.2 E{0:0.###}", currentE);
|
||||
this.WriteSpeedLine(
|
||||
string.Format("G1 Z{0:0.###}", layerHeight),
|
||||
this.TravelSpeed);
|
||||
|
||||
this.Unretract();
|
||||
}
|
||||
|
||||
public void LineTo(double x, double y)
|
||||
|
|
@ -116,23 +143,45 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public void LineTo(Vector2 position)
|
||||
{
|
||||
//if (retracted)
|
||||
//{
|
||||
// // Unretract
|
||||
// currentE += retractAmount;
|
||||
// writer.WriteLine("G1 E{0:0.###}", currentE);
|
||||
//}
|
||||
if (retracted)
|
||||
{
|
||||
this.Unretract();
|
||||
}
|
||||
|
||||
position = Transform.Transform(position);
|
||||
|
||||
var delta = this.CurrentPosition - position;
|
||||
currentE += delta.Length * 0.06;
|
||||
currentE += delta.Length * 0.048;
|
||||
|
||||
writer.WriteLine("G1 X{0} Y{1} E{2:0.###}", position.X, position.Y, currentE);
|
||||
this.WriteSpeedLine(
|
||||
string.Format(
|
||||
"G1 X{0} Y{1} E{2:0.###}",
|
||||
position.X,
|
||||
position.Y,
|
||||
currentE),
|
||||
this.Speed);
|
||||
|
||||
this.CurrentPosition = position;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Write the given line, optionally pushing speeds if needed
|
||||
/// </summary>
|
||||
/// <param name="line">The line to write</param>
|
||||
/// <param name="targetSpeed">The target movement speed</param>
|
||||
public void WriteSpeedLine(string line, double targetSpeed)
|
||||
{
|
||||
if (currentSpeed == targetSpeed)
|
||||
{
|
||||
writer.WriteLine(line);
|
||||
}
|
||||
else
|
||||
{
|
||||
currentSpeed = targetSpeed;
|
||||
writer.WriteLine("{0} F{1:0.###}", line, targetSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
public string ToGCode()
|
||||
{
|
||||
return sb.ToString();
|
||||
|
|
@ -143,7 +192,7 @@ namespace MatterHackers.MatterControl
|
|||
writer.Dispose();
|
||||
}
|
||||
|
||||
internal void DrawRectangle(RectangleDouble rect)
|
||||
public void DrawRectangle(RectangleDouble rect)
|
||||
{
|
||||
this.MoveTo(rect.Left, rect.Bottom);
|
||||
|
||||
|
|
|
|||
|
|
@ -78,10 +78,10 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
contentRow.AddChild(container);
|
||||
|
||||
container.AddChild(yOffsetWidget = new NozzleOffsetTemplateWidget(templatePrinter.ActiveOffsets, FlowDirection.TopToBottom, theme)
|
||||
container.AddChild(yOffsetWidget = new NozzleOffsetTemplateWidget(templatePrinter.ActiveOffsets, FlowDirection.BottomToTop, theme)
|
||||
{
|
||||
Margin = new BorderDouble(top: 15),
|
||||
Padding = new BorderDouble(top: 4),
|
||||
Padding = new BorderDouble(bottom: 4),
|
||||
Width = 110
|
||||
});
|
||||
|
||||
|
|
@ -131,7 +131,11 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
var gcodeSketch = new GCodeSketch()
|
||||
{
|
||||
Speed = (int)(printer.Settings.GetValue<double>(SettingsKey.first_layer_speed) * 60)
|
||||
Speed = (int)(printer.Settings.GetValue<double>(SettingsKey.first_layer_speed) * 60),
|
||||
RetractLength = printer.Settings.GetValue<double>(SettingsKey.retract_length),
|
||||
RetractSpeed = printer.Settings.GetValue<double>(SettingsKey.retract_speed) * 60,
|
||||
RetractLift = printer.Settings.GetValue<double>(SettingsKey.retract_lift),
|
||||
TravelSpeed = printer.Settings.GetValue<double>(SettingsKey.travel_speed) * 60,
|
||||
};
|
||||
|
||||
//gcodeSketch.WriteRaw("G92 E0");
|
||||
|
|
@ -181,8 +185,8 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public override void OnClosed(EventArgs e)
|
||||
{
|
||||
if (printer.Connection.CommunicationState == PrinterCommunication.CommunicationStates.Printing ||
|
||||
printer.Connection.CommunicationState == PrinterCommunication.CommunicationStates.Paused)
|
||||
if (printer.Connection.CommunicationState == CommunicationStates.Printing ||
|
||||
printer.Connection.CommunicationState == CommunicationStates.Paused)
|
||||
{
|
||||
printer.CancelPrint();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,15 +28,10 @@ either expressed or implied, of the FreeBSD Project.
|
|||
*/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.Transform;
|
||||
using MatterHackers.Agg.VertexSource;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.MatterControl.PrinterCommunication;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
using MatterHackers.VectorMath;
|
||||
|
||||
|
|
@ -57,13 +52,12 @@ namespace MatterHackers.MatterControl
|
|||
activeOffsets = new double[41];
|
||||
activeOffsets[20] = 0;
|
||||
|
||||
var leftStep = 1.5d / 20;
|
||||
var rightStep = 1.5d / 20;
|
||||
var offsetStep = 1.2d / 20;
|
||||
|
||||
for (var i = 1; i <= 20; i++)
|
||||
{
|
||||
activeOffsets[20 - i] = i * leftStep * -1;
|
||||
activeOffsets[20 + i] = i * rightStep;
|
||||
activeOffsets[20 - i] = i * offsetStep * -1;
|
||||
activeOffsets[20 + i] = i * offsetStep;
|
||||
}
|
||||
|
||||
nozzleWidth = printer.Settings.GetValue<double>(SettingsKey.nozzle_diameter);
|
||||
|
|
@ -74,7 +68,6 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public bool DebugMode { get; private set; } = false;
|
||||
|
||||
|
||||
public void BuildTemplate(GCodeSketch gcodeSketch, bool verticalLayout)
|
||||
{
|
||||
gcodeSketch.SetTool("T0");
|
||||
|
|
@ -109,7 +102,7 @@ namespace MatterHackers.MatterControl
|
|||
// Perimeters
|
||||
rect = this.CreatePerimeters(gcodeSketch, rect);
|
||||
|
||||
double x, y2, y3;
|
||||
double x, y2, y3, y4;
|
||||
double sectionHeight = rect.Height / 2;
|
||||
bool up = true;
|
||||
var step = (rect.Width - 3) / 40;
|
||||
|
|
@ -130,9 +123,13 @@ namespace MatterHackers.MatterControl
|
|||
x = rect.Left + 1.5;
|
||||
|
||||
y2 = y1 - sectionHeight - (nozzleWidth * 1.5);
|
||||
y3 = y2 - 5;
|
||||
y3 = y2 - 2;
|
||||
y4 = y2 - 5;
|
||||
|
||||
bool drawGlpyphs = false;
|
||||
bool drawGlyphs = true;
|
||||
|
||||
var inverseTransform = gcodeSketch.Transform;
|
||||
inverseTransform.invert();
|
||||
|
||||
// Draw calibration lines
|
||||
for (var i = 0; i <= 40; i++)
|
||||
|
|
@ -141,18 +138,17 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
if ((i % 5 == 0))
|
||||
{
|
||||
gcodeSketch.LineTo(x, y3);
|
||||
gcodeSketch.LineTo(x, y4);
|
||||
|
||||
if (i < 20)
|
||||
{
|
||||
gcodeSketch.MoveTo(x, y3);
|
||||
}
|
||||
|
||||
var currentPos = gcodeSketch.CurrentPosition;
|
||||
currentPos = inverseTransform.Transform(currentPos);
|
||||
|
||||
gcodeSketch.Speed = 500;
|
||||
|
||||
PrintLineEnd(gcodeSketch, drawGlpyphs, i, currentPos);
|
||||
|
||||
gcodeSketch.Speed = 1800;
|
||||
|
||||
gcodeSketch.MoveTo(x, y3);
|
||||
gcodeSketch.MoveTo(x, y2);
|
||||
PrintLineEnd(gcodeSketch, drawGlyphs, i, currentPos);
|
||||
}
|
||||
|
||||
gcodeSketch.LineTo(x, up ? y2 : y1);
|
||||
|
|
@ -191,7 +187,7 @@ namespace MatterHackers.MatterControl
|
|||
// Draw calibration lines
|
||||
for (var i = 0; i <= 40; i++)
|
||||
{
|
||||
gcodeSketch.MoveTo(x + activeOffsets[i], up ? y1 : y2, retract: true);
|
||||
gcodeSketch.MoveTo(x + activeOffsets[i], up ? y1 : y2, retract: false);
|
||||
gcodeSketch.LineTo(x + activeOffsets[i], up ? y2 : y1);
|
||||
|
||||
x = x + step;
|
||||
|
|
@ -206,7 +202,7 @@ namespace MatterHackers.MatterControl
|
|||
private RectangleDouble CreatePerimeters(GCodeSketch gcodeSketch, RectangleDouble rect)
|
||||
{
|
||||
gcodeSketch.WriteRaw("; CreatePerimeters");
|
||||
for (var i = 0; i < 3; i++)
|
||||
for (var i = 0; i < 2; i++)
|
||||
{
|
||||
rect.Inflate(-nozzleWidth);
|
||||
gcodeSketch.DrawRectangle(rect);
|
||||
|
|
@ -226,20 +222,29 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
}
|
||||
|
||||
private static void PrintLineEnd(GCodeSketch turtle, bool drawGlpyphs, int i, Vector2 currentPos)
|
||||
private static void PrintLineEnd(GCodeSketch turtle, bool drawGlyphs, int i, Vector2 currentPos, bool lift = false)
|
||||
{
|
||||
if (drawGlpyphs && CalibrationLine.Glyphs.TryGetValue(i, out IVertexSource vertexSource))
|
||||
var originalSpeed = turtle.Speed;
|
||||
turtle.Speed = Math.Min(700, turtle.Speed);
|
||||
|
||||
if (drawGlyphs && CalibrationLine.Glyphs.TryGetValue(i, out IVertexSource vertexSource))
|
||||
{
|
||||
turtle.WriteRaw("; LineEnd Marker");
|
||||
var flattened = new FlattenCurves(vertexSource);
|
||||
|
||||
var verticies = flattened.Vertices();
|
||||
var firstItem = verticies.First();
|
||||
var position = turtle.CurrentPosition;
|
||||
|
||||
var scale = 0.32;
|
||||
var scale = 0.3;
|
||||
|
||||
if (firstItem.command != ShapePath.FlagsAndCommand.MoveTo)
|
||||
{
|
||||
if (lift)
|
||||
{
|
||||
turtle.PenUp();
|
||||
}
|
||||
|
||||
turtle.MoveTo((firstItem.position * scale) + currentPos);
|
||||
}
|
||||
|
||||
|
|
@ -250,7 +255,17 @@ namespace MatterHackers.MatterControl
|
|||
switch (item.command)
|
||||
{
|
||||
case ShapePath.FlagsAndCommand.MoveTo:
|
||||
if (lift)
|
||||
{
|
||||
turtle.PenUp();
|
||||
}
|
||||
|
||||
turtle.MoveTo((item.position * scale) + currentPos);
|
||||
|
||||
if (lift)
|
||||
{
|
||||
turtle.PenDown();
|
||||
}
|
||||
break;
|
||||
|
||||
case ShapePath.FlagsAndCommand.LineTo:
|
||||
|
|
@ -264,10 +279,24 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
}
|
||||
|
||||
if (!closed)
|
||||
bool atStartingPosition = position == turtle.CurrentPosition;
|
||||
|
||||
if (!closed
|
||||
&& !atStartingPosition)
|
||||
{
|
||||
turtle.LineTo((firstItem.position * scale) + currentPos);
|
||||
}
|
||||
|
||||
// Restore original speed
|
||||
turtle.Speed = originalSpeed;
|
||||
|
||||
if (!atStartingPosition)
|
||||
{
|
||||
// Return to original position
|
||||
turtle.PenUp();
|
||||
turtle.MoveTo(currentPos);
|
||||
turtle.PenDown();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -368,7 +368,6 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
|
||||
}
|
||||
|
||||
|
||||
public void UpdateStyle()
|
||||
{
|
||||
if (settingsContext.ContainsKey(settingData.SlicerConfigName))
|
||||
|
|
@ -378,7 +377,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
case NamedSettingsLayers.All:
|
||||
if (settingData.ShowAsOverride)
|
||||
{
|
||||
var defaultCascade = printer.Settings.defaultLayerCascade;
|
||||
var defaultCascade = printer.Settings.GetDefaultLayerCascade();
|
||||
var firstParentValue = printer.Settings.GetValueAndLayerName(settingData.SlicerConfigName, defaultCascade.Skip(1));
|
||||
var (currentValue, layerName) = printer.Settings.GetValueAndLayerName(settingData.SlicerConfigName, defaultCascade);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue