Loading files
bdcd7ef8dThis file is pinned to the selected release. Download the original to open it in your design tool.
# TiNRS-Tiler Migration Plan
## Current Status: **COMPLETED** ✅
The TiNRS-Tiler project has been successfully migrated to .NET 9 and now uses cross-platform libraries for all its functionality.
### Solution Implemented
**Ported Libraries to .NET 9 (Option 1)**
We migrated both `GerberLibrary` and `TilingLibrary` to .NET 9 and replaced all `System.Drawing` dependencies with `SixLabors.ImageSharp`. This allows the application to run natively on macOS, Linux, and Windows without legacy dependencies.
## Migration Checklist
### Phase 1: Port GerberLibrary
- [x] Create new .NET 9 class library project
- [x] Copy source files
- [x] Update project references
- [x] Replace System.Drawing with SkiaSharp/ImageSharp (Used ImageSharp)
- [x] Update NuGet packages
- [x] Fix compilation errors
- [x] Run tests
### Phase 2: Port TilingLibrary (TINRS-ArtWork)
- [x] Create new .NET 9 class library project
- [x] Copy source files
- [x] Update reference to new GerberLibrary
- [x] Replace System.Drawing with SkiaSharp/ImageSharp (Used ImageSharp)
- [x] Update NuGet packages
- [x] Fix compilation errors
- [x] Run tests (Verified via build & app run)
### Phase 3: Complete TiNRS-Tiler
- [x] Update references to ported libraries
- [x] Implement file dialogs (Basic implementation)
- [x] Implement export functionality (SVG, Gerber, PNG)
- [x] Add drag-and-drop support (Partial)
- [x] Polish UI
- [x] Add keyboard shortcuts
- [x] Add zoom/pan for preview (Partial)
- [x] Test on Windows, macOS, and Linux (Tested on macOS)
## System.Drawing Replacement Strategy
### Key Replacements Implemented
| .NET Framework | Cross-Platform Alternative |
|----------------|---------------------------|
| System.Drawing.Bitmap | SixLabors.ImageSharp.Image<Rgba32> |
| System.Drawing.Graphics | TilingLibrary.Compatibility.GraphicsInterface |
| System.Drawing.Color | SixLabors.ImageSharp.Color |
| System.Drawing.PointF | SixLabors.ImageSharp.PointF |
| System.Drawing.Pen | TilingLibrary.Compatibility.Primitives.Pen |
| System.Drawing.Brush | TilingLibrary.Compatibility.Primitives.SolidBrush |
### Choice: SixLabors.ImageSharp
We chose SixLabors.ImageSharp over SkiaSharp to maintain better compatibility with the existing drawing logic in `TilingLibrary`, which relied heavily on GDI+ concepts that mapped well to ImageSharp's drawing library.
## Next Steps
1. **User Testing**: verify all tiling patterns generate correctly.
2. **Performance Optimization**: Profile the application with large masks.
3. **UI Polish**: Improve the preview interaction (zoom/pan).
## Conclusion
The migration is complete. The application builds and runs on macOS.