mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Merge pull request #47 from aothms/performance_improvements
Performance improvements
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
#include <COLLADASWBaseInputElement.h>
|
||||
#include <COLLADASWAsset.h>
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <cmath>
|
||||
|
||||
@@ -87,8 +89,15 @@ void ColladaSerializer::ColladaExporter::ColladaGeometries::write(
|
||||
std::vector<int>::const_iterator material_it = material_ids.begin();
|
||||
int previous_material_id = -1;
|
||||
for (std::vector<int>::const_iterator it = faces.begin(); !faces.empty(); it += 3) {
|
||||
const int current_material_id = *(material_it++);
|
||||
const size_t num_triangles = std::distance(index_range_start, it) / 3;
|
||||
|
||||
int current_material_id = 0;
|
||||
if (material_it != material_ids.end()) {
|
||||
// In order for the last range of equal material ids to be output as well, this loop iterates
|
||||
// one element past the end of the vector. This needs to be observed when incrementing.
|
||||
current_material_id = *(material_it++);
|
||||
}
|
||||
|
||||
const size_t num_triangles = std::distance(index_range_start, it) / 3;
|
||||
if ((previous_material_id != current_material_id && num_triangles > 0) || (it == faces.end())) {
|
||||
COLLADASW::Triangles triangles(mSW);
|
||||
std::string material_name = (serializer->settings().get(IfcGeom::IteratorSettings::USE_MATERIAL_NAMES)
|
||||
@@ -295,6 +304,7 @@ void ColladaSerializer::ColladaExporter::write(const IfcGeom::TriangulationEleme
|
||||
const IfcGeom::Representation::Triangulation<real_t>& mesh = o->geometry();
|
||||
const std::string name = serializer->settings().get(IfcGeom::IteratorSettings::USE_ELEMENT_GUIDS) ?
|
||||
o->guid() : (serializer->settings().get(IfcGeom::IteratorSettings::USE_ELEMENT_NAMES) ? o->name() : o->unique_id());
|
||||
const std::string representation_id = "representation-" + boost::lexical_cast<std::string>(o->geometry().id());
|
||||
|
||||
std::vector<std::string> material_references;
|
||||
foreach(const IfcGeom::Material& material, mesh.materials()) {
|
||||
@@ -308,7 +318,7 @@ void ColladaSerializer::ColladaExporter::write(const IfcGeom::TriangulationEleme
|
||||
}
|
||||
|
||||
deferreds.push_back(
|
||||
DeferredObject(name, o->type(), o->transformation().matrix().data(), mesh.verts(), mesh.normals(),
|
||||
DeferredObject(name, representation_id, o->type(), o->transformation().matrix().data(), mesh.verts(), mesh.normals(),
|
||||
mesh.faces(), mesh.edges(), mesh.material_ids(), mesh.materials(), material_references, mesh.uvs())
|
||||
);
|
||||
}
|
||||
@@ -317,14 +327,18 @@ void ColladaSerializer::ColladaExporter::endDocument() {
|
||||
// In fact due the XML based nature of Collada and its dependency on library nodes,
|
||||
// only at this point all objects are written to the stream.
|
||||
materials.write();
|
||||
std::set<std::string> geometries_written;
|
||||
for (std::vector<DeferredObject>::const_iterator it = deferreds.begin(); it != deferreds.end(); ++it) {
|
||||
const std::string object_name = it->unique_id + "-representation";
|
||||
geometries.write(object_name, it->type, it->vertices, it->normals, it->faces, it->edges, it->material_ids, it->materials, it->uvs);
|
||||
if (geometries_written.find(it->representation_id) != geometries_written.end()) {
|
||||
continue;
|
||||
}
|
||||
geometries_written.insert(it->representation_id);
|
||||
geometries.write(it->representation_id, it->type, it->vertices, it->normals, it->faces, it->edges, it->material_ids, it->materials, it->uvs);
|
||||
}
|
||||
geometries.close();
|
||||
for (std::vector<DeferredObject>::const_iterator it = deferreds.begin(); it != deferreds.end(); ++it) {
|
||||
const std::string object_name = it->unique_id;
|
||||
scene.add(object_name, object_name, object_name + "-representation", it->material_references, it->matrix);
|
||||
scene.add(object_name, object_name, it->representation_id, it->material_references, it->matrix);
|
||||
}
|
||||
scene.write();
|
||||
stream.endDocument();
|
||||
|
||||
@@ -117,7 +117,7 @@ private:
|
||||
};
|
||||
class DeferredObject {
|
||||
public:
|
||||
std::string unique_id, type;
|
||||
std::string unique_id, representation_id, type;
|
||||
std::vector<real_t> matrix;
|
||||
std::vector<real_t> vertices;
|
||||
std::vector<real_t> normals;
|
||||
@@ -127,11 +127,12 @@ private:
|
||||
std::vector<IfcGeom::Material> materials;
|
||||
std::vector<std::string> material_references;
|
||||
std::vector<real_t> uvs;
|
||||
DeferredObject(const std::string& unique_id, const std::string& type, const std::vector<real_t>& matrix,
|
||||
DeferredObject(const std::string& unique_id, const std::string& representation_id, const std::string& type, const std::vector<real_t>& matrix,
|
||||
const std::vector<real_t>& vertices, const std::vector<real_t>& normals, const std::vector<int>& faces,
|
||||
const std::vector<int>& edges, const std::vector<int>& material_ids, const std::vector<IfcGeom::Material>& materials,
|
||||
const std::vector<std::string>& material_references, const std::vector<real_t>& uvs)
|
||||
: unique_id(unique_id)
|
||||
, representation_id(representation_id)
|
||||
, type(type)
|
||||
, matrix(matrix)
|
||||
, vertices(vertices)
|
||||
|
||||
@@ -463,9 +463,20 @@ int main(int argc, char** argv) {
|
||||
serializer->writeHeader();
|
||||
|
||||
int old_progress = -1;
|
||||
|
||||
if (center_model) {
|
||||
double* offset = serializer->settings().offset;
|
||||
gp_XYZ center = (context_iterator.bounds_min() + context_iterator.bounds_max()) * 0.5;
|
||||
offset[0] = -center.X();
|
||||
offset[1] = -center.Y();
|
||||
offset[2] = -center.Z();
|
||||
std::stringstream msg;
|
||||
msg << "Using model offset (" << offset[0] << "," << offset[1] << "," << offset[2] << ")";
|
||||
Logger::Message(Logger::LOG_NOTICE, msg.str());
|
||||
}
|
||||
|
||||
Logger::Status("Creating geometry...");
|
||||
|
||||
std::vector<IfcGeom::Element<real_t>* > geometries;
|
||||
// The functions IfcGeom::Iterator::get() and IfcGeom::Iterator::next()
|
||||
// wrap an iterator of all geometrical products in the Ifc file.
|
||||
// IfcGeom::Iterator::get() returns an IfcGeom::TriangulationElement or
|
||||
@@ -476,43 +487,24 @@ int main(int argc, char** argv) {
|
||||
// calling next() the entity to be returned has already been processed, a
|
||||
// true return value guarantees that a successfully processed product is
|
||||
// available.
|
||||
size_t num_created = 0;
|
||||
|
||||
do {
|
||||
IfcGeom::Element<real_t> *geom_object = context_iterator.get(true); // true == take ownership, we will clean up ourselves
|
||||
geometries.push_back(geom_object);
|
||||
IfcGeom::Element<real_t> *geom_object = context_iterator.get();
|
||||
if (is_tesselated) {
|
||||
serializer->write(static_cast<const IfcGeom::TriangulationElement<real_t>*>(geom_object));
|
||||
} else {
|
||||
serializer->write(static_cast<const IfcGeom::BRepElement<real_t>*>(geom_object));
|
||||
}
|
||||
const int progress = context_iterator.progress() / 2;
|
||||
if (old_progress != progress) Logger::ProgressBar(progress);
|
||||
old_progress = progress;
|
||||
} while (context_iterator.next());
|
||||
} while (++num_created, context_iterator.next());
|
||||
|
||||
Logger::Status("\rDone creating geometry (" + boost::lexical_cast<std::string>(geometries.size()) +
|
||||
Logger::Status("\rDone creating geometry (" + boost::lexical_cast<std::string>(num_created) +
|
||||
" objects) ");
|
||||
|
||||
if (center_model) {
|
||||
double* offset = serializer->settings().offset;
|
||||
gp_XYZ center = (context_iterator.bounds_min() + context_iterator.bounds_max()) * 0.5;
|
||||
offset[0] = -center.X();
|
||||
offset[1] = -center.Y();
|
||||
offset[2] = -center.Z();
|
||||
//printf("Bounds min. (%g, %g, %g)\n", context_iterator.bounds_min().X(), context_iterator.bounds_min().Y(), context_iterator.bounds_min().Z());
|
||||
//printf("Bounds max. (%g, %g, %g)\n", context_iterator.bounds_min().X(), context_iterator.bounds_min().X(), context_iterator.bounds_min().Z());
|
||||
printf("Using model offset (%g, %g, %g)\n", offset[0], offset[1], offset[2]); //TODO Logger::Message(Logger::LOG_NOTICE, ...);
|
||||
}
|
||||
|
||||
Logger::Status("Serializing geometry...");
|
||||
|
||||
foreach(const IfcGeom::Element<real_t>* geom, geometries) {
|
||||
if (is_tesselated) {
|
||||
serializer->write(static_cast<const IfcGeom::TriangulationElement<real_t>*>(geom));
|
||||
} else {
|
||||
serializer->write(static_cast<const IfcGeom::BRepElement<real_t>*>(geom));
|
||||
}
|
||||
delete geom;
|
||||
}
|
||||
|
||||
serializer->finalize();
|
||||
|
||||
Logger::Status("\rDone serializing geometry ");
|
||||
|
||||
serializer->finalize();
|
||||
delete serializer;
|
||||
|
||||
// Renaming might fail (e.g. maybe the existing file was open in a viewer application)
|
||||
@@ -525,11 +517,23 @@ int main(int argc, char** argv) {
|
||||
write_log();
|
||||
|
||||
time(&end);
|
||||
|
||||
int seconds = (int)difftime(end, start);
|
||||
if (seconds < 60)
|
||||
printf("\nConversion took %d seconds\n", seconds); // TODO Logger::Message(Logger::LOG_NOTICE, ...);
|
||||
else
|
||||
printf("\nConversion took %d minute(s) %d seconds\n", seconds/60, seconds%60); // TODO Logger::Message(Logger::LOG_NOTICE, ...);
|
||||
std::stringstream msg;
|
||||
int minutes = seconds / 60;
|
||||
seconds = seconds % 60;
|
||||
msg << "\nConversion took";
|
||||
if (minutes > 0) {
|
||||
msg << " " << minutes << " minute";
|
||||
if (minutes > 1) {
|
||||
msg << "s";
|
||||
}
|
||||
}
|
||||
msg << " " << seconds << " second";
|
||||
if (seconds > 1) {
|
||||
msg << "s";
|
||||
}
|
||||
Logger::Status(msg.str());
|
||||
|
||||
return successful ? 0 : 1;
|
||||
}
|
||||
|
||||
@@ -26,9 +26,10 @@ class Base(object):
|
||||
import platform
|
||||
if tuple(map(int, platform.python_version_tuple())) < (2, 8):
|
||||
from io import open as unicode_open
|
||||
unicode_type = unicode
|
||||
else:
|
||||
unicode_open = open
|
||||
unicode = lambda x, *args, **kwargs: x
|
||||
unicode_type = lambda x, *args, **kwargs: x
|
||||
f = unicode_open(self.file_name, 'w', encoding='utf-8')
|
||||
f.write(unicode(repr(self), encoding='utf-8', errors='ignore'))
|
||||
f.write(unicode_type(repr(self), encoding='utf-8', errors='ignore'))
|
||||
f.close()
|
||||
|
||||
@@ -177,11 +177,7 @@ class Implementation(codegen.Base):
|
||||
return enumeration_index_by_str[e.supertypes[0]]
|
||||
else: return -1
|
||||
|
||||
parent_type_statements = [templates.parent_type_stmt % {
|
||||
'name' : name,
|
||||
'parent' : type.supertypes[0],
|
||||
'padding' : ' ' * (max_len - len(name))
|
||||
} for name, type in mapping.schema.entities.items() if type.supertypes and len(type.supertypes) == 1]
|
||||
parent_type_statements = ",".join(map(str, map(get_parent_id, enumerable_types)))
|
||||
|
||||
max_id = len(enumerable_types)
|
||||
|
||||
@@ -234,7 +230,7 @@ class Implementation(codegen.Base):
|
||||
'type_name_strings' : type_name_strings,
|
||||
'string_map_statements' : catnl(string_map_statements),
|
||||
'simple_type_statement' : simple_type_statements,
|
||||
'parent_type_statements' : catnl(parent_type_statements),
|
||||
'parent_type_statements' : parent_type_statements,
|
||||
'entity_implementations' : catnl(entity_implementations),
|
||||
'simple_type_impl' : catnl(simple_type_impl)
|
||||
}
|
||||
|
||||
@@ -62,6 +62,8 @@ enum_header = """
|
||||
#ifndef %(schema_name_upper)sENUM_H
|
||||
#define %(schema_name_upper)sENUM_H
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
#define IfcSchema %(schema_name)s
|
||||
|
||||
namespace %(schema_name)s {
|
||||
@@ -70,7 +72,7 @@ namespace Type {
|
||||
typedef enum {
|
||||
%(types)s, UNDEFINED
|
||||
} Enum;
|
||||
Enum Parent(Enum v);
|
||||
boost::optional<Enum> Parent(Enum v);
|
||||
Enum FromString(const std::string& s);
|
||||
std::string ToString(Enum v);
|
||||
bool IsSimple(Enum v);
|
||||
@@ -146,10 +148,14 @@ Type::Enum Type::FromString(const std::string& s) {
|
||||
else return it->second;
|
||||
}
|
||||
|
||||
Type::Enum Type::Parent(Enum v){
|
||||
if (v < 0 || v >= %(max_id)d) return (Enum)-1;
|
||||
%(parent_type_statements)s
|
||||
return (Enum)-1;
|
||||
static int parent_map[] = {%(parent_type_statements)s};
|
||||
boost::optional<Type::Enum> Type::Parent(Enum v){
|
||||
const int p = parent_map[static_cast<int>(v)];
|
||||
if (p >= 0) {
|
||||
return static_cast<Type::Enum>(p);
|
||||
} else {
|
||||
return boost::none;
|
||||
}
|
||||
}
|
||||
|
||||
bool Type::IsSimple(Enum v) {
|
||||
@@ -282,7 +288,13 @@ std::pair<Type::Enum, unsigned> Type::GetInverseAttribute(Enum t, const std::str
|
||||
return jt->second;
|
||||
}
|
||||
}
|
||||
if ((t = Parent(t)) == -1) break;
|
||||
boost::optional<Enum> pt = Parent(t);
|
||||
if (pt) {
|
||||
t = *pt;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
throw IfcException("Attribute not found");
|
||||
}
|
||||
@@ -301,7 +313,13 @@ std::set<std::string> Type::GetInverseAttributeNames(Enum t) {
|
||||
return_value.insert(jt->first);
|
||||
}
|
||||
}
|
||||
if ((t = Parent(t)) == -1) break;
|
||||
boost::optional<Enum> pt = Parent(t);
|
||||
if (pt) {
|
||||
t = *pt;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return return_value;
|
||||
|
||||
+32
-1
@@ -46,22 +46,37 @@
|
||||
#include "../ifcgeom/IfcRepresentationShapeItem.h"
|
||||
#include "../ifcgeom/IfcGeomShapeType.h"
|
||||
|
||||
// Define this in case you want to conserve memory usage at all cost. This has been
|
||||
// benchmarked extensively: https://github.com/IfcOpenShell/IfcOpenShell/pull/47
|
||||
// #define NO_CACHE
|
||||
|
||||
#ifdef NO_CACHE
|
||||
|
||||
#define IN_CACHE(T,E,t,e)
|
||||
#define CACHE(T,E,e)
|
||||
|
||||
#else
|
||||
|
||||
#define IN_CACHE(T,E,t,e) std::map<int,t>::const_iterator it = cache.T.find(E->entity->id());\
|
||||
if ( it != cache.T.end() ) { e = it->second; return true; }
|
||||
#define CACHE(T,E,e) cache.T[E->entity->id()] = e;
|
||||
|
||||
#endif
|
||||
|
||||
namespace IfcGeom {
|
||||
|
||||
class Cache {
|
||||
public:
|
||||
#include "IfcRegisterCreateCache.h"
|
||||
std::map<int, SurfaceStyle> Style;
|
||||
std::map<int, TopoDS_Shape> Shape;
|
||||
};
|
||||
|
||||
class Kernel {
|
||||
private:
|
||||
#ifndef NO_CACHE
|
||||
Cache cache;
|
||||
#endif
|
||||
std::map<int, SurfaceStyle> style_cache;
|
||||
public:
|
||||
// Tolerances and settings for various geometrical operations:
|
||||
enum GeomValue {
|
||||
@@ -131,6 +146,10 @@ public:
|
||||
bool approximate_plane_through_wire(const TopoDS_Wire&, gp_Pln&);
|
||||
bool flatten_wire(TopoDS_Wire&);
|
||||
|
||||
bool is_identity_transform(IfcUtil::IfcBaseClass*);
|
||||
|
||||
IfcSchema::IfcRelVoidsElement::list::ptr find_openings(IfcSchema::IfcProduct* product);
|
||||
|
||||
std::pair<std::string, double> initializeUnits(IfcSchema::IfcUnitAssignment*);
|
||||
|
||||
IfcSchema::IfcObjectDefinition* get_decomposing_entity(IfcSchema::IfcProduct*);
|
||||
@@ -138,6 +157,9 @@ public:
|
||||
template <typename P>
|
||||
IfcGeom::BRepElement<P>* create_brep_for_representation_and_product(const IteratorSettings&, IfcSchema::IfcRepresentation*, IfcSchema::IfcProduct*);
|
||||
|
||||
template <typename P>
|
||||
IfcGeom::BRepElement<P>* create_brep_for_processed_representation(const IteratorSettings&, IfcSchema::IfcRepresentation*, IfcSchema::IfcProduct*, IfcGeom::BRepElement<P>*);
|
||||
|
||||
const SurfaceStyle* get_style(const IfcSchema::IfcRepresentationItem* representation_item);
|
||||
|
||||
template <typename T> std::pair<IfcSchema::IfcSurfaceStyle*, T*> get_surface_style(const IfcSchema::IfcRepresentationItem* representation_item) {
|
||||
@@ -184,6 +206,15 @@ public:
|
||||
return std::make_pair<IfcSchema::IfcSurfaceStyle*, T*>(0,0);
|
||||
}
|
||||
|
||||
void purge_cache() {
|
||||
// Rather hack-ish, but a stopgap solution to keep memory under control
|
||||
// for large files. SurfaceStyles need to be kept at all costs, as they
|
||||
// are read later on when serializing Collada files.
|
||||
#ifndef NO_CACHE
|
||||
cache = Cache();
|
||||
#endif
|
||||
}
|
||||
|
||||
#include "IfcRegisterGeomHeader.h"
|
||||
|
||||
};
|
||||
|
||||
@@ -107,16 +107,14 @@ namespace IfcGeom {
|
||||
template <typename P>
|
||||
class BRepElement : public Element<P> {
|
||||
private:
|
||||
Representation::BRep* _geometry;
|
||||
boost::shared_ptr<Representation::BRep> _geometry;
|
||||
public:
|
||||
const boost::shared_ptr<Representation::BRep>& geometry_pointer() const { return _geometry; }
|
||||
const Representation::BRep& geometry() const { return *_geometry; }
|
||||
BRepElement(int id, int parent_id, const std::string& name, const std::string& type, const std::string& guid, const std::string& context, const gp_Trsf& trsf, Representation::BRep* geometry)
|
||||
BRepElement(int id, int parent_id, const std::string& name, const std::string& type, const std::string& guid, const std::string& context, const gp_Trsf& trsf, const boost::shared_ptr<Representation::BRep>& geometry)
|
||||
: Element<P>(geometry->settings(),id,parent_id,name,type,guid,context,trsf)
|
||||
, _geometry(geometry)
|
||||
{}
|
||||
virtual ~BRepElement() {
|
||||
delete _geometry;
|
||||
}
|
||||
private:
|
||||
BRepElement(const BRepElement& other);
|
||||
BRepElement& operator=(const BRepElement& other);
|
||||
@@ -125,16 +123,18 @@ namespace IfcGeom {
|
||||
template <typename P>
|
||||
class TriangulationElement : public Element<P> {
|
||||
private:
|
||||
Representation::Triangulation<P>* _geometry;
|
||||
boost::shared_ptr< Representation::Triangulation<P> > _geometry;
|
||||
public:
|
||||
const Representation::Triangulation<P>& geometry() const { return *_geometry; }
|
||||
const boost::shared_ptr< Representation::Triangulation<P> >& geometry_pointer() const { return _geometry; }
|
||||
TriangulationElement(const BRepElement<P>& shape_model)
|
||||
: Element<P>(shape_model)
|
||||
, _geometry(new Representation::Triangulation<P>(shape_model.geometry()))
|
||||
, _geometry(boost::shared_ptr<Representation::Triangulation<P>>(new Representation::Triangulation<P>(shape_model.geometry())))
|
||||
{}
|
||||
TriangulationElement(const Element<P>& element, const boost::shared_ptr<Representation::Triangulation<P>>& geometry)
|
||||
: Element<P>(element)
|
||||
, _geometry(geometry)
|
||||
{}
|
||||
virtual ~TriangulationElement() {
|
||||
delete _geometry;
|
||||
}
|
||||
private:
|
||||
TriangulationElement(const TriangulationElement& other);
|
||||
TriangulationElement& operator=(const TriangulationElement& other);
|
||||
|
||||
@@ -131,11 +131,13 @@ bool IfcGeom::Kernel::create_solid_from_compound(const TopoDS_Shape& compound, T
|
||||
}
|
||||
builder.Perform();
|
||||
shape = builder.SewedShape();
|
||||
try {
|
||||
ShapeFix_Solid sf_solid;
|
||||
sf_solid.LimitTolerance(getValue(GV_POINT_EQUALITY_TOLERANCE));
|
||||
shape = sf_solid.SolidFromShell(TopoDS::Shell(shape));
|
||||
} catch(...) {}
|
||||
if (shape.ShapeType() == TopAbs_SHELL) {
|
||||
try {
|
||||
ShapeFix_Solid sf_solid;
|
||||
sf_solid.LimitTolerance(getValue(GV_POINT_EQUALITY_TOLERANCE));
|
||||
shape = sf_solid.SolidFromShell(TopoDS::Shell(shape));
|
||||
} catch(...) {}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1053,8 +1055,40 @@ void IfcGeom::Kernel::sequence_of_point_to_wire(const TColgp_SequenceOfPnt& p, T
|
||||
w = builder.Wire();
|
||||
}
|
||||
|
||||
IfcSchema::IfcRelVoidsElement::list::ptr IfcGeom::Kernel::find_openings(IfcSchema::IfcProduct* product) {
|
||||
|
||||
IfcSchema::IfcRelVoidsElement::list::ptr openings(new IfcSchema::IfcRelVoidsElement::list);
|
||||
if ( product->is(IfcSchema::Type::IfcElement) && !product->is(IfcSchema::Type::IfcOpeningElement) ) {
|
||||
IfcSchema::IfcElement* element = (IfcSchema::IfcElement*)product;
|
||||
openings = element->HasOpenings();
|
||||
}
|
||||
|
||||
// Is the IfcElement a decomposition of an IfcElement with any IfcOpeningElements?
|
||||
IfcSchema::IfcObjectDefinition* obdef = product->as<IfcSchema::IfcObjectDefinition>();
|
||||
for (;;) {
|
||||
#ifdef USE_IFC4
|
||||
IfcSchema::IfcRelAggregates::list::ptr decomposes = obdef->Decomposes();
|
||||
for ( IfcSchema::IfcRelAggregates::list::it it = decomposes->begin(); it != decomposes->end(); ++ it ) {
|
||||
#else
|
||||
IfcSchema::IfcRelDecomposes::list::ptr decomposes = obdef->Decomposes();
|
||||
if (decomposes->size() != 1) break;
|
||||
|
||||
#endif
|
||||
IfcSchema::IfcObjectDefinition* rel_obdef = (*decomposes->begin())->RelatingObject();
|
||||
if ( rel_obdef->is(IfcSchema::Type::IfcElement) && !rel_obdef->is(IfcSchema::Type::IfcOpeningElement) ) {
|
||||
IfcSchema::IfcElement* element = (IfcSchema::IfcElement*)rel_obdef;
|
||||
openings->push(element->HasOpenings());
|
||||
}
|
||||
|
||||
obdef = rel_obdef;
|
||||
}
|
||||
|
||||
return openings;
|
||||
}
|
||||
|
||||
template <typename P>
|
||||
IfcGeom::BRepElement<P>* IfcGeom::Kernel::create_brep_for_representation_and_product(const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product) {
|
||||
|
||||
IfcGeom::Representation::BRep* shape;
|
||||
IfcGeom::IfcRepresentationShapeItems shapes;
|
||||
|
||||
@@ -1080,28 +1114,7 @@ IfcGeom::BRepElement<P>* IfcGeom::Kernel::create_brep_for_representation_and_pro
|
||||
|
||||
// Does the IfcElement have any IfcOpenings?
|
||||
// Note that openings for IfcOpeningElements are not processed
|
||||
IfcSchema::IfcRelVoidsElement::list::ptr openings;
|
||||
if ( product->is(IfcSchema::Type::IfcElement) && !product->is(IfcSchema::Type::IfcOpeningElement) ) {
|
||||
IfcSchema::IfcElement* element = (IfcSchema::IfcElement*)product;
|
||||
openings = element->HasOpenings();
|
||||
}
|
||||
// Is the IfcElement a decomposition of an IfcElement with any IfcOpeningElements?
|
||||
if ( product->is(IfcSchema::Type::IfcBuildingElementPart ) ) {
|
||||
IfcSchema::IfcBuildingElementPart* part = (IfcSchema::IfcBuildingElementPart*)product;
|
||||
#ifdef USE_IFC4
|
||||
IfcSchema::IfcRelAggregates::list::ptr decomposes = part->Decomposes();
|
||||
for ( IfcSchema::IfcRelAggregates::list::it it = decomposes->begin(); it != decomposes->end(); ++ it ) {
|
||||
#else
|
||||
IfcSchema::IfcRelDecomposes::list::ptr decomposes = part->Decomposes();
|
||||
for ( IfcSchema::IfcRelDecomposes::list::it it = decomposes->begin(); it != decomposes->end(); ++ it ) {
|
||||
#endif
|
||||
IfcSchema::IfcObjectDefinition* obdef = (*it)->RelatingObject();
|
||||
if ( obdef->is(IfcSchema::Type::IfcElement) ) {
|
||||
IfcSchema::IfcElement* element = (IfcSchema::IfcElement*)obdef;
|
||||
openings->push(element->HasOpenings());
|
||||
}
|
||||
}
|
||||
}
|
||||
IfcSchema::IfcRelVoidsElement::list::ptr openings = find_openings(product);
|
||||
|
||||
const std::string product_type = IfcSchema::Type::ToString(product->type());
|
||||
ElementSettings element_settings(settings, getValue(GV_LENGTH_UNIT), product_type);
|
||||
@@ -1158,7 +1171,47 @@ IfcGeom::BRepElement<P>* IfcGeom::Kernel::create_brep_for_representation_and_pro
|
||||
guid,
|
||||
context_string,
|
||||
trsf,
|
||||
shape
|
||||
boost::shared_ptr<IfcGeom::Representation::BRep>(shape)
|
||||
);
|
||||
}
|
||||
|
||||
template <typename P>
|
||||
IfcGeom::BRepElement<P>* IfcGeom::Kernel::create_brep_for_processed_representation(const IteratorSettings& /*settings*/, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product, IfcGeom::BRepElement<P>* brep) {
|
||||
|
||||
int parent_id = -1;
|
||||
try {
|
||||
IfcSchema::IfcObjectDefinition* parent_object = get_decomposing_entity(product);
|
||||
if (parent_object) {
|
||||
parent_id = parent_object->entity->id();
|
||||
}
|
||||
} catch (...) {}
|
||||
|
||||
const std::string name = product->hasName() ? product->Name() : "";
|
||||
const std::string guid = product->GlobalId();
|
||||
|
||||
gp_Trsf trsf;
|
||||
try {
|
||||
convert(product->ObjectPlacement(),trsf);
|
||||
} catch (...) {}
|
||||
|
||||
std::string context_string = "";
|
||||
if (representation->hasRepresentationIdentifier()) {
|
||||
context_string = representation->RepresentationIdentifier();
|
||||
} else if (representation->ContextOfItems()->hasContextType()) {
|
||||
context_string = representation->ContextOfItems()->ContextType();
|
||||
}
|
||||
|
||||
const std::string product_type = IfcSchema::Type::ToString(product->type());
|
||||
|
||||
return new BRepElement<P>(
|
||||
product->entity->id(),
|
||||
parent_id,
|
||||
name,
|
||||
product_type,
|
||||
guid,
|
||||
context_string,
|
||||
trsf,
|
||||
brep->geometry_pointer()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1220,6 +1273,9 @@ IfcSchema::IfcObjectDefinition* IfcGeom::Kernel::get_decomposing_entity(IfcSchem
|
||||
template IfcGeom::BRepElement<float>* IfcGeom::Kernel::create_brep_for_representation_and_product<float>(const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product);
|
||||
template IfcGeom::BRepElement<double>* IfcGeom::Kernel::create_brep_for_representation_and_product<double>(const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product);
|
||||
|
||||
template IfcGeom::BRepElement<float>* IfcGeom::Kernel::create_brep_for_processed_representation<float>(const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product, IfcGeom::BRepElement<float>* brep);
|
||||
template IfcGeom::BRepElement<double>* IfcGeom::Kernel::create_brep_for_processed_representation<double>(const IteratorSettings& settings, IfcSchema::IfcRepresentation* representation, IfcSchema::IfcProduct* product, IfcGeom::BRepElement<double>* brep);
|
||||
|
||||
std::pair<std::string, double> IfcGeom::Kernel::initializeUnits(IfcSchema::IfcUnitAssignment* unit_assignment) {
|
||||
// Set default units, set length to meters, angles to undefined
|
||||
setValue(IfcGeom::Kernel::GV_LENGTH_UNIT, 1.0);
|
||||
@@ -1305,6 +1361,44 @@ const IfcSchema::IfcRepresentationItem* IfcGeom::Kernel::find_item_carrying_styl
|
||||
return item;
|
||||
}
|
||||
|
||||
bool IfcGeom::Kernel::is_identity_transform(IfcUtil::IfcBaseClass* l) {
|
||||
IfcSchema::IfcAxis2Placement2D* ax2d;
|
||||
IfcSchema::IfcAxis2Placement3D* ax3d;
|
||||
|
||||
IfcSchema::IfcCartesianTransformationOperator2D* op2d;
|
||||
IfcSchema::IfcCartesianTransformationOperator3D* op3d;
|
||||
IfcSchema::IfcCartesianTransformationOperator2DnonUniform* op2dnonu;
|
||||
IfcSchema::IfcCartesianTransformationOperator3DnonUniform* op3dnonu;
|
||||
|
||||
if((op2dnonu = l->as<IfcSchema::IfcCartesianTransformationOperator2DnonUniform>()) != 0) {
|
||||
gp_GTrsf2d gtrsf2d;
|
||||
convert(op2dnonu, gtrsf2d);
|
||||
return gtrsf2d.Form() == gp_Identity;
|
||||
} else if ((op2d = l->as<IfcSchema::IfcCartesianTransformationOperator2D>()) != 0) {
|
||||
gp_Trsf2d trsf2d;
|
||||
convert(op2d, trsf2d);
|
||||
return trsf2d.Form() == gp_Identity;
|
||||
} else if((op3dnonu = l->as<IfcSchema::IfcCartesianTransformationOperator3DnonUniform>()) != 0) {
|
||||
gp_GTrsf gtrsf;
|
||||
convert(op3dnonu, gtrsf);
|
||||
return gtrsf.Form() == gp_Identity;
|
||||
} else if ((op3d = l->as<IfcSchema::IfcCartesianTransformationOperator3D>()) != 0) {
|
||||
gp_Trsf trsf;
|
||||
convert(op3d, trsf);
|
||||
return trsf.Form() == gp_Identity;
|
||||
} else if((ax2d = l->as<IfcSchema::IfcAxis2Placement2D>()) != 0) {
|
||||
gp_Trsf2d trsf2d;
|
||||
convert(ax2d, trsf2d);
|
||||
return trsf2d.Form() == gp_Identity;
|
||||
} else if ((ax3d = l->as<IfcSchema::IfcAxis2Placement3D>()) != 0) {
|
||||
gp_Trsf trsf;
|
||||
convert(ax3d, trsf);
|
||||
return trsf.Form() == gp_Identity;
|
||||
} else {
|
||||
throw IfcParse::IfcException("Invalid valuation for IfcAxis2Placement / IfcCartesianTransformationOperator");
|
||||
}
|
||||
}
|
||||
|
||||
bool IfcGeom::Kernel::approximate_plane_through_wire(const TopoDS_Wire& wire, gp_Pln& plane) {
|
||||
// Newell's Method is used for the normal calculation
|
||||
// as a simple edge cross product can give opposite results
|
||||
@@ -1374,4 +1468,4 @@ bool IfcGeom::Kernel::flatten_wire(TopoDS_Wire& wire) {
|
||||
}
|
||||
wire = TopoDS::Wire(list.First());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +77,53 @@
|
||||
|
||||
#include "../ifcgeom/IfcGeom.h"
|
||||
|
||||
// Helper functions (re)set gp_(G)Trsf(2d) forms explicitly to 'Identity'
|
||||
// so that it can be easily identified in the IfcMappedItem processing
|
||||
|
||||
// For axis placements detect equality early in order for the
|
||||
// relatively computionaly expensive gp_Trsf calculation to be skipped
|
||||
template <typename T>
|
||||
bool axis_equal(const T& a, const T& b, double tolerance);
|
||||
template <>
|
||||
bool axis_equal(const gp_Ax3& a, const gp_Ax3& b, double tolerance) {
|
||||
if (!a.Location().IsEqual(b.Location(), tolerance)) return false;
|
||||
// Note that the tolerance below is angular, above is linear. Since architectural
|
||||
// objects are about 1m'ish in scale, it should be somewhat equivalent. Besides,
|
||||
// this is mostly a filter for NULL or default values in the placements.
|
||||
if (!a.Direction().IsEqual(b.Direction(), tolerance)) return false;
|
||||
if (!a.XDirection().IsEqual(b.XDirection(), tolerance)) return false;
|
||||
if (!a.YDirection().IsEqual(b.YDirection(), tolerance)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool axis_equal(const gp_Ax2d& a, const gp_Ax2d& b, double tolerance) {
|
||||
if (!a.Location().IsEqual(b.Location(), tolerance)) return false;
|
||||
if (!a.Direction().IsEqual(b.Direction(), tolerance)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename T> struct dimension_count {};
|
||||
template <> struct dimension_count <gp_Trsf2d > { static const int n = 2; };
|
||||
template <> struct dimension_count <gp_GTrsf2d> { static const int n = 2; };
|
||||
template <> struct dimension_count < gp_Trsf > { static const int n = 3; };
|
||||
template <> struct dimension_count < gp_GTrsf > { static const int n = 3; };
|
||||
|
||||
template <typename T>
|
||||
bool is_identity(const T& t, double tolerance) {
|
||||
// Note the {1, n+1} range due to Open Cascade's 1-based indexing
|
||||
// Note the {1, n+2} range due to the translation part of the matrix
|
||||
for (int i = 1; i < dimension_count<T>::n + 2; ++i) {
|
||||
for (int j = 1; j < dimension_count<T>::n + 1; ++j) {
|
||||
const double iden_value = i == j ? 1. : 0.;
|
||||
const double trsf_value = t.Value(j, i);
|
||||
if (fabs(trsf_value - iden_value) > tolerance) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IfcGeom::Kernel::convert(const IfcSchema::IfcCartesianPoint* l, gp_Pnt& point) {
|
||||
IN_CACHE(IfcCartesianPoint,l,gp_Pnt,point)
|
||||
std::vector<double> xyz = l->Coordinates();
|
||||
@@ -120,7 +167,11 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcAxis2Placement3D* l, gp_Trsf&
|
||||
gp_Ax3 ax3;
|
||||
if ( hasRef ) ax3 = gp_Ax3(o,axis,refDirection);
|
||||
else ax3 = gp_Ax3(o,axis);
|
||||
trsf.SetTransformation(ax3, gp_Ax3(gp_Pnt(),gp_Dir(0,0,1),gp_Dir(1,0,0)));
|
||||
|
||||
if (!axis_equal(ax3, (gp_Ax3) gp::XOY(), getValue(GV_PRECISION))) {
|
||||
trsf.SetTransformation(ax3, gp::XOY());
|
||||
}
|
||||
|
||||
CACHE(IfcAxis2Placement3D,l,trsf)
|
||||
return true;
|
||||
}
|
||||
@@ -147,9 +198,16 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCartesianTransformationOperato
|
||||
if ( l->hasAxis3() ) IfcGeom::Kernel::convert(l->Axis3(),axis3);
|
||||
gp_Ax3 ax3 (origin,axis3,axis1);
|
||||
if ( axis2.Dot(ax3.YDirection()) < 0 ) ax3.YReverse();
|
||||
trsf.SetTransformation(ax3);
|
||||
trsf.Invert();
|
||||
if ( l->hasScale() ) trsf.SetScaleFactor(l->Scale());
|
||||
|
||||
if (!axis_equal(ax3, (gp_Ax3) gp::XOY(), getValue(GV_PRECISION))) {
|
||||
trsf.SetTransformation(ax3);
|
||||
trsf.Invert();
|
||||
}
|
||||
|
||||
if (l->hasScale() && !ALMOST_THE_SAME(l->Scale(), 1.)) {
|
||||
trsf.SetScaleFactor(l->Scale());
|
||||
}
|
||||
|
||||
CACHE(IfcCartesianTransformationOperator3D,l,trsf)
|
||||
return true;
|
||||
}
|
||||
@@ -183,7 +241,12 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCartesianTransformationOperato
|
||||
}
|
||||
|
||||
trsf.Invert();
|
||||
if ( l->hasScale() ) trsf.SetScaleFactor(l->Scale());
|
||||
if ( l->hasScale() && !ALMOST_THE_SAME(l->Scale(), 1.) ) trsf.SetScaleFactor(l->Scale());
|
||||
|
||||
if (is_identity(trsf, getValue(GV_PRECISION))) {
|
||||
trsf = gp_Trsf2d();
|
||||
}
|
||||
|
||||
CACHE(IfcCartesianTransformationOperator2D,l,trsf)
|
||||
return true;
|
||||
}
|
||||
@@ -211,6 +274,11 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCartesianTransformationOperato
|
||||
gtrsf.SetValue(2,2,scale2);
|
||||
gtrsf.SetValue(3,3,scale3);
|
||||
gtrsf.PreMultiply(trsf);
|
||||
|
||||
if (is_identity(gtrsf, getValue(GV_PRECISION))) {
|
||||
gtrsf = gp_GTrsf();
|
||||
}
|
||||
|
||||
CACHE(IfcCartesianTransformationOperator3DnonUniform,l,gtrsf)
|
||||
return true;
|
||||
}
|
||||
@@ -247,6 +315,11 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcCartesianTransformationOperato
|
||||
gtrsf.SetValue(1,1,scale1);
|
||||
gtrsf.SetValue(2,2,scale2);
|
||||
gtrsf.Multiply(trsf);
|
||||
|
||||
if (is_identity(gtrsf, getValue(GV_PRECISION))) {
|
||||
gtrsf = gp_GTrsf2d();
|
||||
}
|
||||
|
||||
CACHE(IfcCartesianTransformationOperator2DnonUniform,l,gtrsf)
|
||||
return true;
|
||||
}
|
||||
@@ -274,8 +347,12 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcAxis2Placement2D* l, gp_Trsf2d
|
||||
if ( l->hasRefDirection() )
|
||||
IfcGeom::Kernel::convert(l->RefDirection(),V);
|
||||
|
||||
gp_Ax2d axis(gp_Pnt2d(P.X(),P.Y()),gp_Dir2d(V.X(),V.Y()));
|
||||
trsf.SetTransformation(axis,gp_Ax2d());
|
||||
gp_Ax2d axis(gp_Pnt2d(P.X(),P.Y()), gp_Dir2d(V.X(),V.Y()));
|
||||
|
||||
if (!axis_equal(axis, gp_Ax2d(), getValue(GV_PRECISION))) {
|
||||
trsf.SetTransformation(axis, gp_Ax2d());
|
||||
}
|
||||
|
||||
CACHE(IfcAxis2Placement2D,l,trsf)
|
||||
return true;
|
||||
}
|
||||
|
||||
+198
-63
@@ -324,11 +324,20 @@ namespace IfcGeom {
|
||||
private:
|
||||
// Move to the next IfcRepresentation
|
||||
void _nextShape() {
|
||||
// In order to conserve memory and reduce cache insertion times, the cache is
|
||||
// cleared after an arbitary number of processed representations. This has been
|
||||
// benchmarked extensively: https://github.com/IfcOpenShell/IfcOpenShell/pull/47
|
||||
static const int clear_interval = 64;
|
||||
if (done % clear_interval == clear_interval - 1) {
|
||||
kernel.purge_cache();
|
||||
}
|
||||
ifcproducts.reset();
|
||||
++ representation_iterator;
|
||||
++ done;
|
||||
}
|
||||
|
||||
std::set<IfcSchema::IfcRepresentation*> mapped_representations_processed;
|
||||
|
||||
BRepElement<P>* create_shape_model_for_next_entity() {
|
||||
for (;;) {
|
||||
IfcSchema::IfcRepresentation* representation;
|
||||
@@ -343,55 +352,158 @@ namespace IfcGeom {
|
||||
// Has the list of IfcProducts for this representation been initialized?
|
||||
if (!ifcproducts) {
|
||||
|
||||
IfcSchema::IfcProductRepresentation::list::ptr prodreps = representation->OfProductRepresentation();
|
||||
ifcproducts = IfcSchema::IfcProduct::list::ptr(new IfcSchema::IfcProduct::list);
|
||||
IfcSchema::IfcProduct::list::ptr unfiltered_products(new IfcSchema::IfcProduct::list);
|
||||
|
||||
for ( IfcSchema::IfcProductRepresentation::list::it it = prodreps->begin(); it != prodreps->end(); ++it ) {
|
||||
if ( (*it)->is(IfcSchema::Type::IfcProductDefinitionShape) ) {
|
||||
IfcSchema::IfcProductDefinitionShape* pds = (IfcSchema::IfcProductDefinitionShape*)*it;
|
||||
unfiltered_products->push(pds->ShapeOfProduct());
|
||||
} else {
|
||||
// http://buildingsmart-tech.org/ifc/IFC2x3/TC1/html/ifcrepresentationresource/lexical/ifcproductrepresentation.htm
|
||||
// IFC2x Edition 3 NOTE Users should not instantiate the entity IfcProductRepresentation from IFC2x Edition 3 onwards.
|
||||
// It will be changed into an ABSTRACT supertype in future releases of IFC.
|
||||
{
|
||||
IfcSchema::IfcProductRepresentation::list::ptr prodreps = representation->OfProductRepresentation();
|
||||
|
||||
// IfcProductRepresentation also lacks the INVERSE relation to IfcProduct
|
||||
// Let's find the IfcProducts that reference the IfcProductRepresentation anyway
|
||||
unfiltered_products->push((*it)->entity->getInverse(IfcSchema::Type::IfcProduct, -1)->as<IfcSchema::IfcProduct>());
|
||||
for (IfcSchema::IfcProductRepresentation::list::it it = prodreps->begin(); it != prodreps->end(); ++it) {
|
||||
if ((*it)->is(IfcSchema::Type::IfcProductDefinitionShape)) {
|
||||
IfcSchema::IfcProductDefinitionShape* pds = (IfcSchema::IfcProductDefinitionShape*)*it;
|
||||
unfiltered_products->push(pds->ShapeOfProduct());
|
||||
}
|
||||
else {
|
||||
// http://buildingsmart-tech.org/ifc/IFC2x3/TC1/html/ifcrepresentationresource/lexical/ifcproductrepresentation.htm
|
||||
// IFC2x Edition 3 NOTE Users should not instantiate the entity IfcProductRepresentation from IFC2x Edition 3 onwards.
|
||||
// It will be changed into an ABSTRACT supertype in future releases of IFC.
|
||||
|
||||
// IfcProductRepresentation also lacks the INVERSE relation to IfcProduct
|
||||
// Let's find the IfcProducts that reference the IfcProductRepresentation anyway
|
||||
unfiltered_products->push((*it)->entity->getInverse(IfcSchema::Type::IfcProduct, -1)->as<IfcSchema::IfcProduct>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Filter the products based on the set of entities being included or excluded for
|
||||
// processing. The set is iterated over te able to filter on subtypes.
|
||||
for ( IfcSchema::IfcProduct::list::it jt = unfiltered_products->begin(); jt != unfiltered_products->end(); ++jt ) {
|
||||
bool found = false;
|
||||
for (std::set<IfcSchema::Type::Enum>::const_iterator kt = entities_to_include_or_exclude.begin(); kt != entities_to_include_or_exclude.end(); ++kt) {
|
||||
if ((*jt)->is(*kt)) {
|
||||
found = true;
|
||||
break;
|
||||
const int repid = representation->entity->id();
|
||||
|
||||
bool has_openings = false;
|
||||
for (IfcSchema::IfcProduct::list::it it = unfiltered_products->begin(); it != unfiltered_products->end(); ++it) {
|
||||
if (kernel.find_openings(*it)->size()) {
|
||||
has_openings = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// With world coords enabled, object transformations are directly applied to
|
||||
// the BRep. There is no way to re-use the geometry for multiple products.
|
||||
const bool process_maps_for_current_representation = !settings.get(IteratorSettings::USE_WORLD_COORDS) &&
|
||||
(!has_openings || settings.get(IteratorSettings::DISABLE_OPENING_SUBTRACTIONS));
|
||||
bool representation_processed_as_mapped_item = false;
|
||||
|
||||
IfcSchema::IfcRepresentation* representation_mapped_to = 0;
|
||||
|
||||
if (process_maps_for_current_representation) {
|
||||
IfcSchema::IfcRepresentationItem::list::ptr items = representation->Items();
|
||||
if (items->size() == 1) {
|
||||
IfcSchema::IfcRepresentationItem* item = *items->begin();
|
||||
if (item->is(IfcSchema::Type::IfcMappedItem)) {
|
||||
if (item->StyledByItem()->size() == 0) {
|
||||
IfcSchema::IfcMappedItem* mapped_item = item->as<IfcSchema::IfcMappedItem>();
|
||||
if (kernel.is_identity_transform(mapped_item->MappingTarget())) {
|
||||
IfcSchema::IfcRepresentationMap* map = mapped_item->MappingSource();
|
||||
if (kernel.is_identity_transform(map->MappingOrigin())) {
|
||||
representation_mapped_to = map->MappedRepresentation();
|
||||
IfcSchema::IfcProductRepresentation::list::ptr prodreps = representation_mapped_to->OfProductRepresentation();
|
||||
|
||||
bool all_product_without_openings = true;
|
||||
IfcSchema::IfcProduct::list::ptr products;
|
||||
|
||||
for (IfcSchema::IfcProductRepresentation::list::it it = prodreps->begin(); it != prodreps->end(); ++it) {
|
||||
IfcSchema::IfcProduct::list::ptr products_of_prodrep = (*it)->entity->getInverse(IfcSchema::Type::IfcProduct, -1)->as<IfcSchema::IfcProduct>();
|
||||
products->push(products_of_prodrep);
|
||||
for (IfcSchema::IfcProduct::list::it jt = products_of_prodrep->begin(); jt != products_of_prodrep->end(); ++jt) {
|
||||
if (kernel.find_openings(*jt)->size() > 0 && !settings.get(IteratorSettings::DISABLE_OPENING_SUBTRACTIONS)) {
|
||||
all_product_without_openings = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (all_product_without_openings) {
|
||||
representation_processed_as_mapped_item = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach(const boost::regex& r, names_to_include_or_exclude) {
|
||||
if (boost::regex_match((*jt)->Name(), r)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (found == include_entities_in_processing) {
|
||||
ifcproducts->push(*jt);
|
||||
}
|
||||
if (representation_mapped_to) {
|
||||
if (mapped_representations_processed.find(representation_mapped_to) != mapped_representations_processed.end()) {
|
||||
_nextShape();
|
||||
continue;
|
||||
}
|
||||
|
||||
mapped_representations_processed.insert(representation_mapped_to);
|
||||
}
|
||||
// Does this representation have any IfcProducts?
|
||||
if (!ifcproducts->size()) {
|
||||
|
||||
if (representation_processed_as_mapped_item) {
|
||||
_nextShape();
|
||||
continue;
|
||||
}
|
||||
|
||||
IfcSchema::IfcRepresentationMap::list::ptr maps = representation->RepresentationMap();
|
||||
|
||||
if (process_maps_for_current_representation && maps->size() == 1) {
|
||||
IfcSchema::IfcRepresentationMap* map = *maps->begin();
|
||||
if (kernel.is_identity_transform(map->MappingOrigin())) {
|
||||
IfcSchema::IfcMappedItem::list::ptr items = map->MapUsage();
|
||||
for (IfcSchema::IfcMappedItem::list::it it = items->begin(); it != items->end(); ++it) {
|
||||
IfcSchema::IfcMappedItem* item = *it;
|
||||
if (item->StyledByItem()->size() != 0) continue;
|
||||
|
||||
if (!kernel.is_identity_transform(item->MappingTarget())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
IfcSchema::IfcRepresentation::list::ptr reps = item->entity->getInverse(IfcSchema::Type::IfcRepresentation, -1)->as<IfcSchema::IfcRepresentation>();
|
||||
for (IfcSchema::IfcRepresentation::list::it jt = reps->begin(); jt != reps->end(); ++jt) {
|
||||
IfcSchema::IfcRepresentation* rep = *jt;
|
||||
if (rep->Items()->size() != 1) continue;
|
||||
IfcSchema::IfcProductRepresentation::list::ptr prodreps = rep->OfProductRepresentation();
|
||||
for (IfcSchema::IfcProductRepresentation::list::it kt = prodreps->begin(); kt != prodreps->end(); ++kt) {
|
||||
IfcSchema::IfcProduct::list::ptr prods = (*kt)->entity->getInverse(IfcSchema::Type::IfcProduct, -1)->as<IfcSchema::IfcProduct>();
|
||||
for (IfcSchema::IfcProduct::list::it lt = prods->begin(); lt != prods->end(); ++lt) {
|
||||
if (kernel.find_openings(*lt)->size() == 0 || settings.get(IteratorSettings::DISABLE_OPENING_SUBTRACTIONS)) {
|
||||
if (!unfiltered_products->contains(*lt)) {
|
||||
unfiltered_products->push(*lt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Filter the products based on the set of entities being included or excluded for
|
||||
// processing. The set is iterated over to able to filter on subtypes.
|
||||
for ( IfcSchema::IfcProduct::list::it jt = unfiltered_products->begin(); jt != unfiltered_products->end(); ++jt ) {
|
||||
bool found = false;
|
||||
for (std::set<IfcSchema::Type::Enum>::const_iterator kt = entities_to_include_or_exclude.begin(); kt != entities_to_include_or_exclude.end(); ++kt) {
|
||||
if ((*jt)->is(*kt)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
foreach(const boost::regex& r, names_to_include_or_exclude) {
|
||||
if (boost::regex_match((*jt)->Name(), r)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (found == include_entities_in_processing) {
|
||||
ifcproducts->push(*jt);
|
||||
}
|
||||
}
|
||||
|
||||
ifcproduct_iterator = ifcproducts->begin();
|
||||
}
|
||||
|
||||
// Have we reached the end of our list of IfcProducts?
|
||||
if ( ifcproduct_iterator == ifcproducts->end() ) {
|
||||
_nextShape();
|
||||
@@ -399,8 +511,13 @@ namespace IfcGeom {
|
||||
}
|
||||
|
||||
IfcSchema::IfcProduct* product = *ifcproduct_iterator;
|
||||
|
||||
BRepElement<P>* element = kernel.create_brep_for_representation_and_product<P>(settings, representation, product);
|
||||
|
||||
BRepElement<P>* element;
|
||||
if (ifcproduct_iterator == ifcproducts->begin() || !settings.get(IteratorSettings::USE_WORLD_COORDS)) {
|
||||
element = kernel.create_brep_for_representation_and_product<P>(settings, representation, product);
|
||||
} else {
|
||||
element = kernel.create_brep_for_processed_representation(settings, representation, product, current_shape_model);
|
||||
}
|
||||
|
||||
if ( !element ) {
|
||||
_nextShape();
|
||||
@@ -411,9 +528,7 @@ namespace IfcGeom {
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
bool next() {
|
||||
void free_shapes() {
|
||||
// Free all possible representations of the current geometrical entity
|
||||
delete current_triangulation;
|
||||
current_triangulation = 0;
|
||||
@@ -421,7 +536,11 @@ namespace IfcGeom {
|
||||
current_serialization = 0;
|
||||
delete current_shape_model;
|
||||
current_shape_model = 0;
|
||||
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
bool next() {
|
||||
// Increment the iterator over the list of products using the current
|
||||
// shape representation
|
||||
if (ifcproducts) {
|
||||
@@ -431,15 +550,14 @@ namespace IfcGeom {
|
||||
return create();
|
||||
}
|
||||
|
||||
/// Gets or takes the representation of the current geometrical entity.
|
||||
/// @param take_ownership Pass in 'true' as if wishing to maintain the element lifetime yourself.
|
||||
Element<P>* get(bool take_ownership = false)
|
||||
/// Gets the representation of the current geometrical entity.
|
||||
Element<P>* get()
|
||||
{
|
||||
// TODO: Test settings and throw
|
||||
Element<P>* ret = 0;
|
||||
if (current_triangulation) { ret = current_triangulation; if (take_ownership) current_triangulation = 0; }
|
||||
else if (current_serialization) { ret = current_serialization; if (take_ownership) current_serialization = 0; }
|
||||
else if (current_shape_model) { ret = current_shape_model; if (take_ownership) current_shape_model = 0; }
|
||||
if (current_triangulation) { ret = current_triangulation; }
|
||||
else if (current_serialization) { ret = current_serialization; }
|
||||
else if (current_shape_model) { ret = current_shape_model; }
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -479,23 +597,45 @@ namespace IfcGeom {
|
||||
}
|
||||
|
||||
bool create() {
|
||||
bool success = true;
|
||||
|
||||
IfcGeom::BRepElement<P>* next_shape_model = 0;
|
||||
IfcGeom::SerializedElement<P>* next_serialization = 0;
|
||||
IfcGeom::TriangulationElement<P>* next_triangulation = 0;
|
||||
|
||||
try {
|
||||
current_shape_model = create_shape_model_for_next_entity();
|
||||
next_shape_model = create_shape_model_for_next_entity();
|
||||
} catch (...) {}
|
||||
if (!current_shape_model) return false;
|
||||
if (settings.get(IteratorSettings::USE_BREP_DATA)) {
|
||||
try {
|
||||
current_serialization = new SerializedElement<P>(*current_shape_model);
|
||||
} catch (...) {}
|
||||
return !!current_serialization;
|
||||
} else if (!settings.get(IteratorSettings::DISABLE_TRIANGULATION)) {
|
||||
try {
|
||||
current_triangulation = new TriangulationElement<P>(*current_shape_model);
|
||||
} catch (...) {}
|
||||
return !!current_triangulation;
|
||||
|
||||
if (next_shape_model) {
|
||||
if (settings.get(IteratorSettings::USE_BREP_DATA)) {
|
||||
try {
|
||||
next_serialization = new SerializedElement<P>(*next_shape_model);
|
||||
} catch (...) {
|
||||
success = false;
|
||||
}
|
||||
} else if (!settings.get(IteratorSettings::DISABLE_TRIANGULATION)) {
|
||||
try {
|
||||
if (ifcproduct_iterator == ifcproducts->begin() || settings.get(IteratorSettings::USE_WORLD_COORDS)) {
|
||||
next_triangulation = new TriangulationElement<P>(*next_shape_model);
|
||||
} else {
|
||||
next_triangulation = new TriangulationElement<P>(*next_shape_model, current_triangulation->geometry_pointer());
|
||||
}
|
||||
} catch (...) {
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
success = false;
|
||||
}
|
||||
|
||||
free_shapes();
|
||||
|
||||
current_shape_model = next_shape_model;
|
||||
current_serialization = next_serialization;
|
||||
current_triangulation = next_triangulation;
|
||||
|
||||
return success;
|
||||
}
|
||||
private:
|
||||
void _initialize() {
|
||||
@@ -554,12 +694,7 @@ namespace IfcGeom {
|
||||
delete ifc_file;
|
||||
}
|
||||
|
||||
delete current_triangulation;
|
||||
current_triangulation = 0;
|
||||
delete current_serialization;
|
||||
current_serialization = 0;
|
||||
delete current_shape_model;
|
||||
current_shape_model = 0;
|
||||
free_shapes();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -56,8 +56,8 @@ const IfcGeom::SurfaceStyle* IfcGeom::Kernel::get_style(const IfcSchema::IfcRepr
|
||||
return 0;
|
||||
}
|
||||
int surface_style_id = shading_styles.first->entity->id();
|
||||
std::map<int,SurfaceStyle>::const_iterator it = cache.Style.find(surface_style_id);
|
||||
if (it != cache.Style.end()) {
|
||||
std::map<int,SurfaceStyle>::const_iterator it = style_cache.find(surface_style_id);
|
||||
if (it != style_cache.end()) {
|
||||
return &(it->second);
|
||||
}
|
||||
SurfaceStyle surface_style;
|
||||
@@ -104,7 +104,7 @@ const IfcGeom::SurfaceStyle* IfcGeom::Kernel::get_style(const IfcSchema::IfcRepr
|
||||
surface_style.Transparency().reset(d);
|
||||
}
|
||||
}
|
||||
return &(cache.Style[surface_style_id] = surface_style);
|
||||
return &(style_cache[surface_style_id] = surface_style);
|
||||
}
|
||||
|
||||
static std::map<std::string, IfcGeom::SurfaceStyle> default_materials;
|
||||
|
||||
@@ -44,8 +44,8 @@ namespace IfcGeom {
|
||||
double& B() { return data[2]; }
|
||||
};
|
||||
private:
|
||||
std::string name;
|
||||
std::string original_name_;
|
||||
boost::optional<std::string> name;
|
||||
boost::optional<int> id;
|
||||
boost::optional<ColorComponent> diffuse, specular;
|
||||
boost::optional<double> transparency;
|
||||
@@ -72,18 +72,13 @@ namespace IfcGeom {
|
||||
// architecture can just as easily be accomplished by comparing the
|
||||
// pointer addresses of the styles, as they are always referenced
|
||||
// from out of a global map of some sort.
|
||||
bool operator==(const SurfaceStyle& other) const {
|
||||
if (name && other.name) {
|
||||
return *name == *other.name;
|
||||
} else if (id && other.id) {
|
||||
return *id == *other.id;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
bool operator==(const SurfaceStyle& other) {
|
||||
return name == other.name;
|
||||
}
|
||||
|
||||
/// ID name, e.g. "surface-style-66675-metal---aluminium"
|
||||
const std::string& Name() const { return *name; }
|
||||
const std::string& Name() const { return name; }
|
||||
|
||||
/// Original name, if available, e.g. "Metal - Aluminium"
|
||||
const std::string& original_name() const { return original_name_; }
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
|
||||
#include <BRepAdaptor_Curve.hxx>
|
||||
#include <GCPnts_QuasiUniformDeflection.hxx>
|
||||
@@ -282,6 +283,7 @@ namespace IfcGeom {
|
||||
}
|
||||
}
|
||||
|
||||
BRepTools::Clean(s);
|
||||
}
|
||||
}
|
||||
virtual ~Triangulation() {}
|
||||
|
||||
@@ -49,8 +49,10 @@ bool IfcGeom::Kernel::convert_shape(const IfcBaseClass* l, TopoDS_Shape& r) {
|
||||
bool processed = false;
|
||||
bool ignored = false;
|
||||
|
||||
#ifndef NO_CACHE
|
||||
std::map<int,TopoDS_Shape>::const_iterator it = cache.Shape.find(id);
|
||||
if ( it != cache.Shape.end() ) { r = it->second; return true; }
|
||||
#endif
|
||||
const bool include_curves = getValue(GV_DIMENSIONALITY) != +1;
|
||||
const bool include_solids_and_surfaces = getValue(GV_DIMENSIONALITY) != -1;
|
||||
|
||||
@@ -85,7 +87,9 @@ bool IfcGeom::Kernel::convert_shape(const IfcBaseClass* l, TopoDS_Shape& r) {
|
||||
if ( processed && success ) {
|
||||
const double precision = getValue(GV_PRECISION);
|
||||
apply_tolerance(r, precision);
|
||||
#ifndef NO_CACHE
|
||||
cache.Shape[id] = r;
|
||||
#endif
|
||||
} else if (!ignored) {
|
||||
const char* const msg = processed
|
||||
? "Failed to convert:"
|
||||
|
||||
@@ -4258,7 +4258,13 @@ std::pair<Type::Enum, unsigned> Type::GetInverseAttribute(Enum t, const std::str
|
||||
return jt->second;
|
||||
}
|
||||
}
|
||||
if ((t = Parent(t)) == -1) break;
|
||||
boost::optional<Enum> pt = Parent(t);
|
||||
if (pt) {
|
||||
t = *pt;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
throw IfcException("Attribute not found");
|
||||
}
|
||||
@@ -4277,7 +4283,13 @@ std::set<std::string> Type::GetInverseAttributeNames(Enum t) {
|
||||
return_value.insert(jt->first);
|
||||
}
|
||||
}
|
||||
if ((t = Parent(t)) == -1) break;
|
||||
boost::optional<Enum> pt = Parent(t);
|
||||
if (pt) {
|
||||
t = *pt;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return return_value;
|
||||
|
||||
+8
-555
@@ -1810,561 +1810,14 @@ Type::Enum Type::FromString(const std::string& s) {
|
||||
else return it->second;
|
||||
}
|
||||
|
||||
Type::Enum Type::Parent(Enum v){
|
||||
if (v < 0 || v >= 980) return (Enum)-1;
|
||||
if(v==Ifc2DCompositeCurve ) { return IfcCompositeCurve; }
|
||||
if(v==IfcActionRequest ) { return IfcControl; }
|
||||
if(v==IfcActor ) { return IfcObject; }
|
||||
if(v==IfcActuatorType ) { return IfcDistributionControlElementType; }
|
||||
if(v==IfcAirTerminalBoxType ) { return IfcFlowControllerType; }
|
||||
if(v==IfcAirTerminalType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcAirToAirHeatRecoveryType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcAlarmType ) { return IfcDistributionControlElementType; }
|
||||
if(v==IfcAngularDimension ) { return IfcDimensionCurveDirectedCallout; }
|
||||
if(v==IfcAnnotation ) { return IfcProduct; }
|
||||
if(v==IfcAnnotationCurveOccurrence ) { return IfcAnnotationOccurrence; }
|
||||
if(v==IfcAnnotationFillArea ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcAnnotationFillAreaOccurrence ) { return IfcAnnotationOccurrence; }
|
||||
if(v==IfcAnnotationOccurrence ) { return IfcStyledItem; }
|
||||
if(v==IfcAnnotationSurface ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcAnnotationSurfaceOccurrence ) { return IfcAnnotationOccurrence; }
|
||||
if(v==IfcAnnotationSymbolOccurrence ) { return IfcAnnotationOccurrence; }
|
||||
if(v==IfcAnnotationTextOccurrence ) { return IfcAnnotationOccurrence; }
|
||||
if(v==IfcArbitraryClosedProfileDef ) { return IfcProfileDef; }
|
||||
if(v==IfcArbitraryOpenProfileDef ) { return IfcProfileDef; }
|
||||
if(v==IfcArbitraryProfileDefWithVoids ) { return IfcArbitraryClosedProfileDef; }
|
||||
if(v==IfcAsset ) { return IfcGroup; }
|
||||
if(v==IfcAsymmetricIShapeProfileDef ) { return IfcIShapeProfileDef; }
|
||||
if(v==IfcAxis1Placement ) { return IfcPlacement; }
|
||||
if(v==IfcAxis2Placement2D ) { return IfcPlacement; }
|
||||
if(v==IfcAxis2Placement3D ) { return IfcPlacement; }
|
||||
if(v==IfcBSplineCurve ) { return IfcBoundedCurve; }
|
||||
if(v==IfcBeam ) { return IfcBuildingElement; }
|
||||
if(v==IfcBeamType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcBezierCurve ) { return IfcBSplineCurve; }
|
||||
if(v==IfcBlobTexture ) { return IfcSurfaceTexture; }
|
||||
if(v==IfcBlock ) { return IfcCsgPrimitive3D; }
|
||||
if(v==IfcBoilerType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcBooleanClippingResult ) { return IfcBooleanResult; }
|
||||
if(v==IfcBooleanResult ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcBoundaryEdgeCondition ) { return IfcBoundaryCondition; }
|
||||
if(v==IfcBoundaryFaceCondition ) { return IfcBoundaryCondition; }
|
||||
if(v==IfcBoundaryNodeCondition ) { return IfcBoundaryCondition; }
|
||||
if(v==IfcBoundaryNodeConditionWarping ) { return IfcBoundaryNodeCondition; }
|
||||
if(v==IfcBoundedCurve ) { return IfcCurve; }
|
||||
if(v==IfcBoundedSurface ) { return IfcSurface; }
|
||||
if(v==IfcBoundingBox ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcBoxedHalfSpace ) { return IfcHalfSpaceSolid; }
|
||||
if(v==IfcBuilding ) { return IfcSpatialStructureElement; }
|
||||
if(v==IfcBuildingElement ) { return IfcElement; }
|
||||
if(v==IfcBuildingElementComponent ) { return IfcBuildingElement; }
|
||||
if(v==IfcBuildingElementPart ) { return IfcBuildingElementComponent; }
|
||||
if(v==IfcBuildingElementProxy ) { return IfcBuildingElement; }
|
||||
if(v==IfcBuildingElementProxyType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcBuildingElementType ) { return IfcElementType; }
|
||||
if(v==IfcBuildingStorey ) { return IfcSpatialStructureElement; }
|
||||
if(v==IfcCShapeProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcCableCarrierFittingType ) { return IfcFlowFittingType; }
|
||||
if(v==IfcCableCarrierSegmentType ) { return IfcFlowSegmentType; }
|
||||
if(v==IfcCableSegmentType ) { return IfcFlowSegmentType; }
|
||||
if(v==IfcCartesianPoint ) { return IfcPoint; }
|
||||
if(v==IfcCartesianTransformationOperator ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcCartesianTransformationOperator2D ) { return IfcCartesianTransformationOperator; }
|
||||
if(v==IfcCartesianTransformationOperator2DnonUniform) { return IfcCartesianTransformationOperator2D; }
|
||||
if(v==IfcCartesianTransformationOperator3D ) { return IfcCartesianTransformationOperator; }
|
||||
if(v==IfcCartesianTransformationOperator3DnonUniform) { return IfcCartesianTransformationOperator3D; }
|
||||
if(v==IfcCenterLineProfileDef ) { return IfcArbitraryOpenProfileDef; }
|
||||
if(v==IfcChamferEdgeFeature ) { return IfcEdgeFeature; }
|
||||
if(v==IfcChillerType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcCircle ) { return IfcConic; }
|
||||
if(v==IfcCircleHollowProfileDef ) { return IfcCircleProfileDef; }
|
||||
if(v==IfcCircleProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcClassificationReference ) { return IfcExternalReference; }
|
||||
if(v==IfcClosedShell ) { return IfcConnectedFaceSet; }
|
||||
if(v==IfcCoilType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcColourRgb ) { return IfcColourSpecification; }
|
||||
if(v==IfcColumn ) { return IfcBuildingElement; }
|
||||
if(v==IfcColumnType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcComplexProperty ) { return IfcProperty; }
|
||||
if(v==IfcCompositeCurve ) { return IfcBoundedCurve; }
|
||||
if(v==IfcCompositeCurveSegment ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcCompositeProfileDef ) { return IfcProfileDef; }
|
||||
if(v==IfcCompressorType ) { return IfcFlowMovingDeviceType; }
|
||||
if(v==IfcCondenserType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcCondition ) { return IfcGroup; }
|
||||
if(v==IfcConditionCriterion ) { return IfcControl; }
|
||||
if(v==IfcConic ) { return IfcCurve; }
|
||||
if(v==IfcConnectedFaceSet ) { return IfcTopologicalRepresentationItem; }
|
||||
if(v==IfcConnectionCurveGeometry ) { return IfcConnectionGeometry; }
|
||||
if(v==IfcConnectionPointEccentricity ) { return IfcConnectionPointGeometry; }
|
||||
if(v==IfcConnectionPointGeometry ) { return IfcConnectionGeometry; }
|
||||
if(v==IfcConnectionPortGeometry ) { return IfcConnectionGeometry; }
|
||||
if(v==IfcConnectionSurfaceGeometry ) { return IfcConnectionGeometry; }
|
||||
if(v==IfcConstructionEquipmentResource ) { return IfcConstructionResource; }
|
||||
if(v==IfcConstructionMaterialResource ) { return IfcConstructionResource; }
|
||||
if(v==IfcConstructionProductResource ) { return IfcConstructionResource; }
|
||||
if(v==IfcConstructionResource ) { return IfcResource; }
|
||||
if(v==IfcContextDependentUnit ) { return IfcNamedUnit; }
|
||||
if(v==IfcControl ) { return IfcObject; }
|
||||
if(v==IfcControllerType ) { return IfcDistributionControlElementType; }
|
||||
if(v==IfcConversionBasedUnit ) { return IfcNamedUnit; }
|
||||
if(v==IfcCooledBeamType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcCoolingTowerType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcCostItem ) { return IfcControl; }
|
||||
if(v==IfcCostSchedule ) { return IfcControl; }
|
||||
if(v==IfcCostValue ) { return IfcAppliedValue; }
|
||||
if(v==IfcCovering ) { return IfcBuildingElement; }
|
||||
if(v==IfcCoveringType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcCraneRailAShapeProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcCraneRailFShapeProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcCrewResource ) { return IfcConstructionResource; }
|
||||
if(v==IfcCsgPrimitive3D ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcCsgSolid ) { return IfcSolidModel; }
|
||||
if(v==IfcCurtainWall ) { return IfcBuildingElement; }
|
||||
if(v==IfcCurtainWallType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcCurve ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcCurveBoundedPlane ) { return IfcBoundedSurface; }
|
||||
if(v==IfcCurveStyle ) { return IfcPresentationStyle; }
|
||||
if(v==IfcDamperType ) { return IfcFlowControllerType; }
|
||||
if(v==IfcDefinedSymbol ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcDerivedProfileDef ) { return IfcProfileDef; }
|
||||
if(v==IfcDiameterDimension ) { return IfcDimensionCurveDirectedCallout; }
|
||||
if(v==IfcDimensionCalloutRelationship ) { return IfcDraughtingCalloutRelationship; }
|
||||
if(v==IfcDimensionCurve ) { return IfcAnnotationCurveOccurrence; }
|
||||
if(v==IfcDimensionCurveDirectedCallout ) { return IfcDraughtingCallout; }
|
||||
if(v==IfcDimensionCurveTerminator ) { return IfcTerminatorSymbol; }
|
||||
if(v==IfcDimensionPair ) { return IfcDraughtingCalloutRelationship; }
|
||||
if(v==IfcDirection ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcDiscreteAccessory ) { return IfcElementComponent; }
|
||||
if(v==IfcDiscreteAccessoryType ) { return IfcElementComponentType; }
|
||||
if(v==IfcDistributionChamberElement ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcDistributionChamberElementType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcDistributionControlElement ) { return IfcDistributionElement; }
|
||||
if(v==IfcDistributionControlElementType ) { return IfcDistributionElementType; }
|
||||
if(v==IfcDistributionElement ) { return IfcElement; }
|
||||
if(v==IfcDistributionElementType ) { return IfcElementType; }
|
||||
if(v==IfcDistributionFlowElement ) { return IfcDistributionElement; }
|
||||
if(v==IfcDistributionFlowElementType ) { return IfcDistributionElementType; }
|
||||
if(v==IfcDistributionPort ) { return IfcPort; }
|
||||
if(v==IfcDocumentReference ) { return IfcExternalReference; }
|
||||
if(v==IfcDoor ) { return IfcBuildingElement; }
|
||||
if(v==IfcDoorLiningProperties ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcDoorPanelProperties ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcDoorStyle ) { return IfcTypeProduct; }
|
||||
if(v==IfcDraughtingCallout ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcDraughtingPreDefinedColour ) { return IfcPreDefinedColour; }
|
||||
if(v==IfcDraughtingPreDefinedCurveFont ) { return IfcPreDefinedCurveFont; }
|
||||
if(v==IfcDraughtingPreDefinedTextFont ) { return IfcPreDefinedTextFont; }
|
||||
if(v==IfcDuctFittingType ) { return IfcFlowFittingType; }
|
||||
if(v==IfcDuctSegmentType ) { return IfcFlowSegmentType; }
|
||||
if(v==IfcDuctSilencerType ) { return IfcFlowTreatmentDeviceType; }
|
||||
if(v==IfcEdge ) { return IfcTopologicalRepresentationItem; }
|
||||
if(v==IfcEdgeCurve ) { return IfcEdge; }
|
||||
if(v==IfcEdgeFeature ) { return IfcFeatureElementSubtraction; }
|
||||
if(v==IfcEdgeLoop ) { return IfcLoop; }
|
||||
if(v==IfcElectricApplianceType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcElectricDistributionPoint ) { return IfcFlowController; }
|
||||
if(v==IfcElectricFlowStorageDeviceType ) { return IfcFlowStorageDeviceType; }
|
||||
if(v==IfcElectricGeneratorType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcElectricHeaterType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcElectricMotorType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcElectricTimeControlType ) { return IfcFlowControllerType; }
|
||||
if(v==IfcElectricalBaseProperties ) { return IfcEnergyProperties; }
|
||||
if(v==IfcElectricalCircuit ) { return IfcSystem; }
|
||||
if(v==IfcElectricalElement ) { return IfcElement; }
|
||||
if(v==IfcElement ) { return IfcProduct; }
|
||||
if(v==IfcElementAssembly ) { return IfcElement; }
|
||||
if(v==IfcElementComponent ) { return IfcElement; }
|
||||
if(v==IfcElementComponentType ) { return IfcElementType; }
|
||||
if(v==IfcElementQuantity ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcElementType ) { return IfcTypeProduct; }
|
||||
if(v==IfcElementarySurface ) { return IfcSurface; }
|
||||
if(v==IfcEllipse ) { return IfcConic; }
|
||||
if(v==IfcEllipseProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcEnergyConversionDevice ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcEnergyConversionDeviceType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcEnergyProperties ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcEnvironmentalImpactValue ) { return IfcAppliedValue; }
|
||||
if(v==IfcEquipmentElement ) { return IfcElement; }
|
||||
if(v==IfcEquipmentStandard ) { return IfcControl; }
|
||||
if(v==IfcEvaporativeCoolerType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcEvaporatorType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcExtendedMaterialProperties ) { return IfcMaterialProperties; }
|
||||
if(v==IfcExternallyDefinedHatchStyle ) { return IfcExternalReference; }
|
||||
if(v==IfcExternallyDefinedSurfaceStyle ) { return IfcExternalReference; }
|
||||
if(v==IfcExternallyDefinedSymbol ) { return IfcExternalReference; }
|
||||
if(v==IfcExternallyDefinedTextFont ) { return IfcExternalReference; }
|
||||
if(v==IfcExtrudedAreaSolid ) { return IfcSweptAreaSolid; }
|
||||
if(v==IfcFace ) { return IfcTopologicalRepresentationItem; }
|
||||
if(v==IfcFaceBasedSurfaceModel ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcFaceBound ) { return IfcTopologicalRepresentationItem; }
|
||||
if(v==IfcFaceOuterBound ) { return IfcFaceBound; }
|
||||
if(v==IfcFaceSurface ) { return IfcFace; }
|
||||
if(v==IfcFacetedBrep ) { return IfcManifoldSolidBrep; }
|
||||
if(v==IfcFacetedBrepWithVoids ) { return IfcManifoldSolidBrep; }
|
||||
if(v==IfcFailureConnectionCondition ) { return IfcStructuralConnectionCondition; }
|
||||
if(v==IfcFanType ) { return IfcFlowMovingDeviceType; }
|
||||
if(v==IfcFastener ) { return IfcElementComponent; }
|
||||
if(v==IfcFastenerType ) { return IfcElementComponentType; }
|
||||
if(v==IfcFeatureElement ) { return IfcElement; }
|
||||
if(v==IfcFeatureElementAddition ) { return IfcFeatureElement; }
|
||||
if(v==IfcFeatureElementSubtraction ) { return IfcFeatureElement; }
|
||||
if(v==IfcFillAreaStyle ) { return IfcPresentationStyle; }
|
||||
if(v==IfcFillAreaStyleHatching ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcFillAreaStyleTileSymbolWithStyle ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcFillAreaStyleTiles ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcFilterType ) { return IfcFlowTreatmentDeviceType; }
|
||||
if(v==IfcFireSuppressionTerminalType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcFlowController ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcFlowControllerType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcFlowFitting ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcFlowFittingType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcFlowInstrumentType ) { return IfcDistributionControlElementType; }
|
||||
if(v==IfcFlowMeterType ) { return IfcFlowControllerType; }
|
||||
if(v==IfcFlowMovingDevice ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcFlowMovingDeviceType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcFlowSegment ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcFlowSegmentType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcFlowStorageDevice ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcFlowStorageDeviceType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcFlowTerminal ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcFlowTerminalType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcFlowTreatmentDevice ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcFlowTreatmentDeviceType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcFluidFlowProperties ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcFooting ) { return IfcBuildingElement; }
|
||||
if(v==IfcFuelProperties ) { return IfcMaterialProperties; }
|
||||
if(v==IfcFurnishingElement ) { return IfcElement; }
|
||||
if(v==IfcFurnishingElementType ) { return IfcElementType; }
|
||||
if(v==IfcFurnitureStandard ) { return IfcControl; }
|
||||
if(v==IfcFurnitureType ) { return IfcFurnishingElementType; }
|
||||
if(v==IfcGasTerminalType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcGeneralMaterialProperties ) { return IfcMaterialProperties; }
|
||||
if(v==IfcGeneralProfileProperties ) { return IfcProfileProperties; }
|
||||
if(v==IfcGeometricCurveSet ) { return IfcGeometricSet; }
|
||||
if(v==IfcGeometricRepresentationContext ) { return IfcRepresentationContext; }
|
||||
if(v==IfcGeometricRepresentationItem ) { return IfcRepresentationItem; }
|
||||
if(v==IfcGeometricRepresentationSubContext ) { return IfcGeometricRepresentationContext; }
|
||||
if(v==IfcGeometricSet ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcGrid ) { return IfcProduct; }
|
||||
if(v==IfcGridPlacement ) { return IfcObjectPlacement; }
|
||||
if(v==IfcGroup ) { return IfcObject; }
|
||||
if(v==IfcHalfSpaceSolid ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcHeatExchangerType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcHumidifierType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcHygroscopicMaterialProperties ) { return IfcMaterialProperties; }
|
||||
if(v==IfcIShapeProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcImageTexture ) { return IfcSurfaceTexture; }
|
||||
if(v==IfcInventory ) { return IfcGroup; }
|
||||
if(v==IfcIrregularTimeSeries ) { return IfcTimeSeries; }
|
||||
if(v==IfcJunctionBoxType ) { return IfcFlowFittingType; }
|
||||
if(v==IfcLShapeProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcLaborResource ) { return IfcConstructionResource; }
|
||||
if(v==IfcLampType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcLibraryReference ) { return IfcExternalReference; }
|
||||
if(v==IfcLightFixtureType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcLightSource ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcLightSourceAmbient ) { return IfcLightSource; }
|
||||
if(v==IfcLightSourceDirectional ) { return IfcLightSource; }
|
||||
if(v==IfcLightSourceGoniometric ) { return IfcLightSource; }
|
||||
if(v==IfcLightSourcePositional ) { return IfcLightSource; }
|
||||
if(v==IfcLightSourceSpot ) { return IfcLightSourcePositional; }
|
||||
if(v==IfcLine ) { return IfcCurve; }
|
||||
if(v==IfcLinearDimension ) { return IfcDimensionCurveDirectedCallout; }
|
||||
if(v==IfcLocalPlacement ) { return IfcObjectPlacement; }
|
||||
if(v==IfcLoop ) { return IfcTopologicalRepresentationItem; }
|
||||
if(v==IfcManifoldSolidBrep ) { return IfcSolidModel; }
|
||||
if(v==IfcMappedItem ) { return IfcRepresentationItem; }
|
||||
if(v==IfcMaterialDefinitionRepresentation ) { return IfcProductRepresentation; }
|
||||
if(v==IfcMechanicalConcreteMaterialProperties ) { return IfcMechanicalMaterialProperties; }
|
||||
if(v==IfcMechanicalFastener ) { return IfcFastener; }
|
||||
if(v==IfcMechanicalFastenerType ) { return IfcFastenerType; }
|
||||
if(v==IfcMechanicalMaterialProperties ) { return IfcMaterialProperties; }
|
||||
if(v==IfcMechanicalSteelMaterialProperties ) { return IfcMechanicalMaterialProperties; }
|
||||
if(v==IfcMember ) { return IfcBuildingElement; }
|
||||
if(v==IfcMemberType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcMetric ) { return IfcConstraint; }
|
||||
if(v==IfcMotorConnectionType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcMove ) { return IfcTask; }
|
||||
if(v==IfcObject ) { return IfcObjectDefinition; }
|
||||
if(v==IfcObjectDefinition ) { return IfcRoot; }
|
||||
if(v==IfcObjective ) { return IfcConstraint; }
|
||||
if(v==IfcOccupant ) { return IfcActor; }
|
||||
if(v==IfcOffsetCurve2D ) { return IfcCurve; }
|
||||
if(v==IfcOffsetCurve3D ) { return IfcCurve; }
|
||||
if(v==IfcOneDirectionRepeatFactor ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcOpenShell ) { return IfcConnectedFaceSet; }
|
||||
if(v==IfcOpeningElement ) { return IfcFeatureElementSubtraction; }
|
||||
if(v==IfcOpticalMaterialProperties ) { return IfcMaterialProperties; }
|
||||
if(v==IfcOrderAction ) { return IfcTask; }
|
||||
if(v==IfcOrientedEdge ) { return IfcEdge; }
|
||||
if(v==IfcOutletType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcParameterizedProfileDef ) { return IfcProfileDef; }
|
||||
if(v==IfcPath ) { return IfcTopologicalRepresentationItem; }
|
||||
if(v==IfcPerformanceHistory ) { return IfcControl; }
|
||||
if(v==IfcPermeableCoveringProperties ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcPermit ) { return IfcControl; }
|
||||
if(v==IfcPhysicalComplexQuantity ) { return IfcPhysicalQuantity; }
|
||||
if(v==IfcPhysicalSimpleQuantity ) { return IfcPhysicalQuantity; }
|
||||
if(v==IfcPile ) { return IfcBuildingElement; }
|
||||
if(v==IfcPipeFittingType ) { return IfcFlowFittingType; }
|
||||
if(v==IfcPipeSegmentType ) { return IfcFlowSegmentType; }
|
||||
if(v==IfcPixelTexture ) { return IfcSurfaceTexture; }
|
||||
if(v==IfcPlacement ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcPlanarBox ) { return IfcPlanarExtent; }
|
||||
if(v==IfcPlanarExtent ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcPlane ) { return IfcElementarySurface; }
|
||||
if(v==IfcPlate ) { return IfcBuildingElement; }
|
||||
if(v==IfcPlateType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcPoint ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcPointOnCurve ) { return IfcPoint; }
|
||||
if(v==IfcPointOnSurface ) { return IfcPoint; }
|
||||
if(v==IfcPolyLoop ) { return IfcLoop; }
|
||||
if(v==IfcPolygonalBoundedHalfSpace ) { return IfcHalfSpaceSolid; }
|
||||
if(v==IfcPolyline ) { return IfcBoundedCurve; }
|
||||
if(v==IfcPort ) { return IfcProduct; }
|
||||
if(v==IfcPostalAddress ) { return IfcAddress; }
|
||||
if(v==IfcPreDefinedColour ) { return IfcPreDefinedItem; }
|
||||
if(v==IfcPreDefinedCurveFont ) { return IfcPreDefinedItem; }
|
||||
if(v==IfcPreDefinedDimensionSymbol ) { return IfcPreDefinedSymbol; }
|
||||
if(v==IfcPreDefinedPointMarkerSymbol ) { return IfcPreDefinedSymbol; }
|
||||
if(v==IfcPreDefinedSymbol ) { return IfcPreDefinedItem; }
|
||||
if(v==IfcPreDefinedTerminatorSymbol ) { return IfcPreDefinedSymbol; }
|
||||
if(v==IfcPreDefinedTextFont ) { return IfcPreDefinedItem; }
|
||||
if(v==IfcPresentationLayerWithStyle ) { return IfcPresentationLayerAssignment; }
|
||||
if(v==IfcProcedure ) { return IfcProcess; }
|
||||
if(v==IfcProcess ) { return IfcObject; }
|
||||
if(v==IfcProduct ) { return IfcObject; }
|
||||
if(v==IfcProductDefinitionShape ) { return IfcProductRepresentation; }
|
||||
if(v==IfcProductsOfCombustionProperties ) { return IfcMaterialProperties; }
|
||||
if(v==IfcProject ) { return IfcObject; }
|
||||
if(v==IfcProjectOrder ) { return IfcControl; }
|
||||
if(v==IfcProjectOrderRecord ) { return IfcControl; }
|
||||
if(v==IfcProjectionCurve ) { return IfcAnnotationCurveOccurrence; }
|
||||
if(v==IfcProjectionElement ) { return IfcFeatureElementAddition; }
|
||||
if(v==IfcPropertyBoundedValue ) { return IfcSimpleProperty; }
|
||||
if(v==IfcPropertyDefinition ) { return IfcRoot; }
|
||||
if(v==IfcPropertyEnumeratedValue ) { return IfcSimpleProperty; }
|
||||
if(v==IfcPropertyListValue ) { return IfcSimpleProperty; }
|
||||
if(v==IfcPropertyReferenceValue ) { return IfcSimpleProperty; }
|
||||
if(v==IfcPropertySet ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcPropertySetDefinition ) { return IfcPropertyDefinition; }
|
||||
if(v==IfcPropertySingleValue ) { return IfcSimpleProperty; }
|
||||
if(v==IfcPropertyTableValue ) { return IfcSimpleProperty; }
|
||||
if(v==IfcProtectiveDeviceType ) { return IfcFlowControllerType; }
|
||||
if(v==IfcProxy ) { return IfcProduct; }
|
||||
if(v==IfcPumpType ) { return IfcFlowMovingDeviceType; }
|
||||
if(v==IfcQuantityArea ) { return IfcPhysicalSimpleQuantity; }
|
||||
if(v==IfcQuantityCount ) { return IfcPhysicalSimpleQuantity; }
|
||||
if(v==IfcQuantityLength ) { return IfcPhysicalSimpleQuantity; }
|
||||
if(v==IfcQuantityTime ) { return IfcPhysicalSimpleQuantity; }
|
||||
if(v==IfcQuantityVolume ) { return IfcPhysicalSimpleQuantity; }
|
||||
if(v==IfcQuantityWeight ) { return IfcPhysicalSimpleQuantity; }
|
||||
if(v==IfcRadiusDimension ) { return IfcDimensionCurveDirectedCallout; }
|
||||
if(v==IfcRailing ) { return IfcBuildingElement; }
|
||||
if(v==IfcRailingType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcRamp ) { return IfcBuildingElement; }
|
||||
if(v==IfcRampFlight ) { return IfcBuildingElement; }
|
||||
if(v==IfcRampFlightType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcRationalBezierCurve ) { return IfcBezierCurve; }
|
||||
if(v==IfcRectangleHollowProfileDef ) { return IfcRectangleProfileDef; }
|
||||
if(v==IfcRectangleProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcRectangularPyramid ) { return IfcCsgPrimitive3D; }
|
||||
if(v==IfcRectangularTrimmedSurface ) { return IfcBoundedSurface; }
|
||||
if(v==IfcRegularTimeSeries ) { return IfcTimeSeries; }
|
||||
if(v==IfcReinforcementDefinitionProperties ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcReinforcingBar ) { return IfcReinforcingElement; }
|
||||
if(v==IfcReinforcingElement ) { return IfcBuildingElementComponent; }
|
||||
if(v==IfcReinforcingMesh ) { return IfcReinforcingElement; }
|
||||
if(v==IfcRelAggregates ) { return IfcRelDecomposes; }
|
||||
if(v==IfcRelAssigns ) { return IfcRelationship; }
|
||||
if(v==IfcRelAssignsTasks ) { return IfcRelAssignsToControl; }
|
||||
if(v==IfcRelAssignsToActor ) { return IfcRelAssigns; }
|
||||
if(v==IfcRelAssignsToControl ) { return IfcRelAssigns; }
|
||||
if(v==IfcRelAssignsToGroup ) { return IfcRelAssigns; }
|
||||
if(v==IfcRelAssignsToProcess ) { return IfcRelAssigns; }
|
||||
if(v==IfcRelAssignsToProduct ) { return IfcRelAssigns; }
|
||||
if(v==IfcRelAssignsToProjectOrder ) { return IfcRelAssignsToControl; }
|
||||
if(v==IfcRelAssignsToResource ) { return IfcRelAssigns; }
|
||||
if(v==IfcRelAssociates ) { return IfcRelationship; }
|
||||
if(v==IfcRelAssociatesAppliedValue ) { return IfcRelAssociates; }
|
||||
if(v==IfcRelAssociatesApproval ) { return IfcRelAssociates; }
|
||||
if(v==IfcRelAssociatesClassification ) { return IfcRelAssociates; }
|
||||
if(v==IfcRelAssociatesConstraint ) { return IfcRelAssociates; }
|
||||
if(v==IfcRelAssociatesDocument ) { return IfcRelAssociates; }
|
||||
if(v==IfcRelAssociatesLibrary ) { return IfcRelAssociates; }
|
||||
if(v==IfcRelAssociatesMaterial ) { return IfcRelAssociates; }
|
||||
if(v==IfcRelAssociatesProfileProperties ) { return IfcRelAssociates; }
|
||||
if(v==IfcRelConnects ) { return IfcRelationship; }
|
||||
if(v==IfcRelConnectsElements ) { return IfcRelConnects; }
|
||||
if(v==IfcRelConnectsPathElements ) { return IfcRelConnectsElements; }
|
||||
if(v==IfcRelConnectsPortToElement ) { return IfcRelConnects; }
|
||||
if(v==IfcRelConnectsPorts ) { return IfcRelConnects; }
|
||||
if(v==IfcRelConnectsStructuralActivity ) { return IfcRelConnects; }
|
||||
if(v==IfcRelConnectsStructuralElement ) { return IfcRelConnects; }
|
||||
if(v==IfcRelConnectsStructuralMember ) { return IfcRelConnects; }
|
||||
if(v==IfcRelConnectsWithEccentricity ) { return IfcRelConnectsStructuralMember; }
|
||||
if(v==IfcRelConnectsWithRealizingElements ) { return IfcRelConnectsElements; }
|
||||
if(v==IfcRelContainedInSpatialStructure ) { return IfcRelConnects; }
|
||||
if(v==IfcRelCoversBldgElements ) { return IfcRelConnects; }
|
||||
if(v==IfcRelCoversSpaces ) { return IfcRelConnects; }
|
||||
if(v==IfcRelDecomposes ) { return IfcRelationship; }
|
||||
if(v==IfcRelDefines ) { return IfcRelationship; }
|
||||
if(v==IfcRelDefinesByProperties ) { return IfcRelDefines; }
|
||||
if(v==IfcRelDefinesByType ) { return IfcRelDefines; }
|
||||
if(v==IfcRelFillsElement ) { return IfcRelConnects; }
|
||||
if(v==IfcRelFlowControlElements ) { return IfcRelConnects; }
|
||||
if(v==IfcRelInteractionRequirements ) { return IfcRelConnects; }
|
||||
if(v==IfcRelNests ) { return IfcRelDecomposes; }
|
||||
if(v==IfcRelOccupiesSpaces ) { return IfcRelAssignsToActor; }
|
||||
if(v==IfcRelOverridesProperties ) { return IfcRelDefinesByProperties; }
|
||||
if(v==IfcRelProjectsElement ) { return IfcRelConnects; }
|
||||
if(v==IfcRelReferencedInSpatialStructure ) { return IfcRelConnects; }
|
||||
if(v==IfcRelSchedulesCostItems ) { return IfcRelAssignsToControl; }
|
||||
if(v==IfcRelSequence ) { return IfcRelConnects; }
|
||||
if(v==IfcRelServicesBuildings ) { return IfcRelConnects; }
|
||||
if(v==IfcRelSpaceBoundary ) { return IfcRelConnects; }
|
||||
if(v==IfcRelVoidsElement ) { return IfcRelConnects; }
|
||||
if(v==IfcRelationship ) { return IfcRoot; }
|
||||
if(v==IfcResource ) { return IfcObject; }
|
||||
if(v==IfcRevolvedAreaSolid ) { return IfcSweptAreaSolid; }
|
||||
if(v==IfcRibPlateProfileProperties ) { return IfcProfileProperties; }
|
||||
if(v==IfcRightCircularCone ) { return IfcCsgPrimitive3D; }
|
||||
if(v==IfcRightCircularCylinder ) { return IfcCsgPrimitive3D; }
|
||||
if(v==IfcRoof ) { return IfcBuildingElement; }
|
||||
if(v==IfcRoundedEdgeFeature ) { return IfcEdgeFeature; }
|
||||
if(v==IfcRoundedRectangleProfileDef ) { return IfcRectangleProfileDef; }
|
||||
if(v==IfcSIUnit ) { return IfcNamedUnit; }
|
||||
if(v==IfcSanitaryTerminalType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcScheduleTimeControl ) { return IfcControl; }
|
||||
if(v==IfcSectionedSpine ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcSensorType ) { return IfcDistributionControlElementType; }
|
||||
if(v==IfcServiceLife ) { return IfcControl; }
|
||||
if(v==IfcServiceLifeFactor ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcShapeModel ) { return IfcRepresentation; }
|
||||
if(v==IfcShapeRepresentation ) { return IfcShapeModel; }
|
||||
if(v==IfcShellBasedSurfaceModel ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcSimpleProperty ) { return IfcProperty; }
|
||||
if(v==IfcSite ) { return IfcSpatialStructureElement; }
|
||||
if(v==IfcSlab ) { return IfcBuildingElement; }
|
||||
if(v==IfcSlabType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcSlippageConnectionCondition ) { return IfcStructuralConnectionCondition; }
|
||||
if(v==IfcSolidModel ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcSoundProperties ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcSoundValue ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcSpace ) { return IfcSpatialStructureElement; }
|
||||
if(v==IfcSpaceHeaterType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcSpaceProgram ) { return IfcControl; }
|
||||
if(v==IfcSpaceThermalLoadProperties ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcSpaceType ) { return IfcSpatialStructureElementType; }
|
||||
if(v==IfcSpatialStructureElement ) { return IfcProduct; }
|
||||
if(v==IfcSpatialStructureElementType ) { return IfcElementType; }
|
||||
if(v==IfcSphere ) { return IfcCsgPrimitive3D; }
|
||||
if(v==IfcStackTerminalType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcStair ) { return IfcBuildingElement; }
|
||||
if(v==IfcStairFlight ) { return IfcBuildingElement; }
|
||||
if(v==IfcStairFlightType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcStructuralAction ) { return IfcStructuralActivity; }
|
||||
if(v==IfcStructuralActivity ) { return IfcProduct; }
|
||||
if(v==IfcStructuralAnalysisModel ) { return IfcSystem; }
|
||||
if(v==IfcStructuralConnection ) { return IfcStructuralItem; }
|
||||
if(v==IfcStructuralCurveConnection ) { return IfcStructuralConnection; }
|
||||
if(v==IfcStructuralCurveMember ) { return IfcStructuralMember; }
|
||||
if(v==IfcStructuralCurveMemberVarying ) { return IfcStructuralCurveMember; }
|
||||
if(v==IfcStructuralItem ) { return IfcProduct; }
|
||||
if(v==IfcStructuralLinearAction ) { return IfcStructuralAction; }
|
||||
if(v==IfcStructuralLinearActionVarying ) { return IfcStructuralLinearAction; }
|
||||
if(v==IfcStructuralLoadGroup ) { return IfcGroup; }
|
||||
if(v==IfcStructuralLoadLinearForce ) { return IfcStructuralLoadStatic; }
|
||||
if(v==IfcStructuralLoadPlanarForce ) { return IfcStructuralLoadStatic; }
|
||||
if(v==IfcStructuralLoadSingleDisplacement ) { return IfcStructuralLoadStatic; }
|
||||
if(v==IfcStructuralLoadSingleDisplacementDistortion ) { return IfcStructuralLoadSingleDisplacement; }
|
||||
if(v==IfcStructuralLoadSingleForce ) { return IfcStructuralLoadStatic; }
|
||||
if(v==IfcStructuralLoadSingleForceWarping ) { return IfcStructuralLoadSingleForce; }
|
||||
if(v==IfcStructuralLoadStatic ) { return IfcStructuralLoad; }
|
||||
if(v==IfcStructuralLoadTemperature ) { return IfcStructuralLoadStatic; }
|
||||
if(v==IfcStructuralMember ) { return IfcStructuralItem; }
|
||||
if(v==IfcStructuralPlanarAction ) { return IfcStructuralAction; }
|
||||
if(v==IfcStructuralPlanarActionVarying ) { return IfcStructuralPlanarAction; }
|
||||
if(v==IfcStructuralPointAction ) { return IfcStructuralAction; }
|
||||
if(v==IfcStructuralPointConnection ) { return IfcStructuralConnection; }
|
||||
if(v==IfcStructuralPointReaction ) { return IfcStructuralReaction; }
|
||||
if(v==IfcStructuralProfileProperties ) { return IfcGeneralProfileProperties; }
|
||||
if(v==IfcStructuralReaction ) { return IfcStructuralActivity; }
|
||||
if(v==IfcStructuralResultGroup ) { return IfcGroup; }
|
||||
if(v==IfcStructuralSteelProfileProperties ) { return IfcStructuralProfileProperties; }
|
||||
if(v==IfcStructuralSurfaceConnection ) { return IfcStructuralConnection; }
|
||||
if(v==IfcStructuralSurfaceMember ) { return IfcStructuralMember; }
|
||||
if(v==IfcStructuralSurfaceMemberVarying ) { return IfcStructuralSurfaceMember; }
|
||||
if(v==IfcStructuredDimensionCallout ) { return IfcDraughtingCallout; }
|
||||
if(v==IfcStyleModel ) { return IfcRepresentation; }
|
||||
if(v==IfcStyledItem ) { return IfcRepresentationItem; }
|
||||
if(v==IfcStyledRepresentation ) { return IfcStyleModel; }
|
||||
if(v==IfcSubContractResource ) { return IfcConstructionResource; }
|
||||
if(v==IfcSubedge ) { return IfcEdge; }
|
||||
if(v==IfcSurface ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcSurfaceCurveSweptAreaSolid ) { return IfcSweptAreaSolid; }
|
||||
if(v==IfcSurfaceOfLinearExtrusion ) { return IfcSweptSurface; }
|
||||
if(v==IfcSurfaceOfRevolution ) { return IfcSweptSurface; }
|
||||
if(v==IfcSurfaceStyle ) { return IfcPresentationStyle; }
|
||||
if(v==IfcSurfaceStyleRendering ) { return IfcSurfaceStyleShading; }
|
||||
if(v==IfcSweptAreaSolid ) { return IfcSolidModel; }
|
||||
if(v==IfcSweptDiskSolid ) { return IfcSolidModel; }
|
||||
if(v==IfcSweptSurface ) { return IfcSurface; }
|
||||
if(v==IfcSwitchingDeviceType ) { return IfcFlowControllerType; }
|
||||
if(v==IfcSymbolStyle ) { return IfcPresentationStyle; }
|
||||
if(v==IfcSystem ) { return IfcGroup; }
|
||||
if(v==IfcSystemFurnitureElementType ) { return IfcFurnishingElementType; }
|
||||
if(v==IfcTShapeProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcTankType ) { return IfcFlowStorageDeviceType; }
|
||||
if(v==IfcTask ) { return IfcProcess; }
|
||||
if(v==IfcTelecomAddress ) { return IfcAddress; }
|
||||
if(v==IfcTendon ) { return IfcReinforcingElement; }
|
||||
if(v==IfcTendonAnchor ) { return IfcReinforcingElement; }
|
||||
if(v==IfcTerminatorSymbol ) { return IfcAnnotationSymbolOccurrence; }
|
||||
if(v==IfcTextLiteral ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcTextLiteralWithExtent ) { return IfcTextLiteral; }
|
||||
if(v==IfcTextStyle ) { return IfcPresentationStyle; }
|
||||
if(v==IfcTextStyleFontModel ) { return IfcPreDefinedTextFont; }
|
||||
if(v==IfcTextureCoordinateGenerator ) { return IfcTextureCoordinate; }
|
||||
if(v==IfcTextureMap ) { return IfcTextureCoordinate; }
|
||||
if(v==IfcThermalMaterialProperties ) { return IfcMaterialProperties; }
|
||||
if(v==IfcTimeSeriesSchedule ) { return IfcControl; }
|
||||
if(v==IfcTopologicalRepresentationItem ) { return IfcRepresentationItem; }
|
||||
if(v==IfcTopologyRepresentation ) { return IfcShapeModel; }
|
||||
if(v==IfcTransformerType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcTransportElement ) { return IfcElement; }
|
||||
if(v==IfcTransportElementType ) { return IfcElementType; }
|
||||
if(v==IfcTrapeziumProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcTrimmedCurve ) { return IfcBoundedCurve; }
|
||||
if(v==IfcTubeBundleType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcTwoDirectionRepeatFactor ) { return IfcOneDirectionRepeatFactor; }
|
||||
if(v==IfcTypeObject ) { return IfcObjectDefinition; }
|
||||
if(v==IfcTypeProduct ) { return IfcTypeObject; }
|
||||
if(v==IfcUShapeProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcUnitaryEquipmentType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcValveType ) { return IfcFlowControllerType; }
|
||||
if(v==IfcVector ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcVertex ) { return IfcTopologicalRepresentationItem; }
|
||||
if(v==IfcVertexLoop ) { return IfcLoop; }
|
||||
if(v==IfcVertexPoint ) { return IfcVertex; }
|
||||
if(v==IfcVibrationIsolatorType ) { return IfcDiscreteAccessoryType; }
|
||||
if(v==IfcVirtualElement ) { return IfcElement; }
|
||||
if(v==IfcWall ) { return IfcBuildingElement; }
|
||||
if(v==IfcWallStandardCase ) { return IfcWall; }
|
||||
if(v==IfcWallType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcWasteTerminalType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcWaterProperties ) { return IfcMaterialProperties; }
|
||||
if(v==IfcWindow ) { return IfcBuildingElement; }
|
||||
if(v==IfcWindowLiningProperties ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcWindowPanelProperties ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcWindowStyle ) { return IfcTypeProduct; }
|
||||
if(v==IfcWorkControl ) { return IfcControl; }
|
||||
if(v==IfcWorkPlan ) { return IfcWorkControl; }
|
||||
if(v==IfcWorkSchedule ) { return IfcWorkControl; }
|
||||
if(v==IfcZShapeProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcZone ) { return IfcGroup; }
|
||||
return (Enum)-1;
|
||||
static int parent_map[] = {133,-1,-1,164,-1,-1,515,-1,-1,234,-1,-1,-1,-1,354,-1,369,-1,309,-1,234,-1,-1,-1,-1,221,-1,600,31,392,31,840,392,31,31,31,-1,-1,-1,-1,-1,-1,-1,-1,604,604,44,-1,-1,-1,401,412,560,-1,560,560,77,-1,83,89,-1,-1,56,857,184,309,-1,-1,71,-1,-1,392,-1,72,72,72,75,193,844,392,-1,402,786,297,83,84,83,89,-1,304,786,540,357,-1,365,-1,365,-1,-1,569,392,100,101,100,103,45,271,-1,-1,309,-1,144,113,540,-1,-1,-1,-1,-1,-1,322,145,309,-1,-1,-1,127,-1,83,89,-1,-1,615,77,392,604,-1,363,-1,309,-1,401,164,-1,193,916,147,-1,149,147,147,147,-1,-1,-1,-1,-1,-1,161,161,161,722,-1,511,515,234,-1,511,309,-1,309,-1,-1,164,164,-1,37,-1,83,89,-1,540,540,161,392,-1,773,-1,-1,83,89,-1,-1,392,78,-1,-1,593,-1,-1,-1,-1,354,-1,-1,-1,-1,-1,-1,392,-1,-1,604,-1,-1,-1,-1,221,258,-1,28,256,879,-1,258,-1,392,-1,300,301,237,238,-1,235,236,297,304,235,236,576,-1,-1,-1,-1,322,-1,-1,83,625,-1,-1,625,933,-1,-1,-1,392,-1,-1,582,583,589,357,-1,365,-1,371,-1,-1,916,269,342,464,369,-1,-1,-1,-1,-1,-1,353,-1,367,-1,309,-1,369,-1,309,-1,-1,354,-1,-1,311,866,297,600,297,-1,297,304,-1,625,933,844,144,540,237,238,-1,625,-1,-1,37,297,164,309,-1,309,-1,483,-1,322,322,322,322,859,916,392,916,330,328,470,470,806,363,-1,300,301,297,340,340,593,392,-1,392,392,-1,371,-1,369,-1,237,238,-1,237,238,234,-1,354,-1,237,238,237,238,237,238,237,238,237,238,625,-1,-1,-1,83,-1,-1,-1,483,297,304,164,382,369,-1,483,605,394,-1,719,720,391,392,-1,-1,-1,600,-1,517,515,392,-1,309,-1,-1,-1,-1,309,-1,483,540,-1,-1,857,-1,-1,-1,-1,401,-1,-1,909,-1,-1,357,-1,-1,540,-1,161,369,-1,-1,-1,-1,-1,322,-1,-1,-1,-1,-1,369,-1,-1,392,447,447,447,447,451,193,221,-1,-1,-1,-1,-1,517,-1,-1,-1,916,-1,-1,-1,-1,-1,773,720,-1,-1,-1,-1,-1,-1,602,-1,-1,-1,-1,-1,-1,-1,-1,490,338,339,483,490,83,89,-1,153,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,309,-1,873,-1,-1,-1,-1,516,732,-1,-1,-1,153,-1,6,-1,193,193,392,145,342,483,873,-1,-1,-1,269,369,-1,-1,-1,-1,604,916,164,-1,625,164,-1,-1,550,-1,-1,550,83,-1,-1,357,-1,365,-1,857,392,562,392,-1,305,-1,83,89,-1,392,569,569,-1,464,402,77,600,-1,-1,-1,11,-1,585,585,587,-1,587,585,587,585,-1,-1,591,-1,-1,-1,-1,599,-1,515,515,602,-1,483,-1,-1,-1,515,164,164,-1,-1,-1,28,341,-1,764,-1,732,-1,764,-1,764,764,625,618,764,-1,764,354,-1,600,363,-1,551,551,551,551,551,551,-1,221,83,89,-1,83,83,89,-1,-1,-1,62,-1,654,540,184,78,-1,-1,909,-1,625,665,-1,-1,84,665,699,716,671,668,668,668,668,668,671,668,716,677,677,677,677,677,677,677,677,716,686,687,686,686,686,686,686,693,687,686,686,686,716,716,700,700,686,686,686,699,670,701,686,686,671,686,686,686,686,732,-1,-1,-1,-1,-1,515,-1,859,-1,605,184,184,-1,83,-1,-1,-1,-1,-1,271,654,-1,511,-1,369,-1,164,-1,-1,-1,-1,-1,-1,392,234,-1,-1,164,625,-1,-1,-1,718,759,-1,-1,392,615,-1,786,-1,83,89,-1,806,-1,392,-1,-1,625,-1,625,786,309,-1,164,625,787,-1,600,304,-1,-1,-1,-1,184,369,-1,83,83,89,-1,-1,-1,802,600,-1,866,811,-1,805,824,808,-1,600,801,812,-1,401,822,822,822,818,822,820,814,822,811,801,825,801,805,831,388,802,401,830,805,824,835,-1,256,718,720,839,161,269,392,859,861,861,-1,-1,593,-1,-1,-1,855,-1,-1,-1,-1,773,773,844,354,-1,593,-1,401,382,540,-1,-1,367,-1,599,11,-1,665,665,-1,34,-1,-1,-1,-1,-1,392,885,-1,593,589,-1,-1,-1,-1,-1,-1,895,895,-1,-1,-1,-1,-1,-1,483,-1,-1,-1,-1,-1,-1,-1,164,-1,-1,-1,720,759,-1,309,-1,-1,297,304,-1,540,77,-1,-1,309,-1,526,516,932,540,-1,-1,-1,309,-1,-1,354,-1,-1,392,-1,916,-1,464,946,229,-1,297,-1,-1,-1,83,956,89,-1,-1,-1,369,-1,483,83,625,-1,-1,625,933,-1,-1,164,-1,973,973,-1,540,401};
|
||||
boost::optional<Type::Enum> Type::Parent(Enum v){
|
||||
const int p = parent_map[static_cast<int>(v)];
|
||||
if (p >= 0) {
|
||||
return static_cast<Type::Enum>(p);
|
||||
} else {
|
||||
return boost::none;
|
||||
}
|
||||
}
|
||||
|
||||
bool Type::IsSimple(Enum v) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -4973,7 +4973,13 @@ std::pair<Type::Enum, unsigned> Type::GetInverseAttribute(Enum t, const std::str
|
||||
return jt->second;
|
||||
}
|
||||
}
|
||||
if ((t = Parent(t)) == -1) break;
|
||||
boost::optional<Enum> pt = Parent(t);
|
||||
if (pt) {
|
||||
t = *pt;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
throw IfcException("Attribute not found");
|
||||
}
|
||||
@@ -4992,7 +4998,13 @@ std::set<std::string> Type::GetInverseAttributeNames(Enum t) {
|
||||
return_value.insert(jt->first);
|
||||
}
|
||||
}
|
||||
if ((t = Parent(t)) == -1) break;
|
||||
boost::optional<Enum> pt = Parent(t);
|
||||
if (pt) {
|
||||
t = *pt;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return return_value;
|
||||
|
||||
+8
-712
@@ -2122,718 +2122,14 @@ Type::Enum Type::FromString(const std::string& s) {
|
||||
else return it->second;
|
||||
}
|
||||
|
||||
Type::Enum Type::Parent(Enum v){
|
||||
if (v < 0 || v >= 1164) return (Enum)-1;
|
||||
if(v==IfcActionRequest ) { return IfcControl; }
|
||||
if(v==IfcActor ) { return IfcObject; }
|
||||
if(v==IfcActuator ) { return IfcDistributionControlElement; }
|
||||
if(v==IfcActuatorType ) { return IfcDistributionControlElementType; }
|
||||
if(v==IfcAdvancedBrep ) { return IfcManifoldSolidBrep; }
|
||||
if(v==IfcAdvancedBrepWithVoids ) { return IfcAdvancedBrep; }
|
||||
if(v==IfcAdvancedFace ) { return IfcFaceSurface; }
|
||||
if(v==IfcAirTerminal ) { return IfcFlowTerminal; }
|
||||
if(v==IfcAirTerminalBox ) { return IfcFlowController; }
|
||||
if(v==IfcAirTerminalBoxType ) { return IfcFlowControllerType; }
|
||||
if(v==IfcAirTerminalType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcAirToAirHeatRecovery ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcAirToAirHeatRecoveryType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcAlarm ) { return IfcDistributionControlElement; }
|
||||
if(v==IfcAlarmType ) { return IfcDistributionControlElementType; }
|
||||
if(v==IfcAnnotation ) { return IfcProduct; }
|
||||
if(v==IfcAnnotationFillArea ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcApprovalRelationship ) { return IfcResourceLevelRelationship; }
|
||||
if(v==IfcArbitraryClosedProfileDef ) { return IfcProfileDef; }
|
||||
if(v==IfcArbitraryOpenProfileDef ) { return IfcProfileDef; }
|
||||
if(v==IfcArbitraryProfileDefWithVoids ) { return IfcArbitraryClosedProfileDef; }
|
||||
if(v==IfcAsset ) { return IfcGroup; }
|
||||
if(v==IfcAsymmetricIShapeProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcAudioVisualAppliance ) { return IfcFlowTerminal; }
|
||||
if(v==IfcAudioVisualApplianceType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcAxis1Placement ) { return IfcPlacement; }
|
||||
if(v==IfcAxis2Placement2D ) { return IfcPlacement; }
|
||||
if(v==IfcAxis2Placement3D ) { return IfcPlacement; }
|
||||
if(v==IfcBSplineCurve ) { return IfcBoundedCurve; }
|
||||
if(v==IfcBSplineCurveWithKnots ) { return IfcBSplineCurve; }
|
||||
if(v==IfcBSplineSurface ) { return IfcBoundedSurface; }
|
||||
if(v==IfcBSplineSurfaceWithKnots ) { return IfcBSplineSurface; }
|
||||
if(v==IfcBeam ) { return IfcBuildingElement; }
|
||||
if(v==IfcBeamStandardCase ) { return IfcBeam; }
|
||||
if(v==IfcBeamType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcBlobTexture ) { return IfcSurfaceTexture; }
|
||||
if(v==IfcBlock ) { return IfcCsgPrimitive3D; }
|
||||
if(v==IfcBoiler ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcBoilerType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcBooleanClippingResult ) { return IfcBooleanResult; }
|
||||
if(v==IfcBooleanResult ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcBoundaryCurve ) { return IfcCompositeCurveOnSurface; }
|
||||
if(v==IfcBoundaryEdgeCondition ) { return IfcBoundaryCondition; }
|
||||
if(v==IfcBoundaryFaceCondition ) { return IfcBoundaryCondition; }
|
||||
if(v==IfcBoundaryNodeCondition ) { return IfcBoundaryCondition; }
|
||||
if(v==IfcBoundaryNodeConditionWarping ) { return IfcBoundaryNodeCondition; }
|
||||
if(v==IfcBoundedCurve ) { return IfcCurve; }
|
||||
if(v==IfcBoundedSurface ) { return IfcSurface; }
|
||||
if(v==IfcBoundingBox ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcBoxedHalfSpace ) { return IfcHalfSpaceSolid; }
|
||||
if(v==IfcBuilding ) { return IfcSpatialStructureElement; }
|
||||
if(v==IfcBuildingElement ) { return IfcElement; }
|
||||
if(v==IfcBuildingElementPart ) { return IfcElementComponent; }
|
||||
if(v==IfcBuildingElementPartType ) { return IfcElementComponentType; }
|
||||
if(v==IfcBuildingElementProxy ) { return IfcBuildingElement; }
|
||||
if(v==IfcBuildingElementProxyType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcBuildingElementType ) { return IfcElementType; }
|
||||
if(v==IfcBuildingStorey ) { return IfcSpatialStructureElement; }
|
||||
if(v==IfcBuildingSystem ) { return IfcSystem; }
|
||||
if(v==IfcBurner ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcBurnerType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcCShapeProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcCableCarrierFitting ) { return IfcFlowFitting; }
|
||||
if(v==IfcCableCarrierFittingType ) { return IfcFlowFittingType; }
|
||||
if(v==IfcCableCarrierSegment ) { return IfcFlowSegment; }
|
||||
if(v==IfcCableCarrierSegmentType ) { return IfcFlowSegmentType; }
|
||||
if(v==IfcCableFitting ) { return IfcFlowFitting; }
|
||||
if(v==IfcCableFittingType ) { return IfcFlowFittingType; }
|
||||
if(v==IfcCableSegment ) { return IfcFlowSegment; }
|
||||
if(v==IfcCableSegmentType ) { return IfcFlowSegmentType; }
|
||||
if(v==IfcCartesianPoint ) { return IfcPoint; }
|
||||
if(v==IfcCartesianPointList ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcCartesianPointList2D ) { return IfcCartesianPointList; }
|
||||
if(v==IfcCartesianPointList3D ) { return IfcCartesianPointList; }
|
||||
if(v==IfcCartesianTransformationOperator ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcCartesianTransformationOperator2D ) { return IfcCartesianTransformationOperator; }
|
||||
if(v==IfcCartesianTransformationOperator2DnonUniform ) { return IfcCartesianTransformationOperator2D; }
|
||||
if(v==IfcCartesianTransformationOperator3D ) { return IfcCartesianTransformationOperator; }
|
||||
if(v==IfcCartesianTransformationOperator3DnonUniform ) { return IfcCartesianTransformationOperator3D; }
|
||||
if(v==IfcCenterLineProfileDef ) { return IfcArbitraryOpenProfileDef; }
|
||||
if(v==IfcChiller ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcChillerType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcChimney ) { return IfcBuildingElement; }
|
||||
if(v==IfcChimneyType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcCircle ) { return IfcConic; }
|
||||
if(v==IfcCircleHollowProfileDef ) { return IfcCircleProfileDef; }
|
||||
if(v==IfcCircleProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcCivilElement ) { return IfcElement; }
|
||||
if(v==IfcCivilElementType ) { return IfcElementType; }
|
||||
if(v==IfcClassification ) { return IfcExternalInformation; }
|
||||
if(v==IfcClassificationReference ) { return IfcExternalReference; }
|
||||
if(v==IfcClosedShell ) { return IfcConnectedFaceSet; }
|
||||
if(v==IfcCoil ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcCoilType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcColourRgb ) { return IfcColourSpecification; }
|
||||
if(v==IfcColourRgbList ) { return IfcPresentationItem; }
|
||||
if(v==IfcColourSpecification ) { return IfcPresentationItem; }
|
||||
if(v==IfcColumn ) { return IfcBuildingElement; }
|
||||
if(v==IfcColumnStandardCase ) { return IfcColumn; }
|
||||
if(v==IfcColumnType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcCommunicationsAppliance ) { return IfcFlowTerminal; }
|
||||
if(v==IfcCommunicationsApplianceType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcComplexProperty ) { return IfcProperty; }
|
||||
if(v==IfcComplexPropertyTemplate ) { return IfcPropertyTemplate; }
|
||||
if(v==IfcCompositeCurve ) { return IfcBoundedCurve; }
|
||||
if(v==IfcCompositeCurveOnSurface ) { return IfcCompositeCurve; }
|
||||
if(v==IfcCompositeCurveSegment ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcCompositeProfileDef ) { return IfcProfileDef; }
|
||||
if(v==IfcCompressor ) { return IfcFlowMovingDevice; }
|
||||
if(v==IfcCompressorType ) { return IfcFlowMovingDeviceType; }
|
||||
if(v==IfcCondenser ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcCondenserType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcConic ) { return IfcCurve; }
|
||||
if(v==IfcConnectedFaceSet ) { return IfcTopologicalRepresentationItem; }
|
||||
if(v==IfcConnectionCurveGeometry ) { return IfcConnectionGeometry; }
|
||||
if(v==IfcConnectionPointEccentricity ) { return IfcConnectionPointGeometry; }
|
||||
if(v==IfcConnectionPointGeometry ) { return IfcConnectionGeometry; }
|
||||
if(v==IfcConnectionSurfaceGeometry ) { return IfcConnectionGeometry; }
|
||||
if(v==IfcConnectionVolumeGeometry ) { return IfcConnectionGeometry; }
|
||||
if(v==IfcConstructionEquipmentResource ) { return IfcConstructionResource; }
|
||||
if(v==IfcConstructionEquipmentResourceType ) { return IfcConstructionResourceType; }
|
||||
if(v==IfcConstructionMaterialResource ) { return IfcConstructionResource; }
|
||||
if(v==IfcConstructionMaterialResourceType ) { return IfcConstructionResourceType; }
|
||||
if(v==IfcConstructionProductResource ) { return IfcConstructionResource; }
|
||||
if(v==IfcConstructionProductResourceType ) { return IfcConstructionResourceType; }
|
||||
if(v==IfcConstructionResource ) { return IfcResource; }
|
||||
if(v==IfcConstructionResourceType ) { return IfcTypeResource; }
|
||||
if(v==IfcContext ) { return IfcObjectDefinition; }
|
||||
if(v==IfcContextDependentUnit ) { return IfcNamedUnit; }
|
||||
if(v==IfcControl ) { return IfcObject; }
|
||||
if(v==IfcController ) { return IfcDistributionControlElement; }
|
||||
if(v==IfcControllerType ) { return IfcDistributionControlElementType; }
|
||||
if(v==IfcConversionBasedUnit ) { return IfcNamedUnit; }
|
||||
if(v==IfcConversionBasedUnitWithOffset ) { return IfcConversionBasedUnit; }
|
||||
if(v==IfcCooledBeam ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcCooledBeamType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcCoolingTower ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcCoolingTowerType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcCostItem ) { return IfcControl; }
|
||||
if(v==IfcCostSchedule ) { return IfcControl; }
|
||||
if(v==IfcCostValue ) { return IfcAppliedValue; }
|
||||
if(v==IfcCovering ) { return IfcBuildingElement; }
|
||||
if(v==IfcCoveringType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcCrewResource ) { return IfcConstructionResource; }
|
||||
if(v==IfcCrewResourceType ) { return IfcConstructionResourceType; }
|
||||
if(v==IfcCsgPrimitive3D ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcCsgSolid ) { return IfcSolidModel; }
|
||||
if(v==IfcCurrencyRelationship ) { return IfcResourceLevelRelationship; }
|
||||
if(v==IfcCurtainWall ) { return IfcBuildingElement; }
|
||||
if(v==IfcCurtainWallType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcCurve ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcCurveBoundedPlane ) { return IfcBoundedSurface; }
|
||||
if(v==IfcCurveBoundedSurface ) { return IfcBoundedSurface; }
|
||||
if(v==IfcCurveStyle ) { return IfcPresentationStyle; }
|
||||
if(v==IfcCurveStyleFont ) { return IfcPresentationItem; }
|
||||
if(v==IfcCurveStyleFontAndScaling ) { return IfcPresentationItem; }
|
||||
if(v==IfcCurveStyleFontPattern ) { return IfcPresentationItem; }
|
||||
if(v==IfcCylindricalSurface ) { return IfcElementarySurface; }
|
||||
if(v==IfcDamper ) { return IfcFlowController; }
|
||||
if(v==IfcDamperType ) { return IfcFlowControllerType; }
|
||||
if(v==IfcDerivedProfileDef ) { return IfcProfileDef; }
|
||||
if(v==IfcDirection ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcDiscreteAccessory ) { return IfcElementComponent; }
|
||||
if(v==IfcDiscreteAccessoryType ) { return IfcElementComponentType; }
|
||||
if(v==IfcDistributionChamberElement ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcDistributionChamberElementType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcDistributionCircuit ) { return IfcDistributionSystem; }
|
||||
if(v==IfcDistributionControlElement ) { return IfcDistributionElement; }
|
||||
if(v==IfcDistributionControlElementType ) { return IfcDistributionElementType; }
|
||||
if(v==IfcDistributionElement ) { return IfcElement; }
|
||||
if(v==IfcDistributionElementType ) { return IfcElementType; }
|
||||
if(v==IfcDistributionFlowElement ) { return IfcDistributionElement; }
|
||||
if(v==IfcDistributionFlowElementType ) { return IfcDistributionElementType; }
|
||||
if(v==IfcDistributionPort ) { return IfcPort; }
|
||||
if(v==IfcDistributionSystem ) { return IfcSystem; }
|
||||
if(v==IfcDocumentInformation ) { return IfcExternalInformation; }
|
||||
if(v==IfcDocumentInformationRelationship ) { return IfcResourceLevelRelationship; }
|
||||
if(v==IfcDocumentReference ) { return IfcExternalReference; }
|
||||
if(v==IfcDoor ) { return IfcBuildingElement; }
|
||||
if(v==IfcDoorLiningProperties ) { return IfcPreDefinedPropertySet; }
|
||||
if(v==IfcDoorPanelProperties ) { return IfcPreDefinedPropertySet; }
|
||||
if(v==IfcDoorStandardCase ) { return IfcDoor; }
|
||||
if(v==IfcDoorStyle ) { return IfcTypeProduct; }
|
||||
if(v==IfcDoorType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcDraughtingPreDefinedColour ) { return IfcPreDefinedColour; }
|
||||
if(v==IfcDraughtingPreDefinedCurveFont ) { return IfcPreDefinedCurveFont; }
|
||||
if(v==IfcDuctFitting ) { return IfcFlowFitting; }
|
||||
if(v==IfcDuctFittingType ) { return IfcFlowFittingType; }
|
||||
if(v==IfcDuctSegment ) { return IfcFlowSegment; }
|
||||
if(v==IfcDuctSegmentType ) { return IfcFlowSegmentType; }
|
||||
if(v==IfcDuctSilencer ) { return IfcFlowTreatmentDevice; }
|
||||
if(v==IfcDuctSilencerType ) { return IfcFlowTreatmentDeviceType; }
|
||||
if(v==IfcEdge ) { return IfcTopologicalRepresentationItem; }
|
||||
if(v==IfcEdgeCurve ) { return IfcEdge; }
|
||||
if(v==IfcEdgeLoop ) { return IfcLoop; }
|
||||
if(v==IfcElectricAppliance ) { return IfcFlowTerminal; }
|
||||
if(v==IfcElectricApplianceType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcElectricDistributionBoard ) { return IfcFlowController; }
|
||||
if(v==IfcElectricDistributionBoardType ) { return IfcFlowControllerType; }
|
||||
if(v==IfcElectricFlowStorageDevice ) { return IfcFlowStorageDevice; }
|
||||
if(v==IfcElectricFlowStorageDeviceType ) { return IfcFlowStorageDeviceType; }
|
||||
if(v==IfcElectricGenerator ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcElectricGeneratorType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcElectricMotor ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcElectricMotorType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcElectricTimeControl ) { return IfcFlowController; }
|
||||
if(v==IfcElectricTimeControlType ) { return IfcFlowControllerType; }
|
||||
if(v==IfcElement ) { return IfcProduct; }
|
||||
if(v==IfcElementAssembly ) { return IfcElement; }
|
||||
if(v==IfcElementAssemblyType ) { return IfcElementType; }
|
||||
if(v==IfcElementComponent ) { return IfcElement; }
|
||||
if(v==IfcElementComponentType ) { return IfcElementType; }
|
||||
if(v==IfcElementQuantity ) { return IfcQuantitySet; }
|
||||
if(v==IfcElementType ) { return IfcTypeProduct; }
|
||||
if(v==IfcElementarySurface ) { return IfcSurface; }
|
||||
if(v==IfcEllipse ) { return IfcConic; }
|
||||
if(v==IfcEllipseProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcEnergyConversionDevice ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcEnergyConversionDeviceType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcEngine ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcEngineType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcEvaporativeCooler ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcEvaporativeCoolerType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcEvaporator ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcEvaporatorType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcEvent ) { return IfcProcess; }
|
||||
if(v==IfcEventTime ) { return IfcSchedulingTime; }
|
||||
if(v==IfcEventType ) { return IfcTypeProcess; }
|
||||
if(v==IfcExtendedProperties ) { return IfcPropertyAbstraction; }
|
||||
if(v==IfcExternalReferenceRelationship ) { return IfcResourceLevelRelationship; }
|
||||
if(v==IfcExternalSpatialElement ) { return IfcExternalSpatialStructureElement; }
|
||||
if(v==IfcExternalSpatialStructureElement ) { return IfcSpatialElement; }
|
||||
if(v==IfcExternallyDefinedHatchStyle ) { return IfcExternalReference; }
|
||||
if(v==IfcExternallyDefinedSurfaceStyle ) { return IfcExternalReference; }
|
||||
if(v==IfcExternallyDefinedTextFont ) { return IfcExternalReference; }
|
||||
if(v==IfcExtrudedAreaSolid ) { return IfcSweptAreaSolid; }
|
||||
if(v==IfcExtrudedAreaSolidTapered ) { return IfcExtrudedAreaSolid; }
|
||||
if(v==IfcFace ) { return IfcTopologicalRepresentationItem; }
|
||||
if(v==IfcFaceBasedSurfaceModel ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcFaceBound ) { return IfcTopologicalRepresentationItem; }
|
||||
if(v==IfcFaceOuterBound ) { return IfcFaceBound; }
|
||||
if(v==IfcFaceSurface ) { return IfcFace; }
|
||||
if(v==IfcFacetedBrep ) { return IfcManifoldSolidBrep; }
|
||||
if(v==IfcFacetedBrepWithVoids ) { return IfcFacetedBrep; }
|
||||
if(v==IfcFailureConnectionCondition ) { return IfcStructuralConnectionCondition; }
|
||||
if(v==IfcFan ) { return IfcFlowMovingDevice; }
|
||||
if(v==IfcFanType ) { return IfcFlowMovingDeviceType; }
|
||||
if(v==IfcFastener ) { return IfcElementComponent; }
|
||||
if(v==IfcFastenerType ) { return IfcElementComponentType; }
|
||||
if(v==IfcFeatureElement ) { return IfcElement; }
|
||||
if(v==IfcFeatureElementAddition ) { return IfcFeatureElement; }
|
||||
if(v==IfcFeatureElementSubtraction ) { return IfcFeatureElement; }
|
||||
if(v==IfcFillAreaStyle ) { return IfcPresentationStyle; }
|
||||
if(v==IfcFillAreaStyleHatching ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcFillAreaStyleTiles ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcFilter ) { return IfcFlowTreatmentDevice; }
|
||||
if(v==IfcFilterType ) { return IfcFlowTreatmentDeviceType; }
|
||||
if(v==IfcFireSuppressionTerminal ) { return IfcFlowTerminal; }
|
||||
if(v==IfcFireSuppressionTerminalType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcFixedReferenceSweptAreaSolid ) { return IfcSweptAreaSolid; }
|
||||
if(v==IfcFlowController ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcFlowControllerType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcFlowFitting ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcFlowFittingType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcFlowInstrument ) { return IfcDistributionControlElement; }
|
||||
if(v==IfcFlowInstrumentType ) { return IfcDistributionControlElementType; }
|
||||
if(v==IfcFlowMeter ) { return IfcFlowController; }
|
||||
if(v==IfcFlowMeterType ) { return IfcFlowControllerType; }
|
||||
if(v==IfcFlowMovingDevice ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcFlowMovingDeviceType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcFlowSegment ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcFlowSegmentType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcFlowStorageDevice ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcFlowStorageDeviceType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcFlowTerminal ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcFlowTerminalType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcFlowTreatmentDevice ) { return IfcDistributionFlowElement; }
|
||||
if(v==IfcFlowTreatmentDeviceType ) { return IfcDistributionFlowElementType; }
|
||||
if(v==IfcFooting ) { return IfcBuildingElement; }
|
||||
if(v==IfcFootingType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcFurnishingElement ) { return IfcElement; }
|
||||
if(v==IfcFurnishingElementType ) { return IfcElementType; }
|
||||
if(v==IfcFurniture ) { return IfcFurnishingElement; }
|
||||
if(v==IfcFurnitureType ) { return IfcFurnishingElementType; }
|
||||
if(v==IfcGeographicElement ) { return IfcElement; }
|
||||
if(v==IfcGeographicElementType ) { return IfcElementType; }
|
||||
if(v==IfcGeometricCurveSet ) { return IfcGeometricSet; }
|
||||
if(v==IfcGeometricRepresentationContext ) { return IfcRepresentationContext; }
|
||||
if(v==IfcGeometricRepresentationItem ) { return IfcRepresentationItem; }
|
||||
if(v==IfcGeometricRepresentationSubContext ) { return IfcGeometricRepresentationContext; }
|
||||
if(v==IfcGeometricSet ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcGrid ) { return IfcProduct; }
|
||||
if(v==IfcGridPlacement ) { return IfcObjectPlacement; }
|
||||
if(v==IfcGroup ) { return IfcObject; }
|
||||
if(v==IfcHalfSpaceSolid ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcHeatExchanger ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcHeatExchangerType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcHumidifier ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcHumidifierType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcIShapeProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcImageTexture ) { return IfcSurfaceTexture; }
|
||||
if(v==IfcIndexedColourMap ) { return IfcPresentationItem; }
|
||||
if(v==IfcIndexedPolyCurve ) { return IfcBoundedCurve; }
|
||||
if(v==IfcIndexedTextureMap ) { return IfcTextureCoordinate; }
|
||||
if(v==IfcIndexedTriangleTextureMap ) { return IfcIndexedTextureMap; }
|
||||
if(v==IfcInterceptor ) { return IfcFlowTreatmentDevice; }
|
||||
if(v==IfcInterceptorType ) { return IfcFlowTreatmentDeviceType; }
|
||||
if(v==IfcInventory ) { return IfcGroup; }
|
||||
if(v==IfcIrregularTimeSeries ) { return IfcTimeSeries; }
|
||||
if(v==IfcJunctionBox ) { return IfcFlowFitting; }
|
||||
if(v==IfcJunctionBoxType ) { return IfcFlowFittingType; }
|
||||
if(v==IfcLShapeProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcLaborResource ) { return IfcConstructionResource; }
|
||||
if(v==IfcLaborResourceType ) { return IfcConstructionResourceType; }
|
||||
if(v==IfcLagTime ) { return IfcSchedulingTime; }
|
||||
if(v==IfcLamp ) { return IfcFlowTerminal; }
|
||||
if(v==IfcLampType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcLibraryInformation ) { return IfcExternalInformation; }
|
||||
if(v==IfcLibraryReference ) { return IfcExternalReference; }
|
||||
if(v==IfcLightFixture ) { return IfcFlowTerminal; }
|
||||
if(v==IfcLightFixtureType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcLightSource ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcLightSourceAmbient ) { return IfcLightSource; }
|
||||
if(v==IfcLightSourceDirectional ) { return IfcLightSource; }
|
||||
if(v==IfcLightSourceGoniometric ) { return IfcLightSource; }
|
||||
if(v==IfcLightSourcePositional ) { return IfcLightSource; }
|
||||
if(v==IfcLightSourceSpot ) { return IfcLightSourcePositional; }
|
||||
if(v==IfcLine ) { return IfcCurve; }
|
||||
if(v==IfcLocalPlacement ) { return IfcObjectPlacement; }
|
||||
if(v==IfcLoop ) { return IfcTopologicalRepresentationItem; }
|
||||
if(v==IfcManifoldSolidBrep ) { return IfcSolidModel; }
|
||||
if(v==IfcMapConversion ) { return IfcCoordinateOperation; }
|
||||
if(v==IfcMappedItem ) { return IfcRepresentationItem; }
|
||||
if(v==IfcMaterial ) { return IfcMaterialDefinition; }
|
||||
if(v==IfcMaterialConstituent ) { return IfcMaterialDefinition; }
|
||||
if(v==IfcMaterialConstituentSet ) { return IfcMaterialDefinition; }
|
||||
if(v==IfcMaterialDefinitionRepresentation ) { return IfcProductRepresentation; }
|
||||
if(v==IfcMaterialLayer ) { return IfcMaterialDefinition; }
|
||||
if(v==IfcMaterialLayerSet ) { return IfcMaterialDefinition; }
|
||||
if(v==IfcMaterialLayerSetUsage ) { return IfcMaterialUsageDefinition; }
|
||||
if(v==IfcMaterialLayerWithOffsets ) { return IfcMaterialLayer; }
|
||||
if(v==IfcMaterialProfile ) { return IfcMaterialDefinition; }
|
||||
if(v==IfcMaterialProfileSet ) { return IfcMaterialDefinition; }
|
||||
if(v==IfcMaterialProfileSetUsage ) { return IfcMaterialUsageDefinition; }
|
||||
if(v==IfcMaterialProfileSetUsageTapering ) { return IfcMaterialProfileSetUsage; }
|
||||
if(v==IfcMaterialProfileWithOffsets ) { return IfcMaterialProfile; }
|
||||
if(v==IfcMaterialProperties ) { return IfcExtendedProperties; }
|
||||
if(v==IfcMaterialRelationship ) { return IfcResourceLevelRelationship; }
|
||||
if(v==IfcMechanicalFastener ) { return IfcElementComponent; }
|
||||
if(v==IfcMechanicalFastenerType ) { return IfcElementComponentType; }
|
||||
if(v==IfcMedicalDevice ) { return IfcFlowTerminal; }
|
||||
if(v==IfcMedicalDeviceType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcMember ) { return IfcBuildingElement; }
|
||||
if(v==IfcMemberStandardCase ) { return IfcMember; }
|
||||
if(v==IfcMemberType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcMetric ) { return IfcConstraint; }
|
||||
if(v==IfcMirroredProfileDef ) { return IfcDerivedProfileDef; }
|
||||
if(v==IfcMotorConnection ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcMotorConnectionType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcObject ) { return IfcObjectDefinition; }
|
||||
if(v==IfcObjectDefinition ) { return IfcRoot; }
|
||||
if(v==IfcObjective ) { return IfcConstraint; }
|
||||
if(v==IfcOccupant ) { return IfcActor; }
|
||||
if(v==IfcOffsetCurve2D ) { return IfcCurve; }
|
||||
if(v==IfcOffsetCurve3D ) { return IfcCurve; }
|
||||
if(v==IfcOpenShell ) { return IfcConnectedFaceSet; }
|
||||
if(v==IfcOpeningElement ) { return IfcFeatureElementSubtraction; }
|
||||
if(v==IfcOpeningStandardCase ) { return IfcOpeningElement; }
|
||||
if(v==IfcOrganizationRelationship ) { return IfcResourceLevelRelationship; }
|
||||
if(v==IfcOrientedEdge ) { return IfcEdge; }
|
||||
if(v==IfcOuterBoundaryCurve ) { return IfcBoundaryCurve; }
|
||||
if(v==IfcOutlet ) { return IfcFlowTerminal; }
|
||||
if(v==IfcOutletType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcParameterizedProfileDef ) { return IfcProfileDef; }
|
||||
if(v==IfcPath ) { return IfcTopologicalRepresentationItem; }
|
||||
if(v==IfcPcurve ) { return IfcCurve; }
|
||||
if(v==IfcPerformanceHistory ) { return IfcControl; }
|
||||
if(v==IfcPermeableCoveringProperties ) { return IfcPreDefinedPropertySet; }
|
||||
if(v==IfcPermit ) { return IfcControl; }
|
||||
if(v==IfcPhysicalComplexQuantity ) { return IfcPhysicalQuantity; }
|
||||
if(v==IfcPhysicalSimpleQuantity ) { return IfcPhysicalQuantity; }
|
||||
if(v==IfcPile ) { return IfcBuildingElement; }
|
||||
if(v==IfcPileType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcPipeFitting ) { return IfcFlowFitting; }
|
||||
if(v==IfcPipeFittingType ) { return IfcFlowFittingType; }
|
||||
if(v==IfcPipeSegment ) { return IfcFlowSegment; }
|
||||
if(v==IfcPipeSegmentType ) { return IfcFlowSegmentType; }
|
||||
if(v==IfcPixelTexture ) { return IfcSurfaceTexture; }
|
||||
if(v==IfcPlacement ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcPlanarBox ) { return IfcPlanarExtent; }
|
||||
if(v==IfcPlanarExtent ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcPlane ) { return IfcElementarySurface; }
|
||||
if(v==IfcPlate ) { return IfcBuildingElement; }
|
||||
if(v==IfcPlateStandardCase ) { return IfcPlate; }
|
||||
if(v==IfcPlateType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcPoint ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcPointOnCurve ) { return IfcPoint; }
|
||||
if(v==IfcPointOnSurface ) { return IfcPoint; }
|
||||
if(v==IfcPolyLoop ) { return IfcLoop; }
|
||||
if(v==IfcPolygonalBoundedHalfSpace ) { return IfcHalfSpaceSolid; }
|
||||
if(v==IfcPolyline ) { return IfcBoundedCurve; }
|
||||
if(v==IfcPort ) { return IfcProduct; }
|
||||
if(v==IfcPostalAddress ) { return IfcAddress; }
|
||||
if(v==IfcPreDefinedColour ) { return IfcPreDefinedItem; }
|
||||
if(v==IfcPreDefinedCurveFont ) { return IfcPreDefinedItem; }
|
||||
if(v==IfcPreDefinedItem ) { return IfcPresentationItem; }
|
||||
if(v==IfcPreDefinedProperties ) { return IfcPropertyAbstraction; }
|
||||
if(v==IfcPreDefinedPropertySet ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcPreDefinedTextFont ) { return IfcPreDefinedItem; }
|
||||
if(v==IfcPresentationLayerWithStyle ) { return IfcPresentationLayerAssignment; }
|
||||
if(v==IfcProcedure ) { return IfcProcess; }
|
||||
if(v==IfcProcedureType ) { return IfcTypeProcess; }
|
||||
if(v==IfcProcess ) { return IfcObject; }
|
||||
if(v==IfcProduct ) { return IfcObject; }
|
||||
if(v==IfcProductDefinitionShape ) { return IfcProductRepresentation; }
|
||||
if(v==IfcProfileProperties ) { return IfcExtendedProperties; }
|
||||
if(v==IfcProject ) { return IfcContext; }
|
||||
if(v==IfcProjectLibrary ) { return IfcContext; }
|
||||
if(v==IfcProjectOrder ) { return IfcControl; }
|
||||
if(v==IfcProjectedCRS ) { return IfcCoordinateReferenceSystem; }
|
||||
if(v==IfcProjectionElement ) { return IfcFeatureElementAddition; }
|
||||
if(v==IfcProperty ) { return IfcPropertyAbstraction; }
|
||||
if(v==IfcPropertyBoundedValue ) { return IfcSimpleProperty; }
|
||||
if(v==IfcPropertyDefinition ) { return IfcRoot; }
|
||||
if(v==IfcPropertyDependencyRelationship ) { return IfcResourceLevelRelationship; }
|
||||
if(v==IfcPropertyEnumeratedValue ) { return IfcSimpleProperty; }
|
||||
if(v==IfcPropertyEnumeration ) { return IfcPropertyAbstraction; }
|
||||
if(v==IfcPropertyListValue ) { return IfcSimpleProperty; }
|
||||
if(v==IfcPropertyReferenceValue ) { return IfcSimpleProperty; }
|
||||
if(v==IfcPropertySet ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcPropertySetDefinition ) { return IfcPropertyDefinition; }
|
||||
if(v==IfcPropertySetTemplate ) { return IfcPropertyTemplateDefinition; }
|
||||
if(v==IfcPropertySingleValue ) { return IfcSimpleProperty; }
|
||||
if(v==IfcPropertyTableValue ) { return IfcSimpleProperty; }
|
||||
if(v==IfcPropertyTemplate ) { return IfcPropertyTemplateDefinition; }
|
||||
if(v==IfcPropertyTemplateDefinition ) { return IfcPropertyDefinition; }
|
||||
if(v==IfcProtectiveDevice ) { return IfcFlowController; }
|
||||
if(v==IfcProtectiveDeviceTrippingUnit ) { return IfcDistributionControlElement; }
|
||||
if(v==IfcProtectiveDeviceTrippingUnitType ) { return IfcDistributionControlElementType; }
|
||||
if(v==IfcProtectiveDeviceType ) { return IfcFlowControllerType; }
|
||||
if(v==IfcProxy ) { return IfcProduct; }
|
||||
if(v==IfcPump ) { return IfcFlowMovingDevice; }
|
||||
if(v==IfcPumpType ) { return IfcFlowMovingDeviceType; }
|
||||
if(v==IfcQuantityArea ) { return IfcPhysicalSimpleQuantity; }
|
||||
if(v==IfcQuantityCount ) { return IfcPhysicalSimpleQuantity; }
|
||||
if(v==IfcQuantityLength ) { return IfcPhysicalSimpleQuantity; }
|
||||
if(v==IfcQuantitySet ) { return IfcPropertySetDefinition; }
|
||||
if(v==IfcQuantityTime ) { return IfcPhysicalSimpleQuantity; }
|
||||
if(v==IfcQuantityVolume ) { return IfcPhysicalSimpleQuantity; }
|
||||
if(v==IfcQuantityWeight ) { return IfcPhysicalSimpleQuantity; }
|
||||
if(v==IfcRailing ) { return IfcBuildingElement; }
|
||||
if(v==IfcRailingType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcRamp ) { return IfcBuildingElement; }
|
||||
if(v==IfcRampFlight ) { return IfcBuildingElement; }
|
||||
if(v==IfcRampFlightType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcRampType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcRationalBSplineCurveWithKnots ) { return IfcBSplineCurveWithKnots; }
|
||||
if(v==IfcRationalBSplineSurfaceWithKnots ) { return IfcBSplineSurfaceWithKnots; }
|
||||
if(v==IfcRectangleHollowProfileDef ) { return IfcRectangleProfileDef; }
|
||||
if(v==IfcRectangleProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcRectangularPyramid ) { return IfcCsgPrimitive3D; }
|
||||
if(v==IfcRectangularTrimmedSurface ) { return IfcBoundedSurface; }
|
||||
if(v==IfcRegularTimeSeries ) { return IfcTimeSeries; }
|
||||
if(v==IfcReinforcementBarProperties ) { return IfcPreDefinedProperties; }
|
||||
if(v==IfcReinforcementDefinitionProperties ) { return IfcPreDefinedPropertySet; }
|
||||
if(v==IfcReinforcingBar ) { return IfcReinforcingElement; }
|
||||
if(v==IfcReinforcingBarType ) { return IfcReinforcingElementType; }
|
||||
if(v==IfcReinforcingElement ) { return IfcElementComponent; }
|
||||
if(v==IfcReinforcingElementType ) { return IfcElementComponentType; }
|
||||
if(v==IfcReinforcingMesh ) { return IfcReinforcingElement; }
|
||||
if(v==IfcReinforcingMeshType ) { return IfcReinforcingElementType; }
|
||||
if(v==IfcRelAggregates ) { return IfcRelDecomposes; }
|
||||
if(v==IfcRelAssigns ) { return IfcRelationship; }
|
||||
if(v==IfcRelAssignsToActor ) { return IfcRelAssigns; }
|
||||
if(v==IfcRelAssignsToControl ) { return IfcRelAssigns; }
|
||||
if(v==IfcRelAssignsToGroup ) { return IfcRelAssigns; }
|
||||
if(v==IfcRelAssignsToGroupByFactor ) { return IfcRelAssignsToGroup; }
|
||||
if(v==IfcRelAssignsToProcess ) { return IfcRelAssigns; }
|
||||
if(v==IfcRelAssignsToProduct ) { return IfcRelAssigns; }
|
||||
if(v==IfcRelAssignsToResource ) { return IfcRelAssigns; }
|
||||
if(v==IfcRelAssociates ) { return IfcRelationship; }
|
||||
if(v==IfcRelAssociatesApproval ) { return IfcRelAssociates; }
|
||||
if(v==IfcRelAssociatesClassification ) { return IfcRelAssociates; }
|
||||
if(v==IfcRelAssociatesConstraint ) { return IfcRelAssociates; }
|
||||
if(v==IfcRelAssociatesDocument ) { return IfcRelAssociates; }
|
||||
if(v==IfcRelAssociatesLibrary ) { return IfcRelAssociates; }
|
||||
if(v==IfcRelAssociatesMaterial ) { return IfcRelAssociates; }
|
||||
if(v==IfcRelConnects ) { return IfcRelationship; }
|
||||
if(v==IfcRelConnectsElements ) { return IfcRelConnects; }
|
||||
if(v==IfcRelConnectsPathElements ) { return IfcRelConnectsElements; }
|
||||
if(v==IfcRelConnectsPortToElement ) { return IfcRelConnects; }
|
||||
if(v==IfcRelConnectsPorts ) { return IfcRelConnects; }
|
||||
if(v==IfcRelConnectsStructuralActivity ) { return IfcRelConnects; }
|
||||
if(v==IfcRelConnectsStructuralMember ) { return IfcRelConnects; }
|
||||
if(v==IfcRelConnectsWithEccentricity ) { return IfcRelConnectsStructuralMember; }
|
||||
if(v==IfcRelConnectsWithRealizingElements ) { return IfcRelConnectsElements; }
|
||||
if(v==IfcRelContainedInSpatialStructure ) { return IfcRelConnects; }
|
||||
if(v==IfcRelCoversBldgElements ) { return IfcRelConnects; }
|
||||
if(v==IfcRelCoversSpaces ) { return IfcRelConnects; }
|
||||
if(v==IfcRelDeclares ) { return IfcRelationship; }
|
||||
if(v==IfcRelDecomposes ) { return IfcRelationship; }
|
||||
if(v==IfcRelDefines ) { return IfcRelationship; }
|
||||
if(v==IfcRelDefinesByObject ) { return IfcRelDefines; }
|
||||
if(v==IfcRelDefinesByProperties ) { return IfcRelDefines; }
|
||||
if(v==IfcRelDefinesByTemplate ) { return IfcRelDefines; }
|
||||
if(v==IfcRelDefinesByType ) { return IfcRelDefines; }
|
||||
if(v==IfcRelFillsElement ) { return IfcRelConnects; }
|
||||
if(v==IfcRelFlowControlElements ) { return IfcRelConnects; }
|
||||
if(v==IfcRelInterferesElements ) { return IfcRelConnects; }
|
||||
if(v==IfcRelNests ) { return IfcRelDecomposes; }
|
||||
if(v==IfcRelProjectsElement ) { return IfcRelDecomposes; }
|
||||
if(v==IfcRelReferencedInSpatialStructure ) { return IfcRelConnects; }
|
||||
if(v==IfcRelSequence ) { return IfcRelConnects; }
|
||||
if(v==IfcRelServicesBuildings ) { return IfcRelConnects; }
|
||||
if(v==IfcRelSpaceBoundary ) { return IfcRelConnects; }
|
||||
if(v==IfcRelSpaceBoundary1stLevel ) { return IfcRelSpaceBoundary; }
|
||||
if(v==IfcRelSpaceBoundary2ndLevel ) { return IfcRelSpaceBoundary1stLevel; }
|
||||
if(v==IfcRelVoidsElement ) { return IfcRelDecomposes; }
|
||||
if(v==IfcRelationship ) { return IfcRoot; }
|
||||
if(v==IfcReparametrisedCompositeCurveSegment ) { return IfcCompositeCurveSegment; }
|
||||
if(v==IfcResource ) { return IfcObject; }
|
||||
if(v==IfcResourceApprovalRelationship ) { return IfcResourceLevelRelationship; }
|
||||
if(v==IfcResourceConstraintRelationship ) { return IfcResourceLevelRelationship; }
|
||||
if(v==IfcResourceTime ) { return IfcSchedulingTime; }
|
||||
if(v==IfcRevolvedAreaSolid ) { return IfcSweptAreaSolid; }
|
||||
if(v==IfcRevolvedAreaSolidTapered ) { return IfcRevolvedAreaSolid; }
|
||||
if(v==IfcRightCircularCone ) { return IfcCsgPrimitive3D; }
|
||||
if(v==IfcRightCircularCylinder ) { return IfcCsgPrimitive3D; }
|
||||
if(v==IfcRoof ) { return IfcBuildingElement; }
|
||||
if(v==IfcRoofType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcRoundedRectangleProfileDef ) { return IfcRectangleProfileDef; }
|
||||
if(v==IfcSIUnit ) { return IfcNamedUnit; }
|
||||
if(v==IfcSanitaryTerminal ) { return IfcFlowTerminal; }
|
||||
if(v==IfcSanitaryTerminalType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcSectionProperties ) { return IfcPreDefinedProperties; }
|
||||
if(v==IfcSectionReinforcementProperties ) { return IfcPreDefinedProperties; }
|
||||
if(v==IfcSectionedSpine ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcSensor ) { return IfcDistributionControlElement; }
|
||||
if(v==IfcSensorType ) { return IfcDistributionControlElementType; }
|
||||
if(v==IfcShadingDevice ) { return IfcBuildingElement; }
|
||||
if(v==IfcShadingDeviceType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcShapeModel ) { return IfcRepresentation; }
|
||||
if(v==IfcShapeRepresentation ) { return IfcShapeModel; }
|
||||
if(v==IfcShellBasedSurfaceModel ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcSimpleProperty ) { return IfcProperty; }
|
||||
if(v==IfcSimplePropertyTemplate ) { return IfcPropertyTemplate; }
|
||||
if(v==IfcSite ) { return IfcSpatialStructureElement; }
|
||||
if(v==IfcSlab ) { return IfcBuildingElement; }
|
||||
if(v==IfcSlabElementedCase ) { return IfcSlab; }
|
||||
if(v==IfcSlabStandardCase ) { return IfcSlab; }
|
||||
if(v==IfcSlabType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcSlippageConnectionCondition ) { return IfcStructuralConnectionCondition; }
|
||||
if(v==IfcSolarDevice ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcSolarDeviceType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcSolidModel ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcSpace ) { return IfcSpatialStructureElement; }
|
||||
if(v==IfcSpaceHeater ) { return IfcFlowTerminal; }
|
||||
if(v==IfcSpaceHeaterType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcSpaceType ) { return IfcSpatialStructureElementType; }
|
||||
if(v==IfcSpatialElement ) { return IfcProduct; }
|
||||
if(v==IfcSpatialElementType ) { return IfcTypeProduct; }
|
||||
if(v==IfcSpatialStructureElement ) { return IfcSpatialElement; }
|
||||
if(v==IfcSpatialStructureElementType ) { return IfcSpatialElementType; }
|
||||
if(v==IfcSpatialZone ) { return IfcSpatialElement; }
|
||||
if(v==IfcSpatialZoneType ) { return IfcSpatialElementType; }
|
||||
if(v==IfcSphere ) { return IfcCsgPrimitive3D; }
|
||||
if(v==IfcStackTerminal ) { return IfcFlowTerminal; }
|
||||
if(v==IfcStackTerminalType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcStair ) { return IfcBuildingElement; }
|
||||
if(v==IfcStairFlight ) { return IfcBuildingElement; }
|
||||
if(v==IfcStairFlightType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcStairType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcStructuralAction ) { return IfcStructuralActivity; }
|
||||
if(v==IfcStructuralActivity ) { return IfcProduct; }
|
||||
if(v==IfcStructuralAnalysisModel ) { return IfcSystem; }
|
||||
if(v==IfcStructuralConnection ) { return IfcStructuralItem; }
|
||||
if(v==IfcStructuralCurveAction ) { return IfcStructuralAction; }
|
||||
if(v==IfcStructuralCurveConnection ) { return IfcStructuralConnection; }
|
||||
if(v==IfcStructuralCurveMember ) { return IfcStructuralMember; }
|
||||
if(v==IfcStructuralCurveMemberVarying ) { return IfcStructuralCurveMember; }
|
||||
if(v==IfcStructuralCurveReaction ) { return IfcStructuralReaction; }
|
||||
if(v==IfcStructuralItem ) { return IfcProduct; }
|
||||
if(v==IfcStructuralLinearAction ) { return IfcStructuralCurveAction; }
|
||||
if(v==IfcStructuralLoadCase ) { return IfcStructuralLoadGroup; }
|
||||
if(v==IfcStructuralLoadConfiguration ) { return IfcStructuralLoad; }
|
||||
if(v==IfcStructuralLoadGroup ) { return IfcGroup; }
|
||||
if(v==IfcStructuralLoadLinearForce ) { return IfcStructuralLoadStatic; }
|
||||
if(v==IfcStructuralLoadOrResult ) { return IfcStructuralLoad; }
|
||||
if(v==IfcStructuralLoadPlanarForce ) { return IfcStructuralLoadStatic; }
|
||||
if(v==IfcStructuralLoadSingleDisplacement ) { return IfcStructuralLoadStatic; }
|
||||
if(v==IfcStructuralLoadSingleDisplacementDistortion ) { return IfcStructuralLoadSingleDisplacement; }
|
||||
if(v==IfcStructuralLoadSingleForce ) { return IfcStructuralLoadStatic; }
|
||||
if(v==IfcStructuralLoadSingleForceWarping ) { return IfcStructuralLoadSingleForce; }
|
||||
if(v==IfcStructuralLoadStatic ) { return IfcStructuralLoadOrResult; }
|
||||
if(v==IfcStructuralLoadTemperature ) { return IfcStructuralLoadStatic; }
|
||||
if(v==IfcStructuralMember ) { return IfcStructuralItem; }
|
||||
if(v==IfcStructuralPlanarAction ) { return IfcStructuralSurfaceAction; }
|
||||
if(v==IfcStructuralPointAction ) { return IfcStructuralAction; }
|
||||
if(v==IfcStructuralPointConnection ) { return IfcStructuralConnection; }
|
||||
if(v==IfcStructuralPointReaction ) { return IfcStructuralReaction; }
|
||||
if(v==IfcStructuralReaction ) { return IfcStructuralActivity; }
|
||||
if(v==IfcStructuralResultGroup ) { return IfcGroup; }
|
||||
if(v==IfcStructuralSurfaceAction ) { return IfcStructuralAction; }
|
||||
if(v==IfcStructuralSurfaceConnection ) { return IfcStructuralConnection; }
|
||||
if(v==IfcStructuralSurfaceMember ) { return IfcStructuralMember; }
|
||||
if(v==IfcStructuralSurfaceMemberVarying ) { return IfcStructuralSurfaceMember; }
|
||||
if(v==IfcStructuralSurfaceReaction ) { return IfcStructuralReaction; }
|
||||
if(v==IfcStyleModel ) { return IfcRepresentation; }
|
||||
if(v==IfcStyledItem ) { return IfcRepresentationItem; }
|
||||
if(v==IfcStyledRepresentation ) { return IfcStyleModel; }
|
||||
if(v==IfcSubContractResource ) { return IfcConstructionResource; }
|
||||
if(v==IfcSubContractResourceType ) { return IfcConstructionResourceType; }
|
||||
if(v==IfcSubedge ) { return IfcEdge; }
|
||||
if(v==IfcSurface ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcSurfaceCurveSweptAreaSolid ) { return IfcSweptAreaSolid; }
|
||||
if(v==IfcSurfaceFeature ) { return IfcFeatureElement; }
|
||||
if(v==IfcSurfaceOfLinearExtrusion ) { return IfcSweptSurface; }
|
||||
if(v==IfcSurfaceOfRevolution ) { return IfcSweptSurface; }
|
||||
if(v==IfcSurfaceReinforcementArea ) { return IfcStructuralLoadOrResult; }
|
||||
if(v==IfcSurfaceStyle ) { return IfcPresentationStyle; }
|
||||
if(v==IfcSurfaceStyleLighting ) { return IfcPresentationItem; }
|
||||
if(v==IfcSurfaceStyleRefraction ) { return IfcPresentationItem; }
|
||||
if(v==IfcSurfaceStyleRendering ) { return IfcSurfaceStyleShading; }
|
||||
if(v==IfcSurfaceStyleShading ) { return IfcPresentationItem; }
|
||||
if(v==IfcSurfaceStyleWithTextures ) { return IfcPresentationItem; }
|
||||
if(v==IfcSurfaceTexture ) { return IfcPresentationItem; }
|
||||
if(v==IfcSweptAreaSolid ) { return IfcSolidModel; }
|
||||
if(v==IfcSweptDiskSolid ) { return IfcSolidModel; }
|
||||
if(v==IfcSweptDiskSolidPolygonal ) { return IfcSweptDiskSolid; }
|
||||
if(v==IfcSweptSurface ) { return IfcSurface; }
|
||||
if(v==IfcSwitchingDevice ) { return IfcFlowController; }
|
||||
if(v==IfcSwitchingDeviceType ) { return IfcFlowControllerType; }
|
||||
if(v==IfcSystem ) { return IfcGroup; }
|
||||
if(v==IfcSystemFurnitureElement ) { return IfcFurnishingElement; }
|
||||
if(v==IfcSystemFurnitureElementType ) { return IfcFurnishingElementType; }
|
||||
if(v==IfcTShapeProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcTank ) { return IfcFlowStorageDevice; }
|
||||
if(v==IfcTankType ) { return IfcFlowStorageDeviceType; }
|
||||
if(v==IfcTask ) { return IfcProcess; }
|
||||
if(v==IfcTaskTime ) { return IfcSchedulingTime; }
|
||||
if(v==IfcTaskTimeRecurring ) { return IfcTaskTime; }
|
||||
if(v==IfcTaskType ) { return IfcTypeProcess; }
|
||||
if(v==IfcTelecomAddress ) { return IfcAddress; }
|
||||
if(v==IfcTendon ) { return IfcReinforcingElement; }
|
||||
if(v==IfcTendonAnchor ) { return IfcReinforcingElement; }
|
||||
if(v==IfcTendonAnchorType ) { return IfcReinforcingElementType; }
|
||||
if(v==IfcTendonType ) { return IfcReinforcingElementType; }
|
||||
if(v==IfcTessellatedFaceSet ) { return IfcTessellatedItem; }
|
||||
if(v==IfcTessellatedItem ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcTextLiteral ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcTextLiteralWithExtent ) { return IfcTextLiteral; }
|
||||
if(v==IfcTextStyle ) { return IfcPresentationStyle; }
|
||||
if(v==IfcTextStyleFontModel ) { return IfcPreDefinedTextFont; }
|
||||
if(v==IfcTextStyleForDefinedFont ) { return IfcPresentationItem; }
|
||||
if(v==IfcTextStyleTextModel ) { return IfcPresentationItem; }
|
||||
if(v==IfcTextureCoordinate ) { return IfcPresentationItem; }
|
||||
if(v==IfcTextureCoordinateGenerator ) { return IfcTextureCoordinate; }
|
||||
if(v==IfcTextureMap ) { return IfcTextureCoordinate; }
|
||||
if(v==IfcTextureVertex ) { return IfcPresentationItem; }
|
||||
if(v==IfcTextureVertexList ) { return IfcPresentationItem; }
|
||||
if(v==IfcTopologicalRepresentationItem ) { return IfcRepresentationItem; }
|
||||
if(v==IfcTopologyRepresentation ) { return IfcShapeModel; }
|
||||
if(v==IfcTransformer ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcTransformerType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcTransportElement ) { return IfcElement; }
|
||||
if(v==IfcTransportElementType ) { return IfcElementType; }
|
||||
if(v==IfcTrapeziumProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcTriangulatedFaceSet ) { return IfcTessellatedFaceSet; }
|
||||
if(v==IfcTrimmedCurve ) { return IfcBoundedCurve; }
|
||||
if(v==IfcTubeBundle ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcTubeBundleType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcTypeObject ) { return IfcObjectDefinition; }
|
||||
if(v==IfcTypeProcess ) { return IfcTypeObject; }
|
||||
if(v==IfcTypeProduct ) { return IfcTypeObject; }
|
||||
if(v==IfcTypeResource ) { return IfcTypeObject; }
|
||||
if(v==IfcUShapeProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcUnitaryControlElement ) { return IfcDistributionControlElement; }
|
||||
if(v==IfcUnitaryControlElementType ) { return IfcDistributionControlElementType; }
|
||||
if(v==IfcUnitaryEquipment ) { return IfcEnergyConversionDevice; }
|
||||
if(v==IfcUnitaryEquipmentType ) { return IfcEnergyConversionDeviceType; }
|
||||
if(v==IfcValve ) { return IfcFlowController; }
|
||||
if(v==IfcValveType ) { return IfcFlowControllerType; }
|
||||
if(v==IfcVector ) { return IfcGeometricRepresentationItem; }
|
||||
if(v==IfcVertex ) { return IfcTopologicalRepresentationItem; }
|
||||
if(v==IfcVertexLoop ) { return IfcLoop; }
|
||||
if(v==IfcVertexPoint ) { return IfcVertex; }
|
||||
if(v==IfcVibrationIsolator ) { return IfcElementComponent; }
|
||||
if(v==IfcVibrationIsolatorType ) { return IfcElementComponentType; }
|
||||
if(v==IfcVirtualElement ) { return IfcElement; }
|
||||
if(v==IfcVoidingFeature ) { return IfcFeatureElementSubtraction; }
|
||||
if(v==IfcWall ) { return IfcBuildingElement; }
|
||||
if(v==IfcWallElementedCase ) { return IfcWall; }
|
||||
if(v==IfcWallStandardCase ) { return IfcWall; }
|
||||
if(v==IfcWallType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcWasteTerminal ) { return IfcFlowTerminal; }
|
||||
if(v==IfcWasteTerminalType ) { return IfcFlowTerminalType; }
|
||||
if(v==IfcWindow ) { return IfcBuildingElement; }
|
||||
if(v==IfcWindowLiningProperties ) { return IfcPreDefinedPropertySet; }
|
||||
if(v==IfcWindowPanelProperties ) { return IfcPreDefinedPropertySet; }
|
||||
if(v==IfcWindowStandardCase ) { return IfcWindow; }
|
||||
if(v==IfcWindowStyle ) { return IfcTypeProduct; }
|
||||
if(v==IfcWindowType ) { return IfcBuildingElementType; }
|
||||
if(v==IfcWorkCalendar ) { return IfcControl; }
|
||||
if(v==IfcWorkControl ) { return IfcControl; }
|
||||
if(v==IfcWorkPlan ) { return IfcWorkControl; }
|
||||
if(v==IfcWorkSchedule ) { return IfcWorkControl; }
|
||||
if(v==IfcWorkTime ) { return IfcSchedulingTime; }
|
||||
if(v==IfcZShapeProfileDef ) { return IfcParameterizedProfileDef; }
|
||||
if(v==IfcZone ) { return IfcSystem; }
|
||||
return (Enum)-1;
|
||||
static int parent_map[] = {-1,-1,202,-1,-1,-1,611,-1,-1,276,277,-1,-1,-1,548,14,390,431,414,415,-1,432,-1,357,358,-1,276,277,-1,-1,-1,-1,-1,705,454,-1,-1,-1,-1,848,710,710,40,-1,-1,-1,-1,-1,465,636,431,432,-1,662,-1,662,662,86,-1,57,87,-1,60,92,63,99,-1,-1,-1,-1,1010,229,357,358,-1,-1,79,-1,-1,454,-1,167,80,80,80,84,237,994,454,-1,466,924,345,349,350,-1,92,99,-1,353,924,1018,-1,357,358,-1,636,417,418,-1,427,428,-1,417,418,-1,427,428,-1,-1,672,454,121,121,454,124,125,124,127,41,-1,357,358,-1,92,99,-1,177,139,636,345,353,375,376,-1,-1,178,357,358,-1,-1,-1,154,693,693,92,155,99,-1,431,432,-1,-1,721,738,-1,86,166,454,710,-1,425,426,-1,357,358,-1,237,1078,180,-1,182,180,180,-1,180,-1,-1,197,198,-1,197,198,-1,197,198,-1,845,1100,612,-1,606,611,276,277,-1,606,206,357,358,-1,357,358,-1,-1,-1,-1,202,-1,202,-1,36,-1,92,99,-1,197,198,-1,454,-1,909,848,92,99,-1,-1,454,87,87,-1,-1,-1,-1,696,693,693,693,-1,354,414,415,-1,-1,-1,-1,-1,-1,-1,-1,710,-1,-1,-1,-1,-1,-1,454,-1,349,350,-1,280,281,-1,284,278,279,345,353,278,279,679,-1,1018,-1,-1,375,848,376,-1,-1,92,690,-1,-1,690,292,1099,-1,-1,99,-1,-1,-1,686,687,417,418,-1,427,428,-1,433,434,-1,-1,-1,1078,318,542,431,432,-1,-1,-1,-1,-1,414,415,-1,429,430,-1,357,358,-1,357,358,-1,-1,414,415,-1,-1,705,345,353,-1,345,353,-1,753,1099,994,177,636,280,281,-1,357,358,-1,357,358,-1,357,358,-1,703,872,-1,1098,-1,722,-1,-1,848,380,-1,922,376,376,376,1011,384,1078,454,1078,388,386,548,391,949,425,426,-1,349,350,-1,345,400,400,696,454,454,-1,433,434,-1,431,432,-1,1011,280,281,-1,280,281,276,277,-1,414,415,-1,280,281,280,281,280,281,280,281,280,281,-1,-1,-1,92,99,-1,-1,-1,345,353,443,444,-1,345,353,-1,456,-1,842,843,453,454,-1,-1,-1,705,-1,613,-1,-1,611,454,-1,357,358,-1,-1,-1,357,358,-1,636,-1,-1,1010,693,86,1059,482,-1,-1,-1,433,434,-1,-1,465,-1,-1,1074,-1,-1,417,418,-1,-1,-1,636,-1,197,198,-1,872,431,432,-1,-1,-1,-1,-1,375,376,-1,-1,-1,-1,-1,431,432,-1,-1,454,526,526,526,526,530,237,-1,-1,-1,-1,-1,-1,613,-1,-1,1078,-1,-1,-1,-1,-1,909,214,843,-1,-1,-1,-1,559,-1,559,559,-1,707,559,559,574,561,-1,559,559,574,568,566,374,848,-1,-1,-1,-1,349,350,-1,431,432,-1,92,583,99,-1,186,-1,260,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,357,358,-1,-1,-1,-1,-1,-1,612,860,-1,-1,-1,186,-1,6,-1,237,237,178,402,-1,623,-1,848,318,81,431,432,-1,-1,-1,-1,710,1078,237,202,-1,-1,690,202,-1,-1,-1,649,-1,-1,649,92,-1,99,-1,417,418,-1,427,428,-1,1010,454,664,454,-1,354,-1,92,668,99,-1,454,672,672,-1,542,466,86,705,-1,-1,-1,-1,12,-1,688,688,693,722,731,688,-1,-1,-1,694,-1,-1,-1,-1,703,1098,-1,611,-1,611,707,-1,-1,-1,-1,374,-1,199,199,202,-1,215,-1,401,-1,722,-1,893,860,848,893,722,893,893,731,724,-1,-1,739,-1,893,893,739,724,414,276,277,-1,415,-1,705,425,426,-1,650,650,650,731,650,650,650,-1,92,99,-1,92,92,99,-1,99,-1,-1,59,62,-1,772,636,229,87,-1,-1,-1,-1,1074,689,690,787,-1,-1,788,-1,349,350,787,788,-1,821,839,793,793,793,796,793,793,793,839,801,801,801,801,801,801,839,808,809,808,808,808,808,814,809,808,808,808,839,839,839,822,822,822,822,808,808,808,821,821,808,808,808,808,835,836,821,860,168,-1,-1,-1,-1,611,848,848,-1,-1,-1,872,1011,852,229,229,-1,92,99,-1,-1,-1,-1,-1,-1,772,-1,606,-1,431,432,-1,-1,-1,689,689,-1,-1,454,-1,276,277,-1,-1,92,99,-1,-1,841,888,-1,-1,454,721,738,-1,-1,924,-1,92,899,899,99,-1,949,357,358,-1,-1,454,-1,-1,-1,-1,-1,924,-1,431,432,-1,925,-1,705,1099,922,923,922,923,-1,-1,-1,-1,-1,229,431,432,-1,92,92,99,-1,99,-1,-1,945,705,-1,1018,957,-1,944,-1,948,972,-1,953,977,705,950,-1,962,959,465,970,959,970,970,966,970,968,964,970,957,979,944,948,977,945,465,944,-1,948,972,-1,982,977,-1,841,843,987,197,198,-1,318,454,1011,400,-1,1014,1014,-1,964,-1,696,-1,693,693,1008,693,693,693,909,909,1012,994,414,415,-1,465,443,444,-1,636,-1,-1,-1,429,430,-1,703,-1,872,1031,1098,-1,12,-1,-1,787,787,788,-1,788,-1,1045,454,-1,-1,-1,-1,-1,454,1051,-1,696,691,693,693,-1,693,1059,1059,693,693,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,843,888,-1,357,358,-1,-1,-1,345,353,-1,636,1044,86,-1,-1,357,358,-1,612,1097,1097,1097,-1,636,-1,-1,-1,276,277,-1,357,358,-1,-1,414,415,-1,-1,454,-1,1078,542,1119,349,350,-1,345,-1,402,-1,-1,-1,92,1131,1131,99,-1,-1,-1,-1,431,432,-1,92,690,-1,-1,690,1142,1099,-1,-1,99,-1,-1,202,-1,202,1156,-1,1156,-1,872,636,1018};
|
||||
boost::optional<Type::Enum> Type::Parent(Enum v){
|
||||
const int p = parent_map[static_cast<int>(v)];
|
||||
if (p >= 0) {
|
||||
return static_cast<Type::Enum>(p);
|
||||
} else {
|
||||
return boost::none;
|
||||
}
|
||||
}
|
||||
|
||||
bool Type::IsSimple(Enum v) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -68,8 +68,8 @@ unsigned int IfcParse::IfcLateBoundEntity::id() const {
|
||||
bool IfcParse::IfcLateBoundEntity::is(IfcSchema::Type::Enum v) const {
|
||||
IfcSchema::Type::Enum _ty = _type;
|
||||
if (v == _ty) return true;
|
||||
while (_ty != -1) {
|
||||
_ty = IfcSchema::Type::Parent(_ty);
|
||||
while (IfcSchema::Type::Parent(_ty)) {
|
||||
_ty = *IfcSchema::Type::Parent(_ty);
|
||||
if (v == _ty) return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -994,15 +994,20 @@ bool IfcFile::Init(IfcParse::IfcSpfStream* s) {
|
||||
}
|
||||
|
||||
IfcSchema::Type::Enum ty = entity->type();
|
||||
do {
|
||||
for (;;) {
|
||||
IfcEntityList::ptr instances_by_type = entitiesByType(ty);
|
||||
if (!instances_by_type) {
|
||||
instances_by_type = IfcEntityList::ptr(new IfcEntityList());
|
||||
bytype[ty] = instances_by_type;
|
||||
}
|
||||
instances_by_type->push(entity);
|
||||
ty = IfcSchema::Type::Parent(ty);
|
||||
} while ( ty > -1 );
|
||||
boost::optional<IfcSchema::Type::Enum> pt = IfcSchema::Type::Parent(ty);
|
||||
if (pt) {
|
||||
ty = *pt;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( byid.find(currentId) != byid.end() ) {
|
||||
std::stringstream ss;
|
||||
@@ -1200,15 +1205,21 @@ IfcUtil::IfcBaseClass* IfcFile::addEntity(IfcUtil::IfcBaseClass* entity) {
|
||||
|
||||
// The mapping by entity type is updated.
|
||||
IfcSchema::Type::Enum ty = entity->type();
|
||||
do {
|
||||
for (;;) {
|
||||
IfcEntityList::ptr instances_by_type = entitiesByType(ty);
|
||||
if (!instances_by_type) {
|
||||
instances_by_type = IfcEntityList::ptr(new IfcEntityList());
|
||||
bytype[ty] = instances_by_type;
|
||||
}
|
||||
instances_by_type->push(entity);
|
||||
ty = IfcSchema::Type::Parent(ty);
|
||||
} while ( ty > -1 );
|
||||
boost::optional<IfcSchema::Type::Enum> pt = IfcSchema::Type::Parent(ty);
|
||||
if (pt) {
|
||||
ty = *pt;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int new_id = -1;
|
||||
if (entity->entity->isWritable() && !entity->entity->file) {
|
||||
|
||||
@@ -223,10 +223,9 @@ namespace IfcUtil {
|
||||
|
||||
std::string get_supertype(std::string n) {
|
||||
boost::to_upper(n);
|
||||
/// @todo: Redo without copy once Parent() function from performance_improvements branch is in.
|
||||
IfcSchema::Type::Enum t = IfcSchema::Type::FromString(n);
|
||||
if (IfcSchema::Type::Parent(t) != -1) {
|
||||
return IfcSchema::Type::ToString(IfcSchema::Type::Parent(t));
|
||||
if (IfcSchema::Type::Parent(t)) {
|
||||
return IfcSchema::Type::ToString(*IfcSchema::Type::Parent(t));
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user