Adding holes test and fixing regression

This commit is contained in:
LarsBrubaker 2022-05-27 07:47:21 -07:00
parent 9e69067c98
commit 1b715c5347
5 changed files with 64 additions and 441 deletions

View file

@ -332,15 +332,15 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
public bool ApplyHoles(IProgress<ProgressStatus> reporter,
CancellationToken cancellationToken)
{
var removeItems = Children.Where(c => c.OutputType == PrintOutputTypes.Hole && c.Visible);
var removeItems = Children.Where(c => c.WorldOutputType(SourceContainer) == PrintOutputTypes.Hole && c.Visible);
if (removeItems.Any())
{
var keepItems = Children.Where(c => c.OutputType != PrintOutputTypes.Hole && c.Visible);
var keepItems = Children.Where(c => c.WorldOutputType(SourceContainer) != PrintOutputTypes.Hole && c.Visible);
if (keepItems.Any())
{
// apply any holes before we return
var resultItems = SubtractObject3D_2.DoSubtract(this,
var resultItems = SubtractObject3D_2.DoSubtract(SourceContainer,
keepItems,
removeItems,
reporter,