mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 18:43:26 +00:00
Preprocessor stuff for stp and igs serializers
This commit is contained in:
@@ -21,9 +21,15 @@
|
||||
#define IGESSERIALIZER_H
|
||||
|
||||
#include "OpenCascadeBasedSerializer.h"
|
||||
#include "../ifcparse/IfcLogger.h"
|
||||
|
||||
#include <IGESControl_Writer.hxx>
|
||||
|
||||
#ifndef HAVE_CONFIG_H
|
||||
/// @note this is brittle, but apparently the only way to differentiate OCCT
|
||||
/// from OCE. In the latter including this header fails for some versions.
|
||||
#include <Interface_Static.hxx>
|
||||
#endif
|
||||
|
||||
class IgesSerializer : public OpenCascadeBasedSerializer
|
||||
{
|
||||
@@ -45,8 +51,12 @@ public:
|
||||
void setUnitNameAndMagnitude(const std::string& /*name*/, float magnitude) {
|
||||
const char* symbol = getSymbolForUnitMagnitude(magnitude);
|
||||
if (symbol) {
|
||||
#ifdef HAVE_CONFIG_H
|
||||
Logger::Warning("Setting IGES units not supported on OCE");
|
||||
#else
|
||||
Interface_Static::SetCVal("xstep.cascade.unit", symbol);
|
||||
Interface_Static::SetCVal("write.iges.unit", symbol);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user