1. part
CloudNest Open Platform API Documentation
  • Preliminary preparation
    • 0. Introduction
    • a. Use our demo to quickly generate request headers
    • b. Manually create the request header
    • 1. API Quota & API Rate Limit
    • 2. Data Dictionary
  • part
    • Generate parts (imported from nc1)
      POST
    • Generate parts (JS template)
      POST
    • Generate parts (DXF file)
      POST
    • Generate parts (SmartDraw)
      POST
    • Retrieve the full list of parts
      POST
    • Retrieve the list of parts on the layout (returned in order of their physical positions)
      POST
    • Copy parts
      POST
    • Update and delete part information
      POST
    • Update the custom properties of a part
      POST
  • plate
    • Retrieve scrap sheet hierarchy details
      GET
    • Add plate
      POST
    • Retrieve plate list
      POST
    • Update plate information
      POST
  • drawing
    • Query drawing information
      POST
    • Upload DXF drawing to the job (upload file).
      POST
    • Upload dxf drawings to the job (active download)
      POST
    • Delete DXF drawing (force delete)
      POST
    • Delete DXF drawing (cannot be deleted if processed or being processed)
      POST
  • material
    • Add Material
      POST
    • Get Material List
      GET
  • job
    • Query job information by job ID
    • Add Job
    • Get Job List
    • Get Parts List under the Job
    • Get Layout List under the Job
    • Get the formatting details of the assignment
    • Get the production schedule list of the assignment
    • Get the part layout information under the assignment
    • Get the list of plates used in the assignment
    • Get the production task details under the assignment
    • Search the assignment (exact search by assignment name)
    • Delete job
    • Query the drawing processing status under the specified job
    • Get the nesting details under the job (return the DXF download link of the nesting and the part serial numbers)
    • Boost
    • Query job information by job ID (flat view)
    • Delete nesting
  • production
    • Query completed task list for the machine tool
    • Get production task details
    • Server-side - Push the layout to the CNC machine
  • Part Text Recognition
    • Get user-defined text recognition configuration
    • Drawing processing text recognition configuration
  • others
    • Get job and material information based on the layout GUID
    • Get the parts list based on the layout GUID
  1. part

Generate parts (DXF file)

POST
https://mcs-gateway.fscut.com/cn-api/api/part/file2part
Parameter Description#
[
  {
    "datas": {
      "part_name": "201109-01", // Part name
      "material": "Cold Rolled Steel", // Part material
      "thickness": 1.0, // Part thickness
      "gas": "Air", // Gas used for the part
      "amount": 1, // Quantity of parts
      "rotate_lock": 0, // Rotation lock: rotate_lock=1 locks rotation, default is 0
      "fill_color": "800000", // Fill color of the part
      "prop": { // Part properties
        "Order Number": "1027594022", // Property-value pairs
        "Material Number": "277516275",
        "Other": "1"
      }
    },
    "filename": "t21.dxf", // Corresponding dxf file name
    "jobId": 1606, // ID of the job to which it needs to be uploaded
    "optimization_parm": [ // Optimization parameters
      {
        "type": "layer_map",
        "0": "process_work2",
        "_文本替换": "process_work2",
        "尺寸标注": "process_mark"
      },
      {
        "type": "optimize",
        "Smooth": {
          "ConvertCircle": true,
          "Enable": true,
          "IgnoreBezier": true,
          "Tolerance": 0.05
        }
      }
    ]
  },
  ...
]
Explanation of optimization_parm:#
{
  "type": "layer_map", // Layer mapping
  "0": "process_work1", // Processing method
  "_文本替换": "process_work2",
  "尺寸标注": "process_mark"
}

{
  "type": "optimize", // Optimization parameters
  "RemoveTrivial": { // Remove trivial shapes
    "Enable": false, // Enable or disable (true or false)
    "Tolerance": 0.2 // Minimum shape length
  },
  "RemoveDuplication": { // Remove duplicate lines
    "Enable": false, // Enable or disable
    "Tolerance": 0.2 // Precision for duplicate line detection
  },
  "ConnectNear": { // Connect near lines
    "Enable": true, // Enable or disable
    "Tolerance": 10, // Precision for near line detection
    "GapTolerance": 0.2, // Merging precision
    "First": 2 // Integer, 0 for direction priority, 1 for length priority, 2 for distance priority
  },
  "Smooth": { // Auto-smoothing
    "Enable": false, // Enable or disable
    "Tolerance": 0.2, // Precision for smoothing
    "IgnoreBezier": false, // Don't smooth Bezier curves
    "ConvertCircle": false // Auto-recognize and convert DXF/DWG files for whole circles
  },
  "Unit": { // Unit settings
    "ImportUnit": 0 // Integer, 0 for metric, 1 for imperial, 2 for reading file unit format
  },
  "AutoExplode": { // Auto-explode
    "ExplodeText": false // Automatically convert text to curves
  },
  "FreezeOutLine": { // Fix part outer contour direction
    "FreezeOutLineStyle": 0 // Integer, 0 for all disabled, 1 for clockwise, 2 for counterclockwise
  }
}
Example of auto-optimization parameters:#
[
  {
    "type": "layer_map",
    "尺寸标注": "process_mark",
    "_文本替换": "process_work2",
    "0": "process_work2"
  },
  {
    "type": "optimize",
    "RemoveTrivial": {
      "Enable": true,
      "Tolerance": 0.0001
    },
    "RemoveDuplication": {
      "Enable": true,
      "Tolerance": 0.1
    },
    "ConnectNear": {
      "Enable": true,
      "Tolerance": 10,
      "GapTolerance": 0.0001,
      "First": 2
    },
    "Smooth": {
      "Enable": true,
      "Tolerance": 0.05,
      "IgnoreBezier": true,
      "ConvertCircle": true
    },
    "Unit": {
      "ImportUnit": 0
    },
    "AutoExplode": {
      "ExplodeText": false
    },
    "FreezeOutLine": {
      "FreezeOutLineStyle": 0
    }
  }
]
AutoCAD Index Color (ACI) to RGB Color Mapping Table:
AutoCAD索引颜色(ACI)与RGB颜色对照表

