diff --git a/MatterControl.MeshOperations/CsgBySlicing.cs b/MatterControl.MeshOperations/CsgBySlicing.cs index cb350a3f8..0e3d2c0ef 100644 --- a/MatterControl.MeshOperations/CsgBySlicing.cs +++ b/MatterControl.MeshOperations/CsgBySlicing.cs @@ -99,7 +99,6 @@ namespace MatterHackers.PolygonMesh var matrix = SliceLayer.GetTransformTo0Plane(plane); transformTo0Planes[plane] = (matrix, matrix.Inverted); } - } public Mesh Calculate(CsgModes operation, @@ -118,6 +117,11 @@ namespace MatterHackers.PolygonMesh { var mesh1 = transformedMeshes[mesh1Index]; + if (cancellationToken.IsCancellationRequested) + { + return null; + } + for (int faceIndex = 0; faceIndex < mesh1.Faces.Count; faceIndex++) { var face = mesh1.Faces[faceIndex]; diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 66f77f1cd..6a55bf626 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 66f77f1cd52f85b7ac3ac6b8e711ad01f32519c5 +Subproject commit 6a55bf6267d1d178666d1fda16f97a5beaeb8f5b