Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'UVtools.Core/Gerber/Macro.cs')
-rw-r--r--UVtools.Core/Gerber/Macro.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/UVtools.Core/Gerber/Macro.cs b/UVtools.Core/Gerber/Macro.cs
index 6d9a013..6a5d3c1 100644
--- a/UVtools.Core/Gerber/Macro.cs
+++ b/UVtools.Core/Gerber/Macro.cs
@@ -89,6 +89,17 @@ public class Macro : IReadOnlyList<Primitive>
}
}
+ public Macro Clone()
+ {
+ var macro = new Macro(Name);
+ foreach (var primitive in Primitives)
+ {
+ macro.Primitives.Add(primitive.Clone());
+ }
+
+ return macro;
+ }
+
public static Macro? Parse(string line)
{