mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-06 12:26:26 +00:00
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:
@@ -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>();
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace IfcGeomObjects {
|
||||
};
|
||||
|
||||
bool Init(const std::string fn);
|
||||
bool InitUCS2(char* fn);
|
||||
bool Init(const std::vector<int>& fn);
|
||||
bool Init(void* data, int len);
|
||||
bool Init(const std::string fn, std::ostream* log1= 0, std::ostream* log2= 0);
|
||||
bool Init(std::istream& f, int len, std::ostream* log1= 0, std::ostream* log2= 0);
|
||||
|
||||
Reference in New Issue
Block a user