ifcos-core-runtime
Installation
SKILL.md
IfcOpenShell Python Runtime
Quick Reference
Critical Warnings
- ALWAYS use
==for entity comparison, NEVERis. Each query returns a new Python wrapper object. - ALWAYS set entity references to
Noneafter callingmodel.remove(). The C++ object is deallocated regardless of Python reference count. - ALWAYS keep a reference to the
ifcopenshell.fileobject alive while any entities from it are in use. If the file is garbage-collected, all entity wrappers become dangling pointers (segfault). - NEVER write to an
ifcopenshell.filefrom multiple threads. The C++ backend has no locking. Concurrent writes corrupt the model or crash. - NEVER iterate all entities and filter manually when
by_type()exists.by_type()uses an internal index and is 10-100x faster. - NEVER use
get_info(recursive=True)on large models. It materializes the entire entity graph into memory. - ALWAYS use named attribute access (
wall.Name) instead of positional index access (wall[2]). Positional indices vary by entity type and schema version. - ALWAYS check
model.schemabefore accessing schema-specific attributes.
Decision Tree: Entity Reference Safety
Working with entity references?
Related skills
More from openaec-foundation/blender-bonsai-ifcopenshell-sverchok-claude-skill-package
blender-syntax-materials
>
3blender-core-gpu
>
3blender-agents-code-validator
>
3blender-syntax-panels
>
3blender-errors-data
>
3blender-syntax-data
Covers Blender data management including collections, library overrides, asset system, linked libraries, BlendDataLibraries, data block creation and removal, fake users, and data transfer between files. Activates when managing Blender collections, linking/appending data, working with library overrides, or using the asset system.
3