{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.7/elements/member.schema.json",
  "$comment": "OpenEik 0.2: folded by tools/fold-schemas.mjs from the proposal member, which 0.2 makes a rule (decision D5). Written by hand from the text, not generated.",
  "title": "member element",
  "description": "An element record of category \"member\" (Part II, 6.2.1): a brace, a strut, a tie or another linear member that is neither a beam nor a column, in the structure discipline folder. Its profile's two points, at its levelId and offset and at its end's, are the two ends of its reference line, the line through the middle of its section (Part IV, 6.5 and 6.7); they may be one point in plan, so that it stands plumb. It may carry roll, taper and joins, as a beam does, and none of endRise, turn, base and connection.",
  "allOf": [
    {
      "$ref": "element.schema.json"
    },
    {
      "properties": {
        "category": {
          "const": "member"
        },
        "bars": false,
        "base": false,
        "bottomPlate": false,
        "cable": false,
        "connection": false,
        "depth": false,
        "edgeAttachments": false,
        "edges": false,
        "electrical": false,
        "end": {
          "description": "The end of the member's reference line: its level, and its offset from it in mm, at its profile's second point (Part II, 6.2.1, rule 3).",
          "type": "object",
          "properties": {
            "levelId": {
              "type": "string",
              "minLength": 1,
              "x-eik-ref": "level"
            },
            "offset": {
              "type": "number"
            }
          },
          "required": [
            "levelId",
            "offset"
          ],
          "x-eik-closed": true
        },
        "endRise": false,
        "framingCorners": false,
        "framingJoints": false,
        "framingOffset": false,
        "framingStart": false,
        "framingStuds": false,
        "framingTees": false,
        "framingTop": false,
        "generic": false,
        "grading": false,
        "joints": false,
        "mep": false,
        "panels": false,
        "profile": {
          "minItems": 2,
          "maxItems": 2
        },
        "propertyLine": false,
        "provision": false,
        "railing": false,
        "roof": false,
        "room": false,
        "roomBounding": false,
        "sheet": false,
        "stair": false,
        "terminal": false,
        "terrain": false,
        "top": false,
        "turn": false,
        "wallOutline": false,
        "water": false
      },
      "required": [
        "end"
      ]
    },
    {
      "properties": {
        "declaredGeometry": {
          "properties": {
            "envelope": {
              "items": {
                "not": {
                  "required": [
                    "kind"
                  ],
                  "properties": {
                    "kind": {
                      "const": "swept"
                    }
                  }
                }
              }
            },
            "clearances": {
              "items": {
                "properties": {
                  "body": {
                    "not": {
                      "required": [
                        "kind"
                      ],
                      "properties": {
                        "kind": {
                          "const": "swept"
                        }
                      }
                    }
                  }
                }
              }
            },
            "parts": {
              "items": {
                "properties": {
                  "bodies": {
                    "items": {
                      "not": {
                        "required": [
                          "kind"
                        ],
                        "properties": {
                          "kind": {
                            "const": "swept"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    {
      "properties": {
        "declaredGeometry": {
          "properties": {
            "frame": {
              "not": {
                "const": "line"
              }
            }
          }
        }
      }
    },
    {
      "properties": {
        "insertAt": {
          "type": "object",
          "properties": {
            "face": {
              "type": "string",
              "enum": [
                "exterior",
                "interior",
                "top",
                "bottom",
                "start",
                "end"
              ]
            },
            "along": {
              "type": "number"
            },
            "up": {
              "type": "number"
            },
            "across": {
              "type": "number"
            },
            "turn": {
              "type": "number",
              "enum": [
                0,
                90
              ]
            },
            "tilt": {
              "type": "number",
              "minimum": -80,
              "maximum": 80
            },
            "count": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "spacing": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 50000
            },
            "direction": {
              "type": "string",
              "enum": [
                "along",
                "up"
              ]
            },
            "path": {
              "type": "array",
              "items": {
                "type": "array",
                "minItems": 3,
                "maxItems": 3,
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              "minItems": 1,
              "maxItems": 60
            }
          },
          "required": [
            "face"
          ],
          "x-eik-closed": true
        }
      }
    }
  ]
}
