Sample the center point correctly.
This commit is contained in:
parent
48b8e5b862
commit
b183bcf1d5
2 changed files with 6 additions and 4 deletions
|
|
@ -102,16 +102,17 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
|
||||
public static Vector2 GetPrintLevelPositionToSample(int index, double radius)
|
||||
{
|
||||
Vector2 bedCenter = ActiveSliceSettings.Instance.BedCenter;
|
||||
if (index < numberOfRadialSamples)
|
||||
{
|
||||
Vector2 position = new Vector2(radius, 0);
|
||||
position.Rotate(MathHelper.Tau / numberOfRadialSamples * index);
|
||||
position += ActiveSliceSettings.Instance.BedCenter;
|
||||
position += bedCenter;
|
||||
return position;
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Vector2(0, 0);
|
||||
return bedCenter;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,16 +103,17 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
|
||||
public static Vector2 GetPrintLevelPositionToSample(int index, double radius)
|
||||
{
|
||||
Vector2 bedCenter = ActiveSliceSettings.Instance.BedCenter;
|
||||
if (index < 6)
|
||||
{
|
||||
Vector2 position = new Vector2(radius, 0);
|
||||
position.Rotate(MathHelper.Tau / 6 * index);
|
||||
position += ActiveSliceSettings.Instance.BedCenter;
|
||||
position += bedCenter;
|
||||
return position;
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Vector2(0, 0);
|
||||
return bedCenter;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue