Made baby steps change to 5mm after the first layer
Made streams out of extrusion multiplier and feed rate multiplier
This commit is contained in:
parent
3c76bb5368
commit
b7a0dff005
7 changed files with 218 additions and 107 deletions
|
|
@ -40,13 +40,13 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
{
|
||||
GCodeStream internalStream;
|
||||
PrinterMove lastDestination = new PrinterMove();
|
||||
double maxSegmentLength = 0;
|
||||
public double MaxSegmentLength { get; set; }
|
||||
|
||||
List<PrinterMove> movesToSend = new List<PrinterMove>();
|
||||
|
||||
public MaxLengthStream(GCodeStream internalStream, double maxSegmentLength)
|
||||
{
|
||||
this.maxSegmentLength = maxSegmentLength;
|
||||
this.MaxSegmentLength = maxSegmentLength;
|
||||
this.internalStream = internalStream;
|
||||
}
|
||||
|
||||
|
|
@ -68,11 +68,11 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
PrinterMove deltaToDestination = currentDestination - lastDestination;
|
||||
deltaToDestination.feedRate = 0; // remove the changing of the fedrate (we'll set it initialy)
|
||||
double lengthSquared = deltaToDestination.LengthSquared;
|
||||
if (lengthSquared > maxSegmentLength * maxSegmentLength)
|
||||
if (lengthSquared > MaxSegmentLength * MaxSegmentLength)
|
||||
{
|
||||
// create the line segments to send
|
||||
double length = Math.Sqrt(lengthSquared);
|
||||
int numSegmentsToSend = (int)Math.Ceiling(length / maxSegmentLength);
|
||||
int numSegmentsToSend = (int)Math.Ceiling(length / MaxSegmentLength);
|
||||
PrinterMove deltaForSegment = deltaToDestination / numSegmentsToSend;
|
||||
PrinterMove nextPoint = lastDestination + deltaForSegment;
|
||||
nextPoint.feedRate = currentDestination.feedRate;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue