spec-to-3d

spec-to-3d:基于建筑规范、解析的图纸或建筑规范数据生成 3D 建筑模型,并输出 Three.js 几何体、Pascal Editor JSON 或用于 IFC 转换的通用 JSON。适用于将平面图转换为 3D 模型、基于规范的数据生成建筑可视化或从结构化数据创建建筑模型的场景。

仓库最近推送
GitHub Stars
219
Forks
38
Issues / PRs
7

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "spec-to-3d":https://skillpi.com/zh/skills/deepskill-b62eb269125fcd78d9d60f47cdfeaeca702c1ab56a9862eae3d3c0b0ea8e6120。安装前核对上游来源和版本:https://github.com/TerminalSkills/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

spec-to-3d:基于建筑规范、解析的图纸或建筑规范数据生成 3D 建筑模型,并输出 Three.js 几何体、Pascal Editor JSON 或用于 IFC 转换的通用 JSON。适用于将平面图转换为 3D 模型、基于规范的数据生成建筑可视化或从结构化数据创建建筑模型的场景。

0 下载

介绍来源: third_party · TerminalSkills · 1.0.0 参考来源

SkillPi 解读

输入和输出
翻译待完成,请参阅来源文档。
软件、账号及付费要求
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: spec-to-3d
description: >-
  Generate 3D building models from architectural specifications, parsed drawings, or
  building code data. Outputs Three.js geometry, Pascal Editor JSON, or plain JSON for
  IFC conversion. Use when: converting floor plans to 3D, building spec-driven 3D models,
  generating architectural visualizations from structured data.
license: Apache-2.0
compatibility: "Node.js 18+, Three.js or Pascal Editor"
metadata:
  author: terminal-skills
  version: "1.0.0"
  category: design
  tags: [3d-modeling, architecture, three-js, ifc, building-generation]

Spec to 3D -- Building Model Generator

Overview

Convert structured architectural data (from architectural-drawing-parser or manual specs) into 3D building models. Supports three output formats: Three.js (interactive web viewer), Pascal Editor JSON (BIM-style node graph), and plain JSON (for IFC/GLB conversion). Works as the final stage in a drawing-to-3D pipeline alongside architectural-drawing-parser and ibc-building-codes.

Instructions

Pipeline

Architectural Drawing (image/PDF)
        |  architectural-drawing-parser
Structured BuildingData JSON
        |  ibc-building-codes (validation)
Validated Building Data
        |  spec-to-3d (THIS SKILL)
3D Model Output:
  - Three.js Group (web viewer)
  - Pascal Editor JSON (BIM node graph)
  - Building3D JSON (for IFC/GLB export)

Input Requirements

The generator expects a BuildingData object with:

  • stories -- { permitted, actual } (number of floors)
  • units -- Array of { name, area: { sqft, sqm }, occupantLoad } (unit types per floor)
  • height -- { permitted, actual } in feet and meters
  • occupancy and constructionType -- for IBC validation context

