docs: 第6项第五批(附属构件 阳台/台阶/坡道/散水) #151
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -10,6 +10,7 @@ set(SOURCES
|
||||
"aec_mcp_stair_tools.cpp"
|
||||
"aec_mcp_sfp_stair_tools.cpp"
|
||||
"aec_mcp_window_tools.cpp"
|
||||
"aec_mcp_attachment_tools.cpp"
|
||||
"aec_mcp_roof_tools.cpp"
|
||||
"aec_mcp_query.cpp"
|
||||
"StdAfx.cpp"
|
||||
|
||||
@@ -4749,6 +4749,632 @@
|
||||
"dll_name": "cad_mcp_aec.dll",
|
||||
"factory_function": "UpdateAecWindowTool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "add_aec_balcony",
|
||||
"description": "沿墙放置阳台(菜单 PL_FZYT,实体 AecDbBalcony):给墙 handle + 起止点(投影到墙中心线)+ 一个确认墙外侧方向的点,再给挑出宽度/栏杆高/板厚/梁尺寸等(缺省照抄 CFZYTDlg)。bottom_elevation 按\"相对墙底\"给。图层 LAY_BALCONY。",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"wall": {
|
||||
"type": "string",
|
||||
"description": "墙(AecDbXWall)的 handle"
|
||||
},
|
||||
"start": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
},
|
||||
"description": "阳台沿墙的起点 [x,y]"
|
||||
},
|
||||
"end": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
},
|
||||
"description": "阳台沿墙的终点 [x,y]"
|
||||
},
|
||||
"side_point": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
},
|
||||
"description": "墙外侧任意一点 [x,y],用来定挑出方向"
|
||||
},
|
||||
"bottom_elevation": {
|
||||
"type": "number",
|
||||
"description": "底板底标高(相对墙底),缺省 160"
|
||||
},
|
||||
"layer": {
|
||||
"type": "string",
|
||||
"description": "图层,缺省 LAY_BALCONY"
|
||||
},
|
||||
"color": {
|
||||
"type": "integer",
|
||||
"description": "ACI 颜色号,256=ByLayer"
|
||||
},
|
||||
"width": {
|
||||
"type": "number",
|
||||
"description": "阳台挑出宽度"
|
||||
},
|
||||
"rail_height": {
|
||||
"type": "number",
|
||||
"description": "栏杆高"
|
||||
},
|
||||
"slab_thickness": {
|
||||
"type": "number",
|
||||
"description": "底板厚"
|
||||
},
|
||||
"girder_thickness": {
|
||||
"type": "number",
|
||||
"description": "阳台梁厚"
|
||||
},
|
||||
"beam_height": {
|
||||
"type": "number",
|
||||
"description": "阳台梁高"
|
||||
},
|
||||
"beam_width": {
|
||||
"type": "number",
|
||||
"description": "阳台梁宽"
|
||||
},
|
||||
"rail_edge": {
|
||||
"type": "integer",
|
||||
"description": "无扶手的边(按对话框选项)"
|
||||
},
|
||||
"add_opening": {
|
||||
"type": "boolean",
|
||||
"description": "阳台栏板上加门窗"
|
||||
},
|
||||
"frame_vertical": {
|
||||
"type": "number",
|
||||
"description": "竖框高"
|
||||
},
|
||||
"frame_horizontal": {
|
||||
"type": "number",
|
||||
"description": "横框宽"
|
||||
},
|
||||
"window_height": {
|
||||
"type": "number",
|
||||
"description": "窗高"
|
||||
},
|
||||
"material": {
|
||||
"type": "string",
|
||||
"description": "材质"
|
||||
},
|
||||
"factory": {
|
||||
"type": "string",
|
||||
"description": "厂家"
|
||||
},
|
||||
"no": {
|
||||
"type": "string",
|
||||
"description": "编号"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"wall",
|
||||
"start",
|
||||
"end",
|
||||
"side_point"
|
||||
]
|
||||
},
|
||||
"backend": {
|
||||
"type": "c++_dll",
|
||||
"dll_name": "cad_mcp_aec.dll",
|
||||
"factory_function": "AddAecBalconyTool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "update_aec_balcony",
|
||||
"description": "修改阳台(AecDbBalcony):只传要改的字段(挑出宽度/栏杆高/板厚/梁尺寸/栏板门窗/材质编号);给 wall+start+end+side_point 可以换位置和走向。bottom_elevation 这里按绝对标高给。",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"handle": {
|
||||
"type": "string",
|
||||
"description": "阳台实体 handle"
|
||||
},
|
||||
"wall": {
|
||||
"type": "string",
|
||||
"description": "新的墙 handle(改位置时一起给)"
|
||||
},
|
||||
"start": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"end": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"side_point": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"bottom_elevation": {
|
||||
"type": "number",
|
||||
"description": "底板底标高(绝对)"
|
||||
},
|
||||
"color": {
|
||||
"type": "integer"
|
||||
},
|
||||
"width": {
|
||||
"type": "number",
|
||||
"description": "阳台挑出宽度"
|
||||
},
|
||||
"rail_height": {
|
||||
"type": "number",
|
||||
"description": "栏杆高"
|
||||
},
|
||||
"slab_thickness": {
|
||||
"type": "number",
|
||||
"description": "底板厚"
|
||||
},
|
||||
"girder_thickness": {
|
||||
"type": "number",
|
||||
"description": "阳台梁厚"
|
||||
},
|
||||
"beam_height": {
|
||||
"type": "number",
|
||||
"description": "阳台梁高"
|
||||
},
|
||||
"beam_width": {
|
||||
"type": "number",
|
||||
"description": "阳台梁宽"
|
||||
},
|
||||
"rail_edge": {
|
||||
"type": "integer",
|
||||
"description": "无扶手的边(按对话框选项)"
|
||||
},
|
||||
"add_opening": {
|
||||
"type": "boolean",
|
||||
"description": "阳台栏板上加门窗"
|
||||
},
|
||||
"frame_vertical": {
|
||||
"type": "number",
|
||||
"description": "竖框高"
|
||||
},
|
||||
"frame_horizontal": {
|
||||
"type": "number",
|
||||
"description": "横框宽"
|
||||
},
|
||||
"window_height": {
|
||||
"type": "number",
|
||||
"description": "窗高"
|
||||
},
|
||||
"material": {
|
||||
"type": "string",
|
||||
"description": "材质"
|
||||
},
|
||||
"factory": {
|
||||
"type": "string",
|
||||
"description": "厂家"
|
||||
},
|
||||
"no": {
|
||||
"type": "string",
|
||||
"description": "编号"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handle"
|
||||
]
|
||||
},
|
||||
"backend": {
|
||||
"type": "c++_dll",
|
||||
"dll_name": "cad_mcp_aec.dll",
|
||||
"factory_function": "UpdateAecBalconyTool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "add_aec_xstep",
|
||||
"description": "沿墙放置台阶(菜单 PL_FZTJ,实体 AecDbXStep):给墙 handle + 起止点(投影到墙中心线)+ 墙外侧点,再给台阶宽/踏步/平台进深等(缺省照抄 CFZTJDlg)。bottom_elevation 相对墙底。图层 LAY_BALCONY。",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"wall": {
|
||||
"type": "string",
|
||||
"description": "墙 handle"
|
||||
},
|
||||
"bottom_elevation": {
|
||||
"type": "number",
|
||||
"description": "底标高(相对墙底),缺省 0"
|
||||
},
|
||||
"layer": {
|
||||
"type": "string"
|
||||
},
|
||||
"color": {
|
||||
"type": "integer"
|
||||
},
|
||||
"start": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
},
|
||||
"description": "沿墙起点 [x,y]"
|
||||
},
|
||||
"end": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
},
|
||||
"description": "沿墙终点 [x,y]"
|
||||
},
|
||||
"side_point": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
},
|
||||
"description": "墙外侧任意一点,定朝外方向"
|
||||
},
|
||||
"width": {
|
||||
"type": "number",
|
||||
"description": "台阶总宽,缺省 450"
|
||||
},
|
||||
"steep_width": {
|
||||
"type": "number",
|
||||
"description": "踏步宽,缺省 300"
|
||||
},
|
||||
"steep_height": {
|
||||
"type": "number",
|
||||
"description": "踏步高,缺省 150"
|
||||
},
|
||||
"steep_count": {
|
||||
"type": "integer",
|
||||
"description": "踏步数,缺省 3"
|
||||
},
|
||||
"base_width": {
|
||||
"type": "number",
|
||||
"description": "平台进深,缺省 2000"
|
||||
},
|
||||
"base_align": {
|
||||
"type": "integer",
|
||||
"description": "0 平台左 / 1 平台右"
|
||||
},
|
||||
"step_style": {
|
||||
"type": "integer",
|
||||
"description": "台阶方式"
|
||||
},
|
||||
"struct_style": {
|
||||
"type": "integer",
|
||||
"description": "结构形式"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"wall",
|
||||
"start",
|
||||
"end",
|
||||
"side_point"
|
||||
]
|
||||
},
|
||||
"backend": {
|
||||
"type": "c++_dll",
|
||||
"dll_name": "cad_mcp_aec.dll",
|
||||
"factory_function": "AddAecXStepTool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "update_aec_xstep",
|
||||
"description": "改台阶(AecDbXStep):台阶宽/踏步/平台进深/样式,只传要改的字段;给 wall+start+end+side_point 可以换位置。bottom_elevation 这里按绝对标高。",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"handle": {
|
||||
"type": "string"
|
||||
},
|
||||
"wall": {
|
||||
"type": "string"
|
||||
},
|
||||
"bottom_elevation": {
|
||||
"type": "number"
|
||||
},
|
||||
"color": {
|
||||
"type": "integer"
|
||||
},
|
||||
"start": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
},
|
||||
"description": "沿墙起点 [x,y]"
|
||||
},
|
||||
"end": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
},
|
||||
"description": "沿墙终点 [x,y]"
|
||||
},
|
||||
"side_point": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
},
|
||||
"description": "墙外侧任意一点,定朝外方向"
|
||||
},
|
||||
"width": {
|
||||
"type": "number",
|
||||
"description": "台阶总宽,缺省 450"
|
||||
},
|
||||
"steep_width": {
|
||||
"type": "number",
|
||||
"description": "踏步宽,缺省 300"
|
||||
},
|
||||
"steep_height": {
|
||||
"type": "number",
|
||||
"description": "踏步高,缺省 150"
|
||||
},
|
||||
"steep_count": {
|
||||
"type": "integer",
|
||||
"description": "踏步数,缺省 3"
|
||||
},
|
||||
"base_width": {
|
||||
"type": "number",
|
||||
"description": "平台进深,缺省 2000"
|
||||
},
|
||||
"base_align": {
|
||||
"type": "integer",
|
||||
"description": "0 平台左 / 1 平台右"
|
||||
},
|
||||
"step_style": {
|
||||
"type": "integer",
|
||||
"description": "台阶方式"
|
||||
},
|
||||
"struct_style": {
|
||||
"type": "integer",
|
||||
"description": "结构形式"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handle"
|
||||
]
|
||||
},
|
||||
"backend": {
|
||||
"type": "c++_dll",
|
||||
"dll_name": "cad_mcp_aec.dll",
|
||||
"factory_function": "UpdateAecXStepTool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "add_aec_ascent",
|
||||
"description": "放置坡道(菜单 PL_FZPD,实体 AecDbAscent):给起点和终点,再给水平投影长/坡高/坡宽/翻边/顶标高等(缺省照抄 CFZPDDlg)。图层 LAY_CSTAIR。",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"start": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"end": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"layer": {
|
||||
"type": "string"
|
||||
},
|
||||
"color": {
|
||||
"type": "integer"
|
||||
},
|
||||
"run_length": {
|
||||
"type": "number",
|
||||
"description": "水平投影长,缺省 2100"
|
||||
},
|
||||
"rise": {
|
||||
"type": "number",
|
||||
"description": "坡高,缺省 450"
|
||||
},
|
||||
"width": {
|
||||
"type": "number",
|
||||
"description": "坡宽,缺省 3000"
|
||||
},
|
||||
"side_width": {
|
||||
"type": "number",
|
||||
"description": "翻边宽,缺省 300"
|
||||
},
|
||||
"top_elevation": {
|
||||
"type": "number",
|
||||
"description": "顶标高,缺省 450"
|
||||
},
|
||||
"align_left": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"align_right": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"nonslip": {
|
||||
"type": "boolean",
|
||||
"description": "是否有防滑条"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"start",
|
||||
"end"
|
||||
]
|
||||
},
|
||||
"backend": {
|
||||
"type": "c++_dll",
|
||||
"dll_name": "cad_mcp_aec.dll",
|
||||
"factory_function": "AddAecAscentTool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "update_aec_ascent",
|
||||
"description": "改坡道(AecDbAscent):只传要改的字段;给 start+end 可以换走向。",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"handle": {
|
||||
"type": "string"
|
||||
},
|
||||
"start": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"end": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"color": {
|
||||
"type": "integer"
|
||||
},
|
||||
"run_length": {
|
||||
"type": "number",
|
||||
"description": "水平投影长,缺省 2100"
|
||||
},
|
||||
"rise": {
|
||||
"type": "number",
|
||||
"description": "坡高,缺省 450"
|
||||
},
|
||||
"width": {
|
||||
"type": "number",
|
||||
"description": "坡宽,缺省 3000"
|
||||
},
|
||||
"side_width": {
|
||||
"type": "number",
|
||||
"description": "翻边宽,缺省 300"
|
||||
},
|
||||
"top_elevation": {
|
||||
"type": "number",
|
||||
"description": "顶标高,缺省 450"
|
||||
},
|
||||
"align_left": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"align_right": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"nonslip": {
|
||||
"type": "boolean",
|
||||
"description": "是否有防滑条"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handle"
|
||||
]
|
||||
},
|
||||
"backend": {
|
||||
"type": "c++_dll",
|
||||
"dll_name": "cad_mcp_aec.dll",
|
||||
"factory_function": "UpdateAecAscentTool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "add_aec_apron",
|
||||
"description": "放置散水(菜单 PL_FZSS,实体 AecDbXApron):给走向 points(自动闭合)再给散水宽/内外边厚/离墙偏移/顶标高(缺省照抄 CFZSSDlg)。图层 LAY_BALCONY。",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"layer": {
|
||||
"type": "string"
|
||||
},
|
||||
"color": {
|
||||
"type": "integer"
|
||||
},
|
||||
"points": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"description": "散水走向 [[x,y],...](自动闭合)"
|
||||
},
|
||||
"width": {
|
||||
"type": "number",
|
||||
"description": "散水宽"
|
||||
},
|
||||
"inside_thickness": {
|
||||
"type": "number",
|
||||
"description": "内侧厚"
|
||||
},
|
||||
"outside_thickness": {
|
||||
"type": "number",
|
||||
"description": "外侧厚"
|
||||
},
|
||||
"offset_from_wall": {
|
||||
"type": "number",
|
||||
"description": "离墙偏移"
|
||||
},
|
||||
"elevation": {
|
||||
"type": "number",
|
||||
"description": "顶标高"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"points",
|
||||
"width"
|
||||
]
|
||||
},
|
||||
"backend": {
|
||||
"type": "c++_dll",
|
||||
"dll_name": "cad_mcp_aec.dll",
|
||||
"factory_function": "AddAecApronTool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "update_aec_apron",
|
||||
"description": "改散水(AecDbXApron):只传要改的字段;给 points 可以换走向。",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"handle": {
|
||||
"type": "string"
|
||||
},
|
||||
"color": {
|
||||
"type": "integer"
|
||||
},
|
||||
"points": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"description": "散水走向 [[x,y],...](自动闭合)"
|
||||
},
|
||||
"width": {
|
||||
"type": "number",
|
||||
"description": "散水宽"
|
||||
},
|
||||
"inside_thickness": {
|
||||
"type": "number",
|
||||
"description": "内侧厚"
|
||||
},
|
||||
"outside_thickness": {
|
||||
"type": "number",
|
||||
"description": "外侧厚"
|
||||
},
|
||||
"offset_from_wall": {
|
||||
"type": "number",
|
||||
"description": "离墙偏移"
|
||||
},
|
||||
"elevation": {
|
||||
"type": "number",
|
||||
"description": "顶标高"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"handle"
|
||||
]
|
||||
},
|
||||
"backend": {
|
||||
"type": "c++_dll",
|
||||
"dll_name": "cad_mcp_aec.dll",
|
||||
"factory_function": "UpdateAecApronTool"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -28,6 +28,10 @@
|
||||
| 命令 | 4字名 | 实体 | 工具 |
|
||||
| --- | --- | --- | --- |
|
||||
| `PL_QTCC` | 墙体插窗(普通门窗) | `AecDbXOpening` | `add/update_aec_window` |
|
||||
| `PL_FZYT` | 放置阳台 | `AecDbBalcony` | `add/update_aec_balcony` |
|
||||
| `PL_FZTJ` | 放置台阶 | `AecDbXStep` | `add/update_aec_xstep` |
|
||||
| `PL_FZPD` | 放置坡道 | `AecDbAscent` | `add/update_aec_ascent` |
|
||||
| `PL_FZSS` | 放置散水 | `AecDbXApron` | `add/update_aec_apron` |
|
||||
| `PL_PTLT` | 直线钢梯 | `AecDbLineStair` | `add/update_aec_line_stair` |
|
||||
| `PL_FZHN` | 放置护栏 | `AecDbGuardBar` | `add/update_aec_guard_bar` |
|
||||
| `PL_QXHN` | 曲线护栏 | `AecDbGuardBar` | 同上(`curve` 给已有曲线 handle) |
|
||||
@@ -104,7 +108,13 @@
|
||||
老虎窗单独 `add_aec_dormer_window`(`roof` handle + 位置/尺寸);组合门窗做成
|
||||
`group_aec_openings`(`openings`=已有门窗 handle 数组)。
|
||||
|
||||
### C. 附属构件 6 个
|
||||
### C. 附属构件:4 个 ✅ 已做(阳台/台阶/坡道/散水),保温不做,沟渠待做
|
||||
|
||||
> `add/update_aec_balcony`、`add/update_aec_xstep`、`add/update_aec_ascent`、`add/update_aec_apron`
|
||||
> 已完成并实测(见上表)。共用 `BuildWallPath`(把点投影到墙中心线再采样成多段线)。
|
||||
> 剩下 **`PL_LSJM` 沟渠**:断面由 `CHZGQDlg::GetSection()` 现算 region,要先把那段构造逻辑搬出来。
|
||||
|
||||
原始调查记录:
|
||||
|
||||
| 命令 | 4字名 | 实体 | handler | 对话框 | 说明 |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
@@ -162,7 +172,8 @@
|
||||
1. ~~楼梯族 8 个~~ ✅ 已完成
|
||||
2. ~~普通门窗 `AecDbXOpening`~~ ✅ 已完成(`add/update_aec_window`);
|
||||
组合门窗/带形窗/转角窗/老虎窗**挂起**。
|
||||
3. **附属构件 5 个**(保温不做):阳台/台阶/坡道/散水/沟渠,测试前要先造母实体(墙/屋顶)。
|
||||
3. **附属构件**:阳台/台阶/坡道/散水 ✅ 已完成;剩 **沟渠 PL_LSJM**(断面 region + 路径,
|
||||
要搬 `CHZGQDlg::GetSection` 的逻辑);保温按拍板不做。
|
||||
4. **标注 8 个**:先摸 `AecDbEwPipeDim` 的创建接口。
|
||||
5. **补齐已有楼梯的 update 精细字段**:钢梯/双跑/直线/圆弧目前只暴露了关键项,
|
||||
按总原则要补到对话框字段级别。
|
||||
|
||||
+46
-18
@@ -19,8 +19,9 @@ SourceCode/Code2026/cad_mcp_aec/
|
||||
├── aec_mcp_roof_tools.cpp 屋顶:add/update_aec_roof(一个工具 + style,4 种样式,2 个)
|
||||
├── aec_mcp_sfp_stair_tools.cpp 双分/双平行家族楼梯:add/update_aec_sfp_stair(一个工具 + kind,7 种,2 个)
|
||||
├── aec_mcp_window_tools.cpp 普通门窗:add/update_aec_window(AecDbXOpening,2 个)
|
||||
├── aec_mcp_attachment_tools.cpp 附属构件:阳台/台阶/坡道/散水(各 add+update,8 个)
|
||||
├── aec_mcp_query.cpp query_aec_entities / get_aec_entity_detail(2 个)
|
||||
└── mcp_config.json 运行期配置(69 个工具:26 个 cad_mcp_plugins + 41 个本插件 + 2 个 lisp_inline)
|
||||
└── mcp_config.json 运行期配置(77 个工具:26 个 cad_mcp_plugins + 49 个本插件 + 2 个 lisp_inline)
|
||||
```
|
||||
|
||||
顶层 `cmakelists.txt` 里挂在 `cad_mcp_frame` 同一处:
|
||||
@@ -49,7 +50,7 @@ if (IS_ZWCAD OR CAD_SDK_VERSION GREATER_EQUAL 20)
|
||||
插件的头文件里必须保持默认的 `dllimport`。`cad_mcp_plugins` 里定义了它们,
|
||||
那是因为它不使用这些类;本插件用了,定义了就变成"导出自己没有的符号"。
|
||||
|
||||
## 3. 工具清单(本插件 41 个;`mcp_config.json` 合计 69 个)
|
||||
## 3. 工具清单(本插件 49 个;`mcp_config.json` 合计 77 个)
|
||||
|
||||
工具名和参数都按仓库既有工具的写法(`add_line` / `query_entities` / `get_entity_detail`):
|
||||
**动词_名词、点用 `[x,y]` 或 `[x,y,z]` 数组、颜色用 `color`(ACI,256=ByLayer)**。
|
||||
@@ -84,6 +85,10 @@ if (IS_ZWCAD OR CAD_SDK_VERSION GREATER_EQUAL 20)
|
||||
| `add_aec_z_stair` / `update_aec_z_stair` | 建/改双跑楼梯(`AecDbZLineStair`,`PL_SPLT`) | `start`+`direction_point`、`steep_height`/`steep_width`/`steep_count1`/`steep_count2`、`total_width`/`run_width`/`well_width`、`rest_platform_width`/`platform_thickness`、`bar_height`/`bar_space`、`up_side_right`、`bottom_elevation`、`material`/`rail_material` |
|
||||
| `add_aec_line_seg_stair` / `update_aec_line_seg_stair` | 建/改直线楼梯(`AecDbLineSegStair`,`PL_ZXLT`,钢筋混凝土) | `start`+`direction_point`、`width`、`steep_height`/`steep_width`/`steep_count`、`side_width`/`side_thickness`、`with_rail`/`in_slab_3d`、`material`/`factory`/`no` |
|
||||
| `add_aec_arc_stair` / `update_aec_arc_stair` | 建/改圆弧楼梯(`AecDbArcStair`,`PL_YHLT`) | 中心线 `curve`(ARC handle) 或 `center`+`radius`+`start_angle`/`end_angle`;`width`、`steep_*`、`side_*`、`diameter`/`top_height`、`start_at_bottom`、`material`/`factory`/`no` |
|
||||
| `add_aec_balcony` / `update_aec_balcony` | 建/改阳台(`AecDbBalcony`,`PL_FZYT`):墙 handle + 沿墙起止点 + 外侧点 + 挑出宽/栏杆高/板厚/梁尺寸 | `wall`/`start`/`end`/`side_point`、`width`/`rail_height`/`slab_thickness`/`girder_thickness`/`beam_*`/`bottom_elevation`/`material`/`factory`/`no` |
|
||||
| `add_aec_xstep` / `update_aec_xstep` | 建/改台阶(`AecDbXStep`,`PL_FZTJ`):墙 handle + 沿墙起止点 + 外侧点 | `wall`/`start`/`end`/`side_point`、`width`/`steep_width`/`steep_height`/`steep_count`/`base_width`/`base_align`/`step_style`/`struct_style`/`bottom_elevation` |
|
||||
| `add_aec_ascent` / `update_aec_ascent` | 建/改坡道(`AecDbAscent`,`PL_FZPD`):起点+终点 | `start`/`end`、`run_length`/`rise`/`width`/`side_width`/`top_elevation`/`align_left`/`align_right`/`nonslip` |
|
||||
| `add_aec_apron` / `update_aec_apron` | 建/改散水(`AecDbXApron`,`PL_FZSS`):走向 `points` | `points`、`width`/`inside_thickness`/`outside_thickness`/`offset_from_wall`/`elevation` |
|
||||
| `add_aec_window` / `update_aec_window` | 建/改普通门窗(`AecDbXOpening`,`PL_QTCC` 等"插入门窗"):给墙 handle + 定位点(自动投影到墙中心线)+ 门窗块 + 宽高窗台高,内部扣墙的 2D 洞口并挂到墙的关联件 | `wall`、`position`、`block`/`block_3d`、`type`(window/door)、`width`/`height`/`sill_height`/`thickness`、`no`/`name`/`material`/`factory` |
|
||||
| `add_aec_sfp_stair` / `update_aec_sfp_stair` | 建/改双分·双平行家族楼梯(`SFPXStair` 一套数据,7 种实体 + `kind`):双平行/双分转角/双分三跑/交叉/剪刀/三角/矩形转角 | `kind`、`start`+`direction_point`、`height`/`steep_*`/`total_width`/`run_width`/`mid_run_width`/`well_width`/`rest_platform_width`/`platform_thickness`、扶手栏杆开关与高度、`material`/`rail_material`;update 另收边梯/中梯/剖切步数、内外边梁、上梯位置、踏步取齐、层显示、平台形状、加强筋、扶手/栏杆截面与伸出、双分系列的对称与 1~4 跑跑数跑宽 |
|
||||
| `add_aec_roof` / `update_aec_roof` | 建/改屋顶(`AecDbXRoof`,`PL_RYPD`/`PL_RZPD`/`PL_ZJPD`/`PL_JXPD`),一个工具 + `style` | `style`(slope/dual/cusp/mount)、`points`、`ridge_start`/`ridge_end`、`left_angle`/`right_angle`、`center`/`radius`/`side_count`、`location`、`roof_height`、`slope_angle`/`mount_height`/`mount_length`、`elevation`/`bottom_elevation`、`eaves_length`、`slab_thickness`、`material`/`factory` |
|
||||
@@ -152,7 +157,7 @@ MCP 工具是通过 `PostMessage` 在主线程的消息里跑的,**不在命
|
||||
## 5. 端到端实测(AutoCAD 2020 / R230 Debug)
|
||||
|
||||
做法:把仓库里的 `mcp_config.json` 拷到部署目录,用 `/b` 脚本加载 `cad_mcp_frame.arx`,
|
||||
然后用裸 socket 打 JSON-RPC。`tools/list` 现在返回 **69** 个工具(本插件 41 个),
|
||||
然后用裸 socket 打 JSON-RPC。`tools/list` 现在返回 **77** 个工具(本插件 49 个),
|
||||
`%TEMP%\mcp_plugin_load.log` 里每个工厂都是 `[try ] ... create=... destroy=...` 成功。
|
||||
|
||||
**第一轮(只有 12 个工具时)的建/改实测**(仍然有效):
|
||||
@@ -171,11 +176,11 @@ MCP 工具是通过 `PostMessage` 在主线程的消息里跑的,**不在命
|
||||
| 类型不匹配 | ✅ `update_aec_wall` 传板的 handle → `-32004`「实体是 XSlab,不是 AecDbXWall」 |
|
||||
| 不存在的 handle | ✅ `-32002` |
|
||||
|
||||
导出表:41 个工厂(`aec_mcp_entity_tools.cpp` 18 + `aec_mcp_stair_tools.cpp` 10 +
|
||||
`aec_mcp_shape_tools.cpp` 5 + `aec_mcp_roof_tools.cpp` 2 + `aec_mcp_sfp_stair_tools.cpp` 2 +
|
||||
`aec_mcp_window_tools.cpp` 2 + `aec_mcp_query.cpp` 2)+ `Destroy_*` + `g_mcpPluginApiVersion`,
|
||||
与 `mcp_config.json` 里 `dll_name=cad_mcp_aec.dll` 的 41 条一一对应
|
||||
(少一条 backend 就不会被注册,见 §6)。
|
||||
导出表:49 个工厂(`aec_mcp_entity_tools.cpp` 18 + `aec_mcp_stair_tools.cpp` 10 +
|
||||
`aec_mcp_shape_tools.cpp` 5 + `aec_mcp_attachment_tools.cpp` 8 + `aec_mcp_roof_tools.cpp` 2 +
|
||||
`aec_mcp_sfp_stair_tools.cpp` 2 + `aec_mcp_window_tools.cpp` 2 + `aec_mcp_query.cpp` 2)+
|
||||
`Destroy_*` + `g_mcpPluginApiVersion`,与 `mcp_config.json` 里 `dll_name=cad_mcp_aec.dll`
|
||||
的 49 条一一对应(少一条 backend 就不会被注册,见 §6)。
|
||||
|
||||
**后续各轮补的东西(都在 R230 Debug + pcf_1.dwg / 空图上实测过)**:
|
||||
|
||||
@@ -215,8 +220,8 @@ MCP 工具是通过 `PostMessage` 在主线程的消息里跑的,**不在命
|
||||
`cad-mcp-frame.json`),重启 CAD。
|
||||
|
||||
注意:`set_debug_post_build()` 只拷构建产物,**配置文件不自动部署**,需要手工拷一次。
|
||||
仓库里这份 `mcp_config.json` 是"26 个 `cad_mcp_plugins` + 41 个本插件 + 2 个 `lisp_inline`"
|
||||
= 69 的合集,拷过去就等于全量替换。
|
||||
仓库里这份 `mcp_config.json` 是"26 个 `cad_mcp_plugins` + 49 个本插件 + 2 个 `lisp_inline`"
|
||||
= 77 的合集,拷过去就等于全量替换。
|
||||
|
||||
**每条工具都必须有 `backend`**(`{"type":"c++_dll","dll_name":"cad_mcp_aec.dll",
|
||||
"factory_function":"AddAecShapeTool"}`):只写 `name`/`description`/`inputSchema`
|
||||
@@ -234,9 +239,9 @@ MCP 工具是通过 `PostMessage` 在主线程的消息里跑的,**不在命
|
||||
- 造型里只有 7 种基本体能 `update_aec_shape`;曲线类(loft/extrude/revolve/sweep/cut/weir)
|
||||
的截面/路径没存在实体里,要改只能删了重建。
|
||||
- 没有事务/撤销包装:调用即改库。批量改图建议先 `query_aec_entities` 拿 handle,再逐条 `update`。
|
||||
- `mcp_config.json` 里的 69 个工具现在都能加载(`tools/list` = 69)。
|
||||
其中 26 个属于 `cad_mcp_plugins`(含从 CadProject 合并过来的批注/编辑类工具),
|
||||
41 个属于本插件,2 个是 lisp_inline。
|
||||
- `mcp_config.json` 里的 77 个工具现在都能加载(`tools/list` = 77)。
|
||||
其中 26 个属于 `cad_mcp_plugins`(含从 CadProject 合并过来的批量注/编辑类工具),
|
||||
49 个属于本插件,2 个是 lisp_inline。
|
||||
移植那批工具时踩到两个本仓库差异(已修,见那次提交):
|
||||
1. 上游 `dll` 的写库工具没有文档锁,在本仓库的运行方式下会返回
|
||||
`cannot open target space for write`(`eLockViolation`)—— 补了 `dwg_annotate::DocLock`;
|
||||
@@ -293,11 +298,11 @@ MCP 工具是通过 `PostMessage` 在主线程的消息里跑的,**不在命
|
||||
|PL_DXCH|带形窗户|AecDbZLineXOpening|(未实现)||
|
||||
|PL_ZJCH|转角窗户|AecDbZLineXOpening|(未实现)||
|
||||
|PL_JLHC|加老虎窗|AecDbXDormerWindow|(未实现)||
|
||||
|PL_JBWC|加保温层|AecDbInsulation|(未实现)||
|
||||
|PL_FZYT|放置阳台|AecDbBalcony|(未实现)||
|
||||
|PL_FZTJ|放置台阶|AecDbXStep|(未实现)||
|
||||
|PL_FZPD|放置坡道|AecDbAscent|(未实现)||
|
||||
|PL_FZSS|放置散水|AecDbXApron|(未实现)||
|
||||
|PL_JBWC|加保温层|AecDbInsulation|(不做:作者拍板)||
|
||||
|PL_FZYT|放置阳台|AecDbBalcony|add_aec_balcony|update_aec_balcony|
|
||||
|PL_FZTJ|放置台阶|AecDbXStep|add_aec_xstep|update_aec_xstep|
|
||||
|PL_FZPD|放置坡道|AecDbAscent|add_aec_ascent|update_aec_ascent|
|
||||
|PL_FZSS|放置散水|AecDbXApron|add_aec_apron|update_aec_apron|
|
||||
|PL_FZHN|放置护栏|AecDbGuardBar|add_aec_guard_bar|update_aec_guard_bar|
|
||||
|PL_QXHN|<-曲线护栏|AecDbGuardBar|add_aec_guard_bar(curve=已有曲线)|update_aec_guard_bar|
|
||||
|PL_JFZJ|添加方井|AecDbX3dPartEntity|add_aec_well|update_aec_well|
|
||||
@@ -839,3 +844,26 @@ pOpen->GetStandardDraw2d(win2d, false); // 2D 表示,用来扣墙
|
||||
插 C1518(1500×1800、窗台 900)→ 返回 handle `316`,`params` 里 thickness 自动取 240、
|
||||
bottom_elevation = 900;`update_aec_window` 改 1800×2100/窗台 600/编号 C1821/厂家 后回读正确;
|
||||
再插一个门(1000×2100、窗台 0)→ handle `317`。
|
||||
|
||||
**第五批:附属构件(阳台 / 台阶 / 坡道 / 散水;保温层不做)**
|
||||
|
||||
四个命令里,阳台/台阶都要先"沿墙取一段路径",命令用的是交互版 `GetPathOnWall`
|
||||
(两点 + 选墙 + 点一下确认墙侧方向,内部还要把多段墙的基线拼起来)。工具里做了等价但更简单的版本:
|
||||
`BuildWallPath(wall, start, end, side_point)` —— 把 start/end 投影到墙中心线,按距离采样成多段线
|
||||
(直墙就是两点),`vtDir` 取中点法向、朝向 `side_point` 那一侧。
|
||||
|
||||
| 命令 | 实体 | 关键点 |
|
||||
| --- | --- | --- |
|
||||
| `PL_FZYT` 阳台 | `AecDbBalcony` | `SetBalconyData` + `SetBaseCurve(path)` + `KEY_StartDir`;底标高 += 墙底、挑出宽 += 半墙厚(命令里的两步) |
|
||||
| `PL_FZTJ` 台阶 | `AecDbXStep` | `SetXStepData` + `SetBaseCurve(path)`;底标高 += 墙底 |
|
||||
| `PL_FZPD` 坡道 | `AecDbAscent` | 只要两点:`SetAscentData` + `SetBaseCurve(pt,pt)` |
|
||||
| `PL_FZSS` 散水 | `AecDbXApron` | 命令用 jig 画闭合多段线,工具直接给 `points`;`SetSection(10,10,0)` 占位 + `SetConstantWidth/InsideThick/OutSideThick/OffsetFromWall` + `KEY_BOMEL` |
|
||||
| `PL_JBWC` 加保温层 | `AecDbInsulation` | **不做**(作者拍板) |
|
||||
|
||||
**实测**(R230 Debug,空图,先造一面 10000×3000 厚 240 的墙当母体):
|
||||
台阶(沿墙 2000~4000、朝 −Y、4 级)→ handle `312`,bbox 2000~4000 × −2950~−50;
|
||||
坡道(6000,0 → 6000,−3000)→ `319`;散水(沿墙外 500、宽 600)→ `31A`;
|
||||
三者的 update(台阶 5 级/平台 2500、坡道防滑条+翻边 400、散水宽 800)都回读正确。
|
||||
|
||||
还没做:**沟渠 `PL_LSJM`**(`AecDbEwPipeBase`)—— 断面由 `CHZGQDlg::GetSection()` 从
|
||||
宽/高/坡度角/壁厚现算一个 region,再沿 jig 路径扫;要先把 `GetSection` 的构造逻辑搬出来。
|
||||
Reference in new issue
Block a user