Example 1
export of a basic IFC file with wall, opening and window, including property sets and base quantities
The HelloWall miniExample is a small application build to export valid ifc files, following the already agreed view definition "Coordination View" and a proposed view definition "Presentation View". The latest version includes the export of property sets (as part of the "Coordination View" and "Presentation View"), and the export of base quantities as part of the proposed "Quantity Take-off Addon View". The export can be configured by a range of shape parameters and options. The source code is provided so that developers can follow the algorithms used.
|
Example 1 export of the miniExample using the coordination view setting and enabling the exchange of parameterized extrusion based geometry for all building elements. Enable the check box for the export of quantities and property sets. |
figure 1: user interface of the miniExample.exe NOTE: you need to install the Hello World package dated 2008-07-31 or later ![]() |
| Results the following export files are generated by miniExample/Release/miniExample.exe (with settings according to the figure):
|
|
| Explanations the sample file has the basic structure of any IFC file, complying with the "Coordination View"
It includes:
|
Short analysis of the generated ifc file
ISO-10303-21;
HEADER;
FILE_DESCRIPTION
'ViewDefinition [CoordinationView,
QuantityTakeOffAddOnView]'), '2;1');
FILE_NAME ('example.ifc', '2008-08-01T21:53:56',
('Architect'), ('Building Designer Office'),
'IFC Engine DLL version 1.02 beta',
'IFC Engine DLL version 1.02 beta', 'The authorising person');
FILE_SCHEMA (('IFC2X3'[+]
;
ENDSEC;
|
FILE HEADER section
|
DATA;
#1 = IFCPROJECT('0YvctVUKr0kugbFTf53O9L', #2, 'Default Project',
'Description of Default Project', $, $, $, (#20), #7);
#2 = IFCOWNERHISTORY(#3, #6, $, .ADDED., $, $, $, 1217620436);
#3 = IFCPERSONANDORGANIZATION(#4, #5, $);
#4 = IFCPERSON('ID001', 'Bonsma', 'Peter', $, $, $, $, $);
#5 = IFCORGANIZATION($, 'TNO', 'TNO Building Innovation', $, $);
#6 = IFCAPPLICATION(#5, '0.10', 'Test Application', 'TA 1001');
#7 = IFCUNITASSIGNMENT
#8, #9, #10, #11, #15, #16, #17, #18, #19[+]
;
#8 = IFCSIUNIT(*, .LENGTHUNIT., $, .METRE.);
#9 = IFCSIUNIT(*, .AREAUNIT., $, .SQUARE_METRE.);
#10 = IFCSIUNIT(*, .VOLUMEUNIT., $, .CUBIC_METRE.);
#11 = IFCCONVERSIONBASEDUNIT(#12, .PLANEANGLEUNIT., 'DEGREE', #13);
#12 = IFCDIMENSIONALEXPONENTS(0, 0, 0, 0, 0, 0, 0);
#13 = IFCMEASUREWITHUNIT(IFCPLANEANGLEMEASURE(1.745E-2), #14);
#14 = IFCSIUNIT(*, .PLANEANGLEUNIT., $, .RADIAN.);
#15 = IFCSIUNIT(*, .SOLIDANGLEUNIT., $, .STERADIAN.);
#16 = IFCSIUNIT(*, .MASSUNIT., $, .GRAM.);
#17 = IFCSIUNIT(*, .TIMEUNIT., $, .SECOND.);
#18 = IFCSIUNIT(*, .THERMODYNAMICTEMPERATUREUNIT., $, .DEGREE_CELSIUS.);
#19 = IFCSIUNIT(*, .LUMINOUSINTENSITYUNIT., $, .LUMEN.);
#20 = IFCGEOMETRICREPRESENTATIONCONTEXT($, 'Model', 3, 1.000E-5, #21, $);
#21 = IFCAXIS2PLACEMENT3D(#22, $, $);
#22 = IFCCARTESIANPOINT
0., 0., 0.[+]
;
|
FILE DATA section
|
#23 = IFCSITE('3rNg_N55v4CRBpQVbZJoHB', #2, 'Default Site',
'Description of Default Site', $, #24, $, $, .ELEMENT.,
(24, 28, 0), (54, 25, 0), $, $, $);
#24 = IFCLOCALPLACEMENT($, #25);
#25 = IFCAXIS2PLACEMENT3D(#26, #27, #28);
#26 = IFCCARTESIANPOINT
0., 0., 0.[+]
;
#27 = IFCDIRECTION
0., 0., 1.[+]
;
#28 = IFCDIRECTION
1., 0., 0.[+]
;
#29 = IFCBUILDING('0yf_M5JZv9QQXly4dq_zvI', #2, 'Default Building',
'Description of Default Building', $, #30, $, $, .ELEMENT., $, $, $);
#30 = IFCLOCALPLACEMENT(#24, #31);
#31 = IFCAXIS2PLACEMENT3D(#32, #33, #34);
#32 = IFCCARTESIANPOINT
0., 0., 0.[+]
;
#33 = IFCDIRECTION
0., 0., 1.[+]
;
#34 = IFCDIRECTION
1., 0., 0.[+]
;
#35 = IFCBUILDINGSTOREY('0C87kaqBXF$xpGmTZ7zxN$', #2, 'Default Building Storey',
'Description of Default Building Storey', $, #36, $, $, .ELEMENT., 0.);
#36 = IFCLOCALPLACEMENT(#30, #37);<
#37 = IFCAXIS2PLACEMENT3D(#38, #39, #40);>
#38 = IFCCARTESIANPOINT
0., 0., 0.[+]
;
#39 = IFCDIRECTION
0., 0., 1.[+]
;
#40 = IFCDIRECTION
1., 0., 0.[+]
;
|
Definition of the project structure
|
#41 = IFCRELAGGREGATES('2168U9nPH5xB3UpDx_uK11', #2, 'BuildingContainer',
'BuildingContainer for BuildigStories', #29, (#35));
#42 = IFCRELAGGREGATES('3JuhmQJDj9xPnAnWoNb94X', #2, 'SiteContainer',
'SiteContainer For Buildings', #23, (#29));
#43 = IFCRELAGGREGATES('1Nl_BIjGLBke9u_6U3IWlW', #2, 'ProjectContainer',
'ProjectContainer for Sites', #1, (#23));
#44 = IFCRELCONTAINEDINSPATIALSTRUCTURE('2O_dMuDnr1Ahv28oR6ZVpr', #2,
'Default Building', 'Contents of Building Storey', (#45, #124), #35);
|
Creation of the project structure hierarchy
|
#45 = IFCWALLSTANDARDCASE('3vB2YO$MX4xv5uCqZZG05x', #2, 'Wall xyz',
'Description of Wall', $, #46, #51, $);
#46 = IFCLOCALPLACEMENT(#36, #47);
#47 = IFCAXIS2PLACEMENT3D(#48, #49, #50);
#48 = IFCCARTESIANPOINT
0., 0., 0.[+]
;
#49 = IFCDIRECTION
0., 0., 1.[+]
;
#50 = IFCDIRECTION
1., 0., 0.[+]
;
#51 = IFCPRODUCTDEFINITIONSHAPE($, $, (#79, #83));
#79 = IFCSHAPEREPRESENTATION(#20, 'Axis', 'Curve2D', (#80));
#80 = IFCPOLYLINE
#81, #82[+]
;
#81 = IFCCARTESIANPOINT
0., 1.500E-1[+]
;
#82 = IFCCARTESIANPOINT
5., 1.500E-1[+]
;
#83 = IFCSHAPEREPRESENTATION(#20, 'Body', 'SweptSolid', (#84));
#84 = IFCEXTRUDEDAREASOLID(#85, #92, #96, 2.300);
#85 = IFCARBITRARYCLOSEDPROFILEDEF(.AREA., $, #86);
#86 = IFCPOLYLINE
#87, #88, #89, #90, #91[+]
;
#87 = IFCCARTESIANPOINT
0., 0.[+]
;
#88 = IFCCARTESIANPOINT
0., 3.000E-1[+]
;
#89 = IFCCARTESIANPOINT
5., 3.000E-1[+]
;
#90 = IFCCARTESIANPOINT
5., 0.[+]
;
#91 = IFCCARTESIANPOINT
0., 0.[+]
;
#92 = IFCAXIS2PLACEMENT3D(#93, #94, #95);
#93 = IFCCARTESIANPOINT
0., 0., 0.[+]
;
#94 = IFCDIRECTION
0., 0., 1.[+]
;
#95 = IFCDIRECTION
1., 0., 0.[+]
;
#96 = IFCDIRECTION
0., 0., 1.[+]
;
|
Creation of the wall object, since it is defined parametrically, it can be exchanged as standard case wall.
|
#74 = IFCRELASSOCIATESMATERIAL('2zeggBjk9A5wcc3k9CYqdL', #2, $, $, (#45), #75);
#75 = IFCMATERIALLAYERSETUSAGE(#76, .AXIS2., .POSITIVE., -1.500E-1);
#76 = IFCMATERIALLAYERSET
#77), $);
#77 = IFCMATERIALLAYER(#78, 3.000E-1, $);
#78 = IFCMATERIAL('Name of the material used for the wall');</pre>
</td>
<td valign="top"><br />Adding the <strong>IfcMaterialLayerSetUsage </strong>information (required for standard case)<br />
<ul><li>is
a single layer wall, with a material layer of 300mm thickness and
placed in the middle of the wall axis (material layer set usage offset
-150mm)</li></ul>
<br /></td>
</tr>
<tr>
<td valign="top">
<pre>#52 = IFCPROPERTYSET('18RtPv6efDwuUOMduCZ7rH', #2, 'Pset_WallCommon', $,
(#53, #54, #55, #56, #57, #58, #59, #60, #61, #62[+]
;
#53 = IFCPROPERTYSINGLEVALUE('Reference', 'Reference', IFCTEXT(''), $);
#54 = IFCPROPERTYSINGLEVALUE('AcousticRating', 'AcousticRating', IFCTEXT(''), $);
#55 = IFCPROPERTYSINGLEVALUE('FireRating', 'FireRating', IFCTEXT(''), $);
#56 = IFCPROPERTYSINGLEVALUE('Combustible', 'Combustible', IFCBOOLEAN(.F.), $);
#57 = IFCPROPERTYSINGLEVALUE('SurfaceSpreadOfFlame', 'SurfaceSpreadOfFlame', IFCTEXT(''), $);
#58 = IFCPROPERTYSINGLEVALUE('ThermalTransmittance', 'ThermalTransmittance', IFCREAL(2.400E-1), $);
#59 = IFCPROPERTYSINGLEVALUE('IsExternal', 'IsExternal', IFCBOOLEAN(.T.), $);
#60 = IFCPROPERTYSINGLEVALUE('ExtendToStructure', 'ExtendToStructure', IFCBOOLEAN(.F.), $);
#61 = IFCPROPERTYSINGLEVALUE('LoadBearing', 'LoadBearing', IFCBOOLEAN(.F.), $);
#62 = IFCPROPERTYSINGLEVALUE('Compartmentation', 'Compartmentation', IFCBOOLEAN(.F.), $);
#63 = IFCRELDEFINESBYPROPERTIES('3IxFuNHRvBDfMT6_FiWPEz', #2, $, $, (#45), #52);
#64 = IFCELEMENTQUANTITY('10m6qcXSj0Iu4RVOK1omPJ', #2, 'BaseQuantities', $, $,
(#65, #66, #67, #68, #69, #70, #71, #72));
#65 = IFCQUANTITYLENGTH('Width', 'Width', $, 3.000E-1);
#66 = IFCQUANTITYLENGTH('Lenght', 'Lenght', $, 5.);
#67 = IFCQUANTITYAREA('GrossSideArea', 'GrossSideArea', $, 11.500);
#68 = IFCQUANTITYAREA('NetSideArea', 'NetSideArea', $, 10.450);
#69 = IFCQUANTITYVOLUME('GrossVolume', 'GrossVolume', $, 3.450);
#70 = IFCQUANTITYVOLUME('NetVolume', 'NetVolume', $, 3.135);
#71 = IFCQUANTITYLENGTH('Height', 'Height', $, 2.300);
#72 = IFCQUANTITYAREA('GrossFootprintArea', 'GrossFootprintArea', $, 1.500);
#73 = IFCRELDEFINESBYPROPERTIES('0cpLgxVi9Ew8B08wF2Ql1w', #2, $, $, (#45), #64);
|
Creation of the alphanumeric property and quantity information
|
#97 = IFCOPENINGELEMENT('2LcE70iQb51PEZynawyvuT', #2, 'Opening Element xyz',
'Description of Opening', $, #98, #103, $);
#98 = IFCLOCALPLACEMENT(#46, #99);
#99 = IFCAXIS2PLACEMENT3D(#100, #101, #102);
#100 = IFCCARTESIANPOINT
9.000E-1, 0., 2.500E-1[+]
;
#101 = IFCDIRECTION
0., 0., 1.[+]
;
#102 = IFCDIRECTION
1., 0., 0.[+]
;
#103 = IFCPRODUCTDEFINITIONSHAPE($, $, (#110));
#109 = IFCRELVOIDSELEMENT('3lR5koIT51Kwudkm5eIoTu', #2, $, $, #45, #97);
#110 = IFCSHAPEREPRESENTATION(#20, 'Body', 'SweptSolid', (#111));
#111 = IFCEXTRUDEDAREASOLID(#112, #119, #123, 1.400);
#112 = IFCARBITRARYCLOSEDPROFILEDEF(.AREA., $, #113);
#113 = IFCPOLYLINE
#114, #115, #116, #117, #118[+]
;
#114 = IFCCARTESIANPOINT
0., 0.[+]
;
#115 = IFCCARTESIANPOINT
0., 3.000E-1[+]
;
#116 = IFCCARTESIANPOINT
7.500E-1, 3.000E-1[+]
;
#117 = IFCCARTESIANPOINT
7.500E-1, 0.[+]
;
#118 = IFCCARTESIANPOINT
0., 0.[+]
;
#119 = IFCAXIS2PLACEMENT3D(#120, #121, #122);
#120 = IFCCARTESIANPOINT
0., 0., 0.[+]
;
#121 = IFCDIRECTION
0., 0., 1.[+]
;
#122 = IFCDIRECTION
1., 0., 0.[+]
;
#123 = IFCDIRECTION
0., 0., 1.[+]
;
|
Creation of the opening
|
#104 = IFCELEMENTQUANTITY('2yDPSWYWf319fWaWWvPxwA', #2, 'BaseQuantities', $, $,
(#105, #106, #107));
#105 = IFCQUANTITYLENGTH('Depth', 'Depth', $, 3.000E-1);
#106 = IFCQUANTITYLENGTH('Height', 'Height', $, 1.400);
#107 = IFCQUANTITYLENGTH('Width', 'Width', $, 7.500E-1);
#108 = IFCRELDEFINESBYPROPERTIES('2UEO1blXL9sPmb1AMeW7Ax', #2, $, $, (#97), #104);
|
Creation of the alphanumeric quantity information
|
#124 = IFCWINDOW('0LV8Pid0X3IA3jJLVDPidY', #2, 'Window xyz',
'Description of Window', $, #125, #130, $, 1.400, 7.500E-1);
#125 = IFCLOCALPLACEMENT(#98, #126);
#126 = IFCAXIS2PLACEMENT3D(#127, #128, #129);
#127 = IFCCARTESIANPOINT
0., 1.000E-1, 0.[+]
;
#128 = IFCDIRECTION
0., 0., 1.[+]
;
#129 = IFCDIRECTION
1., 0., 0.[+]
;
#130 = IFCPRODUCTDEFINITIONSHAPE($, $, (#150));
#131 = IFCRELFILLSELEMENT('1CDlLMVMv1qw1giUXpQgxI', #2, $, $, #97, #124);
#150 = IFCSHAPEREPRESENTATION(#20, 'Body', 'SweptSolid', (#151));
#151 = IFCEXTRUDEDAREASOLID(#152, #159, #163, 1.400);
#152 = IFCARBITRARYCLOSEDPROFILEDEF(.AREA., $, #153);
#153 = IFCPOLYLINE
#154, #155, #156, #157, #158[+]
;
#154 = IFCCARTESIANPOINT
0., 0.[+]
;
#155 = IFCCARTESIANPOINT
0., 1.000E-1[+]
;
#156 = IFCCARTESIANPOINT
7.500E-1, 1.000E-1[+]
;
#157 = IFCCARTESIANPOINT
7.500E-1, 0.[+]
;
#158 = IFCCARTESIANPOINT
0., 0.[+]
;
#159 = IFCAXIS2PLACEMENT3D(#160, #161, #162);
#160 = IFCCARTESIANPOINT
0., 0., 0.[+]
;
#161 = IFCDIRECTION
0., 0., 1.[+]
;
#162 = IFCDIRECTION
1., 0., 0.[+]
;
#163 = IFCDIRECTION
0., 0., 1.[+]
;
|
Creation of the window
|
#132 = IFCPROPERTYSET('0fhz_bHU54xB$tXHjHPUZl', #2, 'Pset_WindowCommon', $,
(#133, #134, #135, #136, #137, #138, #139, #140, #141, #142, #143, #144));
#133 = IFCPROPERTYSINGLEVALUE('Reference', 'Reference', IFCTEXT(''), $);
#134 = IFCPROPERTYSINGLEVALUE('FireRating', 'FireRating', IFCTEXT(''), $);
#135 = IFCPROPERTYSINGLEVALUE('AcousticRating', 'AcousticRating', IFCTEXT(''), $);
#136 = IFCPROPERTYSINGLEVALUE('SecurityRating', 'SecurityRating', IFCTEXT(''), $);
#137 = IFCPROPERTYSINGLEVALUE('IsExternal', 'IsExternal', IFCBOOLEAN(.T.), $);
#138 = IFCPROPERTYSINGLEVALUE('Infiltration', 'Infiltration', IFCBOOLEAN(.F.), $);
#139 = IFCPROPERTYSINGLEVALUE('ThermalTransmittance', 'ThermalTransmittance', IFCREAL(2.400E-1), $);
#140 = IFCPROPERTYSINGLEVALUE('GlazingAresFraction', 'GlazingAresFraction', IFCREAL(7.000E-1), $);
#141 = IFCPROPERTYSINGLEVALUE('HandicapAccessible', 'HandicapAccessible', IFCBOOLEAN(.F.), $);
#142 = IFCPROPERTYSINGLEVALUE('FireExit', 'FireExit', IFCBOOLEAN(.F.), $);
#143 = IFCPROPERTYSINGLEVALUE('SelfClosing', 'SelfClosing', IFCBOOLEAN(.F.), $);
#144 = IFCPROPERTYSINGLEVALUE('SmokeStop', 'SmokeStop', IFCBOOLEAN(.F.), $);
#145 = IFCRELDEFINESBYPROPERTIES('2fHMxamlj5DvGvEKfCk8nj', #2, $, $, (#124), #132);
#146 = IFCELEMENTQUANTITY('0bB_7AP5v5OBZ90TDvo0Fo', #2, 'BaseQuantities', $, $, (#147, #148));
#147 = IFCQUANTITYLENGTH('Height', 'Height', $, 1.400);
#148 = IFCQUANTITYLENGTH('Width', 'Width', $, 7.500E-1);
#149 = IFCRELDEFINESBYPROPERTIES('0FmgI0DRX49OXL_$Wa2P1E', #2, $, $, (#124), #146);
|
Creation of the alphanumeric property and quantity information
|
ENDSEC; END-ISO-10303-21; |
end of the DATA SECTION |
Result shown in an IFC Viewer
NOTE: for displaying the ifcXML file you need to install the latest version (build 452 and later) of the IfcStoreyView.