Generation Logic

  1. Floor-to-floor height: Default 9'-0" (2.74m) per IBC R-2 residential standard (7'-0" minimum habitable)
  2. Unit dimensions: Derived from area using 1:1.5 aspect ratio (width:depth). Override for corridor-loaded or deep units
  3. Wall thickness: 300mm exterior, 150mm interior partitions (US wood frame standard)
  4. Layout: Units placed side-by-side per floor with 150mm party walls, common corridor along one side (5'-0" / 1.52m wide)
  5. Stairs: Two stairwells at building ends, 4'-0" wide x 10'-0" deep
  6. Room subdivision: Automatic based on unit area -- studio (<50 sqm), 1-bed (50-70 sqm), 2-bed (>70 sqm)

Output Formats

Format Use Case Description
json (Building3D) IFC conversion, custom renderers Plain data: levels, units, rooms, walls, openings
pascal (Pascal Editor) BIM workflows Node graph with site > building > level > wall/room hierarchy
threejs (THREE.Group) Web-based 3D viewer Mesh geometry with materials for floors, walls, windows

Key Interfaces

interface Building3D {
  levels: Level3D[];
  totalHeight: number;       // meters
  footprintWidth: number;
  footprintDepth: number;
}

interface Level3D {
  elevation: number;         // meters above grade
  height: number;            // floor-to-floor in meters
  units: Unit3D[];
  corridors: Box3D[];
  stairs: Stair3D[];
}

interface Unit3D {
  type: string;
  position: { x: number; y: number; z: number };
  width: number; depth: number; height: number;  // meters
  rooms: Room3D[];
  walls: Wall3D[];
  openings: Opening3D[];
}

Examples

Example 1: Converting a Building Spec to a 3D Model

A developer has parsed data from an IBC compliance sheet for a 3-story R-2 apartment building and wants to generate a 3D model for visualization.

Input BuildingData:
  occupancy: R-2, constructionType: V-B, sprinklerSystem: NFPA 13
  stories: { permitted: 4, actual: 3 }
  units:
    - Type A: 834 SF (77.5 sqm), 5 occupants
    - Type B: 645 SF (59.9 sqm), 4 occupants

Generated Building3D (format: "json"):
  Level 0 (Ground Floor): elevation 0.00m, height 2.74m
    Type A: 7.19m wide x 10.78m deep (2-bedroom layout: living, kitchen, master bed, bed 2, 2 baths)
    Type B: 6.32m wide x 9.48m deep (1-bedroom layout: living, kitchen, bedroom, bath)
    Corridor: full building width x 1.52m deep
    2 stairwells at building ends

  Level 1: elevation 2.74m, height 2.74m (same layout)
  Level 2: elevation 5.49m, height 2.74m (same layout, no stairs above)

  Total height: 8.23m
  Footprint: ~13.66m x 10.78m
  Wall count: 12 exterior + 8 interior per floor
  Openings: 1 door + 2 windows per unit

Example 2: Generating IFC-Compatible Output

An architect needs to export the building data for use in an IFC/BIM workflow. They generate Pascal Editor JSON that maps to a site > building > level > element hierarchy.

Input: Same 3-story R-2 building as Example 1
Output format: "pascal"

Generated Pascal Editor JSON:
{
  "nodes": {
    "site_1700000000": { "type": "site", "parentId": null },
    "building_1700000000": { "type": "building", "parentId": "site_...", "width": 13.66, "depth": 10.78, "height": 8.23 },
    "level_0": { "type": "level", "name": "Ground Floor", "elevation": 0.00, "height": 2.74 },
    "level_1": { "type": "level", "name": "Level 1", "elevation": 2.74, "height": 2.74 },
    "level_2": { "type": "level", "name": "Level 2", "elevation": 5.49, "height": 2.74 },
    "wall_0_0": { "type": "wall", "parentId": "level_0", "start": { "x": 0, "y": 0 }, "end": { "x": 7.19, "y": 0 }, "thickness": 0.30, "isExterior": true },
    "room_0_0": { "type": "room", "parentId": "level_0", "name": "Living Room", "roomType": "living", "width": 4.31, "depth": 4.31 },
    ... (60+ nodes total across 3 levels)
  },
  "rootNodeIds": ["site_1700000000"]
}

This JSON imports directly into Pascal Editor or can be converted to IFC using ifcopenshell.

Guidelines

  • Floor-to-floor height defaults to 9'-0" (2.74m); override if the source drawing specifies otherwise
  • Unit aspect ratio defaults to 1:1.5; corridor-loaded or deep units may need 1:2 or higher
  • Window and door positions are generated algorithmically; use architectural-drawing-parser room extraction for actual positions from drawings
  • The Three.js output creates simple box geometry -- suitable for massing models and spatial validation, not photorealistic rendering
  • For production BIM use, export to Pascal Editor JSON and refine in a BIM tool
  • Stair geometry is simplified (box representation); detailed stair modeling requires a dedicated BIM tool
  • All dimensions are in meters internally; input data in feet is converted using 1 ft = 0.3048 m

当前收录版本

1.0.0

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值92/100

亮点

  • 解决建筑规范到3D模型转换的核心痛点
  • 适用于建筑可视化、BIM工作流等明确场景
  • 支持多种输出格式满足不同需求
触发精准88/100

亮点

  • 触发词精准完整,覆盖多种变体
  • 边界清晰,不易误触
结构规范95/100

亮点

  • Phase/步骤清晰,有出口条件
  • 含端到端示例,frontmatter完整
  • 单文件≤500行,结构良好
执行可靠90/100

亮点

  • 工具来源明确,参数正确
  • 覆盖主要异常,不可逆操作有确认机制
证据可验 (前四项均值)91/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

翻译待完成,请参阅来源文档。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。