{
  "schemaVersion": 1,
  "id": "example_mechanical",
  "title": "Compressed-air actuator system",
  "diagram": {
    "adapter": "flowchart",
    "direction": "LR",
    "nodes": [
      {
        "id": "compressor",
        "kind": "compressor",
        "label": "Air supply",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "compressor:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "compressor:out"
          }
        ],
        "fields": {
          "tag": "C-101",
          "pressure": "7 bar",
          "description": ""
        }
      },
      {
        "id": "strainer",
        "kind": "strainer",
        "label": "Air filtration",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "strainer:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "strainer:out"
          }
        ],
        "fields": {
          "tag": "F-101",
          "mesh": "5 µm",
          "description": ""
        }
      },
      {
        "id": "receiver",
        "kind": "tank",
        "label": "Air receiver",
        "ports": [
          {
            "name": "inlet",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.25
            },
            "id": "receiver:inlet"
          },
          {
            "name": "outlet",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.5
            },
            "id": "receiver:outlet"
          }
        ],
        "fields": {
          "tag": "V-101",
          "description": "",
          "capacity": "100 L"
        }
      },
      {
        "id": "extend",
        "kind": "valve",
        "label": "Extend valve",
        "ports": [
          {
            "name": "inlet",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "extend:inlet"
          },
          {
            "name": "outlet",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "extend:outlet"
          }
        ],
        "fields": {
          "tag": "XV-101",
          "description": "",
          "position": "Open"
        }
      },
      {
        "id": "retract",
        "kind": "valve",
        "label": "Retract valve",
        "ports": [
          {
            "name": "inlet",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "retract:inlet"
          },
          {
            "name": "outlet",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "retract:outlet"
          }
        ],
        "fields": {
          "tag": "XV-102",
          "description": "",
          "position": "Open"
        }
      },
      {
        "id": "actuator",
        "kind": "cylinder",
        "label": "Linear actuator",
        "ports": [
          {
            "name": "A",
            "side": "bottom",
            "position": {
              "x": 0.25,
              "y": 0.65
            },
            "id": "actuator:A"
          },
          {
            "name": "B",
            "side": "bottom",
            "position": {
              "x": 0.65,
              "y": 0.65
            },
            "id": "actuator:B"
          },
          {
            "name": "rod",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "actuator:rod"
          }
        ],
        "fields": {
          "tag": "CY-101",
          "stroke": "100 mm",
          "description": ""
        }
      }
    ],
    "connectors": [
      {
        "id": "example_mechanical_edge_0",
        "from": {
          "nodeId": "compressor",
          "portId": "compressor:out"
        },
        "to": {
          "nodeId": "strainer",
          "portId": "strainer:in"
        },
        "label": "Compressed air"
      },
      {
        "id": "example_mechanical_edge_1",
        "from": {
          "nodeId": "strainer",
          "portId": "strainer:out"
        },
        "to": {
          "nodeId": "receiver",
          "portId": "receiver:inlet"
        },
        "label": ""
      },
      {
        "id": "example_mechanical_edge_2",
        "from": {
          "nodeId": "receiver",
          "portId": "receiver:outlet"
        },
        "to": {
          "nodeId": "extend",
          "portId": "extend:inlet"
        },
        "label": ""
      },
      {
        "id": "example_mechanical_edge_3",
        "from": {
          "nodeId": "receiver",
          "portId": "receiver:outlet"
        },
        "to": {
          "nodeId": "retract",
          "portId": "retract:inlet"
        },
        "label": ""
      },
      {
        "id": "example_mechanical_edge_4",
        "from": {
          "nodeId": "extend",
          "portId": "extend:outlet"
        },
        "to": {
          "nodeId": "actuator",
          "portId": "actuator:A"
        },
        "label": "Extend"
      },
      {
        "id": "example_mechanical_edge_5",
        "from": {
          "nodeId": "retract",
          "portId": "retract:outlet"
        },
        "to": {
          "nodeId": "actuator",
          "portId": "actuator:B"
        },
        "label": "Retract"
      }
    ],
    "groups": []
  },
  "layout": {
    "compressor": {
      "x": 40,
      "y": 180,
      "width": 220,
      "height": 150,
      "color": "#e5f2ed"
    },
    "strainer": {
      "x": 300,
      "y": 180,
      "width": 220,
      "height": 150,
      "color": "#e5f2ed"
    },
    "receiver": {
      "x": 560,
      "y": 180,
      "width": 160,
      "height": 130,
      "color": "#e0f2fe"
    },
    "extend": {
      "x": 820,
      "y": 40,
      "width": 170,
      "height": 110,
      "color": "#dbeafe"
    },
    "retract": {
      "x": 820,
      "y": 340,
      "width": 170,
      "height": 110,
      "color": "#dbeafe"
    },
    "actuator": {
      "x": 1110,
      "y": 180,
      "width": 220,
      "height": 150,
      "color": "#e5f2ed"
    }
  },
  "presentation": {
    "steps": [
      {
        "id": "example_mechanical_focus",
        "type": "focus",
        "targetId": "compressor",
        "duration": 3,
        "caption": "The compressor supplies a filtered-air receiver."
      },
      {
        "id": "example_mechanical_trace_0",
        "type": "connection",
        "targetId": "example_mechanical_edge_0",
        "duration": 2,
        "caption": "Trace the inlet air path."
      },
      {
        "id": "example_mechanical_trace_1",
        "type": "connection",
        "targetId": "example_mechanical_edge_1",
        "duration": 2,
        "caption": "Follow the connection → Air receiver"
      },
      {
        "id": "example_mechanical_trace_2",
        "type": "connection",
        "targetId": "example_mechanical_edge_2",
        "duration": 2,
        "caption": "Follow the connection → Extend valve"
      },
      {
        "id": "example_mechanical_trace_3",
        "type": "connection",
        "targetId": "example_mechanical_edge_3",
        "duration": 2,
        "caption": "Follow the connection → Retract valve"
      },
      {
        "id": "example_mechanical_trace_4",
        "type": "connection",
        "targetId": "example_mechanical_edge_4",
        "duration": 2,
        "caption": "Extend → Linear actuator"
      },
      {
        "id": "example_mechanical_trace_5",
        "type": "connection",
        "targetId": "example_mechanical_edge_5",
        "duration": 2,
        "caption": "Retract → Linear actuator"
      },
      {
        "id": "example_mechanical_note",
        "type": "note",
        "text": "Two valve branches feed the cylinder ports. Add exhaust, regulation and other project-specific details as needed.",
        "duration": 4
      }
    ]
  },
  "connectorStyles": {
    "example_mechanical_edge_0": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_mechanical_edge_1": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_mechanical_edge_2": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_mechanical_edge_3": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_mechanical_edge_4": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_mechanical_edge_5": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    }
  }
}
