Overview
The AI-BIM App features a powerful 3D IFC viewer that enables you to visualize and navigate Industry Foundation Classes (IFC) building models in your browser. Built on Three.js and ThatOpen Components, the viewer provides professional-grade rendering and interaction capabilities.Core Technologies
The IFC viewer leverages several cutting-edge technologies:- Three.js: High-performance 3D graphics rendering
- ThatOpen Components (@thatopen/components): BIM-specific functionality and IFC processing
- ThatOpen Components Front (@thatopen/components-front): Advanced rendering features
- web-ifc: Native IFC file parsing
Camera System
The viewer implements a flexible dual-camera system that adapts to different visualization needs.OrthoPerspectiveCamera
The app uses theOBC.OrthoPerspectiveCamera which supports both orthographic and perspective projections:
Camera Controls
Fit Model
Automatically frames all loaded models in the viewport with optimal zoom level (0.8x padding)
Lock/Unlock
Toggle camera controls on/off to prevent accidental navigation changes
Focus Selection
Zoom camera to focus on currently selected elements with 1.2x radius padding
Rest Detection
Camera detects when movement stops (0.25 threshold) to trigger optimizations
Rendering Engine
PostproductionRenderer
The viewer uses an advancedPostproductionRenderer that provides enhanced visual quality through post-processing effects:
Post-Processing Effects
Custom Effects
Custom Effects
Enables custom post-processing pipeline for enhanced visual quality. Line rendering uses dark color (0x17191c) for edge detection.
Ambient Occlusion (AO)
Ambient Occlusion (AO)
Adds realistic shadows in corners and crevices where ambient light is occluded, enhancing depth perception.
Gamma Correction
Gamma Correction
Ensures accurate color representation by correcting the gamma curve for proper display output.
Scene Configuration
The viewer creates a complete world environment with scene, camera, and renderer:World Grid
A customizable grid system helps with spatial orientation:- Grid Color: Dark gray (0x424242) for subtle background reference
- Primary Grid Size: 2 units
- Secondary Grid Size: 8 units
IFC Loading
Supported Loading Methods
The viewer supports multiple ways to load IFC models:Standard IFC Loading
Load complete IFC files using the
IfcLoader component. Files are parsed, processed, and rendered in the 3D scene.IFC Loader Configuration
IFC Streamer for Large Models
The streaming loader optimizes performance for large buildings:Performance Optimization: The culler automatically hides geometry outside the viewport with a threshold of 10 units, hiding objects after 1 second and removing them from memory after 40 seconds.
Model Processing Pipeline
When an IFC model is loaded, the system automatically processes it through several stages:Property Indexing
The
IfcRelationsIndexer processes the model to extract IFC relationships and properties for quick access.Entity Classification
The
Classifier organizes elements by their IFC entity types (walls, slabs, beams, etc.).Supported IFC Types
The viewer processes and displays all standard IFC entity types, with special handling for:Structural Elements
- IFCWALL / IFCWALLSTANDARDCASE
- IFCSLAB
- IFCBEAM
- IFCCOLUMN
Spatial Structure
- IFCBUILDINGSTOREY
- IFCBUILDING
- IFCSITE
- IFCSPACE
Materials & Properties
- IFCMATERIAL
- IFCPROPERTYSET
- IFCELEMENTQUANTITY
- IFCRELASSOCIATESMATERIAL
Performance Optimization
Culling System
The viewer implements frustum culling to improve performance:Responsive Viewport
The viewer automatically adjusts to window size changes:Navigation Controls
The viewer provides intuitive navigation similar to professional CAD applications:Orbit
Left Mouse Drag: Rotate the camera around the model center
Pan
Right Mouse Drag or Middle Mouse Drag: Move the camera parallel to the view plane
Zoom
Mouse Wheel: Zoom in and out relative to the cursor position
Fit View
Fit Model Button: Automatically frame all models in the viewport
Visual Quality Features
High-Resolution Rendering
Native WebGL rendering with anti-aliasing for smooth edges and professional appearance
Realistic Lighting
Ambient occlusion simulates realistic soft shadows in model crevices and corners
Edge Detection
Custom edge rendering highlights model geometry for better clarity
Transparent Background
Clean visualization with null background allows focus on the model
Best Practices
The viewer automatically processes IFC properties and relationships in the background, enabling advanced features like element selection and AI analysis.