mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
HDF5 optional in code
This commit is contained in:
@@ -105,7 +105,9 @@ void print_usage(bool suggest_help = true)
|
||||
<< " .igs IGES Initial Graphics Exchange Specification\n"
|
||||
<< " .xml XML Property definitions and decomposition tree\n"
|
||||
<< " .svg SVG Scalable Vector Graphics (2D floor plan)\n"
|
||||
#ifdef WITH_HDF5
|
||||
<< " .h5 HDF Hierarchical Data Format storing positions, normals and indices\n"
|
||||
#endif
|
||||
<< " .ifc IFC-SPF Industry Foundation Classes\n"
|
||||
<< "\n"
|
||||
<< "If no output filename given, <input>" << IfcUtil::path::from_utf8(DEFAULT_EXTENSION) << " will be used as the output file.\n";
|
||||
@@ -834,10 +836,12 @@ int main(int argc, char** argv) {
|
||||
settings.set(IfcGeom::IteratorSettings::DISABLE_TRIANGULATION, true);
|
||||
serializer = boost::make_shared<SvgSerializer>(IfcUtil::path::to_utf8(output_temp_filename), settings);
|
||||
}
|
||||
#ifdef WITH_HDF5
|
||||
else if (output_extension == HDF) {
|
||||
settings.set(IfcGeom::IteratorSettings::DISABLE_TRIANGULATION, true);
|
||||
serializer = boost::make_shared<HdfSerializer>(IfcUtil::path::to_utf8(output_temp_filename), settings);
|
||||
}
|
||||
#endif
|
||||
|
||||
else {
|
||||
cerr_ << "[Error] Unknown output filename extension '" << output_extension << "'\n";
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
* *
|
||||
********************************************************************************/
|
||||
|
||||
#ifdef WITH_HDF5
|
||||
|
||||
#include "HdfSerializer.h"
|
||||
|
||||
@@ -125,3 +126,5 @@ void HdfSerializer::write(const IfcGeom::BRepElement* o) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -20,6 +20,8 @@
|
||||
#ifndef HdfSERIALIZER_H
|
||||
#define HdfSERIALIZER_H
|
||||
|
||||
#ifdef WITH_HDF5
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
@@ -55,3 +57,5 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user