Provide collection implementation in abstract_kernel

This commit is contained in:
Thomas Krijnen
2019-08-25 12:00:04 +02:00
parent 8ec2019003
commit 41d7fb32da
2 changed files with 9 additions and 1 deletions
@@ -39,6 +39,14 @@ ifcopenshell::geometry::kernels::AbstractKernel* ifcopenshell::geometry::kernels
}
}
bool ifcopenshell::geometry::kernels::AbstractKernel::convert_impl(const taxonomy::collection* collection, ifcopenshell::geometry::ConversionResults& r) {
auto s = r.size();
for (auto& c : collection->children) {
convert(c, r);
}
return r.size() > s;
}
//void ifcopenshell::geometry::kernels::AbstractKernel::set_conversion_placement_rel_to(const IfcParse::declaration* type) {
// placement_rel_to = type;
//}
+1 -1
View File
@@ -52,7 +52,7 @@ namespace ifcopenshell { namespace geometry { namespace kernels {
virtual bool convert_impl(const taxonomy::extrusion*, ifcopenshell::geometry::ConversionResults&) { throw std::runtime_error("Not implemented"); }
virtual bool convert_impl(const taxonomy::node*, ifcopenshell::geometry::ConversionResults&) { throw std::runtime_error("Not implemented"); }
virtual bool convert_impl(const taxonomy::colour*, ifcopenshell::geometry::ConversionResults&) { throw std::runtime_error("Not implemented"); }
virtual bool convert_impl(const taxonomy::collection*, ifcopenshell::geometry::ConversionResults&) { throw std::runtime_error("Not implemented"); }
virtual bool convert_impl(const taxonomy::collection*, ifcopenshell::geometry::ConversionResults&);
};
AbstractKernel* construct(const std::string& geometry_library, IfcParse::IfcFile*);