{
  "methods": {
    "vector": {
      "source": "create-dxf-source-60x40mm.svg",
      "converter": "parseStrictSvg -> serializeStrictDxf -> parseStrictDxf",
      "independent": {
        "version": "AC1015",
        "insunits": 4,
        "entityCount": 2,
        "vertexCounts": [
          5,
          4
        ],
        "allClosed": true,
        "bounds": {
          "width": 60,
          "height": 40
        }
      },
      "sourceSvgIssues": [
        {
          "severity": "pass",
          "code": "STRICT_SUBSET",
          "details": "SVG uses the strict 2D subset."
        }
      ],
      "strictChecker": {
        "format": "ASCII DXF",
        "units": "millimeters",
        "entities": [
          {
            "type": "LWPOLYLINE",
            "layer": "0",
            "points": [
              {
                "x": 0,
                "y": 40
              },
              {
                "x": 50,
                "y": 40
              },
              {
                "x": 60,
                "y": 30
              },
              {
                "x": 60,
                "y": 0
              },
              {
                "x": 0,
                "y": 0
              }
            ],
            "closed": true
          },
          {
            "type": "LWPOLYLINE",
            "layer": "0",
            "points": [
              {
                "x": 12,
                "y": 24
              },
              {
                "x": 24,
                "y": 24
              },
              {
                "x": 24,
                "y": 16
              },
              {
                "x": 12,
                "y": 16
              }
            ],
            "closed": true
          }
        ],
        "layers": [
          "0"
        ],
        "bounds": {
          "minX": 0,
          "minY": 0,
          "maxX": 60,
          "maxY": 40,
          "width": 60,
          "height": 40
        },
        "issues": [
          {
            "severity": "pass",
            "code": "STRICT_SUBSET",
            "details": "All parsed entities are within the strict 2D subset."
          }
        ]
      }
    },
    "raster": {
      "source": "create-dxf-raster-source.png",
      "sourceFormatBoundary": "PNG is an app-accepted raster encoding; no DPI metadata or inferred physical size.",
      "pipeline": "thresholdRGBA -> traceBinary -> scaleTrace(60mm) -> exportDXF -> verifyDXF",
      "independent": {
        "version": "AC1015",
        "insunits": 4,
        "entityCount": 2,
        "vertexCounts": [
          82,
          4
        ],
        "allClosed": true,
        "bounds": {
          "width": 60,
          "height": 40
        }
      },
      "model": {
        "schemaVersion": 1,
        "algorithmVersion": "pixel-boundary-1",
        "jobId": "create-dxf-raster-plate",
        "modelRevision": 1,
        "paramRevision": 1,
        "parameters": {
          "threshold": 128,
          "invert": false,
          "denoise": 0,
          "reduceNodes": false
        },
        "units": "mm",
        "bounds": {
          "minX": 0,
          "minY": 0,
          "maxX": 60,
          "maxY": 40,
          "width": 60,
          "height": 40
        },
        "contours": [
          {
            "id": "c1",
            "parentId": null,
            "role": "outer",
            "closed": true,
            "points": [
              {
                "x": 0,
                "y": 0
              },
              {
                "x": 50.25,
                "y": 0
              },
              {
                "x": 50.25,
                "y": 0.25
              },
              {
                "x": 50.5,
                "y": 0.25
              },
              {
                "x": 50.5,
                "y": 0.5
              },
              {
                "x": 50.75,
                "y": 0.5
              },
              {
                "x": 50.75,
                "y": 0.75
              },
              {
                "x": 51,
                "y": 0.75
              },
              {
                "x": 51,
                "y": 1
              },
              {
                "x": 51.25,
                "y": 1
              },
              {
                "x": 51.25,
                "y": 1.25
              },
              {
                "x": 51.5,
                "y": 1.25
              },
              {
                "x": 51.5,
                "y": 1.5
              },
              {
                "x": 51.75,
                "y": 1.5
              },
              {
                "x": 51.75,
                "y": 1.75
              },
              {
                "x": 52,
                "y": 1.75
              },
              {
                "x": 52,
                "y": 2
              },
              {
                "x": 52.25,
                "y": 2
              },
              {
                "x": 52.25,
                "y": 2.25
              },
              {
                "x": 52.5,
                "y": 2.25
              },
              {
                "x": 52.5,
                "y": 2.5
              },
              {
                "x": 52.75,
                "y": 2.5
              },
              {
                "x": 52.75,
                "y": 2.75
              },
              {
                "x": 53,
                "y": 2.75
              },
              {
                "x": 53,
                "y": 3
              },
              {
                "x": 53.25,
                "y": 3
              },
              {
                "x": 53.25,
                "y": 3.25
              },
              {
                "x": 53.5,
                "y": 3.25
              },
              {
                "x": 53.5,
                "y": 3.5
              },
              {
                "x": 53.75,
                "y": 3.5
              },
              {
                "x": 53.75,
                "y": 3.75
              },
              {
                "x": 54,
                "y": 3.75
              },
              {
                "x": 54,
                "y": 4
              },
              {
                "x": 54.25,
                "y": 4
              },
              {
                "x": 54.25,
                "y": 4.25
              },
              {
                "x": 54.5,
                "y": 4.25
              },
              {
                "x": 54.5,
                "y": 4.5
              },
              {
                "x": 54.75,
                "y": 4.5
              },
              {
                "x": 54.75,
                "y": 4.75
              },
              {
                "x": 55,
                "y": 4.75
              },
              {
                "x": 55,
                "y": 5
              },
              {
                "x": 55.25,
                "y": 5
              },
              {
                "x": 55.25,
                "y": 5.25
              },
              {
                "x": 55.5,
                "y": 5.25
              },
              {
                "x": 55.5,
                "y": 5.5
              },
              {
                "x": 55.75,
                "y": 5.5
              },
              {
                "x": 55.75,
                "y": 5.75
              },
              {
                "x": 56,
                "y": 5.75
              },
              {
                "x": 56,
                "y": 6
              },
              {
                "x": 56.25,
                "y": 6
              },
              {
                "x": 56.25,
                "y": 6.25
              },
              {
                "x": 56.5,
                "y": 6.25
              },
              {
                "x": 56.5,
                "y": 6.5
              },
              {
                "x": 56.75,
                "y": 6.5
              },
              {
                "x": 56.75,
                "y": 6.75
              },
              {
                "x": 57,
                "y": 6.75
              },
              {
                "x": 57,
                "y": 7
              },
              {
                "x": 57.25,
                "y": 7
              },
              {
                "x": 57.25,
                "y": 7.25
              },
              {
                "x": 57.5,
                "y": 7.25
              },
              {
                "x": 57.5,
                "y": 7.5
              },
              {
                "x": 57.75,
                "y": 7.5
              },
              {
                "x": 57.75,
                "y": 7.75
              },
              {
                "x": 58,
                "y": 7.75
              },
              {
                "x": 58,
                "y": 8
              },
              {
                "x": 58.25,
                "y": 8
              },
              {
                "x": 58.25,
                "y": 8.25
              },
              {
                "x": 58.5,
                "y": 8.25
              },
              {
                "x": 58.5,
                "y": 8.5
              },
              {
                "x": 58.75,
                "y": 8.5
              },
              {
                "x": 58.75,
                "y": 8.75
              },
              {
                "x": 59,
                "y": 8.75
              },
              {
                "x": 59,
                "y": 9
              },
              {
                "x": 59.25,
                "y": 9
              },
              {
                "x": 59.25,
                "y": 9.25
              },
              {
                "x": 59.5,
                "y": 9.25
              },
              {
                "x": 59.5,
                "y": 9.5
              },
              {
                "x": 59.75,
                "y": 9.5
              },
              {
                "x": 59.75,
                "y": 9.75
              },
              {
                "x": 60,
                "y": 9.75
              },
              {
                "x": 60,
                "y": 40
              },
              {
                "x": 0,
                "y": 40
              }
            ]
          },
          {
            "id": "c2",
            "parentId": "c1",
            "role": "hole",
            "closed": true,
            "points": [
              {
                "x": 12,
                "y": 16
              },
              {
                "x": 12,
                "y": 24
              },
              {
                "x": 24,
                "y": 24
              },
              {
                "x": 24,
                "y": 16
              }
            ]
          }
        ],
        "inspection": [
          {
            "code": "complexity",
            "severity": "pass",
            "details": "86 vertices in 2 contours."
          },
          {
            "code": "basic_geometry",
            "severity": "pass",
            "details": "Closed contours, finite coordinates, nonzero segments and exact duplicate segments checked."
          },
          {
            "code": "self_intersection",
            "severity": "not_checked",
            "details": "Self-intersections and touching contours have not been checked. Verify the file in the target software."
          }
        ]
      }
    },
    "manualCadContract": {
      "status": "method contract only; not performed in a native CAD application",
      "units": "mm",
      "outerPolylineYUp": [
        [
          0,
          40
        ],
        [
          50,
          40
        ],
        [
          60,
          30
        ],
        [
          60,
          0
        ],
        [
          0,
          0
        ]
      ],
      "holePolylineYUp": [
        [
          12,
          24
        ],
        [
          24,
          24
        ],
        [
          24,
          16
        ],
        [
          12,
          16
        ]
      ],
      "closed": true,
      "export": "ASCII DXF with two closed 2D polylines and millimetre unit metadata",
      "check": "Reopen and measure 60 x 40 mm outer extent and 12 x 8 mm hole; confirm entity closure and intended hole handling in destination software."
    }
  },
  "jpeg": {
    "decision": "supports-independent-answer",
    "reason": "Measured JPEG encoding alters edge/background pixels; threshold changes alter node counts, binary mismatch and survival of deliberately thin gray features. The downloadable clean/Q92/Q08 comparison makes these JPEG-specific tradeoffs reproducible. Search intent and page acceptance remain primary-thread decisions.",
    "results": [
      {
        "source": "clean",
        "quality": null,
        "threshold": 64,
        "differingBinaryPixelsVsClean": 0,
        "fineLineForegroundPixelsOf70": 0,
        "foregroundPixels": 10865,
        "contours": 2,
        "holes": 1,
        "nodes": 98,
        "pixelBounds": {
          "minX": 17,
          "minY": 18,
          "maxX": 174,
          "maxY": 110,
          "width": 157,
          "height": 92
        },
        "physicalBoundsMm": {
          "minX": 0,
          "minY": 0,
          "maxX": 60,
          "maxY": 35.15923566878981,
          "width": 60,
          "height": 35.15923566878981
        },
        "inspection": [
          {
            "code": "complexity",
            "severity": "pass",
            "details": "98 vertices in 2 contours."
          },
          {
            "code": "basic_geometry",
            "severity": "pass",
            "details": "Closed contours, finite coordinates, nonzero segments and exact duplicate segments checked."
          },
          {
            "code": "self_intersection",
            "severity": "not_checked",
            "details": "Self-intersections and touching contours have not been checked. Verify the file in the target software."
          }
        ]
      },
      {
        "source": "clean",
        "quality": null,
        "threshold": 128,
        "differingBinaryPixelsVsClean": 0,
        "fineLineForegroundPixelsOf70": 70,
        "foregroundPixels": 11051,
        "contours": 3,
        "holes": 1,
        "nodes": 102,
        "pixelBounds": {
          "minX": 17,
          "minY": 15,
          "maxX": 174,
          "maxY": 110,
          "width": 157,
          "height": 95
        },
        "physicalBoundsMm": {
          "minX": 0,
          "minY": 0,
          "maxX": 60,
          "maxY": 36.30573248407644,
          "width": 60,
          "height": 36.30573248407644
        },
        "inspection": [
          {
            "code": "complexity",
            "severity": "pass",
            "details": "102 vertices in 3 contours."
          },
          {
            "code": "basic_geometry",
            "severity": "pass",
            "details": "Closed contours, finite coordinates, nonzero segments and exact duplicate segments checked."
          },
          {
            "code": "self_intersection",
            "severity": "not_checked",
            "details": "Self-intersections and touching contours have not been checked. Verify the file in the target software."
          }
        ]
      },
      {
        "source": "clean",
        "quality": null,
        "threshold": 192,
        "differingBinaryPixelsVsClean": 0,
        "fineLineForegroundPixelsOf70": 70,
        "foregroundPixels": 11162,
        "contours": 3,
        "holes": 1,
        "nodes": 102,
        "pixelBounds": {
          "minX": 17,
          "minY": 15,
          "maxX": 174,
          "maxY": 110,
          "width": 157,
          "height": 95
        },
        "physicalBoundsMm": {
          "minX": 0,
          "minY": 0,
          "maxX": 60,
          "maxY": 36.30573248407644,
          "width": 60,
          "height": 36.30573248407644
        },
        "inspection": [
          {
            "code": "complexity",
            "severity": "pass",
            "details": "102 vertices in 3 contours."
          },
          {
            "code": "basic_geometry",
            "severity": "pass",
            "details": "Closed contours, finite coordinates, nonzero segments and exact duplicate segments checked."
          },
          {
            "code": "self_intersection",
            "severity": "not_checked",
            "details": "Self-intersections and touching contours have not been checked. Verify the file in the target software."
          }
        ]
      },
      {
        "source": "jpeg-q92",
        "quality": 0.92,
        "threshold": 64,
        "differingBinaryPixelsVsClean": 5,
        "fineLineForegroundPixelsOf70": 0,
        "foregroundPixels": 10864,
        "contours": 2,
        "holes": 1,
        "nodes": 98,
        "pixelBounds": {
          "minX": 17,
          "minY": 18,
          "maxX": 174,
          "maxY": 110,
          "width": 157,
          "height": 92
        },
        "physicalBoundsMm": {
          "minX": 0,
          "minY": 0,
          "maxX": 60,
          "maxY": 35.15923566878981,
          "width": 60,
          "height": 35.15923566878981
        },
        "inspection": [
          {
            "code": "complexity",
            "severity": "pass",
            "details": "98 vertices in 2 contours."
          },
          {
            "code": "basic_geometry",
            "severity": "pass",
            "details": "Closed contours, finite coordinates, nonzero segments and exact duplicate segments checked."
          },
          {
            "code": "self_intersection",
            "severity": "not_checked",
            "details": "Self-intersections and touching contours have not been checked. Verify the file in the target software."
          }
        ]
      },
      {
        "source": "jpeg-q92",
        "quality": 0.92,
        "threshold": 128,
        "differingBinaryPixelsVsClean": 8,
        "fineLineForegroundPixelsOf70": 70,
        "foregroundPixels": 11043,
        "contours": 3,
        "holes": 1,
        "nodes": 102,
        "pixelBounds": {
          "minX": 17,
          "minY": 15,
          "maxX": 174,
          "maxY": 110,
          "width": 157,
          "height": 95
        },
        "physicalBoundsMm": {
          "minX": 0,
          "minY": 0,
          "maxX": 60,
          "maxY": 36.30573248407644,
          "width": 60,
          "height": 36.30573248407644
        },
        "inspection": [
          {
            "code": "complexity",
            "severity": "pass",
            "details": "102 vertices in 3 contours."
          },
          {
            "code": "basic_geometry",
            "severity": "pass",
            "details": "Closed contours, finite coordinates, nonzero segments and exact duplicate segments checked."
          },
          {
            "code": "self_intersection",
            "severity": "not_checked",
            "details": "Self-intersections and touching contours have not been checked. Verify the file in the target software."
          }
        ]
      },
      {
        "source": "jpeg-q92",
        "quality": 0.92,
        "threshold": 192,
        "differingBinaryPixelsVsClean": 3,
        "fineLineForegroundPixelsOf70": 70,
        "foregroundPixels": 11159,
        "contours": 3,
        "holes": 1,
        "nodes": 102,
        "pixelBounds": {
          "minX": 17,
          "minY": 15,
          "maxX": 174,
          "maxY": 110,
          "width": 157,
          "height": 95
        },
        "physicalBoundsMm": {
          "minX": 0,
          "minY": 0,
          "maxX": 60,
          "maxY": 36.30573248407644,
          "width": 60,
          "height": 36.30573248407644
        },
        "inspection": [
          {
            "code": "complexity",
            "severity": "pass",
            "details": "102 vertices in 3 contours."
          },
          {
            "code": "basic_geometry",
            "severity": "pass",
            "details": "Closed contours, finite coordinates, nonzero segments and exact duplicate segments checked."
          },
          {
            "code": "self_intersection",
            "severity": "not_checked",
            "details": "Self-intersections and touching contours have not been checked. Verify the file in the target software."
          }
        ]
      },
      {
        "source": "jpeg-q08",
        "quality": 0.08,
        "threshold": 64,
        "differingBinaryPixelsVsClean": 77,
        "fineLineForegroundPixelsOf70": 1,
        "foregroundPixels": 10806,
        "contours": 5,
        "holes": 3,
        "nodes": 128,
        "pixelBounds": {
          "minX": 17,
          "minY": 18,
          "maxX": 173,
          "maxY": 110,
          "width": 156,
          "height": 92
        },
        "physicalBoundsMm": {
          "minX": 0,
          "minY": 0,
          "maxX": 60,
          "maxY": 35.38461538461539,
          "width": 60,
          "height": 35.38461538461539
        },
        "inspection": [
          {
            "code": "complexity",
            "severity": "pass",
            "details": "128 vertices in 5 contours."
          },
          {
            "code": "basic_geometry",
            "severity": "pass",
            "details": "Closed contours, finite coordinates, nonzero segments and exact duplicate segments checked."
          },
          {
            "code": "self_intersection",
            "severity": "not_checked",
            "details": "Self-intersections and touching contours have not been checked. Verify the file in the target software."
          }
        ]
      },
      {
        "source": "jpeg-q08",
        "quality": 0.08,
        "threshold": 128,
        "differingBinaryPixelsVsClean": 47,
        "fineLineForegroundPixelsOf70": 63,
        "foregroundPixels": 11036,
        "contours": 5,
        "holes": 2,
        "nodes": 110,
        "pixelBounds": {
          "minX": 17,
          "minY": 16,
          "maxX": 174,
          "maxY": 110,
          "width": 157,
          "height": 94
        },
        "physicalBoundsMm": {
          "minX": 0,
          "minY": 0,
          "maxX": 60,
          "maxY": 35.92356687898089,
          "width": 60,
          "height": 35.92356687898089
        },
        "inspection": [
          {
            "code": "complexity",
            "severity": "pass",
            "details": "110 vertices in 5 contours."
          },
          {
            "code": "basic_geometry",
            "severity": "pass",
            "details": "Closed contours, finite coordinates, nonzero segments and exact duplicate segments checked."
          },
          {
            "code": "self_intersection",
            "severity": "not_checked",
            "details": "Self-intersections and touching contours have not been checked. Verify the file in the target software."
          }
        ]
      },
      {
        "source": "jpeg-q08",
        "quality": 0.08,
        "threshold": 192,
        "differingBinaryPixelsVsClean": 74,
        "fineLineForegroundPixelsOf70": 69,
        "foregroundPixels": 11218,
        "contours": 5,
        "holes": 1,
        "nodes": 124,
        "pixelBounds": {
          "minX": 16,
          "minY": 15,
          "maxX": 176,
          "maxY": 111,
          "width": 160,
          "height": 96
        },
        "physicalBoundsMm": {
          "minX": 0,
          "minY": 0,
          "maxX": 60,
          "maxY": 36,
          "width": 60,
          "height": 36
        },
        "inspection": [
          {
            "code": "complexity",
            "severity": "pass",
            "details": "124 vertices in 5 contours."
          },
          {
            "code": "basic_geometry",
            "severity": "pass",
            "details": "Closed contours, finite coordinates, nonzero segments and exact duplicate segments checked."
          },
          {
            "code": "self_intersection",
            "severity": "not_checked",
            "details": "Self-intersections and touching contours have not been checked. Verify the file in the target software."
          }
        ]
      }
    ],
    "compressionMeasurements": [
      {
        "quality": 0.92,
        "changedPixels": 1676,
        "changedCleanWhitePixels": 583,
        "meanAbsoluteRgbChannelError": 0.13045247395833334,
        "maxChannelError": 11
      },
      {
        "quality": 0.08,
        "changedPixels": 22439,
        "changedCleanWhitePixels": 12223,
        "meanAbsoluteRgbChannelError": 3.94921875,
        "maxChannelError": 105
      }
    ]
  },
  "editor": {
    "provenance": "Manually authored engineering SVG fixtures; neither file is a native editor export or an actual text-to-path edit. The L-shaped prepared path is self-drawn, not a font outline and not a promise of identical typography.",
    "inputUnits": "explicit 80mm x 50mm and matching viewBox",
    "source": {
      "editableText": "L",
      "textElementCount": 1,
      "pathElements": 1,
      "fillColors": [
        "#176878",
        "#e88735"
      ]
    },
    "prepared": {
      "textElementCount": 0,
      "pathElements": 2,
      "fillColors": [
        "#176878",
        "#e88735"
      ]
    },
    "parser": {
      "original": {
        "entities": [
          {
            "type": "LWPOLYLINE",
            "layer": "0",
            "points": [
              {
                "x": 0,
                "y": 0
              },
              {
                "x": 80,
                "y": 0
              },
              {
                "x": 80,
                "y": 50
              },
              {
                "x": 0,
                "y": 50
              }
            ],
            "closed": true
          },
          {
            "type": "LWPOLYLINE",
            "layer": "0",
            "points": [
              {
                "x": 50,
                "y": 10
              },
              {
                "x": 70,
                "y": 10
              },
              {
                "x": 70,
                "y": 25
              },
              {
                "x": 50,
                "y": 25
              }
            ],
            "closed": true
          }
        ],
        "width": 80,
        "height": 50,
        "issues": [
          {
            "severity": "not_checked",
            "code": "ELEMENT_text",
            "details": "text is outside the strict SVG subset."
          }
        ]
      },
      "prepared": {
        "entities": [
          {
            "type": "LWPOLYLINE",
            "layer": "0",
            "points": [
              {
                "x": 0,
                "y": 0
              },
              {
                "x": 80,
                "y": 0
              },
              {
                "x": 80,
                "y": 50
              },
              {
                "x": 0,
                "y": 50
              }
            ],
            "closed": true
          },
          {
            "type": "LWPOLYLINE",
            "layer": "0",
            "points": [
              {
                "x": 50,
                "y": 10
              },
              {
                "x": 70,
                "y": 10
              },
              {
                "x": 70,
                "y": 25
              },
              {
                "x": 50,
                "y": 25
              }
            ],
            "closed": true
          },
          {
            "type": "LWPOLYLINE",
            "layer": "0",
            "points": [
              {
                "x": 10,
                "y": 28
              },
              {
                "x": 13,
                "y": 28
              },
              {
                "x": 13,
                "y": 37
              },
              {
                "x": 20,
                "y": 37
              },
              {
                "x": 20,
                "y": 40
              },
              {
                "x": 10,
                "y": 40
              }
            ],
            "closed": true
          }
        ],
        "width": 80,
        "height": 50,
        "issues": [
          {
            "severity": "pass",
            "code": "STRICT_SUBSET",
            "details": "SVG uses the strict 2D subset."
          }
        ]
      }
    },
    "liveTextBehavior": "Parser-level diagnostic: strict parser emits not_checked ELEMENT_text and omits text. The current UI blocks DXF download when source issues are present. The text-omitted artifact deliberately reproduces the former UI omission via raw APIs; it is not a complete usable export. Browser regression evidence is separate.",
    "colorBehavior": "SVG source and prepared fixture contain two fill colors. Strict SVG parser converts only geometry and assigns layer 0; generated DXF has no color metadata. Filled SVG holes become separate closed polylines, whose machining semantics need destination-software checks.",
    "nativeEditorTests": "Not performed. No Inkscape/Illustrator edit or export compatibility claim.",
    "originalDxf": {
      "version": "AC1015",
      "insunits": 4,
      "entityCount": 2,
      "vertexCounts": [
        4,
        4
      ],
      "allClosed": true,
      "bounds": {
        "width": 80,
        "height": 50
      }
    },
    "preparedDxf": {
      "version": "AC1015",
      "insunits": 4,
      "entityCount": 3,
      "vertexCounts": [
        4,
        4,
        6
      ],
      "allClosed": true,
      "bounds": {
        "width": 80,
        "height": 50
      }
    }
  }
}
