Merge pull request #2422 from larsbrubaker/design_tools

Fixed image converter bounds
This commit is contained in:
Lars Brubaker 2017-09-08 15:33:38 -07:00 committed by GitHub
commit 985473e287
3 changed files with 12 additions and 11 deletions

View file

@ -95,7 +95,8 @@ namespace MatterHackers.MatterControl.CustomWidgets
for (int i = 0; i < Width / pixelSkip; i++)
{
double xPos = Width - ((i * pixelSkip + TotalAdds) % Width);
graphics2D.Line(xPos, 0, xPos, Height, new RGBA_Bytes(backgroundGridColor, 64));
int inset = (int)((i % 2) == 0 ? Height / 6 : Height / 3);
graphics2D.Line(xPos, inset, xPos, Height - inset, new RGBA_Bytes(backgroundGridColor, 64));
}
for (int i = 0; i < Width - 1; i++)

View file

@ -79,13 +79,13 @@ namespace MatterHackers.MeshVisualizer
private InteractionLayer interactionLayer;
private PrinterConfig printer;
private PrinterConfig printerConfig;
public MeshViewerWidget(PrinterConfig printer, InteractionLayer interactionLayer, string startingTextMessage = "", EditorType editorType = EditorType.Part)
public MeshViewerWidget(PrinterConfig printerConfig, InteractionLayer interactionLayer, string startingTextMessage = "", EditorType editorType = EditorType.Part)
{
this.EditorMode = editorType;
this.scene = printer.Bed.Scene;
this.printer = printer;
this.scene = printerConfig.Bed.Scene;
this.printerConfig = printerConfig;
var activePrintItem = ApplicationController.Instance.ActivePrintItem;
@ -169,8 +169,8 @@ namespace MatterHackers.MeshVisualizer
{
try
{
string url = printer.Settings.GetValue("PrinterShapeUrl");
string extension = printer.Settings.GetValue("PrinterShapeExtension");
string url = printerConfig.Settings.GetValue("PrinterShapeUrl");
string extension = printerConfig.Settings.GetValue("PrinterShapeExtension");
if (string.IsNullOrEmpty(url) || string.IsNullOrEmpty(extension))
{
@ -597,16 +597,16 @@ namespace MatterHackers.MeshVisualizer
{
bedColor = new RGBA_Bytes(this.BedColor, this.BedColor.alpha / 4);
}
GLHelper.Render(printer.Bed.Mesh, bedColor, RenderTypes.Shaded, World.ModelviewMatrix);
GLHelper.Render(printerConfig.Bed.Mesh, bedColor, RenderTypes.Shaded, World.ModelviewMatrix);
if (printerShape != null)
{
GLHelper.Render(printerShape, bedColor, RenderTypes.Shaded, World.ModelviewMatrix);
}
}
if (printer.Bed.BuildVolumeMesh != null && RenderBuildVolume)
if (printerConfig.Bed.BuildVolumeMesh != null && RenderBuildVolume)
{
GLHelper.Render(printer.Bed.BuildVolumeMesh, this.BuildVolumeColor, RenderTypes.Shaded, World.ModelviewMatrix);
GLHelper.Render(printerConfig.Bed.BuildVolumeMesh, this.BuildVolumeColor, RenderTypes.Shaded, World.ModelviewMatrix);
}
}
else

@ -1 +1 @@
Subproject commit 1a1cc871af99030e83a60fa06136d1f401ad20c6
Subproject commit 2e3142d1e9863aaba41ae8b2962773add3de13eb