TonCut Engine se utiliza para la optimización de cortes de materiales planos (2D) y lineales (1D), como vidrio, madera, tableros, piedra, chapa, aluminio, telas, plexiglás, cartón, tubos, vigas y muchos más. Admite tanto formatos rectangulares simples como elementos con formas irregulares.
{ "version": 3, "defaultUnits": { "time": "s", "percent": "%", "length": "mm", "field": "sqmm", "angle": "deg" }, "devices": [ { "id": 1, "title": "Dispositivo 2D", "materialKind": "2d", "canCutAnyShapes": true, "minCutWidth": 30, "edgingCuts": "optimal", "originEdgingCuts": "default" } ], "materials": [ { "id": 1, "deviceId": 1, "title": "Material 2D", "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 } } ] }
{ "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 } ] } ] }
Los datos de entrada y los resultados de optimización aquí presentados son incompletos debido a su tamaño. Tienen únicamente un carácter demostrativo y sirven para mostrar el funcionamiento del API.
Más información sobre el API se puede encontrar en la documentación y en los ejemplos que encontrarás en el directorio del programa, después de instalarlo en tu ordenador.
La versión de servidor habilita la comunicación mediante una API sencilla e intuitiva con base en el protocolo Websocket.
Todos los mensajes intercambiados entre el servidor y el cliente se almacenan en formato JSON.
Comando de ejemplo:{ "cmd":"cmdListJobs","id":9222}Respuesta de ejemplo:
{ "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}Acontecimiento de ejemplo:
{ "event":"JobProgress","jobId":1,"progress":74,"combinationCount":668878}
Los comandos se envían al servidor.Algunos ejemplos de comando son "añadir tarea", "descargar lista de tareas", "descargar estado", "descargar datos de la tarea", etc.
El servidor envía las respuestas al cliente. La respuesta puede tener distintos formatos según el tipo de comando.
El servidor también envía por sí mismo distintos acontecimientos, p. ej. "adición de tarea", "progreso de la optimización", "fin de la optimización", etc.
El programa solo realiza una optimización al mismo tiempo. Mientras tanto, puede aceptar nuevas tareas para optimizar, pero se pondrán en cola y se realizarán en el orden de adición.
Una tarea es un encargo de optimización individual. Las tareas son independientes: contienen un conjunto completo de datos de entrada, es decir, elementos, recursos, grupos de materiales, chapas y dispositivos de corte.
Los resultados contienen todos los cortes.Cada corte contiene la disposición de los elementos y el desecho, así como una lista de cortes.