diff options
author | Paul Lemire <paul.lemire@kdab.com> | 2014-05-26 10:35:32 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-04 10:09:11 +0200 |
commit | 1cb807d440cc0d434bfd02fd0c699447b788b8ba (patch) | |
tree | f28f64fba6ebb30449c3301a75bba2b233b1f34e /src/3rdparty/assimp/code/IFCProfile.cpp | |
parent | a45b8308ada361872502a678a12f08cff1760c64 (diff) |
Upgrade to Assimp 3.1
https://github.com/assimp/assimp/releases/tag/v3.1
This commit imports assimp 3.1, including CHANGES, CREDITS, LICENSE, README,
Readme.md, revision.h and code, contrib, include directories. contrib/zlib
was excluded.
assimp.pri was also updated.
Uses zlib from system or qt instead of contrib/zlib.
Task-number: QTBUG-39251
Change-Id: Ia0b446dcd9bc867d65897b9e2b157f6544ccaeac
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/3rdparty/assimp/code/IFCProfile.cpp')
-rw-r--r-- | src/3rdparty/assimp/code/IFCProfile.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/3rdparty/assimp/code/IFCProfile.cpp b/src/3rdparty/assimp/code/IFCProfile.cpp index b2ffa943f..48ccd568e 100644 --- a/src/3rdparty/assimp/code/IFCProfile.cpp +++ b/src/3rdparty/assimp/code/IFCProfile.cpp @@ -101,7 +101,7 @@ void ProcessOpenProfile(const IfcArbitraryOpenProfileDef& def, TempMesh& meshout } // ------------------------------------------------------------------------------------------------ -void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh& meshout, ConversionData& /*conv*/) +void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh& meshout, ConversionData& conv) { if(const IfcRectangleProfileDef* const cprofile = def.ToPtr<IfcRectangleProfileDef>()) { const IfcFloat x = cprofile->XDim*0.5f, y = cprofile->YDim*0.5f; @@ -129,6 +129,27 @@ void ProcessParametrizedProfile(const IfcParameterizedProfileDef& def, TempMesh& meshout.vertcnt.push_back(segments); } + else if( const IfcIShapeProfileDef* const ishape = def.ToPtr<IfcIShapeProfileDef>()) { + // construct simplified IBeam shape + const IfcFloat offset = (ishape->OverallWidth - ishape->WebThickness) / 2; + const IfcFloat inner_height = ishape->OverallDepth - ishape->FlangeThickness * 2; + + meshout.verts.reserve(12); + meshout.verts.push_back(IfcVector3(0,0,0)); + meshout.verts.push_back(IfcVector3(0,ishape->FlangeThickness,0)); + meshout.verts.push_back(IfcVector3(offset,ishape->FlangeThickness,0)); + meshout.verts.push_back(IfcVector3(offset,ishape->FlangeThickness + inner_height,0)); + meshout.verts.push_back(IfcVector3(0,ishape->FlangeThickness + inner_height,0)); + meshout.verts.push_back(IfcVector3(0,ishape->OverallDepth,0)); + meshout.verts.push_back(IfcVector3(ishape->OverallWidth,ishape->OverallDepth,0)); + meshout.verts.push_back(IfcVector3(ishape->OverallWidth,ishape->FlangeThickness + inner_height,0)); + meshout.verts.push_back(IfcVector3(offset+ishape->WebThickness,ishape->FlangeThickness + inner_height,0)); + meshout.verts.push_back(IfcVector3(offset+ishape->WebThickness,ishape->FlangeThickness,0)); + meshout.verts.push_back(IfcVector3(ishape->OverallWidth,ishape->FlangeThickness,0)); + meshout.verts.push_back(IfcVector3(ishape->OverallWidth,0,0)); + + meshout.vertcnt.push_back(12); + } else { IFCImporter::LogWarn("skipping unknown IfcParameterizedProfileDef entity, type is " + def.GetClassName()); return; |