Major update: taxonomy shared pointers, collection type safety, work towards hashing

This commit is contained in:
Thomas Krijnen
2023-07-27 16:42:06 +08:00
parent 98a73f1646
commit 65a5646bf0
122 changed files with 1669 additions and 1203 deletions
+3 -3
View File
@@ -23,7 +23,7 @@ using namespace ifcopenshell::geometry;
#define ALMOST_ZERO 1.e-7;
taxonomy::item* mapping::map_impl(const IfcSchema::IfcCircle* inst) {
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCircle* inst) {
const double r = inst->Radius() * length_unit_;
if (r < conv_settings_.getValue(ConversionSettings::GV_PRECISION)) {
Logger::Message(Logger::LOG_ERROR, "Radius not greater than zero for:", inst);
@@ -31,8 +31,8 @@ taxonomy::item* mapping::map_impl(const IfcSchema::IfcCircle* inst) {
}
IfcSchema::IfcAxis2Placement* placement = inst->Position();
auto c = new taxonomy::circle;
auto c = taxonomy::make<taxonomy::circle>();
c->radius = r;
c->matrix = as<taxonomy::matrix4>(map(placement));
c->matrix = taxonomy::cast<taxonomy::matrix4>(map(placement));
return c;
}