{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/math.geometry.plane.input.json",
  "title": "Plane geometry — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "a": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
      "x-quantity-kind": "length",
      "x-dimension": [
        1,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "x-unit-policy": "arbitrary_consistent_length",
      "x-uuce-role": "scalar"
    },
    "width": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
    },
    "length": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
    },
    "b": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
      "x-quantity-kind": "length",
      "x-dimension": [
        1,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "x-unit-policy": "arbitrary_consistent_length",
      "x-uuce-role": "scalar"
    },
    "height": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
      "x-quantity-kind": "length",
      "x-dimension": [
        1,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "x-unit-policy": "arbitrary_consistent_length",
      "x-uuce-role": "scalar"
    },
    "s": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
      "x-quantity-kind": "length",
      "x-dimension": [
        1,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "x-unit-policy": "arbitrary_consistent_length",
      "x-uuce-role": "scalar"
    },
    "side": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
    },
    "n": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
    },
    "sides": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
    },
    "R": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
      "x-quantity-kind": "length",
      "x-dimension": [
        1,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "x-unit-policy": "arbitrary_consistent_length",
      "x-uuce-role": "scalar"
    },
    "outer": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
    },
    "R_outer": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
    },
    "r": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
      "x-quantity-kind": "length",
      "x-dimension": [
        1,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "x-unit-policy": "arbitrary_consistent_length",
      "x-uuce-role": "scalar"
    },
    "inner": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
    },
    "r_inner": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
    },
    "theta": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
      "x-unit": "deg",
      "x-unit-id": "cx:deg",
      "x-quantity-kind": "plane_angle",
      "x-role": "scalar",
      "x-dimension": [
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "x-uuce-unit": {
        "unit_id": "cx:deg",
        "revision": "1.0.0",
        "content_digest": "ebb31e3abee53f3bf57339c87949e1018d141739fba8a07f54c42ebfd219262b",
        "dependency_digest": "eef386126ec6524884c84bab06f2a96996df913376c0ce5ccdaca0e7faf7b9c3",
        "quantity_kind": "plane_angle",
        "dimension": [
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "registry_version": "0.3.0-preview.3",
        "digest_contract": "calculatorx-unit-definition-digests-v2",
        "registry_status": "preview",
        "definition_lifecycle": "candidate",
        "role": "scalar"
      }
    },
    "angle": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
      "x-unit": "deg",
      "x-unit-id": "cx:deg",
      "x-quantity-kind": "plane_angle",
      "x-role": "scalar",
      "x-dimension": [
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "x-uuce-unit": {
        "unit_id": "cx:deg",
        "revision": "1.0.0",
        "content_digest": "ebb31e3abee53f3bf57339c87949e1018d141739fba8a07f54c42ebfd219262b",
        "dependency_digest": "eef386126ec6524884c84bab06f2a96996df913376c0ce5ccdaca0e7faf7b9c3",
        "quantity_kind": "plane_angle",
        "dimension": [
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "registry_version": "0.3.0-preview.3",
        "digest_contract": "calculatorx-unit-definition-digests-v2",
        "registry_status": "preview",
        "definition_lifecycle": "candidate",
        "role": "scalar"
      }
    },
    "deg": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
      "x-unit": "deg",
      "x-unit-id": "cx:deg",
      "x-quantity-kind": "plane_angle",
      "x-role": "scalar",
      "x-dimension": [
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "x-uuce-unit": {
        "unit_id": "cx:deg",
        "revision": "1.0.0",
        "content_digest": "ebb31e3abee53f3bf57339c87949e1018d141739fba8a07f54c42ebfd219262b",
        "dependency_digest": "eef386126ec6524884c84bab06f2a96996df913376c0ce5ccdaca0e7faf7b9c3",
        "quantity_kind": "plane_angle",
        "dimension": [
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "registry_version": "0.3.0-preview.3",
        "digest_contract": "calculatorx-unit-definition-digests-v2",
        "registry_status": "preview",
        "definition_lifecycle": "candidate",
        "role": "scalar"
      }
    },
    "h": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
      "x-quantity-kind": "length",
      "x-dimension": [
        1,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "x-unit-policy": "arbitrary_consistent_length",
      "x-uuce-role": "scalar"
    },
    "vertices": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 32768
        },
        {
          "type": "array",
          "minItems": 3,
          "maxItems": 9,
          "items": {
            "oneOf": [
              {
                "type": "array",
                "minItems": 2,
                "maxItems": 2,
                "prefixItems": [
                  {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "maxLength": 1024,
                        "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
                      }
                    ],
                    "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
                  },
                  {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "maxLength": 1024,
                        "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
                      }
                    ],
                    "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
                  }
                ],
                "items": false
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "x",
                  "y"
                ],
                "properties": {
                  "x": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "maxLength": 1024,
                        "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
                      }
                    ],
                    "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
                    "x-quantity-kind": "length",
                    "x-dimension": [
                      1,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0
                    ],
                    "x-unit-policy": "arbitrary_consistent_length",
                    "x-uuce-role": "scalar"
                  },
                  "y": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "maxLength": 1024,
                        "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
                      }
                    ],
                    "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
                    "x-quantity-kind": "length",
                    "x-dimension": [
                      1,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0
                    ],
                    "x-unit-policy": "arbitrary_consistent_length",
                    "x-uuce-role": "scalar"
                  }
                }
              }
            ]
          }
        }
      ],
      "description": "3–8 distinct ordered simple-polygon vertices, optional repeated closing vertex. String x,y; x,y or flat even list. No self-crossing, nonadjacent contact or overlapping edges; checked by exact predicates after binary64 normalization."
    },
    "points": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 32768
        },
        {
          "type": "array",
          "minItems": 3,
          "maxItems": 9,
          "items": {
            "oneOf": [
              {
                "type": "array",
                "minItems": 2,
                "maxItems": 2,
                "prefixItems": [
                  {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "maxLength": 1024,
                        "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
                      }
                    ],
                    "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
                  },
                  {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "maxLength": 1024,
                        "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
                      }
                    ],
                    "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
                  }
                ],
                "items": false
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "x",
                  "y"
                ],
                "properties": {
                  "x": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "maxLength": 1024,
                        "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
                      }
                    ],
                    "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
                    "x-quantity-kind": "length",
                    "x-dimension": [
                      1,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0
                    ],
                    "x-unit-policy": "arbitrary_consistent_length",
                    "x-uuce-role": "scalar"
                  },
                  "y": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "maxLength": 1024,
                        "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
                      }
                    ],
                    "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
                    "x-quantity-kind": "length",
                    "x-dimension": [
                      1,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0
                    ],
                    "x-unit-policy": "arbitrary_consistent_length",
                    "x-uuce-role": "scalar"
                  }
                }
              }
            ]
          }
        }
      ],
      "description": "3–8 distinct ordered simple-polygon vertices, optional repeated closing vertex. String x,y; x,y or flat even list. No self-crossing, nonadjacent contact or overlapping edges; checked by exact predicates after binary64 normalization."
    },
    "vertices_xy": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 32768
        },
        {
          "type": "array",
          "minItems": 3,
          "maxItems": 9,
          "items": {
            "oneOf": [
              {
                "type": "array",
                "minItems": 2,
                "maxItems": 2,
                "prefixItems": [
                  {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "maxLength": 1024,
                        "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
                      }
                    ],
                    "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
                  },
                  {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "maxLength": 1024,
                        "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
                      }
                    ],
                    "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
                  }
                ],
                "items": false
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "x",
                  "y"
                ],
                "properties": {
                  "x": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "maxLength": 1024,
                        "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
                      }
                    ],
                    "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
                    "x-quantity-kind": "length",
                    "x-dimension": [
                      1,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0
                    ],
                    "x-unit-policy": "arbitrary_consistent_length",
                    "x-uuce-role": "scalar"
                  },
                  "y": {
                    "oneOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "string",
                        "maxLength": 1024,
                        "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
                      }
                    ],
                    "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity.",
                    "x-quantity-kind": "length",
                    "x-dimension": [
                      1,
                      0,
                      0,
                      0,
                      0,
                      0,
                      0
                    ],
                    "x-unit-policy": "arbitrary_consistent_length",
                    "x-uuce-role": "scalar"
                  }
                }
              }
            ]
          }
        }
      ],
      "description": "3–8 distinct ordered simple-polygon vertices, optional repeated closing vertex. String x,y; x,y or flat even list. No self-crossing, nonadjacent contact or overlapping edges; checked by exact predicates after binary64 normalization."
    },
    "base2": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
    },
    "base": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
    },
    "base1": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
    },
    "side2": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "string",
          "maxLength": 1024,
          "pattern": "^\\s*[+−–—-]?(?:[0-9]+(?:\\.[0-9]*)?|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?\\s*$"
        }
      ],
      "description": "Strict bounded decimal number/string; finite normal binary64 after conversion, except exact zero coordinates. Mode-specific positive dimensions, degrees and safe-integer n. Alias conflicts reject; all supplied numeric fields validate. Secondary validator checks range and polygon simplicity."
    },
    "mode": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "pattern": "^\\s*(?:[rR][eE][cC][tT][aA][nN][gG][lL][eE]|[rR][eE][cC][tT]|[oO][bB][lL][oO][nN][gG]|[sS][qQ][uU][aA][rR][eE]|[rR][eE][gG][uU][lL][aA][rR][_\\s-]+[pP][oO][lL][yY][gG][oO][nN]|[rR][eE][gG][uU][lL][aA][rR]|[pP][oO][lL][yY][gG][oO][nN]|[nN][_\\s-]+[gG][oO][nN]|[nN][gG][oO][nN]|[aA][nN][nN][uU][lL][uU][sS]|[rR][iI][nN][gG]|[wW][aA][sS][hH][eE][rR]|[pP][aA][rR][aA][lL][lL][eE][lL][oO][gG][rR][aA][mM]|[pP][aA][rR][aA]|[pP][aA][rR][aA][lL][lL][eE][lL][oO][gG][rR][aA][mM][_\\s-]+[aA][rR][eE][aA]|[tT][rR][aA][pP][eE][zZ][oO][iI][dD]|[tT][rR][aA][pP][eE][zZ][iI][uU][mM]|[tT][rR][aA][pP]|[iI][sS][oO][sS][cC][eE][lL][eE][sS][_\\s-]+[tT][rR][aA][pP][eE][zZ][oO][iI][dD]|[iI][rR][rR][eE][gG][uU][lL][aA][rR][_\\s-]+[pP][oO][lL][yY][gG][oO][nN]|[iI][rR][rR][eE][gG][uU][lL][aA][rR]|[sS][hH][oO][eE][lL][aA][cC][eE]|[iI][rR][rR][eE][gG][uU][lL][aA][rR][_\\s-]+[gG][oO][nN])\\s*$",
      "description": "Seven plane modes; omitted mode means rectangle. Named shape routes lock the selected shape. Required fields and matching aliases below; independent range/topology validation follows JSON Schema."
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "mode": {
            "pattern": "^\\s*(?:[rR][eE][cC][tT][aA][nN][gG][lL][eE]|[rR][eE][cC][tT]|[oO][bB][lL][oO][nN][gG])\\s*$"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "allOf": [
          {
            "anyOf": [
              {
                "required": [
                  "a"
                ]
              },
              {
                "required": [
                  "width"
                ]
              },
              {
                "required": [
                  "length"
                ]
              }
            ]
          },
          {
            "anyOf": [
              {
                "required": [
                  "b"
                ]
              },
              {
                "required": [
                  "height"
                ]
              }
            ]
          }
        ]
      }
    },
    {
      "if": {
        "properties": {
          "mode": {
            "pattern": "^\\s*(?:[sS][qQ][uU][aA][rR][eE])\\s*$"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "allOf": [
          {
            "anyOf": [
              {
                "required": [
                  "s"
                ]
              },
              {
                "required": [
                  "side"
                ]
              },
              {
                "required": [
                  "a"
                ]
              }
            ]
          }
        ]
      }
    },
    {
      "if": {
        "properties": {
          "mode": {
            "pattern": "^\\s*(?:[rR][eE][gG][uU][lL][aA][rR][_\\s-]+[pP][oO][lL][yY][gG][oO][nN]|[rR][eE][gG][uU][lL][aA][rR]|[pP][oO][lL][yY][gG][oO][nN]|[nN][_\\s-]+[gG][oO][nN]|[nN][gG][oO][nN])\\s*$"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "allOf": [
          {
            "anyOf": [
              {
                "required": [
                  "n"
                ]
              },
              {
                "required": [
                  "sides"
                ]
              }
            ]
          },
          {
            "anyOf": [
              {
                "required": [
                  "s"
                ]
              },
              {
                "required": [
                  "side"
                ]
              }
            ]
          }
        ]
      }
    },
    {
      "if": {
        "properties": {
          "mode": {
            "pattern": "^\\s*(?:[aA][nN][nN][uU][lL][uU][sS]|[rR][iI][nN][gG]|[wW][aA][sS][hH][eE][rR])\\s*$"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "allOf": [
          {
            "anyOf": [
              {
                "required": [
                  "R"
                ]
              },
              {
                "required": [
                  "outer"
                ]
              },
              {
                "required": [
                  "R_outer"
                ]
              }
            ]
          },
          {
            "anyOf": [
              {
                "required": [
                  "r"
                ]
              },
              {
                "required": [
                  "inner"
                ]
              },
              {
                "required": [
                  "r_inner"
                ]
              }
            ]
          }
        ]
      }
    },
    {
      "if": {
        "properties": {
          "mode": {
            "pattern": "^\\s*(?:[pP][aA][rR][aA][lL][lL][eE][lL][oO][gG][rR][aA][mM]|[pP][aA][rR][aA]|[pP][aA][rR][aA][lL][lL][eE][lL][oO][gG][rR][aA][mM][_\\s-]+[aA][rR][eE][aA])\\s*$"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "allOf": [
          {
            "anyOf": [
              {
                "required": [
                  "a"
                ]
              },
              {
                "required": [
                  "side"
                ]
              },
              {
                "required": [
                  "base"
                ]
              }
            ]
          },
          {
            "anyOf": [
              {
                "required": [
                  "b"
                ]
              },
              {
                "required": [
                  "side2"
                ]
              }
            ]
          },
          {
            "anyOf": [
              {
                "required": [
                  "theta"
                ]
              },
              {
                "required": [
                  "angle"
                ]
              },
              {
                "required": [
                  "deg"
                ]
              }
            ]
          }
        ]
      }
    },
    {
      "if": {
        "properties": {
          "mode": {
            "pattern": "^\\s*(?:[tT][rR][aA][pP][eE][zZ][oO][iI][dD]|[tT][rR][aA][pP][eE][zZ][iI][uU][mM]|[tT][rR][aA][pP]|[iI][sS][oO][sS][cC][eE][lL][eE][sS][_\\s-]+[tT][rR][aA][pP][eE][zZ][oO][iI][dD])\\s*$"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "allOf": [
          {
            "anyOf": [
              {
                "required": [
                  "a"
                ]
              },
              {
                "required": [
                  "base"
                ]
              },
              {
                "required": [
                  "base1"
                ]
              }
            ]
          },
          {
            "anyOf": [
              {
                "required": [
                  "b"
                ]
              },
              {
                "required": [
                  "base2"
                ]
              }
            ]
          },
          {
            "anyOf": [
              {
                "required": [
                  "h"
                ]
              },
              {
                "required": [
                  "height"
                ]
              }
            ]
          }
        ]
      }
    },
    {
      "if": {
        "properties": {
          "mode": {
            "pattern": "^\\s*(?:[iI][rR][rR][eE][gG][uU][lL][aA][rR][_\\s-]+[pP][oO][lL][yY][gG][oO][nN]|[iI][rR][rR][eE][gG][uU][lL][aA][rR]|[sS][hH][oO][eE][lL][aA][cC][eE]|[iI][rR][rR][eE][gG][uU][lL][aA][rR][_\\s-]+[gG][oO][nN])\\s*$"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "allOf": [
          {
            "anyOf": [
              {
                "required": [
                  "vertices"
                ]
              },
              {
                "required": [
                  "points"
                ]
              },
              {
                "required": [
                  "vertices_xy"
                ]
              }
            ]
          }
        ]
      }
    },
    {
      "if": {
        "not": {
          "required": [
            "mode"
          ]
        }
      },
      "then": {
        "allOf": [
          {
            "anyOf": [
              {
                "required": [
                  "a"
                ]
              },
              {
                "required": [
                  "width"
                ]
              },
              {
                "required": [
                  "length"
                ]
              }
            ]
          },
          {
            "anyOf": [
              {
                "required": [
                  "b"
                ]
              },
              {
                "required": [
                  "height"
                ]
              }
            ]
          }
        ]
      }
    }
  ],
  "description": "Seven Euclidean plane shapes: rectangle, square, regular polygon, annulus, parallelogram, isosceles trapezoid and validated simple polygon. Complete area/perimeter and secondary measures; consistent length units, angles in degrees. (calculation_version 1.6.0)",
  "x-unit-contract": {
    "protocol": "calculatorx-field-unit-contract-v1",
    "capability_id": "math.geometry.plane",
    "registry_version": "0.3.0-preview.3",
    "declaration_scope": "Field/branch declarations only; inactive fields are not asserted to exist. No conversion-engine migration or new numerical certification.",
    "path_format": "Paths relative to inputs or result_detail.value; dot separates properties, * denotes array items, $ denotes a scalar result.",
    "inputs": {
      "theta": {
        "unit": "deg",
        "reference": {
          "unit_id": "cx:deg",
          "revision": "1.0.0",
          "content_digest": "ebb31e3abee53f3bf57339c87949e1018d141739fba8a07f54c42ebfd219262b",
          "dependency_digest": "eef386126ec6524884c84bab06f2a96996df913376c0ce5ccdaca0e7faf7b9c3",
          "quantity_kind": "plane_angle",
          "dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "registry_version": "0.3.0-preview.3",
          "digest_contract": "calculatorx-unit-definition-digests-v2",
          "registry_status": "preview",
          "definition_lifecycle": "candidate",
          "role": "scalar"
        }
      },
      "angle": {
        "unit": "deg",
        "reference": {
          "unit_id": "cx:deg",
          "revision": "1.0.0",
          "content_digest": "ebb31e3abee53f3bf57339c87949e1018d141739fba8a07f54c42ebfd219262b",
          "dependency_digest": "eef386126ec6524884c84bab06f2a96996df913376c0ce5ccdaca0e7faf7b9c3",
          "quantity_kind": "plane_angle",
          "dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "registry_version": "0.3.0-preview.3",
          "digest_contract": "calculatorx-unit-definition-digests-v2",
          "registry_status": "preview",
          "definition_lifecycle": "candidate",
          "role": "scalar"
        }
      },
      "deg": {
        "unit": "deg",
        "reference": {
          "unit_id": "cx:deg",
          "revision": "1.0.0",
          "content_digest": "ebb31e3abee53f3bf57339c87949e1018d141739fba8a07f54c42ebfd219262b",
          "dependency_digest": "eef386126ec6524884c84bab06f2a96996df913376c0ce5ccdaca0e7faf7b9c3",
          "quantity_kind": "plane_angle",
          "dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "registry_version": "0.3.0-preview.3",
          "digest_contract": "calculatorx-unit-definition-digests-v2",
          "registry_status": "preview",
          "definition_lifecycle": "candidate",
          "role": "scalar"
        }
      }
    },
    "outputs": {
      "theta": {
        "unit": "deg",
        "reference": {
          "unit_id": "cx:deg",
          "revision": "1.0.0",
          "content_digest": "ebb31e3abee53f3bf57339c87949e1018d141739fba8a07f54c42ebfd219262b",
          "dependency_digest": "eef386126ec6524884c84bab06f2a96996df913376c0ce5ccdaca0e7faf7b9c3",
          "quantity_kind": "plane_angle",
          "dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "registry_version": "0.3.0-preview.3",
          "digest_contract": "calculatorx-unit-definition-digests-v2",
          "registry_status": "preview",
          "definition_lifecycle": "candidate",
          "role": "scalar"
        }
      },
      "interior_deg": {
        "unit": "deg",
        "reference": {
          "unit_id": "cx:deg",
          "revision": "1.0.0",
          "content_digest": "ebb31e3abee53f3bf57339c87949e1018d141739fba8a07f54c42ebfd219262b",
          "dependency_digest": "eef386126ec6524884c84bab06f2a96996df913376c0ce5ccdaca0e7faf7b9c3",
          "quantity_kind": "plane_angle",
          "dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "registry_version": "0.3.0-preview.3",
          "digest_contract": "calculatorx-unit-definition-digests-v2",
          "registry_status": "preview",
          "definition_lifecycle": "candidate",
          "role": "scalar"
        }
      },
      "central_deg": {
        "unit": "deg",
        "reference": {
          "unit_id": "cx:deg",
          "revision": "1.0.0",
          "content_digest": "ebb31e3abee53f3bf57339c87949e1018d141739fba8a07f54c42ebfd219262b",
          "dependency_digest": "eef386126ec6524884c84bab06f2a96996df913376c0ce5ccdaca0e7faf7b9c3",
          "quantity_kind": "plane_angle",
          "dimension": [
            0,
            0,
            0,
            0,
            0,
            0,
            0
          ],
          "registry_version": "0.3.0-preview.3",
          "digest_contract": "calculatorx-unit-definition-digests-v2",
          "registry_status": "preview",
          "definition_lifecycle": "candidate",
          "role": "scalar"
        }
      }
    },
    "quantity_policy": {
      "physical_unit_id": null,
      "input_policy": "Abstract consistent coordinate/length units; no physical unit is selected by this calculator.",
      "derived_policy": "Lengths inherit the input length unit U; areas U^2; volumes U^3. No implicit conversion or fixed metre binding.",
      "coefficient_policy": "Normalized implicit line/equation coefficients have equation-scale conventions, not universal physical unit IDs."
    }
  }
}
