Skip to main content
Glama
architectural_modeling_workflow

architectural_modeling_workflow

by Lsc1123

建筑建模工作流 · Architectural Modeling Workflow

用自然语言协作推进建筑方案:前期探索 → 选定方案 → 深入推敲 → 最终精修 → 出图交接。SketchUp 承担建筑主模型,Blender 在独立进程中制作和续改可编辑资产,MCP 负责实际执行、项目状态、核查与恢复。

v0.1.1 下载与更新说明 · English · 阶段与示例 · 工具协议 · 验证范围 · 许可证

能完成什么

  • 从任务书/场地开始,也能接续用户草模和手改;已有事实底表可作为唯一语义来源。

  • 创建原生墙板、带洞楼板及直梯,按宿主开洞、修复、变换、组合和赋材;特殊造型走受修订与范围约束的 Ruby 脚本。

  • Blender 独立创建/续改 .blend,保留部件、修改器和材质,生成 GLB、DAE、贴图与预览;另起进程重读,再在 SU 验证。

  • 对真实几何检查拓扑、实体碰撞、楼板面层/板厚、明确路径的净空与脚下实面、水平支承、声明的家具动作状态、实心防护和范围外变化。

  • 保存、真实关闭重开,导出原生面环/实例/材料/相机/场景/切面,冻结证据并交给出图工作流。

用户负责选案、重大空间变更和最终交接,阶段内常规建模、修复和检查由 AI 连续执行。具体已验证能力以 验证记录 为准。工具不能自动推断所有房间语义或任意生活动作,结构计算、施工深化及法规核定保持明确专业状态。

Related MCP server: RhinoMCP

安装(macOS 首发)

需要 Python 3.12、SketchUp 桌面版和 Blender。当前验收目标为 SketchUp 26.0.428 与 Blender 4.5.12;其他环境分别列验证状态。应用不随仓库分发。

git clone https://github.com/Lsc1123/architectural-modeling-workflow.git
cd architectural-modeling-workflow
python3.12 -m venv .venv
.venv/bin/python -m pip install --require-hashes -r requirements-lock.txt
.venv/bin/python -m pip install --no-deps -e .
.venv/bin/python scripts/package_release.py
  1. 在 SU 扩展程序管理器 → 安装扩展 中选择 dist/amw-sketchup-0.1.1.rbz;也可使用带备份的 scripts/install_sketchup.py。这是未签名的本地开发扩展,不要为它降低系统安全设置。

  2. 重启 SU,打开要接续的模型,选择 扩展 → AMW → Connect project 并选择项目工作目录。

  3. 添加 stdio 服务。下方解释器和工作目录须替换为本机实际路径:

codex mcp add architectural_modeling_workflow -- /absolute/repository/.venv/bin/python -m amw.cli serve --workspace /absolute/project

其他客户端运行 .venv/bin/amw config --workspace /absolute/project 可取得标准 mcpServers JSON。Blender 不在默认位置时加 --blender /absolute/Blender。

  1. 将 skills/architectural-modeling-workflow 安装到 agent 的技能目录,或在聊天中引用其中的 SKILL.md。

  2. 运行 .venv/bin/amw doctor --workspace /absolute/project,核对连接与活动文档。

MCP 服务不需要独立的 LLM API 密钥。可信 Ruby/Python 脚本拥有原生进程权限,目录检查和模型回滚不是系统安全沙盒。

自然语言使用

使用 architectural-modeling-workflow。先读任务书和场地,比较两个真正不同的剖面关系;我选定后再深入推敲。

接续当前草模,核对未保存修改、底表和实际标高。保留总体空间与手改,只精修入口门、落脚平台和相邻短梯,完成相关板、面层、围合、防护及通行核查。

在 Blender 独立文件中制作可续改的桌椅资产。记录尺寸、原点、朝向、安装基准和许可,导入 SU 后检查落地、拉椅和通道,最后保存重开。

已有项目直接从实际阶段进入。日常修改只走一次“现状与范围 → 修改 → 本体及邻接核查 → 必要写回 → 保存重读与显示核对 → 简短交付”;完整交接包留给明确交接。阶段模板和完整规则见 工作流 与技能目录。

恢复与证据

写操作携带 expected_revision 和唯一 operation_id;超时先查询同一次操作,不能换 ID 重复写入。版本冲突先保全手改。失败事务回滚,写前副本留在 .amw/backups/。Blender 输出用新修订路径,取消或失败的输出无效。

分别记录设计确认、几何、文件重读、原生编辑和显示;范围分为新查、凭真实依赖比较继承、失败和未查。所有写回后保存重读,再冻结证据。文件哈希只证明来源,局部通过不代表全屋。门洞须联查门内转身、门外站稳、梯口转向与脚下实面。

开发与案例

.venv/bin/python -m pytest -q
.venv/bin/python -m build
.venv/bin/python scripts/package_release.py
.venv/bin/python scripts/verify_release.py

