From fe88fb9ccbbc3ca79fa6883523364e79551df619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Thu, 14 Nov 2019 13:48:54 +0100 Subject: [PATCH] #5037 Fixed crash in well path target points geometry generation --- .../RicPointTangentManipulatorPartMgr.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ApplicationCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulatorPartMgr.cpp b/ApplicationCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulatorPartMgr.cpp index ea009c5214..836376352d 100644 --- a/ApplicationCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulatorPartMgr.cpp +++ b/ApplicationCode/Commands/WellPathCommands/PointTangentManipulator/RicPointTangentManipulatorPartMgr.cpp @@ -337,21 +337,21 @@ cvf::ref RicPointTangentManipulatorPartMgr::createVerticalAxis float s = 0.5 * m_handleSize; Vec3f origin( m_origin ); - geomBuilder->transformVertexRange( 0, geomBuilder->vertexCount(), cvf::Mat4f::fromScaling( {s, s, s} ) ); - geomBuilder->transformVertexRange( 0, geomBuilder->vertexCount(), cvf::Mat4f::fromTranslation( origin ) ); + geomBuilder->transformVertexRange( 0, geomBuilder->vertexCount() - 1, cvf::Mat4f::fromScaling( {s, s, s} ) ); + geomBuilder->transformVertexRange( 0, geomBuilder->vertexCount() - 1, cvf::Mat4f::fromTranslation( origin ) ); unsigned vxArraySizeFirstCylinder = geomBuilder->vertexCount(); cvf::GeometryUtils::createObliqueCylinder( 0.05f, 0.3f, 1.0f, 0.0f, 0.0, 12, true, true, true, 1, geomBuilder.p() ); geomBuilder->transformVertexRange( vxArraySizeFirstCylinder, - geomBuilder->vertexCount(), + geomBuilder->vertexCount() - 1, cvf::Mat4f::fromTranslation( {0.0f, 0.0f, -1.0f} ) ); geomBuilder->transformVertexRange( vxArraySizeFirstCylinder, - geomBuilder->vertexCount(), + geomBuilder->vertexCount() - 1, cvf::Mat4f::fromScaling( {s, s, s} ) ); geomBuilder->transformVertexRange( vxArraySizeFirstCylinder, - geomBuilder->vertexCount(), + geomBuilder->vertexCount() - 1, cvf::Mat4f::fromTranslation( origin ) ); cvf::ref vertexArray = geomBuilder->vertices();