feat: pdf2cad

This commit is contained in:
2026-03-03 21:24:02 +00:00
commit 112213da6e
61 changed files with 7290 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
{
"source_pdf": "cabinet_basic.pdf",
"extraction_timestamp": "2026-01-01T00:00:00Z",
"part_name": "cabinet_carcass",
"overall_dimensions": {
"width_mm": 600,
"height_mm": 720,
"depth_mm": 400
},
"parts": [],
"raw_annotations": [
"Scale: 1:1",
"Material: 18mm melamine MDF",
"Edgebanding: 2mm ABS white",
"Back Panel: 3mm HDF"
],
"material": {
"type": "melamine MDF",
"thickness_mm": 18,
"finish": "white"
},
"edgebanding": {
"top": {
"material": "ABS",
"thickness_mm": 2,
"color": "white"
},
"bottom": {
"material": "ABS",
"thickness_mm": 2,
"color": "white"
},
"left": {
"material": "ABS",
"thickness_mm": 2,
"color": "white"
},
"right": {
"material": "ABS",
"thickness_mm": 2,
"color": "white"
}
}
}

16
tests/fixtures/expected/edge_cases.json vendored Normal file
View File

@@ -0,0 +1,16 @@
{
"source_pdf": "edge_cases.pdf",
"extraction_timestamp": "2026-01-01T00:00:00Z",
"part_name": "back_panel",
"overall_dimensions": {
"width_mm": 600,
"height_mm": 720,
"depth_mm": 3
},
"parts": [],
"raw_annotations": [
"Scale: 1:1",
"Material: 3mm HDF",
"Note: Thin panel, handle with care"
]
}

View File

@@ -0,0 +1,26 @@
{
"source_pdf": "panel_with_drilling.pdf",
"extraction_timestamp": "2026-01-01T00:00:00Z",
"part_name": "shelf_side",
"overall_dimensions": {
"width_mm": 600,
"height_mm": 720,
"depth_mm": 18
},
"parts": [],
"raw_annotations": [
"Scale: 1:1",
"Material: 18mm MDF",
"Drilling: 4x shelf pins"
],
"drilling": [
{"x_mm": 37, "y_mm": 180, "diameter_mm": 5, "depth_mm": 12},
{"x_mm": 37, "y_mm": 360, "diameter_mm": 5, "depth_mm": 12},
{"x_mm": 37, "y_mm": 540, "diameter_mm": 5, "depth_mm": 12},
{"x_mm": 37, "y_mm": 640, "diameter_mm": 5, "depth_mm": 12},
{"x_mm": 563, "y_mm": 180, "diameter_mm": 5, "depth_mm": 12},
{"x_mm": 563, "y_mm": 360, "diameter_mm": 5, "depth_mm": 12},
{"x_mm": 563, "y_mm": 540, "diameter_mm": 5, "depth_mm": 12},
{"x_mm": 563, "y_mm": 640, "diameter_mm": 5, "depth_mm": 12}
]
}

View File

@@ -0,0 +1,15 @@
{
"source_pdf": "simple_panel.pdf",
"extraction_timestamp": "2026-01-01T00:00:00Z",
"part_name": "side_panel",
"overall_dimensions": {
"width_mm": 600,
"height_mm": 720,
"depth_mm": 18
},
"parts": [],
"raw_annotations": [
"Scale: 1:1",
"Material: 18mm MDF"
]
}