Points:图纸中各点的位置
POST /points 使用给定的值运行模板并返回其点:每个点的名称、位置(采用图纸的单位)及其定义方式。有多个页面的图纸给出其打开时所在页面的点:每个页面都有自己的点。
请求正文为一个模板(作为 template 发送,或作为 source 从您的某个存储中读取)以及其带标签变量的 values,详见 API 页面。
示例
POST /points
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 }
}
[
{ "name": "P0", "x": 0, "y": 0, "definition": "#O" },
{ "name": "P1", "x": 500, "y": 0, "definition": "[L,0]" },
{ "name": "P2", "x": 500, "y": 250, "definition": "[L,W]" },
{ "name": "P3", "x": 0, "y": 250, "definition": "[0,W]" }
]
无法用给定值计算出的点不会列出。