initial commit

This commit is contained in:
2026-05-02 01:01:15 +02:00
parent 591399495c
commit fc73ff47ff
945 changed files with 11285 additions and 0 deletions

7
.gitignore vendored Normal file
View File

@@ -0,0 +1,7 @@
bin/
obj/
TestResults/
*.user
*.suo
*.dxf
*.tracecad.json

42
TraceCad.sln Normal file
View File

@@ -0,0 +1,42 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TraceCad.Core", "src\TraceCad.Core\TraceCad.Core.csproj", "{2D91D9E6-8C2E-4D16-8C2A-723E20D23921}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TraceCad.Dxf", "src\TraceCad.Dxf\TraceCad.Dxf.csproj", "{EBF76348-4A82-4A39-A72D-3F79D76EC4F5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TraceCad.Vision", "src\TraceCad.Vision\TraceCad.Vision.csproj", "{90132542-642E-4E72-A4A3-23D7D7D6D7A9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TraceCad.App", "src\TraceCad.App\TraceCad.App.csproj", "{410FE9B5-2C1A-4149-AF3C-9100A45FE6C5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TraceCad.Tests", "tests\TraceCad.Tests\TraceCad.Tests.csproj", "{8E121333-04BD-4E95-BB2F-A5073C3819DE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2D91D9E6-8C2E-4D16-8C2A-723E20D23921}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2D91D9E6-8C2E-4D16-8C2A-723E20D23921}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2D91D9E6-8C2E-4D16-8C2A-723E20D23921}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2D91D9E6-8C2E-4D16-8C2A-723E20D23921}.Release|Any CPU.Build.0 = Release|Any CPU
{EBF76348-4A82-4A39-A72D-3F79D76EC4F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EBF76348-4A82-4A39-A72D-3F79D76EC4F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EBF76348-4A82-4A39-A72D-3F79D76EC4F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EBF76348-4A82-4A39-A72D-3F79D76EC4F5}.Release|Any CPU.Build.0 = Release|Any CPU
{90132542-642E-4E72-A4A3-23D7D7D6D7A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{90132542-642E-4E72-A4A3-23D7D7D6D7A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90132542-642E-4E72-A4A3-23D7D7D6D7A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90132542-642E-4E72-A4A3-23D7D7D6D7A9}.Release|Any CPU.Build.0 = Release|Any CPU
{410FE9B5-2C1A-4149-AF3C-9100A45FE6C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{410FE9B5-2C1A-4149-AF3C-9100A45FE6C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{410FE9B5-2C1A-4149-AF3C-9100A45FE6C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{410FE9B5-2C1A-4149-AF3C-9100A45FE6C5}.Release|Any CPU.Build.0 = Release|Any CPU
{8E121333-04BD-4E95-BB2F-A5073C3819DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E121333-04BD-4E95-BB2F-A5073C3819DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E121333-04BD-4E95-BB2F-A5073C3819DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E121333-04BD-4E95-BB2F-A5073C3819DE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 KiB

21
docs/architecture.md Normal file
View File

@@ -0,0 +1,21 @@
# TraceCad Architecture
TraceCad is split into small .NET projects with one-way dependencies.
```text
TraceCad.App -> TraceCad.Core, TraceCad.Dxf
TraceCad.Dxf -> TraceCad.Core
TraceCad.Vision -> TraceCad.Core
TraceCad.Core -> no UI, OpenCV, or DXF package dependencies
```
## Coordinate Spaces
- Model space: millimetres, used for all stored CAD geometry.
- View space: screen pixels, used only by the Avalonia canvas.
- Export space: millimetres, mapped directly to DXF output.
- Reference space: reserved for calibrated background images in later phases.
## MVP Boundaries
MVP 0.1 intentionally excludes OpenCV, marker detection, automatic tracing, constraints, and dimensions. The first implementation proves deterministic CAD entity creation and DXF export.

15
docs/dxf-export.md Normal file
View File

@@ -0,0 +1,15 @@
# DXF Export
DXF is an export format, not TraceCad's internal document format.
The MVP exporter uses `netDxf` behind `IDxfExporter` so the implementation can be replaced without changing core or UI code.
## Current Mapping
| TraceCad entity | DXF entity |
| --- | --- |
| `LineEntity` | `LINE` |
| `CircleEntity` | `CIRCLE` |
| `ArcEntity` | `ARC` |
All exported geometry is written in millimetres. Non-exportable layers such as `CONSTRUCTION`, `REFERENCE`, `DIMENSIONS`, and `DEBUG` are skipped by default.

29
docs/mvp.md Normal file
View File

@@ -0,0 +1,29 @@
# MVP 0.1
MVP 0.1 focuses on the editor core:
- Start the Avalonia desktop app.
- Pan and zoom a millimetre canvas.
- Draw lines from two points.
- Draw circles from three circumference points.
- Draw arcs from start, through, and end points.
- Select and delete entities.
- Undo and redo document mutations.
- Save and load the native JSON project format.
- Export LINE, CIRCLE, and ARC entities to DXF.
MVP 0.2 adds the manual reference-image layer:
- Import a raster image as a locked background reference.
- Display the reference below CAD entities.
- Adjust opacity independently of geometry.
- Lock and unlock the reference.
- Edit reference X/Y origin, scale, and rotation manually.
- Save and reload reference metadata in the native JSON project file.
Deferred work:
- Calibration sheet generation.
- OpenCV marker detection.
- Assisted fitting tools.
- Constraint and dimension systems.

1044
docs/project_scope.md Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More