BIM & IFC Integration
Relevant source files
The following files were used as context for generating this wiki page:
The BIM (Building Information Modeling) module in Parashell provides a comprehensive framework for architectural design, project management, and industry-standard data exchange through the Industry Foundation Classes (IFC) format. This integration allows users to create parametric architectural components, organize them into hierarchical project structures, and manage site-specific data such as geographic coordinates and building levels.
The system relies on a native IFC implementation supported by external libraries like IfcOpenShell to handle the complexity of the IFC schema. It provides tools for importing and exporting BIM data, maintaining parametric relationships within FreeCAD while ensuring compatibility with external BIM software.
Sources: src/Mod/BIM/CMakeLists.txt, src/Mod/BIM/bimcommands/BimProjectManager.py:44-50
Project Architecture and Organization
BIM projects are organized into a strict spatial hierarchy defined by the IFC standard. The BIM_ProjectManager class handles the orchestration of these entities, including the Project, Site, Building, and Building Storeys (Levels).
Spatial Hierarchy
The hierarchy ensures that architectural elements are correctly nested for both internal management and external IFC export.
The spatial hierarchy used in BIM projects.
Sources: src/Mod/BIM/bimcommands/BimProjectManager.py:165-285
Key Components
| Component | IFC Entity | Description |
|---|---|---|
| Project | IfcProject | The root container for the entire BIM model. |
| Site | IfcSite | Contains geographic data: Latitude, Longitude, Elevation, and Declination. |
| Building | IfcBuilding | Defines the specific structure and its intended use (e.g., Residential, Office). |
| Building Storey | IfcBuildingStorey | Represents individual levels or floors with specific heights and offsets. |
| Axes/Grid | IfcGrid | A system of horizontal and vertical lines used for positioning structural elements. |
Sources: src/Mod/BIM/bimcommands/BimProjectManager.py:160-230, src/Mod/BIM/Resources/translations/Arch_af.ts:404-433
Native IFC Implementation
Parashell implements a "Native IFC" workflow where objects can be created directly as IFC-compliant entities or converted from existing FreeCAD geometry.
Project Setup Logic
The BIM_ProjectManager facilitates project initialization through several modes:
- Standard Document: Creates a standard FreeCAD document with BIM organization.
- Native IFC Object: Creates an IFC-specific project object within the document using
ifc_tools.create_document_object. - Convert Document: Converts an entire existing document into an IFC-compliant structure via
ifc_tools.convert_document.
Sources: src/Mod/BIM/bimcommands/BimProjectManager.py:145-163
Geographic and Site Data
The IfcSite entity stores critical metadata required for environmental analysis and coordination. This includes:
- Address: Postal or house number information.
- Coordinates: Latitude and Longitude values.
- Orientation: Declination (angle between True North and Document North).
- Elevation: Relative or absolute elevation of Level 0.
Sources: src/Mod/BIM/bimcommands/BimProjectManager.py:175-200, src/Mod/BIM/Resources/translations/Arch_af.ts:589-612
Parametric Architectural Objects
The BIM module extends standard geometry with architectural properties and IFC attributes. These are managed via the ArchComponent and specific subclasses.
Component Properties
Architectural objects include properties for construction management and BIM coordination:
- Material: Association with
ArchMaterialorMultiMaterialobjects. - Move with Host: Boolean property determining if a child (e.g., a window) moves with its host (e.g., a wall).
- IFC Attributes: Settable attributes defined by the IFC schema, such as
IfcTypeandTag. - Area/Volume: Automatically computed values for vertical faces, horizontal projections, and perimeters.
Sources: src/Mod/BIM/Resources/translations/Arch_af.ts:192-224, src/Mod/BIM/Resources/translations/Arch_no.ts:1157-1169
Component Relationship Flow
The sequence of object creation and aggregation during project setup.
Sources: src/Mod/BIM/bimcommands/BimProjectManager.py:203-290
Import and Export System
The module manages diverse file formats through specialized importers and exporters defined in the build system.
| Module | Purpose | Key Files |
|---|---|---|
| IFC Import | Handles standard and multicore IFC parsing. | importers/importIFC.py, importIFCmulticore.py |
| IFC Export | Serializes geometry to IFC schema. | importers/exportIFC.py, exportIFCHelper.py |
| Structural | Tools for exporting structural analytical models. | importers/exportIFCStructuralTools.py |
| Other Formats | Support for DAE, OBJ, JSON, and WebGL. | importers/importDAE.py, importOBJ.py, importWebGL.py |
Sources: src/Mod/BIM/CMakeLists.txt:72-91
Project Templates and Presets
The BIM_ProjectManager allows saving and loading project configurations to ensure consistency across different models.
Template Values
Project templates store both geometric and environment settings:
- Working Plane: Position, orientation (u, v vectors), and axis.
- Draft Settings: Text size, font, dimension styles, and grid spacing.
- View Settings: Line widths, default shape colors, and transparency.
- Units: User schema (e.g., Metric vs. Imperial) and decimal precision.
Sources: src/Mod/BIM/bimcommands/BimProjectManager.py:440-520
User Assistance and Tutorials
The BIM_Tutorial class provides an in-game instruction system that fetches content directly from the FreeCAD wiki. It includes a progress tracker and a "Goal" system that evaluates Python expressions to verify if a user has successfully completed a task (e.g., checking if a specific object exists in the document).
Sources: src/Mod/BIM/bimcommands/BimTutorial.py:41-80, src/Mod/BIM/bimcommands/BimTutorial.py:217-248
Summary
The BIM & IFC Integration in Parashell provides a structured environment for architectural modeling that adheres to international standards. By combining a rigid spatial hierarchy with parametric flexibility and template-driven management, the system facilitates complex BIM workflows. The integration of native IFC tools ensures that Parashell remains a viable tool for professional AEC (Architecture, Engineering, and Construction) collaboration.