SuperAPI AI 工具集

bonsai-impl-project

通用与其它

查看项目

更新于 10-16 08:50

技能介绍

用途:在 Blender 的 Bonsai(v0.8.x)与 IfcOpenShell(v0.8.x)环境中创建、打开和配置 IFC 项目,处理模式选择、单位、地理参照、表示上下文、所有者历史与文件读写。依赖 bonsai-core-architecture,模块路径为 bonsai.,不可使用已改名的 blenderbim.。

主要能力:按决策树选择 IFC2X3(遗留/政府合规)、IFC4(建筑默认)或 IFC4X3(基础设施);用 ifcopenshell.api.project.create_file() 创建项目并立即用 unit.assign_unit() 分配单位;创建 IfcSite/IfcBuilding/IfcBuildingStorey 空间层级;用 context.add_context() 建立 Model/Body 等表示上下文;用 georeference.add_georeferencing() 与 edit_georeferencing() 配置 EPSG 与 Eastings/Northings;编辑文件头元数据、设置人员/组织/应用,并可用 Migrator 做模式迁移。

使用方式:Blender 内可用 bpy.ops.bim.create_project(template="metric_m") 等模板,或 bpy.ops.bim.load_project(filepath=...) 打开、bpy.ops.bim.save_project() 保存;独立 Python 用 ifcopenshell.open() 与 model.write()。脚本须通过 blender --python 运行,不可从系统 Python 导入 bonsai.*。操作前检查 IfcStore.get_file() 是否为 None。

限制:不得直接用 ifcopenshell.file() 创建项目;无单位分配的文件无效;无测量数据时不要设置 Eastings/Northings;编辑地理参照前必须先 add_georeferencing();迁移后须用 IfcTester 验证。IFC2X3 无 IfcMapConversion/IfcProjectedCRS,改用 ePSet_MapConversion。具体价格、平台与效果资料暂未提供。