Close

Relief for ODA Team in Ukraine

Learn more
ODA IFC SDK
IFC Model Filler Sample Application

Summary

ODA Product: IFC SDK
Sample Name: ExIfcModelFiller
Source Code Location: Ifc/Examples/ExIfcModelFiller

Description

The ExIfcModelFiller example application illustrates how to use IFC SDK to work with IFC models using early binding. The application uses IFC2x3 schema-dependent entities to create a valid IFC model that contains an IfcBuildingElementProxy object and its IfcShapeRepresentation object with an extruded area solid that is made based on a parametric profile definition. The newly created model is saved to an output .ifc file.

Run Sample Application

To run the ExIfcModelFiller sample application, please do the following:

  1. Open the terminal window and go to the directory where the sample binary file is allocated:
    • For Windows® platforms: <IFC_DIR>\exe\<version>
    • For Non-Windows platforms: <IFC_DIR>/bin/<version>

    <IFC_DIR> is a directory where you unpacked the IFC SDK archive.

    To determine your <version> parameter, please see the appropriate section in the Download IFC SDK topic.

  2. Run the sample with appropriate parameters:
    
                ExIfcModelFiller <destination file>
              
    destination file A full name to the output .ifc file to be created. This file contains the model and its entities created by the application.

The picture shows the application output when the command is not correct (a) and the resulting output after the application correctly finishes (b).

Here is the content of the generated .ifc file:


ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('ViewDefinition [CoordinationView]'),'2;1');
FILE_NAME('TestFile.ifc','2019-02-23T12:17:26',(),(),'','','');
FILE_SCHEMA(('IFC2X3'));
ENDSEC;

DATA;
#1=IFCPERSON('','','',$,$,$,$,$);
#2=IFCORGANIZATION('','ODA ExIfcModelFiller','',$,$);
#3=IFCPERSONANDORGANIZATION(#1,#2,$);
#4=IFCAPPLICATION(#2,'19.0.13','ODA ExIfcModelFiller','ODA ExIfcModelFiller');
#5=IFCOWNERHISTORY(#3,#4,$,.ADDED.,$,#3,#4,0);
#6=IFCDIRECTION((0.00000000000000000,1.0000000000000000,0.00000000000000000));
#7=IFCDIRECTION((1.0000000000000000,0.00000000000000000,0.00000000000000000));
#8=IFCDIRECTION((0.00000000000000000,0.00000000000000000,1.0000000000000000));
#9=IFCCARTESIANPOINT((0.00000000000000000,0.00000000000000000,0.00000000000000000));
#10=IFCAXIS2PLACEMENT3D(#9,#8,#7);
#11=IFCGEOMETRICREPRESENTATIONCONTEXT('Plan','Model',3,1.0000000000000001E-05,#10,#6);
#12=IFCDIMENSIONALEXPONENTS(0,0,0,0,0,0,0);
#13=IFCSIUNIT(*,.LENGTHUNIT.,.MILLI.,.METRE.);
#14=IFCSIUNIT(*,.PLANEANGLEUNIT.,.MILLI.,.RADIAN.);
#15=IFCMEASUREWITHUNIT($,#14);
#16=IFCCONVERSIONBASEDUNIT(#12,.PLANEANGLEUNIT.,'Degrees',#15);
#17=IFCUNITASSIGNMENT((#13,#16));
#18=IFCPROJECT('1UQ2BSGbfBeey9oXPvNoka',$,'','','','Sample project made with ODA ExIfcModelFiller app','',(#11),#17);
#19=IFCDIRECTION((1.0000000000000000,0.00000000000000000,0.00000000000000000));
#20=IFCDIRECTION((0.00000000000000000,0.00000000000000000,1.0000000000000000));
#21=IFCCARTESIANPOINT((0.00000000000000000,0.00000000000000000,0.00000000000000000));
#22=IFCAXIS2PLACEMENT3D(#21,#20,#19);
#23=IFCLOCALPLACEMENT($,#22);
#24=IFCSITE('2bMdfBz0X9veuDxTK$swSK',$,'','','',#23,$,'',.ELEMENT.,$,$,$,'',$);
#25=IFCRELAGGREGATES('1v3MGcGCjDvBPOUjS80nXH',$,'','',#18,(#24));
#26=IFCDIRECTION((1.0000000000000000,0.00000000000000000,0.00000000000000000));
#27=IFCDIRECTION((0.00000000000000000,0.00000000000000000,1.0000000000000000));
#28=IFCCARTESIANPOINT((0.00000000000000000,0.00000000000000000,0.00000000000000000));
#29=IFCAXIS2PLACEMENT3D(#28,#27,#26);
#30=IFCLOCALPLACEMENT(#23,#29);
#31=IFCBUILDING('3leWciaijBVhGEDfGxYZxb',$,'','','',#30,$,'',.ELEMENT.,$,$,$);
#32=IFCRELAGGREGATES('2MeT5JdMz2VB$wO$QqiRmX',$,'','',#24,(#31));
#33=IFCDIRECTION((1.0000000000000000,0.00000000000000000,0.00000000000000000));
#34=IFCDIRECTION((0.00000000000000000,0.00000000000000000,1.0000000000000000));
#35=IFCCARTESIANPOINT((0.00000000000000000,0.00000000000000000,0.00000000000000000));
#36=IFCAXIS2PLACEMENT3D(#35,#34,#33);
#37=IFCLOCALPLACEMENT(#30,#36);
#38=IFCBUILDINGSTOREY('2PD$aWx6H2m8Oth6i7ykHa',$,'','','',#37,$,'',.ELEMENT.,$);
#39=IFCRELAGGREGATES('0YGZAC8ir5qBvtiunS6Rf5',$,'','',#31,(#38));
#40=IFCBUILDINGELEMENTPROXY('2APD8P7BP2M8js41lkA5q4',$,'','','',#46,#58,'',$);
#41=IFCRELCONTAINEDINSPATIALSTRUCTURE('0g_AdhJIjFL8HPctrIFCWE',$,'','',(#40),#38);
#42=IFCDIRECTION((1.0000000000000000,0.00000000000000000,0.00000000000000000));
#43=IFCDIRECTION((0.00000000000000000,0.00000000000000000,1.0000000000000000));
#44=IFCCARTESIANPOINT((0.00000000000000000,0.00000000000000000,0.00000000000000000));
#45=IFCAXIS2PLACEMENT3D(#44,#43,#42);
#46=IFCLOCALPLACEMENT($,#45);
#47=IFCDIRECTION((1.0000000000000000,0.00000000000000000));
#48=IFCCARTESIANPOINT((0.00000000000000000,0.00000000000000000));
#49=IFCAXIS2PLACEMENT2D(#48,#47);
#50=IFCDIRECTION((0.00000000000000000,0.00000000000000000,1.0000000000000000));
#51=IFCDIRECTION((1.0000000000000000,0.00000000000000000,0.00000000000000000));
#52=IFCDIRECTION((0.00000000000000000,0.00000000000000000,1.0000000000000000));
#53=IFCCARTESIANPOINT((0.00000000000000000,0.00000000000000000,0.00000000000000000));
#54=IFCAXIS2PLACEMENT3D(#53,#52,#51);
#55=IFCISHAPEPROFILEDEF(.AREA.,'',#49,25.000000000000000,50.000000000000000,5.0000000000000000,2.0000000000000000,$);
#56=IFCEXTRUDEDAREASOLID(#55,#54,#50,20.000000000000000);
#57=IFCSHAPEREPRESENTATION(#11,'Body','SweptSolid',(#56));
#58=IFCPRODUCTDEFINITIONSHAPE('','',(#57));
#59=IFCBUILDINGELEMENTPROXY('0CkdHklXL27OHCuVQAF0sG',$,'','','',#65,#77,'',$);
#60=IFCRELCONTAINEDINSPATIALSTRUCTURE('1yIXrGrRn9XgGbIlCNce6B',$,'','',(#59),#38);
#61=IFCDIRECTION((1.0000000000000000,0.00000000000000000,0.00000000000000000));
#62=IFCDIRECTION((0.00000000000000000,0.00000000000000000,1.0000000000000000));
#63=IFCCARTESIANPOINT((100.00000000000000,0.00000000000000000,0.00000000000000000));
#64=IFCAXIS2PLACEMENT3D(#63,#62,#61);
#65=IFCLOCALPLACEMENT($,#64);
#66=IFCDIRECTION((1.0000000000000000,0.00000000000000000));
#67=IFCCARTESIANPOINT((0.00000000000000000,0.00000000000000000));
#68=IFCAXIS2PLACEMENT2D(#67,#66);
#69=IFCDIRECTION((0.00000000000000000,0.00000000000000000,1.0000000000000000));
#70=IFCDIRECTION((1.0000000000000000,0.00000000000000000,0.00000000000000000));
#71=IFCDIRECTION((0.00000000000000000,0.00000000000000000,1.0000000000000000));
#72=IFCCARTESIANPOINT((0.00000000000000000,0.00000000000000000,0.00000000000000000));
#73=IFCAXIS2PLACEMENT3D(#72,#71,#70);
#74=IFCISHAPEPROFILEDEF(.AREA.,'',#68,25.000000000000000,50.000000000000000,5.0000000000000000,5.0000000000000000,2.0000000000000000);
#75=IFCEXTRUDEDAREASOLID(#74,#73,#69,20.000000000000000);
#76=IFCSHAPEREPRESENTATION(#11,'Body','SweptSolid',(#75));
#77=IFCPRODUCTDEFINITIONSHAPE('','',(#76));
ENDSEC;

END-ISO-10303-21;
      

See Also

IFC SDK Sample Applications

Copyright © 2002 – 2022. Open Design Alliance. All rights reserved.