{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.1/proposed/member/elements/member.schema.json",
  "$comment": "Proposed for OpenEik 0.2: Part II, 6.2.1, a member between two points, and Part IV, 6.7. Written by hand, not generated: tools/generate-schemas.mjs keeps this folder and lists none of it in index.json. No file of OpenEik 0.1 is held to it; a validator applies it only when asked for the proposal (@openeik/tools: proposals [\"member\"]).",
  "title": "member element",
  "description": "An element record of category \"member\" (Part II, 6.2.1, proposed for 0.2): 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": "../../../elements/element.schema.json"
    },
    {
      "properties": {
        "category": {
          "const": "member"
        },
        "bars": false,
        "base": false,
        "bottomPlate": false,
        "connection": false,
        "edgeAttachments": false,
        "edges": false,
        "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,
        "propertyLine": false,
        "railing": false,
        "roof": false,
        "room": false,
        "roomBounding": false,
        "sheet": false,
        "stair": false,
        "terminal": false,
        "terrain": false,
        "top": false,
        "turn": false,
        "wallOutline": false,
        "profile": {
          "minItems": 2,
          "maxItems": 2
        },
        "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
        }
      },
      "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"
              }
            }
          }
        }
      }
    }
  ]
}
