Measure:图纸的尺寸和长度
POST /measure 使用给定的值运行模板并测量图纸:其范围、按图层统计的线长(切割线、压痕线 …,也包括其中放置的零件的线),以及由切割线切出的展开料及其面积和周长。长度采用图纸的单位,面积采用该单位的平方。可用于估算:刀线长度、纸板面积、所需纸张的大小。
请求正文为一个模板(作为 template 发送,或作为 source 从您的某个存储中读取)以及其带标签变量的 values,详见 API 页面。
示例
POST /measure
X-API-KEY: your-api-key
Content-Type: application/json
{
"template": "L=400,\"Length\"\nW=300,\"Width\"\nP1=[L,0]\nP2=[L,W]\nP3=[0,W]\nPOLYLINE @1,[P0,P1,P2,P3],TRUE,0",
"values": { "L": 500, "W": 250 }
}
{
"minX": 0, "minY": 0, "width": 500, "height": 250,
"elements": 1,
"totalLength": 1500,
"layers": [ { "layer": "Cut", "elements": 1, "length": 1500 } ],
"blanks": 1,
"blankArea": 125000,
"blankPerimeter": 1500
}