{
  "openapi": "3.1.1",
  "info": {
    "title": "Technical Drawing from a 3D Form Model API",
    "version": "1.0.0",
    "summary": "Turn a 3D form model into a dimensioned multi-view drawing as PDF, DXF and SVG.",
    "description": "Every endpoint performs the same calculation as the human page and returns inputs, result, units, assumptions, sources, warnings and computedAt. MCP endpoint: /mcp."
  },
  "servers": [
    {
      "url": "https://kerfwiseformdrawing.usefulweb.app"
    }
  ],
  "paths": {
    "/api/v1/calculate": {
      "post": {
        "operationId": "calculate",
        "summary": "Turn a 3D form model into a dimensioned multi-view drawing as PDF, DXF and SVG.",
        "description": "Paste a Kerfwise Form Studio project and get a drawing sheet with front, top and side views in first- or third-angle projection, dashed hidden edges, an optional hatched section, overall or chain dimensions and a title block. Download it as SVG, DXF R12 or PDF at a true scale.\n\nMethodology:\n- Each visible solid is extruded and triangulated exactly as in Form Studio (millimetres, Z up). Hidden solids are left out.\n- Orthographic views look along the model axes: front from −Y, right from +X, top from +Z (left, back and bottom opposite). First-angle (ISO) places the top view below the front view and the right view on its left; third-angle (ANSI) places them above and on the right.\n- Edges are drawn where neighbouring faces meet at more than 20°, on silhouettes and on open boundaries, so faceted circles show their outline but not every facet. Every edge is split where it crosses another triangle or passes through its plane; each piece is tested against all triangles in front of it (exact for these planar facets) and drawn solid or dashed.\n- A section removes the material between the viewer and the cutting plane. Cut faces are outlined thick and hatched at 45°, alternating per solid; overlapping solids are not fused, so their cut faces overlap.\n- Auto scale picks the largest ISO 5455 scale (5:1 … 1:5000) at which all views, dimension space and labels fit above the title block. Dimension values are true model lengths in the project unit (millimetres to 0.1, inches to 0.01). Chain dimensions follow the extents of the individual solids.\n- SVG and PDF are sized in millimetres for 1:1 printing at 100 %; DXF R12 contains the same sheet in paper millimetres on separate layers. PDF uses the standard Helvetica font, so labels outside Western European scripts fall back to English.\n\nA concept drawing of the faceted model: no tolerances, surface finish, threads or welding symbols, and overlapping solids are not fused. Check every dimension before you manufacture anything.",
        "tags": [
          "apps"
        ],
        "x-mcp-tool": "kerfwise_form_drawing",
        "x-owner-app": "kerfwise",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KerfwiseFormDrawingInput"
              },
              "examples": {
                "example1": {
                  "summary": "L-shaped counter with a side section",
                  "value": {
                    "project": "{\"format\":\"kerfwise-form\",\"version\":1,\"name\":\"L-shaped counter\",\"units\":\"mm\",\"grid\":100,\"snap\":true,\"objects\":[{\"id\":\"counter\",\"name\":\"Counter volume\",\"tag\":\"Concepts\",\"color\":\"#bda483\",\"profile\":[[0,0],[2800,0],[2800,650],[900,650],[900,2200],[0,2200]],\"height\":900,\"x\":-1400,\"y\":-1100,\"z\":0,\"rotation\":0,\"visible\":true,\"locked\":false}],\"scenes\":[{\"name\":\"Overview\",\"camera\":{\"azimuth\":-45,\"elevation\":32,\"target\":[0,0,450],\"span\":4223.8045646076}},{\"name\":\"Plan view\",\"camera\":{\"azimuth\":-90,\"elevation\":90,\"target\":[0,0,450],\"span\":4223.8045646076}}]}",
                    "sectionAxis": "x",
                    "sectionOffset": 300,
                    "sectionLabel": "A",
                    "viewLeft": false
                  }
                },
                "example2": {
                  "summary": "Studio corner, third angle on A3",
                  "value": {
                    "project": "{\"format\":\"kerfwise-form\",\"version\":1,\"name\":\"Studio corner\",\"units\":\"mm\",\"grid\":100,\"snap\":true,\"objects\":[{\"id\":\"part-1\",\"name\":\"Floor\",\"tag\":\"Architecture\",\"color\":\"#e0ddd3\",\"profile\":[[0,0],[4800,0],[4800,3600],[0,3600]],\"height\":40,\"x\":-2400,\"y\":-1800,\"z\":-40,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-2\",\"name\":\"Back wall\",\"tag\":\"Architecture\",\"color\":\"#e8e6dc\",\"profile\":[[0,0],[4800,0],[4800,100],[0,100]],\"height\":2200,\"x\":-2400,\"y\":1700,\"z\":0,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-3\",\"name\":\"Side wall\",\"tag\":\"Architecture\",\"color\":\"#d8dfdb\",\"profile\":[[0,0],[100,0],[100,3500],[0,3500]],\"height\":2200,\"x\":-2400,\"y\":-1800,\"z\":0,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-4\",\"name\":\"Desk top\",\"tag\":\"Furniture\",\"color\":\"#bd9464\",\"profile\":[[0,0],[2200,0],[2200,850],[0,850]],\"height\":60,\"x\":-1700,\"y\":100,\"z\":720,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-5\",\"name\":\"Desk leg\",\"tag\":\"Furniture\",\"color\":\"#364c4a\",\"profile\":[[0,0],[70,0],[70,70],[0,70]],\"height\":720,\"x\":-1620,\"y\":180,\"z\":0,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-6\",\"name\":\"Desk leg\",\"tag\":\"Furniture\",\"color\":\"#364c4a\",\"profile\":[[0,0],[70,0],[70,70],[0,70]],\"height\":720,\"x\":-1620,\"y\":790,\"z\":0,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-7\",\"name\":\"Desk leg\",\"tag\":\"Furniture\",\"color\":\"#364c4a\",\"profile\":[[0,0],[70,0],[70,70],[0,70]],\"height\":720,\"x\":360,\"y\":180,\"z\":0,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-8\",\"name\":\"Desk leg\",\"tag\":\"Furniture\",\"color\":\"#364c4a\",\"profile\":[[0,0],[70,0],[70,70],[0,70]],\"height\":720,\"x\":360,\"y\":790,\"z\":0,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-9\",\"name\":\"Shelf\",\"tag\":\"Furniture\",\"color\":\"#bd9464\",\"profile\":[[0,0],[1100,0],[1100,360],[0,360]],\"height\":45,\"x\":-1900,\"y\":1200,\"z\":1350,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-10\",\"name\":\"Storage\",\"tag\":\"Furniture\",\"color\":\"#d6b98c\",\"profile\":[[0,0],[650,0],[650,500],[0,500]],\"height\":650,\"x\":1200,\"y\":1000,\"z\":0,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-11\",\"name\":\"Seat\",\"tag\":\"Furniture\",\"color\":\"#597c75\",\"profile\":[[0,0],[650,0],[650,600],[0,600]],\"height\":110,\"x\":-1100,\"y\":-950,\"z\":460,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-12\",\"name\":\"Seat leg\",\"tag\":\"Furniture\",\"color\":\"#364c4a\",\"profile\":[[0,0],[45,0],[45,45],[0,45]],\"height\":460,\"x\":-1050,\"y\":-900,\"z\":0,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-13\",\"name\":\"Seat leg\",\"tag\":\"Furniture\",\"color\":\"#364c4a\",\"profile\":[[0,0],[45,0],[45,45],[0,45]],\"height\":460,\"x\":-1050,\"y\":-500,\"z\":0,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-14\",\"name\":\"Seat leg\",\"tag\":\"Furniture\",\"color\":\"#364c4a\",\"profile\":[[0,0],[45,0],[45,45],[0,45]],\"height\":460,\"x\":-550,\"y\":-900,\"z\":0,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-15\",\"name\":\"Seat leg\",\"tag\":\"Furniture\",\"color\":\"#364c4a\",\"profile\":[[0,0],[45,0],[45,45],[0,45]],\"height\":460,\"x\":-550,\"y\":-500,\"z\":0,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-16\",\"name\":\"Seat back\",\"tag\":\"Furniture\",\"color\":\"#597c75\",\"profile\":[[0,0],[650,0],[650,70],[0,70]],\"height\":550,\"x\":-1100,\"y\":-950,\"z\":500,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"planter\",\"name\":\"Planter\",\"tag\":\"Details\",\"color\":\"#bd7962\",\"profile\":[[210,0],[202.84442352070434,54.35199947152935],[181.86533479473212,104.99999999999999],[148.49242404917499,148.49242404917496],[105.00000000000003,181.8653347947321],[54.35199947152935,202.84442352070434],[1.2858791391047208e-14,210],[-54.35199947152938,202.84442352070434],[-104.99999999999996,181.86533479473212],[-148.49242404917496,148.49242404917499],[-181.86533479473212,104.99999999999999],[-202.8444235207043,54.35199947152941],[-210,2.5717582782094416e-14],[-202.84442352070437,-54.351999471529275],[-181.8653347947321,-105.00000000000003],[-148.492424049175,-148.49242404917496],[-105.0000000000001,-181.8653347947321],[-54.35199947152933,-202.84442352070434],[-3.857637417314162e-14,-210],[54.35199947152926,-202.84442352070437],[105.00000000000003,-181.8653347947321],[148.49242404917496,-148.492424049175],[181.86533479473206,-105.0000000000001],[202.84442352070434,-54.351999471529346]],\"height\":450,\"x\":1450,\"y\":-1000,\"z\":0,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"plant\",\"name\":\"Plant crown\",\"tag\":\"Details\",\"color\":\"#52765d\",\"profile\":[[300,0],[259.8076211353316,149.99999999999997],[150.00000000000003,259.8076211353316],[1.8369701987210297e-14,300],[-149.99999999999994,259.8076211353316],[-259.8076211353316,149.99999999999997],[-300,3.6739403974420595e-14],[-259.8076211353316,-150.00000000000003],[-150.00000000000014,-259.80762113533154],[-5.510910596163089e-14,-300],[150.00000000000003,-259.8076211353316],[259.8076211353315,-150.00000000000014]],\"height\":700,\"x\":1450,\"y\":-1000,\"z\":400,\"rotation\":0,\"visible\":true,\"locked\":false}],\"scenes\":[{\"name\":\"Overview\",\"camera\":{\"azimuth\":-45,\"elevation\":32,\"target\":[0,0,1080],\"span\":7365.173181942159}},{\"name\":\"Plan view\",\"camera\":{\"azimuth\":-90,\"elevation\":90,\"target\":[0,0,1080],\"span\":7365.173181942159}}]}",
                    "projection": "third",
                    "hidden": false,
                    "title": "Studio corner layout",
                    "drawnBy": "Sam"
                  }
                },
                "example3": {
                  "summary": "Terraced forms with chain dimensions",
                  "value": {
                    "project": "{\"format\":\"kerfwise-form\",\"version\":1,\"name\":\"Terraced forms\",\"units\":\"mm\",\"grid\":100,\"snap\":true,\"objects\":[{\"id\":\"part-1\",\"name\":\"Terrace 1\",\"tag\":\"Objects\",\"color\":\"#d6c5ab\",\"profile\":[[0,0],[2200,0],[2200,1800],[0,1800]],\"height\":300,\"x\":-1100,\"y\":-900,\"z\":0,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-2\",\"name\":\"Terrace 2\",\"tag\":\"Objects\",\"color\":\"#b5c5b6\",\"profile\":[[0,0],[1800,0],[1800,1500],[0,1500]],\"height\":300,\"x\":-900,\"y\":-750,\"z\":300,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-3\",\"name\":\"Terrace 3\",\"tag\":\"Objects\",\"color\":\"#789b90\",\"profile\":[[0,0],[1400,0],[1400,1200],[0,1200]],\"height\":300,\"x\":-700,\"y\":-600,\"z\":600,\"rotation\":0,\"visible\":true,\"locked\":false},{\"id\":\"part-4\",\"name\":\"Terrace 4\",\"tag\":\"Objects\",\"color\":\"#3e6662\",\"profile\":[[0,0],[1000,0],[1000,900],[0,900]],\"height\":300,\"x\":-500,\"y\":-450,\"z\":900,\"rotation\":0,\"visible\":true,\"locked\":false}],\"scenes\":[{\"name\":\"Overview\",\"camera\":{\"azimuth\":-45,\"elevation\":32,\"target\":[0,0,600],\"span\":3548.2671827245476}},{\"name\":\"Plan view\",\"camera\":{\"azimuth\":-90,\"elevation\":90,\"target\":[0,0,600],\"span\":3548.2671827245476}}]}",
                    "dimensions": "chain",
                    "sheet": "A4"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KerfwiseFormDrawingResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tool": {
      "get": {
        "operationId": "getToolDefinition",
        "summary": "Inputs, output schema and examples for this tool",
        "responses": {
          "200": {
            "description": "Tool definition.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details. 422 responses include per-field `errors`.",
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "field",
                "message"
              ],
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "KerfwiseFormDrawingInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "project": {
            "title": "Form Studio project JSON",
            "type": "string",
            "maxLength": 2000000,
            "default": "{\n  \"format\": \"kerfwise-form\",\n  \"version\": 1,\n  \"name\": \"L-shaped counter\",\n  \"units\": \"mm\",\n  \"grid\": 100,\n  \"snap\": true,\n  \"objects\": [\n    {\n      \"id\": \"counter\",\n      \"name\": \"Counter volume\",\n      \"tag\": \"Concepts\",\n      \"color\": \"#bda483\",\n      \"profile\": [\n        [\n          0,\n          0\n        ],\n        [\n          2800,\n          0\n        ],\n        [\n          2800,\n          650\n        ],\n        [\n          900,\n          650\n        ],\n        [\n          900,\n          2200\n        ],\n        [\n          0,\n          2200\n        ]\n      ],\n      \"height\": 900,\n      \"x\": -1400,\n      \"y\": -1100,\n      \"z\": 0,\n      \"rotation\": 0,\n      \"visible\": true,\n      \"locked\": false\n    }\n  ],\n  \"scenes\": [\n    {\n      \"name\": \"Overview\",\n      \"camera\": {\n        \"azimuth\": -45,\n        \"elevation\": 32,\n        \"target\": [\n          0,\n          0,\n          450\n        ],\n        \"span\": 4223.8045646076\n      }\n    },\n    {\n      \"name\": \"Plan view\",\n      \"camera\": {\n        \"azimuth\": -90,\n        \"elevation\": 90,\n        \"target\": [\n          0,\n          0,\n          450\n        ],\n        \"span\": 4223.8045646076\n      }\n    }\n  ]\n}"
          },
          "sheet": {
            "title": "Sheet size",
            "type": "string",
            "enum": [
              "A4",
              "A3",
              "A2",
              "A1",
              "letter",
              "tabloid"
            ],
            "default": "A3"
          },
          "orientation": {
            "title": "Orientation",
            "type": "string",
            "enum": [
              "landscape",
              "portrait"
            ],
            "default": "landscape"
          },
          "projection": {
            "title": "Projection method",
            "type": "string",
            "enum": [
              "first",
              "third"
            ],
            "default": "first"
          },
          "scale": {
            "title": "Scale",
            "type": "string",
            "enum": [
              "auto",
              "5:1",
              "2:1",
              "1:1",
              "1:2",
              "1:5",
              "1:10",
              "1:20",
              "1:50",
              "1:100",
              "1:200",
              "1:500",
              "1:1000",
              "1:2000",
              "1:5000"
            ],
            "default": "auto"
          },
          "viewFront": {
            "title": "Front view",
            "type": "boolean",
            "default": true
          },
          "viewTop": {
            "title": "Top view",
            "type": "boolean",
            "default": true
          },
          "viewRight": {
            "title": "Right view",
            "type": "boolean",
            "default": true
          },
          "viewLeft": {
            "title": "Left view",
            "type": "boolean",
            "default": false
          },
          "viewBack": {
            "title": "Back view",
            "type": "boolean",
            "default": false
          },
          "viewBottom": {
            "title": "Bottom view",
            "type": "boolean",
            "default": false
          },
          "hidden": {
            "title": "Draw hidden edges dashed",
            "type": "boolean",
            "default": true
          },
          "dimensions": {
            "title": "Dimensions",
            "type": "string",
            "enum": [
              "overall",
              "chain",
              "none"
            ],
            "default": "overall"
          },
          "sectionAxis": {
            "title": "Section plane",
            "type": "string",
            "enum": [
              "none",
              "x",
              "y",
              "z"
            ],
            "default": "none"
          },
          "sectionOffset": {
            "title": "Section plane position (mm)",
            "type": "number",
            "minimum": -300000,
            "maximum": 300000,
            "default": 0
          },
          "sectionLabel": {
            "title": "Section letter",
            "type": "string",
            "maxLength": 1,
            "default": "A"
          },
          "title": {
            "title": "Drawing title (empty = project name)",
            "type": "string",
            "maxLength": 80,
            "default": ""
          },
          "drawnBy": {
            "title": "Drawn by",
            "type": "string",
            "maxLength": 40,
            "default": ""
          },
          "date": {
            "title": "Date",
            "type": "string",
            "maxLength": 20,
            "default": ""
          }
        },
        "required": []
      },
      "KerfwiseFormDrawingResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "settings",
              "sheet",
              "scale",
              "views",
              "dimensions",
              "warnings",
              "exports",
              "project",
              "openInApp"
            ],
            "properties": {
              "settings": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "sheet",
                  "orientation",
                  "projection",
                  "scale",
                  "views",
                  "hidden",
                  "dimensions",
                  "section",
                  "title",
                  "drawnBy",
                  "date"
                ],
                "properties": {
                  "sheet": {
                    "enum": [
                      "A4",
                      "A3",
                      "A2",
                      "A1",
                      "letter",
                      "tabloid"
                    ]
                  },
                  "orientation": {
                    "enum": [
                      "landscape",
                      "portrait"
                    ]
                  },
                  "projection": {
                    "enum": [
                      "first",
                      "third"
                    ]
                  },
                  "scale": {
                    "enum": [
                      "auto",
                      "5:1",
                      "2:1",
                      "1:1",
                      "1:2",
                      "1:5",
                      "1:10",
                      "1:20",
                      "1:50",
                      "1:100",
                      "1:200",
                      "1:500",
                      "1:1000",
                      "1:2000",
                      "1:5000"
                    ]
                  },
                  "views": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 6,
                    "uniqueItems": true,
                    "items": {
                      "enum": [
                        "front",
                        "top",
                        "right",
                        "left",
                        "back",
                        "bottom"
                      ]
                    }
                  },
                  "hidden": {
                    "type": "boolean"
                  },
                  "dimensions": {
                    "enum": [
                      "none",
                      "overall",
                      "chain"
                    ]
                  },
                  "section": {
                    "oneOf": [
                      {
                        "type": "null"
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "axis",
                          "offset",
                          "label"
                        ],
                        "properties": {
                          "axis": {
                            "enum": [
                              "x",
                              "y",
                              "z"
                            ]
                          },
                          "offset": {
                            "type": "number",
                            "minimum": -300000,
                            "maximum": 300000
                          },
                          "label": {
                            "type": "string",
                            "pattern": "^[A-Z]$"
                          }
                        }
                      }
                    ]
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "drawnBy": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "date": {
                    "type": "string",
                    "maxLength": 20
                  }
                }
              },
              "sheet": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "width",
                  "height"
                ],
                "properties": {
                  "width": {
                    "type": "number"
                  },
                  "height": {
                    "type": "number"
                  }
                }
              },
              "scale": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "label",
                  "ratio"
                ],
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "ratio": {
                    "type": "number"
                  }
                }
              },
              "views": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "label",
                    "visibleSegments",
                    "hiddenSegments",
                    "cutRegions",
                    "widthMm",
                    "heightMm",
                    "paper"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "visibleSegments": {
                      "type": "integer"
                    },
                    "hiddenSegments": {
                      "type": "integer"
                    },
                    "cutRegions": {
                      "type": "integer"
                    },
                    "widthMm": {
                      "type": "number"
                    },
                    "heightMm": {
                      "type": "number"
                    },
                    "paper": {
                      "type": "array",
                      "minItems": 4,
                      "maxItems": 4,
                      "items": {
                        "type": "number"
                      }
                    }
                  }
                }
              },
              "dimensions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "view",
                    "axis",
                    "from",
                    "to",
                    "valueMm",
                    "text",
                    "kind"
                  ],
                  "properties": {
                    "view": {
                      "type": "string"
                    },
                    "axis": {
                      "enum": [
                        "x",
                        "y",
                        "z"
                      ]
                    },
                    "from": {
                      "type": "number"
                    },
                    "to": {
                      "type": "number"
                    },
                    "valueMm": {
                      "type": "number"
                    },
                    "text": {
                      "type": "string"
                    },
                    "kind": {
                      "enum": [
                        "overall",
                        "chain"
                      ]
                    }
                  }
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "exports": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "svg",
                  "dxf",
                  "pdf"
                ],
                "properties": {
                  "svg": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "artifactId",
                      "filename",
                      "mime",
                      "bytes",
                      "sha256",
                      "path"
                    ],
                    "properties": {
                      "artifactId": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "mime": {
                        "type": "string"
                      },
                      "bytes": {
                        "type": "integer"
                      },
                      "sha256": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string",
                        "description": "Download path on the same site (valid for about 2 hours)."
                      }
                    }
                  },
                  "dxf": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "artifactId",
                      "filename",
                      "mime",
                      "bytes",
                      "sha256",
                      "path"
                    ],
                    "properties": {
                      "artifactId": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "mime": {
                        "type": "string"
                      },
                      "bytes": {
                        "type": "integer"
                      },
                      "sha256": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string",
                        "description": "Download path on the same site (valid for about 2 hours)."
                      }
                    }
                  },
                  "pdf": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "artifactId",
                      "filename",
                      "mime",
                      "bytes",
                      "sha256",
                      "path"
                    ],
                    "properties": {
                      "artifactId": {
                        "type": "string"
                      },
                      "filename": {
                        "type": "string"
                      },
                      "mime": {
                        "type": "string"
                      },
                      "bytes": {
                        "type": "integer"
                      },
                      "sha256": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string",
                        "description": "Download path on the same site (valid for about 2 hours)."
                      }
                    }
                  }
                }
              },
              "project": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "format",
                  "version",
                  "name",
                  "units",
                  "grid",
                  "snap",
                  "objects",
                  "scenes"
                ],
                "properties": {
                  "format": {
                    "const": "kerfwise-form"
                  },
                  "version": {
                    "const": 1
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "units": {
                    "enum": [
                      "mm",
                      "in"
                    ]
                  },
                  "grid": {
                    "type": "number",
                    "minimum": 0.1,
                    "maximum": 10000
                  },
                  "snap": {
                    "type": "boolean"
                  },
                  "objects": {
                    "type": "array",
                    "maxItems": 128,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "id",
                        "name",
                        "tag",
                        "color",
                        "profile",
                        "height",
                        "x",
                        "y",
                        "z",
                        "rotation",
                        "visible",
                        "locked"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[-a-zA-Z0-9_]{1,64}$"
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "tag": {
                          "type": "string",
                          "maxLength": 40
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[a-fA-F0-9]{6}$"
                        },
                        "profile": {
                          "type": "array",
                          "minItems": 3,
                          "maxItems": 64,
                          "items": {
                            "type": "array",
                            "minItems": 2,
                            "maxItems": 2,
                            "items": {
                              "type": "number",
                              "minimum": -100000,
                              "maximum": 100000
                            }
                          }
                        },
                        "height": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 100000
                        },
                        "x": {
                          "type": "number",
                          "minimum": -100000,
                          "maximum": 100000
                        },
                        "y": {
                          "type": "number",
                          "minimum": -100000,
                          "maximum": 100000
                        },
                        "z": {
                          "type": "number",
                          "minimum": -100000,
                          "maximum": 100000
                        },
                        "rotation": {
                          "type": "number"
                        },
                        "tiltX": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "tiltY": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "visible": {
                          "type": "boolean"
                        },
                        "locked": {
                          "type": "boolean"
                        },
                        "orthogonal": {
                          "type": "string",
                          "maxLength": 12000
                        },
                        "sketch": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "points",
                            "entities",
                            "constraints"
                          ],
                          "description": "2-D constraint sketch in millimetres (Y up). Arcs run counter-clockwise from a to b around c. Values of distance, radius and diameter constraints are millimetres, angles degrees; both may be expressions in the parameters.",
                          "properties": {
                            "points": {
                              "type": "array",
                              "maxItems": 200,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "id",
                                  "x",
                                  "y"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,31}$"
                                  },
                                  "x": {
                                    "type": "number",
                                    "minimum": -100000,
                                    "maximum": 100000
                                  },
                                  "y": {
                                    "type": "number",
                                    "minimum": -100000,
                                    "maximum": 100000
                                  }
                                }
                              }
                            },
                            "entities": {
                              "type": "array",
                              "maxItems": 200,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "id",
                                  "type"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,31}$"
                                  },
                                  "type": {
                                    "enum": [
                                      "line",
                                      "arc",
                                      "circle"
                                    ]
                                  },
                                  "a": {
                                    "type": "string",
                                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,31}$"
                                  },
                                  "b": {
                                    "type": "string",
                                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,31}$"
                                  },
                                  "c": {
                                    "type": "string",
                                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,31}$"
                                  },
                                  "r": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 100000
                                  },
                                  "construction": {
                                    "type": "boolean"
                                  }
                                }
                              }
                            },
                            "constraints": {
                              "type": "array",
                              "maxItems": 400,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "id",
                                  "type",
                                  "refs"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,31}$"
                                  },
                                  "type": {
                                    "enum": [
                                      "coincident",
                                      "horizontal",
                                      "vertical",
                                      "parallel",
                                      "perpendicular",
                                      "tangent",
                                      "equal",
                                      "distance",
                                      "distanceX",
                                      "distanceY",
                                      "angle",
                                      "radius",
                                      "diameter",
                                      "pointOnLine",
                                      "pointOnCircle",
                                      "midpoint",
                                      "symmetric",
                                      "fixed"
                                    ]
                                  },
                                  "refs": {
                                    "type": "array",
                                    "minItems": 1,
                                    "maxItems": 3,
                                    "items": {
                                      "type": "string",
                                      "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,31}$"
                                    }
                                  },
                                  "value": {
                                    "type": "string",
                                    "maxLength": 500
                                  }
                                }
                              }
                            },
                            "height": {
                              "type": "string",
                              "maxLength": 500,
                              "description": "Extrusion height in mm: a number or an expression in the parameters."
                            }
                          }
                        }
                      }
                    }
                  },
                  "scenes": {
                    "type": "array",
                    "maxItems": 8,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "name",
                        "camera"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "maxLength": 60
                        },
                        "camera": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "azimuth",
                            "elevation",
                            "span",
                            "target"
                          ],
                          "properties": {
                            "azimuth": {
                              "type": "number"
                            },
                            "elevation": {
                              "type": "number",
                              "minimum": 5,
                              "maximum": 90
                            },
                            "span": {
                              "type": "number",
                              "minimum": 10,
                              "maximum": 1000000
                            },
                            "target": {
                              "type": "array",
                              "minItems": 3,
                              "maxItems": 3,
                              "items": {
                                "type": "number"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "parameters": {
                    "type": "array",
                    "maxItems": 64,
                    "description": "Named parameters in order; each expression may use the parameters above it (Proofline expression syntax).",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "name",
                        "expression"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "pattern": "^[A-Za-z_][A-Za-z_0-9]*$"
                        },
                        "expression": {
                          "type": "string",
                          "maxLength": 500
                        }
                      }
                    }
                  },
                  "drawing": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "sheet",
                      "orientation",
                      "projection",
                      "scale",
                      "views",
                      "hidden",
                      "dimensions",
                      "section",
                      "title",
                      "drawnBy",
                      "date"
                    ],
                    "properties": {
                      "sheet": {
                        "enum": [
                          "A4",
                          "A3",
                          "A2",
                          "A1",
                          "letter",
                          "tabloid"
                        ]
                      },
                      "orientation": {
                        "enum": [
                          "landscape",
                          "portrait"
                        ]
                      },
                      "projection": {
                        "enum": [
                          "first",
                          "third"
                        ]
                      },
                      "scale": {
                        "enum": [
                          "auto",
                          "5:1",
                          "2:1",
                          "1:1",
                          "1:2",
                          "1:5",
                          "1:10",
                          "1:20",
                          "1:50",
                          "1:100",
                          "1:200",
                          "1:500",
                          "1:1000",
                          "1:2000",
                          "1:5000"
                        ]
                      },
                      "views": {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 6,
                        "uniqueItems": true,
                        "items": {
                          "enum": [
                            "front",
                            "top",
                            "right",
                            "left",
                            "back",
                            "bottom"
                          ]
                        }
                      },
                      "hidden": {
                        "type": "boolean"
                      },
                      "dimensions": {
                        "enum": [
                          "none",
                          "overall",
                          "chain"
                        ]
                      },
                      "section": {
                        "oneOf": [
                          {
                            "type": "null"
                          },
                          {
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "axis",
                              "offset",
                              "label"
                            ],
                            "properties": {
                              "axis": {
                                "enum": [
                                  "x",
                                  "y",
                                  "z"
                                ]
                              },
                              "offset": {
                                "type": "number",
                                "minimum": -300000,
                                "maximum": 300000
                              },
                              "label": {
                                "type": "string",
                                "pattern": "^[A-Z]$"
                              }
                            }
                          }
                        ]
                      },
                      "title": {
                        "type": "string",
                        "maxLength": 80
                      },
                      "drawnBy": {
                        "type": "string",
                        "maxLength": 40
                      },
                      "date": {
                        "type": "string",
                        "maxLength": 20
                      }
                    }
                  }
                }
              },
              "openInApp": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}