Adjust rendering to center on Z

- Issue MatterHackers/MCCentral#2115
Layer lines render half a nozzle higher than expected
This commit is contained in:
John Lewin 2017-12-27 06:12:29 -08:00
parent 0e26d59d78
commit 5e7e8cf502

View file

@ -62,6 +62,10 @@ namespace MatterHackers.GCodeVisualizer
double zScale = halfHeight / radius;
double xScale = halfWidth / radius;
// Adjust start/end positions to be centered on Z for the given layer height
startPos.Z -= halfHeight;
endPos.Z -= halfHeight;
Vector3 scale = new Vector3(xScale, xScale, zScale);
for (int i = 0; i < steps; i++)