#1158 Fixed position of well path fractures after scale change

This commit is contained in:
Magne Sjaastad
2017-02-01 14:54:02 +01:00
parent d8c2eb0357
commit 49e0709dc6
2 changed files with 20 additions and 5 deletions

View File

@@ -270,6 +270,12 @@ void RivWellPathPartMgr::appendStaticGeometryPartsToModel(cvf::ModelBasicList* m
{
// The pipe geometry needs to be rebuilt on scale change to keep the pipes round
buildWellPathParts(displayModelOffset, characteristicCellSize, wellPathClipBoundingBox);
for (RimWellPathFracture* f : m_rimWellPath->fractureCollection()->fractures())
{
// Always recompute geometry, as the well part can be displayed in more than one view
f->fracturePartManager()->clearGeometryCache();
}
}
if (m_pipeBranchData.m_surfacePart.notNull())
@@ -302,6 +308,14 @@ void RivWellPathPartMgr::setScaleTransform( cvf::Transform * scaleTransform )
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivWellPathPartMgr::scheduleGeometryRegen()
{
m_needsTransformUpdate = true;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -50,16 +50,19 @@ public:
void setScaleTransform(cvf::Transform * scaleTransform);
void scheduleGeometryRegen() { m_needsTransformUpdate = true; }//printf("R"); }
void scheduleGeometryRegen();
void appendStaticGeometryPartsToModel(cvf::ModelBasicList* model, cvf::Vec3d displayModelOffset,
double characteristicCellSize, cvf::BoundingBox wellPathClipBoundingBox, caf::DisplayCoordTransform* displayCoordTransform);
void appendStaticGeometryPartsToModel( cvf::ModelBasicList* model, cvf::Vec3d displayModelOffset,
double characteristicCellSize, cvf::BoundingBox wellPathClipBoundingBox,
caf::DisplayCoordTransform* displayCoordTransform);
size_t segmentIndexFromTriangleIndex(size_t triangleIndex);
private:
void appendFracturePartsToModel(cvf::ModelBasicList* model, caf::DisplayCoordTransform* displayCoordTransform);
void buildWellPathParts(cvf::Vec3d displayModelOffset, double characteristicCellSize, cvf::BoundingBox wellPathClipBoundingBox);
void clearAllBranchData();
private:
caf::PdmPointer<RimWellPath> m_rimWellPath;
@@ -67,8 +70,6 @@ private:
cvf::ref<cvf::Transform> m_scaleTransform;
bool m_needsTransformUpdate;
void buildWellPathParts(cvf::Vec3d displayModelOffset, double characteristicCellSize, cvf::BoundingBox wellPathClipBoundingBox);
void clearAllBranchData();
struct RivPipeBranchData
{
cvf::ref<RivPipeGeometryGenerator> m_pipeGeomGenerator;