3

I have seen the parsing with JAVA but i need to parse the same IFC extension files which consists of object oriented framework and entity represented blocks using javascript or perl. A basic idea will be a lot helpful.

Sample 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;
rochb
  • 2,249
  • 18
  • 26
Anil
  • 3,912
  • 5
  • 35
  • 46
  • Related: [How to parse Industry Foundation Class (IFC) files using Java?](http://stackoverflow.com/q/3206538/269126) – Lumi May 18 '12 at 07:13
  • i have seen the parsing with java which deals with the classes, but i need to have a better understanding with perl or java script. Format will be simple IFC text file. – Anil May 18 '12 at 13:21
  • I have a hard time even [locating a sample of such a file via Google](http://www.google.de?q=ifc+file+format+step). Update your question providing a "hello world" sample of such a data file, apparently a plain text format. People will then know what this is all about. – Lumi May 18 '12 at 14:41
  • More info on the file format is at [Wikipedia](http://en.wikipedia.org/wiki/ISO_10303-21). At my current project I'm also dealing with these STEP files, but I'm not aware of any Perl module dealing with that format. – BarneySchmale Jan 25 '15 at 13:27

1 Answers1

1

Which file format is being used? If it's IFC-XML, you could look at using the Perl-XML module.

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

m0j0
  • 3,484
  • 5
  • 28
  • 33