src/amw/ 为状态、协议与几何检查;adapters/ 为软件适配;skills/ 为协作方法。真实软件测试在独立工作区显式运行,普通 CI 不启动用户应用。见 贡献说明。

Plan E Unified、Split 使用独立发布副本,完整模型及精选证据继续使用 v0.1.0 案例附件;案例保留未决项,不将历史“完成”声明当作验收。案例索引。原始聊天仅留本地。

核心/MCP/SU 为 MIT;调用 bpy 的部分为 GPL;原创模型/案例为 CC0,第三方资源保留原许可。见 许可映射。

Available Tools

41 tools
asset_buildB
Destructive

Create/continue an independent editable Blender asset. Supply asset_id, new blend/glb/dae/preview paths, parts or trusted script, anchor and license sources.

Inputs: operation_id (required), specification (required). Returns: object

asset_job_cancelB
Destructive

Cancel only this server-owned Blender worker group; incomplete outputs are invalid.

Inputs: operation_id (required). Returns: object

asset_job_statusB
Read-onlyIdempotent

Return durable worker status, Blender exit code and saved/reimport verification.

Inputs: operation_id (required). Returns: object

checks_runC
Destructive

Compute actual geometry checks. Inputs are IDs/contours/routes and project dimensions, not preset compliance rules.

Inputs: kind (required), parameters (required), report_path (required), geometry_path (required). Returns: object

decision_recordB

Record the actual user decision with a retrievable source; never invent user approval.

Inputs: kind (required), statement (required), user_source (required), expected_revision (required), +2 more. Returns: object

drawing_read_sliceC
Destructive

Read handoff geometry into a plan/section cut-segment draft; final drawing stays in the next workflow.

Inputs: normal (required), x_axis (required), origin_m (required), output_path (required), +2 more. Returns: object

evidence_inheritC
Destructive

Inherit only a check whose declared dependencies are actually unchanged and semantic basis is unchanged. Missing dependencies cannot be guessed.

Inputs: report_path (required), old_report_path (required), after_geometry_path (required), before_geometry_path (required). Returns: object

evidence_registerC

Read and bind a real scoped report and its current source files. Does not prove its assertions.

Inputs: report (required), expected_revision (required). Returns: object

get_capabilitiesA
Read-onlyIdempotent

Inspect actual software connection, units, stages and validation limits.

Inputs: no named parameters. Returns: object

handoff_exportB

Freeze a stage-approved handoff with source hashes, actual geometry and explicit unverified scope.

Inputs: destination (required), model_paths (required), geometry_path (required). Returns: object

native_job_cancelB
Destructive

Cancel a queued operation. Running native transactions finish atomically.

Inputs: operation_id (required). Returns: object

native_job_statusC
Read-onlyIdempotent

Resume the same native operation; never create a second write after a timeout.

Inputs: operation_id (required), wait_seconds. Returns: object

project_getA
Read-onlyIdempotent

Read current facts, decisions, checks, pending issues and revision.

Inputs: no named parameters. Returns: object

project_initC

Create one current fact record; existing projects are never overwritten.

Inputs: name (required), brief, stage, entry_evidence. Returns: object

project_updateC
Destructive

Update current regions/relations/models, retaining revision history. Dimensions use metres.

Inputs: reason (required), changes (required), expected_revision (required). Returns: object

sketchup_captureC
Destructive

Capture the actual current native view for visual review; an image is not a geometry certificate.

Inputs: path (required), width, height, zoom_extents. Returns: object

sketchup_combineB
Destructive

Union explicit solid instances; preserves actual cavities. Inputs are replaced transactionally.

Inputs: ids (required), name (required), operation_id (required), expected_revision (required). Returns: object

sketchup_createC

Create one editable native solid. Floor polygon Z is its structural bottom; choose finished-face conventions explicitly.

Inputs: name (required), shape (required), operation_id (required), expected_revision (required), +2 more. Returns: object

sketchup_deleteC
Destructive

Delete declared objects. Explain preserved/replaced enclosure, support and protection; recheck old openings and finishes.

Inputs: ids (required), operation_id (required), expected_revision (required), functional_reason (required), +1 more. Returns: object

sketchup_edit_contextA
Destructive

Enter a native instance editing path, or exit to the model when id is null. Finish any current GUI gesture before changing context; final save requires the root context.

Inputs: operation_id (required), expected_revision (required), id. Returns: object

sketchup_exportC
Destructive

Export actual world geometry, native face rings, UV, materials, instance paths and scenes.

Inputs: path. Returns: object

sketchup_groupC

Group explicit root-level sibling instances without boolean rebuilding their geometry/materials.

Inputs: ids (required), name (required), operation_id (required), expected_revision (required). Returns: object

sketchup_importB

Import a workspace asset through SketchUp's native importer; inspect units and editability afterwards.

Inputs: path (required), operation_id (required), expected_revision (required), asset_id, +2 more. Returns: object

sketchup_materialC
Destructive

