Optimize sheet layout
Nest 2D polygons with holes onto cut sheets with margin, kerf, and rotation step; returns verified placements and a 1:1 mm SVG cut sheet. Minimal example: {"sheet_mm":[100,100],"parts":[{"id":"p","polygon":[[0,0],[20,0],[20,10],[0,10]],"quantity":2}]}
Call
curl --fail-with-body --silent --show-error --request POST --header 'Content-Type: application/json' --header 'Accept: application/json' --data-raw '{"sheet_mm":[100,100],"parts":[{"id":"p","polygon":[[0,0],[20,0],[20,10],[0,10]],"quantity":2}]}' https://cad.burgeonads.com/v1/optimize/sheet-layout
Input schema
{
"$defs": {
"Name": {
"pattern": "^[A-Za-z0-9_.-]{1,64}$",
"type": "string"
},
"Num": {
"maximum": 10000,
"minimum": -10000,
"type": "number"
},
"Ring": {
"items": {
"items": {
"$ref": "#/$defs/Num"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"maxItems": 256,
"minItems": 3,
"type": "array"
}
},
"additionalProperties": false,
"properties": {
"include_svg": {
"default": true,
"type": "boolean"
},
"kerf_mm": {
"default": 0.2,
"maximum": 20,
"minimum": 0,
"type": "number"
},
"margin_mm": {
"default": 2,
"maximum": 100,
"minimum": 0,
"type": "number"
},
"max_sheets": {
"default": 1,
"maximum": 8,
"minimum": 1,
"type": "integer"
},
"parts": {
"items": {
"additionalProperties": false,
"properties": {
"holes": {
"items": {
"$ref": "#/$defs/Ring"
},
"type": "array"
},
"id": {
"$ref": "#/$defs/Name"
},
"polygon": {
"$ref": "#/$defs/Ring"
},
"quantity": {
"default": 1,
"maximum": 128,
"minimum": 1,
"type": "integer"
}
},
"required": [
"id",
"polygon"
],
"type": "object"
},
"maxItems": 32,
"minItems": 1,
"type": "array"
},
"rotation_step_deg": {
"default": 90,
"enum": [
0,
90,
45,
15
]
},
"sheet_mm": {
"items": {
"maximum": 5000,
"minimum": 10,
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
},
"timeout_ms": {
"default": 5000,
"maximum": 8000,
"minimum": 100,
"type": "integer"
}
},
"required": [
"sheet_mm",
"parts"
],
"type": "object"
}
Output schema
{
"$defs": {
"Placement": {
"properties": {
"bbox_mm": {
"items": {
"type": "number"
},
"maxItems": 4,
"minItems": 4,
"type": "array"
},
"instance_index": {
"$ref": "#/$defs/UInt"
},
"part_id": {
"type": "string"
},
"rotate_deg": {
"exclusiveMaximum": 360,
"minimum": 0,
"type": "number"
},
"sheet_index": {
"maximum": 7,
"minimum": 0,
"type": "integer"
},
"translate_mm": {
"$ref": "#/$defs/V2"
}
},
"required": [
"part_id",
"instance_index",
"sheet_index",
"translate_mm",
"rotate_deg",
"bbox_mm"
],
"type": "object"
},
"UInt": {
"minimum": 0,
"type": "integer"
},
"Unplaced": {
"properties": {
"instance_index": {
"$ref": "#/$defs/UInt"
},
"part_id": {
"type": "string"
}
},
"required": [
"part_id",
"instance_index"
],
"type": "object"
},
"V2": {
"items": {
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
}
},
"properties": {
"layout_svg": {
"maxLength": 131072,
"type": [
"string",
"null"
]
},
"min_spacing_mm": {
"minimum": 0,
"type": [
"number",
"null"
]
},
"oversized_part_ids": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"placements": {
"items": {
"$ref": "#/$defs/Placement"
},
"type": [
"array",
"null"
]
},
"sheet_area_mm2": {
"exclusiveMinimum": 0,
"type": [
"number",
"null"
]
},
"sheets_used": {
"maximum": 8,
"minimum": 0,
"type": [
"integer",
"null"
]
},
"status": {
"enum": [
"placed_all",
"partial",
"infeasible",
"timeout",
"unknown"
]
},
"total_part_area_mm2": {
"minimum": 0,
"type": [
"number",
"null"
]
},
"unplaced": {
"items": {
"$ref": "#/$defs/Unplaced"
},
"type": [
"array",
"null"
]
},
"unplaced_count": {
"minimum": 0,
"type": [
"integer",
"null"
]
},
"utilization_ratio": {
"maximum": 1,
"minimum": 0,
"type": [
"number",
"null"
]
},
"verified": {
"type": "boolean"
}
},
"required": [
"status",
"verified",
"placements",
"unplaced",
"unplaced_count",
"oversized_part_ids",
"sheets_used",
"utilization_ratio",
"total_part_area_mm2",
"sheet_area_mm2",
"min_spacing_mm",
"layout_svg"
],
"type": "object"
}
Limits
Default timeout: 5000 ms. Maximum timeout: 8000 ms.
{
"annotations": {
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false,
"readOnlyHint": true,
"title": "Optimize sheet layout"
},
"price_micro_usdc": 20000,
"timeout_result": {
"layout_svg": null,
"min_spacing_mm": null,
"oversized_part_ids": null,
"placements": null,
"sheet_area_mm2": null,
"sheets_used": null,
"status": "timeout",
"total_part_area_mm2": null,
"unplaced": null,
"unplaced_count": null,
"utilization_ratio": null,
"verified": false
}
}
Examples
Geometric verification only. Not structural or safety certification. Provided as-is without warranty.