Unify Vector2 3 and 4 to have upper case field members
This commit is contained in:
parent
2de8368f6e
commit
359784877f
63 changed files with 351 additions and 351 deletions
|
|
@ -67,17 +67,17 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
|
||||
var sb = new StringBuilder(command);
|
||||
|
||||
if (destination.position.x != start.position.x)
|
||||
if (destination.position.X != start.position.X)
|
||||
{
|
||||
sb.AppendFormat("X{0:0.##} ", destination.position.x);
|
||||
sb.AppendFormat("X{0:0.##} ", destination.position.X);
|
||||
}
|
||||
if (destination.position.y != start.position.y)
|
||||
if (destination.position.Y != start.position.Y)
|
||||
{
|
||||
sb.AppendFormat("Y{0:0.##} ", destination.position.y);
|
||||
sb.AppendFormat("Y{0:0.##} ", destination.position.Y);
|
||||
}
|
||||
if (destination.position.z != start.position.z)
|
||||
if (destination.position.Z != start.position.Z)
|
||||
{
|
||||
sb.AppendFormat("Z{0:0.###} ", destination.position.z);
|
||||
sb.AppendFormat("Z{0:0.###} ", destination.position.Z);
|
||||
}
|
||||
|
||||
if (moveHasExtrusion)
|
||||
|
|
@ -96,9 +96,9 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
public static PrinterMove GetPosition(string lineBeingSent, PrinterMove startPositionPosition)
|
||||
{
|
||||
PrinterMove currentDestination = startPositionPosition;
|
||||
GCodeFile.GetFirstNumberAfter("X", lineBeingSent, ref currentDestination.position.x);
|
||||
GCodeFile.GetFirstNumberAfter("Y", lineBeingSent, ref currentDestination.position.y);
|
||||
GCodeFile.GetFirstNumberAfter("Z", lineBeingSent, ref currentDestination.position.z);
|
||||
GCodeFile.GetFirstNumberAfter("X", lineBeingSent, ref currentDestination.position.X);
|
||||
GCodeFile.GetFirstNumberAfter("Y", lineBeingSent, ref currentDestination.position.Y);
|
||||
GCodeFile.GetFirstNumberAfter("Z", lineBeingSent, ref currentDestination.position.Z);
|
||||
GCodeFile.GetFirstNumberAfter("E", lineBeingSent, ref currentDestination.extrusion);
|
||||
GCodeFile.GetFirstNumberAfter("F", lineBeingSent, ref currentDestination.feedRate);
|
||||
return currentDestination;
|
||||
|
|
|
|||
|
|
@ -226,8 +226,8 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
InjectPauseGCode("G92 E{0:0.###}".FormatWith(moveLocationAtEndOfPauseCode.extrusion));
|
||||
Vector3 ensureAllAxisAreSent = positionBeforeActualPause + new Vector3(.01, .01, .01);
|
||||
var feedRates = printer.Settings.Helpers.ManualMovementSpeeds();
|
||||
InjectPauseGCode("G1 X{0:0.###} Y{1:0.###} Z{2:0.###} F{3}".FormatWith(ensureAllAxisAreSent.x, ensureAllAxisAreSent.y, ensureAllAxisAreSent.z, feedRates.x + 1));
|
||||
InjectPauseGCode("G1 X{0:0.###} Y{1:0.###} Z{2:0.###} F{3}".FormatWith(positionBeforeActualPause.x, positionBeforeActualPause.y, positionBeforeActualPause.z, feedRates));
|
||||
InjectPauseGCode("G1 X{0:0.###} Y{1:0.###} Z{2:0.###} F{3}".FormatWith(ensureAllAxisAreSent.X, ensureAllAxisAreSent.Y, ensureAllAxisAreSent.Z, feedRates.X + 1));
|
||||
InjectPauseGCode("G1 X{0:0.###} Y{1:0.###} Z{2:0.###} F{3}".FormatWith(positionBeforeActualPause.X, positionBeforeActualPause.Y, positionBeforeActualPause.Z, feedRates));
|
||||
|
||||
string resumeGCode = printer.Settings.GetValue(SettingsKey.resume_gcode);
|
||||
InjectPauseGCode(resumeGCode);
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
queuedCommands.Add("G28 Y0");
|
||||
// move to the place we can home z from
|
||||
Vector2 recoveryPositionXy = printer.Settings.GetValue<Vector2>(SettingsKey.recover_position_before_z_home);
|
||||
queuedCommands.Add("G1 X{0:0.###}Y{1:0.###}F{2}".FormatWith(recoveryPositionXy.x, recoveryPositionXy.y, printer.Settings.XSpeed()));
|
||||
queuedCommands.Add("G1 X{0:0.###}Y{1:0.###}F{2}".FormatWith(recoveryPositionXy.X, recoveryPositionXy.Y, printer.Settings.XSpeed()));
|
||||
// home z
|
||||
queuedCommands.Add("G28 Z0");
|
||||
}
|
||||
|
|
@ -223,13 +223,13 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
{
|
||||
// move to the height we can recover printing from
|
||||
Vector2 recoverPositionXy = printer.Settings.GetValue<Vector2>(SettingsKey.recover_position_before_z_home);
|
||||
queuedCommands.Add(CreateMovementLine(new PrinterMove(new VectorMath.Vector3(recoverPositionXy.x, recoverPositionXy.y, lastDestination.position.z), 0, printer.Settings.ZSpeed())));
|
||||
queuedCommands.Add(CreateMovementLine(new PrinterMove(new VectorMath.Vector3(recoverPositionXy.X, recoverPositionXy.Y, lastDestination.position.Z), 0, printer.Settings.ZSpeed())));
|
||||
}
|
||||
|
||||
double extruderWidth = printer.Settings.GetValue<double>(SettingsKey.nozzle_diameter);
|
||||
// move to a position outside the printed bounds
|
||||
queuedCommands.Add(CreateMovementLine(new PrinterMove(
|
||||
new Vector3(boundsOfSkippedLayers.Left - extruderWidth*2, boundsOfSkippedLayers.Bottom + boundsOfSkippedLayers.Height / 2, lastDestination.position.z),
|
||||
new Vector3(boundsOfSkippedLayers.Left - extruderWidth*2, boundsOfSkippedLayers.Bottom + boundsOfSkippedLayers.Height / 2, lastDestination.position.Z),
|
||||
0, printer.Settings.XSpeed())));
|
||||
|
||||
// let's prime the extruder
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue