diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 43344388ce..007746b152 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -65,22 +65,28 @@ ADD_DEFINITIONS(-fPIC) INCLUDE_DIRECTORIES(${OCC_INCLUDE_DIR}) ADD_LIBRARY(IfcParse STATIC - ../src/ifcparse/IfcGeomWires.cpp ../src/ifcparse/Ifc2x3.cpp - ../src/ifcparse/IfcGeomHelpers.cpp - ../src/ifcparse/IfcGeomFunctions.cpp - ../src/ifcparse/IfcGeomObjects.cpp - ../src/ifcparse/IfcGeomShapes.cpp - ../src/ifcparse/IfcGeomFaces.cpp - ../src/ifcparse/IfcRegister.cpp ../src/ifcparse/IfcUtil.cpp - ../src/ifcparse/IfcGeomCurves.cpp ../src/ifcparse/IfcParse.cpp ) +ADD_LIBRARY(IfcGeom STATIC + ../src/ifcgeom/IfcGeomCurves.cpp + ../src/ifcgeom/IfcGeomFaces.cpp + ../src/ifcgeom/IfcGeomFunctions.cpp + ../src/ifcgeom/IfcGeomHelpers.cpp + ../src/ifcgeom/IfcGeomObjects.cpp + ../src/ifcgeom/IfcGeomShapes.cpp + ../src/ifcgeom/IfcGeomWires.cpp + ../src/ifcgeom/IfcRegister.cpp +) + LINK_DIRECTORIES (${IfcOpenShell_BINARY_DIR} /usr/lib) ADD_EXECUTABLE(IfcObj ../src/ifcobj/IfcObj.cpp) -TARGET_LINK_LIBRARIES (IfcObj IfcParse TKernel TKMath TKBRep TKGeomBase TKGeomAlgo TKG3d TKG2d TKShHealing TKTopAlgo TKMesh TKPrim TKBool TKBO TKFillet) +TARGET_LINK_LIBRARIES (IfcObj IfcParse IfcGeom TKernel TKMath TKBRep TKGeomBase TKGeomAlgo TKG3d TKG2d TKShHealing TKTopAlgo TKMesh TKPrim TKBool TKBO TKFillet) # Build python wrapper using separate CMakeLists.txt ADD_SUBDIRECTORY(../src/ifcwrap ifcwrap) + +# Build IfcParseExamples using separate CMakeLists.txt +ADD_SUBDIRECTORY(../src/examples examples) diff --git a/src/examples/CMakeLists.txt b/src/examples/CMakeLists.txt new file mode 100644 index 0000000000..0c28100fb9 --- /dev/null +++ b/src/examples/CMakeLists.txt @@ -0,0 +1,2 @@ +ADD_EXECUTABLE(IfcParseExamples ../src/examples/IfcParseExamples.cpp) +TARGET_LINK_LIBRARIES (IfcParseExamples IfcParse) \ No newline at end of file diff --git a/src/examples/IfcParseExamples.cpp b/src/examples/IfcParseExamples.cpp new file mode 100644 index 0000000000..d215f6d110 --- /dev/null +++ b/src/examples/IfcParseExamples.cpp @@ -0,0 +1,81 @@ +/******************************************************************************** + * * + * This file is part of IfcOpenShell. * + * * + * IfcOpenShell is free software: you can redistribute it and/or modify * + * it under the terms of the Lesser GNU General Public License as published by * + * the Free Software Foundation, either version 3.0 of the License, or * + * (at your option) any later version. * + * * + * IfcOpenShell is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * Lesser GNU General Public License for more details. * + * * + * You should have received a copy of the Lesser GNU General Public License * + * along with this program. If not, see . * + * * + ********************************************************************************/ + +#include "../ifcparse/IfcParse.h" + +using namespace Ifc2x3; + +int main(int argc, char** argv) { + + if ( argc != 2 ) { + std::cout << "usage: IfcParseExamples " << std::endl; + return 1; + } + + // Redirect the output (both progress and log) to stdout + Ifc::SetOutput(&std::cout,&std::cout); + + // Parse the IFC file provided in argv[1] + if ( ! Ifc::Init(argv[1]) ) { + std::cout << "Unable to parse .ifc file" << std::endl; + return 1; + } + + // Lets get a list of IfcBuildingElements, this is the parent + // type of things like walls, windows and doors. + // EntitiesByType is a templated function and returns a + // templated class that behaves like a std::vector. + // Note that the return types are all typedef'ed as members of + // the generated classes, ::list for the templated vector class, + // ::ptr for a shared pointer and ::it for an iterator. + // We will simply iterate over the vector and print a string + // representation of the entity to stdout. + // + // Secondly, lets find out which of them are IfcWindows. + // In order to access the additional properties that windows + // have on top af the properties of building elements, + // we need to cast them to IfcWindows. Since these properties + // are optional we need to make sure the properties are + // defined for the window in question before accessing them. + // + // Since we are accessing properties that represent a length + // measure we can multiply the value by Ifc::LengthUnit, which + // contains the ratio of the unit defined in the IfcUnitAssignment + // to the standard SI Unit, the meter. + IfcBuildingElement::list elements = Ifc::EntitiesByType(); + + std::cout << "Found " << elements->Size() << " elements in " << argv[1] << ":" << std::endl; + + for ( IfcBuildingElement::it it = elements->begin(); it != elements->end(); ++ it ) { + + const IfcBuildingElement::ptr element = *it; + std::cout << element->entity->toString() << std::endl; + + if ( element->is(IfcWindow::Class()) ) { + const IfcWindow::ptr window = reinterpret_pointer_cast(element); + + if ( window->hasOverallWidth() && window->hasOverallHeight() ) { + const float area = window->OverallWidth()*window->OverallHeight() * (Ifc::LengthUnit*Ifc::LengthUnit); + std::cout << "This window has an area of " << area << "m2" << std::endl; + } + } + + } + +} \ No newline at end of file diff --git a/src/ifcexpressparser/IfcExpressParser.py b/src/ifcexpressparser/IfcExpressParser.py index deff3ca06b..e165ac9c49 100644 --- a/src/ifcexpressparser/IfcExpressParser.py +++ b/src/ifcexpressparser/IfcExpressParser.py @@ -381,6 +381,7 @@ namespace Type { typedef enum { %(enum)s } Enum; + Enum Parent(Enum v); Enum FromString(const std::string& s); std::string ToString(Enum v); } @@ -450,6 +451,14 @@ for e in all_enumerations: print >>cpp_file, " throw;" print >>cpp_file, "}" +print >>cpp_file, "Type::Enum Type::Parent(Enum v){" +print >>cpp_file, " if (v < 0 || v >= %d) return -1;"%len(all_enumerations) +for e in entity_enumerations: + if e not in parent_relations: continue + print >>cpp_file, ' if(v==%s%s) { return %s; }'%(e," "*(maxlen-len(e)),parent_relations[e]) +print >>cpp_file, " return -1;" +print >>cpp_file, "}" + for t in [T for T in types if isinstance(T.type,EnumType)]: print >>cpp_file, t for e in entities: print >>cpp_file, e, \ No newline at end of file diff --git a/src/ifcparse/IfcGeom.h b/src/ifcgeom/IfcGeom.h similarity index 100% rename from src/ifcparse/IfcGeom.h rename to src/ifcgeom/IfcGeom.h diff --git a/src/ifcparse/IfcGeomCurves.cpp b/src/ifcgeom/IfcGeomCurves.cpp similarity index 99% rename from src/ifcparse/IfcGeomCurves.cpp rename to src/ifcgeom/IfcGeomCurves.cpp index 4c553cc60d..3bc741819f 100644 --- a/src/ifcparse/IfcGeomCurves.cpp +++ b/src/ifcgeom/IfcGeomCurves.cpp @@ -72,7 +72,7 @@ #include -#include "../ifcparse/IfcGeom.h" +#include "../ifcgeom/IfcGeom.h" bool IfcGeom::convert(const Ifc2x3::IfcCircle::ptr& l, Handle(Geom_Curve)& curve) { const float r = l->Radius() * Ifc::LengthUnit; diff --git a/src/ifcparse/IfcGeomFaces.cpp b/src/ifcgeom/IfcGeomFaces.cpp similarity index 99% rename from src/ifcparse/IfcGeomFaces.cpp rename to src/ifcgeom/IfcGeomFaces.cpp index eb2a56a5fd..1cd410cb30 100644 --- a/src/ifcparse/IfcGeomFaces.cpp +++ b/src/ifcgeom/IfcGeomFaces.cpp @@ -74,7 +74,7 @@ #include -#include "../ifcparse/IfcGeom.h" +#include "../ifcgeom/IfcGeom.h" bool IfcGeom::convert(const Ifc2x3::IfcFace::ptr& l, TopoDS_Face& face) { Ifc2x3::IfcFaceBound::list bounds = l->Bounds(); diff --git a/src/ifcparse/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp similarity index 99% rename from src/ifcparse/IfcGeomFunctions.cpp rename to src/ifcgeom/IfcGeomFunctions.cpp index 0957798f62..1058b2858d 100644 --- a/src/ifcparse/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -72,7 +72,7 @@ #include -#include "../ifcparse/IfcGeom.h" +#include "../ifcgeom/IfcGeom.h" bool IfcGeom::convert_openings(const Ifc2x3::IfcProduct::ptr& entity, const Ifc2x3::IfcRelVoidsElement::list& openings, TopoDS_Shape& result, const gp_Trsf& trsf2) { diff --git a/src/ifcparse/IfcGeomHelpers.cpp b/src/ifcgeom/IfcGeomHelpers.cpp similarity index 99% rename from src/ifcparse/IfcGeomHelpers.cpp rename to src/ifcgeom/IfcGeomHelpers.cpp index b6e86a016d..d1dcd9c771 100644 --- a/src/ifcparse/IfcGeomHelpers.cpp +++ b/src/ifcgeom/IfcGeomHelpers.cpp @@ -72,7 +72,7 @@ #include -#include "../ifcparse/IfcGeom.h" +#include "../ifcgeom/IfcGeom.h" namespace IfcGeom { diff --git a/src/ifcparse/IfcGeomObjects.cpp b/src/ifcgeom/IfcGeomObjects.cpp similarity index 99% rename from src/ifcparse/IfcGeomObjects.cpp rename to src/ifcgeom/IfcGeomObjects.cpp index 6a03a94859..fd455ca6f2 100644 --- a/src/ifcparse/IfcGeomObjects.cpp +++ b/src/ifcgeom/IfcGeomObjects.cpp @@ -33,8 +33,8 @@ #include #include -#include "../ifcparse/IfcGeomObjects.h" -#include "../ifcparse/IfcGeom.h" +#include "../ifcgeom/IfcGeomObjects.h" +#include "../ifcgeom/IfcGeom.h" // Welds vertices that belong to different faces int IfcGeomObjects::IfcMesh::addvert(gp_Pnt p) { diff --git a/src/ifcparse/IfcGeomObjects.h b/src/ifcgeom/IfcGeomObjects.h similarity index 100% rename from src/ifcparse/IfcGeomObjects.h rename to src/ifcgeom/IfcGeomObjects.h diff --git a/src/ifcparse/IfcGeomShapes.cpp b/src/ifcgeom/IfcGeomShapes.cpp similarity index 99% rename from src/ifcparse/IfcGeomShapes.cpp rename to src/ifcgeom/IfcGeomShapes.cpp index 0cae8f98f7..8be888a8e9 100644 --- a/src/ifcparse/IfcGeomShapes.cpp +++ b/src/ifcgeom/IfcGeomShapes.cpp @@ -72,7 +72,7 @@ #include -#include "../ifcparse/IfcGeom.h" +#include "../ifcgeom/IfcGeom.h" bool IfcGeom::convert(const Ifc2x3::IfcExtrudedAreaSolid::ptr& l, TopoDS_Shape& shape) { TopoDS_Face face; diff --git a/src/ifcparse/IfcGeomWires.cpp b/src/ifcgeom/IfcGeomWires.cpp similarity index 99% rename from src/ifcparse/IfcGeomWires.cpp rename to src/ifcgeom/IfcGeomWires.cpp index 7aed769864..e1141603b8 100644 --- a/src/ifcparse/IfcGeomWires.cpp +++ b/src/ifcgeom/IfcGeomWires.cpp @@ -72,7 +72,7 @@ #include -#include "../ifcparse/IfcGeom.h" +#include "../ifcgeom/IfcGeom.h" bool IfcGeom::convert(const Ifc2x3::IfcCompositeCurve::ptr& l, TopoDS_Wire& wire) { Ifc2x3::IfcCompositeCurveSegment::list segments = l->Segments(); diff --git a/src/ifcparse/IfcRegister.h b/src/ifcgeom/IfcRegister.h similarity index 100% rename from src/ifcparse/IfcRegister.h rename to src/ifcgeom/IfcRegister.h diff --git a/src/ifcparse/IfcRegisterConvertCurve.h b/src/ifcgeom/IfcRegisterConvertCurve.h similarity index 100% rename from src/ifcparse/IfcRegisterConvertCurve.h rename to src/ifcgeom/IfcRegisterConvertCurve.h diff --git a/src/ifcparse/IfcRegisterConvertFace.h b/src/ifcgeom/IfcRegisterConvertFace.h similarity index 100% rename from src/ifcparse/IfcRegisterConvertFace.h rename to src/ifcgeom/IfcRegisterConvertFace.h diff --git a/src/ifcparse/IfcRegisterConvertShape.h b/src/ifcgeom/IfcRegisterConvertShape.h similarity index 100% rename from src/ifcparse/IfcRegisterConvertShape.h rename to src/ifcgeom/IfcRegisterConvertShape.h diff --git a/src/ifcparse/IfcRegisterConvertWire.h b/src/ifcgeom/IfcRegisterConvertWire.h similarity index 100% rename from src/ifcparse/IfcRegisterConvertWire.h rename to src/ifcgeom/IfcRegisterConvertWire.h diff --git a/src/ifcparse/IfcRegisterCreateCache.h b/src/ifcgeom/IfcRegisterCreateCache.h similarity index 100% rename from src/ifcparse/IfcRegisterCreateCache.h rename to src/ifcgeom/IfcRegisterCreateCache.h diff --git a/src/ifcparse/IfcRegisterDef.h b/src/ifcgeom/IfcRegisterDef.h similarity index 100% rename from src/ifcparse/IfcRegisterDef.h rename to src/ifcgeom/IfcRegisterDef.h diff --git a/src/ifcparse/IfcRegisterGeomHeader.h b/src/ifcgeom/IfcRegisterGeomHeader.h similarity index 100% rename from src/ifcparse/IfcRegisterGeomHeader.h rename to src/ifcgeom/IfcRegisterGeomHeader.h diff --git a/src/ifcparse/IfcRegisterPurgeCache.h b/src/ifcgeom/IfcRegisterPurgeCache.h similarity index 100% rename from src/ifcparse/IfcRegisterPurgeCache.h rename to src/ifcgeom/IfcRegisterPurgeCache.h diff --git a/src/ifcparse/IfcRegisterUndef.h b/src/ifcgeom/IfcRegisterUndef.h similarity index 100% rename from src/ifcparse/IfcRegisterUndef.h rename to src/ifcgeom/IfcRegisterUndef.h diff --git a/src/ifcobj/IfcObj.cpp b/src/ifcobj/IfcObj.cpp index 687290c72d..68e4402161 100644 --- a/src/ifcobj/IfcObj.cpp +++ b/src/ifcobj/IfcObj.cpp @@ -30,7 +30,7 @@ #include #include -#include "../ifcparse/IfcGeomObjects.h" +#include "../ifcgeom/IfcGeomObjects.h" #include "../ifcobj/ObjMaterials.h" int main ( int argc, char** argv ) { @@ -102,8 +102,11 @@ int main ( int argc, char** argv ) { fMtl << GetMaterial(*it); } - std::cout << std::endl << "Log:" << std::endl; - std::cout << ss.str(); + std::string log = ss.str(); + if ( log.size() ) { + std::cout << std::endl << "Log:" << std::endl; + std::cout << ss.str(); + } time(&end); int dif = (int) difftime (end,start); diff --git a/src/ifcparse/Ifc2x3.cpp b/src/ifcparse/Ifc2x3.cpp index b387662cf7..eb95a17d59 100644 --- a/src/ifcparse/Ifc2x3.cpp +++ b/src/ifcparse/Ifc2x3.cpp @@ -1557,6 +1557,562 @@ Type::Enum Type::FromString(const std::string& s){ if(s=="IFCZONE" ) { return IfcZone; } throw; } +Type::Enum Type::Parent(Enum v){ + if (v < 0 || v >= 758) 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; +} std::string IfcActionSourceTypeEnum::ToString(IfcActionSourceTypeEnum v) { if ( v < 0 || v >= 27 ) throw; const char* names[] = { "DEAD_LOAD_G","COMPLETION_G1","LIVE_LOAD_Q","SNOW_S","WIND_W","PRESTRESSING_P","SETTLEMENT_U","TEMPERATURE_T","EARTHQUAKE_E","FIRE","IMPULSE","IMPACT","TRANSPORT","ERECTION","PROPPING","SYSTEM_IMPERFECTION","SHRINKAGE","CREEP","LACK_OF_FIT","BUOYANCY","ICE","CURRENT","WAVE","RAIN","BRAKES","USERDEFINED","NOTDEFINED" }; diff --git a/src/ifcparse/Ifc2x3enum.h b/src/ifcparse/Ifc2x3enum.h index 4e503d6668..1ef01f28d6 100644 --- a/src/ifcparse/Ifc2x3enum.h +++ b/src/ifcparse/Ifc2x3enum.h @@ -33,6 +33,7 @@ namespace Type { typedef enum { IfcAbsorbedDoseMeasure, IfcAccelerationMeasure, IfcAmountOfSubstanceMeasure, IfcAngularVelocityMeasure, IfcAreaMeasure, IfcBoolean, IfcColour, IfcComplexNumber, IfcCompoundPlaneAngleMeasure, IfcContextDependentMeasure, IfcCountMeasure, IfcCurvatureMeasure, IfcDateTimeSelect, IfcDerivedMeasureValue, IfcDescriptiveMeasure, IfcDoseEquivalentMeasure, IfcDynamicViscosityMeasure, IfcElectricCapacitanceMeasure, IfcElectricChargeMeasure, IfcElectricConductanceMeasure, IfcElectricCurrentMeasure, IfcElectricResistanceMeasure, IfcElectricVoltageMeasure, IfcEnergyMeasure, IfcForceMeasure, IfcFrequencyMeasure, IfcHeatFluxDensityMeasure, IfcHeatingValueMeasure, IfcIdentifier, IfcIlluminanceMeasure, IfcInductanceMeasure, IfcInteger, IfcIntegerCountRateMeasure, IfcIonConcentrationMeasure, IfcIsothermalMoistureCapacityMeasure, IfcKinematicViscosityMeasure, IfcLabel, IfcLengthMeasure, IfcLinearForceMeasure, IfcLinearMomentMeasure, IfcLinearStiffnessMeasure, IfcLinearVelocityMeasure, IfcLogical, IfcLuminousFluxMeasure, IfcLuminousIntensityDistributionMeasure, IfcLuminousIntensityMeasure, IfcMagneticFluxDensityMeasure, IfcMagneticFluxMeasure, IfcMassDensityMeasure, IfcMassFlowRateMeasure, IfcMassMeasure, IfcMassPerLengthMeasure, IfcMeasureValue, IfcModulusOfElasticityMeasure, IfcModulusOfLinearSubgradeReactionMeasure, IfcModulusOfRotationalSubgradeReactionMeasure, IfcModulusOfSubgradeReactionMeasure, IfcMoistureDiffusivityMeasure, IfcMolecularWeightMeasure, IfcMomentOfInertiaMeasure, IfcMonetaryMeasure, IfcNormalisedRatioMeasure, IfcNullStyle, IfcNumericMeasure, IfcPHMeasure, IfcParameterValue, IfcPlanarForceMeasure, IfcPlaneAngleMeasure, IfcPositiveLengthMeasure, IfcPositivePlaneAngleMeasure, IfcPositiveRatioMeasure, IfcPowerMeasure, IfcPressureMeasure, IfcRadioActivityMeasure, IfcRatioMeasure, IfcReal, IfcRotationalFrequencyMeasure, IfcRotationalMassMeasure, IfcRotationalStiffnessMeasure, IfcSectionModulusMeasure, IfcSectionalAreaIntegralMeasure, IfcShearModulusMeasure, IfcSimpleValue, IfcSolidAngleMeasure, IfcSoundPowerMeasure, IfcSoundPressureMeasure, IfcSpecificHeatCapacityMeasure, IfcSpecularExponent, IfcSpecularRoughness, IfcTemperatureGradientMeasure, IfcText, IfcThermalAdmittanceMeasure, IfcThermalConductivityMeasure, IfcThermalExpansionCoefficientMeasure, IfcThermalResistanceMeasure, IfcThermalTransmittanceMeasure, IfcThermodynamicTemperatureMeasure, IfcTimeMeasure, IfcTimeStamp, IfcTorqueMeasure, IfcVaporPermeabilityMeasure, IfcVolumeMeasure, IfcVolumetricFlowRateMeasure, IfcWarpingConstantMeasure, IfcWarpingMomentMeasure, Ifc2DCompositeCurve, IfcActionRequest, IfcActor, IfcActorRole, IfcActuatorType, IfcAddress, IfcAirTerminalBoxType, IfcAirTerminalType, IfcAirToAirHeatRecoveryType, IfcAlarmType, IfcAngularDimension, IfcAnnotation, IfcAnnotationCurveOccurrence, IfcAnnotationFillArea, IfcAnnotationFillAreaOccurrence, IfcAnnotationOccurrence, IfcAnnotationSurface, IfcAnnotationSurfaceOccurrence, IfcAnnotationSymbolOccurrence, IfcAnnotationTextOccurrence, IfcApplication, IfcAppliedValue, IfcAppliedValueRelationship, IfcApproval, IfcApprovalActorRelationship, IfcApprovalPropertyRelationship, IfcApprovalRelationship, IfcArbitraryClosedProfileDef, IfcArbitraryOpenProfileDef, IfcArbitraryProfileDefWithVoids, IfcAsset, IfcAsymmetricIShapeProfileDef, IfcAxis1Placement, IfcAxis2Placement2D, IfcAxis2Placement3D, IfcBSplineCurve, IfcBeam, IfcBeamType, IfcBezierCurve, IfcBlobTexture, IfcBlock, IfcBoilerType, IfcBooleanClippingResult, IfcBooleanResult, IfcBoundaryCondition, IfcBoundaryEdgeCondition, IfcBoundaryFaceCondition, IfcBoundaryNodeCondition, IfcBoundaryNodeConditionWarping, IfcBoundedCurve, IfcBoundedSurface, IfcBoundingBox, IfcBoxedHalfSpace, IfcBuilding, IfcBuildingElement, IfcBuildingElementComponent, IfcBuildingElementPart, IfcBuildingElementProxy, IfcBuildingElementProxyType, IfcBuildingElementType, IfcBuildingStorey, IfcCShapeProfileDef, IfcCableCarrierFittingType, IfcCableCarrierSegmentType, IfcCableSegmentType, IfcCalendarDate, IfcCartesianPoint, IfcCartesianTransformationOperator, IfcCartesianTransformationOperator2D, IfcCartesianTransformationOperator2DnonUniform, IfcCartesianTransformationOperator3D, IfcCartesianTransformationOperator3DnonUniform, IfcCenterLineProfileDef, IfcChamferEdgeFeature, IfcChillerType, IfcCircle, IfcCircleHollowProfileDef, IfcCircleProfileDef, IfcClassification, IfcClassificationItem, IfcClassificationItemRelationship, IfcClassificationNotation, IfcClassificationNotationFacet, IfcClassificationReference, IfcClosedShell, IfcCoilType, IfcColourRgb, IfcColourSpecification, IfcColumn, IfcColumnType, IfcComplexProperty, IfcCompositeCurve, IfcCompositeCurveSegment, IfcCompositeProfileDef, IfcCompressorType, IfcCondenserType, IfcCondition, IfcConditionCriterion, IfcConic, IfcConnectedFaceSet, IfcConnectionCurveGeometry, IfcConnectionGeometry, IfcConnectionPointEccentricity, IfcConnectionPointGeometry, IfcConnectionPortGeometry, IfcConnectionSurfaceGeometry, IfcConstraint, IfcConstraintAggregationRelationship, IfcConstraintClassificationRelationship, IfcConstraintRelationship, IfcConstructionEquipmentResource, IfcConstructionMaterialResource, IfcConstructionProductResource, IfcConstructionResource, IfcContextDependentUnit, IfcControl, IfcControllerType, IfcConversionBasedUnit, IfcCooledBeamType, IfcCoolingTowerType, IfcCoordinatedUniversalTimeOffset, IfcCostItem, IfcCostSchedule, IfcCostValue, IfcCovering, IfcCoveringType, IfcCraneRailAShapeProfileDef, IfcCraneRailFShapeProfileDef, IfcCrewResource, IfcCsgPrimitive3D, IfcCsgSolid, IfcCurrencyRelationship, IfcCurtainWall, IfcCurtainWallType, IfcCurve, IfcCurveBoundedPlane, IfcCurveStyle, IfcCurveStyleFont, IfcCurveStyleFontAndScaling, IfcCurveStyleFontPattern, IfcDamperType, IfcDateAndTime, IfcDefinedSymbol, IfcDerivedProfileDef, IfcDerivedUnit, IfcDerivedUnitElement, IfcDiameterDimension, IfcDimensionCalloutRelationship, IfcDimensionCurve, IfcDimensionCurveDirectedCallout, IfcDimensionCurveTerminator, IfcDimensionPair, IfcDimensionalExponents, IfcDirection, IfcDiscreteAccessory, IfcDiscreteAccessoryType, IfcDistributionChamberElement, IfcDistributionChamberElementType, IfcDistributionControlElement, IfcDistributionControlElementType, IfcDistributionElement, IfcDistributionElementType, IfcDistributionFlowElement, IfcDistributionFlowElementType, IfcDistributionPort, IfcDocumentElectronicFormat, IfcDocumentInformation, IfcDocumentInformationRelationship, IfcDocumentReference, IfcDoor, IfcDoorLiningProperties, IfcDoorPanelProperties, IfcDoorStyle, IfcDraughtingCallout, IfcDraughtingCalloutRelationship, IfcDraughtingPreDefinedColour, IfcDraughtingPreDefinedCurveFont, IfcDraughtingPreDefinedTextFont, IfcDuctFittingType, IfcDuctSegmentType, IfcDuctSilencerType, IfcEdge, IfcEdgeCurve, IfcEdgeFeature, IfcEdgeLoop, IfcElectricApplianceType, IfcElectricDistributionPoint, IfcElectricFlowStorageDeviceType, IfcElectricGeneratorType, IfcElectricHeaterType, IfcElectricMotorType, IfcElectricTimeControlType, IfcElectricalBaseProperties, IfcElectricalCircuit, IfcElectricalElement, IfcElement, IfcElementAssembly, IfcElementComponent, IfcElementComponentType, IfcElementQuantity, IfcElementType, IfcElementarySurface, IfcEllipse, IfcEllipseProfileDef, IfcEnergyConversionDevice, IfcEnergyConversionDeviceType, IfcEnergyProperties, IfcEnvironmentalImpactValue, IfcEquipmentElement, IfcEquipmentStandard, IfcEvaporativeCoolerType, IfcEvaporatorType, IfcExtendedMaterialProperties, IfcExternalReference, IfcExternallyDefinedHatchStyle, IfcExternallyDefinedSurfaceStyle, IfcExternallyDefinedSymbol, IfcExternallyDefinedTextFont, IfcExtrudedAreaSolid, IfcFace, IfcFaceBasedSurfaceModel, IfcFaceBound, IfcFaceOuterBound, IfcFaceSurface, IfcFacetedBrep, IfcFacetedBrepWithVoids, IfcFailureConnectionCondition, IfcFanType, IfcFastener, IfcFastenerType, IfcFeatureElement, IfcFeatureElementAddition, IfcFeatureElementSubtraction, IfcFillAreaStyle, IfcFillAreaStyleHatching, IfcFillAreaStyleTileSymbolWithStyle, IfcFillAreaStyleTiles, IfcFilterType, IfcFireSuppressionTerminalType, IfcFlowController, IfcFlowControllerType, IfcFlowFitting, IfcFlowFittingType, IfcFlowInstrumentType, IfcFlowMeterType, IfcFlowMovingDevice, IfcFlowMovingDeviceType, IfcFlowSegment, IfcFlowSegmentType, IfcFlowStorageDevice, IfcFlowStorageDeviceType, IfcFlowTerminal, IfcFlowTerminalType, IfcFlowTreatmentDevice, IfcFlowTreatmentDeviceType, IfcFluidFlowProperties, IfcFooting, IfcFuelProperties, IfcFurnishingElement, IfcFurnishingElementType, IfcFurnitureStandard, IfcFurnitureType, IfcGasTerminalType, IfcGeneralMaterialProperties, IfcGeneralProfileProperties, IfcGeometricCurveSet, IfcGeometricRepresentationContext, IfcGeometricRepresentationItem, IfcGeometricRepresentationSubContext, IfcGeometricSet, IfcGrid, IfcGridAxis, IfcGridPlacement, IfcGroup, IfcHalfSpaceSolid, IfcHeatExchangerType, IfcHumidifierType, IfcHygroscopicMaterialProperties, IfcIShapeProfileDef, IfcImageTexture, IfcInventory, IfcIrregularTimeSeries, IfcIrregularTimeSeriesValue, IfcJunctionBoxType, IfcLShapeProfileDef, IfcLaborResource, IfcLampType, IfcLibraryInformation, IfcLibraryReference, IfcLightDistributionData, IfcLightFixtureType, IfcLightIntensityDistribution, IfcLightSource, IfcLightSourceAmbient, IfcLightSourceDirectional, IfcLightSourceGoniometric, IfcLightSourcePositional, IfcLightSourceSpot, IfcLine, IfcLinearDimension, IfcLocalPlacement, IfcLocalTime, IfcLoop, IfcManifoldSolidBrep, IfcMappedItem, IfcMaterial, IfcMaterialClassificationRelationship, IfcMaterialDefinitionRepresentation, IfcMaterialLayer, IfcMaterialLayerSet, IfcMaterialLayerSetUsage, IfcMaterialList, IfcMaterialProperties, IfcMeasureWithUnit, IfcMechanicalConcreteMaterialProperties, IfcMechanicalFastener, IfcMechanicalFastenerType, IfcMechanicalMaterialProperties, IfcMechanicalSteelMaterialProperties, IfcMember, IfcMemberType, IfcMetric, IfcMonetaryUnit, IfcMotorConnectionType, IfcMove, IfcNamedUnit, IfcObject, IfcObjectDefinition, IfcObjectPlacement, IfcObjective, IfcOccupant, IfcOffsetCurve2D, IfcOffsetCurve3D, IfcOneDirectionRepeatFactor, IfcOpenShell, IfcOpeningElement, IfcOpticalMaterialProperties, IfcOrderAction, IfcOrganization, IfcOrganizationRelationship, IfcOrientedEdge, IfcOutletType, IfcOwnerHistory, IfcParameterizedProfileDef, IfcPath, IfcPerformanceHistory, IfcPermeableCoveringProperties, IfcPermit, IfcPerson, IfcPersonAndOrganization, IfcPhysicalComplexQuantity, IfcPhysicalQuantity, IfcPhysicalSimpleQuantity, IfcPile, IfcPipeFittingType, IfcPipeSegmentType, IfcPixelTexture, IfcPlacement, IfcPlanarBox, IfcPlanarExtent, IfcPlane, IfcPlate, IfcPlateType, IfcPoint, IfcPointOnCurve, IfcPointOnSurface, IfcPolyLoop, IfcPolygonalBoundedHalfSpace, IfcPolyline, IfcPort, IfcPostalAddress, IfcPreDefinedColour, IfcPreDefinedCurveFont, IfcPreDefinedDimensionSymbol, IfcPreDefinedItem, IfcPreDefinedPointMarkerSymbol, IfcPreDefinedSymbol, IfcPreDefinedTerminatorSymbol, IfcPreDefinedTextFont, IfcPresentationLayerAssignment, IfcPresentationLayerWithStyle, IfcPresentationStyle, IfcPresentationStyleAssignment, IfcProcedure, IfcProcess, IfcProduct, IfcProductDefinitionShape, IfcProductRepresentation, IfcProductsOfCombustionProperties, IfcProfileDef, IfcProfileProperties, IfcProject, IfcProjectOrder, IfcProjectOrderRecord, IfcProjectionCurve, IfcProjectionElement, IfcProperty, IfcPropertyBoundedValue, IfcPropertyConstraintRelationship, IfcPropertyDefinition, IfcPropertyDependencyRelationship, IfcPropertyEnumeratedValue, IfcPropertyEnumeration, IfcPropertyListValue, IfcPropertyReferenceValue, IfcPropertySet, IfcPropertySetDefinition, IfcPropertySingleValue, IfcPropertyTableValue, IfcProtectiveDeviceType, IfcProxy, IfcPumpType, IfcQuantityArea, IfcQuantityCount, IfcQuantityLength, IfcQuantityTime, IfcQuantityVolume, IfcQuantityWeight, IfcRadiusDimension, IfcRailing, IfcRailingType, IfcRamp, IfcRampFlight, IfcRampFlightType, IfcRationalBezierCurve, IfcRectangleHollowProfileDef, IfcRectangleProfileDef, IfcRectangularPyramid, IfcRectangularTrimmedSurface, IfcReferencesValueDocument, IfcRegularTimeSeries, IfcReinforcementBarProperties, IfcReinforcementDefinitionProperties, IfcReinforcingBar, IfcReinforcingElement, IfcReinforcingMesh, IfcRelAggregates, IfcRelAssigns, IfcRelAssignsTasks, IfcRelAssignsToActor, IfcRelAssignsToControl, IfcRelAssignsToGroup, IfcRelAssignsToProcess, IfcRelAssignsToProduct, IfcRelAssignsToProjectOrder, IfcRelAssignsToResource, IfcRelAssociates, IfcRelAssociatesAppliedValue, IfcRelAssociatesApproval, IfcRelAssociatesClassification, IfcRelAssociatesConstraint, IfcRelAssociatesDocument, IfcRelAssociatesLibrary, IfcRelAssociatesMaterial, IfcRelAssociatesProfileProperties, IfcRelConnects, IfcRelConnectsElements, IfcRelConnectsPathElements, IfcRelConnectsPortToElement, IfcRelConnectsPorts, IfcRelConnectsStructuralActivity, IfcRelConnectsStructuralElement, IfcRelConnectsStructuralMember, IfcRelConnectsWithEccentricity, IfcRelConnectsWithRealizingElements, IfcRelContainedInSpatialStructure, IfcRelCoversBldgElements, IfcRelCoversSpaces, IfcRelDecomposes, IfcRelDefines, IfcRelDefinesByProperties, IfcRelDefinesByType, IfcRelFillsElement, IfcRelFlowControlElements, IfcRelInteractionRequirements, IfcRelNests, IfcRelOccupiesSpaces, IfcRelOverridesProperties, IfcRelProjectsElement, IfcRelReferencedInSpatialStructure, IfcRelSchedulesCostItems, IfcRelSequence, IfcRelServicesBuildings, IfcRelSpaceBoundary, IfcRelVoidsElement, IfcRelationship, IfcRelaxation, IfcRepresentation, IfcRepresentationContext, IfcRepresentationItem, IfcRepresentationMap, IfcResource, IfcRevolvedAreaSolid, IfcRibPlateProfileProperties, IfcRightCircularCone, IfcRightCircularCylinder, IfcRoof, IfcRoot, IfcRoundedEdgeFeature, IfcRoundedRectangleProfileDef, IfcSIUnit, IfcSanitaryTerminalType, IfcScheduleTimeControl, IfcSectionProperties, IfcSectionReinforcementProperties, IfcSectionedSpine, IfcSensorType, IfcServiceLife, IfcServiceLifeFactor, IfcShapeAspect, IfcShapeModel, IfcShapeRepresentation, IfcShellBasedSurfaceModel, IfcSimpleProperty, IfcSite, IfcSlab, IfcSlabType, IfcSlippageConnectionCondition, IfcSolidModel, IfcSoundProperties, IfcSoundValue, IfcSpace, IfcSpaceHeaterType, IfcSpaceProgram, IfcSpaceThermalLoadProperties, IfcSpaceType, IfcSpatialStructureElement, IfcSpatialStructureElementType, IfcSphere, IfcStackTerminalType, IfcStair, IfcStairFlight, IfcStairFlightType, IfcStructuralAction, IfcStructuralActivity, IfcStructuralAnalysisModel, IfcStructuralConnection, IfcStructuralConnectionCondition, IfcStructuralCurveConnection, IfcStructuralCurveMember, IfcStructuralCurveMemberVarying, IfcStructuralItem, IfcStructuralLinearAction, IfcStructuralLinearActionVarying, IfcStructuralLoad, IfcStructuralLoadGroup, IfcStructuralLoadLinearForce, IfcStructuralLoadPlanarForce, IfcStructuralLoadSingleDisplacement, IfcStructuralLoadSingleDisplacementDistortion, IfcStructuralLoadSingleForce, IfcStructuralLoadSingleForceWarping, IfcStructuralLoadStatic, IfcStructuralLoadTemperature, IfcStructuralMember, IfcStructuralPlanarAction, IfcStructuralPlanarActionVarying, IfcStructuralPointAction, IfcStructuralPointConnection, IfcStructuralPointReaction, IfcStructuralProfileProperties, IfcStructuralReaction, IfcStructuralResultGroup, IfcStructuralSteelProfileProperties, IfcStructuralSurfaceConnection, IfcStructuralSurfaceMember, IfcStructuralSurfaceMemberVarying, IfcStructuredDimensionCallout, IfcStyleModel, IfcStyledItem, IfcStyledRepresentation, IfcSubContractResource, IfcSubedge, IfcSurface, IfcSurfaceCurveSweptAreaSolid, IfcSurfaceOfLinearExtrusion, IfcSurfaceOfRevolution, IfcSurfaceStyle, IfcSurfaceStyleLighting, IfcSurfaceStyleRefraction, IfcSurfaceStyleRendering, IfcSurfaceStyleShading, IfcSurfaceStyleWithTextures, IfcSurfaceTexture, IfcSweptAreaSolid, IfcSweptDiskSolid, IfcSweptSurface, IfcSwitchingDeviceType, IfcSymbolStyle, IfcSystem, IfcSystemFurnitureElementType, IfcTShapeProfileDef, IfcTable, IfcTableRow, IfcTankType, IfcTask, IfcTelecomAddress, IfcTendon, IfcTendonAnchor, IfcTerminatorSymbol, IfcTextLiteral, IfcTextLiteralWithExtent, IfcTextStyle, IfcTextStyleFontModel, IfcTextStyleForDefinedFont, IfcTextStyleTextModel, IfcTextStyleWithBoxCharacteristics, IfcTextureCoordinate, IfcTextureCoordinateGenerator, IfcTextureMap, IfcTextureVertex, IfcThermalMaterialProperties, IfcTimeSeries, IfcTimeSeriesReferenceRelationship, IfcTimeSeriesSchedule, IfcTimeSeriesValue, IfcTopologicalRepresentationItem, IfcTopologyRepresentation, IfcTransformerType, IfcTransportElement, IfcTransportElementType, IfcTrapeziumProfileDef, IfcTrimmedCurve, IfcTubeBundleType, IfcTwoDirectionRepeatFactor, IfcTypeObject, IfcTypeProduct, IfcUShapeProfileDef, IfcUnitAssignment, IfcUnitaryEquipmentType, IfcValveType, IfcVector, IfcVertex, IfcVertexBasedTextureMap, IfcVertexLoop, IfcVertexPoint, IfcVibrationIsolatorType, IfcVirtualElement, IfcVirtualGridIntersection, IfcWall, IfcWallStandardCase, IfcWallType, IfcWasteTerminalType, IfcWaterProperties, IfcWindow, IfcWindowLiningProperties, IfcWindowPanelProperties, IfcWindowStyle, IfcWorkControl, IfcWorkPlan, IfcWorkSchedule, IfcZShapeProfileDef, IfcZone, ALL } Enum; + Enum Parent(Enum v); Enum FromString(const std::string& s); std::string ToString(Enum v); } diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index 166599f9a7..f98306d0a1 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -272,7 +272,7 @@ std::string TokenFunc::asString(Token t) { } std::string TokenFunc::toString(Token t) { if ( isOperator(t) ) return std::string ( (char*) &t, 1 ); - else return asString(t); + else return Ifc::tokens->TokenString(t - 128); } @@ -390,7 +390,7 @@ TokenArgument::operator SHARED_PTR() const { TokenArgument::operator IfcEntities() const { throw IfcException("Argument is not a list of entities"); } unsigned int TokenArgument::Size() const { return 1; } ArgumentPtr TokenArgument::operator [] (unsigned int i) const { throw IfcException("Argument is not a list of arguments"); } -std::string TokenArgument::toString() const { return TokenFunc::asString(token); } +std::string TokenArgument::toString() const { return TokenFunc::toString(token); } bool TokenArgument::isNull() const { return TokenFunc::isOperator(token,'$'); } // // Functions for casting the EntityArgument to other types @@ -454,7 +454,6 @@ void Entity::Load(std::vector& ids, bool seek) { if ( seek ) { Ifc::file->Seek(offset); Token datatype = Ifc::tokens->Next(); - std::string dt = TokenFunc::toString(datatype); if ( ! TokenFunc::isDatatype(datatype)) throw IfcException("Unexpected token while parsing entity"); _type = Ifc2x3::Type::FromString(TokenFunc::asString(datatype)); } @@ -546,12 +545,16 @@ bool Ifc::Init(IfcParse::File* f) { e = EntityPtr(new Entity(currentId,tokens)); entity = Ifc2x3::SchemaEntity(e); if ( log1 && !((++x)%1000) ) std::cout << "\r#" << currentId << " " << std::flush; - IfcEntities L = EntitiesByType(entity->type()); - if ( L == 0 ) { - L = IfcEntities(new IfcEntityList()); - bytype[entity->type()] = L; - } - L->push(entity); + Ifc2x3::Type::Enum ty = entity->type(); + do { + IfcEntities L = EntitiesByType(ty); + if ( L == 0 ) { + L = IfcEntities(new IfcEntityList()); + bytype[ty] = L; + } + L->push(entity); + ty = Ifc2x3::Type::Parent(ty); + } while ( ty > -1 ); byid[currentId] = entity; currentId = 0; } else token = tokens->Next(); @@ -577,10 +580,10 @@ bool Ifc::Init(IfcParse::File* f) { Ifc2x3::IfcUnitAssignment::list unit_assignments = EntitiesByType(); IfcUtil::IfcAbstractSelect::list units = IfcUtil::IfcAbstractSelect::list(); if ( unit_assignments->Size() ) { - Ifc2x3::IfcUnitAssignment::ptr unit_assignment = *unit_assignments->begin(); - IfcUtil::IfcAbstractSelect::list units = unit_assignment->Units(); - } - if ( units ) + Ifc2x3::IfcUnitAssignment::ptr unit_assignment = *unit_assignments->begin(); + units = unit_assignment->Units(); + } + if ( ! units ) return true; for ( IfcUtil::IfcAbstractSelect::it it = units->begin(); it != units->end(); ++ it ) { const IfcUtil::IfcAbstractSelect::ptr base = *it; Ifc2x3::IfcSIUnit::ptr unit = Ifc2x3::IfcSIUnit::ptr(); diff --git a/src/ifcparse/IfcRegister.cpp b/src/ifcparse/IfcRegister.cpp deleted file mode 100644 index ace2835a46..0000000000 --- a/src/ifcparse/IfcRegister.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************** -* * -* This file is part of IfcOpenShell. * -* * -* IfcOpenShell is free software: you can redistribute it and/or modify * -* it under the terms of the Lesser GNU General Public License as published by * -* the Free Software Foundation, either version 3.0 of the License, or * -* (at your option) any later version. * -* * -* IfcOpenShell is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* Lesser GNU General Public License for more details. * -* * -* You should have received a copy of the Lesser GNU General Public License * -* along with this program. If not, see . * -* * -********************************************************************************/ - -#include "IfcGeom.h" - -namespace IfcGeom { - namespace Cache { - std::map Shape; - void PurgeShapeCache() { - Shape.clear(); - } - } -} - -using namespace Ifc2x3; -using namespace IfcUtil; - -bool IfcGeom::convert_shape(const SHARED_PTR& l, TopoDS_Shape& r) { - const unsigned int id = l->entity->id(); - std::map::const_iterator it = Cache::Shape.find(id); - if ( it != Cache::Shape.end() ) { r = it->second; return true; } -#include "IfcRegisterConvertShape.h" - Ifc::LogMessage("Error","No operation defined for:",l->entity); - return false; -} -bool IfcGeom::convert_wire(const SHARED_PTR& l, TopoDS_Wire& r) { -#include "IfcRegisterConvertWire.h" - Ifc::LogMessage("Error","No operation defined for:",l->entity); - return false; -} -bool IfcGeom::convert_face(const SHARED_PTR& l, TopoDS_Face& r) { -#include "IfcRegisterConvertFace.h" - Ifc::LogMessage("Error","No operation defined for:",l->entity); - return false; -} -bool IfcGeom::convert_curve(const SHARED_PTR& l, Handle(Geom_Curve)& r) { -#include "IfcRegisterConvertCurve.h" - Ifc::LogMessage("Error","No operation defined for:",l->entity); - return false; -} \ No newline at end of file diff --git a/src/ifcwrap/CMakeLists.txt b/src/ifcwrap/CMakeLists.txt index c5147961d5..bc63b957e4 100644 --- a/src/ifcwrap/CMakeLists.txt +++ b/src/ifcwrap/CMakeLists.txt @@ -10,4 +10,4 @@ SET(CMAKE_SWIG_FLAGS "") SET_SOURCE_FILES_PROPERTIES(IfcPython.i PROPERTIES CPLUSPLUS ON) SWIG_ADD_MODULE(IfcImport python IfcPython.i) -SWIG_LINK_LIBRARIES(IfcImport ${PYTHON_LIBRARIES} IfcParse TKAdvTools TKMath TKernel TKBRep TKGeomBase TKGeomAlgo TKBool TKMesh TKShHealing TKFillet) +SWIG_LINK_LIBRARIES(IfcImport ${PYTHON_LIBRARIES} IfcParse IfcGeom TKernel TKMath TKBRep TKGeomBase TKGeomAlgo TKG3d TKG2d TKShHealing TKTopAlgo TKMesh TKPrim TKBool TKBO TKFillet) diff --git a/win/IfcGeom.vcproj b/win/IfcGeom.vcproj index 76ade71400..5b0eb8cabf 100644 --- a/win/IfcGeom.vcproj +++ b/win/IfcGeom.vcproj @@ -3,8 +3,9 @@ ProjectType="Visual C++" Version="9,00" Name="IfcGeom" - ProjectGUID="{D3E6944E-EA43-40BB-8DB3-9EC097F43B2B}" + ProjectGUID="{BA57AF0F-1D12-4FAC-BD40-7474D729CAE9}" RootNamespace="IfcGeom" + Keyword="Win32Proj" TargetFrameworkVersion="196613" > @@ -17,11 +18,10 @@ @@ -82,10 +80,10 @@ + + + + + + + + + + @@ -169,22 +187,60 @@ Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" > + + + + + + + + + + + + + + + + + + diff --git a/win/IfcMax.vcproj b/win/IfcMax.vcproj index 0b095be160..e8e107280f 100644 --- a/win/IfcMax.vcproj +++ b/win/IfcMax.vcproj @@ -61,7 +61,7 @@ /> @@ -131,7 +130,7 @@ /> - - - - - - - - - - - - - - - - @@ -215,58 +183,10 @@ RelativePath="..\src\ifcparse\Ifc2x3enum.h" > - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/IfcParseExamples.vcproj b/win/IfcParseExamples.vcproj new file mode 100644 index 0000000000..1f75261d89 --- /dev/null +++ b/win/IfcParseExamples.vcproj @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/win/IfcWrap.vcproj b/win/IfcWrap.vcproj index 4223688cc7..7420ba1f83 100644 --- a/win/IfcWrap.vcproj +++ b/win/IfcWrap.vcproj @@ -61,7 +61,7 @@ />