system3d / ifc2json
There is no license information available for the latest version (v2.3) of this package.
Convert IFC files into JSON
v2.3
2016-06-20 18:10 UTC
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.