Got the rest of circular beds working.
This commit is contained in:
parent
1d5c3b23dc
commit
05724383b8
3 changed files with 39 additions and 23 deletions
|
|
@ -28,22 +28,15 @@ either expressed or implied, of the FreeBSD Project.
|
|||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
using System.IO;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.Image;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Agg.OpenGlGui;
|
||||
using MatterHackers.PolygonMesh;
|
||||
using MatterHackers.RenderOpenGl;
|
||||
using MatterHackers.VectorMath;
|
||||
using MatterHackers.Agg.Font;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.MatterControl.PrintQueue;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.VectorMath;
|
||||
|
||||
namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||
{
|
||||
|
|
@ -116,9 +109,12 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
#if false
|
||||
if (timingWindow == null)
|
||||
{
|
||||
timingWindow = new PerformanceFeedbackWindow();
|
||||
}
|
||||
{
|
||||
string staticDataPath = ApplicationDataStorage.Instance.ApplicationStaticDataPath;
|
||||
string fontPath = Path.Combine(staticDataPath, "Fonts", "LiberationMono.svg");
|
||||
TypeFace boldTypeFace = TypeFace.LoadSVG(fontPath);
|
||||
timingWindow = new PerformanceFeedbackWindow(new StyledTypeFace(boldTypeFace, 12));
|
||||
//}
|
||||
//{
|
||||
timingWindow.ShowResults(totalDrawTime.Elapsed.TotalSeconds);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -89,16 +89,36 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
Vector2 bedSize = ActiveSliceSettings.Instance.BedSize;
|
||||
Vector2 printCenter = ActiveSliceSettings.Instance.PrintCenter;
|
||||
switch (index)
|
||||
|
||||
switch (BedShape)
|
||||
{
|
||||
case 0:
|
||||
return new Vector2(printCenter.x, printCenter.y + (bedSize.y / 2) * .8);
|
||||
case 1:
|
||||
return new Vector2(printCenter.x - (bedSize.x / 2) * .8, printCenter.y - (bedSize.y / 2) * .8);
|
||||
case 2:
|
||||
return new Vector2(printCenter.x + (bedSize.x / 2) * .8, printCenter.y - (bedSize.y / 2) * .8);
|
||||
case MeshVisualizer.MeshViewerWidget.BedShape.Circular:
|
||||
Vector2 firstPosition = new Vector2(printCenter.x, printCenter.y + (bedSize.y / 2) * .8);
|
||||
switch (index)
|
||||
{
|
||||
case 0:
|
||||
return firstPosition;
|
||||
case 1:
|
||||
return Vector2.Rotate(firstPosition, MathHelper.Tau / 3);
|
||||
case 2:
|
||||
return Vector2.Rotate(firstPosition, MathHelper.Tau * 2 / 3);
|
||||
default:
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
|
||||
case MeshVisualizer.MeshViewerWidget.BedShape.Rectangular:
|
||||
default:
|
||||
throw new IndexOutOfRangeException();
|
||||
switch (index)
|
||||
{
|
||||
case 0:
|
||||
return new Vector2(printCenter.x, printCenter.y + (bedSize.y / 2) * .8);
|
||||
case 1:
|
||||
return new Vector2(printCenter.x - (bedSize.x / 2) * .8, printCenter.y - (bedSize.y / 2) * .8);
|
||||
case 2:
|
||||
return new Vector2(printCenter.x + (bedSize.x / 2) * .8, printCenter.y - (bedSize.y / 2) * .8);
|
||||
default:
|
||||
throw new IndexOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ namespace MatterHackers.MatterControl
|
|||
settingsStatusLabelContainer.VAnchor |= VAnchor.ParentTop;
|
||||
settingsStatusLabelContainer.Margin = new BorderDouble(0);
|
||||
{
|
||||
string activeSettingsLabelText = new LocalizedString ("Active Settings:").Translated;
|
||||
string activeSettingsLabelText = new LocalizedString ("Active Settings").Translated;
|
||||
string activeSettingsLabelTextFull = string.Format ("{0}:", activeSettingsLabelText);
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue