refactoring

This commit is contained in:
LarsBrubaker 2021-11-22 08:01:33 -08:00
parent cdb881b699
commit af401d8a47
12 changed files with 459 additions and 382 deletions

View file

@ -111,7 +111,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
var totalOperations = participants.Count() - 1;
double amountPerOperation = 1.0 / totalOperations;
double percentCompleted = 0;
double ratioCompleted = 0;
ProgressStatus progressStatus = new ProgressStatus();
foreach (var remove in participants)
@ -122,13 +122,13 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
remove.WorldMatrix(),
first.Mesh,
first.WorldMatrix(),
BooleanProcessing.CsgModes.Intersect,
BooleanProcessing.ProcessingModes.Polygons,
BooleanProcessing.ProcessingResolution._64,
BooleanProcessing.ProcessingResolution._64,
CsgModes.Intersect,
ProcessingModes.Polygons,
ProcessingResolution._64,
ProcessingResolution._64,
reporter,
amountPerOperation,
percentCompleted,
ratioCompleted,
progressStatus,
cancellationToken);
@ -141,8 +141,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
}
remove.Visible = false;
percentCompleted += amountPerOperation;
progressStatus.Progress0To1 = percentCompleted;
ratioCompleted += amountPerOperation;
progressStatus.Progress0To1 = ratioCompleted;
reporter.Report(progressStatus);
}
}