diff --git a/OpenNest.Core/Part.cs b/OpenNest.Core/Part.cs index f190ce0..e5e4adc 100644 --- a/OpenNest.Core/Part.cs +++ b/OpenNest.Core/Part.cs @@ -216,8 +216,9 @@ namespace OpenNest /// public Part CloneAtOffset(Vector offset) { - var clonedProgram = Program.Clone() as Program; - var part = new Part(BaseDrawing, clonedProgram, + // Share the Program instance — offset-only copies don't modify the program codes. + // This is a major performance win for tiling large patterns. + var part = new Part(BaseDrawing, Program, location + offset, new Box(BoundingBox.X + offset.X, BoundingBox.Y + offset.Y, BoundingBox.Width, BoundingBox.Length));