Measure: the drawing's sizes and lengths
POST /measure runs the template with the values given and measures the drawing: its extent, its lines'
lengths by layer (cut, crease …, the lines of parts placed in it too), and the blanks its cut lines cut out, with
their area and perimeter. Lengths are in the drawing's units, areas in their squares. Use it for estimating: rule
length, board area, how big a sheet is needed.
The body is a template (as template, or as source from one of your storages) and values for its labelled variables, as described on the API page.
Example
POST /measure
X-API-KEY: your-api-key
Content-Type: application/json
{
"template": "L=400,\"Length\"\nW=300,\"Width\"\nP1=[L,0]\nP2=[L,W]\nP3=[0,W]\nPOLYLINE @1,[P0,P1,P2,P3],TRUE,0",
"values": { "L": 500, "W": 250 }
}
{
"minX": 0, "minY": 0, "width": 500, "height": 250,
"elements": 1,
"totalLength": 1500,
"layers": [ { "layer": "Cut", "elements": 1, "length": 1500 } ],
"blanks": 1,
"blankArea": 125000,
"blankPerimeter": 1500
}