2023-03-21 20:15:01 +01:00
|
|
|
#ifndef ITERATOR_KERNEL_H
|
|
|
|
|
#define ITERATOR_KERNEL_H
|
|
|
|
|
|
2026-03-31 15:32:36 +02:00
|
|
|
#include "../ifcparse/file.h"
|
2026-08-08 14:19:57 +02:00
|
|
|
#include "../ifcgeom/conversion_settings.h"
|
|
|
|
|
#include "../ifcgeom/conversion_result.h"
|
2023-03-21 20:15:01 +01:00
|
|
|
#include "../ifcgeom/abstract_mapping.h"
|
2026-08-08 14:19:57 +02:00
|
|
|
#include "../ifcgeom/conversion_settings.h"
|
|
|
|
|
#include "../ifcgeom/abstract_kernel.h"
|
|
|
|
|
#include "../ifcgeom/element.h"
|
2023-03-21 20:15:01 +01:00
|
|
|
|
|
|
|
|
#include <boost/function.hpp>
|
2026-08-08 15:37:53 +02:00
|
|
|
#include <memory>
|
2023-03-21 20:15:01 +01:00
|
|
|
|
2026-08-08 07:42:45 +02:00
|
|
|
namespace ifcopenshell { namespace geom {
|
2023-03-21 20:15:01 +01:00
|
|
|
|
2026-08-08 07:42:45 +02:00
|
|
|
class IFC_GEOM_API converter {
|
2023-03-21 20:15:01 +01:00
|
|
|
public:
|
2026-08-08 15:56:41 +02:00
|
|
|
typedef std::shared_ptr<ifcopenshell::geom::brep> brep_ptr;
|
2023-03-21 20:15:01 +01:00
|
|
|
private:
|
2026-08-08 07:42:45 +02:00
|
|
|
ifcopenshell::geom::abstract_mapping* mapping_;
|
|
|
|
|
std::unique_ptr<ifcopenshell::geom::kernels::abstract_kernel> kernel_;
|
|
|
|
|
ifcopenshell::geom::settings settings_;
|
|
|
|
|
std::map<ifcopenshell::geom::taxonomy::ptr, brep_ptr, ifcopenshell::geom::taxonomy::less_functor> cache_;
|
2026-08-08 13:58:39 +02:00
|
|
|
ifcopenshell::logger& logger_;
|
2023-03-21 20:15:01 +01:00
|
|
|
|
|
|
|
|
public:
|
2026-08-08 07:42:45 +02:00
|
|
|
ifcopenshell::geom::kernels::abstract_kernel* kernel() { return &*kernel_; }
|
2023-03-21 20:15:01 +01:00
|
|
|
|
2026-08-08 13:58:39 +02:00
|
|
|
converter(std::unique_ptr<ifcopenshell::geom::kernels::abstract_kernel>&& geometry_library, ifcopenshell::file* file, ifcopenshell::geom::settings& settings, ifcopenshell::logger& logger = ifcopenshell::logger::root());
|
2023-03-21 20:15:01 +01:00
|
|
|
|
2026-08-08 07:42:45 +02:00
|
|
|
~converter();
|
2023-03-21 20:15:01 +01:00
|
|
|
|
2026-08-08 07:42:45 +02:00
|
|
|
ifcopenshell::geom::abstract_mapping* mapping() const { return mapping_; }
|
2026-08-08 13:58:39 +02:00
|
|
|
ifcopenshell::logger& logger() const { return logger_; }
|
2023-03-21 20:15:01 +01:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
virtual NativeElement<double, double>* convert(
|
2026-08-08 07:42:45 +02:00
|
|
|
const IteratorSettings& settings, express::base representation,
|
|
|
|
|
express::base product)
|
2023-03-21 20:15:01 +01:00
|
|
|
{
|
|
|
|
|
return implementation_->convert(settings, representation, product);
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
double total_map_time = 0.;
|
|
|
|
|
double total_geom_time = 0.;
|
|
|
|
|
|
2026-08-08 15:45:04 +02:00
|
|
|
std::vector<ifcopenshell::geom::conversion_result> convert(express::base item);
|
2023-03-21 20:15:01 +01:00
|
|
|
|
2026-08-08 07:42:45 +02:00
|
|
|
ifcopenshell::geom::brep_element* create_brep_for_representation_and_product(const express::base representation, const express::base product);
|
|
|
|
|
// ifcopenshell::geom::brep_element* create_brep_for_processed_representation(const express::base representation, const express::base product, ifcopenshell::geom::brep_element* brep);
|
2023-03-21 20:15:01 +01:00
|
|
|
|
2026-08-08 07:42:45 +02:00
|
|
|
ifcopenshell::geom::brep_element* create_brep_for_representation_and_product(ifcopenshell::geom::taxonomy::ptr, const express::base product, const ifcopenshell::geom::taxonomy::matrix4::ptr& place);
|
|
|
|
|
ifcopenshell::geom::brep_element* create_brep_for_processed_representation(const express::base product, const ifcopenshell::geom::taxonomy::matrix4::ptr& place, ifcopenshell::geom::brep_element*);
|
2024-12-10 11:19:43 +01:00
|
|
|
|
2026-08-08 07:42:45 +02:00
|
|
|
const ifcopenshell::geom::settings& settings() { return settings_; }
|
2023-03-21 20:15:01 +01:00
|
|
|
};
|
|
|
|
|
}}
|
|
|
|
|
|
2026-06-10 18:30:54 +02:00
|
|
|
#endif
|