OK
Save material, time and money
Powered by AI Powered by AI

TonCut Engine is used for cutting optimization of flat (2D) and linear (1D) materials such as glass, wood, panels, stone, sheet metal, aluminum, fabrics, plexiglass, cardboard, pipes, beams, and many more. It supports both simple rectangular formats and elements with irregular shapes.

Simple and readable data format

Input data

{
  "version": 3,
  "defaultUnits": {
    "time": "s",
    "percent": "%",
    "length": "mm",
    "field": "sqmm",
    "angle": "deg"
  },
  "devices": [
    {
      "id": 1,
      "title": "2D device",
      "materialKind": "2d",
      "canCutAnyShapes": true,
      "minCutWidth": 30,
      "edgingCuts": "optimal",
      "originEdgingCuts": "default"
    }
  ],
  "materials": [
    {
      "id": 1,
      "deviceId": 1,
      "title": "2D material",
      "kind": "2d",
      "thickness": 18,
      "surplus": 0,
      "margin": 0,
      "defaultEdging": 0,
      "cuttingDimensions": "net",
      "canHaveStructure": true,
      "canBeVeneered": true,
      "canRotate": true,
      "canMirror": true,
      "kerf": 3,
      "allowEdgeCuts": true,
      "reuseWaste": {
        "enabled": true,
        "minLongerLength": 200,
        "minShorterLength": 200,
        "prefLongerLength": 600,
        "prefShorterLength": 600
      }
    }
  ],
  "pieces": [
    {
      "id": 1,
      "materialId": 1,
      "length": 300,
      "width": 500,
      "quantity": 5,
      "structure": ["byLength", "byWidth", "none"],
      "priority": "critical",
      "rotationStep": "30deg",
      "description": "",
      "surplus": 0,
      "margin": 0
    },
    {
      "id": 2,
      "materialId": 1,
      "length": 1220,
      "width": 740,
      "quantity": 1,
      "structure": ["byLength", "byWidth", "none"],
      "priority": "normal",
      "rotationStep": "30deg",
      "description": "",
      "surplus": 0,
      "margin": 0
    },
    {
      "id": 3,
      "materialId": 1,
      "quantity": 2,
      "structure": ["byLength", "byWidth", "none"],
      "priority": "critical",
      "rotationStep": "30deg",
      "surplus": 0,
      "shapeType": "any",
      "shape": {
        "format": "svg-path",
        "scale": 10,
        "path": "M 6593.5735,15977.848 4686.6782,9466.5001 17754.607,11543.287 Z"
      }
    },
    {
      "id": 4,
      "materialId": 1,
      "length": 900,
      "width": 700,
      "quantity": 1,
      "structure": ["byLength", "byWidth", "none"],
      "surplus": 0,
      "rotationStep": "30deg",
      "shapeType": "L",
      "shape": {
        "vertLength": 500,
        "horzLength": 300,
        "recessedCorner": "topLeft"
      }
    },
    {
      "id": 5,
      "materialId": 1,
      "length": 500,
      "width": 300,
      "quantity": 8,
      "structure": ["byLength", "byWidth", "none"],
      "surplus": 0,
      "rotationStep": "30deg",
      "shapeType": "trapezoid",
      "shape": {
        "leftSlopeLength": 200,
        "rightSlopeLength": 100
      }
    },
    {
      "id": 6,
      "materialId": 1,
      "length": 180,
      "width": 180,
      "quantity": 8,
      "structure": ["byLength", "byWidth", "none"],
      "surplus": 20,
      "rotationStep": "30deg",
      "shapeType": "circle",
      "shape": {
        "variant": "3/4"
      }
    },
    {
      "id": 7,
      "length": 900,
      "width": 900,
      "quantity": 2,
      "materialId": 1,
      "rotationStep": "0deg",
      "shapeType": "ring",
      "shape": {
        "innerRadius": 410
      }
    },
    {
      "id": 8,
      "materialId": 1,
      "length": 180,
      "width": 140,
      "quantity": 16,
      "structure": ["byLength", "byWidth", "none"],
      "rotationStep": "30deg"
    }
  ],
  "stock": [
    {
      "id": 1,
      "materialId": 1,
      "length": 2245,
      "width": 3210,
      "quantity": 1,
      "structure": "none",
      "priority": "normal",
      "description": "",
      "edging": {
        "left": 20,
        "right": 20,
        "top": 20,
        "bottom": 20
      },
      "defects": [
        {
        "x": 300,
        "y": 600,
        "length": 200,
        "width": 100
        }
      ]
    },
    {
      "id": 2,
      "materialId": 1,
      "length": 2245,
      "width": 3210,
      "quantity": 1,
      "structure": "none",
      "priority": "low",
      "description": "",
      "edging": {
        "left": 20,
        "right": 20,
        "top": 20,
        "bottom": 20
      }
    }
  ]
}
        

Results

