Move 38 files from root directory into organized subfolders: - Enums/ (7 files): StatusType, ApplicationType, DrawingType, etc. - Geometry/ (5 files): Vector, Box, Size, Spacing, Node - Models/ (15 files): Nest, Plate, Part, Program, Report, etc. - Utilities/ (7 files): MathHelper, Tolerance, ZipHelper, etc. - Extensions/ (2 files): PartListExtensions, PlateListExtensions - Interfaces/ (1 file): IMovable Update namespaces to follow folder hierarchy (e.g., PepLib.Models). Add GlobalUsings.cs for internal backward compatibility. Update Codes/ and IO/ files with new using statements. Update PepApi.Core consumers to reference new namespaces. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
59 lines
1.4 KiB
C#
59 lines
1.4 KiB
C#
using PepLib.Codes;
|
|
using PepLib.Enums;
|
|
using PepLib.Geometry;
|
|
|
|
namespace PepLib.Models
|
|
{
|
|
public class Loop : Program
|
|
{
|
|
public Loop()
|
|
{
|
|
Mode = ProgrammingMode.Incremental;
|
|
}
|
|
|
|
public string Name { get; set; }
|
|
|
|
public Vector ReferencePoint { get; set; }
|
|
|
|
public DateTime LastReferenceDate { get; set; }
|
|
|
|
public string DrawingName { get; set; }
|
|
|
|
public string DxfPath { get; set; }
|
|
|
|
public override void Rotate(double angle)
|
|
{
|
|
base.Rotate(angle);
|
|
ReferencePoint = ReferencePoint.Rotate(angle);
|
|
}
|
|
|
|
public override void Rotate(double angle, Vector origin)
|
|
{
|
|
base.Rotate(angle, origin);
|
|
ReferencePoint = ReferencePoint.Rotate(angle);
|
|
}
|
|
|
|
public object Clone()
|
|
{
|
|
var loop = new Loop()
|
|
{
|
|
Name = this.Name,
|
|
ReferencePoint = this.ReferencePoint,
|
|
LastReferenceDate = this.LastReferenceDate,
|
|
DrawingName = this.DrawingName,
|
|
DxfPath = this.DxfPath,
|
|
Rotation = this.Rotation
|
|
};
|
|
|
|
var codes = new ICode[this.Count];
|
|
|
|
for (int i = 0; i < this.Count; ++i)
|
|
codes[i] = this[i].Clone();
|
|
|
|
loop.AddRange(codes);
|
|
|
|
return loop;
|
|
}
|
|
}
|
|
}
|