- Correctly format REALs according to ISO 10303-21 instead of C++ std::stream double formatting

- Add the IfcHierarchyHelper to assist in the creation of IFC files
- Add the IfcOpenHouse example for writing topological geometry and tessellated Open Cascade shapes to IFC
This commit is contained in:
Thomas Krijnen
2012-11-04 16:26:33 +00:00
parent db98906643
commit e56281a72e
14 changed files with 1359 additions and 96 deletions
+15
View File
@@ -74,6 +74,9 @@ typedef IfcBaseClass* IfcSchemaEntity;
}
template <class T>
class IfcTemplatedEntityList;
class IfcEntityList {
std::vector<IfcUtil::IfcSchemaEntity> ls;
public:
@@ -86,6 +89,12 @@ public:
it end();
IfcUtil::IfcSchemaEntity operator[] (int i);
int Size() const;
template <class U>
typename U::list as() {
typename U::list r(new IfcTemplatedEntityList<U>());
for ( it i = begin(); i != end(); ++ i ) if ((*i)->is(U::Class())) r->push((U*)*i);
return r;
}
};
template <class T>
@@ -104,6 +113,12 @@ public:
for ( it i = begin(); i != end(); ++ i ) r->push(*i);
return r;
}
template <class U>
typename U::list as() {
typename U::list r(new IfcTemplatedEntityList<U>());
for ( it i = begin(); i != end(); ++ i ) if ((*i)->is(U::Class())) r->push(*i);
return r;
}
};
namespace IfcUtil {