Merge pull request #2682 from larsbrubaker/design_tools
Make sure we check for on bed in circular beds.
This commit is contained in:
commit
d4c6e58316
1 changed files with 11 additions and 1 deletions
|
|
@ -98,7 +98,17 @@ namespace MatterHackers.MeshVisualizer
|
|||
}
|
||||
break;
|
||||
|
||||
case BedShape.Circular:
|
||||
case BedShape.Circular:
|
||||
// This could be much better if it checked the actual vertext data of the mesh against the cylinder
|
||||
// first check if any of it is outside the bed rect
|
||||
if (aabb.minXYZ.X < bed.BedCenter.X - bed.ViewerVolume.X / 2
|
||||
|| aabb.maxXYZ.X > bed.BedCenter.X + bed.ViewerVolume.X / 2
|
||||
|| aabb.minXYZ.Y < bed.BedCenter.Y - bed.ViewerVolume.Y / 2
|
||||
|| aabb.maxXYZ.Y > bed.BedCenter.Y + bed.ViewerVolume.Y / 2)
|
||||
{
|
||||
// TODO: then check if all of it is outside the bed circle
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue