Files
IfcOpenShell/src/ifcgeom/Converter.h
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
2.2 KiB
C++
Raw Normal View History

2023-03-21 20:15:01 +01:00
#ifndef ITERATOR_KERNEL_H
#define ITERATOR_KERNEL_H
#include "../ifcparse/IfcFile.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 {
2025-09-26 14:24:49 +02:00
class IFC_GEOM_API Converter {
2023-03-21 20:15:01 +01:00
public:
typedef boost::shared_ptr<IfcGeom::Representation::BRep> brep_ptr;
private:
2023-11-15 10:32:20 +01:00
ifcopenshell::geometry::abstract_mapping* mapping_;
2025-09-26 14:24:49 +02:00
std::unique_ptr<ifcopenshell::geometry::kernels::AbstractKernel> kernel_;
2023-11-15 10:32:20 +01:00
ifcopenshell::geometry::Settings settings_;
std::map<ifcopenshell::geometry::taxonomy::ptr, brep_ptr, ifcopenshell::geometry::taxonomy::less_functor> cache_;
2023-03-21 20:15:01 +01:00
public:
2025-09-26 14:24:49 +02:00
ifcopenshell::geometry::kernels::AbstractKernel* kernel() { return &*kernel_; }
2023-03-21 20:15:01 +01:00
2025-09-26 14:24:49 +02:00
Converter(std::unique_ptr<ifcopenshell::geometry::kernels::AbstractKernel>&& geometry_library, IfcParse::IfcFile* file, ifcopenshell::geometry::Settings& settings);
2023-03-21 20:15:01 +01:00
~Converter();
2023-03-21 20:15:01 +01:00
2023-11-15 10:32:20 +01:00
ifcopenshell::geometry::abstract_mapping* mapping() const { return mapping_; }
2023-03-21 20:15:01 +01:00
/*
virtual NativeElement<double, double>* convert(
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.;
IfcGeom::ConversionResults convert(express::Base item);
2023-03-21 20:15:01 +01:00
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);
2023-03-21 20:15:01 +01:00
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*);
2024-12-10 11:19:43 +01:00
const ifcopenshell::geometry::Settings& settings() { return settings_; }
2023-03-21 20:15:01 +01:00
};
}}
#endif