|
1 | 1 | ABOUT IFC++
|
2 | 2 | =============
|
3 |
| -## Summary |
4 |
| -IFC++ is an open source IFC implementation for C++. It was originally developed at the Bauhaus University Weimar. |
5 | 3 |
|
| 4 | +IFC++ is an open source IFC implementation for C++. |
| 5 | +It is very fast, but it has not the lowest possible memory footprint, because it has a complete class model. |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +Benefits of the complete class model are (among others): |
| 10 | +- you can easily instantiate objects and access member variables, for example: |
| 11 | +```cpp |
| 12 | + shared_ptr<IfcCartesianPoint> ifcPoint = make_shared<IfcCartesianPoint>(); |
| 13 | + shared_ptr<IfcPolyLoop> polyLoop = make_shared<IfcPolyLoop>() |
| 14 | + polyLoop->m_Polygon.push_back(ifcPoint); |
| 15 | +``` |
| 16 | + |
| 17 | +- you can navigate the model easily by accessing member variables directly, including inverse attributes: |
| 18 | +```cpp |
| 19 | +shared_ptr<IfcBuildingStorey> currentBuildingStorey = ...; |
| 20 | +for (auto it : currentBuildingStorey->m_IsDecomposedBy_inverse) |
| 21 | +{ |
| 22 | + shared_ptr<IfcRelAggregates> relAggregates(it); |
| 23 | + |
| 24 | + for (auto it2 : relAggregates->m_RelatedObjects) |
| 25 | + { |
| 26 | + shared_ptr<IfcObjectDefinition> child_obj = (it2); |
| 27 | + shared_ptr<IfcWallStandardCase> wall = dynamic_pointer_cast<IfcWallStandardCase>(child_obj); |
| 28 | + if(wall) |
| 29 | + { |
| 30 | + // do something with wall |
| 31 | + } |
| 32 | + } |
| 33 | + } |
| 34 | +``` |
| 35 | + Inverse attribute pointers are automatically generated by IFC++ for all object references in the model. |
| 36 | + |
| 37 | +- casting is possible for all types: |
| 38 | + ```cpp |
| 39 | + shared_ptr<IfcPropertySet> pset = dynamic_pointer_cast<IfcPropertySet>(relatingPropertyDefinition); |
| 40 | + ``` |
| 41 | + |
| 42 | +- Professional support is available for bug fixing or custom implementations on www.ifcquery.com. |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
6 | 48 | ## License
|
7 | 49 | The project is published under the MIT license, which means that you can use it for any purpose, personal or commercial. There is no obligation to publish your source code.
|
8 | 50 |
|
| 51 | + |
9 | 52 | ## Details and download of executable
|
10 |
| -Additional information as well as download links to the viewer application is on this project website: http://www.ifcquery.com |
| 53 | +Open source example application for Qt here available: https://github.com/ifcquery/ifcplusplus/releases |
| 54 | + |
11 | 55 |
|
12 | 56 | ## How to build the library and example application on Windows and Linux
|
13 | 57 | https://github.com/ifcquery/ifcplusplus/wiki/Build-instructions
|
|
0 commit comments