system3d / ifc2json
Convert IFC files into JSON
Installs: 141
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 0
Open Issues: 0
pkg:composer/system3d/ifc2json
Requires
- php: >=5.5.9
Requires (Dev)
- php: >=5.5.9
- symfony/var-dumper: ^3.1
README
Installation / Usage
-
Download and install IFC2JSON via Composer
composer require system3d/ifc2json
-
Include the IFC2JSON class and set your IFC file
use System3D\IFC2JSON\IFC2JSON; $ifcFile = "your-file.ifc"; $IFC2JSON = new IFC2JSON( $ifcFile );
-
Get your JSON
echo $IFC2JSON->getJson();
Advanced mode
Advanced mode will return all the related objects intead of just an ref ID, and will filter the results to return only needed objects.
Pass TRUE as second argument to enable the Advanced mode
$IFC2JSON = new IFC2JSON( $ifcFile, true );
Levels density
By defaul, IFC2JSON will load in all the related objects for 3 levels only.
1 level:
2 levels:
3 levels:
To get the related objects for bigger than 3 levels, pass an Integer as a third paramenter:
$IFC2JSON = new IFC2JSON( $ifcFile, true, 5 );
BE CAREFUL! Higher levels of loading will results in a bigger outputs json file.