curl --request POST \
--url https://api.eddy.engineer/v1/bim.route \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"key": "<string>",
"source": 123,
"system": "<string>",
"terminals": [
123
],
"type": "<string>",
"access": [
{}
],
"air": {},
"bend_cost_mm": 123,
"clearance_mm": 123,
"clearances": [
{}
],
"connector": 123,
"elbow_loss": 123,
"extract": {},
"insulation": [
{}
],
"on": "<string>",
"pitch_mm": 123,
"sleeves": [
"<string>"
],
"state": "<string>",
"tee_cost_mm": 123,
"tolerance": 123,
"values": "<string>",
"walls": {},
"zones": [
{}
]
}
'import requests
url = "https://api.eddy.engineer/v1/bim.route"
payload = {
"key": "<string>",
"source": 123,
"system": "<string>",
"terminals": [123],
"type": "<string>",
"access": [{}],
"air": {},
"bend_cost_mm": 123,
"clearance_mm": 123,
"clearances": [{}],
"connector": 123,
"elbow_loss": 123,
"extract": {},
"insulation": [{}],
"on": "<string>",
"pitch_mm": 123,
"sleeves": ["<string>"],
"state": "<string>",
"tee_cost_mm": 123,
"tolerance": 123,
"values": "<string>",
"walls": {},
"zones": [{}]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
key: '<string>',
source: 123,
system: '<string>',
terminals: [123],
type: '<string>',
access: [{}],
air: {},
bend_cost_mm: 123,
clearance_mm: 123,
clearances: [{}],
connector: 123,
elbow_loss: 123,
extract: {},
insulation: [{}],
on: '<string>',
pitch_mm: 123,
sleeves: ['<string>'],
state: '<string>',
tee_cost_mm: 123,
tolerance: 123,
values: '<string>',
walls: {},
zones: [{}]
})
};
fetch('https://api.eddy.engineer/v1/bim.route', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/bim.route",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'key' => '<string>',
'source' => 123,
'system' => '<string>',
'terminals' => [
123
],
'type' => '<string>',
'access' => [
[
]
],
'air' => [
],
'bend_cost_mm' => 123,
'clearance_mm' => 123,
'clearances' => [
[
]
],
'connector' => 123,
'elbow_loss' => 123,
'extract' => [
],
'insulation' => [
[
]
],
'on' => '<string>',
'pitch_mm' => 123,
'sleeves' => [
'<string>'
],
'state' => '<string>',
'tee_cost_mm' => 123,
'tolerance' => 123,
'values' => '<string>',
'walls' => [
],
'zones' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/bim.route"
payload := strings.NewReader("{\n \"key\": \"<string>\",\n \"source\": 123,\n \"system\": \"<string>\",\n \"terminals\": [\n 123\n ],\n \"type\": \"<string>\",\n \"access\": [\n {}\n ],\n \"air\": {},\n \"bend_cost_mm\": 123,\n \"clearance_mm\": 123,\n \"clearances\": [\n {}\n ],\n \"connector\": 123,\n \"elbow_loss\": 123,\n \"extract\": {},\n \"insulation\": [\n {}\n ],\n \"on\": \"<string>\",\n \"pitch_mm\": 123,\n \"sleeves\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"tee_cost_mm\": 123,\n \"tolerance\": 123,\n \"values\": \"<string>\",\n \"walls\": {},\n \"zones\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/bim.route")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"<string>\",\n \"source\": 123,\n \"system\": \"<string>\",\n \"terminals\": [\n 123\n ],\n \"type\": \"<string>\",\n \"access\": [\n {}\n ],\n \"air\": {},\n \"bend_cost_mm\": 123,\n \"clearance_mm\": 123,\n \"clearances\": [\n {}\n ],\n \"connector\": 123,\n \"elbow_loss\": 123,\n \"extract\": {},\n \"insulation\": [\n {}\n ],\n \"on\": \"<string>\",\n \"pitch_mm\": 123,\n \"sleeves\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"tee_cost_mm\": 123,\n \"tolerance\": 123,\n \"values\": \"<string>\",\n \"walls\": {},\n \"zones\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/bim.route")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"<string>\",\n \"source\": 123,\n \"system\": \"<string>\",\n \"terminals\": [\n 123\n ],\n \"type\": \"<string>\",\n \"access\": [\n {}\n ],\n \"air\": {},\n \"bend_cost_mm\": 123,\n \"clearance_mm\": 123,\n \"clearances\": [\n {}\n ],\n \"connector\": 123,\n \"elbow_loss\": 123,\n \"extract\": {},\n \"insulation\": [\n {}\n ],\n \"on\": \"<string>\",\n \"pitch_mm\": 123,\n \"sleeves\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"tee_cost_mm\": 123,\n \"tolerance\": 123,\n \"values\": \"<string>\",\n \"walls\": {},\n \"zones\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"after_key": "<string>",
"air": {},
"commands": "<array>",
"complete": true,
"counts": {},
"finding_counts": {},
"findings": "<array>",
"issue_count": 123,
"issues": [
{}
],
"issues_by_class": {},
"key": "<string>",
"measures": {},
"method": "<string>",
"notes": "<array>",
"order": "<string>",
"passes": "<array>",
"questions": [
{}
],
"regions": "<array>",
"routes": "<array>",
"schema": "<string>",
"settings": {},
"shafts_not_used": "<array>",
"source": {},
"table_gaps": "<array>",
"terminals": "<array>",
"work": 123,
"zones": "<array>"
}Routing: proposed routes in ceiling space and risers for one tree, as the engine's own commands to accept (`ss.mep.route/1`, MEP32)
curl --request POST \
--url https://api.eddy.engineer/v1/bim.route \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"key": "<string>",
"source": 123,
"system": "<string>",
"terminals": [
123
],
"type": "<string>",
"access": [
{}
],
"air": {},
"bend_cost_mm": 123,
"clearance_mm": 123,
"clearances": [
{}
],
"connector": 123,
"elbow_loss": 123,
"extract": {},
"insulation": [
{}
],
"on": "<string>",
"pitch_mm": 123,
"sleeves": [
"<string>"
],
"state": "<string>",
"tee_cost_mm": 123,
"tolerance": 123,
"values": "<string>",
"walls": {},
"zones": [
{}
]
}
'import requests
url = "https://api.eddy.engineer/v1/bim.route"
payload = {
"key": "<string>",
"source": 123,
"system": "<string>",
"terminals": [123],
"type": "<string>",
"access": [{}],
"air": {},
"bend_cost_mm": 123,
"clearance_mm": 123,
"clearances": [{}],
"connector": 123,
"elbow_loss": 123,
"extract": {},
"insulation": [{}],
"on": "<string>",
"pitch_mm": 123,
"sleeves": ["<string>"],
"state": "<string>",
"tee_cost_mm": 123,
"tolerance": 123,
"values": "<string>",
"walls": {},
"zones": [{}]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
key: '<string>',
source: 123,
system: '<string>',
terminals: [123],
type: '<string>',
access: [{}],
air: {},
bend_cost_mm: 123,
clearance_mm: 123,
clearances: [{}],
connector: 123,
elbow_loss: 123,
extract: {},
insulation: [{}],
on: '<string>',
pitch_mm: 123,
sleeves: ['<string>'],
state: '<string>',
tee_cost_mm: 123,
tolerance: 123,
values: '<string>',
walls: {},
zones: [{}]
})
};
fetch('https://api.eddy.engineer/v1/bim.route', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/bim.route",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'key' => '<string>',
'source' => 123,
'system' => '<string>',
'terminals' => [
123
],
'type' => '<string>',
'access' => [
[
]
],
'air' => [
],
'bend_cost_mm' => 123,
'clearance_mm' => 123,
'clearances' => [
[
]
],
'connector' => 123,
'elbow_loss' => 123,
'extract' => [
],
'insulation' => [
[
]
],
'on' => '<string>',
'pitch_mm' => 123,
'sleeves' => [
'<string>'
],
'state' => '<string>',
'tee_cost_mm' => 123,
'tolerance' => 123,
'values' => '<string>',
'walls' => [
],
'zones' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/bim.route"
payload := strings.NewReader("{\n \"key\": \"<string>\",\n \"source\": 123,\n \"system\": \"<string>\",\n \"terminals\": [\n 123\n ],\n \"type\": \"<string>\",\n \"access\": [\n {}\n ],\n \"air\": {},\n \"bend_cost_mm\": 123,\n \"clearance_mm\": 123,\n \"clearances\": [\n {}\n ],\n \"connector\": 123,\n \"elbow_loss\": 123,\n \"extract\": {},\n \"insulation\": [\n {}\n ],\n \"on\": \"<string>\",\n \"pitch_mm\": 123,\n \"sleeves\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"tee_cost_mm\": 123,\n \"tolerance\": 123,\n \"values\": \"<string>\",\n \"walls\": {},\n \"zones\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/bim.route")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"<string>\",\n \"source\": 123,\n \"system\": \"<string>\",\n \"terminals\": [\n 123\n ],\n \"type\": \"<string>\",\n \"access\": [\n {}\n ],\n \"air\": {},\n \"bend_cost_mm\": 123,\n \"clearance_mm\": 123,\n \"clearances\": [\n {}\n ],\n \"connector\": 123,\n \"elbow_loss\": 123,\n \"extract\": {},\n \"insulation\": [\n {}\n ],\n \"on\": \"<string>\",\n \"pitch_mm\": 123,\n \"sleeves\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"tee_cost_mm\": 123,\n \"tolerance\": 123,\n \"values\": \"<string>\",\n \"walls\": {},\n \"zones\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/bim.route")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"<string>\",\n \"source\": 123,\n \"system\": \"<string>\",\n \"terminals\": [\n 123\n ],\n \"type\": \"<string>\",\n \"access\": [\n {}\n ],\n \"air\": {},\n \"bend_cost_mm\": 123,\n \"clearance_mm\": 123,\n \"clearances\": [\n {}\n ],\n \"connector\": 123,\n \"elbow_loss\": 123,\n \"extract\": {},\n \"insulation\": [\n {}\n ],\n \"on\": \"<string>\",\n \"pitch_mm\": 123,\n \"sleeves\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"tee_cost_mm\": 123,\n \"tolerance\": 123,\n \"values\": \"<string>\",\n \"walls\": {},\n \"zones\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"after_key": "<string>",
"air": {},
"commands": "<array>",
"complete": true,
"counts": {},
"finding_counts": {},
"findings": "<array>",
"issue_count": 123,
"issues": [
{}
],
"issues_by_class": {},
"key": "<string>",
"measures": {},
"method": "<string>",
"notes": "<array>",
"order": "<string>",
"passes": "<array>",
"questions": [
{}
],
"regions": "<array>",
"routes": "<array>",
"schema": "<string>",
"settings": {},
"shafts_not_used": "<array>",
"source": {},
"table_gaps": "<array>",
"terminals": "<array>",
"work": 123,
"zones": "<array>"
}Body
MEP22's inputs for the source: method?, friction_rate_pa_per_m?, max_velocity_m_s?, supply_delta_t_k?, roughness_mm?, terminal_pressure_pa?, round_sizes_mm?, loads (ss.mep.loads/1), tee_loss? {through, branch} (entered on every round tee the plan places), sections? {rect_depths_mm?, max_aspect?, max_width_mm?, elbow_loss?} and fit_sections? (default true). The oversized-mains method (docs/mep/MEP32b.md): each level run is sized to the room the router reads over and beside it (twice the room the grid leaves about its centre line, up and down and to each side, plus the drawn depth or width; runs joined end to end or through an elbow share the least of theirs): round where a listed round size fits and carries its flow within the limits, else a flat rectangle at a listed depth that fits (100 to 1000 mm every 50 where not entered), no wider than max_width_mm (2000) nor wider than max_aspect (4) times its depth, both our starting values named in the design's defaults; friction on the hydraulic diameter. A run no listed section fits is proposed at its unlimited round size and named in the design's no_fit and the answer's air.no_fit (a main to split into zones, or to give more room); F3's bands then plan each sized run as wide and as deep as its section. Where sizes change, the plan is built again at them and MEP4's fittings proposed on that build (generic rectangular elbows, tees and transitions where a run is rectangular, a reducing tee where the main steps down at a branch, a tighter elbow where the generic one's arms do not fit), kept where MEP22 sizes it (else the drawn fittings stand, said in the notes); elbow_loss is entered on every duct elbow our CFD (MEP23) computed no coefficient for (a flat or tight one). fit_sections false sizes every run round, as before.
MEP33: a return, an exhaust or an exhaust fan's discharge, sized as HV9 designs it (/v1/bim.air with design.role), in place of air: role (return: grilles to an air handler's return inlet; exhaust: grilles to an exhaust fan's inlet; discharge: the fan's outlet to its louvre), airflows (ss.mep.airflows/1: rooms [{name, room?, airflow_l_s, terminals?}]; a discharge takes one row, the exhaust's flow to its louvre), friction_rate_pa_per_m?, max_velocity_m_s?, roughness_mm?, terminal_pressure_pa? (a grille's, or the louvre's on a discharge), round_sizes_mm?, tee_losses? (momentum_balance, the default: a converging tee with no entered coefficient takes HV9's closed form, named on its loss; entered: none), tee_gains? (floor, the default: a closed-form gain applied as 0, k_computed beside it; refuse: a gap), sections? and fit_sections? as air's. Equal friction, each run on the air it gathers; MEP22's proposals are part of the plan as a supply's are. No questions are asked of a no_fit on such a route (the plant's zoning is the supply's).
Response
OK
R1 of the rules plan: the answer's findings as ss.issue/1 (at most 500, in the answer's own order), beside its own fields, which are unchanged: {id (stable), domain, code (the domain's own), kind, outcome, cause {class: model | method | brief | undetermined, also?, why, by? (the evidence a split reads), read? (whether it was read), census}, subjects, at?, measure?, threshold?, unit?, margin?, message, ladder? (R3: {ladder, tried [{rung, params {key: {value, source: ours | brief}}, result: cleared | improved | no_change | refused, why}], next?, stopped: cleared | question | exhausted | budget}), question? (the id of the typed question it raised)}.
R2 of the rules plan: what this answer asks, as typed questions (ss.question/1): {schema, id (stable over a re-run), code, domain, rung, scope (what one answer covers: a plant, storeys), message, why {class, sentence, measures}, options [{choice, possible, why_not?, does, consequences [{what, limit?, from?, to?, unit?}], changes_model}], answer_at (the brief's JSON pointer the answer is written at), default? (an adopted practice pack's)}. Absent where nothing is asked. Answer by writing the choice into the brief at answer_at and running again.