[
{
"datas": {
"argument": { // js参数
"Height": 1000
},
"part_name": "201109-01", //零件名称
"material": "冷轧板", // 零件材质
"thickness": 1.0, // 零件厚度
"gas": "Air", // 零件气体
"amount": 1, // 零件数量
"rotate_lock": 0, // 零件锁定旋转 rotate_lock=1锁定旋转,默认为0
"fill_color": "800000", // 零件填充色
"prop": { // 零件属性
"订单号": "1027594022", // 属性-值
"物料号": "277516275",
"其他": "1",
"Location.X": 8,
"Location.Y": 10
}
},
"filename": "L型支架.js", // 对应js名称
"jobId": 1606 // 需要上传到的作业对应的id
},
...
]
curl --location --request POST 'https://mcs-gateway.fscut.com/cn-api/api/part/js2part' \
--header 'app-id: op191eb50f9b81873c' \
--header 'time-stamp: {{timeStamp}}' \
--header 'app-sign: {{sign}}' \
--header 'X-FS-Orgcode: TEAM001' \
--form 'files=@"C:\\Program Files\\Friendess\\CypNest\\ScriptShapes\\L型支架.js"' \
--form 'files=@"C:\\Program Files\\Friendess\\CypNest\\ScriptShapes\\边角开口的矩形.js"' \
--form 'data="[ { \"datas\": { \"argument\": { \"Height\": 1000 }, \"part_name\": \"210507-01\", \"material\": \"冷轧板\", \"thickness\": 1.0, \"gas\": \"Air\", \"amount\": 1, \"fill_color\": \"800000\", \"prop\": { \"订单号\": \"1027594022\", \"物料号\": \"277516275\", \"其他\": \"1\", \"Location.X\": 8, \"Location.Y\": 10 } }, \"filename\": \"L型支架.js\", \"jobId\": 7036 }, { \"datas\": { \"argument\": { \"CornerX\": 10, \"Height\": 100 }, \"part_name\": \"210507-02\", \"material\": \"不锈钢\", \"thickness\": 1.2, \"gas\": \"H-N2\", \"amount\": 1, \"rotate_lock\": 0, \"fill_color\": \"00CC00\", \"prop\": { \"订单号\": \"1027593849\", \"物料号\": \"277508913\", \"其他\": \"2\" } }, \"filename\": \"边角开口的矩形.js\", \"jobId\": 7036 }, { \"datas\": { \"argument\": { \"CornerX\": 20, \"Height\": 200 }, \"part_name\": \"210507-03\", \"material\": \"不锈钢\", \"thickness\": 1.2, \"gas\": \"H-N2\", \"amount\": 2, \"rotate_lock\": 1, \"fill_color\": \"00CCFF\", \"prop\": { \"订单号\": \"1027594019\", \"物料号\": \"277516266\", \"其他\": \"3\" } }, \"filename\": \"边角开口的矩形.js\", \"jobId\": 7036 }]"'
{
"status": 0,
"msg": "OK",
"data": [
{
"datas": {
"amount": 1,
"argument": {
"Height": 1000
},
"gas": "Air",
"guid": "64171B72-43A5-4431-9035-23EC56CC9D70",
"material": "冷轧板",
"part_name": "210507-01",
"prop": {
"其他": "1",
"物料号": "277516275",
"订单号": "1027594022"
},
"thickness": 1
},
"filename": "L型支架.js",
"jobId": 2199
},
{
"datas": {
"amount": 1,
"argument": {
"CornerX": 10,
"Height": 100
},
"gas": "H-N2",
"guid": "59784875-8AD1-4C73-BD23-29B2C907A045",
"material": "不锈钢",
"part_name": "210507-02",
"prop": {
"其他": "2",
"物料号": "277508913",
"订单号": "1027593849",
"Location.X": 8,
"Location.Y": 10
},
"rotate_lock": 0,
"thickness": 1.2
},
"filename": "边角开口的矩形.js",
"jobId": 2199
},
{
"datas": {
"amount": 2,
"argument": {
"CornerX": 20,
"Height": 200
},
"gas": "H-N2",
"guid": "6C848486-8797-4BAB-8AE3-BC24B0204DF8",
"material": "不锈钢",
"part_name": "210507-03",
"prop": {
"其他": "3",
"物料号": "277516266",
"订单号": "1027594019"
},
"rotate_lock": 1,
"thickness": 1.2
},
"filename": "边角开口的矩形.js",
"jobId": 2199
}
]
}