Implement option to get generic inverses from Python

This commit is contained in:
Thomas Krijnen
2016-07-18 14:47:32 +02:00
parent 4a85e5e7a5
commit b7f23ee701
2 changed files with 10 additions and 2 deletions
+4
View File
@@ -82,6 +82,10 @@ namespace IfcUtil {
IfcEntityList::ptr traverse(IfcParse::IfcLateBoundEntity* e, int max_level=-1) {
return $self->traverse(e, max_level);
}
IfcEntityList::ptr get_inverse(IfcParse::IfcLateBoundEntity* e) {
return $self->getInverse(e->id(), IfcSchema::Type::UNDEFINED, -1);
}
void write(const std::string& fn) {
std::ofstream f(fn.c_str());
f << (*$self);