{
  "schema_version": 1,
  "document": "angle-bracket",
  "base_revision": "r1",
  "operations": [
    {
      "op": "add_parameter",
      "id": "width",
      "parameter": {
        "value": 41,
        "unit": "mm",
        "greater_than": 0,
        "description": "Published dimension"
      }
    },
    {
      "op": "add_parameter",
      "id": "base",
      "parameter": {
        "value": 40,
        "unit": "mm",
        "greater_than": 0,
        "description": "Editable assumption from reference image"
      }
    },
    {
      "op": "add_parameter",
      "id": "height",
      "parameter": {
        "value": 40,
        "unit": "mm",
        "greater_than": 0,
        "description": "Published dimension"
      }
    },
    {
      "op": "add_parameter",
      "id": "thickness",
      "parameter": {
        "value": 6,
        "unit": "mm",
        "greater_than": 0,
        "description": "Published dimension"
      }
    },
    {
      "op": "add_parameter",
      "id": "bend_radius",
      "parameter": {
        "value": 4,
        "unit": "mm",
        "greater_than": 0,
        "description": "Editable assumption from reference image"
      }
    },
    {
      "op": "add_parameter",
      "id": "hole_diameter",
      "parameter": {
        "value": 14,
        "unit": "mm",
        "greater_than": 0,
        "description": "Editable assumption from reference image"
      }
    },
    {
      "op": "add_parameter",
      "id": "base_hole_y",
      "parameter": {
        "value": 25,
        "unit": "mm",
        "greater_than": 0,
        "description": "Editable assumption from reference image"
      }
    },
    {
      "op": "add_parameter",
      "id": "upright_hole_z",
      "parameter": {
        "value": 25,
        "unit": "mm",
        "greater_than": 0,
        "description": "Editable assumption from reference image"
      }
    },
    {
      "op": "add_feature",
      "feature": {
        "id": "bend_profile",
        "version": 1,
        "type": "sketch",
        "points": {
          "o": [
            0,
            0
          ],
          "a": [
            10,
            0
          ],
          "b": [
            40,
            0
          ],
          "c": [
            40,
            6
          ],
          "d": [
            10,
            6
          ],
          "e": [
            6,
            10
          ],
          "f": [
            6,
            40
          ],
          "g": [
            0,
            40
          ],
          "h": [
            0,
            10
          ],
          "center": [
            10,
            10
          ]
        },
        "constraints": [
          {
            "c": "fix",
            "p": "o",
            "at": [
              0,
              0
            ]
          },
          {
            "c": "distance_x",
            "a": "o",
            "b": "a",
            "value": "bend_radius+thickness"
          },
          {
            "c": "distance_y",
            "a": "o",
            "b": "a",
            "value": 0
          },
          {
            "c": "distance_x",
            "a": "o",
            "b": "b",
            "value": "base"
          },
          {
            "c": "distance_y",
            "a": "o",
            "b": "b",
            "value": 0
          },
          {
            "c": "distance_x",
            "a": "o",
            "b": "c",
            "value": "base"
          },
          {
            "c": "distance_y",
            "a": "o",
            "b": "c",
            "value": "thickness"
          },
          {
            "c": "distance_x",
            "a": "o",
            "b": "d",
            "value": "bend_radius+thickness"
          },
          {
            "c": "distance_y",
            "a": "o",
            "b": "d",
            "value": "thickness"
          },
          {
            "c": "distance_x",
            "a": "o",
            "b": "e",
            "value": "thickness"
          },
          {
            "c": "distance_y",
            "a": "o",
            "b": "e",
            "value": "bend_radius+thickness"
          },
          {
            "c": "distance_x",
            "a": "o",
            "b": "f",
            "value": "thickness"
          },
          {
            "c": "distance_y",
            "a": "o",
            "b": "f",
            "value": "height"
          },
          {
            "c": "distance_x",
            "a": "o",
            "b": "g",
            "value": 0
          },
          {
            "c": "distance_y",
            "a": "o",
            "b": "g",
            "value": "height"
          },
          {
            "c": "distance_x",
            "a": "o",
            "b": "h",
            "value": 0
          },
          {
            "c": "distance_y",
            "a": "o",
            "b": "h",
            "value": "bend_radius+thickness"
          },
          {
            "c": "distance_x",
            "a": "o",
            "b": "center",
            "value": "bend_radius+thickness"
          },
          {
            "c": "distance_y",
            "a": "o",
            "b": "center",
            "value": "bend_radius+thickness"
          }
        ],
        "plane": {
          "origin": [
            0,
            0,
            0
          ],
          "x": [
            0,
            1,
            0
          ],
          "y": [
            0,
            0,
            1
          ]
        },
        "profiles": {
          "outline": [
            "a",
            "b",
            "c",
            "d",
            "e",
            "f",
            "g",
            "h"
          ]
        },
        "arcs": [
          {
            "from": "d",
            "to": "e",
            "center": "center",
            "clockwise": true
          },
          {
            "from": "h",
            "to": "a",
            "center": "center",
            "clockwise": false
          }
        ]
      }
    },
    {
      "op": "add_feature",
      "feature": {
        "id": "formed_blank",
        "version": 1,
        "type": "extrude",
        "profile": {
          "feature": "bend_profile",
          "role": "outline",
          "expect": 1
        },
        "depth": "width"
      }
    },
    {
      "op": "add_feature",
      "feature": {
        "id": "base_hole_position",
        "version": 1,
        "type": "sketch",
        "points": {
          "o": [
            0,
            0
          ],
          "h": [
            20.5,
            25
          ]
        },
        "constraints": [
          {
            "c": "fix",
            "p": "o",
            "at": [
              0,
              0
            ]
          },
          {
            "c": "distance_x",
            "a": "o",
            "b": "h",
            "value": "width/2"
          },
          {
            "c": "distance_y",
            "a": "o",
            "b": "h",
            "value": "base_hole_y"
          }
        ],
        "plane": {
          "origin": [
            0,
            0,
            "thickness"
          ],
          "x": [
            1,
            0,
            0
          ],
          "y": [
            0,
            1,
            0
          ]
        },
        "point_sets": {
          "centers": [
            "h"
          ]
        }
      }
    },
    {
      "op": "add_feature",
      "feature": {
        "id": "base_hole",
        "version": 1,
        "type": "hole_pattern",
        "target": {
          "feature": "formed_blank",
          "role": "body",
          "expect": 1
        },
        "centers": {
          "feature": "base_hole_position",
          "role": "centers",
          "expect": 1
        },
        "diameter": "hole_diameter",
        "depth": "thickness"
      }
    },
    {
      "op": "add_feature",
      "feature": {
        "id": "upright_hole_position",
        "version": 1,
        "type": "sketch",
        "points": {
          "o": [
            0,
            0
          ],
          "h": [
            20.5,
            25
          ]
        },
        "constraints": [
          {
            "c": "fix",
            "p": "o",
            "at": [
              0,
              0
            ]
          },
          {
            "c": "distance_x",
            "a": "o",
            "b": "h",
            "value": "width/2"
          },
          {
            "c": "distance_y",
            "a": "o",
            "b": "h",
            "value": "upright_hole_z"
          }
        ],
        "plane": {
          "origin": [
            0,
            0,
            0
          ],
          "x": [
            1,
            0,
            0
          ],
          "y": [
            0,
            0,
            1
          ]
        },
        "point_sets": {
          "centers": [
            "h"
          ]
        }
      }
    },
    {
      "op": "add_feature",
      "feature": {
        "id": "upright_hole",
        "version": 1,
        "type": "hole_pattern",
        "target": {
          "feature": "base_hole",
          "role": "body",
          "expect": 1
        },
        "centers": {
          "feature": "upright_hole_position",
          "role": "centers",
          "expect": 1
        },
        "diameter": "hole_diameter",
        "depth": "thickness"
      }
    },
    {
      "op": "set_name",
      "name": "bracket.body",
      "reference": {
        "feature": "upright_hole",
        "role": "body",
        "expect": 1
      }
    },
    {
      "op": "add_output",
      "output": {
        "id": "bracket.step",
        "kind": "step",
        "source": "bracket.body"
      }
    },
    {
      "op": "add_output",
      "output": {
        "id": "bracket.mesh",
        "kind": "mesh",
        "source": "bracket.body"
      }
    }
  ],
  "checks": [
    {
      "kind": "valid_solid",
      "body": "bracket.body"
    },
    {
      "kind": "fully_constrained",
      "sketch": "bend_profile"
    },
    {
      "kind": "fully_constrained",
      "sketch": "base_hole_position"
    },
    {
      "kind": "fully_constrained",
      "sketch": "upright_hole_position"
    },
    {
      "kind": "extent",
      "body": "bracket.body",
      "axis": "x",
      "at_least": 40.999,
      "at_most": 41.001,
      "unit": "mm"
    },
    {
      "kind": "extent",
      "body": "bracket.body",
      "axis": "y",
      "at_least": 39.999,
      "at_most": 40.001,
      "unit": "mm"
    },
    {
      "kind": "extent",
      "body": "bracket.body",
      "axis": "z",
      "at_least": 39.999,
      "at_most": 40.001,
      "unit": "mm"
    }
  ]
}