| 392 | } |
| 393 | |
| 394 | IfcGeom::ConversionResults ifcopenshell::geometry::Converter::convert(IfcUtil::IfcBaseClass * item) |
| 395 | { |
| 396 | std::clock_t map_start = std::clock(); |
| 397 | auto geom_item = mapping_->map(item); |
| 398 | IfcGeom::ConversionResults results; |
| 399 | if (geom_item) { |
| 400 | std::clock_t geom_start = std::clock(); |
| 401 | if (!kernel_->convert(geom_item, results)) { |
| 402 | throw std::runtime_error("Failed to convert item"); |
| 403 | } |
| 404 | std::clock_t geom_end = std::clock(); |
| 405 | total_map_time += (geom_start - map_start) / (double) CLOCKS_PER_SEC; |
| 406 | total_geom_time += (geom_end - geom_start) / (double) CLOCKS_PER_SEC; |
| 407 | } |
| 408 | return results; |
| 409 | } |