mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-20 20:22:09 +00:00
Schema dependent serializers
This commit is contained in:
@@ -26,11 +26,11 @@
|
||||
* *
|
||||
********************************************************************************/
|
||||
|
||||
#include "../ifcconvert/ColladaSerializer.h"
|
||||
#include "../ifcconvert/IgesSerializer.h"
|
||||
#include "../ifcconvert/StepSerializer.h"
|
||||
#include "../ifcconvert/WavefrontObjSerializer.h"
|
||||
#include "../ifcconvert/SvgSerializer.h"
|
||||
#include "../serializers/ColladaSerializer.h"
|
||||
#include "../serializers/IgesSerializer.h"
|
||||
#include "../serializers/StepSerializer.h"
|
||||
#include "../serializers/WavefrontObjSerializer.h"
|
||||
#include "../serializers/SvgSerializer.h"
|
||||
|
||||
#include "../ifcgeom_schema_agnostic/IfcGeomIterator.h"
|
||||
|
||||
|
||||
@@ -12,17 +12,17 @@
|
||||
|
||||
#include <TopExp_Explorer.hxx>
|
||||
|
||||
namespace IfcGeom {
|
||||
|
||||
namespace impl {
|
||||
// LayerAssignments renamed from plural to singular, LayerAssignment, so work around that
|
||||
IfcEntityList::ptr getLayerAssignments(Ifc2x3::IfcRepresentationItem* item) {
|
||||
return item->LayerAssignments()->generalize();
|
||||
}
|
||||
IfcEntityList::ptr getLayerAssignments(Ifc4::IfcRepresentationItem* item) {
|
||||
return item->LayerAssignment()->generalize();
|
||||
}
|
||||
namespace {
|
||||
// LayerAssignments renamed from plural to singular, LayerAssignment, so work around that
|
||||
IfcEntityList::ptr getLayerAssignments(Ifc2x3::IfcRepresentationItem* item) {
|
||||
return item->LayerAssignments()->generalize();
|
||||
}
|
||||
IfcEntityList::ptr getLayerAssignments(Ifc4::IfcRepresentationItem* item) {
|
||||
return item->LayerAssignment()->generalize();
|
||||
}
|
||||
}
|
||||
|
||||
namespace IfcGeom {
|
||||
|
||||
template <typename T>
|
||||
class BRepElement;
|
||||
@@ -110,7 +110,7 @@ namespace IfcGeom {
|
||||
|
||||
Schema::IfcRepresentationItem::list::ptr items = r->as<Schema::IfcRepresentationItem>();
|
||||
for (Schema::IfcRepresentationItem::list::it it = items->begin(); it != items->end(); ++it) {
|
||||
Schema::IfcPresentationLayerAssignment::list::ptr a = impl::getLayerAssignments(*it)->as<Schema::IfcPresentationLayerAssignment>();
|
||||
Schema::IfcPresentationLayerAssignment::list::ptr a = getLayerAssignments(*it)->as<Schema::IfcPresentationLayerAssignment>();
|
||||
for (Schema::IfcPresentationLayerAssignment::list::it jt = a->begin(); jt != a->end(); ++jt) {
|
||||
layers[(*jt)->Name()] = *jt;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
#include "../ifcgeom_schema_agnostic/IfcGeomIterator.h"
|
||||
|
||||
#include "../ifcconvert/GeometrySerializer.h"
|
||||
#include "../serializers/GeometrySerializer.h"
|
||||
|
||||
#include <boost/numeric/ublas/matrix.hpp>
|
||||
#include <boost/numeric/ublas/io.hpp>
|
||||
@@ -86,7 +86,7 @@ private:
|
||||
const std::string scene_id;
|
||||
bool scene_opened;
|
||||
std::stack<COLLADASW::Node*> parentNodes;
|
||||
std::stack<IfcGeom::Transformation<double> > matrixStack;
|
||||
std::stack<IfcGeom::Transformation<real_t> > matrixStack;
|
||||
public:
|
||||
ColladaScene(const std::string& scene_id, COLLADASW::StreamWriter& stream, ColladaSerializer *_serializer)
|
||||
: COLLADASW::LibraryVisualScenes(&stream)
|
||||
|
||||
@@ -26,7 +26,7 @@ typedef double real_t;
|
||||
typedef float real_t;
|
||||
#endif
|
||||
|
||||
#include "../ifcconvert/Serializer.h"
|
||||
#include "../serializers/Serializer.h"
|
||||
#include "../ifcgeom_schema_agnostic/IfcGeomIterator.h"
|
||||
#include "../ifcgeom/IfcGeomElement.h"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "../ifcgeom_schema_agnostic/IfcGeomIterator.h"
|
||||
|
||||
#include "../ifcconvert/GeometrySerializer.h"
|
||||
#include "../serializers/GeometrySerializer.h"
|
||||
|
||||
class OpenCascadeBasedSerializer : public GeometrySerializer {
|
||||
OpenCascadeBasedSerializer(const OpenCascadeBasedSerializer&); //N/A
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "../ifcgeom_schema_agnostic/IfcGeomIterator.h"
|
||||
|
||||
#include "../ifcconvert/OpenCascadeBasedSerializer.h"
|
||||
#include "../serializers/OpenCascadeBasedSerializer.h"
|
||||
|
||||
class StepSerializer : public OpenCascadeBasedSerializer
|
||||
{
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#ifndef SVGSERIALIZER_H
|
||||
#define SVGSERIALIZER_H
|
||||
|
||||
#include "../ifcconvert/GeometrySerializer.h"
|
||||
#include "../ifcconvert/util.h"
|
||||
#include "../serializers/GeometrySerializer.h"
|
||||
#include "../serializers/util.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
|
||||
#include "../ifcconvert/GeometrySerializer.h"
|
||||
#include "../serializers/GeometrySerializer.h"
|
||||
|
||||
// http://people.sc.fsu.edu/~jburkardt/txt/obj_format.txt
|
||||
class WaveFrontOBJSerializer : public GeometrySerializer {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <set>
|
||||
#include <iostream>
|
||||
|
||||
#include "../ifcconvert/util.h"
|
||||
#include "../serializers/util.h"
|
||||
|
||||
using namespace util;
|
||||
|
||||
Reference in New Issue
Block a user