IFC parsing in node.js

Hello,
Newbie question:
Is there a way to parse ifc file in node.js? or convert ifc to json in node.js?
Thanks,
Asi

Hi Asi,

You could take a look at our ifc json project, it’s still a work in progress but you even might be able to contribute something.
Look for IFCJSON-Team and IFC2JSON_python on Github.

Cheers,
Jan

@jbrouwer - Thanks a lot. will take a look.

If you’re looking for a graphical BIM authoring tool which supports IFCJSON, the BlenderBIM Add-on supports both IFCJSON v4 and v5.

Oh, and I think @ian might have support for typescript in IFC-gen, but I didn’t look too closely :slight_smile:

Hi,
I recommend you to use IFC2JSON or Geometry gym, which has a function in database class to convert to JSON. I am working in a similar project and I didn’t found another option. I hope that building smart work harder in this topic.

@eruiz, @gasi2 - as we look to evolve JSON-based serializations for IFC, it’d be great to get feedback on your intended use cases and needs, if you’re willing :slight_smile:

Possible questions include:

  • Would you like JSON serializations of both IFC instance files and the IFC schema?
  • Do you have a use for validation of IFC JSON instances, ala JSON Schema?
  • In considering use of a JSON serialization of IFC, how would you rate the relative importance of the following (on a scale of Not Important, Somewhat Important, Very Important, Critical):
    – Human readability
    – Small file size
    – Round-tripping support with IFC-SFP and/or ifcXML
    – support for linked data (e.g., via JSON-LD)
  • What use cases do you intend to use IFC JSON for? Why might it fit your needs better than alternative serializations?
  • Any feedback on the draft specs as they exist today? (Feel free to post those to the IFCJSON Github Issues)

Thanks!

You can do a “dirty parse” relatively easy.
In other words:

If you know what you’re looking for, you can skip the rest

I’m currently building a parser that handles User Defined IFC Property Sets.
The logic behind my code is somewhat “dirty”. I DO NOT build the entire IFC schema/relationship. Instead, I only implement IfcPropertySingleValue, IfcRelDefinesByProperties, and IfcPropertySet.

You can take a look at my GitHub Repo for more info.

Best regards
André Wisén