{
  "schemaVersion": 1,
  "id": "example_civil",
  "title": "Stormwater collection and detention network",
  "diagram": {
    "adapter": "flowchart",
    "direction": "LR",
    "nodes": [
      {
        "id": "road_a",
        "kind": "road",
        "label": "North catchment",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "road_a:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "road_a:out"
          }
        ],
        "fields": {
          "tag": "RD-01",
          "width": "7 m",
          "length": "100 m",
          "description": ""
        }
      },
      {
        "id": "road_b",
        "kind": "road",
        "label": "South catchment",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "road_b:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "road_b:out"
          }
        ],
        "fields": {
          "tag": "RD-02",
          "width": "7 m",
          "length": "100 m",
          "description": ""
        }
      },
      {
        "id": "basin_a",
        "kind": "catch_basin",
        "label": "North catch basin",
        "ports": [
          {
            "name": "surface",
            "side": "top",
            "position": {
              "x": 0.5,
              "y": 0
            },
            "id": "basin_a:surface"
          },
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "basin_a:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "basin_a:out"
          }
        ],
        "fields": {
          "tag": "CB-01",
          "drainageArea": "0.4 ha",
          "description": ""
        }
      },
      {
        "id": "basin_b",
        "kind": "catch_basin",
        "label": "South catch basin",
        "ports": [
          {
            "name": "surface",
            "side": "top",
            "position": {
              "x": 0.5,
              "y": 0
            },
            "id": "basin_b:surface"
          },
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "basin_b:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "basin_b:out"
          }
        ],
        "fields": {
          "tag": "CB-02",
          "drainageArea": "0.3 ha",
          "description": ""
        }
      },
      {
        "id": "pipe_a",
        "kind": "pipe_segment",
        "label": "North lateral",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "pipe_a:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "pipe_a:out"
          }
        ],
        "fields": {
          "tag": "SW-01",
          "diameter": "DN300",
          "slope": "1%",
          "description": ""
        }
      },
      {
        "id": "pipe_b",
        "kind": "pipe_segment",
        "label": "South lateral",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "pipe_b:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "pipe_b:out"
          }
        ],
        "fields": {
          "tag": "SW-02",
          "diameter": "DN300",
          "slope": "1%",
          "description": ""
        }
      },
      {
        "id": "mh",
        "kind": "manhole",
        "label": "Collection manhole",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "mh:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "mh:out"
          },
          {
            "name": "top",
            "side": "top",
            "position": {
              "x": 0.5,
              "y": 0
            },
            "id": "mh:top"
          },
          {
            "name": "bottom",
            "side": "bottom",
            "position": {
              "x": 0.5,
              "y": 0.7
            },
            "id": "mh:bottom"
          }
        ],
        "fields": {
          "tag": "MH-01",
          "invert": "100.00 m",
          "cover": "102.00 m",
          "description": ""
        }
      },
      {
        "id": "trunk",
        "kind": "pipe_segment",
        "label": "Trunk drain",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "trunk:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "trunk:out"
          }
        ],
        "fields": {
          "tag": "SW-03",
          "diameter": "DN450",
          "slope": "1%",
          "description": ""
        }
      },
      {
        "id": "detention",
        "kind": "detention_basin",
        "label": "Detention storage",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "detention:in"
          },
          {
            "name": "out",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "detention:out"
          }
        ],
        "fields": {
          "tag": "DB-01",
          "volume": "100 m³",
          "level": "101.0 m",
          "description": ""
        }
      },
      {
        "id": "outfall",
        "kind": "outfall",
        "label": "Controlled outfall",
        "ports": [
          {
            "name": "in",
            "side": "left",
            "position": {
              "x": 0,
              "y": 0.35
            },
            "id": "outfall:in"
          },
          {
            "name": "discharge",
            "side": "right",
            "position": {
              "x": 1,
              "y": 0.35
            },
            "id": "outfall:discharge"
          }
        ],
        "fields": {
          "tag": "OF-01",
          "receiving": "Receiving watercourse",
          "description": ""
        }
      }
    ],
    "connectors": [
      {
        "id": "example_civil_edge_0",
        "from": {
          "nodeId": "road_a",
          "portId": "road_a:out"
        },
        "to": {
          "nodeId": "basin_a",
          "portId": "basin_a:surface"
        },
        "label": "Runoff"
      },
      {
        "id": "example_civil_edge_1",
        "from": {
          "nodeId": "road_b",
          "portId": "road_b:out"
        },
        "to": {
          "nodeId": "basin_b",
          "portId": "basin_b:surface"
        },
        "label": "Runoff"
      },
      {
        "id": "example_civil_edge_2",
        "from": {
          "nodeId": "basin_a",
          "portId": "basin_a:out"
        },
        "to": {
          "nodeId": "pipe_a",
          "portId": "pipe_a:in"
        },
        "label": ""
      },
      {
        "id": "example_civil_edge_3",
        "from": {
          "nodeId": "basin_b",
          "portId": "basin_b:out"
        },
        "to": {
          "nodeId": "pipe_b",
          "portId": "pipe_b:in"
        },
        "label": ""
      },
      {
        "id": "example_civil_edge_4",
        "from": {
          "nodeId": "pipe_a",
          "portId": "pipe_a:out"
        },
        "to": {
          "nodeId": "mh",
          "portId": "mh:top"
        },
        "label": ""
      },
      {
        "id": "example_civil_edge_5",
        "from": {
          "nodeId": "pipe_b",
          "portId": "pipe_b:out"
        },
        "to": {
          "nodeId": "mh",
          "portId": "mh:bottom"
        },
        "label": ""
      },
      {
        "id": "example_civil_edge_6",
        "from": {
          "nodeId": "mh",
          "portId": "mh:out"
        },
        "to": {
          "nodeId": "trunk",
          "portId": "trunk:in"
        },
        "label": ""
      },
      {
        "id": "example_civil_edge_7",
        "from": {
          "nodeId": "trunk",
          "portId": "trunk:out"
        },
        "to": {
          "nodeId": "detention",
          "portId": "detention:in"
        },
        "label": ""
      },
      {
        "id": "example_civil_edge_8",
        "from": {
          "nodeId": "detention",
          "portId": "detention:out"
        },
        "to": {
          "nodeId": "outfall",
          "portId": "outfall:in"
        },
        "label": "Controlled discharge"
      }
    ],
    "groups": []
  },
  "layout": {
    "road_a": {
      "x": 40,
      "y": 0,
      "width": 220,
      "height": 150,
      "color": "#e9eef2"
    },
    "road_b": {
      "x": 40,
      "y": 340,
      "width": 220,
      "height": 150,
      "color": "#e9eef2"
    },
    "basin_a": {
      "x": 300,
      "y": 0,
      "width": 220,
      "height": 150,
      "color": "#e9eef2"
    },
    "basin_b": {
      "x": 300,
      "y": 340,
      "width": 220,
      "height": 150,
      "color": "#e9eef2"
    },
    "pipe_a": {
      "x": 560,
      "y": 0,
      "width": 220,
      "height": 150,
      "color": "#e9eef2"
    },
    "pipe_b": {
      "x": 560,
      "y": 340,
      "width": 220,
      "height": 150,
      "color": "#e9eef2"
    },
    "mh": {
      "x": 840,
      "y": 180,
      "width": 220,
      "height": 150,
      "color": "#e9eef2"
    },
    "trunk": {
      "x": 1100,
      "y": 180,
      "width": 220,
      "height": 150,
      "color": "#e9eef2"
    },
    "detention": {
      "x": 1360,
      "y": 180,
      "width": 220,
      "height": 150,
      "color": "#e9eef2"
    },
    "outfall": {
      "x": 1620,
      "y": 180,
      "width": 220,
      "height": 150,
      "color": "#e9eef2"
    }
  },
  "presentation": {
    "steps": [
      {
        "id": "example_civil_focus",
        "type": "focus",
        "targetId": "road_a",
        "duration": 3,
        "caption": "Two catchments feed a shared drainage network."
      },
      {
        "id": "example_civil_trace_0",
        "type": "connection",
        "targetId": "example_civil_edge_0",
        "duration": 2,
        "caption": "Trace runoff into the first catch basin."
      },
      {
        "id": "example_civil_trace_1",
        "type": "connection",
        "targetId": "example_civil_edge_1",
        "duration": 2,
        "caption": "Runoff → South catch basin"
      },
      {
        "id": "example_civil_trace_2",
        "type": "connection",
        "targetId": "example_civil_edge_2",
        "duration": 2,
        "caption": "Follow the connection → North lateral"
      },
      {
        "id": "example_civil_trace_3",
        "type": "connection",
        "targetId": "example_civil_edge_3",
        "duration": 2,
        "caption": "Follow the connection → South lateral"
      },
      {
        "id": "example_civil_trace_4",
        "type": "connection",
        "targetId": "example_civil_edge_4",
        "duration": 2,
        "caption": "Follow the connection → Collection manhole"
      },
      {
        "id": "example_civil_trace_5",
        "type": "connection",
        "targetId": "example_civil_edge_5",
        "duration": 2,
        "caption": "Follow the connection → Collection manhole"
      },
      {
        "id": "example_civil_trace_6",
        "type": "connection",
        "targetId": "example_civil_edge_6",
        "duration": 2,
        "caption": "Follow the connection → Trunk drain"
      },
      {
        "id": "example_civil_trace_7",
        "type": "connection",
        "targetId": "example_civil_edge_7",
        "duration": 2,
        "caption": "Follow the connection → Detention storage"
      },
      {
        "id": "example_civil_trace_8",
        "type": "connection",
        "targetId": "example_civil_edge_8",
        "duration": 2,
        "caption": "Controlled discharge → Controlled outfall"
      },
      {
        "id": "example_civil_note",
        "type": "note",
        "text": "The two laterals join a manhole, trunk drain, detention storage and outfall. Dimensions and levels here are editable annotations, not hydraulic results.",
        "duration": 4
      }
    ]
  },
  "connectorStyles": {
    "example_civil_edge_0": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_civil_edge_1": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_civil_edge_2": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_civil_edge_3": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_civil_edge_4": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_civil_edge_5": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_civil_edge_6": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_civil_edge_7": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    },
    "example_civil_edge_8": {
      "routing": "curved",
      "pattern": "solid",
      "width": 1.8,
      "color": "#647888",
      "startArrow": "none",
      "endArrow": "arrow",
      "flow": {
        "enabled": false,
        "direction": "forward",
        "speed": 48
      }
    }
  }
}
