Skip to main content
← API reference

Units and coordinates

One unit in, the same unit out; positions from the top-left corner.

Units

The API is unit-agnostic. Pick one unit — millimetres, inches, anything — use it for every number you send, and every number you get back is in that same unit. Nothing is converted server-side, and no field name asserts a unit.

That covers part and stock dimensions, kerf, tolerance, trim, minOffcut and a matched set’s installGap on the way in, and every coordinate, position, remaining length, offcut, cut length and set block size on the way out. Mixing units inside one request produces a plan that validates and is physically wrong, and the server cannot detect it.

Coordinate system

The origin is the top-left corner of the sheet: x grows to the right along the sheet width, y grows downward along the sheet height. A part’s x and y are its top-left corner, and its w and h are the dimensions as placed — already swapped when rotated is true — so the rectangle x, y, w, h is the footprint on the board with no further arithmetic. Offcut rectangles use the same system.

Trim moves placements: trim.left shifts every part right and trim.top shifts every part down, because parts are nested inside the usable area and then offset back onto the full sheet. trim.right and trim.bottom shrink the usable area without moving the origin. A sheet’s w and h are always the full stock dimensions, trim included — which is also why trim counts as waste in yieldPct.