Make .dae support in IfcConvert using OpenCOLLADA optional

This commit is contained in:
Thomas Krijnen
2013-11-22 08:23:11 +00:00
parent eb433ff8e2
commit bbf80bedaa
3 changed files with 15 additions and 4 deletions
+3
View File
@@ -17,6 +17,8 @@
* * * *
********************************************************************************/ ********************************************************************************/
#ifdef WITH_OPENCOLLADA
#include <string> #include <string>
#include "ColladaSerializer.h" #include "ColladaSerializer.h"
@@ -278,3 +280,4 @@ void ColladaSerializer::finalize() {
exporter.endDocument(); exporter.endDocument();
} }
#endif
+4
View File
@@ -17,6 +17,8 @@
* * * *
********************************************************************************/ ********************************************************************************/
#ifdef WITH_OPENCOLLADA
#ifndef COLLADASERIALIZER_H #ifndef COLLADASERIALIZER_H
#define COLLADASERIALIZER_H #define COLLADASERIALIZER_H
@@ -152,3 +154,5 @@ public:
}; };
#endif #endif
#endif
+7 -3
View File
@@ -49,9 +49,11 @@ void printUsage(const boost::program_options::options_description& generic_optio
std::cerr << "Usage: IfcConvert [options] <input.ifc> [<output>]" << std::endl std::cerr << "Usage: IfcConvert [options] <input.ifc> [<output>]" << std::endl
<< std::endl << std::endl
<< "Converts the geometry in an IFC file into one of the following formats:" << std::endl << "Converts the geometry in an IFC file into one of the following formats:" << std::endl
<< " .obj WaveFront OBJ (a .mtl file is also created)" << std::endl << " .obj WaveFront OBJ (a .mtl file is also created)" << std::endl;
<< " .dae Collada Digital Assets Exchange" << std::endl #ifdef WITH_OPENCOLLADA
<< " .stp STEP Standard for the Exchange of Product Data" << std::endl std::cerr << " .dae Collada Digital Assets Exchange" << std::endl;
#endif
std::cerr << " .stp STEP Standard for the Exchange of Product Data" << std::endl
<< " .igs IGES Initial Graphics Exchange Specification" << std::endl << " .igs IGES Initial Graphics Exchange Specification" << std::endl
<< std::endl << std::endl
<< "Command line options" << std::endl << generic_options << std::endl << "Command line options" << std::endl << generic_options << std::endl
@@ -181,8 +183,10 @@ int main(int argc, char** argv) {
IfcGeomObjects::Settings(IfcGeomObjects::USE_WORLD_COORDS, true); IfcGeomObjects::Settings(IfcGeomObjects::USE_WORLD_COORDS, true);
} }
serializer = new WaveFrontOBJSerializer(output_filename, mtl_filename); serializer = new WaveFrontOBJSerializer(output_filename, mtl_filename);
#ifdef WITH_OPENCOLLADA
} else if (output_extension == ".dae") { } else if (output_extension == ".dae") {
serializer = new ColladaSerializer(output_filename); serializer = new ColladaSerializer(output_filename);
#endif
} else if (output_extension == ".stp") { } else if (output_extension == ".stp") {
serializer = new StepSerializer(output_filename); serializer = new StepSerializer(output_filename);
} else if (output_extension == ".igs") { } else if (output_extension == ".igs") {