curl --request POST \
--url https://api.eddy.engineer/v1/preview.explore.predict.compare \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"geometry": {
"assembly": [
{
"box": {
"lx": 123,
"ly": 123,
"lz": 123
},
"id": "<string>",
"at": [
0,
0,
0
]
}
],
"brep_blob": "<string>",
"csg": {
"prim": {}
},
"mesh_blob": "<string>",
"primitive": {}
},
"material": {},
"conditions": [
{}
],
"element_size": 0.003,
"physics": "structural",
"voxel_size": 123
}
'import requests
url = "https://api.eddy.engineer/v1/preview.explore.predict.compare"
payload = {
"geometry": {
"assembly": [
{
"box": {
"lx": 123,
"ly": 123,
"lz": 123
},
"id": "<string>",
"at": [0, 0, 0]
}
],
"brep_blob": "<string>",
"csg": { "prim": {} },
"mesh_blob": "<string>",
"primitive": {}
},
"material": {},
"conditions": [{}],
"element_size": 0.003,
"physics": "structural",
"voxel_size": 123
}
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({
geometry: {
assembly: [{box: {lx: 123, ly: 123, lz: 123}, id: '<string>', at: [0, 0, 0]}],
brep_blob: '<string>',
csg: {prim: {}},
mesh_blob: '<string>',
primitive: {}
},
material: {},
conditions: [{}],
element_size: 0.003,
physics: 'structural',
voxel_size: 123
})
};
fetch('https://api.eddy.engineer/v1/preview.explore.predict.compare', 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/preview.explore.predict.compare",
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([
'geometry' => [
'assembly' => [
[
'box' => [
'lx' => 123,
'ly' => 123,
'lz' => 123
],
'id' => '<string>',
'at' => [
0,
0,
0
]
]
],
'brep_blob' => '<string>',
'csg' => [
'prim' => [
]
],
'mesh_blob' => '<string>',
'primitive' => [
]
],
'material' => [
],
'conditions' => [
[
]
],
'element_size' => 0.003,
'physics' => 'structural',
'voxel_size' => 123
]),
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/preview.explore.predict.compare"
payload := strings.NewReader("{\n \"geometry\": {\n \"assembly\": [\n {\n \"box\": {\n \"lx\": 123,\n \"ly\": 123,\n \"lz\": 123\n },\n \"id\": \"<string>\",\n \"at\": [\n 0,\n 0,\n 0\n ]\n }\n ],\n \"brep_blob\": \"<string>\",\n \"csg\": {\n \"prim\": {}\n },\n \"mesh_blob\": \"<string>\",\n \"primitive\": {}\n },\n \"material\": {},\n \"conditions\": [\n {}\n ],\n \"element_size\": 0.003,\n \"physics\": \"structural\",\n \"voxel_size\": 123\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/preview.explore.predict.compare")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"geometry\": {\n \"assembly\": [\n {\n \"box\": {\n \"lx\": 123,\n \"ly\": 123,\n \"lz\": 123\n },\n \"id\": \"<string>\",\n \"at\": [\n 0,\n 0,\n 0\n ]\n }\n ],\n \"brep_blob\": \"<string>\",\n \"csg\": {\n \"prim\": {}\n },\n \"mesh_blob\": \"<string>\",\n \"primitive\": {}\n },\n \"material\": {},\n \"conditions\": [\n {}\n ],\n \"element_size\": 0.003,\n \"physics\": \"structural\",\n \"voxel_size\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/preview.explore.predict.compare")
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 \"geometry\": {\n \"assembly\": [\n {\n \"box\": {\n \"lx\": 123,\n \"ly\": 123,\n \"lz\": 123\n },\n \"id\": \"<string>\",\n \"at\": [\n 0,\n 0,\n 0\n ]\n }\n ],\n \"brep_blob\": \"<string>\",\n \"csg\": {\n \"prim\": {}\n },\n \"mesh_blob\": \"<string>\",\n \"primitive\": {}\n },\n \"material\": {},\n \"conditions\": [\n {}\n ],\n \"element_size\": 0.003,\n \"physics\": \"structural\",\n \"voxel_size\": 123\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}DX9 -- the referee: the surrogate's prediction beside the truth solve of the same setup, with the errors
Runs the served DX9 surrogate on the setup (as physics: predict does) and the truth solve of the same setup through Refine’s mapping onto /v1/solve.structural (hex20 snap2, stress_recovery extrapolated, element_size default 0.003 m = the training truth’s; the ordinary content-addressed lifecycle, so the truth key equals a direct solve and a repeat is a cache hit). The truth is read at the surrogate’s voxel nodes and the errors stated: displacement and von Mises relative L2, the peak |u| error and the p99 von Mises error, with both stages’ values. The G6 doctrine: the truth’s answer is the answer; the surrogate block is a preview (no key of its own). A gravity condition is left out of both (the surrogate does not model body loads).
curl --request POST \
--url https://api.eddy.engineer/v1/preview.explore.predict.compare \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"geometry": {
"assembly": [
{
"box": {
"lx": 123,
"ly": 123,
"lz": 123
},
"id": "<string>",
"at": [
0,
0,
0
]
}
],
"brep_blob": "<string>",
"csg": {
"prim": {}
},
"mesh_blob": "<string>",
"primitive": {}
},
"material": {},
"conditions": [
{}
],
"element_size": 0.003,
"physics": "structural",
"voxel_size": 123
}
'import requests
url = "https://api.eddy.engineer/v1/preview.explore.predict.compare"
payload = {
"geometry": {
"assembly": [
{
"box": {
"lx": 123,
"ly": 123,
"lz": 123
},
"id": "<string>",
"at": [0, 0, 0]
}
],
"brep_blob": "<string>",
"csg": { "prim": {} },
"mesh_blob": "<string>",
"primitive": {}
},
"material": {},
"conditions": [{}],
"element_size": 0.003,
"physics": "structural",
"voxel_size": 123
}
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({
geometry: {
assembly: [{box: {lx: 123, ly: 123, lz: 123}, id: '<string>', at: [0, 0, 0]}],
brep_blob: '<string>',
csg: {prim: {}},
mesh_blob: '<string>',
primitive: {}
},
material: {},
conditions: [{}],
element_size: 0.003,
physics: 'structural',
voxel_size: 123
})
};
fetch('https://api.eddy.engineer/v1/preview.explore.predict.compare', 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/preview.explore.predict.compare",
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([
'geometry' => [
'assembly' => [
[
'box' => [
'lx' => 123,
'ly' => 123,
'lz' => 123
],
'id' => '<string>',
'at' => [
0,
0,
0
]
]
],
'brep_blob' => '<string>',
'csg' => [
'prim' => [
]
],
'mesh_blob' => '<string>',
'primitive' => [
]
],
'material' => [
],
'conditions' => [
[
]
],
'element_size' => 0.003,
'physics' => 'structural',
'voxel_size' => 123
]),
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/preview.explore.predict.compare"
payload := strings.NewReader("{\n \"geometry\": {\n \"assembly\": [\n {\n \"box\": {\n \"lx\": 123,\n \"ly\": 123,\n \"lz\": 123\n },\n \"id\": \"<string>\",\n \"at\": [\n 0,\n 0,\n 0\n ]\n }\n ],\n \"brep_blob\": \"<string>\",\n \"csg\": {\n \"prim\": {}\n },\n \"mesh_blob\": \"<string>\",\n \"primitive\": {}\n },\n \"material\": {},\n \"conditions\": [\n {}\n ],\n \"element_size\": 0.003,\n \"physics\": \"structural\",\n \"voxel_size\": 123\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/preview.explore.predict.compare")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"geometry\": {\n \"assembly\": [\n {\n \"box\": {\n \"lx\": 123,\n \"ly\": 123,\n \"lz\": 123\n },\n \"id\": \"<string>\",\n \"at\": [\n 0,\n 0,\n 0\n ]\n }\n ],\n \"brep_blob\": \"<string>\",\n \"csg\": {\n \"prim\": {}\n },\n \"mesh_blob\": \"<string>\",\n \"primitive\": {}\n },\n \"material\": {},\n \"conditions\": [\n {}\n ],\n \"element_size\": 0.003,\n \"physics\": \"structural\",\n \"voxel_size\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/preview.explore.predict.compare")
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 \"geometry\": {\n \"assembly\": [\n {\n \"box\": {\n \"lx\": 123,\n \"ly\": 123,\n \"lz\": 123\n },\n \"id\": \"<string>\",\n \"at\": [\n 0,\n 0,\n 0\n ]\n }\n ],\n \"brep_blob\": \"<string>\",\n \"csg\": {\n \"prim\": {}\n },\n \"mesh_blob\": \"<string>\",\n \"primitive\": {}\n },\n \"material\": {},\n \"conditions\": [\n {}\n ],\n \"element_size\": 0.003,\n \"physics\": \"structural\",\n \"voxel_size\": 123\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Body
Response
kind 'comparison', surrogate {kind 'preview', label, model, confidence {value, score, flagged}, nodes, not_modelled}, truth {kind 'result', result_id, pipeline, element_size, von_mises_field, nodes_inside, metrics, cached, note}, errors {nodes_compared, u_rel_l2, vm_rel_l2, u_peak_err, vm_p99_err, max_displacement {surrogate, truth}, p99_von_mises {surrogate, truth}}, note