From 83a56dfbdb4604baea028bfb5f7643d8a500a540 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Tue, 29 Nov 2016 16:52:58 -0800 Subject: [PATCH] also consider the extruder position when doing maxlength. --- PrinterCommunication/Io/MaxLengthStream.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PrinterCommunication/Io/MaxLengthStream.cs b/PrinterCommunication/Io/MaxLengthStream.cs index fd4f00fdf..0daca475b 100644 --- a/PrinterCommunication/Io/MaxLengthStream.cs +++ b/PrinterCommunication/Io/MaxLengthStream.cs @@ -62,8 +62,8 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io { PrinterMove currentDestination = GetPosition(lineFromChild, lastDestination); PrinterMove deltaToDestination = currentDestination - lastDestination; - deltaToDestination.feedRate = 0; // remove the changing of the federate (we'll set it initialy) - double lengthSquared = deltaToDestination.LengthSquared; + deltaToDestination.feedRate = 0; // remove the changing of the federate (we'll set it initially) + double lengthSquared = Math.Max(deltaToDestination.LengthSquared, deltaToDestination.extrusion * deltaToDestination.extrusion); if (lengthSquared > MaxSegmentLength * MaxSegmentLength) { // create the line segments to send