mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 13:46:54 +00:00
Track time; fixes for wall connectivity check
This commit is contained in:
@@ -44,11 +44,16 @@ ifcopenshell::geometry::NativeElement* ifcopenshell::geometry::Converter::create
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
std::clock_t map_start = std::clock();
|
||||
|
||||
// @todo how to combine product_node and rep_item?
|
||||
auto product_node = (taxonomy::geom_item*) mapping_->map(product);
|
||||
if (product_node == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::clock_t geom_start = std::clock();
|
||||
|
||||
auto place = taxonomy::matrix4();
|
||||
std::swap(place, product_node->matrix);
|
||||
@@ -57,6 +62,11 @@ ifcopenshell::geometry::NativeElement* ifcopenshell::geometry::Converter::create
|
||||
|
||||
shape = new ifcopenshell::geometry::Representation::BRep(s, representation_id_builder.str(), shapes);
|
||||
|
||||
std::clock_t geom_end = std::clock();
|
||||
|
||||
total_map_time += (geom_start - map_start) / (double) CLOCKS_PER_SEC;
|
||||
total_geom_time += (geom_end - geom_start) / (double) CLOCKS_PER_SEC;
|
||||
|
||||
return new NativeElement(
|
||||
product->data().id(),
|
||||
parent_id,
|
||||
|
||||
@@ -76,10 +76,18 @@ namespace ifcopenshell { namespace geometry {
|
||||
}
|
||||
*/
|
||||
|
||||
double total_map_time = 0.;
|
||||
double total_geom_time = 0.;
|
||||
|
||||
ifcopenshell::geometry::ConversionResults convert(IfcUtil::IfcBaseClass* item) {
|
||||
std::clock_t map_start = std::clock();
|
||||
auto geom_item = mapping_->map(item);
|
||||
std::clock_t geom_start = std::clock();
|
||||
ifcopenshell::geometry::ConversionResults results;
|
||||
kernel_->convert(geom_item, results);
|
||||
std::clock_t geom_end = std::clock();
|
||||
total_map_time += (geom_start - map_start) / (double) CLOCKS_PER_SEC;
|
||||
total_geom_time += (geom_end - geom_start) / (double) CLOCKS_PER_SEC;
|
||||
return results;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user