Assign a local material without recoloring unrelated users of an existing material.

Inputs: ids (required), name (required), opacity (required), operation_id (required), +2 more. Returns: object

sketchup_newC
Destructive

Create a new saved workspace document only after preserving any current unsaved work.

Inputs: path (required), operation_id (required), expected_revision (required). Returns: object

sketchup_openB
Destructive

Open a saved workspace document; refuses to switch away from unsaved work.

Inputs: path (required), operation_id (required), expected_revision (required). Returns: object

sketchup_openingC
Destructive

Cut only specified actual hosts. Stores original hosts and post-state for guarded restoration.

Inputs: void (required), host_ids (required), operation_id (required), expected_revision (required). Returns: object

sketchup_probe_pushpullB
Destructive

Temporarily push/pull a real upward native face. Undo in a separate call and verify restoration before saving.

Inputs: id (required), distance_m (required), operation_id (required), expected_revision (required). Returns: object

sketchup_queryC
Read-onlyIdempotent

Find native instances and identities without dumping all geometry. Use IDs for editing.

Inputs: ids, limit, offset, name_contains. Returns: object

sketchup_reopenB
Destructive

Reopen a saved workspace model only when the native window has no unsaved edits, then export and compare.

Inputs: operation_id (required), expected_revision (required). Returns: object

sketchup_restore_openingC
Destructive

Restore recorded host geometry only if the post-cut host has not changed.

Inputs: opening_id (required), operation_id (required), expected_revision (required). Returns: object

sketchup_saveC
Destructive

Save the authoritative current document; another existing output is never overwritten.

Inputs: path (required), operation_id (required), expected_revision (required). Returns: object

sketchup_sceneC
Destructive

Select an existing scene or save one explicitly requested camera; does not create diagnostic scene clutter.

Inputs: operation_id (required), expected_revision (required), name, camera, +1 more. Returns: object

sketchup_scriptA
Destructive

Run trusted workspace Ruby inside a native transaction. Do not manage transactions or change documents/edit context in scripts. Declare existing geometry scopes, any new roots and scene names. This is code execution, not an OS sandbox.

Inputs: script (required), purpose (required), scope_ids (required), operation_id (required), +3 more. Returns: object

sketchup_stateB
Read-onlyIdempotent

Inspect actual document identity, unsaved changes, disk drift, scene and live revision.

Inputs: no named parameters. Returns: object

sketchup_transformC
Destructive

Apply a world-space column-major affine matrix once; translation is metres.

Inputs: ids (required), matrix (required), operation_id (required), expected_revision (required). Returns: object

sketchup_undoC
Destructive

Undo across a distinct native event-loop turn, then query/compare the result.

Inputs: operation_id (required), expected_revision (required). Returns: object

stage_advanceB
Destructive

Advance one stage only after evidence and design decision conditions are met.

Inputs: reason (required), target (required), expected_revision (required). Returns: object

stage_checkC
Read-onlyIdempotent

List stage conditions, stale evidence and required user decisions.

Inputs: target (required). Returns: object

stage_reopenC
Destructive

Return to an affected earlier stage without erasing facts or old evidence.

Inputs: reason (required), target (required), expected_revision (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.8/5.0

    Scored across 41 tools

    Disambiguation4/5

    Most tools target distinct resources and actions, with clear domain prefixes separating project, SketchUp, asset, evidence, and job operations. A few read/inspect/export tools overlap conceptually (project_get vs sketchup_state vs get_capabilities; sketchup_export vs handoff_export), but descriptions generally clarify boundaries.

    Naming Consistency4/5

    The set overwhelmingly follows a snake_case resource_action pattern (project_get, sketchup_create, stage_advance, evidence_register), which is predictable despite not being verb_noun. Occasional outliers like get_capabilities and mixed noun/verb phrasing keep it from a 5.

    Tool Count2/5

    The domain is broad and many tools are specialized, but 41 tools is heavy and exceeds a practical set size. Several low-level SketchUp operations and status/cancel pairs could likely be consolidated without losing capability.

    Completeness4/5

    The surface covers project lifecycle, stage gates, decisions, evidence, checks, SketchUp modeling/export/save, Blender asset jobs, and handoff. Minor gaps exist around asset inspection/listing and project deletion or archival, but core workflows appear well covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables LLMs to perform architectural spatial modeling through natural language, including creating, manipulating, and analyzing 3D building models using TopologicPy.
      22
      AGPL 3.0
    • A
      license
      C
      quality
      D
      maintenance
      Enables AI-driven 3D modeling, analysis, diagnostics, and Grasshopper integration within Rhino 3D through 90+ tools via the Model Context Protocol.
      105
      3
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables a shared 3D workspace where humans and AI agents co-design in real time, with scene awareness, goal-level tools, visible proposals, deterministic reviews, and approval-gated changes.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI-driven 3D modeling and scene creation in Blender, allowing LLMs to create, modify, and manipulate objects, materials, and assets through natural language.
      31
      MIT