mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 10:57:49 +00:00
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:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user