get_ifc_spatial_structure
Extract the hierarchical spatial structure from IFC building models, including site, building, storey, and space relationships, to analyze architectural organization.
Instructions
Get the spatial structure of the IFC model (site, building, storey, space hierarchy).
Returns:
A JSON-formatted string representing the hierarchical structure of the IFC model
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- tools.py:362-377 (handler)The main handler function for the 'get_ifc_spatial_structure' MCP tool. It connects to Blender via the global connection, sends the 'get_ifc_spatial_structure' command to the Blender addon, formats the result as JSON, and handles errors.def get_ifc_spatial_structure() -> str: """ Get the spatial structure of the IFC model (site, building, storey, space hierarchy). Returns: A JSON-formatted string representing the hierarchical structure of the IFC model """ try: blender = get_blender_connection() result = blender.send_command("get_ifc_spatial_structure") # Return the formatted JSON of the results return json.dumps(result, indent=2) except Exception as e: logger.error(f"Error getting IFC spatial structure: {str(e)}") return f"Error getting IFC spatial structure: {str(e)}"