Request

Authorization
Header Params

Body Params multipart/form-data

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://mcs-gateway.fscut.com/cn-api/api/part/file2part' \
--header 'appId: op191eb50f9b81873c' \
--header 'appSecret: appSecret' \
--header 'timestamp: 1743497261540' \
--header 'appSign: 13622d51e3e4f4935c8ba27728ed309f' \
--header 'X-FS-Orgcode: TEAM001' \
--form 'files=@"D:\\work\\ApiPostFiles\\drawing\\test.dxf"' \
--form 'data="[    {        \"datas\":        {            \"part_name\": \"20210507-05\",            \"material\": \"304\",            \"thickness\": 0.8,            \"gas\": \"N2\",            \"amount\": 10,            \"rotate_lock\": 0,            \"fill_color\": \"800000\"        },        \"filename\": \"test.dxf\",        \"jobId\": 7036,        \"optimization_parm\":        [            {                \"type\": \"layer_map\",                \"尺寸标注\": \"process_mark\",                \"_文本替换\": \"process_work2\",                \"0\": \"process_work2\"            },            {                \"type\": \"optimize\",                \"RemoveTrivial\":                {                    \"Enable\": true,                    \"Tolerance\": 0.0001                },                \"RemoveDuplication\":                {                    \"Enable\": true,                    \"Tolerance\": 0.1                },                \"ConnectNear\":                {                    \"Enable\": true,                    \"Tolerance\": 10,                    \"GapTolerance\": 0.0001,                    \"First\": 2                },                \"Smooth\":                {                    \"Enable\": true,                    \"Tolerance\": 0.05,                    \"IgnoreBezier\": true,                    \"ConvertCircle\": true                },                \"Unit\":                {                    \"ImportUnit\": 0                },                \"AutoExplode\":                {                    \"ExplodeText\": false                },                \"FreezeOutLine\":                {                    \"FreezeOutLineStyle\": 0                }            }        ]    }]"' \
--form 'ignore_error="0"'

Responses

🟢200成功
application/json
Bodyapplication/json

Example
{
    "data": [
        {
            "datas": {
                "amount": 10,
                "gas": "N2",
                "guid": "B8BACAB0-79BF-4A4F-8329-65ACC2E2BD35",
                "material": "304",
                "part_name": "20210507-05",
                "rotate_lock": 0,
                "thickness": 0.8
            },
            "filename": "test.dxf",
            "jobId": 2199,
            "optimization_parm": [
                {
                    "0": "process_work2",
                    "_文本替换": "process_work2",
                    "type": "layer_map",
                    "尺寸标注": "process_mark"
                },
                {
                    "AutoExplode": {
                        "ExplodeText": false
                    },
                    "ConnectNear": {
                        "Enable": true,
                        "First": 2,
                        "GapTolerance": 0.0001,
                        "Tolerance": 10
                    },
                    "FreezeOutLine": {
                        "FreezeOutLineStyle": 0
                    },
                    "RemoveDuplication": {
                        "Enable": true,
                        "Tolerance": 0.1
                    },
                    "RemoveTrivial": {
                        "Enable": true,
                        "Tolerance": 0.0001
                    },
                    "Smooth": {
                        "ConvertCircle": true,
                        "Enable": true,
                        "IgnoreBezier": true,
                        "Tolerance": 0.05
                    },
                    "Unit": {
                        "ImportUnit": 0
                    },
                    "type": "optimize"
                }
            ]
        }
    ],
    "msg": "OK",
    "status": 0
}
🟢200错误
Modified at 2025-04-02 02:01:41
Previous
Generate parts (JS template)
Next
Generate parts (SmartDraw)
Built with