refactor(PepLib.Core): reorganize files into logical folder structure

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>
This commit is contained in:
2026-01-23 09:29:13 -05:00
parent c5be48a807
commit 9088af52de
55 changed files with 137 additions and 76 deletions

View File

@@ -1,4 +1,6 @@
using PepLib.Enums;
using PepLib.Geometry;
namespace PepLib.Codes
{
public class CircularMove : Motion

View File

@@ -1,4 +1,5 @@
using PepLib.Geometry;
namespace PepLib.Codes
{
public class LinearMove : Motion

View File

@@ -1,4 +1,6 @@
using PepLib.Geometry;
using PepLib.Interfaces;
namespace PepLib.Codes
{
public abstract class Motion : IMovable, ICode

View File

@@ -1,4 +1,6 @@
namespace PepLib.Codes
using PepLib.Geometry;
namespace PepLib.Codes
{
public class RapidMove : Motion
{

View File

@@ -1,4 +1,5 @@
using PepLib.Enums;
namespace PepLib.Codes
{
public class SetKerf : ICode

View File

@@ -1,4 +1,6 @@
using PepLib.Models;
using PepLib.Utilities;
namespace PepLib.Codes
{
public class SubProgramCall : ICode

View File

@@ -1,5 +1,5 @@

namespace PepLib
namespace PepLib.Enums
{
public enum ApplicationType
{

View File

@@ -1,5 +1,5 @@

namespace PepLib
namespace PepLib.Enums
{
public enum DrawingType
{

View File

@@ -1,5 +1,5 @@

namespace PepLib
namespace PepLib.Enums
{
public enum GrainType
{

View File

@@ -1,5 +1,5 @@

namespace PepLib
namespace PepLib.Enums
{
public enum KerfType
{

View File

@@ -1,4 +1,4 @@
namespace PepLib
namespace PepLib.Enums
{
public enum ProgrammingMode
{

View File

@@ -1,5 +1,5 @@

namespace PepLib
namespace PepLib.Enums
{
public enum RotationType
{

View File

@@ -1,5 +1,5 @@

namespace PepLib
namespace PepLib.Enums
{
public enum StatusType
{

View File

@@ -1,4 +1,7 @@
namespace PepLib
using PepLib.Geometry;
using PepLib.Models;
namespace PepLib.Extensions
{
public static class PartListExtensions
{

View File

@@ -1,4 +1,6 @@
namespace PepLib
using PepLib.Models;
namespace PepLib.Extensions
{
public static class PlateListExtensions
{

View File

@@ -1,4 +1,4 @@
namespace PepLib
namespace PepLib.Geometry
{
public class Box
{
@@ -10,7 +10,7 @@
public Box(double x, double y, double w, double h)
{
Location = new Vector(x, y);
Size = new PepLib.Size(0, 0);
Size = new Size(0, 0);
Width = w;
Height = h;
}

View File

@@ -1,4 +1,4 @@
namespace PepLib
namespace PepLib.Geometry
{
public class Node
{

View File

@@ -1,4 +1,4 @@
namespace PepLib
namespace PepLib.Geometry
{
public class Size
{
@@ -42,4 +42,4 @@
return string.Format("{0} x {1}", Height, Width);
}
}
}
}

View File

@@ -1,5 +1,5 @@

namespace PepLib
namespace PepLib.Geometry
{
public class Spacing
{

View File

@@ -1,4 +1,6 @@
namespace PepLib
using PepLib.Utilities;
namespace PepLib.Geometry
{
public struct Vector
{

View File

@@ -0,0 +1,6 @@
global using PepLib.Enums;
global using PepLib.Geometry;
global using PepLib.Models;
global using PepLib.Utilities;
global using PepLib.Extensions;
global using PepLib.Interfaces;

View File

@@ -1,4 +1,7 @@
using System.Text;
using PepLib.Enums;
using PepLib.Models;
using PepLib.Utilities;
using System.Text;
namespace PepLib.IO
{

View File

@@ -1,3 +1,4 @@
using PepLib.Models;
using System.Diagnostics;
using System.IO.Compression;
using System.Text.RegularExpressions;

View File

@@ -1,4 +1,6 @@
using PepLib.Codes;
using PepLib.Geometry;
using PepLib.Models;
namespace PepLib.IO
{

View File

@@ -1,4 +1,7 @@
using System.Text;
using PepLib.Enums;
using PepLib.Models;
using PepLib.Utilities;
using System.Text;
namespace PepLib.IO
{

View File

@@ -1,3 +1,4 @@
using PepLib.Models;
using System.Diagnostics;
using System.IO.Compression;
using System.Text;

View File

@@ -1,4 +1,7 @@
using PepLib.Codes;
using PepLib.Geometry;
using PepLib.Models;
using PepLib.Utilities;
namespace PepLib.IO
{

View File

@@ -1,4 +1,7 @@
using PepLib.Codes;
using PepLib.Enums;
using PepLib.Geometry;
using PepLib.Models;
using System.Text;
namespace PepLib.IO

View File

@@ -1,4 +1,6 @@
using System.Diagnostics;
using PepLib.Models;
using PepLib.Utilities;
using System.Diagnostics;
namespace PepLib.IO
{

View File

@@ -1,4 +1,6 @@
namespace PepLib
using PepLib.Geometry;
namespace PepLib.Interfaces
{
public interface IMovable
{

View File

@@ -1,7 +1,8 @@
using PepLib.Codes;
using PepLib.Codes;
using PepLib.Enums;
using PepLib.IO;
namespace PepLib
namespace PepLib.Models
{
public class Drawing
{

View File

@@ -1,6 +1,7 @@
using PepLib.Enums;
using PepLib.IO;
namespace PepLib
namespace PepLib.Models
{
public class DrawingInfo
{
@@ -103,4 +104,3 @@ namespace PepLib
}
}
}

View File

@@ -1,6 +1,8 @@
using PepLib.Codes;
using PepLib.Codes;
using PepLib.Enums;
using PepLib.Geometry;
namespace PepLib
namespace PepLib.Models
{
public class Loop : Program
{

View File

@@ -1,4 +1,4 @@
namespace PepLib
namespace PepLib.Models
{
public class Machine
{

View File

@@ -1,4 +1,4 @@
namespace PepLib
namespace PepLib.Models
{
public class Material
{

View File

@@ -1,7 +1,7 @@
using PepLib.Codes;
using PepLib.Codes;
using PepLib.IO;
namespace PepLib
namespace PepLib.Models
{
public class Nest
{

View File

@@ -1,4 +1,4 @@
namespace PepLib
namespace PepLib.Models
{
public class NestDrawing
{

View File

@@ -1,7 +1,7 @@
using PepLib.IO;
using PepLib.IO;
using System.Text;
namespace PepLib
namespace PepLib.Models
{
public class NestIndex
{

View File

@@ -1,6 +1,7 @@
using PepLib.IO;
using PepLib.Enums;
using PepLib.IO;
namespace PepLib
namespace PepLib.Models
{
public class NestInfo
{
@@ -94,4 +95,4 @@ namespace PepLib
return true;
}
}
}
}

View File

@@ -1,4 +1,8 @@
namespace PepLib
using PepLib.Enums;
using PepLib.Geometry;
using PepLib.Interfaces;
namespace PepLib.Models
{
public class Part : IMovable
{

View File

@@ -1,4 +1,9 @@
namespace PepLib
using PepLib.Extensions;
using PepLib.Geometry;
using PepLib.Interfaces;
using PepLib.Utilities;
namespace PepLib.Models
{
public class Plate : IMovable
{

View File

@@ -1,7 +1,11 @@
using PepLib.Codes;
using PepLib.Codes;
using PepLib.Enums;
using PepLib.Geometry;
using PepLib.Interfaces;
using PepLib.IO;
using PepLib.Utilities;
namespace PepLib
namespace PepLib.Models
{
public class Program : List<ICode>, IMovable
{

View File

@@ -1,4 +1,4 @@
namespace PepLib
namespace PepLib.Models
{
public partial class Report
{

View File

@@ -1,5 +1,5 @@

namespace PepLib
namespace PepLib.Models
{
public partial class Report
{

View File

@@ -1,6 +1,6 @@
using PepLib.IO;
using PepLib.IO;
namespace PepLib
namespace PepLib.Models
{
public partial class Report
{
@@ -118,4 +118,4 @@ namespace PepLib
return true;
}
}
}
}

View File

@@ -1,4 +1,4 @@
namespace PepLib
namespace PepLib.Utilities
{
public static class AngleConverter
{

View File

@@ -1,4 +1,4 @@
namespace PepLib
namespace PepLib.Utilities
{
public static class Generic
{

View File

@@ -1,4 +1,6 @@
namespace PepLib
using PepLib.Geometry;
namespace PepLib.Utilities
{
public class IniConfig
{

View File

@@ -1,4 +1,4 @@
namespace PepLib
namespace PepLib.Utilities
{
public static class MathHelper
{

View File

@@ -1,4 +1,4 @@
namespace PepLib
namespace PepLib.Utilities
{
public static class Tolerance
{

View File

@@ -1,6 +1,6 @@
using System.Diagnostics;
using System.Diagnostics;
namespace PepLib
namespace PepLib.Utilities
{
public static class Util
{

View File

@@ -1,7 +1,7 @@
using System.IO.Compression;
using System.Text.RegularExpressions;
namespace PepLib
namespace PepLib.Utilities
{
public static class ZipHelper
{
@@ -79,4 +79,3 @@ namespace PepLib
}
}
}