Compile parametric part
Compile a declarative CSG tree into a verified manifold mesh with exact metrics, orthographic blueprint SVG, optional section, and optional 3MF/STL base64 export. Units: mm, deg, +Z up. Minimal example: {"model":{"type":"box","size":[20,10,5]}}
Call
curl --fail-with-body --silent --show-error --request POST --header 'Content-Type: application/json' --header 'Accept: application/json' --data-raw '{"model":{"type":"box","size":[20,10,5]}}' https://cad.burgeonads.com/v1/compile/parametric
Input schema
{
"$defs": {
"CsgNode": {
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "box"
}
}
},
"then": {
"required": [
"size"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "cylinder"
}
}
},
"then": {
"required": [
"radius",
"height"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "sphere"
}
}
},
"then": {
"required": [
"radius"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "extrude"
}
}
},
"then": {
"required": [
"polygon",
"height"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "revolve"
}
}
},
"then": {
"required": [
"profile"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "translate"
}
}
},
"then": {
"required": [
"vector",
"child"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "rotate"
}
}
},
"then": {
"required": [
"angles_deg",
"child"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "scale"
}
}
},
"then": {
"required": [
"factor",
"child"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "mirror"
}
}
},
"then": {
"required": [
"normal",
"child"
]
}
},
{
"if": {
"properties": {
"type": {
"enum": [
"union",
"difference",
"intersection"
]
}
}
},
"then": {
"properties": {
"children": {
"minItems": 2
}
},
"required": [
"children"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "hull"
}
}
},
"then": {
"required": [
"children"
]
}
},
{
"if": {
"properties": {
"type": {
"const": "offset_2d"
}
}
},
"then": {
"required": [
"delta_mm",
"child"
]
}
}
],
"properties": {
"angle_deg": {
"default": 360,
"maximum": 360,
"minimum": 0.001,
"type": "number"
},
"angles_deg": {
"$ref": "#/$defs/Vec3"
},
"center": {
"type": "boolean"
},
"child": {
"$ref": "#/$defs/CsgNode"
},
"children": {
"items": {
"$ref": "#/$defs/CsgNode"
},
"minItems": 1,
"type": "array"
},
"delta_mm": {
"$ref": "#/$defs/Num"
},
"factor": {
"items": {
"maximum": 1000,
"minimum": -1000,
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"fillet_mm": {
"maximum": 10000,
"minimum": 0,
"type": "number"
},
"height": {
"$ref": "#/$defs/Pos"
},
"holes": {
"items": {
"$ref": "#/$defs/Ring"
},
"type": "array"
},
"join": {
"default": "round",
"enum": [
"round",
"miter",
"square"
]
},
"normal": {
"$ref": "#/$defs/Vec3"
},
"polygon": {
"$ref": "#/$defs/Ring"
},
"profile": {
"$ref": "#/$defs/Ring"
},
"radius": {
"anyOf": [
{
"$ref": "#/$defs/Pos"
},
{
"items": {
"maximum": 10000,
"minimum": 0,
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
}
]
},
"scale_top": {
"default": [
1,
1
],
"items": {
"maximum": 100,
"minimum": 0,
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"segments": {
"$ref": "#/$defs/Seg"
},
"size": {
"items": {
"$ref": "#/$defs/Pos"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"twist_deg": {
"maximum": 360,
"minimum": -360,
"type": "number"
},
"type": {
"enum": [
"box",
"cylinder",
"sphere",
"extrude",
"revolve",
"translate",
"rotate",
"scale",
"mirror",
"union",
"difference",
"intersection",
"hull",
"offset_2d"
]
},
"vector": {
"$ref": "#/$defs/Vec3"
}
},
"required": [
"type"
],
"type": "object"
},
"Num": {
"maximum": 10000,
"minimum": -10000,
"type": "number"
},
"Pos": {
"maximum": 10000,
"minimum": 0.001,
"type": "number"
},
"Ring": {
"items": {
"items": {
"$ref": "#/$defs/Num"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"maxItems": 256,
"minItems": 3,
"type": "array"
},
"Seg": {
"default": 32,
"maximum": 96,
"minimum": 3,
"type": "integer"
},
"Vec3": {
"items": {
"$ref": "#/$defs/Num"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
}
},
"additionalProperties": false,
"properties": {
"export_format": {
"default": "none",
"enum": [
"none",
"3mf_base64",
"stl_base64"
]
},
"include_svg_views": {
"default": true,
"type": "boolean"
},
"model": {
"$ref": "#/$defs/CsgNode"
},
"section_y_mm": {
"$ref": "#/$defs/Num"
},
"section_z_mm": {
"$ref": "#/$defs/Num"
},
"timeout_ms": {
"default": 5000,
"maximum": 8000,
"minimum": 100,
"type": "integer"
}
},
"required": [
"model"
],
"type": "object"
}
Output schema
{
"$defs": {
"Metrics": {
"properties": {
"bbox_max_mm": {
"$ref": "#/$defs/V3"
},
"bbox_min_mm": {
"$ref": "#/$defs/V3"
},
"center_of_mass_mm": {
"$ref": "#/$defs/V3"
},
"component_count": {
"minimum": 1,
"type": "integer"
},
"euler_characteristic": {
"type": "integer"
},
"genus": {
"$ref": "#/$defs/UInt"
},
"is_manifold": {
"const": true,
"type": "boolean"
},
"is_watertight": {
"const": true,
"type": "boolean"
},
"size_mm": {
"$ref": "#/$defs/V3"
},
"surface_area_mm2": {
"exclusiveMinimum": 0,
"type": "number"
},
"triangle_count": {
"minimum": 4,
"type": "integer"
},
"vertex_count": {
"minimum": 4,
"type": "integer"
},
"volume_mm3": {
"exclusiveMinimum": 0,
"type": "number"
}
},
"required": [
"bbox_min_mm",
"bbox_max_mm",
"size_mm",
"volume_mm3",
"surface_area_mm2",
"center_of_mass_mm",
"triangle_count",
"vertex_count",
"component_count",
"is_watertight",
"is_manifold",
"euler_characteristic",
"genus"
],
"type": "object"
},
"Section": {
"properties": {
"area_mm2": {
"minimum": 0,
"type": "number"
},
"axis": {
"enum": [
"z",
"y"
]
},
"contour_count": {
"$ref": "#/$defs/UInt"
},
"offset_mm": {
"type": "number"
}
},
"required": [
"axis",
"offset_mm",
"area_mm2",
"contour_count"
],
"type": "object"
},
"UInt": {
"minimum": 0,
"type": "integer"
},
"V3": {
"items": {
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
}
},
"properties": {
"artifact_base64": {
"maxLength": 524288,
"type": [
"string",
"null"
]
},
"artifact_bytes": {
"minimum": 1,
"type": [
"integer",
"null"
]
},
"artifact_format": {
"anyOf": [
{
"enum": [
"3mf",
"stl"
]
},
{
"type": "null"
}
]
},
"artifact_sha256": {
"pattern": "^[0-9a-f]{64}$",
"type": [
"string",
"null"
]
},
"blueprint_svg": {
"maxLength": 131072,
"type": [
"string",
"null"
]
},
"metrics": {
"anyOf": [
{
"$ref": "#/$defs/Metrics"
},
{
"type": "null"
}
]
},
"section": {
"anyOf": [
{
"$ref": "#/$defs/Section"
},
{
"type": "null"
}
]
},
"status": {
"enum": [
"ok",
"empty",
"timeout",
"unknown"
]
},
"verified": {
"type": "boolean"
}
},
"required": [
"status",
"verified",
"metrics",
"section",
"blueprint_svg",
"artifact_format",
"artifact_base64",
"artifact_sha256",
"artifact_bytes"
],
"type": "object"
}
Limits
Default timeout: 5000 ms. Maximum timeout: 8000 ms.
{
"annotations": {
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false,
"readOnlyHint": true,
"title": "Compile parametric part"
},
"price_micro_usdc": 10000,
"timeout_result": {
"artifact_base64": null,
"artifact_bytes": null,
"artifact_format": null,
"artifact_sha256": null,
"blueprint_svg": null,
"metrics": null,
"section": null,
"status": "timeout",
"verified": false
}
}
Examples
Geometric verification only. Not structural or safety certification. Provided as-is without warranty.