{
  "id": 21993557,
  "title": "Healing Messy Hand-Drawn Floor Plan Graphs into Watertight CAD Geometry in TypeScript",
  "url": "https://urgent.news/2026/11/26/healing-messy-hand-drawn-floor-plan-graphs-into-watertight-cad",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-26T15:24:13.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/clara_sutton/healing-messy-hand-drawn-floor-plan-graphs-into-watertight-cad-geometry-in-typescript-1mkj"
  },
  "original_language": "en",
  "account": "The healing process begins with connected-component vertex welding, using a disjoint-set (Union-Find) structure with path compression. This method ensures that vertices within a specified weldRadiusIn (default 8 inches) are grouped into components, preventing order-dependent errors during the welding process. Next, walls are snapped to angles within a 6-degree range, followed by re-welding vertices within the same weldRadiusIn. Afterward, the algorithm splits X-intersections and T-junctions within a 6-inch range, deduplicating and culling any degenerate walls. Finally, all openings are clamped safely inside the host wall endpoints, ensuring a clean, watertight CAD geometry for further processing.",
  "summary": "If you ask a vision model to extract wall segments from a photograph of a hand-drawn floor plan — or let a human sketch walls freely with a mouse — the output looks plausible at a glance and fails catastrophically the moment you try to compute room polygons, square footage, 3D wall meshes, or layered AutoCAD .DXF files. The failures are always the same four geometric defects: Open corners: Two…",
  "key_points": [
    "Connected-component vertex welding groups vertices within weldRadiusIn",
    "Walls snapped to angles within 6-degree range",
    "Openings clamped inside host wall endpoints for watertight geometry"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}