curl --request POST \
--url https://api.eddy.engineer/v1/bim.mep.layout \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"brief": {
"by": {},
"checks": {
"clearance_mm": 123,
"packs": [
"<string>"
],
"state": "<string>",
"values": "<string>"
},
"existing": {
"ceiling_mm": 123
},
"name": "<string>",
"schema": "ss.mep.brief/1"
},
"key": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/bim.mep.layout"
payload = {
"brief": {
"by": {},
"checks": {
"clearance_mm": 123,
"packs": ["<string>"],
"state": "<string>",
"values": "<string>"
},
"existing": { "ceiling_mm": 123 },
"name": "<string>",
"schema": "ss.mep.brief/1"
},
"key": "<string>"
}
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({
brief: {
by: {},
checks: {clearance_mm: 123, packs: ['<string>'], state: '<string>', values: '<string>'},
existing: {ceiling_mm: 123},
name: '<string>',
schema: 'ss.mep.brief/1'
},
key: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/bim.mep.layout', 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.mep.layout",
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([
'brief' => [
'by' => [
],
'checks' => [
'clearance_mm' => 123,
'packs' => [
'<string>'
],
'state' => '<string>',
'values' => '<string>'
],
'existing' => [
'ceiling_mm' => 123
],
'name' => '<string>',
'schema' => 'ss.mep.brief/1'
],
'key' => '<string>'
]),
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.mep.layout"
payload := strings.NewReader("{\n \"brief\": {\n \"by\": {},\n \"checks\": {\n \"clearance_mm\": 123,\n \"packs\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"values\": \"<string>\"\n },\n \"existing\": {\n \"ceiling_mm\": 123\n },\n \"name\": \"<string>\",\n \"schema\": \"ss.mep.brief/1\"\n },\n \"key\": \"<string>\"\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.mep.layout")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"brief\": {\n \"by\": {},\n \"checks\": {\n \"clearance_mm\": 123,\n \"packs\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"values\": \"<string>\"\n },\n \"existing\": {\n \"ceiling_mm\": 123\n },\n \"name\": \"<string>\",\n \"schema\": \"ss.mep.brief/1\"\n },\n \"key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/bim.mep.layout")
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 \"brief\": {\n \"by\": {},\n \"checks\": {\n \"clearance_mm\": 123,\n \"packs\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"values\": \"<string>\"\n },\n \"existing\": {\n \"ceiling_mm\": 123\n },\n \"name\": \"<string>\",\n \"schema\": \"ss.mep.brief/1\"\n },\n \"key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"air_zoning": "<array>",
"circuits": "<array>",
"commands": "<array>",
"could_not": "<array>",
"defaults": "<array>",
"handles": {},
"key": "<string>",
"name": "<string>",
"next": "<array>",
"notes": "<array>",
"placed": {},
"practice": {},
"questions": [
{}
],
"schema": "<string>"
}A structured brief to the engine's commands that draw it: the shell, our generic families, terminals, sources, boards and their entered values, with the next requests (`ss.mep.layout/1`, MEP33); with `existing`, the services alone into the document's own building (MEP33b)
Start an agent’s design here, on a new project (bim_project_create) with shell: the layout reads the document’s levels and refuses one that already has walls (LAYOUT_DOCUMENT_NOT_EMPTY). Or (MEP33b) into an architect’s model already in the project (an imported .ifc or .rvt) with existing in place of shell: nothing is drawn but the services, placed into the rooms bim_mep_rooms reads (call it first for the storeys and room names to place by); a room it could not read is refused by name (LAYOUT_ROOM_NOT_READ), and the answer’s rooms lists every room not read and every room placed in a rectangle smaller than itself; placements gives every component’s room. brief is ss.mep.brief/1, its fields in this request’s schema: the shell and its rooms; per discipline what to place and the values the brief gives (air: plants, rooms’ diffusers and loads, tee losses, and the return and exhaust where asked; water: meter, heater, fixtures, flows, pressures, pipe sizes, elbow loss, drainage by others or asked; electrical: boards and their supply or feeder, lights, outlets, circuit data); the person’s checks. Every number the design rests on comes from the brief; the families’ geometry, the placement on a grid in each room and the cable lengths’ 20 % allowance are ours, named in defaults. The answer: commands (each {command, params, as?}; run them all with bim_run_batch on the project, each an undoable step), handles (the names as gives, used as "$name"), placed, circuits, next (the requests to send after, in order: bim_route per tree (each supply, then each return, exhaust and discharge asked for) then bim_run_batch on its commands, bim_water with propose_sizes then bim_run_batch on sizing.commands, then bim_mep_verdict; pass next as the batch’s fill to get its names as ids, and set each body’s key to the project’s head when you send it), could_not (what this design leaves undone, by code: tell the person), defaults, notes. Nothing is stored. Refused by name: LAYOUT_BRIEF, LAYOUT_DOCUMENT_NOT_EMPTY, LAYOUT_LEVELS, LAYOUT_PLENUM_TOO_SHALLOW, LAYOUT_ROOM, LAYOUT_ROOM_UNKNOWN, LAYOUT_ROOM_NOT_READ, LAYOUT_NO_ROOMS, LAYOUT_ROOMS_OVERLAP, LAYOUT_SHAFT, LAYOUT_AIR, LAYOUT_WATER, LAYOUT_ELECTRICAL, LAYOUT_VALUE_MISSING, LAYOUT_NO_SPACE, LAYOUT_TOO_LARGE (each 400). questions (R2 of the rules plan): what the layout asks, typed (ss.question/1), beside air_zoning, which stays one release. A source’s distribution the brief leaves out is the layout’s starting value, named in defaults.
curl --request POST \
--url https://api.eddy.engineer/v1/bim.mep.layout \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"brief": {
"by": {},
"checks": {
"clearance_mm": 123,
"packs": [
"<string>"
],
"state": "<string>",
"values": "<string>"
},
"existing": {
"ceiling_mm": 123
},
"name": "<string>",
"schema": "ss.mep.brief/1"
},
"key": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/bim.mep.layout"
payload = {
"brief": {
"by": {},
"checks": {
"clearance_mm": 123,
"packs": ["<string>"],
"state": "<string>",
"values": "<string>"
},
"existing": { "ceiling_mm": 123 },
"name": "<string>",
"schema": "ss.mep.brief/1"
},
"key": "<string>"
}
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({
brief: {
by: {},
checks: {clearance_mm: 123, packs: ['<string>'], state: '<string>', values: '<string>'},
existing: {ceiling_mm: 123},
name: '<string>',
schema: 'ss.mep.brief/1'
},
key: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/bim.mep.layout', 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.mep.layout",
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([
'brief' => [
'by' => [
],
'checks' => [
'clearance_mm' => 123,
'packs' => [
'<string>'
],
'state' => '<string>',
'values' => '<string>'
],
'existing' => [
'ceiling_mm' => 123
],
'name' => '<string>',
'schema' => 'ss.mep.brief/1'
],
'key' => '<string>'
]),
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.mep.layout"
payload := strings.NewReader("{\n \"brief\": {\n \"by\": {},\n \"checks\": {\n \"clearance_mm\": 123,\n \"packs\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"values\": \"<string>\"\n },\n \"existing\": {\n \"ceiling_mm\": 123\n },\n \"name\": \"<string>\",\n \"schema\": \"ss.mep.brief/1\"\n },\n \"key\": \"<string>\"\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.mep.layout")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"brief\": {\n \"by\": {},\n \"checks\": {\n \"clearance_mm\": 123,\n \"packs\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"values\": \"<string>\"\n },\n \"existing\": {\n \"ceiling_mm\": 123\n },\n \"name\": \"<string>\",\n \"schema\": \"ss.mep.brief/1\"\n },\n \"key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/bim.mep.layout")
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 \"brief\": {\n \"by\": {},\n \"checks\": {\n \"clearance_mm\": 123,\n \"packs\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"values\": \"<string>\"\n },\n \"existing\": {\n \"ceiling_mm\": 123\n },\n \"name\": \"<string>\",\n \"schema\": \"ss.mep.brief/1\"\n },\n \"key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"air_zoning": "<array>",
"circuits": "<array>",
"commands": "<array>",
"could_not": "<array>",
"defaults": "<array>",
"handles": {},
"key": "<string>",
"name": "<string>",
"next": "<array>",
"notes": "<array>",
"placed": {},
"practice": {},
"questions": [
{}
],
"schema": "<string>"
}Body
Response
OK
The oversized-mains method (docs/mep/MEP32b.md): each plant whose air one main won't do, estimated from its rooms' ceiling space (the depth about the diffusers' necks the router will read) and the limits, where the brief's air.split gives no choice for it (or gives one that can't be done there): {code: AIR_ONE_MAIN_WONT_DO, plant, storeys, why: depth | flow, flow_l_s, depth_mm, max_main_flow_l_s, zones, message, options [{choice: ahu | mains | larger, possible, why_not?, does, limits? {name: {from, to}}}]}. A question for the person, not a refusal: the layout goes on with one main from that plant meanwhile; answer it with air.split and lay out again. The choices made are in placed.air.split.
R4: present when the caller's organisation has a practice pack in force (practice_adopt): {item_id, ref (practice:<id>@<rev>), used [{pointer, value, param?, code?, source {kind: practice, ref, why}, changes_model?}], kept [{pointer, brief, practice}] (the brief's own value stands), skipped [{code, scope?, choice, why}] (an answer for a plant this brief has none of, or a choice that can't be done where asked), sources [{param, value, source {kind: brief | practice | ours, ref?, why}}] (where every air limit came from)}. Practice values are written only where the brief says nothing; a practice answer answers only a question this layout asks (one main won't do), for the plant asked about, and the layout is then run again with it; an answer that changes the person's model is approved with the plan. The air main limits line in defaults says whose each limit is. A pack in force that no longer reads is named (unreadable) and nothing of it applied. Absent with no practice in force.
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.