curl --request POST \
--url https://api.eddy.engineer/v1/cad.rebuild \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"recipe": {
"features": [
{
"id": "plate",
"name": "plate",
"op": "base",
"primitive": {
"box": {
"lx": 1,
"ly": 0.6,
"lz": 0.2
}
}
},
{
"id": "hole",
"name": "hole",
"op": "difference",
"placement": {
"offset": [
0.5,
0.3,
-0.1
]
},
"primitive": {
"cylinder": {
"h": 0.4,
"r": 0.1
}
}
}
]
},
"segments": 48
}
'import requests
url = "https://api.eddy.engineer/v1/cad.rebuild"
payload = {
"recipe": { "features": [
{
"id": "plate",
"name": "plate",
"op": "base",
"primitive": { "box": {
"lx": 1,
"ly": 0.6,
"lz": 0.2
} }
},
{
"id": "hole",
"name": "hole",
"op": "difference",
"placement": { "offset": [0.5, 0.3, -0.1] },
"primitive": { "cylinder": {
"h": 0.4,
"r": 0.1
} }
}
] },
"segments": 48
}
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({
recipe: {
features: [
{
id: 'plate',
name: 'plate',
op: 'base',
primitive: {box: {lx: 1, ly: 0.6, lz: 0.2}}
},
{
id: 'hole',
name: 'hole',
op: 'difference',
placement: {offset: [0.5, 0.3, -0.1]},
primitive: {cylinder: {h: 0.4, r: 0.1}}
}
]
},
segments: 48
})
};
fetch('https://api.eddy.engineer/v1/cad.rebuild', 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/cad.rebuild",
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([
'recipe' => [
'features' => [
[
'id' => 'plate',
'name' => 'plate',
'op' => 'base',
'primitive' => [
'box' => [
'lx' => 1,
'ly' => 0.6,
'lz' => 0.2
]
]
],
[
'id' => 'hole',
'name' => 'hole',
'op' => 'difference',
'placement' => [
'offset' => [
0.5,
0.3,
-0.1
]
],
'primitive' => [
'cylinder' => [
'h' => 0.4,
'r' => 0.1
]
]
]
]
],
'segments' => 48
]),
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/cad.rebuild"
payload := strings.NewReader("{\n \"recipe\": {\n \"features\": [\n {\n \"id\": \"plate\",\n \"name\": \"plate\",\n \"op\": \"base\",\n \"primitive\": {\n \"box\": {\n \"lx\": 1,\n \"ly\": 0.6,\n \"lz\": 0.2\n }\n }\n },\n {\n \"id\": \"hole\",\n \"name\": \"hole\",\n \"op\": \"difference\",\n \"placement\": {\n \"offset\": [\n 0.5,\n 0.3,\n -0.1\n ]\n },\n \"primitive\": {\n \"cylinder\": {\n \"h\": 0.4,\n \"r\": 0.1\n }\n }\n }\n ]\n },\n \"segments\": 48\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/cad.rebuild")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"recipe\": {\n \"features\": [\n {\n \"id\": \"plate\",\n \"name\": \"plate\",\n \"op\": \"base\",\n \"primitive\": {\n \"box\": {\n \"lx\": 1,\n \"ly\": 0.6,\n \"lz\": 0.2\n }\n }\n },\n {\n \"id\": \"hole\",\n \"name\": \"hole\",\n \"op\": \"difference\",\n \"placement\": {\n \"offset\": [\n 0.5,\n 0.3,\n -0.1\n ]\n },\n \"primitive\": {\n \"cylinder\": {\n \"h\": 0.4,\n \"r\": 0.1\n }\n }\n }\n ]\n },\n \"segments\": 48\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/cad.rebuild")
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 \"recipe\": {\n \"features\": [\n {\n \"id\": \"plate\",\n \"name\": \"plate\",\n \"op\": \"base\",\n \"primitive\": {\n \"box\": {\n \"lx\": 1,\n \"ly\": 0.6,\n \"lz\": 0.2\n }\n }\n },\n {\n \"id\": \"hole\",\n \"name\": \"hole\",\n \"op\": \"difference\",\n \"placement\": {\n \"offset\": [\n 0.5,\n 0.3,\n -0.1\n ]\n },\n \"primitive\": {\n \"cylinder\": {\n \"h\": 0.4,\n \"r\": 0.1\n }\n }\n }\n ]\n },\n \"segments\": 48\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Rebuild a feature recipe (C track C3)
An editable feature history: a base solid then a sequence of placed boolean operations (union / difference=cut / intersection). Each feature’s tool body is a CSG primitive (primitive: box / cylinder / sphere / cone / torus), a sketch-driven solid — an extrude (sketch + height, optionally corner_fillet, corner_chamfer, draft_deg, mid_plane, thin, up_to) or a revolve (sketch + segments, a full turn about the sketch’s +y axis) — a hole-wizard tool (hole: a simple / counterbore / countersink hole built as one faceted revolve), all C5.1; a loft, sweep or sweep3d; a gear; a repeat of an earlier feature (pattern, circular_pattern, mirror, each naming its seed); a shell, scale or full_round of the running solid; an edge fillet / chamfer (edge ids on the rebuilt B-rep); surface bodies; or an imported / mesh_body solid. Any feature may carry placement.rotation ([axis, degrees], turned about the body’s own origin before placement.offset moves it). So a sketched profile or a standard machined hole can cut or intersect the running solid as a first-class feature. Rebuilds into per-feature build status (ok / suppressed / failed with the kernel’s typed reason) and a face-tagged viz of the built solid; a failed feature is flagged and skipped (later independent features still build), never a fatal rebuild. Pure and deterministic; the built viz is content-addressed.
curl --request POST \
--url https://api.eddy.engineer/v1/cad.rebuild \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"recipe": {
"features": [
{
"id": "plate",
"name": "plate",
"op": "base",
"primitive": {
"box": {
"lx": 1,
"ly": 0.6,
"lz": 0.2
}
}
},
{
"id": "hole",
"name": "hole",
"op": "difference",
"placement": {
"offset": [
0.5,
0.3,
-0.1
]
},
"primitive": {
"cylinder": {
"h": 0.4,
"r": 0.1
}
}
}
]
},
"segments": 48
}
'import requests
url = "https://api.eddy.engineer/v1/cad.rebuild"
payload = {
"recipe": { "features": [
{
"id": "plate",
"name": "plate",
"op": "base",
"primitive": { "box": {
"lx": 1,
"ly": 0.6,
"lz": 0.2
} }
},
{
"id": "hole",
"name": "hole",
"op": "difference",
"placement": { "offset": [0.5, 0.3, -0.1] },
"primitive": { "cylinder": {
"h": 0.4,
"r": 0.1
} }
}
] },
"segments": 48
}
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({
recipe: {
features: [
{
id: 'plate',
name: 'plate',
op: 'base',
primitive: {box: {lx: 1, ly: 0.6, lz: 0.2}}
},
{
id: 'hole',
name: 'hole',
op: 'difference',
placement: {offset: [0.5, 0.3, -0.1]},
primitive: {cylinder: {h: 0.4, r: 0.1}}
}
]
},
segments: 48
})
};
fetch('https://api.eddy.engineer/v1/cad.rebuild', 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/cad.rebuild",
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([
'recipe' => [
'features' => [
[
'id' => 'plate',
'name' => 'plate',
'op' => 'base',
'primitive' => [
'box' => [
'lx' => 1,
'ly' => 0.6,
'lz' => 0.2
]
]
],
[
'id' => 'hole',
'name' => 'hole',
'op' => 'difference',
'placement' => [
'offset' => [
0.5,
0.3,
-0.1
]
],
'primitive' => [
'cylinder' => [
'h' => 0.4,
'r' => 0.1
]
]
]
]
],
'segments' => 48
]),
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/cad.rebuild"
payload := strings.NewReader("{\n \"recipe\": {\n \"features\": [\n {\n \"id\": \"plate\",\n \"name\": \"plate\",\n \"op\": \"base\",\n \"primitive\": {\n \"box\": {\n \"lx\": 1,\n \"ly\": 0.6,\n \"lz\": 0.2\n }\n }\n },\n {\n \"id\": \"hole\",\n \"name\": \"hole\",\n \"op\": \"difference\",\n \"placement\": {\n \"offset\": [\n 0.5,\n 0.3,\n -0.1\n ]\n },\n \"primitive\": {\n \"cylinder\": {\n \"h\": 0.4,\n \"r\": 0.1\n }\n }\n }\n ]\n },\n \"segments\": 48\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/cad.rebuild")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"recipe\": {\n \"features\": [\n {\n \"id\": \"plate\",\n \"name\": \"plate\",\n \"op\": \"base\",\n \"primitive\": {\n \"box\": {\n \"lx\": 1,\n \"ly\": 0.6,\n \"lz\": 0.2\n }\n }\n },\n {\n \"id\": \"hole\",\n \"name\": \"hole\",\n \"op\": \"difference\",\n \"placement\": {\n \"offset\": [\n 0.5,\n 0.3,\n -0.1\n ]\n },\n \"primitive\": {\n \"cylinder\": {\n \"h\": 0.4,\n \"r\": 0.1\n }\n }\n }\n ]\n },\n \"segments\": 48\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/cad.rebuild")
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 \"recipe\": {\n \"features\": [\n {\n \"id\": \"plate\",\n \"name\": \"plate\",\n \"op\": \"base\",\n \"primitive\": {\n \"box\": {\n \"lx\": 1,\n \"ly\": 0.6,\n \"lz\": 0.2\n }\n }\n },\n {\n \"id\": \"hole\",\n \"name\": \"hole\",\n \"op\": \"difference\",\n \"placement\": {\n \"offset\": [\n 0.5,\n 0.3,\n -0.1\n ]\n },\n \"primitive\": {\n \"cylinder\": {\n \"h\": 0.4,\n \"r\": 0.1\n }\n }\n }\n ]\n },\n \"segments\": 48\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Body
Response
Per-feature statuses + a brep viz of the built solid (built=false when nothing built; cached=true on a rebuild-memo hit)