Merge remote-tracking branch 'origin/v0.6.0' into v0.7.0

# Conflicts:
#	.github/workflows/ci.yml
#	src/ifcparse/IfcParse.cpp
This commit is contained in:
Thomas Krijnen
2021-09-24 09:03:58 +02:00
510 changed files with 12218 additions and 3312 deletions
+2
View File
@@ -268,6 +268,8 @@ public:
unsigned int FreshId() { return ++MaxId; }
unsigned int getMaxId() { return MaxId; }
void recalculate_id_counter();
IfcUtil::IfcBaseClass* addEntity(IfcUtil::IfcBaseClass* entity, int id=-1);
+18
View File
@@ -1844,6 +1844,18 @@ IfcUtil::IfcBaseClass* IfcFile::addEntity(IfcUtil::IfcBaseClass* entity, int id)
(*it) *= conversion_factor;
}
IfcWrite::IfcWriteArgument* copy = new IfcWrite::IfcWriteArgument();
copy->set(v);
we->setArgument(i, copy);
} else if (attr_type == IfcUtil::Argument_AGGREGATE_OF_AGGREGATE_OF_DOUBLE) {
std::vector<std::vector<double>> v = *attr;
for (std::vector<std::vector<double>>::iterator it = v.begin(); it != v.end(); ++it) {
std::vector<double>& v2 = (*it);
for (std::vector<double>::iterator jt = v2.begin(); jt != v2.end(); ++jt) {
(*jt) *= conversion_factor;
}
}
IfcWrite::IfcWriteArgument* copy = new IfcWrite::IfcWriteArgument();
copy->set(v);
we->setArgument(i, copy);
@@ -2368,7 +2380,13 @@ void IfcFile::setDefaultHeaderValues() {
std::pair<IfcUtil::IfcBaseClass*, double> IfcFile::getUnit(const std::string& unit_type) {
std::pair<IfcUtil::IfcBaseClass*, double> return_value(0, 1.);
aggregate_of_instance::ptr projects = instances_by_type(schema()->declaration_by_name("IfcProject"));
if (!projects || projects->size() == 0) {
try {
projects = instances_by_type(schema()->declaration_by_name("IfcContext"));
} catch ( IfcException& e ) {}
}
if (projects && projects->size() == 1) {
IfcUtil::IfcBaseClass* project = *projects->begin();
+2 -2
View File
@@ -383,12 +383,12 @@ namespace IfcParse {
virtual const entity* as_entity() const { return this; }
};
class instance_factory {
class IFC_PARSE_API instance_factory {
public:
virtual IfcUtil::IfcBaseClass* operator()(IfcEntityInstanceData* data) const = 0;
};
class schema_definition {
class IFC_PARSE_API schema_definition {
private:
std::string name_;