dxf_blocks
Define CAD blocks and insert block references into DXF drawings, automatically creating the file if it does not exist.
Instructions
定义图块(BLOCK)并向图纸插入图块引用(INSERT);文件不存在时自动创建。
blocks: 图块定义列表,每个: name (必填) 图块名(已存在同名图块会报错) base_point 插入基准点(可选,默认 [0,0]) entities (必填) 图块内实体,格式与 dxf_draw 的 entities 完全相同 (line/polyline/rectangle/circle/arc/ellipse/point/text/mtext)
refs: 图块引用列表(可省略),每个: block (必填) 图块名 insert (必填) 插入点 [x,y] rotation 旋转角度(可选,度) x_scale / y_scale 缩放(可选,默认 1) layer / color 公共可选字段
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "dxf_blocks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| refs | No | ||
| blocks | No | ||
| dxfversion | No | R2010 |