Close to working executable

This commit is contained in:
Thomas Krijnen
2019-08-18 15:53:26 +02:00
parent 8f88c601c6
commit 94aa7dfab4
7 changed files with 49 additions and 16 deletions
+17 -1
View File
@@ -126,7 +126,6 @@ namespace {
taxonomy::item* mapping::map(const IfcSchema::IfcExtrudedAreaSolid* inst) {
// @todo length unit
return new taxonomy::extrusion(
inst,
as<taxonomy::matrix4>(map(inst->Position())),
as<taxonomy::face>(map(inst->SweptArea())),
as<taxonomy::direction3>(map(inst->ExtrudedDirection())),
@@ -134,6 +133,23 @@ taxonomy::item* mapping::map(const IfcSchema::IfcExtrudedAreaSolid* inst) {
);
}
taxonomy::item* mapping::map(const IfcSchema::IfcRepresentation* inst) {
auto c = new taxonomy::collection();
IfcSchema::IfcRepresentationItem::list::ptr items = inst->Items();
if (items->size()) {
for (IfcSchema::IfcRepresentationItem::list::it it = items->begin(); it != items->end(); ++it) {
if (auto r = map(*it)) {
c->children.push_back(r);
}
}
}
if (c->children.empty()) {
delete c;
return nullptr;
}
return c;
}
taxonomy::item* mapping::map(const IfcSchema::IfcAxis2Placement3D* inst) {
// @todo length unit
return new taxonomy::matrix4();