From d7410e6f08905f753844eb2db94bc9c9a6c07deb Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Wed, 11 Jul 2012 22:11:16 +0000 Subject: [PATCH] - Ifc: implement basic support for IfcSweptDiskSolid elements. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1287 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/IFCCurve.cpp | 3 +- code/IFCGeometry.cpp | 107 ++++++++++++++++++++- code/IFCReaderGen.cpp | 149 +++++++++++++++++------------ code/IFCReaderGen.h | 84 ++++++++-------- scripts/IFCImporter/entitylist.txt | 1 + 5 files changed, 238 insertions(+), 106 deletions(-) diff --git a/code/IFCCurve.cpp b/code/IFCCurve.cpp index ba6df6ac4..f23c5a516 100644 --- a/code/IFCCurve.cpp +++ b/code/IFCCurve.cpp @@ -549,7 +549,8 @@ bool Curve :: InRange(IfcFloat u) const ai_assert(range.first != std::numeric_limits::infinity() && range.second != std::numeric_limits::infinity()); u = range.first + fmod(u-range.first,range.second-range.first); } - return u >= range.first && u <= range.second; + const IfcFloat epsilon = 1e-5; + return u - range.first > -epsilon && range.second - u > -epsilon; } #endif diff --git a/code/IFCGeometry.cpp b/code/IFCGeometry.cpp index 9f8610ecc..a06471cdb 100644 --- a/code/IFCGeometry.cpp +++ b/code/IFCGeometry.cpp @@ -451,7 +451,6 @@ void ProcessConnectedFaceSet(const IfcConnectedFaceSet& fset, TempMesh& result, - // ------------------------------------------------------------------------------------------------ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& result, ConversionData& conv) { @@ -539,6 +538,109 @@ void ProcessRevolvedAreaSolid(const IfcRevolvedAreaSolid& solid, TempMesh& resul IFCImporter::LogDebug("generate mesh procedurally by radial extrusion (IfcRevolvedAreaSolid)"); } + + +// ------------------------------------------------------------------------------------------------ +void ProcessSweptDiskSolid(const IfcSweptDiskSolid solid, TempMesh& result, ConversionData& conv) +{ + const Curve* const curve = Curve::Convert(*solid.Directrix, conv); + if(!curve) { + IFCImporter::LogError("failed to convert Directrix curve (IfcSweptDiskSolid)"); + return; + } + + const std::vector& in = result.verts; + const size_t size=in.size(); + + const unsigned int cnt_segments = 16; + const IfcFloat deltaAngle = AI_MATH_TWO_PI/cnt_segments; + + const size_t samples = curve->EstimateSampleCount(solid.StartParam,solid.EndParam); + + result.verts.reserve(cnt_segments * samples * 4); + result.vertcnt.reserve((cnt_segments - 1) * samples); + + // XXX while EstimateSampleCount() works well for non-composite curves, it + // fails badly for composite curves that require non-uniform sampling + // for good results. + IfcFloat p = solid.StartParam, delta = (solid.EndParam-solid.StartParam)/ (samples - 1); + + + IfcVector3 current = curve->Eval(p); + IfcVector3 previous = current; + IfcVector3 next; + + IfcVector3 startvec; + startvec.x = 1.0f; + startvec.y = 1.0f; + startvec.z = 1.0f; + + std::vector points; + points.reserve(cnt_segments * samples); + + p += delta; + + // generate circles at the sweep positions + for(size_t i = 0; i < samples; ++i, p += delta) { + + next = curve->Eval(p); + + // get a direction vector reflecting the approximate curvature (i.e. tangent) + IfcVector3 d = (current-previous) + (next-previous); + + d.Normalize(); + + // figure out an arbitrary point q so that (p-q) * d = 0, + // try to maximize ||(p-q)|| * ||(p_last-q_last)|| + IfcVector3 q; + if (abs(d.x) > 1e-6) { + q.y = startvec.y; + q.z = startvec.z; + q.x = -(d.y * q.y + d.z * q.z) / d.x; + } + else if (abs(d.y) > 1e-6) { + q.x = startvec.x; + q.z = startvec.z; + q.y = -(d.x * q.x + d.z * q.z) / d.y; + } + else { // if (abs(d.z) > 1e-6) + q.y = startvec.y; + q.x = startvec.x; + q.z = -(d.y * q.y + d.x * q.x) / d.z; + } + + startvec = q; + q *= solid.Radius / q.Length(); + + // generate a rotation matrix to rotate q around d + IfcMatrix4 rot; + IfcMatrix4::Rotation(deltaAngle,d,rot); + + for (unsigned int seg = 0; seg < cnt_segments; ++seg, q *= rot ) { + points.push_back(q + current); + } + + previous = current; + current = next; + } + + // make quads + for(size_t i = 0; i < samples - 1; ++i) { + + for (unsigned int seg = 0; seg < cnt_segments - 1; ++seg) { + + result.verts.push_back(points[ i * cnt_segments + seg]); + result.verts.push_back(points[ i * cnt_segments + seg + 1]); + result.verts.push_back(points[ (i+1) * cnt_segments + seg + 1]); + result.verts.push_back(points[ (i+1) * cnt_segments + seg]); + + result.vertcnt.push_back(4); + } + } + + IFCImporter::LogDebug("generate mesh procedurally by sweeping a disk along a curve (IfcSweptDiskSolid)"); +} + // ------------------------------------------------------------------------------------------------ IfcMatrix3 DerivePlaneCoordinateSpace(const TempMesh& curmesh) { @@ -1723,6 +1825,9 @@ bool ProcessGeometricItem(const IfcRepresentationItem& geo, std::vector()) { ProcessSweptAreaSolid(*swept,meshtmp,conv); } + else if(const IfcSweptDiskSolid* disk = geo.ToPtr()) { + ProcessSweptDiskSolid(*disk,meshtmp,conv); + } else if(const IfcManifoldSolidBrep* brep = geo.ToPtr()) { ProcessConnectedFaceSet(brep->Outer,meshtmp,conv); } diff --git a/code/IFCReaderGen.cpp b/code/IFCReaderGen.cpp index 4f9f4903b..fd3181331 100644 --- a/code/IFCReaderGen.cpp +++ b/code/IFCReaderGen.cpp @@ -1,8 +1,8 @@ /* -Open Asset Import Library (assimp) +Open Asset Import Library (ASSIMP) ---------------------------------------------------------------------- -Copyright (c) 2006-2012, assimp team +Copyright (c) 2006-2010, ASSIMP Development Team All rights reserved. Redistribution and use of this software in source and binary forms, @@ -18,10 +18,10 @@ following conditions are met: following disclaimer in the documentation and/or other materials provided with the distribution. -* Neither the name of the assimp team, nor the names of its +* Neither the name of the ASSIMP team, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior - written permission of the assimp team. + written permission of the ASSIMP Development Team. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -96,7 +96,6 @@ namespace { , SchemaEntry("ifcobjecttypeenum",NULL ) , SchemaEntry("ifcthermalloadtypeenum",NULL ) , SchemaEntry("ifcionconcentrationmeasure",NULL ) -, SchemaEntry("ifcobjectreferenceselect",NULL ) , SchemaEntry("ifcclassificationnotationselect",NULL ) , SchemaEntry("ifcbsplinecurveform",NULL ) , SchemaEntry("ifcelementcompositionenum",NULL ) @@ -158,6 +157,7 @@ namespace { , SchemaEntry("ifcidentifier",NULL ) , SchemaEntry("ifcradioactivitymeasure",NULL ) , SchemaEntry("ifcsymbolstyleselect",NULL ) +, SchemaEntry("ifcobjectreferenceselect",NULL ) , SchemaEntry("ifcrooftypeenum",NULL ) , SchemaEntry("ifcreal",NULL ) , SchemaEntry("ifcroleenum",NULL ) @@ -168,6 +168,7 @@ namespace { , SchemaEntry("ifcfiltertypeenum",NULL ) , SchemaEntry("ifctransformertypeenum",NULL ) , SchemaEntry("ifcsurfaceside",NULL ) +, SchemaEntry("ifcspaceheatertypeenum",NULL ) , SchemaEntry("ifcthermaltransmittancemeasure",NULL ) , SchemaEntry("ifctubebundletypeenum",NULL ) , SchemaEntry("ifclightfixturetypeenum",NULL ) @@ -239,7 +240,6 @@ namespace { , SchemaEntry("ifcvolumemeasure",NULL ) , SchemaEntry("ifcbeamtypeenum",NULL ) , SchemaEntry("ifcstateenum",NULL ) -, SchemaEntry("ifcspaceheatertypeenum",NULL ) , SchemaEntry("ifcsectiontypeenum",NULL ) , SchemaEntry("ifcfootingtypeenum",NULL ) , SchemaEntry("ifcmonetarymeasure",NULL ) @@ -379,6 +379,9 @@ namespace { , SchemaEntry("ifcpermeablecoveringoperationenum",NULL ) , SchemaEntry("ifcmagneticfluxdensitymeasure",NULL ) , SchemaEntry("ifcmoisturediffusivitymeasure",NULL ) +, SchemaEntry("ifcprofiledef",&STEP::ObjectHelper::Construct ) +, SchemaEntry("ifcparameterizedprofiledef",&STEP::ObjectHelper::Construct ) +, SchemaEntry("ifczshapeprofiledef",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcroot",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcobjectdefinition",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifctypeobject",&STEP::ObjectHelper::Construct ) @@ -463,7 +466,6 @@ namespace { , SchemaEntry("ifcpredefineditem",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcpredefinedcolour",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcdraughtingpredefinedcolour",&STEP::ObjectHelper::Construct ) -, SchemaEntry("ifcprofiledef",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcarbitraryclosedprofiledef",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifccurve",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcconic",&STEP::ObjectHelper::Construct ) @@ -550,6 +552,7 @@ namespace { , SchemaEntry("ifcaxis1placement",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifclightintensitydistribution",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcpredefinedsymbol",&STEP::ObjectHelper::Construct ) +, SchemaEntry("ifccolourspecification",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcstructuralpointaction",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcspatialstructureelement",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcspace",&STEP::ObjectHelper::Construct ) @@ -583,7 +586,6 @@ namespace { , SchemaEntry("ifcvertex",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcvertexpoint",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcflowinstrumenttype",&STEP::ObjectHelper::Construct ) -, SchemaEntry("ifcparameterizedprofiledef",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcushapeprofiledef",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcramp",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcfillareastyle",&STEP::ObjectHelper::Construct ) @@ -869,7 +871,6 @@ namespace { , SchemaEntry("ifcrelaggregates",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcboilertype",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcrelprojectselement",&STEP::ObjectHelper::Construct ) -, SchemaEntry("ifccolourspecification",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifccolourrgb",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcrelconnectsstructuralactivity",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcdoorstyle",&STEP::ObjectHelper::Construct ) @@ -881,7 +882,6 @@ namespace { , SchemaEntry("ifcsensortype",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcairterminalboxtype",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcannotationsurfaceoccurrence",&STEP::ObjectHelper::Construct ) -, SchemaEntry("ifczshapeprofiledef",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcclassificationnotation",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifcrationalbeziercurve",&STEP::ObjectHelper::Construct ) , SchemaEntry("ifccartesiantransformationoperator2d",&STEP::ObjectHelper::Construct ) @@ -1052,6 +1052,44 @@ template <> size_t GenericFill(const STEP::DB& db, const LIST& p +// ----------------------------------------------------------------------------------------------------------- +template <> size_t GenericFill(const DB& db, const LIST& params, IfcProfileDef* in) +{ + size_t base = 0; + if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcProfileDef"); } do { // convert the 'ProfileType' argument + boost::shared_ptr arg = params[base++]; + if (dynamic_cast(&*arg)) { in->ObjectHelper::aux_is_derived[0]=true; break; } + try { GenericConvert( in->ProfileType, arg, db ); break; } + catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcProfileDef to be a `IfcProfileTypeEnum`")); } + } while(0); + do { // convert the 'ProfileName' argument + boost::shared_ptr arg = params[base++]; + if (dynamic_cast(&*arg)) { in->ObjectHelper::aux_is_derived[1]=true; break; } + if (dynamic_cast(&*arg)) break; + try { GenericConvert( in->ProfileName, arg, db ); break; } + catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcProfileDef to be a `IfcLabel`")); } + } while(0); + return base; +} +// ----------------------------------------------------------------------------------------------------------- +template <> size_t GenericFill(const DB& db, const LIST& params, IfcParameterizedProfileDef* in) +{ + size_t base = GenericFill(db,params,static_cast(in)); + if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to IfcParameterizedProfileDef"); } do { // convert the 'Position' argument + boost::shared_ptr arg = params[base++]; + if (dynamic_cast(&*arg)) { in->ObjectHelper::aux_is_derived[0]=true; break; } + try { GenericConvert( in->Position, arg, db ); break; } + catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcParameterizedProfileDef to be a `IfcAxis2Placement2D`")); } + } while(0); + return base; +} +// ----------------------------------------------------------------------------------------------------------- +template <> size_t GenericFill(const DB& db, const LIST& params, IfcZShapeProfileDef* in) +{ + size_t base = GenericFill(db,params,static_cast(in)); +// this data structure is not used yet, so there is no code generated to fill its members + return base; +} // ----------------------------------------------------------------------------------------------------------- template <> size_t GenericFill(const DB& db, const LIST& params, IfcRoot* in) { @@ -1519,25 +1557,6 @@ template <> size_t GenericFill(const DB& db, const LIST& params, I return base; } // ----------------------------------------------------------------------------------------------------------- -template <> size_t GenericFill(const DB& db, const LIST& params, IfcProfileDef* in) -{ - size_t base = 0; - if (params.GetSize() < 2) { throw STEP::TypeError("expected 2 arguments to IfcProfileDef"); } do { // convert the 'ProfileType' argument - boost::shared_ptr arg = params[base++]; - if (dynamic_cast(&*arg)) { in->ObjectHelper::aux_is_derived[0]=true; break; } - try { GenericConvert( in->ProfileType, arg, db ); break; } - catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcProfileDef to be a `IfcProfileTypeEnum`")); } - } while(0); - do { // convert the 'ProfileName' argument - boost::shared_ptr arg = params[base++]; - if (dynamic_cast(&*arg)) { in->ObjectHelper::aux_is_derived[1]=true; break; } - if (dynamic_cast(&*arg)) break; - try { GenericConvert( in->ProfileName, arg, db ); break; } - catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcProfileDef to be a `IfcLabel`")); } - } while(0); - return base; -} -// ----------------------------------------------------------------------------------------------------------- template <> size_t GenericFill(const DB& db, const LIST& params, IfcArbitraryClosedProfileDef* in) { size_t base = GenericFill(db,params,static_cast(in)); @@ -2068,6 +2087,19 @@ template <> size_t GenericFill(const DB& db, const LIST& para return base; } // ----------------------------------------------------------------------------------------------------------- +template <> size_t GenericFill(const DB& db, const LIST& params, IfcColourSpecification* in) +{ + size_t base = 0; + if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcColourSpecification"); } do { // convert the 'Name' argument + boost::shared_ptr arg = params[base++]; + if (dynamic_cast(&*arg)) { in->ObjectHelper::aux_is_derived[0]=true; break; } + if (dynamic_cast(&*arg)) break; + try { GenericConvert( in->Name, arg, db ); break; } + catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcColourSpecification to be a `IfcLabel`")); } + } while(0); + return base; +} +// ----------------------------------------------------------------------------------------------------------- template <> size_t GenericFill(const DB& db, const LIST& params, IfcStructuralPointAction* in) { size_t base = GenericFill(db,params,static_cast(in)); @@ -2236,18 +2268,6 @@ template <> size_t GenericFill(const DB& db, const LIST& return base; } // ----------------------------------------------------------------------------------------------------------- -template <> size_t GenericFill(const DB& db, const LIST& params, IfcParameterizedProfileDef* in) -{ - size_t base = GenericFill(db,params,static_cast(in)); - if (params.GetSize() < 3) { throw STEP::TypeError("expected 3 arguments to IfcParameterizedProfileDef"); } do { // convert the 'Position' argument - boost::shared_ptr arg = params[base++]; - if (dynamic_cast(&*arg)) { in->ObjectHelper::aux_is_derived[0]=true; break; } - try { GenericConvert( in->Position, arg, db ); break; } - catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcParameterizedProfileDef to be a `IfcAxis2Placement2D`")); } - } while(0); - return base; -} -// ----------------------------------------------------------------------------------------------------------- template <> size_t GenericFill(const DB& db, const LIST& params, IfcUShapeProfileDef* in) { size_t base = GenericFill(db,params,static_cast(in)); @@ -3375,7 +3395,32 @@ template <> size_t GenericFill(const DB& db, const LIST& template <> size_t GenericFill(const DB& db, const LIST& params, IfcSweptDiskSolid* in) { size_t base = GenericFill(db,params,static_cast(in)); -// this data structure is not used yet, so there is no code generated to fill its members + if (params.GetSize() < 5) { throw STEP::TypeError("expected 5 arguments to IfcSweptDiskSolid"); } do { // convert the 'Directrix' argument + boost::shared_ptr arg = params[base++]; + try { GenericConvert( in->Directrix, arg, db ); break; } + catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcSweptDiskSolid to be a `IfcCurve`")); } + } while(0); + do { // convert the 'Radius' argument + boost::shared_ptr arg = params[base++]; + try { GenericConvert( in->Radius, arg, db ); break; } + catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 1 to IfcSweptDiskSolid to be a `IfcPositiveLengthMeasure`")); } + } while(0); + do { // convert the 'InnerRadius' argument + boost::shared_ptr arg = params[base++]; + if (dynamic_cast(&*arg)) break; + try { GenericConvert( in->InnerRadius, arg, db ); break; } + catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 2 to IfcSweptDiskSolid to be a `IfcPositiveLengthMeasure`")); } + } while(0); + do { // convert the 'StartParam' argument + boost::shared_ptr arg = params[base++]; + try { GenericConvert( in->StartParam, arg, db ); break; } + catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 3 to IfcSweptDiskSolid to be a `IfcParameterValue`")); } + } while(0); + do { // convert the 'EndParam' argument + boost::shared_ptr arg = params[base++]; + try { GenericConvert( in->EndParam, arg, db ); break; } + catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 4 to IfcSweptDiskSolid to be a `IfcParameterValue`")); } + } while(0); return base; } // ----------------------------------------------------------------------------------------------------------- @@ -3980,19 +4025,6 @@ template <> size_t GenericFill(const DB& db, const LIST& params, return base; } // ----------------------------------------------------------------------------------------------------------- -template <> size_t GenericFill(const DB& db, const LIST& params, IfcColourSpecification* in) -{ - size_t base = 0; - if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to IfcColourSpecification"); } do { // convert the 'Name' argument - boost::shared_ptr arg = params[base++]; - if (dynamic_cast(&*arg)) { in->ObjectHelper::aux_is_derived[0]=true; break; } - if (dynamic_cast(&*arg)) break; - try { GenericConvert( in->Name, arg, db ); break; } - catch (const TypeError& t) { throw TypeError(t.what() + std::string(" - expected argument 0 to IfcColourSpecification to be a `IfcLabel`")); } - } while(0); - return base; -} -// ----------------------------------------------------------------------------------------------------------- template <> size_t GenericFill(const DB& db, const LIST& params, IfcColourRgb* in) { size_t base = GenericFill(db,params,static_cast(in)); @@ -4063,13 +4095,6 @@ template <> size_t GenericFill(const DB& db, con return base; } // ----------------------------------------------------------------------------------------------------------- -template <> size_t GenericFill(const DB& db, const LIST& params, IfcZShapeProfileDef* in) -{ - size_t base = GenericFill(db,params,static_cast(in)); -// this data structure is not used yet, so there is no code generated to fill its members - return base; -} -// ----------------------------------------------------------------------------------------------------------- template <> size_t GenericFill(const DB& db, const LIST& params, IfcRationalBezierCurve* in) { size_t base = GenericFill(db,params,static_cast(in)); diff --git a/code/IFCReaderGen.h b/code/IFCReaderGen.h index 07dd183f7..93ccc27c9 100644 --- a/code/IFCReaderGen.h +++ b/code/IFCReaderGen.h @@ -1,8 +1,8 @@ /* -Open Asset Import Library (assimp) +Open Asset Import Library (ASSIMP) ---------------------------------------------------------------------- -Copyright (c) 2006-2012, assimp team +Copyright (c) 2006-2010, ASSIMP Development Team All rights reserved. Redistribution and use of this software in source and binary forms, @@ -18,10 +18,10 @@ following conditions are met: following disclaimer in the documentation and/or other materials provided with the distribution. -* Neither the name of the assimp team, nor the names of its +* Neither the name of the ASSIMP team, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior - written permission of the assimp team. + written permission of the ASSIMP Development Team. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -149,8 +149,6 @@ namespace IFC { typedef ENUMERATION IfcThermalLoadTypeEnum; // C++ wrapper type for IfcIonConcentrationMeasure typedef REAL IfcIonConcentrationMeasure; - // C++ wrapper type for IfcObjectReferenceSelect - typedef SELECT IfcObjectReferenceSelect; // C++ wrapper type for IfcClassificationNotationSelect typedef SELECT IfcClassificationNotationSelect; // C++ wrapper type for IfcBSplineCurveForm @@ -273,6 +271,8 @@ namespace IFC { typedef REAL IfcRadioActivityMeasure; // C++ wrapper type for IfcSymbolStyleSelect typedef SELECT IfcSymbolStyleSelect; + // C++ wrapper type for IfcObjectReferenceSelect + typedef SELECT IfcObjectReferenceSelect; // C++ wrapper type for IfcRoofTypeEnum typedef ENUMERATION IfcRoofTypeEnum; // C++ wrapper type for IfcReal @@ -293,6 +293,8 @@ namespace IFC { typedef ENUMERATION IfcTransformerTypeEnum; // C++ wrapper type for IfcSurfaceSide typedef ENUMERATION IfcSurfaceSide; + // C++ wrapper type for IfcSpaceHeaterTypeEnum + typedef ENUMERATION IfcSpaceHeaterTypeEnum; // C++ wrapper type for IfcThermalTransmittanceMeasure typedef REAL IfcThermalTransmittanceMeasure; // C++ wrapper type for IfcTubeBundleTypeEnum @@ -433,8 +435,6 @@ namespace IFC { typedef ENUMERATION IfcBeamTypeEnum; // C++ wrapper type for IfcStateEnum typedef ENUMERATION IfcStateEnum; - // C++ wrapper type for IfcSpaceHeaterTypeEnum - typedef ENUMERATION IfcSpaceHeaterTypeEnum; // C++ wrapper type for IfcSectionTypeEnum typedef ENUMERATION IfcSectionTypeEnum; // C++ wrapper type for IfcFootingTypeEnum @@ -719,6 +719,9 @@ namespace IFC { // IFC Entities // ****************************************************************************** + struct IfcProfileDef; + struct IfcParameterizedProfileDef; + struct IfcZShapeProfileDef; struct IfcRoot; struct IfcObjectDefinition; struct IfcTypeObject; @@ -803,7 +806,6 @@ namespace IFC { typedef NotImplemented IfcPreDefinedItem; // (not currently used by Assimp) typedef NotImplemented IfcPreDefinedColour; // (not currently used by Assimp) typedef NotImplemented IfcDraughtingPreDefinedColour; // (not currently used by Assimp) - struct IfcProfileDef; struct IfcArbitraryClosedProfileDef; struct IfcCurve; struct IfcConic; @@ -890,6 +892,7 @@ namespace IFC { struct IfcAxis1Placement; typedef NotImplemented IfcLightIntensityDistribution; // (not currently used by Assimp) typedef NotImplemented IfcPreDefinedSymbol; // (not currently used by Assimp) + struct IfcColourSpecification; struct IfcStructuralPointAction; struct IfcSpatialStructureElement; struct IfcSpace; @@ -923,7 +926,6 @@ namespace IFC { struct IfcVertex; struct IfcVertexPoint; struct IfcFlowInstrumentType; - struct IfcParameterizedProfileDef; struct IfcUShapeProfileDef; struct IfcRamp; typedef NotImplemented IfcFillAreaStyle; // (not currently used by Assimp) @@ -1209,7 +1211,6 @@ namespace IFC { struct IfcRelAggregates; struct IfcBoilerType; typedef NotImplemented IfcRelProjectsElement; // (not currently used by Assimp) - struct IfcColourSpecification; struct IfcColourRgb; typedef NotImplemented IfcRelConnectsStructuralActivity; // (not currently used by Assimp) struct IfcDoorStyle; @@ -1221,7 +1222,6 @@ namespace IFC { struct IfcSensorType; struct IfcAirTerminalBoxType; struct IfcAnnotationSurfaceOccurrence; - struct IfcZShapeProfileDef; typedef NotImplemented IfcClassificationNotation; // (not currently used by Assimp) struct IfcRationalBezierCurve; struct IfcCartesianTransformationOperator2D; @@ -1375,6 +1375,27 @@ namespace IFC { + // C++ wrapper for IfcProfileDef + struct IfcProfileDef : ObjectHelper { IfcProfileDef() : Object("IfcProfileDef") {} + IfcProfileTypeEnum::Out ProfileType; + Maybe< IfcLabel::Out > ProfileName; + }; + + // C++ wrapper for IfcParameterizedProfileDef + struct IfcParameterizedProfileDef : IfcProfileDef, ObjectHelper { IfcParameterizedProfileDef() : Object("IfcParameterizedProfileDef") {} + Lazy< IfcAxis2Placement2D > Position; + }; + + // C++ wrapper for IfcZShapeProfileDef + struct IfcZShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper { IfcZShapeProfileDef() : Object("IfcZShapeProfileDef") {} + IfcPositiveLengthMeasure::Out Depth; + IfcPositiveLengthMeasure::Out FlangeWidth; + IfcPositiveLengthMeasure::Out WebThickness; + IfcPositiveLengthMeasure::Out FlangeThickness; + Maybe< IfcPositiveLengthMeasure::Out > FilletRadius; + Maybe< IfcPositiveLengthMeasure::Out > EdgeRadius; + }; + // C++ wrapper for IfcRoot struct IfcRoot : ObjectHelper { IfcRoot() : Object("IfcRoot") {} IfcGloballyUniqueId::Out GlobalId; @@ -1654,12 +1675,6 @@ namespace IFC { Lazy< IfcCartesianPoint > Location; }; - // C++ wrapper for IfcProfileDef - struct IfcProfileDef : ObjectHelper { IfcProfileDef() : Object("IfcProfileDef") {} - IfcProfileTypeEnum::Out ProfileType; - Maybe< IfcLabel::Out > ProfileName; - }; - // C++ wrapper for IfcArbitraryClosedProfileDef struct IfcArbitraryClosedProfileDef : IfcProfileDef, ObjectHelper { IfcArbitraryClosedProfileDef() : Object("IfcArbitraryClosedProfileDef") {} Lazy< IfcCurve > OuterCurve; @@ -1997,6 +2012,11 @@ namespace IFC { Maybe< Lazy< IfcDirection > > Axis; }; + // C++ wrapper for IfcColourSpecification + struct IfcColourSpecification : ObjectHelper { IfcColourSpecification() : Object("IfcColourSpecification") {} + Maybe< IfcLabel::Out > Name; + }; + // C++ wrapper for IfcStructuralPointAction struct IfcStructuralPointAction : IfcStructuralAction, ObjectHelper { IfcStructuralPointAction() : Object("IfcStructuralPointAction") {} @@ -2103,11 +2123,6 @@ namespace IFC { IfcFlowInstrumentTypeEnum::Out PredefinedType; }; - // C++ wrapper for IfcParameterizedProfileDef - struct IfcParameterizedProfileDef : IfcProfileDef, ObjectHelper { IfcParameterizedProfileDef() : Object("IfcParameterizedProfileDef") {} - Lazy< IfcAxis2Placement2D > Position; - }; - // C++ wrapper for IfcUShapeProfileDef struct IfcUShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper { IfcUShapeProfileDef() : Object("IfcUShapeProfileDef") {} IfcPositiveLengthMeasure::Out Depth; @@ -3215,11 +3230,6 @@ namespace IFC { IfcBoilerTypeEnum::Out PredefinedType; }; - // C++ wrapper for IfcColourSpecification - struct IfcColourSpecification : ObjectHelper { IfcColourSpecification() : Object("IfcColourSpecification") {} - Maybe< IfcLabel::Out > Name; - }; - // C++ wrapper for IfcColourRgb struct IfcColourRgb : IfcColourSpecification, ObjectHelper { IfcColourRgb() : Object("IfcColourRgb") {} IfcNormalisedRatioMeasure::Out Red; @@ -3270,16 +3280,6 @@ namespace IFC { }; - // C++ wrapper for IfcZShapeProfileDef - struct IfcZShapeProfileDef : IfcParameterizedProfileDef, ObjectHelper { IfcZShapeProfileDef() : Object("IfcZShapeProfileDef") {} - IfcPositiveLengthMeasure::Out Depth; - IfcPositiveLengthMeasure::Out FlangeWidth; - IfcPositiveLengthMeasure::Out WebThickness; - IfcPositiveLengthMeasure::Out FlangeThickness; - Maybe< IfcPositiveLengthMeasure::Out > FilletRadius; - Maybe< IfcPositiveLengthMeasure::Out > EdgeRadius; - }; - // C++ wrapper for IfcRationalBezierCurve struct IfcRationalBezierCurve : IfcBezierCurve, ObjectHelper { IfcRationalBezierCurve() : Object("IfcRationalBezierCurve") {} ListOf< REAL, 2, 0 >::Out WeightsData; @@ -3829,6 +3829,9 @@ namespace STEP { #define DECL_CONV_STUB(type) template <> size_t GenericFill(const STEP::DB& db, const EXPRESS::LIST& params, IFC::type* in) + DECL_CONV_STUB(IfcProfileDef); + DECL_CONV_STUB(IfcParameterizedProfileDef); + DECL_CONV_STUB(IfcZShapeProfileDef); DECL_CONV_STUB(IfcRoot); DECL_CONV_STUB(IfcObjectDefinition); DECL_CONV_STUB(IfcTypeObject); @@ -3880,7 +3883,6 @@ namespace STEP { DECL_CONV_STUB(IfcUnitaryEquipmentType); DECL_CONV_STUB(IfcPort); DECL_CONV_STUB(IfcPlacement); - DECL_CONV_STUB(IfcProfileDef); DECL_CONV_STUB(IfcArbitraryClosedProfileDef); DECL_CONV_STUB(IfcCurve); DECL_CONV_STUB(IfcConic); @@ -3943,6 +3945,7 @@ namespace STEP { DECL_CONV_STUB(IfcDimensionCurve); DECL_CONV_STUB(IfcBoundedCurve); DECL_CONV_STUB(IfcAxis1Placement); + DECL_CONV_STUB(IfcColourSpecification); DECL_CONV_STUB(IfcStructuralPointAction); DECL_CONV_STUB(IfcSpatialStructureElement); DECL_CONV_STUB(IfcSpace); @@ -3963,7 +3966,6 @@ namespace STEP { DECL_CONV_STUB(IfcVertex); DECL_CONV_STUB(IfcVertexPoint); DECL_CONV_STUB(IfcFlowInstrumentType); - DECL_CONV_STUB(IfcParameterizedProfileDef); DECL_CONV_STUB(IfcUShapeProfileDef); DECL_CONV_STUB(IfcRamp); DECL_CONV_STUB(IfcCompositeCurve); @@ -4150,7 +4152,6 @@ namespace STEP { DECL_CONV_STUB(IfcConstructionMaterialResource); DECL_CONV_STUB(IfcRelAggregates); DECL_CONV_STUB(IfcBoilerType); - DECL_CONV_STUB(IfcColourSpecification); DECL_CONV_STUB(IfcColourRgb); DECL_CONV_STUB(IfcDoorStyle); DECL_CONV_STUB(IfcDuctSilencerType); @@ -4159,7 +4160,6 @@ namespace STEP { DECL_CONV_STUB(IfcSensorType); DECL_CONV_STUB(IfcAirTerminalBoxType); DECL_CONV_STUB(IfcAnnotationSurfaceOccurrence); - DECL_CONV_STUB(IfcZShapeProfileDef); DECL_CONV_STUB(IfcRationalBezierCurve); DECL_CONV_STUB(IfcCartesianTransformationOperator2D); DECL_CONV_STUB(IfcCartesianTransformationOperator2DnonUniform); diff --git a/scripts/IFCImporter/entitylist.txt b/scripts/IFCImporter/entitylist.txt index a83e3c3df..95cf46c91 100644 --- a/scripts/IFCImporter/entitylist.txt +++ b/scripts/IFCImporter/entitylist.txt @@ -94,6 +94,7 @@ IfcSurfaceStyleRendering IfcSurfaceStyleShading IfcSurfaceStyleWithTextures IfcSweptAreaSolid +IfcSweptDiskSolid IfcTopologicalRepresentationItem IfcTrimmedCurve IfcUnit