Allow for string data to be passed as vectors of int between IfcPython and IfcGeom, to circumvent SWG trying to access UCS-2 data as UCS-4 and vice versa

This commit is contained in:
Thomas Krijnen
2011-12-05 14:23:22 +00:00
parent cab44ce754
commit 08d3eb649c
4 changed files with 98 additions and 64 deletions
+7 -2
View File
@@ -435,8 +435,13 @@ const IfcGeomObjects::IfcGeomObject* IfcGeomObjects::Get() {
bool IfcGeomObjects::Init(const std::string fn) {
return IfcGeomObjects::Init(fn, 0, 0);
}
bool IfcGeomObjects::InitUCS2(char* fn) {
return IfcGeomObjects::Init(fn+1, 0, 0);
bool IfcGeomObjects::Init(const std::vector<int>& fn) {
std::string f;
for ( std::vector<int>::const_iterator it = fn.begin(); it != fn.end(); ++ it ) {
const char c = (char) *it;
f.push_back(c);
}
return IfcGeomObjects::Init(f, 0, 0);
}
bool _Init() {
shapereps = Ifc::EntitiesByType<Ifc2x3::IfcShapeRepresentation>();