From 0d86184329a084af7ecbca430d8e044063a3e8d7 Mon Sep 17 00:00:00 2001 From: John Lewin Date: Fri, 19 Feb 2016 11:27:55 -0800 Subject: [PATCH] Spelling --- BrailleBuilder/View3DBrailleBuilder.cs | 68 +++++++++---------- MatterControl.csproj | 2 +- PartPreviewWindow/PlatingHelper.cs | 68 +++++++++---------- PartPreviewWindow/View3D/View3DAlign.cs | 38 +++++------ PartPreviewWindow/View3D/View3DAutoArange.cs | 8 +-- PartPreviewWindow/View3D/View3DCopyGroup.cs | 8 +-- ...onData.cs => View3DCreateSelectionData.cs} | 14 ++-- PartPreviewWindow/View3D/View3DGroup.cs | 30 ++++---- PartPreviewWindow/View3D/View3DUngroup.cs | 28 ++++---- PartPreviewWindow/View3D/View3DWidget.cs | 48 ++++++------- Submodules/MatterSlice | 2 +- TextCreator/View3DTextCreator.cs | 62 ++++++++--------- 12 files changed, 188 insertions(+), 188 deletions(-) rename PartPreviewWindow/View3D/{View3DCreateSelecitonData.cs => View3DCreateSelectionData.cs} (90%) diff --git a/BrailleBuilder/View3DBrailleBuilder.cs b/BrailleBuilder/View3DBrailleBuilder.cs index 71f182e81..dc86a982d 100644 --- a/BrailleBuilder/View3DBrailleBuilder.cs +++ b/BrailleBuilder/View3DBrailleBuilder.cs @@ -79,9 +79,9 @@ namespace MatterHackers.MatterControl.Plugins.BrailleBuilder private Button closeButton; private String word; - private List asynchMeshGroups = new List(); - private List asynchMeshGroupTransforms = new List(); - private List asynchPlatingDatas = new List(); + private List asyncMeshGroups = new List(); + private List asyncMeshGroupTransforms = new List(); + private List asyncPlatingDatas = new List(); private List MeshGroupExtraData; @@ -379,9 +379,9 @@ namespace MatterHackers.MatterControl.Plugins.BrailleBuilder { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; - asynchMeshGroups.Clear(); - asynchMeshGroupTransforms.Clear(); - asynchPlatingDatas.Clear(); + asyncMeshGroups.Clear(); + asyncMeshGroupTransforms.Clear(); + asyncPlatingDatas.Clear(); TypeFacePrinter brailPrinter = new TypeFacePrinter(brailleText, new StyledTypeFace(brailTypeFace, 12)); @@ -394,7 +394,7 @@ namespace MatterHackers.MatterControl.Plugins.BrailleBuilder Vector2 normalSize = normalPrinter.GetSize(); AddCharacterMeshes(wordText, normalPrinter); - firstNewCharacter = asynchPlatingDatas.Count; + firstNewCharacter = asyncPlatingDatas.Count; } AddCharacterMeshes(brailleText, brailPrinter); @@ -402,23 +402,23 @@ namespace MatterHackers.MatterControl.Plugins.BrailleBuilder for (int i = 0; i < firstNewCharacter; i++) { - asynchPlatingDatas[i].spacing = asynchPlatingDatas[i].spacing + new Vector2(0, boldStyled.CapHeightInPixels * 1.5); + asyncPlatingDatas[i].spacing = asyncPlatingDatas[i].spacing + new Vector2(0, boldStyled.CapHeightInPixels * 1.5); } - CreateBase(asynchMeshGroups, asynchMeshGroupTransforms, asynchPlatingDatas); + CreateBase(asyncMeshGroups, asyncMeshGroupTransforms, asyncPlatingDatas); - SetWordPositions(asynchMeshGroups, asynchMeshGroupTransforms, asynchPlatingDatas); - SetWordSize(asynchMeshGroups, asynchMeshGroupTransforms); - SetWordHeight(asynchMeshGroups, asynchMeshGroupTransforms); + SetWordPositions(asyncMeshGroups, asyncMeshGroupTransforms, asyncPlatingDatas); + SetWordSize(asyncMeshGroups, asyncMeshGroupTransforms); + SetWordHeight(asyncMeshGroups, asyncMeshGroupTransforms); - CenterTextOnScreen(asynchMeshGroups, asynchMeshGroupTransforms); + CenterTextOnScreen(asyncMeshGroups, asyncMeshGroupTransforms); processingProgressControl.PercentComplete = 95; } private void AddCharacterMeshes(string currentText, TypeFacePrinter printer) { - int newIndex = asynchMeshGroups.Count; + int newIndex = asyncMeshGroups.Count; StyledTypeFace typeFace = printer.TypeFaceStyle; for (int i = 0; i < currentText.Length; i++) @@ -450,18 +450,18 @@ namespace MatterHackers.MatterControl.Plugins.BrailleBuilder // done #endif - asynchMeshGroups.Add(new MeshGroup(textMesh)); + asyncMeshGroups.Add(new MeshGroup(textMesh)); PlatingMeshGroupData newMeshInfo = new PlatingMeshGroupData(); newMeshInfo.spacing = printer.GetOffsetLeftOfCharacterIndex(i); - asynchPlatingDatas.Add(newMeshInfo); - asynchMeshGroupTransforms.Add(ScaleRotateTranslate.Identity()); + asyncPlatingDatas.Add(newMeshInfo); + asyncMeshGroupTransforms.Add(ScaleRotateTranslate.Identity()); - PlatingHelper.CreateITraceableForMeshGroup(asynchPlatingDatas, asynchMeshGroups, newIndex, null); - ScaleRotateTranslate moved = asynchMeshGroupTransforms[newIndex]; + PlatingHelper.CreateITraceableForMeshGroup(asyncPlatingDatas, asyncMeshGroups, newIndex, null); + ScaleRotateTranslate moved = asyncMeshGroupTransforms[newIndex]; moved.translation *= Matrix4X4.CreateTranslation(new Vector3(0, 0, unscaledLetterHeight / 2)); - asynchMeshGroupTransforms[newIndex] = moved; + asyncMeshGroupTransforms[newIndex] = moved; newIndex++; } @@ -499,8 +499,8 @@ namespace MatterHackers.MatterControl.Plugins.BrailleBuilder private void PushMeshGroupDataToAsynchLists(bool copyTraceInfo) { - asynchMeshGroups.Clear(); - asynchMeshGroupTransforms.Clear(); + asyncMeshGroups.Clear(); + asyncMeshGroupTransforms.Clear(); for (int meshGroupIndex = 0; meshGroupIndex < MeshGroups.Count; meshGroupIndex++) { MeshGroup meshGroup = MeshGroups[meshGroupIndex]; @@ -510,11 +510,11 @@ namespace MatterHackers.MatterControl.Plugins.BrailleBuilder Mesh mesh = meshGroup.Meshes[meshIndex]; mesh.CleanAndMergMesh(); newMeshGroup.Meshes.Add(Mesh.Copy(mesh)); - asynchMeshGroupTransforms.Add(MeshGroupTransforms[meshGroupIndex]); + asyncMeshGroupTransforms.Add(MeshGroupTransforms[meshGroupIndex]); } - asynchMeshGroups.Add(newMeshGroup); + asyncMeshGroups.Add(newMeshGroup); } - asynchPlatingDatas.Clear(); + asyncPlatingDatas.Clear(); for (int meshGroupIndex = 0; meshGroupIndex < MeshGroupExtraData.Count; meshGroupIndex++) { @@ -528,7 +528,7 @@ namespace MatterHackers.MatterControl.Plugins.BrailleBuilder meshData.meshTraceableData.AddRange(MeshGroupExtraData[meshGroupIndex].meshTraceableData); } } - asynchPlatingDatas.Add(meshData); + asyncPlatingDatas.Add(meshData); } } @@ -545,17 +545,17 @@ namespace MatterHackers.MatterControl.Plugins.BrailleBuilder private void PullMeshDataFromAsynchLists() { MeshGroups.Clear(); - foreach (MeshGroup mesh in asynchMeshGroups) + foreach (MeshGroup mesh in asyncMeshGroups) { MeshGroups.Add(mesh); } MeshGroupTransforms.Clear(); - foreach (ScaleRotateTranslate transform in asynchMeshGroupTransforms) + foreach (ScaleRotateTranslate transform in asyncMeshGroupTransforms) { MeshGroupTransforms.Add(transform); } MeshGroupExtraData.Clear(); - foreach (PlatingMeshGroupData meshData in asynchPlatingDatas) + foreach (PlatingMeshGroupData meshData in asyncPlatingDatas) { MeshGroupExtraData.Add(meshData); } @@ -893,7 +893,7 @@ namespace MatterHackers.MatterControl.Plugins.BrailleBuilder processingProgressControl.PercentComplete = 0; LockEditControls(); - // we sent the data to the asynch lists but we will not pull it back out (only use it as a temp holder). + // we sent the data to the async lists but we will not pull it back out (only use it as a temp holder). PushMeshGroupDataToAsynchLists(true); string fileName = "BrailleBuilder_{0}".FormatWith(Path.ChangeExtension(Path.GetRandomFileName(), ".amf")); @@ -923,14 +923,14 @@ namespace MatterHackers.MatterControl.Plugins.BrailleBuilder try { // push all the transforms into the meshes - for (int i = 0; i < asynchMeshGroups.Count; i++) + for (int i = 0; i < asyncMeshGroups.Count; i++) { - asynchMeshGroups[i].Transform(MeshGroupTransforms[i].TotalTransform); + asyncMeshGroups[i].Transform(MeshGroupTransforms[i].TotalTransform); - processingProgressControl.RatioComplete = (double)i / asynchMeshGroups.Count * .1; + processingProgressControl.RatioComplete = (double)i / asyncMeshGroups.Count * .1; } - MeshFileIo.Save(asynchMeshGroups, filePath); + MeshFileIo.Save(asyncMeshGroups, filePath); } catch (System.UnauthorizedAccessException) { diff --git a/MatterControl.csproj b/MatterControl.csproj index c21e35db5..cf3aee942 100644 --- a/MatterControl.csproj +++ b/MatterControl.csproj @@ -184,7 +184,7 @@ - + diff --git a/PartPreviewWindow/PlatingHelper.cs b/PartPreviewWindow/PlatingHelper.cs index f892124e7..596cec830 100644 --- a/PartPreviewWindow/PlatingHelper.cs +++ b/PartPreviewWindow/PlatingHelper.cs @@ -105,89 +105,89 @@ namespace MatterHackers.MatterControl return output; } - public static void ArrangeMeshGroups(List asynchMeshGroups, List asynchMeshGroupTransforms, List asynchPlatingDatas, + public static void ArrangeMeshGroups(List asyncMeshGroups, List asyncMeshGroupTransforms, List asyncPlatingDatas, Action reportProgressChanged) { // move them all out of the way - for (int i = 0; i < asynchMeshGroups.Count; i++) + for (int i = 0; i < asyncMeshGroups.Count; i++) { - ScaleRotateTranslate translate = asynchMeshGroupTransforms[i]; + ScaleRotateTranslate translate = asyncMeshGroupTransforms[i]; translate.translation *= Matrix4X4.CreateTranslation(10000, 10000, 0); - asynchMeshGroupTransforms[i] = translate; + asyncMeshGroupTransforms[i] = translate; } // sort them by size - for (int i = 0; i < asynchMeshGroups.Count; i++) + for (int i = 0; i < asyncMeshGroups.Count; i++) { - AxisAlignedBoundingBox iAABB = asynchMeshGroups[i].GetAxisAlignedBoundingBox(asynchMeshGroupTransforms[i].TotalTransform); - for (int j = i + 1; j < asynchMeshGroups.Count; j++) + AxisAlignedBoundingBox iAABB = asyncMeshGroups[i].GetAxisAlignedBoundingBox(asyncMeshGroupTransforms[i].TotalTransform); + for (int j = i + 1; j < asyncMeshGroups.Count; j++) { - AxisAlignedBoundingBox jAABB = asynchMeshGroups[j].GetAxisAlignedBoundingBox(asynchMeshGroupTransforms[j].TotalTransform); + AxisAlignedBoundingBox jAABB = asyncMeshGroups[j].GetAxisAlignedBoundingBox(asyncMeshGroupTransforms[j].TotalTransform); if (Math.Max(iAABB.XSize, iAABB.YSize) < Math.Max(jAABB.XSize, jAABB.YSize)) { - PlatingMeshGroupData tempData = asynchPlatingDatas[i]; - asynchPlatingDatas[i] = asynchPlatingDatas[j]; - asynchPlatingDatas[j] = tempData; + PlatingMeshGroupData tempData = asyncPlatingDatas[i]; + asyncPlatingDatas[i] = asyncPlatingDatas[j]; + asyncPlatingDatas[j] = tempData; - MeshGroup tempMeshGroup = asynchMeshGroups[i]; - asynchMeshGroups[i] = asynchMeshGroups[j]; - asynchMeshGroups[j] = tempMeshGroup; + MeshGroup tempMeshGroup = asyncMeshGroups[i]; + asyncMeshGroups[i] = asyncMeshGroups[j]; + asyncMeshGroups[j] = tempMeshGroup; - ScaleRotateTranslate iTransform = asynchMeshGroupTransforms[i]; - ScaleRotateTranslate jTransform = asynchMeshGroupTransforms[j]; + ScaleRotateTranslate iTransform = asyncMeshGroupTransforms[i]; + ScaleRotateTranslate jTransform = asyncMeshGroupTransforms[j]; Matrix4X4 tempTransform = iTransform.translation; iTransform.translation = jTransform.translation; jTransform.translation = tempTransform; - asynchMeshGroupTransforms[i] = jTransform; - asynchMeshGroupTransforms[j] = iTransform; + asyncMeshGroupTransforms[i] = jTransform; + asyncMeshGroupTransforms[j] = iTransform; iAABB = jAABB; } } } - double ratioPerMeshGroup = 1.0 / asynchMeshGroups.Count; + double ratioPerMeshGroup = 1.0 / asyncMeshGroups.Count; double currentRatioDone = 0; // put them onto the plate (try the center) starting with the biggest and moving down - for (int meshGroupIndex = 0; meshGroupIndex < asynchMeshGroups.Count; meshGroupIndex++) + for (int meshGroupIndex = 0; meshGroupIndex < asyncMeshGroups.Count; meshGroupIndex++) { reportProgressChanged(currentRatioDone, "Calculating Positions...".Localize()); - MeshGroup meshGroup = asynchMeshGroups[meshGroupIndex]; - Vector3 meshLowerLeft = meshGroup.GetAxisAlignedBoundingBox(asynchMeshGroupTransforms[meshGroupIndex].TotalTransform).minXYZ; - ScaleRotateTranslate atZero = asynchMeshGroupTransforms[meshGroupIndex]; + MeshGroup meshGroup = asyncMeshGroups[meshGroupIndex]; + Vector3 meshLowerLeft = meshGroup.GetAxisAlignedBoundingBox(asyncMeshGroupTransforms[meshGroupIndex].TotalTransform).minXYZ; + ScaleRotateTranslate atZero = asyncMeshGroupTransforms[meshGroupIndex]; atZero.translation *= Matrix4X4.CreateTranslation(-meshLowerLeft); - asynchMeshGroupTransforms[meshGroupIndex] = atZero; + asyncMeshGroupTransforms[meshGroupIndex] = atZero; - PlatingHelper.MoveMeshGroupToOpenPosition(meshGroupIndex, asynchPlatingDatas, asynchMeshGroups, asynchMeshGroupTransforms); + PlatingHelper.MoveMeshGroupToOpenPosition(meshGroupIndex, asyncPlatingDatas, asyncMeshGroups, asyncMeshGroupTransforms); // and create the trace info so we can select it - if (asynchPlatingDatas[meshGroupIndex].meshTraceableData.Count == 0) + if (asyncPlatingDatas[meshGroupIndex].meshTraceableData.Count == 0) { - PlatingHelper.CreateITraceableForMeshGroup(asynchPlatingDatas, asynchMeshGroups, meshGroupIndex, null); + PlatingHelper.CreateITraceableForMeshGroup(asyncPlatingDatas, asyncMeshGroups, meshGroupIndex, null); } currentRatioDone += ratioPerMeshGroup; // and put it on the bed - PlatingHelper.PlaceMeshGroupOnBed(asynchMeshGroups, asynchMeshGroupTransforms, meshGroupIndex); + PlatingHelper.PlaceMeshGroupOnBed(asyncMeshGroups, asyncMeshGroupTransforms, meshGroupIndex); } // and finally center whatever we have as a group { - AxisAlignedBoundingBox bounds = asynchMeshGroups[0].GetAxisAlignedBoundingBox(asynchMeshGroupTransforms[0].TotalTransform); - for (int i = 1; i < asynchMeshGroups.Count; i++) + AxisAlignedBoundingBox bounds = asyncMeshGroups[0].GetAxisAlignedBoundingBox(asyncMeshGroupTransforms[0].TotalTransform); + for (int i = 1; i < asyncMeshGroups.Count; i++) { - bounds = AxisAlignedBoundingBox.Union(bounds, asynchMeshGroups[i].GetAxisAlignedBoundingBox(asynchMeshGroupTransforms[i].TotalTransform)); + bounds = AxisAlignedBoundingBox.Union(bounds, asyncMeshGroups[i].GetAxisAlignedBoundingBox(asyncMeshGroupTransforms[i].TotalTransform)); } Vector3 boundsCenter = (bounds.maxXYZ + bounds.minXYZ) / 2; - for (int i = 0; i < asynchMeshGroups.Count; i++) + for (int i = 0; i < asyncMeshGroups.Count; i++) { - ScaleRotateTranslate translate = asynchMeshGroupTransforms[i]; + ScaleRotateTranslate translate = asyncMeshGroupTransforms[i]; translate.translation *= Matrix4X4.CreateTranslation(-boundsCenter + new Vector3(0, 0, bounds.ZSize / 2)); - asynchMeshGroupTransforms[i] = translate; + asyncMeshGroupTransforms[i] = translate; } } } diff --git a/PartPreviewWindow/View3D/View3DAlign.cs b/PartPreviewWindow/View3D/View3DAlign.cs index 2408530e9..2f7aa6182 100644 --- a/PartPreviewWindow/View3D/View3DAlign.cs +++ b/PartPreviewWindow/View3D/View3DAlign.cs @@ -53,18 +53,18 @@ namespace MatterHackers.MatterControl.PartPreviewWindow PushMeshGroupDataToAsynchLists(TraceInfoOpperation.DO_COPY); // try to move all the not selected meshes relative to the selected mesh - AxisAlignedBoundingBox selectedOriginalBounds = asynchMeshGroups[SelectedMeshGroupIndex].GetAxisAlignedBoundingBox(); + AxisAlignedBoundingBox selectedOriginalBounds = asyncMeshGroups[SelectedMeshGroupIndex].GetAxisAlignedBoundingBox(); Vector3 selectedOriginalCenter = selectedOriginalBounds.Center; - AxisAlignedBoundingBox selectedCurrentBounds = asynchMeshGroups[SelectedMeshGroupIndex].GetAxisAlignedBoundingBox(asynchMeshGroupTransforms[SelectedMeshGroupIndex].TotalTransform); + AxisAlignedBoundingBox selectedCurrentBounds = asyncMeshGroups[SelectedMeshGroupIndex].GetAxisAlignedBoundingBox(asyncMeshGroupTransforms[SelectedMeshGroupIndex].TotalTransform); Vector3 selctedCurrentCenter = selectedCurrentBounds.Center; - for (int meshGroupToMoveIndex = 0; meshGroupToMoveIndex < asynchMeshGroups.Count; meshGroupToMoveIndex++) + for (int meshGroupToMoveIndex = 0; meshGroupToMoveIndex < asyncMeshGroups.Count; meshGroupToMoveIndex++) { - MeshGroup meshGroupToMove = asynchMeshGroups[meshGroupToMoveIndex]; - if (meshGroupToMove != asynchMeshGroups[SelectedMeshGroupIndex]) + MeshGroup meshGroupToMove = asyncMeshGroups[meshGroupToMoveIndex]; + if (meshGroupToMove != asyncMeshGroups[SelectedMeshGroupIndex]) { AxisAlignedBoundingBox groupToMoveOriginalBounds = meshGroupToMove.GetAxisAlignedBoundingBox(); Vector3 groupToMoveOriginalCenter = groupToMoveOriginalBounds.Center; - AxisAlignedBoundingBox groupToMoveBounds = meshGroupToMove.GetAxisAlignedBoundingBox(asynchMeshGroupTransforms[meshGroupToMoveIndex].TotalTransform); + AxisAlignedBoundingBox groupToMoveBounds = meshGroupToMove.GetAxisAlignedBoundingBox(asyncMeshGroupTransforms[meshGroupToMoveIndex].TotalTransform); Vector3 groupToMoveCenter = groupToMoveBounds.Center; Vector3 originalCoordinatesDelta = groupToMoveOriginalCenter - selectedOriginalCenter; @@ -74,19 +74,19 @@ namespace MatterHackers.MatterControl.PartPreviewWindow if (deltaRequired.Length > .0001) { - ScaleRotateTranslate translated = asynchMeshGroupTransforms[meshGroupToMoveIndex]; + ScaleRotateTranslate translated = asyncMeshGroupTransforms[meshGroupToMoveIndex]; translated.translation *= Matrix4X4.CreateTranslation(deltaRequired); - asynchMeshGroupTransforms[meshGroupToMoveIndex] = translated; + asyncMeshGroupTransforms[meshGroupToMoveIndex] = translated; PartHasBeenChanged(); } } } // now put all the meshes into just one group - MeshGroup meshGroupWeAreKeeping = asynchMeshGroups[SelectedMeshGroupIndex]; - for (int meshGroupToMoveIndex = asynchMeshGroups.Count - 1; meshGroupToMoveIndex >= 0; meshGroupToMoveIndex--) + MeshGroup meshGroupWeAreKeeping = asyncMeshGroups[SelectedMeshGroupIndex]; + for (int meshGroupToMoveIndex = asyncMeshGroups.Count - 1; meshGroupToMoveIndex >= 0; meshGroupToMoveIndex--) { - MeshGroup meshGroupToMove = asynchMeshGroups[meshGroupToMoveIndex]; + MeshGroup meshGroupToMove = asyncMeshGroups[meshGroupToMoveIndex]; if (meshGroupToMove != meshGroupWeAreKeeping) { // move all the meshes into the new aligned mesh group @@ -96,23 +96,23 @@ namespace MatterHackers.MatterControl.PartPreviewWindow meshGroupWeAreKeeping.Meshes.Add(mesh); } - asynchMeshGroups.RemoveAt(meshGroupToMoveIndex); - asynchMeshGroupTransforms.RemoveAt(meshGroupToMoveIndex); + asyncMeshGroups.RemoveAt(meshGroupToMoveIndex); + asyncMeshGroupTransforms.RemoveAt(meshGroupToMoveIndex); } } - asynchPlatingDatas.Clear(); - double ratioPerMeshGroup = 1.0 / asynchMeshGroups.Count; + asyncPlatingDatas.Clear(); + double ratioPerMeshGroup = 1.0 / asyncMeshGroups.Count; double currentRatioDone = 0; - for (int i = 0; i < asynchMeshGroups.Count; i++) + for (int i = 0; i < asyncMeshGroups.Count; i++) { PlatingMeshGroupData newInfo = new PlatingMeshGroupData(); - asynchPlatingDatas.Add(newInfo); + asyncPlatingDatas.Add(newInfo); - MeshGroup meshGroup = asynchMeshGroups[i]; + MeshGroup meshGroup = asyncMeshGroups[i]; // create the selection info - PlatingHelper.CreateITraceableForMeshGroup(asynchPlatingDatas, asynchMeshGroups, i, (double progress0To1, string processingState, out bool continueProcessing) => + PlatingHelper.CreateITraceableForMeshGroup(asyncPlatingDatas, asyncMeshGroups, i, (double progress0To1, string processingState, out bool continueProcessing) => { ReportProgressChanged(progress0To1, processingState, out continueProcessing); }); diff --git a/PartPreviewWindow/View3D/View3DAutoArange.cs b/PartPreviewWindow/View3D/View3DAutoArange.cs index dcb0222bc..2689d9a22 100644 --- a/PartPreviewWindow/View3D/View3DAutoArange.cs +++ b/PartPreviewWindow/View3D/View3DAutoArange.cs @@ -58,7 +58,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; PushMeshGroupDataToAsynchLists(TraceInfoOpperation.DONT_COPY); - PlatingHelper.ArrangeMeshGroups(asynchMeshGroups, asynchMeshGroupTransforms, asynchPlatingDatas, ReportProgressChanged); + PlatingHelper.ArrangeMeshGroups(asyncMeshGroups, asyncMeshGroupTransforms, asyncPlatingDatas, ReportProgressChanged); }); if (WidgetHasBeenClosed) @@ -67,11 +67,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow } // offset them to the centor of the bed - for (int i = 0; i < asynchMeshGroups.Count; i++) + for (int i = 0; i < asyncMeshGroups.Count; i++) { - ScaleRotateTranslate translate = asynchMeshGroupTransforms[i]; + ScaleRotateTranslate translate = asyncMeshGroupTransforms[i]; translate.translation *= Matrix4X4.CreateTranslation(new Vector3(ActiveSliceSettings.Instance.BedCenter, 0)); - asynchMeshGroupTransforms[i] = translate; + asyncMeshGroupTransforms[i] = translate; } UnlockEditControls(); diff --git a/PartPreviewWindow/View3D/View3DCopyGroup.cs b/PartPreviewWindow/View3D/View3DCopyGroup.cs index dd9282747..1c167ed72 100644 --- a/PartPreviewWindow/View3D/View3DCopyGroup.cs +++ b/PartPreviewWindow/View3D/View3DCopyGroup.cs @@ -44,20 +44,20 @@ namespace MatterHackers.MatterControl.PartPreviewWindow PushMeshGroupDataToAsynchLists(TraceInfoOpperation.DO_COPY); - MeshGroup meshGroupToCopy = asynchMeshGroups[SelectedMeshGroupIndex]; + MeshGroup meshGroupToCopy = asyncMeshGroups[SelectedMeshGroupIndex]; MeshGroup copyMeshGroup = new MeshGroup(); double meshCount = meshGroupToCopy.Meshes.Count; for (int i = 0; i < meshCount; i++) { - Mesh mesh = asynchMeshGroups[SelectedMeshGroupIndex].Meshes[i]; + Mesh mesh = asyncMeshGroups[SelectedMeshGroupIndex].Meshes[i]; copyMeshGroup.Meshes.Add(Mesh.Copy(mesh, (double progress0To1, string processingState, out bool continueProcessing) => { ReportProgressChanged(progress0To1, processingState, out continueProcessing); })); } - PlatingHelper.FindPositionForGroupAndAddToPlate(copyMeshGroup, SelectedMeshGroupTransform, asynchPlatingDatas, asynchMeshGroups, asynchMeshGroupTransforms); - PlatingHelper.CreateITraceableForMeshGroup(asynchPlatingDatas, asynchMeshGroups, asynchMeshGroups.Count - 1, null); + PlatingHelper.FindPositionForGroupAndAddToPlate(copyMeshGroup, SelectedMeshGroupTransform, asyncPlatingDatas, asyncMeshGroups, asyncMeshGroupTransforms); + PlatingHelper.CreateITraceableForMeshGroup(asyncPlatingDatas, asyncMeshGroups, asyncMeshGroups.Count - 1, null); bool continueProcessing2; ReportProgressChanged(.95, "", out continueProcessing2); diff --git a/PartPreviewWindow/View3D/View3DCreateSelecitonData.cs b/PartPreviewWindow/View3D/View3DCreateSelectionData.cs similarity index 90% rename from PartPreviewWindow/View3D/View3DCreateSelecitonData.cs rename to PartPreviewWindow/View3D/View3DCreateSelectionData.cs index d493d7bd3..14046f281 100644 --- a/PartPreviewWindow/View3D/View3DCreateSelecitonData.cs +++ b/PartPreviewWindow/View3D/View3DCreateSelectionData.cs @@ -52,18 +52,18 @@ namespace MatterHackers.MatterControl.PartPreviewWindow PushMeshGroupDataToAsynchLists(TraceInfoOpperation.DONT_COPY); - asynchPlatingDatas.Clear(); - double ratioPerMeshGroup = 1.0 / asynchMeshGroups.Count; + asyncPlatingDatas.Clear(); + double ratioPerMeshGroup = 1.0 / asyncMeshGroups.Count; double currentRatioDone = 0; - for (int i = 0; i < asynchMeshGroups.Count; i++) + for (int i = 0; i < asyncMeshGroups.Count; i++) { PlatingMeshGroupData newInfo = new PlatingMeshGroupData(); - asynchPlatingDatas.Add(newInfo); + asyncPlatingDatas.Add(newInfo); - MeshGroup meshGroup = asynchMeshGroups[i]; + MeshGroup meshGroup = asyncMeshGroups[i]; // create the selection info - PlatingHelper.CreateITraceableForMeshGroup(asynchPlatingDatas, asynchMeshGroups, i, (double progress0To1, string processingState, out bool continueProcessing) => + PlatingHelper.CreateITraceableForMeshGroup(asyncPlatingDatas, asyncMeshGroups, i, (double progress0To1, string processingState, out bool continueProcessing) => { ReportProgressChanged(progress0To1, processingState, out continueProcessing); }); @@ -73,7 +73,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow bool continueProcessing2; ReportProgressChanged(1, "Creating GL Data", out continueProcessing2); - meshViewerWidget.CreateGlDataForMeshes(asynchMeshGroups); + meshViewerWidget.CreateGlDataForMeshes(asyncMeshGroups); } private async void EnterEditAndCreateSelectionData() diff --git a/PartPreviewWindow/View3D/View3DGroup.cs b/PartPreviewWindow/View3D/View3DGroup.cs index 61c24d024..89bd51e19 100644 --- a/PartPreviewWindow/View3D/View3DGroup.cs +++ b/PartPreviewWindow/View3D/View3DGroup.cs @@ -49,12 +49,12 @@ namespace MatterHackers.MatterControl.PartPreviewWindow PushMeshGroupDataToAsynchLists(TraceInfoOpperation.DO_COPY); - for (int i = 0; i < asynchMeshGroups.Count; i++) + for (int i = 0; i < asyncMeshGroups.Count; i++) { - asynchMeshGroups[i].Transform(asynchMeshGroupTransforms[i].TotalTransform); + asyncMeshGroups[i].Transform(asyncMeshGroupTransforms[i].TotalTransform); bool continueProcessing; - ReportProgressChanged((i + 1) * .4 / asynchMeshGroups.Count, "", out continueProcessing); + ReportProgressChanged((i + 1) * .4 / asyncMeshGroups.Count, "", out continueProcessing); } if (SelectedMeshGroupIndex == -1) @@ -62,10 +62,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow SelectedMeshGroupIndex = 0; } - MeshGroup meshGroupWeAreKeeping = asynchMeshGroups[SelectedMeshGroupIndex]; - for (int meshGroupToMoveIndex = asynchMeshGroups.Count - 1; meshGroupToMoveIndex >= 0; meshGroupToMoveIndex--) + MeshGroup meshGroupWeAreKeeping = asyncMeshGroups[SelectedMeshGroupIndex]; + for (int meshGroupToMoveIndex = asyncMeshGroups.Count - 1; meshGroupToMoveIndex >= 0; meshGroupToMoveIndex--) { - MeshGroup meshGroupToMove = asynchMeshGroups[meshGroupToMoveIndex]; + MeshGroup meshGroupToMove = asyncMeshGroups[meshGroupToMoveIndex]; if (meshGroupToMove != meshGroupWeAreKeeping) { for (int moveIndex = 0; moveIndex < meshGroupToMove.Meshes.Count; moveIndex++) @@ -74,27 +74,27 @@ namespace MatterHackers.MatterControl.PartPreviewWindow meshGroupWeAreKeeping.Meshes.Add(mesh); } - asynchMeshGroups.RemoveAt(meshGroupToMoveIndex); - asynchMeshGroupTransforms.RemoveAt(meshGroupToMoveIndex); + asyncMeshGroups.RemoveAt(meshGroupToMoveIndex); + asyncMeshGroupTransforms.RemoveAt(meshGroupToMoveIndex); } else { - asynchMeshGroupTransforms[meshGroupToMoveIndex] = ScaleRotateTranslate.Identity(); + asyncMeshGroupTransforms[meshGroupToMoveIndex] = ScaleRotateTranslate.Identity(); } } - asynchPlatingDatas.Clear(); - double ratioPerMeshGroup = 1.0 / asynchMeshGroups.Count; + asyncPlatingDatas.Clear(); + double ratioPerMeshGroup = 1.0 / asyncMeshGroups.Count; double currentRatioDone = 0; - for (int i = 0; i < asynchMeshGroups.Count; i++) + for (int i = 0; i < asyncMeshGroups.Count; i++) { PlatingMeshGroupData newInfo = new PlatingMeshGroupData(); - asynchPlatingDatas.Add(newInfo); + asyncPlatingDatas.Add(newInfo); - MeshGroup meshGroup = asynchMeshGroups[i]; + MeshGroup meshGroup = asyncMeshGroups[i]; // create the selection info - PlatingHelper.CreateITraceableForMeshGroup(asynchPlatingDatas, asynchMeshGroups, i, (double progress0To1, string processingState, out bool continueProcessing) => + PlatingHelper.CreateITraceableForMeshGroup(asyncPlatingDatas, asyncMeshGroups, i, (double progress0To1, string processingState, out bool continueProcessing) => { ReportProgressChanged(progress0To1, processingState, out continueProcessing); }); diff --git a/PartPreviewWindow/View3D/View3DUngroup.cs b/PartPreviewWindow/View3D/View3DUngroup.cs index 299200996..e4ca51dca 100644 --- a/PartPreviewWindow/View3D/View3DUngroup.cs +++ b/PartPreviewWindow/View3D/View3DUngroup.cs @@ -56,44 +56,44 @@ namespace MatterHackers.MatterControl.PartPreviewWindow int indexBeingReplaced = SelectedMeshGroupIndex; List discreetMeshes = new List(); - asynchMeshGroups[indexBeingReplaced].Transform(asynchMeshGroupTransforms[indexBeingReplaced].TotalTransform); + asyncMeshGroups[indexBeingReplaced].Transform(asyncMeshGroupTransforms[indexBeingReplaced].TotalTransform); // if there are multiple meshes than just make them separate groups - if (asynchMeshGroups[indexBeingReplaced].Meshes.Count > 1) + if (asyncMeshGroups[indexBeingReplaced].Meshes.Count > 1) { - foreach (Mesh mesh in asynchMeshGroups[indexBeingReplaced].Meshes) + foreach (Mesh mesh in asyncMeshGroups[indexBeingReplaced].Meshes) { discreetMeshes.Add(mesh); } } else // actually try and cut up the mesh into separate parts { - discreetMeshes = CreateDiscreteMeshes.SplitConnectedIntoMeshes(asynchMeshGroups[indexBeingReplaced], (double progress0To1, string processingState, out bool continueProcessing) => + discreetMeshes = CreateDiscreteMeshes.SplitConnectedIntoMeshes(asyncMeshGroups[indexBeingReplaced], (double progress0To1, string processingState, out bool continueProcessing) => { ReportProgressChanged(progress0To1 * .5, processingState, out continueProcessing); }); } - asynchMeshGroups.RemoveAt(indexBeingReplaced); - asynchPlatingDatas.RemoveAt(indexBeingReplaced); - asynchMeshGroupTransforms.RemoveAt(indexBeingReplaced); + asyncMeshGroups.RemoveAt(indexBeingReplaced); + asyncPlatingDatas.RemoveAt(indexBeingReplaced); + asyncMeshGroupTransforms.RemoveAt(indexBeingReplaced); double ratioPerDiscreetMesh = 1.0 / discreetMeshes.Count; double currentRatioDone = 0; for (int discreetMeshIndex = 0; discreetMeshIndex < discreetMeshes.Count; discreetMeshIndex++) { PlatingMeshGroupData newInfo = new PlatingMeshGroupData(); - asynchPlatingDatas.Add(newInfo); - asynchMeshGroups.Add(new MeshGroup(discreetMeshes[discreetMeshIndex])); - int addedMeshIndex = asynchMeshGroups.Count - 1; - MeshGroup addedMeshGroup = asynchMeshGroups[addedMeshIndex]; + asyncPlatingDatas.Add(newInfo); + asyncMeshGroups.Add(new MeshGroup(discreetMeshes[discreetMeshIndex])); + int addedMeshIndex = asyncMeshGroups.Count - 1; + MeshGroup addedMeshGroup = asyncMeshGroups[addedMeshIndex]; ScaleRotateTranslate transform = ScaleRotateTranslate.Identity(); transform.SetCenteringForMeshGroup(addedMeshGroup); - asynchMeshGroupTransforms.Add(transform); + asyncMeshGroupTransforms.Add(transform); - //PlatingHelper.PlaceMeshGroupOnBed(asynchMeshGroups, asynchMeshGroupTransforms, addedMeshIndex, false); + //PlatingHelper.PlaceMeshGroupOnBed(asyncMeshGroups, asyncMeshGroupTransforms, addedMeshIndex, false); // and create selection info - PlatingHelper.CreateITraceableForMeshGroup(asynchPlatingDatas, asynchMeshGroups, addedMeshIndex, (double progress0To1, string processingState, out bool continueProcessing) => + PlatingHelper.CreateITraceableForMeshGroup(asyncPlatingDatas, asyncMeshGroups, addedMeshIndex, (double progress0To1, string processingState, out bool continueProcessing) => { ReportProgressChanged(.5 + progress0To1 * .5 * currentRatioDone, processingState, out continueProcessing); }); diff --git a/PartPreviewWindow/View3D/View3DWidget.cs b/PartPreviewWindow/View3D/View3DWidget.cs index 88d7ba6e9..607e3ddb7 100644 --- a/PartPreviewWindow/View3D/View3DWidget.cs +++ b/PartPreviewWindow/View3D/View3DWidget.cs @@ -64,9 +64,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow private readonly int EditButtonHeight = 44; private Action afterSaveCallback = null; private Button applyScaleButton; - private List asynchMeshGroups = new List(); - private List asynchMeshGroupTransforms = new List(); - private List asynchPlatingDatas = new List(); + private List asyncMeshGroups = new List(); + private List asyncMeshGroupTransforms = new List(); + private List asyncPlatingDatas = new List(); private FlowLayoutWidget doEdittingButtonsContainer; private bool editorThatRequestedSave = false; private FlowLayoutWidget enterEditButtonsContainer; @@ -1847,7 +1847,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow UnlockEditControls(); PartHasBeenChanged(); - bool addingOnlyOneItem = asynchMeshGroups.Count == MeshGroups.Count + 1; + bool addingOnlyOneItem = asyncMeshGroups.Count == MeshGroups.Count + 1; if (MeshGroups.Count > 0) { @@ -1855,7 +1855,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow if (addingOnlyOneItem) { // if we are only adding one part to the plate set the selection to it - SelectedMeshGroupIndex = asynchMeshGroups.Count - 1; + SelectedMeshGroupIndex = asyncMeshGroups.Count - 1; } } } @@ -1917,12 +1917,12 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { MeshGroup meshGroup = loadedMeshGroups[subMeshIndex]; - PlatingHelper.FindPositionForGroupAndAddToPlate(meshGroup, ScaleRotateTranslate.Identity(), asynchPlatingDatas, asynchMeshGroups, asynchMeshGroupTransforms); + PlatingHelper.FindPositionForGroupAndAddToPlate(meshGroup, ScaleRotateTranslate.Identity(), asyncPlatingDatas, asyncMeshGroups, asyncMeshGroupTransforms); if (WidgetHasBeenClosed) { return; } - PlatingHelper.CreateITraceableForMeshGroup(asynchPlatingDatas, asynchMeshGroups, asynchMeshGroups.Count - 1, (double progress0To1, string processingState, out bool continueProcessing) => + PlatingHelper.CreateITraceableForMeshGroup(asyncPlatingDatas, asyncMeshGroups, asyncMeshGroups.Count - 1, (double progress0To1, string processingState, out bool continueProcessing) => { continueProcessing = !this.WidgetHasBeenClosed; double ratioAvailable = (ratioPerFile * .5); @@ -2047,19 +2047,19 @@ namespace MatterHackers.MatterControl.PartPreviewWindow printItemWrapper = new PrintItemWrapper(printItem, returnInfo.destinationLibraryProvider.GetProviderLocator()); } - // we sent the data to the asynch lists but we will not pull it back out (only use it as a temp holder). + // we sent the data to the async lists but we will not pull it back out (only use it as a temp holder). PushMeshGroupDataToAsynchLists(TraceInfoOpperation.DO_COPY); Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; try { // push all the transforms into the meshes - for (int i = 0; i < asynchMeshGroups.Count; i++) + for (int i = 0; i < asyncMeshGroups.Count; i++) { - asynchMeshGroups[i].Transform(asynchMeshGroupTransforms[i].TotalTransform); + asyncMeshGroups[i].Transform(asyncMeshGroupTransforms[i].TotalTransform); bool continueProcessing; - ReportProgressChanged((i + 1) * .4 / asynchMeshGroups.Count, "", out continueProcessing); + ReportProgressChanged((i + 1) * .4 / asyncMeshGroups.Count, "", out continueProcessing); } string[] metaData = { "Created By", "MatterControl", "BedPosition", "Absolute" }; @@ -2112,7 +2112,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow string tempFileNameToSaveTo = ApplicationDataStorage.Instance.GetTempFileName("amf"); // save to the new temp location - bool savedSuccessfully = MeshFileIo.Save(asynchMeshGroups, tempFileNameToSaveTo, outputInfo, ReportProgressChanged); + bool savedSuccessfully = MeshFileIo.Save(asyncMeshGroups, tempFileNameToSaveTo, outputInfo, ReportProgressChanged); // Swap out the files if the save operation completed successfully if (savedSuccessfully && File.Exists(tempFileNameToSaveTo)) @@ -2137,7 +2137,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow } else // we are saving a new file and it will not exist until we are done { - MeshFileIo.Save(asynchMeshGroups, printItemWrapper.FileLocation, outputInfo, ReportProgressChanged); + MeshFileIo.Save(asyncMeshGroups, printItemWrapper.FileLocation, outputInfo, ReportProgressChanged); } // Wait for a second to report the file changed to give the OS a chance to finish closing it. @@ -2191,7 +2191,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow } UnlockEditControls(); - // NOTE: we do not pull the data back out of the asynch lists. + // NOTE: we do not pull the data back out of the async lists. if (saveSucceded) { saveButtons.Visible = false; @@ -2325,23 +2325,23 @@ namespace MatterHackers.MatterControl.PartPreviewWindow private void PullMeshGroupDataFromAsynchLists() { - if (MeshGroups.Count != asynchMeshGroups.Count) + if (MeshGroups.Count != asyncMeshGroups.Count) { PartHasBeenChanged(); } MeshGroups.Clear(); - foreach (MeshGroup meshGroup in asynchMeshGroups) + foreach (MeshGroup meshGroup in asyncMeshGroups) { MeshGroups.Add(meshGroup); } MeshGroupTransforms.Clear(); - foreach (ScaleRotateTranslate transform in asynchMeshGroupTransforms) + foreach (ScaleRotateTranslate transform in asyncMeshGroupTransforms) { MeshGroupTransforms.Add(transform); } MeshGroupExtraData.Clear(); - foreach (PlatingMeshGroupData meshData in asynchPlatingDatas) + foreach (PlatingMeshGroupData meshData in asyncPlatingDatas) { MeshGroupExtraData.Add(meshData); } @@ -2359,8 +2359,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { processingProgressControl.ProgressMessage = "Async Copy"; }); - asynchMeshGroups.Clear(); - asynchMeshGroupTransforms.Clear(); + asyncMeshGroups.Clear(); + asyncMeshGroupTransforms.Clear(); for (int meshGroupIndex = 0; meshGroupIndex < MeshGroups.Count; meshGroupIndex++) { MeshGroup meshGroup = MeshGroups[meshGroupIndex]; @@ -2370,10 +2370,10 @@ namespace MatterHackers.MatterControl.PartPreviewWindow Mesh mesh = meshGroup.Meshes[meshIndex]; newMeshGroup.Meshes.Add(Mesh.Copy(mesh)); } - asynchMeshGroups.Add(newMeshGroup); - asynchMeshGroupTransforms.Add(MeshGroupTransforms[meshGroupIndex]); + asyncMeshGroups.Add(newMeshGroup); + asyncMeshGroupTransforms.Add(MeshGroupTransforms[meshGroupIndex]); } - asynchPlatingDatas.Clear(); + asyncPlatingDatas.Clear(); for (int meshGroupIndex = 0; meshGroupIndex < MeshGroupExtraData.Count; meshGroupIndex++) { @@ -2386,7 +2386,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow meshData.meshTraceableData.AddRange(MeshGroupExtraData[meshGroupIndex].meshTraceableData); } - asynchPlatingDatas.Add(meshData); + asyncPlatingDatas.Add(meshData); } UiThread.RunOnIdle(() => { diff --git a/Submodules/MatterSlice b/Submodules/MatterSlice index 4c7a7fa7f..3527173ac 160000 --- a/Submodules/MatterSlice +++ b/Submodules/MatterSlice @@ -1 +1 @@ -Subproject commit 4c7a7fa7fb3c81fe34e974272300b93749808ec2 +Subproject commit 3527173acb9687e3fc072a5208359474f305f987 diff --git a/TextCreator/View3DTextCreator.cs b/TextCreator/View3DTextCreator.cs index 0b8502d47..e3291a7cb 100644 --- a/TextCreator/View3DTextCreator.cs +++ b/TextCreator/View3DTextCreator.cs @@ -76,9 +76,9 @@ namespace MatterHackers.MatterControl.Plugins.TextCreator private Button closeButton; private String word; - private List asynchMeshGroups = new List(); - private List asynchMeshGroupTransforms = new List(); - private List asynchPlatingDatas = new List(); + private List asyncMeshGroups = new List(); + private List asyncMeshGroupTransforms = new List(); + private List asyncPlatingDatas = new List(); private List MeshGroupExtraData; @@ -428,9 +428,9 @@ namespace MatterHackers.MatterControl.Plugins.TextCreator { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; - asynchMeshGroups.Clear(); - asynchMeshGroupTransforms.Clear(); - asynchPlatingDatas.Clear(); + asyncMeshGroups.Clear(); + asyncMeshGroupTransforms.Clear(); + asyncPlatingDatas.Clear(); TypeFacePrinter printer = new TypeFacePrinter(currentText, new StyledTypeFace(boldTypeFace, 12)); Vector2 size = printer.GetSize(currentText); @@ -440,22 +440,22 @@ namespace MatterHackers.MatterControl.Plugins.TextCreator double currentRatioDone = 0; for (int i = 0; i < currentText.Length; i++) { - int newIndex = asynchMeshGroups.Count; + int newIndex = asyncMeshGroups.Count; TypeFacePrinter letterPrinter = new TypeFacePrinter(currentText[i].ToString(), new StyledTypeFace(boldTypeFace, 12)); Mesh textMesh = VertexSourceToMesh.Extrude(letterPrinter, 10 + (i % 2)); if (textMesh.Faces.Count > 0) { - asynchMeshGroups.Add(new MeshGroup(textMesh)); + asyncMeshGroups.Add(new MeshGroup(textMesh)); PlatingMeshGroupData newMeshInfo = new PlatingMeshGroupData(); newMeshInfo.spacing.x = printer.GetOffsetLeftOfCharacterIndex(i).x + centerOffset; - asynchPlatingDatas.Add(newMeshInfo); - asynchMeshGroupTransforms.Add(ScaleRotateTranslate.Identity()); + asyncPlatingDatas.Add(newMeshInfo); + asyncMeshGroupTransforms.Add(ScaleRotateTranslate.Identity()); - PlatingHelper.CreateITraceableForMeshGroup(asynchPlatingDatas, asynchMeshGroups, newIndex, (double progress0To1, string processingState, out bool continueProcessing) => + PlatingHelper.CreateITraceableForMeshGroup(asyncPlatingDatas, asyncMeshGroups, newIndex, (double progress0To1, string processingState, out bool continueProcessing) => { continueProcessing = true; int nextPercent = (int)((currentRatioDone + ratioPerMeshGroup * progress0To1) * 100); @@ -464,19 +464,19 @@ namespace MatterHackers.MatterControl.Plugins.TextCreator currentRatioDone += ratioPerMeshGroup; - PlatingHelper.PlaceMeshGroupOnBed(asynchMeshGroups, asynchMeshGroupTransforms, newIndex); + PlatingHelper.PlaceMeshGroupOnBed(asyncMeshGroups, asyncMeshGroupTransforms, newIndex); } processingProgressControl.PercentComplete = ((i + 1) * 95 / currentText.Length); } - SetWordSpacing(asynchMeshGroups, asynchMeshGroupTransforms, asynchPlatingDatas); - SetWordSize(asynchMeshGroups, asynchMeshGroupTransforms); - SetWordHeight(asynchMeshGroups, asynchMeshGroupTransforms); + SetWordSpacing(asyncMeshGroups, asyncMeshGroupTransforms, asyncPlatingDatas); + SetWordSize(asyncMeshGroups, asyncMeshGroupTransforms); + SetWordHeight(asyncMeshGroups, asyncMeshGroupTransforms); if (createUnderline.Checked) { - CreateUnderline(asynchMeshGroups, asynchMeshGroupTransforms, asynchPlatingDatas); + CreateUnderline(asyncMeshGroups, asyncMeshGroupTransforms, asyncPlatingDatas); } processingProgressControl.PercentComplete = 95; @@ -505,8 +505,8 @@ namespace MatterHackers.MatterControl.Plugins.TextCreator private void PushMeshGroupDataToAsynchLists(bool copyTraceInfo) { - asynchMeshGroups.Clear(); - asynchMeshGroupTransforms.Clear(); + asyncMeshGroups.Clear(); + asyncMeshGroupTransforms.Clear(); for (int meshGroupIndex = 0; meshGroupIndex < MeshGroups.Count; meshGroupIndex++) { MeshGroup meshGroup = MeshGroups[meshGroupIndex]; @@ -515,11 +515,11 @@ namespace MatterHackers.MatterControl.Plugins.TextCreator { Mesh mesh = meshGroup.Meshes[meshIndex]; newMeshGroup.Meshes.Add(Mesh.Copy(mesh)); - asynchMeshGroupTransforms.Add(MeshGroupTransforms[meshGroupIndex]); + asyncMeshGroupTransforms.Add(MeshGroupTransforms[meshGroupIndex]); } - asynchMeshGroups.Add(newMeshGroup); + asyncMeshGroups.Add(newMeshGroup); } - asynchPlatingDatas.Clear(); + asyncPlatingDatas.Clear(); for (int meshGroupIndex = 0; meshGroupIndex < MeshGroupExtraData.Count; meshGroupIndex++) { @@ -533,7 +533,7 @@ namespace MatterHackers.MatterControl.Plugins.TextCreator meshData.meshTraceableData.AddRange(MeshGroupExtraData[meshGroupIndex].meshTraceableData); } } - asynchPlatingDatas.Add(meshData); + asyncPlatingDatas.Add(meshData); } } @@ -550,17 +550,17 @@ namespace MatterHackers.MatterControl.Plugins.TextCreator private void PullMeshDataFromAsynchLists() { MeshGroups.Clear(); - foreach (MeshGroup mesh in asynchMeshGroups) + foreach (MeshGroup mesh in asyncMeshGroups) { MeshGroups.Add(mesh); } MeshGroupTransforms.Clear(); - foreach (ScaleRotateTranslate transform in asynchMeshGroupTransforms) + foreach (ScaleRotateTranslate transform in asyncMeshGroupTransforms) { MeshGroupTransforms.Add(transform); } MeshGroupExtraData.Clear(); - foreach (PlatingMeshGroupData meshData in asynchPlatingDatas) + foreach (PlatingMeshGroupData meshData in asyncPlatingDatas) { MeshGroupExtraData.Add(meshData); } @@ -892,7 +892,7 @@ namespace MatterHackers.MatterControl.Plugins.TextCreator processingProgressControl.PercentComplete = 0; LockEditControls(); - // we sent the data to the asynch lists but we will not pull it back out (only use it as a temp holder). + // we sent the data to the async lists but we will not pull it back out (only use it as a temp holder). PushMeshGroupDataToAsynchLists(true); string fileName = "TextCreator_{0}".FormatWith(Path.ChangeExtension(Path.GetRandomFileName(), ".amf")); @@ -922,22 +922,22 @@ namespace MatterHackers.MatterControl.Plugins.TextCreator try { // push all the transforms into the meshes - for (int i = 0; i < asynchMeshGroups.Count; i++) + for (int i = 0; i < asyncMeshGroups.Count; i++) { - asynchMeshGroups[i].Transform(MeshGroupTransforms[i].TotalTransform); + asyncMeshGroups[i].Transform(MeshGroupTransforms[i].TotalTransform); - processingProgressControl.RatioComplete = (double)i / asynchMeshGroups.Count * .1; + processingProgressControl.RatioComplete = (double)i / asyncMeshGroups.Count * .1; } List mergResults = new List(); mergResults.Add(new MeshGroup()); mergResults[0].Meshes.Add(new Mesh()); double meshGroupIndex = 0; - foreach (MeshGroup meshGroup in asynchMeshGroups) + foreach (MeshGroup meshGroup in asyncMeshGroups) { foreach (Mesh mesh in meshGroup.Meshes) { - processingProgressControl.RatioComplete = .1 + (double)meshGroupIndex / asynchMeshGroups.Count; + processingProgressControl.RatioComplete = .1 + (double)meshGroupIndex / asyncMeshGroups.Count; mergResults[0].Meshes[0] = CsgOperations.Union(mergResults[0].Meshes[0], mesh); } meshGroupIndex++;