跳转到内容

创建兴趣点

脚本设置代码块开始,然后添加下面的片段代码。

# ... script setup ...
TWIN_ID = "your-twin-id"
poi = api_post(
f"/v1/twin/{TWIN_ID}/pois",
{
"name": "Inspection point",
"position": {"x": 0.1, "y": 0.1, "z": 0.1},
"normal": {"x": 0.0, "y": 1.0, "z": 0.0},
"distanceToSurface": 0.5,
"textureId": "thumbtack",
"color": {"r": 1.0, "g": 0.0, "b": 0.0, "a": 1.0},
},
)
print(json.dumps(poi, indent=2))