2026-04-14 13:50:23 +02:00
|
|
|
#ifndef IFC_GEOM_SERIALIZATION_H
|
|
|
|
|
#define IFC_GEOM_SERIALIZATION_H
|
|
|
|
|
|
2026-01-04 10:40:02 +01:00
|
|
|
#include "../../ifcparse/express.h"
|
2026-04-14 13:50:23 +02:00
|
|
|
#include "../../plugin/plugin.h"
|
|
|
|
|
#include "../../ifcgeom/ConversionResult.h"
|
2017-12-22 17:37:58 +01:00
|
|
|
|
2025-09-26 14:24:49 +02:00
|
|
|
#include "ifc_geomserialization_api.h"
|
2022-06-15 13:56:47 +02:00
|
|
|
|
2026-04-14 13:50:23 +02:00
|
|
|
#include <boost/function.hpp>
|
2017-12-22 17:37:58 +01:00
|
|
|
|
2026-04-14 13:50:23 +02:00
|
|
|
#include <map>
|
2017-12-22 17:37:58 +01:00
|
|
|
#include <string>
|
|
|
|
|
|
2026-04-14 13:50:23 +02:00
|
|
|
class TopoDS_Shape;
|
|
|
|
|
|
|
|
|
|
namespace ifcopenshell {
|
|
|
|
|
class file;
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-22 17:37:58 +01:00
|
|
|
namespace IfcGeom {
|
2026-04-14 13:50:23 +02:00
|
|
|
class IFC_GEOMSERIALIZATION_API opencascade_geometry_ifc_writer_registry {
|
|
|
|
|
public:
|
|
|
|
|
typedef boost::function3<express::Base, ifcopenshell::file&, const ConversionResultShape&, double> tesselate_fn;
|
|
|
|
|
typedef boost::function3<express::Base, ifcopenshell::file&, const ConversionResultShape&, bool> serialise_fn;
|
|
|
|
|
|
|
|
|
|
void bind(const std::string& schema_name, serialise_fn serialise, tesselate_fn tesselate, const ifcopenshell::plugin::module& module = ifcopenshell::plugin::module());
|
|
|
|
|
express::Base tesselate(ifcopenshell::file& f, const ConversionResultShape& shape, double deflection) const;
|
|
|
|
|
express::Base serialise(ifcopenshell::file& f, const ConversionResultShape& shape, bool advanced) const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
struct entry {
|
|
|
|
|
serialise_fn serialise_;
|
|
|
|
|
tesselate_fn tesselate_;
|
|
|
|
|
ifcopenshell::plugin::module module_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
std::map<std::string, entry> entries_;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
IFC_GEOMSERIALIZATION_API opencascade_geometry_ifc_writer_registry& opencascade_geometry_ifc_writer_registry_instance();
|
|
|
|
|
|
|
|
|
|
IFC_GEOMSERIALIZATION_API express::Base tesselate(ifcopenshell::file& f, const ConversionResultShape& shape, double deflection);
|
|
|
|
|
IFC_GEOMSERIALIZATION_API express::Base serialise(ifcopenshell::file& f, const ConversionResultShape& shape, bool advanced);
|
2026-03-31 15:32:36 +02:00
|
|
|
IFC_GEOMSERIALIZATION_API express::Base tesselate(ifcopenshell::file& f, const TopoDS_Shape& shape, double deflection);
|
|
|
|
|
IFC_GEOMSERIALIZATION_API express::Base serialise(ifcopenshell::file& f, const TopoDS_Shape& shape, bool advanced);
|
2026-01-04 10:40:02 +01:00
|
|
|
} // namespace IfcGeom
|
2026-04-14 13:50:23 +02:00
|
|
|
|
|
|
|
|
#endif
|