mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-17 19:09:07 +00:00
Fix compilation of serializers and convert
This commit is contained in:
@@ -30,6 +30,9 @@ namespace ifcopenshell { namespace geometry {
|
||||
class IFC_GEOM_API Triangulation;
|
||||
}
|
||||
|
||||
// @todo, this class is no longer necessary, we can directly use
|
||||
// taxonomy::matrix4, which does not need to be implemented specifically
|
||||
// in the respective kernels
|
||||
class IFC_GEOM_API ConversionResultPlacement {
|
||||
public:
|
||||
virtual void Multiply(const ConversionResultPlacement*) = 0;
|
||||
|
||||
+24
-7
@@ -194,8 +194,8 @@ namespace ifcopenshell { namespace geometry {
|
||||
int done;
|
||||
int total;
|
||||
|
||||
std::string unit_name;
|
||||
double unit_magnitude;
|
||||
std::string unit_name_;
|
||||
double unit_magnitude_;
|
||||
|
||||
gp_XYZ bounds_min_;
|
||||
gp_XYZ bounds_max_;
|
||||
@@ -205,6 +205,9 @@ namespace ifcopenshell { namespace geometry {
|
||||
/// @todo public/private sections all over the place: move all public to the beginning of the class
|
||||
public:
|
||||
|
||||
const std::string& unit_name() const { return unit_name_; }
|
||||
const double unit_magnitude() const { return unit_magnitude_; }
|
||||
|
||||
bool initialize() {
|
||||
converter_->mapping()->get_representations(tasks_, filters_, settings_);
|
||||
|
||||
@@ -357,10 +360,10 @@ namespace ifcopenshell { namespace geometry {
|
||||
}
|
||||
}
|
||||
|
||||
const std::string& getUnitName() const { return unit_name; }
|
||||
const std::string& getUnitName() const { return unit_name_; }
|
||||
|
||||
/// @note Double always as per IFC specification.
|
||||
double getUnitMagnitude() const { return unit_magnitude; }
|
||||
double getUnitMagnitude() const { return unit_magnitude_; }
|
||||
|
||||
std::string getLog() const { return Logger::GetLog(); }
|
||||
|
||||
@@ -418,6 +421,10 @@ namespace ifcopenshell { namespace geometry {
|
||||
if (task_result_index_ == all_processed_elements_.size()) {
|
||||
return create();
|
||||
}
|
||||
if (task_result_index_ == all_processed_elements_.size()) {
|
||||
return nullptr;
|
||||
}
|
||||
return all_processed_elements_[task_result_index_]->product();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -563,8 +570,8 @@ namespace ifcopenshell { namespace geometry {
|
||||
}
|
||||
private:
|
||||
void _initialize() {
|
||||
unit_name = "METER";
|
||||
unit_magnitude = 1.f;
|
||||
unit_name_ = "METER";
|
||||
unit_magnitude_ = 1.f;
|
||||
|
||||
// @todo
|
||||
|
||||
@@ -585,7 +592,7 @@ namespace ifcopenshell { namespace geometry {
|
||||
|
||||
bool owns_ifc_file;
|
||||
public:
|
||||
Iterator(const std::string& geometry_library, const settings& settings, IfcParse::IfcFile* file, const std::vector<ifcopenshell::geometry::filter_t>& filters, int num_threads)
|
||||
Iterator(const std::string& geometry_library, const settings& settings, IfcParse::IfcFile* file, const std::vector<ifcopenshell::geometry::filter_t>& filters, int num_threads = 1)
|
||||
: settings_(settings)
|
||||
, ifc_file(file)
|
||||
, filters_(filters)
|
||||
@@ -596,6 +603,16 @@ namespace ifcopenshell { namespace geometry {
|
||||
_initialize();
|
||||
}
|
||||
|
||||
Iterator(const settings& settings, IfcParse::IfcFile* file, int num_threads = 1)
|
||||
: settings_(settings)
|
||||
, ifc_file(file)
|
||||
, owns_ifc_file(false)
|
||||
, num_threads_(num_threads)
|
||||
, geometry_library_("opencascade")
|
||||
{
|
||||
_initialize();
|
||||
}
|
||||
|
||||
~Iterator() {
|
||||
if (owns_ifc_file) {
|
||||
delete ifc_file;
|
||||
@@ -1 +0,0 @@
|
||||
#include "IfcGeomIteratorImplementation.h"
|
||||
@@ -88,9 +88,7 @@ namespace ifcopenshell {
|
||||
const TopoDS_Shape& shape() const { return shape_; }
|
||||
operator const TopoDS_Shape& () { return shape_; }
|
||||
|
||||
virtual void Triangulate(const settings & settings, const ConversionResultPlacement * place, Representation::Triangulation<float>* t, int surface_style_id) const;
|
||||
|
||||
virtual void Triangulate(const settings & settings, const ConversionResultPlacement * place, Representation::Triangulation<double>* t, int surface_style_id) const;
|
||||
virtual void Triangulate(const settings & settings, const ConversionResultPlacement * place, Representation::Triangulation* t, int surface_style_id) const;
|
||||
|
||||
virtual void Serialize(std::string&) const {
|
||||
throw std::runtime_error("Not implemented");
|
||||
|
||||
Reference in New Issue
Block a user