The DX browser arm's inputs -- an Explore structural body resolved for a solve in the viewer's browser
curl --request POST \
--url https://api.eddy.engineer/v1/preview.explore.setup \
--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": [
{}
],
"fidelity": 3,
"physics": "structural"
}
'import requests
url = "https://api.eddy.engineer/v1/preview.explore.setup"
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": [{}],
"fidelity": 3,
"physics": "structural"
}
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: [{}],
fidelity: 3,
physics: 'structural'
})
};
fetch('https://api.eddy.engineer/v1/preview.explore.setup', 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.setup",
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' => [
[
]
],
'fidelity' => 3,
'physics' => 'structural'
]),
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.setup"
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 \"fidelity\": 3,\n \"physics\": \"structural\"\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.setup")
.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 \"fidelity\": 3,\n \"physics\": \"structural\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/preview.explore.setup")
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 \"fidelity\": 3,\n \"physics\": \"structural\"\n}"
response = http.request(request)
puts response.read_bodyQuickFlow
The DX browser arm's inputs -- an Explore structural body resolved for a solve in the viewer's browser
Takes the /v1/preview.explore body (structural) and answers what a browser-side solve starts from once the kernel has done its part: the B-rep tessellated into face-tagged triangles (tris_b64: 9 f64 LE a triangle; tags_b64: a u32 face id a triangle) and the request resolved into ss-preview's own types by this route's parsing (setup {fidelity, field_options, material, bodies [{id, faces, material, tris [start, end]}] for an assembly, conditions, opts}). The Explore app's browser arm (static/explore-gpu.js + the wasm module at /static/explore-gpu/*, crates/explore-wasm: ss-preview compiled to wasm32) builds the same voxel field, system and multigrid hierarchy from it and runs the same WGSL kernels and double-single PCG on the viewer's GPU through WebGPU. A preview's input: nothing a browser solve computes is sent back or stored; no result key, no run record. The refusals are /v1/preview.explore's own (INVALID_PREVIEW, PREVIEW_FIELD_NEEDS_BREP, PREVIEW_EXPLORE_CONTACT, the condition refusals); a physics other than structural refuses PREVIEW_BROWSER_PHYSICS. source_digest names the sources this engine was built from; the page refuses a module built from others.
POST
/
v1
/
preview.explore.setup
The DX browser arm's inputs -- an Explore structural body resolved for a solve in the viewer's browser
curl --request POST \
--url https://api.eddy.engineer/v1/preview.explore.setup \
--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": [
{}
],
"fidelity": 3,
"physics": "structural"
}
'import requests
url = "https://api.eddy.engineer/v1/preview.explore.setup"
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": [{}],
"fidelity": 3,
"physics": "structural"
}
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: [{}],
fidelity: 3,
physics: 'structural'
})
};
fetch('https://api.eddy.engineer/v1/preview.explore.setup', 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.setup",
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' => [
[
]
],
'fidelity' => 3,
'physics' => 'structural'
]),
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.setup"
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 \"fidelity\": 3,\n \"physics\": \"structural\"\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.setup")
.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 \"fidelity\": 3,\n \"physics\": \"structural\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/preview.explore.setup")
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 \"fidelity\": 3,\n \"physics\": \"structural\"\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Response
200
kind 'preview', preview true, label, physics 'structural', engine 'browser', setup {fidelity, field_options, material, bodies, conditions, opts}, triangles, tris_b64, tags_b64, source_digest, timings_ms {tessellate}, note