Make array objects change [index] to constant on flatten

issue: MatterHackers/MCCentral#6604
Make sure monotonic adjacent lines do not have lift when printing
This commit is contained in:
Lars Brubaker 2021-11-23 10:11:25 -08:00
parent ee520ce88c
commit 93c6f6950e
7 changed files with 100 additions and 69 deletions

View file

@ -94,42 +94,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
list.AddRange(newChildren);
});
var updateItems = SheetObject3D.SortAndLockUpdateItems(this, (item) =>
{
if (!SheetObject3D.HasExpressionWithString(item, "=", true))
{
return false;
}
// WIP
if (item.Parent == this)
{
// only process our children that are not the source object
return !(item is OperationSourceObject3D);
}
else if (item.Parent is OperationSourceContainerObject3D)
{
// If we find another source container
// Only process its children that are the source container (they will be replicated and modified correctly by the source container)
return item is OperationSourceObject3D;
}
else if (item.Parent is OperationSourceObject3D operationSourceObject3D
&& operationSourceObject3D.Parent == this)
{
// we don't need to rebuild our source object
return false;
}
// process everything else
return true;
});
var runningInterval = SheetObject3D.SendInvalidateInRebuildOrder(updateItems, InvalidateType.Properties);
while (runningInterval.Active)
{
Thread.Sleep(10);
}
ProcessIndexExpressions();
SourceContainer.Visible = false;
rebuildLock.Dispose();