#3180 Create multiple fractures command. Set correct defaults

This commit is contained in:
Bjørn Erik Jensen
2018-08-23 10:18:43 +02:00
parent a73fbff5bb
commit 3e561c312b
3 changed files with 38 additions and 16 deletions

View File

@@ -61,6 +61,21 @@ void RicCreateMultipleFracturesFeature::replaceFractures()
slotDeleteAndAppendFractures();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::pair<cvf::Vec3st, cvf::Vec3st> RicCreateMultipleFracturesFeature::ijkRangeForGrid(RimEclipseCase* gridCase) const
{
cvf::Vec3st minIJK;
cvf::Vec3st maxIJK;
if (gridCase && gridCase->eclipseCaseData())
{
gridCase->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL)->IJKBoundingBox(minIJK, maxIJK);
return std::make_pair(minIJK, maxIJK);
}
return std::make_pair(cvf::Vec3st(), cvf::Vec3st());
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -171,15 +186,9 @@ void RicCreateMultipleFracturesFeature::onActionTriggered(bool isChecked)
{
firstSourceCase = proj->eclipseCases().front();
cvf::Vec3st minIJK;
cvf::Vec3st maxIJK;
if (firstSourceCase && firstSourceCase->eclipseCaseData())
{
firstSourceCase->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL)->IJKBoundingBox(minIJK, maxIJK);
}
topK = static_cast<int>(minIJK.z());
baseK = static_cast<int>(maxIJK.z());
auto ijkRange = ijkRangeForGrid(firstSourceCase);
topK = static_cast<int>(ijkRange.first.z());
baseK = static_cast<int>(ijkRange.second.z());
double minimumDistanceFromTip = 100.0;
int maxFractureCount = 100;

View File

@@ -20,9 +20,12 @@
#include "cafCmdFeature.h"
#include "cvfVector3.h"
#include <QPointer>
class RiuCreateMultipleFractionsUi;
class RimEclipseCase;
namespace caf {
class PdmUiPropertyViewDialog;
@@ -41,6 +44,7 @@ public:
void appendFractures();
void replaceFractures();
std::pair<cvf::Vec3st, cvf::Vec3st> ijkRangeForGrid(RimEclipseCase* gridCase) const;
private slots:
void slotDeleteAndAppendFractures();