Shuffle project structure

This commit is contained in:
Thomas Krijnen
2019-01-18 16:43:38 +01:00
parent 16d6420352
commit 5a7c7ed048
63 changed files with 155 additions and 129 deletions
@@ -20,7 +20,7 @@
#ifndef CGALCONVERSIONRESULT_H
#define CGALCONVERSIONRESULT_H
#include "../../../ifcgeom_schema_agnostic/ConversionResult.h"
#include "../../../ifcgeom/schema_agnostic/ConversionResult.h"
namespace IfcGeom {
@@ -17,9 +17,6 @@
* *
********************************************************************************/
#include "../../../ifcgeom/IfcGeomShapeType.h"
#include "../../../ifcgeom/IfcGeom.h"
#include "CgalKernel.h"
#include "CgalConversionResult.h"
+22 -9
View File
@@ -17,16 +17,13 @@
* *
********************************************************************************/
#include "../../../ifcgeom/IfcGeomShapeType.h"
#include "../../../ifcgeom/IfcGeom.h"
#include "CgalKernel.h"
#include "CgalConversionResult.h"
namespace {
struct MAKE_TYPE_NAME(factory_t) {
IfcGeom::Kernel* operator()(IfcParse::IfcFile* file) const {
IfcGeom::MAKE_TYPE_NAME(Kernel)* k = new IfcGeom::MAKE_TYPE_NAME(Kernel);
IfcGeom::MAKE_TYPE_NAME(CgalKernel)* k = new IfcGeom::MAKE_TYPE_NAME(CgalKernel);
return k;
}
};
@@ -84,7 +81,8 @@ bool IfcGeom::CgalKernel::is_identity_transform(IfcUtil::IfcBaseClass* l) {
*/
}
IfcGeom::NativeElement<double>* IfcGeom::CgalKernel::create_brep_for_representation_and_product(
template <typename P, typename PP>
IfcGeom::NativeElement<P, PP>* IfcGeom::CgalKernel::create_brep_for_representation_and_product(
const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product)
{
IfcGeom::Representation::BRep* shape;
@@ -139,7 +137,7 @@ IfcGeom::NativeElement<double>* IfcGeom::CgalKernel::create_brep_for_representat
context_string = representation->ContextOfItems()->ContextType();
}
return new NativeElement<double>(
return new NativeElement<P, PP>(
product->data().id(),
parent_id,
name,
@@ -152,9 +150,10 @@ IfcGeom::NativeElement<double>* IfcGeom::CgalKernel::create_brep_for_representat
);
}
IfcGeom::NativeElement<double>* IfcGeom::CgalKernel::create_brep_for_processed_representation(
template <typename P, typename PP>
IfcGeom::NativeElement<P, PP>* IfcGeom::CgalKernel::create_brep_for_processed_representation(
const IteratorSettings& /*settings*/, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product,
IfcGeom::NativeElement<double>* brep)
IfcGeom::NativeElement<P, PP>* brep)
{
int parent_id = -1;
try {
@@ -183,7 +182,7 @@ IfcGeom::NativeElement<double>* IfcGeom::CgalKernel::create_brep_for_processed_r
const std::string product_type = product->declaration().name();
return new NativeElement<double>(
return new NativeElement<P, PP>(
product->data().id(),
parent_id,
name,
@@ -195,3 +194,17 @@ IfcGeom::NativeElement<double>* IfcGeom::CgalKernel::create_brep_for_processed_r
product
);
}
template IFC_GEOM_API IfcGeom::NativeElement<float, float>* IfcGeom::CgalKernel::create_brep_for_representation_and_product<float, float>(
const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product);
template IFC_GEOM_API IfcGeom::NativeElement<float, double>* IfcGeom::CgalKernel::create_brep_for_representation_and_product<float, double>(
const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product);
template IFC_GEOM_API IfcGeom::NativeElement<double, double>* IfcGeom::CgalKernel::create_brep_for_representation_and_product<double, double>(
const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product);
template IFC_GEOM_API IfcGeom::NativeElement<float, float>* IfcGeom::CgalKernel::create_brep_for_processed_representation<float, float>(
const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product, IfcGeom::NativeElement<float, float>* brep);
template IFC_GEOM_API IfcGeom::NativeElement<float, double>* IfcGeom::CgalKernel::create_brep_for_processed_representation<float, double>(
const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product, IfcGeom::NativeElement<float, double>* brep);
template IFC_GEOM_API IfcGeom::NativeElement<double, double>* IfcGeom::CgalKernel::create_brep_for_processed_representation<double, double>(
const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product, IfcGeom::NativeElement<double, double>* brep);
+20 -4
View File
@@ -35,7 +35,16 @@ if ( it != cache.T.end() ) { e = it->second; return true; }
#endif
*/
#include "../../../ifcgeom/IfcGeom.h"
#include "../../../ifcparse/macros.h"
#include "../../../ifcgeom/schema_agnostic/Kernel.h"
#include "../../../ifcgeom/schema_agnostic/IfcGeomElement.h"
// @todo create separate shapetype enum?
#include "../../../ifcgeom/kernels/opencascade/IfcGeomShapeType.h"
#define INCLUDE_SCHEMA(x) STRINGIFY(../../../ifcparse/x.h)
#include INCLUDE_SCHEMA(IfcSchema)
#undef INCLUDE_SCHEMA
typedef void* cgal_shape_t;
typedef void* cgal_face_t;
@@ -55,6 +64,8 @@ namespace IfcGeom {
class IFC_GEOM_API MAKE_TYPE_NAME(CgalKernel) : public Kernel {
public:
MAKE_TYPE_NAME(CgalKernel)() : Kernel("cgal") {}
#ifndef NO_CACHE
CgalCache cache;
#endif
@@ -79,10 +90,15 @@ namespace IfcGeom {
}
virtual bool is_identity_transform(IfcUtil::IfcBaseClass*);
virtual IfcGeom::NativeElement<double>* create_brep_for_representation_and_product(
template <typename P, typename PP>
IfcGeom::NativeElement<P, PP>* create_brep_for_representation_and_product(
const IteratorSettings&, IfcSchema::IfcRepresentation*, IfcSchema::IfcProduct*);
virtual IfcGeom::NativeElement<double>* create_brep_for_processed_representation(
const IteratorSettings&, IfcSchema::IfcRepresentation*, IfcSchema::IfcProduct*, IfcGeom::NativeElement<double>*);
template <typename P, typename PP>
IfcGeom::NativeElement<P, PP>* create_brep_for_processed_representation(
const IteratorSettings&, IfcSchema::IfcRepresentation*, IfcSchema::IfcProduct*, IfcGeom::NativeElement<P, PP>*);
#include "CgalEntityMappingDeclaration.h"