mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
Make .dae support in IfcConvert using OpenCOLLADA optional
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
* *
|
* *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifdef WITH_OPENCOLLADA
|
||||||
|
|
||||||
#ifndef COLLADASERIALIZER_H
|
#ifndef COLLADASERIALIZER_H
|
||||||
#define COLLADASERIALIZER_H
|
#define COLLADASERIALIZER_H
|
||||||
|
|
||||||
@@ -151,4 +153,6 @@ public:
|
|||||||
bool isTesselated() const { return true; }
|
bool isTesselated() const { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -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") {
|
||||||
|
|||||||
Reference in New Issue
Block a user