mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-29 03:37:21 +00:00
Fix python wrapper
This commit is contained in:
@@ -52,8 +52,12 @@ public:
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
IfcEntityInstanceData(const IfcParse::declaration* type)
|
IfcEntityInstanceData(const IfcParse::declaration* type)
|
||||||
: file(0), id_(0), type_(type), attributes_(0)
|
: file(0), id_(0), type_(type), attributes_(new Argument*[getArgumentCount()])
|
||||||
{}
|
{
|
||||||
|
for (size_t i = 0; i < getArgumentCount(); ++i) {
|
||||||
|
attributes_[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void load() const;
|
void load() const;
|
||||||
|
|
||||||
|
|||||||
@@ -544,13 +544,10 @@ static const std::string& helper_fn_declaration_get_name(const IfcParse::declara
|
|||||||
const IfcParse::declaration* decl = schema->declaration_by_name(name);
|
const IfcParse::declaration* decl = schema->declaration_by_name(name);
|
||||||
IfcEntityInstanceData* data = new IfcEntityInstanceData(decl);
|
IfcEntityInstanceData* data = new IfcEntityInstanceData(decl);
|
||||||
|
|
||||||
size_t attr_count = 1;
|
for (size_t i = 0; i < data->getArgumentCount(); ++i) {
|
||||||
if (decl->as_entity()) {
|
data->setArgument(i, new IfcWrite::IfcWriteArgument());
|
||||||
attr_count = decl->as_entity()->attribute_count();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data->setArgument(attr_count - 1, new IfcWrite::IfcWriteArgument());
|
|
||||||
|
|
||||||
if (decl->as_entity()) {
|
if (decl->as_entity()) {
|
||||||
const std::vector<bool>& derived = decl->as_entity()->derived();
|
const std::vector<bool>& derived = decl->as_entity()->derived();
|
||||||
std::vector<bool>::const_iterator it = derived.begin();
|
std::vector<bool>::const_iterator it = derived.begin();
|
||||||
|
|||||||
Reference in New Issue
Block a user