Files
IfcOpenShell/src/ifcgeom/Converter.h
T
2026-03-31 15:32:36 +02:00

58 lines
2.2 KiB
C++

#ifndef ITERATOR_KERNEL_H
#define ITERATOR_KERNEL_H
#include "../ifcparse/file.h"
#include "../ifcgeom/ConversionSettings.h"
#include "../ifcgeom/ConversionResult.h"
#include "../ifcgeom/abstract_mapping.h"
#include "../ifcgeom/ConversionSettings.h"
#include "../ifcgeom/AbstractKernel.h"
#include "../ifcgeom/IfcGeomElement.h"
#include <boost/function.hpp>
namespace ifcopenshell { namespace geometry {
class IFC_GEOM_API Converter {
public:
typedef boost::shared_ptr<IfcGeom::Representation::BRep> brep_ptr;
private:
ifcopenshell::geometry::abstract_mapping* mapping_;
std::unique_ptr<ifcopenshell::geometry::kernels::AbstractKernel> kernel_;
ifcopenshell::geometry::Settings settings_;
std::map<ifcopenshell::geometry::taxonomy::ptr, brep_ptr, ifcopenshell::geometry::taxonomy::less_functor> cache_;
public:
ifcopenshell::geometry::kernels::AbstractKernel* kernel() { return &*kernel_; }
Converter(std::unique_ptr<ifcopenshell::geometry::kernels::AbstractKernel>&& geometry_library, ifcopenshell::file* file, ifcopenshell::geometry::Settings& settings);
~Converter();
ifcopenshell::geometry::abstract_mapping* mapping() const { return mapping_; }
/*
virtual NativeElement<double, double>* convert(
const IteratorSettings& settings, express::Base representation,
express::Base product)
{
return implementation_->convert(settings, representation, product);
}
*/
double total_map_time = 0.;
double total_geom_time = 0.;
IfcGeom::ConversionResults convert(express::Base item);
IfcGeom::BRepElement* create_brep_for_representation_and_product(const express::Base representation, const express::Base product);
// IfcGeom::BRepElement* create_brep_for_processed_representation(const express::Base representation, const express::Base product, IfcGeom::BRepElement* brep);
IfcGeom::BRepElement* create_brep_for_representation_and_product(ifcopenshell::geometry::taxonomy::ptr, const express::Base product, const ifcopenshell::geometry::taxonomy::matrix4::ptr& place);
IfcGeom::BRepElement* create_brep_for_processed_representation(const express::Base product, const ifcopenshell::geometry::taxonomy::matrix4::ptr& place, IfcGeom::BRepElement*);
const ifcopenshell::geometry::Settings& settings() { return settings_; }
};
}}
#endif