How to parse Foundation Foundation Classes (IFC) files using perl or javascript?

I saw parsing with JAVA, but I need to parse the same IFC extension files, which consist of object-oriented frameworks and objects represented by blocks using javascript or perl. The basic idea will be very helpful.

Example IFC file:

ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');

FILE_NAME(
/* name */ 'C:\\sample.ifc',
/* time_stamp */ '2012-05-18T13:15:15',
/* authorization */ 'None');

FILE_SCHEMA (('IFC2X3'));
ENDSEC;

DATA;

#1= IFCAPPLICATION(#2,'0.5.29.0','ssiRhinoIFC - Geometry Gym Plug-in for Rhino3d','ssiRhinoIFC');
#2= IFCORGANIZATION($,'Geometry Gym Pty Ltd',$,$,$);
#3= IFCPERSONANDORGANIZATION(#4,#5,$);
#4= IFCPERSON($,'Jon',$,$,$,$,$,$);
#5= IFCORGANIZATION($,'UNKNOWN',$,$,$);
#6= IFCOWNERHISTORY(#3,#1,$,.ADDED.,1337346830,$,$,1337346830);
#7= IFCCARTESIANPOINT((0.0,0.0,0.0));
#8= IFCDIRECTION((1.0,0.0,0.0));

ENDSEC;

END-ISO-10303-21;
+3
source share
1 answer

What file format is used? If it is IFC-XML, you can look at using the Perl-XML module.

http://perl-xml.sourceforge.net/faq/

+1
source

All Articles