{
  "version": 3,
  "defaultUnits": {
    "length": "mm",
    "field": "sqmm",
    "angle": "rad"
  },
  "statistics": {
    "2d": {
      "field": 7206450,
      "usedField": 4693641.6838,
      "wasteField": 2512808.3162,
      "unusedField": 0,
      "cutCount": 208,
      "cutsLength": 58002.780250133845
    },
    "1d": {
      "length": 0,
      "usedLength": 0,
      "wasteLength": 0,
      "unusedLength": 0,
      "cutCount": 0,
      "cutsLength": 0
    }
  },
  "cuttings": [
    {
      "stockItemId": 1,
      "quantity": 1,
      "cost": 0,
      "gain": 0,
      "statistics": {
        "2d": {
          "field": 7206450,
          "usedField": 4693641.6838,
          "wasteField": 2512808.3162,
          "unusedField": 0,
          "cutCount": 208,
          "cutsLength": 58002.780250133845
        }
      },
      "pieces": [
        {
          "pieceId": 2,
          "x": 500,
          "y": 20,
          "rotation": "0.000000rad",
          "shape": "M0,0 L122000,0 L122000,74000 L0,74000 Z ",
          "bbox": {
            "length": 1220,
            "width": 740
          }
        },
        {
          "pieceId": 5,
          "x": 164,
          "y": 526.97,
          "rotation": "4.712389rad",
          "shape": "M0.000238497610553168,-20000 L0.000476995221106336,-40000 L30000,-50000 L30000,0.000357746408553794 Z ",
          "bbox": {
            "length": 500,
            "width": 300
          }
        },
        {
          "pieceId": 5,
          "x": 2056,
          "y": 526.97,
          "rotation": "1.570796rad",
          "shape": "M-0.000874227785971016,-20000 L-0.00174845557194203,-40000 L-30000.001953125,-50000 L-30000,0.00131134164985269 Z ",
          "bbox": {
            "length": 500,
            "width": 300
          }
        },
        {
          "pieceId": 5,
          "x": 2372.87,
          "y": 559.36,
          "rotation": "2.617994rad",
          "shape": "M-17320.5078125,10000.0009765625 L-34641.015625,20000.001953125 L-58301.26953125,-980.758666992188 L-15000.001953125,-25980.76171875 Z ",
          "bbox": {
            "length": 500,
            "width": 300
          }
        }
              ],
      "rest": [],
      "cuts": [
        {
          "type": "line",
          "startX": 500,
          "startY": 20,
          "endX": 1720,
          "endY": 20,
          "needShift": false
        },
        {
          "type": "line",
          "startX": 1720,
          "startY": 20,
          "endX": 1720,
          "endY": 760,
          "needShift": false
        },
                {
          "type": "curve",
          "startX": 1462.42,
          "startY": 1656,
          "startXp": 1235.98,
          "startYp": 1656,
          "endXp": 1052.42,
          "endYp": 1472.44,
          "endX": 1052.42,
          "endY": 1246,
          "needShift": false
        },
        {
          "type": "curve",
          "startX": 1052.42,
          "startY": 1246,
          "startXp": 1052.42,
          "startYp": 1019.56,
          "endXp": 1235.98,
          "endYp": 836,
          "endX": 1462.42,
          "endY": 836,
          "needShift": false
        }
              ]
    }
  ]
}
        

Cutting

Attention

The input data and optimization results presented here are incomplete due to their size. They are provided for demonstration purposes only and serve to present the operation of the API.

More information about the API can be found in the documentation and in the examples included in the program’s directory after installation on your computer.

Simple and easy to use API

The server version allows for communication using a simple and easy to use API based on the Websocket protocol.

All messages exchanged between the server and the client are saved in JSON format.

Sample command:
{ "cmd":"cmdListJobs","id":9222}
        
Sample response:
{ "id":9222,"jobs":[{ "id":1,"state":"sDone","progress":100,"combinationCount":1042885,"createDate":"2023-04-18T12:31:43.133+02:00","startDate":"2023-04-18T12:31:43.166+02:00","endDate":"2023-04-18T12:31:44.739+02:00"}],"success":true}
        
Sample event:
{ "event":"JobProgress","jobId":1,"progress":74,"combinationCount":668878}
        

Types of messages

Commands are sent to the server. Sample commands include "add job", "get list of jobs", "get status", "get job data", etc.

The server sends responses to the client. Depending on the type of command, the response may have a different format.

The server also sends various events by itself, e.g. "job added", "optimization progress", "optimization completed", etc.

Job queue

The program can perform only one optimization at a time. During this time, it can accept new jobs for optimization, but they will be queued and executed in the order in which they were added.

Jobs

A job is a single optimization order. Jobs are independent from each other - they contain a full set of input data, i.e. pieces, stock, material groups, veneers and cutting devices.

Results

The results include all cuttings. Each cutting includes the arrangement of pieces and waste, as well as the list of cuts.

Do you need more information?

Prices start at € 358.52. Choose version and license period suitable for yourself. Check prices
Do you know everything? Visit our store! Buy now Check how to buy
Check the TonCut Engine documentation for more information. Learn more
Newsletter sign up