Merge branch 'development' of https://github.com/MatterHackers/MatterControl into development
This commit is contained in:
commit
b709027236
77 changed files with 4218 additions and 418 deletions
|
|
@ -190,10 +190,10 @@ namespace MatterHackers.MatterControl
|
|||
// first create images for all the parts
|
||||
foreach (FileNameAndPresentationName stlFileNames in stlFilesToPrint)
|
||||
{
|
||||
Mesh loadedMesh = StlProcessing.Load(stlFileNames.fileName);
|
||||
if (loadedMesh != null)
|
||||
List<MeshGroup> loadedMeshGroups = StlProcessing.Load(stlFileNames.fileName);
|
||||
if (loadedMeshGroups[0] != null)
|
||||
{
|
||||
AxisAlignedBoundingBox aabb = loadedMesh.GetAxisAlignedBoundingBox();
|
||||
AxisAlignedBoundingBox aabb = loadedMeshGroups[0].GetAxisAlignedBoundingBox();
|
||||
RectangleDouble bounds2D = new RectangleDouble(aabb.minXYZ.x, aabb.minXYZ.y, aabb.maxXYZ.x, aabb.maxXYZ.y);
|
||||
double widthInMM = bounds2D.Width + PartMarginMM * 2;
|
||||
double textSpaceMM = 5;
|
||||
|
|
@ -216,7 +216,10 @@ namespace MatterHackers.MatterControl
|
|||
Stroke rectOutline = new Stroke(rect, strokeWidth);
|
||||
partGraphics2D.Render(rectOutline, RGBA_Bytes.DarkGray);
|
||||
|
||||
PolygonMesh.Rendering.OrthographicZProjection.DrawTo(partGraphics2D, loadedMesh, new Vector2(-bounds2D.Left + PartMarginMM, -bounds2D.Bottom + textSpaceMM + PartMarginMM), PixelPerMM, RGBA_Bytes.Black);
|
||||
foreach (Mesh loadedMesh in loadedMeshGroups[0].Meshes)
|
||||
{
|
||||
PolygonMesh.Rendering.OrthographicZProjection.DrawTo(partGraphics2D, loadedMesh, new Vector2(-bounds2D.Left + PartMarginMM, -bounds2D.Bottom + textSpaceMM + PartMarginMM), PixelPerMM, RGBA_Bytes.Black);
|
||||
}
|
||||
partGraphics2D.Render(typeFacePrinter, RGBA_Bytes.Black);
|
||||
|
||||
partImagesToPrint.Add(new PartImage(imageOfPart));
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ namespace MatterHackers.MatterControl.PrintQueue
|
|||
public class QueueRowItem : GuiWidget
|
||||
{
|
||||
public PrintItemWrapper PrintItemWrapper { get; set; }
|
||||
//public PrintItemWrapper printItemWrapper;
|
||||
public RGBA_Bytes WidgetTextColor;
|
||||
public RGBA_Bytes WidgetBackgroundColor;
|
||||
public bool isActivePrint = false;
|
||||
|
|
@ -60,6 +61,7 @@ namespace MatterHackers.MatterControl.PrintQueue
|
|||
public bool isHoverItem = false;
|
||||
TextWidget partLabel;
|
||||
TextWidget partStatus;
|
||||
Button addToLibraryLink;
|
||||
FlowLayoutWidget editControls;
|
||||
LinkButtonFactory linkButtonFactory = new LinkButtonFactory();
|
||||
ExportPrintItemWindow exportingWindow;
|
||||
|
|
@ -262,20 +264,15 @@ namespace MatterHackers.MatterControl.PrintQueue
|
|||
if (viewingWindow != null)
|
||||
{
|
||||
viewingWindow.BringToFront();
|
||||
viewingWindow.EnterEditMode();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void PartPreviewWindow_Closed(object sender, EventArgs e)
|
||||
{
|
||||
this.viewWindowIsOpen = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void CreateEditControls()
|
||||
{
|
||||
editControls = new FlowLayoutWidget();
|
||||
|
|
@ -342,6 +339,7 @@ namespace MatterHackers.MatterControl.PrintQueue
|
|||
{
|
||||
layoutLeftToRight.AddChild(new GuiWidget(10, 10));
|
||||
}
|
||||
|
||||
|
||||
// delete button
|
||||
{
|
||||
|
|
@ -352,13 +350,22 @@ namespace MatterHackers.MatterControl.PrintQueue
|
|||
};
|
||||
layoutLeftToRight.AddChild(deleteLink);
|
||||
}
|
||||
|
||||
|
||||
// push off to the right the rest spacer
|
||||
{
|
||||
GuiWidget spaceFiller = new GuiWidget(10, 10);
|
||||
//layoutLeftToRight.AddChild(spaceFiller);
|
||||
}
|
||||
|
||||
{
|
||||
addToLibraryLink = linkButtonFactory.Generate(LocalizedString.Get("Add to Library"));
|
||||
addToLibraryLink.Click += (sender, e) =>
|
||||
{
|
||||
LibraryData.Instance.AddItem(new PrintItemWrapper(new PrintItem(this.PrintItemWrapper.Name, this.PrintItemWrapper.FileLocation)));
|
||||
};
|
||||
//layoutLeftToRight.AddChild(addToLibraryLink);
|
||||
}
|
||||
|
||||
// up and down buttons
|
||||
{
|
||||
FlowLayoutWidget topToBottom = new FlowLayoutWidget(FlowDirection.TopToBottom);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue