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

This package is not auto-updated.

Last update: 2024-04-10 23:12:58 UTC


README

Installation / Usage

  1. Download and install IFC2JSON via Composer

    composer require system3d/ifc2json
  2. Include the IFC2JSON class and set your IFC file

    use System3D\IFC2JSON\IFC2JSON;
    
    $ifcFile 	= "your-file.ifc";
    $IFC2JSON 	= new IFC2JSON( $ifcFile );
  3. 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.