DX9 -- the field surrogate's inputs for an Explore structural setup (and a stored result read at the same nodes): the dataset tool
curl --request POST \
--url https://api.eddy.engineer/v1/preview.explore.features \
--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": [
{}
],
"physics": "structural",
"truth": "<string>",
"voxel_size": 123
}
'import requests
url = "https://api.eddy.engineer/v1/preview.explore.features"
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": [{}],
"physics": "structural",
"truth": "<string>",
"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: [{}],
physics: 'structural',
truth: '<string>',
voxel_size: 123
})
};
fetch('https://api.eddy.engineer/v1/preview.explore.features', 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.features",
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' => [
[
]
],
'physics' => 'structural',
'truth' => '<string>',
'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.features"
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 \"physics\": \"structural\",\n \"truth\": \"<string>\",\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.features")
.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 \"physics\": \"structural\",\n \"truth\": \"<string>\",\n \"voxel_size\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/preview.explore.features")
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 \"physics\": \"structural\",\n \"truth\": \"<string>\",\n \"voxel_size\": 123\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}QuickFlow
DX9 -- the field surrogate's inputs for an Explore structural setup (and a stored result read at the same nodes): the dataset tool
Takes the /v1/preview.explore body (fixed supports and one force) and answers what the DX9 surrogate reads: the Explore voxel field's active nodes (node_dense_b64 u32, rel_b64 f32 x3 = the node position minus the part's bbox low corner), the mean coverage and signed distance / h of each node's eight voxels (cov_b64, sdf_b64 f32), the support and load masks (fixed_b64, load_b64 u8), the applied force, E and nu. With truth: <result key> the stored structural result is read at every node (displacement_b64 f32 x3, von_mises_b64 f32 from von_mises_extrapolated when the solve kept it; NaN outside the truth mesh). It is the featurizer the served model runs (ml/dx9/featurize.py builds the training set through it), so training and serving read the same inputs. A preview's input: nothing stored, no result key of its own. Refusals: PREDICT_CONDITIONS (a condition outside supports + one force, an assembly), /v1/preview.explore's own.
POST
/
v1
/
preview.explore.features
DX9 -- the field surrogate's inputs for an Explore structural setup (and a stored result read at the same nodes): the dataset tool
curl --request POST \
--url https://api.eddy.engineer/v1/preview.explore.features \
--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": [
{}
],
"physics": "structural",
"truth": "<string>",
"voxel_size": 123
}
'import requests
url = "https://api.eddy.engineer/v1/preview.explore.features"
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": [{}],
"physics": "structural",
"truth": "<string>",
"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: [{}],
physics: 'structural',
truth: '<string>',
voxel_size: 123
})
};
fetch('https://api.eddy.engineer/v1/preview.explore.features', 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.features",
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' => [
[
]
],
'physics' => 'structural',
'truth' => '<string>',
'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.features"
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 \"physics\": \"structural\",\n \"truth\": \"<string>\",\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.features")
.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 \"physics\": \"structural\",\n \"truth\": \"<string>\",\n \"voxel_size\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/preview.explore.features")
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 \"physics\": \"structural\",\n \"truth\": \"<string>\",\n \"voxel_size\": 123\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Body
application/json
Response
kind 'preview', preview true, label, nodes, grid {origin, h, dims}, lo, force, e, nu, node_dense_b64, rel_b64, cov_b64, sdf_b64, fixed_b64, load_b64, not_modelled, timings_ms; truth {result_key, von_mises_field, inside, displacement_b64, von_mises_b64, note} when asked