eda_pcb_document_set_canvas_origin
Set the canvas origin offset relative to the data origin to align displayed coordinates with API data coordinates, ensuring consistent positioning during PCB design operations.
Instructions
pcb_Document.setCanvasOrigin(offsetX: number, offsetY: number) -> Promise 设置画布原点相对于数据原点的偏移坐标 remarks: 嘉立创 EDA 专业版前端显示的坐标均为画布原点;
嘉立创 EDA 专业版 API 使用的均为数据原点;
如果希望在 API 操作时前端画布坐标能与数据一致,
建议调用本方法并设置偏移量为零,
即 setCanvasOrigin(0, 0);
此处的单位为数据层面单位,在跨度上等同于画布层面的 mil returns: 操作是否成功
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "eda_pcb_document_set_canvas_origin"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | 按官方签名顺序排列的JSON参数数组 | |
| windowId | No | 目标EDA窗口ID;省略时使用当前活动窗口 |