- Make distinction between single shape and list of shapes

- Store shapes in std::vectors rather than TopoDS_Compounds
- Apply transformation only on triangulated meshes or when processing openings
- Store transformations in a gp_GTrsf to allow arbitrary transformations
- Support IfcCartesianTransformationOperator3DnonUniform
- TODO: Create proper class for ShapeList
- TODO: Carefully check for null pointers returned from IfcGeom::convert_shape()
This commit is contained in:
Thomas Krijnen
2011-10-23 17:11:06 +00:00
parent 8bcb9ffa3e
commit bd79df2be7
17 changed files with 360 additions and 174 deletions
+14 -5
View File
@@ -31,14 +31,23 @@ namespace IfcGeom {
using namespace Ifc2x3;
using namespace IfcUtil;
bool IfcGeom::convert_shape(const IfcBaseClass* l, TopoDS_Shape& r) {
const unsigned int id = l->entity->id();
std::map<int,TopoDS_Shape>::const_iterator it = Cache::Shape.find(id);
if ( it != Cache::Shape.end() ) { r = it->second; return true; }
#include "IfcRegisterConvertShape.h"
bool IfcGeom::convert_shapes(const IfcBaseClass* l, ShapeList& r) {
#include "IfcRegisterConvertShapes.h"
Ifc::LogMessage("Error","No operation defined for:",l->entity);
return false;
}
bool IfcGeom::is_shape_collection(const IfcBaseClass* l) {
#include "IfcRegisterIsShapeCollection.h"
return false;
}
const TopoDS_Shape* IfcGeom::convert_shape(const IfcBaseClass* l, TopoDS_Shape& r) {
const unsigned int id = l->entity->id();
std::map<int,TopoDS_Shape>::const_iterator it = Cache::Shape.find(id);
if ( it != Cache::Shape.end() ) { r = it->second; return &(it->second); }
#include "IfcRegisterConvertShape.h"
Ifc::LogMessage("Error","No operation defined for:",l->entity);
return 0;
}
bool IfcGeom::convert_wire(const IfcBaseClass* l, TopoDS_Wire& r) {
#include "IfcRegisterConvertWire.h"
Ifc::LogMessage("Error","No operation defined for:",l->entity);