/blender-bim-sverchok:ifcos-impl-validationfrom Blender por código, BIM (Bonsai e IfcOpenShell) y Sverchok
Use when validating IFC files for schema compliance, IDS conformance, or custom quality rules. Prevents the common mistake of only checking schema validity without verifying property set completeness or spatial hierarchy correctness. Covers ifcopenshell.validate, ifctester for IDS validation, georeference validation, and custom validation pipelines. Keywords: validation, IDS, ifctester, ifcopenshell.validate, schema compliance, quality assurance, property set check, spatial hierarchy check, IFC validation, check model quality, find missing properties.
Ships in Blender por código, BIM (Bonsai e IfcOpenShell) y Sverchok. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
ifcopenshell.validate.validate() with basic mode first (default express_rules=False). NEVER enable EXPRESS WHERE rules on a first pass — they are 10-100x slower on large models.logging.Logger instance to validate(). The function logs results; it does NOT return them.validate() completes without raising an exception. Validation issues are logged, not raised. Use LogDetectionHandler or json_logger to detect issues programmatically.ifctester for IDS (Information Delivery Specification) validation. ifcopenshell.validate checks schema compliance only — it does NOT check project-specific requirements.add_georeferencing before edit_georeferencing. The IfcMapConversion and IfcProjectedCRS entities MUST exist before editing.IfcMapConversionScaled in IFC4 models. The scaled variant is only available in IFC4X3.model.schema before applying version-specific validation logic. Georeferencing differs between IFC2X3 (property sets) and IFC4+ (dedicated entities).What are you validating?
├── IFC file structure and schema compliance?
│ ├── Basic type/attribute checking?
│ │ └── ifcopenshell.validate.validate(model, logger)
│ ├── Full EXPRESS WHERE rules?
│ │ └── ifcopenshell.validate.validate(model, logger, express_rules=True)
│ ├── GUID format only?
│ │ └── ifcopenshell.validate.validate_guid(guid_string)
│ └── File header only?
│ └── ifcopenshell.validate.validate_ifc_header(model, logger)
│
├── Project information requirements (IDS)?
│ ├── Load IDS specification?
│ │ └── ifctester.open("spec.ids")
│ ├── Validate IFC against IDS?
│ │ └── ids.validate(ifc_file)
│ └── Generate validation report?
│ ├── Console → ifctester.reporter.Console(ids)
│ ├── JSON → ifctester.reporter.Json(ids)
│ ├── HTML → ifctester.reporter.Html(ids)
│ ├── BCF → ifctester.reporter.Bcf(ids)
│ └── ODS → ifctester.reporter.Ods(ids)
│
├── Georeferencing correctness?
│ ├── IFC2X3 → Check property sets on IfcProject
│ ├── IFC4 → Check IfcMapConversion + IfcProjectedCRS entities
│ └── IFC4X3 → Check IfcMapConversion or IfcMapConversionScaled
│
└── Custom business rules?
└── Write Python functions using ifcopenshell entity traversal
(see Custom Validation Rules section)
# IfcOpenShell: all schema versions
import ifcopenshell
import ifcopenshell.validate
import logging
model = ifcopenshell.open("building.ifc")
# Set up logger to capture validation output
logger = logging.getLogger("ifcopenshell.validate")
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler()
handler.setFormatter(logging.Formatter("%(levelname)s: %(message)s"))
logger.addHandler(handler)
# Run basic validation (no EXPRESS WHERE rules)
ifcopenshell.validate.validate(model, logger)
# IfcOpenShell: all schema versions
import ifcopenshell
import ifcopenshell.validate
model = ifcopenshell.open("building.ifc")
# Use json_logger for structured, programmatic access to results
json_log = ifcopenshell.validate.json_logger()
ifcopenshell.validate.validate(model, json_log)
# Iterate validation results
for statement in json_log.statements:
print(f"Level: {statement['level']}, Message: {statement['message']}")
# Check if any issues were found
if json_log.statements:
print(f"Total issues: {len(json_log.statements)}")
else:
print("Model is valid")
# IfcOpenShell: all schema versions
import ifcopenshell
import ifcopenshell.validate
import logging
model = ifcopenshell.open("building.ifc")
logger = logging.getLogger("ifcopenshell.validate")
logger.setLevel(logging.WARNING)
# Add detection handler to check if ANY issues exist
detection_handler = ifcopenshell.validate.LogDetectionHandler()
logger.addHandler(detection_handler)
ifcopenshell.validate.validate(model, logger)
if detection_handler.message_logged:
print("FAIL: Validation issues found")
else:
print("PASS: Model is valid")
# IfcOpenShell: all schema versions
import ifcopenshell
import ifctester
import ifctester.ids
import ifctester.reporter
# Step 1: Load the IDS specification
ids = ifctester.open("requirements.ids")
# Step 2: Load the IFC file
ifc_file = ifcopenshell.open("building.ifc")
# Step 3: Validate IFC against IDS
ids.validate(ifc_file)
# Step 4: Report results
reporter = ifctester.reporter.Console(ids)
reporter.report()
# Or generate HTML report
html_reporter = ifctester.reporter.Html(ids)
html_reporter.report()
html_reporter.to_file("validation_report.html")
# IfcOpenShell: IFC4 / IFC4X3
import ifcopenshell
model = ifcopenshell.open("building.ifc")
# Check schema version for georeferencing method
if model.schema == "IFC2X3":
# IFC2X3: Georeferencing stored as property sets on IfcProject
project = model.by_type("IfcProject")[0]
# Check for ePSet_MapConversion and ePSet_ProjectedCRS property sets
psets = ifcopenshell.util.element.get_psets(project)
has_georef = "ePSet_MapConversion" in psets
else:
# IFC4 / IFC4X3: Dedicated entities
map_conversions = model.by_type("IfcMapConversion")
projected_crs = model.by_type("IfcProjectedCRS")
has_georef = len(map_conversions) > 0 and len(projected_crs) > 0
if model.schema == "IFC4X3":
# Also check for IfcMapConversionScaled (IFC4X3 only)
scaled = model.by_type("IfcMapConversionScaled")
has_georef = has_georef or len(scaled) > 0
if has_georef:
print("Georeferencing is present")
else:
print("WARNING: No georeferencing found")
IDS is a buildingSMART standard (ISO 7817-3) that defines machine-readable information requirements for IFC models. An IDS file specifies:
| Facet | Purpose | Example |
|---|---|---|
Entity | Filter by IFC class and predefined type | All IfcWall with PredefinedType=SOLIDWALL |
Attribute | Check entity attribute values | Name must match pattern "W-*" |
Classification | Check classification references | Must have Uniclass 2015 reference |
Property | Check property set values | Pset_WallCommon.FireRating must exist |
Material | Check material assignments | Must have material assigned |
PartOf | Check spatial/aggregation relationships | Must be contained in IfcBuildingStorey |
# IfcOpenShell: all schema versions
import ifctester.ids
# Create new IDS document
ids = ifctester.ids.Ids(
title="Project Requirements",
description="Minimum information requirements for structural review",
author="QA Team",
version="1.0"
)
# Create a specification: All walls must have fire rating
spec = ifctester.ids.Specification(
name="Wall Fire Rating Required",
ifcVersion=["IFC4"],
description="All load-bearing walls must declare fire rating"
)
# Add to IDS
ids.specifications_.append(spec)
# Export to IDS XML
ids.to_xml("project_requirements.ids")
| Reporter | Output | Use Case |
|---|---|---|
Console | Terminal text with color | Quick interactive checks |
Json | Structured JSON data | CI/CD pipelines, API integration |
Html | Formatted HTML page | Stakeholder reports |
Bcf | BCF issue file | BIM coordination (links to model elements) |
Ods | Spreadsheet (ODS) | Data analysis, Excel-compatible review |
Txt | Plain text | Log files, archival |
| Feature | IFC2X3 | IFC4 | IFC4X3 |
|---|---|---|---|
| Map conversion | Property set on IfcProject | IfcMapConversion entity | IfcMapConversion or IfcMapConversionScaled |
| CRS definition | Property set | IfcProjectedCRS entity | IfcProjectedCRS entity |
| MapUnit attribute | String (full unit name) | IfcNamedUnit object | IfcNamedUnit object |
| Removal method | Remove property sets | Remove entities | Remove entities |
| API support | Manual property sets | georeference.* API | georeference.* API |
| Function | Purpose |
|---|---|
georeference.add_georeferencing | Create empty IfcMapConversion + IfcProjectedCRS |
georeference.edit_georeferencing | Set coordinate operation and CRS parameters |
georeference.edit_true_north | Set true north orientation (degrees or vector) |
georeference.edit_wcs | Adjust world coordinate system origin |
georeference.remove_georeferencing | Remove all georeferencing data |
XAxisAbscissa/XAxisOrdinate in the coordinate operation define Project North rotation. True North is set separately via edit_true_north.IfcMapConversionScaled in IFC4 models. It exists only in IFC4X3."EPSG:XXXXX" for the CRS Name attribute.# IfcOpenShell: all schema versions
import ifcopenshell
import ifcopenshell.util.element
def validate_required_psets(model, ifc_class, required_psets):
"""Validate that all entities of a type have required property sets."""
errors = []
elements = model.by_type(ifc_class)
for element in elements:
psets = ifcopenshell.util.element.get_psets(element)
for pset_name, required_props in required_psets.items():
if pset_name not in psets:
errors.append(f"#{element.id()} {element.Name}: Missing {pset_name}")
continue
for prop in required_props:
if prop not in psets[pset_name]:
errors.append(
f"#{element.id()} {element.Name}: "
f"Missing {pset_name}.{prop}"
)
return errors
# Usage
model = ifcopenshell.open("building.ifc")
errors = validate_required_psets(model, "IfcWall", {
"Pset_WallCommon": ["IsExternal", "LoadBearing", "FireRating"],
})
for error in errors:
print(f"ERROR: {error}")
# IfcOpenShell: all schema versions
import ifcopenshell
import ifcopenshell.util.element
def validate_spatial_containment(model):
"""Check that all physical elements are spatially contained."""
errors = []
for element in model.by_type("IfcElement"):
container = ifcopenshell.util.element.get_container(element)
if container is None:
errors.append(
f"#{element.id()} {element.is_a()} '{element.Name}': "
f"Not contained in any spatial element"
)
return errors
# IfcOpenShell: all schema versions
import ifcopenshell
import ifcopenshell.validate
import ifctester
import ifctester.reporter
import logging
import sys
def run_validation_pipeline(ifc_path, ids_path=None):
"""Run complete validation pipeline: schema + IDS + custom rules."""
results = {"schema": None, "ids": None, "custom": []}
# Phase 1: Schema validation
model = ifcopenshell.open(ifc_path)
json_log = ifcopenshell.validate.json_logger()
ifcopenshell.validate.validate(model, json_log)
results["schema"] = {
"passed": len(json_log.statements) == 0,
"issues": len(json_log.statements),
"details": json_log.statements
}
# Phase 2: IDS validation (if specification provided)
if ids_path:
ids = ifctester.open(ids_path)
ids.validate(model)
json_reporter = ifctester.reporter.Json(ids)
json_reporter.report()
results["ids"] = json_reporter.to_string()
# Phase 3: Custom rules
for element in model.by_type("IfcElement"):
container = ifcopenshell.util.element.get_container(element)
if container is None:
results["custom"].append(
f"#{element.id()} {element.is_a()}: No spatial container"
)
return results
# Usage
results = run_validation_pipeline("building.ifc", "requirements.ids")
if not results["schema"]["passed"]:
print(f"Schema issues: {results['schema']['issues']}")
sys.exit(1)
# Basic validation
python -m ifcopenshell.validate model.ifc
# With EXPRESS WHERE rules
python -m ifcopenshell.validate model.ifc --rules
# JSON output
python -m ifcopenshell.validate model.ifc --json
# Show attribute field positions in error messages
python -m ifcopenshell.validate model.ifc --fields
# Validate IFC against IDS
python -m ifctester model.ifc requirements.ids
# Generate HTML report
python -m ifctester model.ifc requirements.ids --reporter Html --output report.html
ifcopenshell.api.run() invocation patterns and georeference.* API functionsifcopenshell.open(), ifcopenshell.file(), and file I/O patternsWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub lagzgabrielmuller-dot/kit-ingenieria-3d --plugin blender-bim-sverchok73 skills in this plugin
/aec-agents-workflow-orchestratorUse when a task spans multiple AEC technologies (Blender, IfcOpenShell, Bonsai, Sverchok) and you need to decide which tool handles which step, or when orchestrating multi-step BIM pipelines such as IFC creation to visualization to authoring. Prevents the common mistake of mixing IfcStore.get_file() with ifcopenshell.open() in the same context, or calling Bonsai operators outside a Bonsai-loaded session. Provides decision trees for technology selection, workflow sequencing, and bridge patterns between tools. Keywords: cross-technology, workflow orchestration, BIM pipeline, technology selection, Blender IfcOpenShell Bonsai integration, multi-step AEC, bridge pattern, which tool should I use, combine Blender and IFC, multi-tool workflow, how to connect tools.
/aec-core-bim-workflowsUse when implementing end-to-end BIM workflows that combine IfcOpenShell, Bonsai, and Blender -- such as IFC creation from scratch, model enrichment, validation pipelines, geometry extraction, or batch processing of building models. Prevents the common mistake of skipping unit and context setup before creating geometry, or directly modifying IFC attributes instead of using ifcopenshell.api.run(). Covers property set management across tools, spatial hierarchy patterns, and version compatibility for IFC2X3/IFC4/IFC4X3. Keywords: BIM workflow, IFC creation, model validation, property extraction, batch processing, spatial hierarchy, cross-technology, IfcOpenShell Bonsai Blender, pset management, how to create IFC model, step by step BIM, get properties from IFC.