mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1513 Fishbones : Add 'Fly to Object' for fishbones and perforations
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "cafPdmUiListEditor.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
#include "cvfBoundingBox.h"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
@@ -51,7 +52,6 @@ namespace caf {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -446,6 +446,29 @@ void RimFishbonesMultipleSubs::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTr
|
||||
m_name = QString("Fishbone %1").arg(index);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::BoundingBox RimFishbonesMultipleSubs::boundingBoxInDomainCoords()
|
||||
{
|
||||
cvf::BoundingBox bb;
|
||||
|
||||
for (size_t i = 0; i < m_locationOfSubs().size(); i++)
|
||||
{
|
||||
for (size_t lateralIndex = 0; lateralIndex < m_lateralCountPerSub; lateralIndex++)
|
||||
{
|
||||
std::vector<cvf::Vec3d> coords = coordsForLateral(i, lateralIndex);
|
||||
|
||||
for (auto c : coords)
|
||||
{
|
||||
bb.add(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return bb;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
#include "Rim3dPropertiesInterface.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfVector3.h"
|
||||
@@ -32,7 +33,7 @@ class RigFisbonesGeometry;
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimFishbonesMultipleSubs : public RimCheckableNamedObject
|
||||
class RimFishbonesMultipleSubs : public RimCheckableNamedObject, public Rim3dPropertiesInterface
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
@@ -54,6 +55,7 @@ public:
|
||||
RimFishbonesMultipleSubs();
|
||||
virtual ~RimFishbonesMultipleSubs();
|
||||
|
||||
|
||||
void setMeasuredDepthAndCount(double measuredDepth, double spacing, int subCount);
|
||||
|
||||
std::vector<double> locationOfSubs() const;
|
||||
@@ -70,6 +72,9 @@ public:
|
||||
|
||||
std::vector<cvf::Vec3d> coordsForLateral(size_t subIndex, size_t lateralIndex) const;
|
||||
std::vector<std::pair<cvf::Vec3d, double>> coordsAndMDForLateral(size_t subIndex, size_t lateralIndex) const;
|
||||
|
||||
// Override from Rim3dPropertiesInterface
|
||||
virtual cvf::BoundingBox boundingBoxInDomainCoords() override;
|
||||
|
||||
protected:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
Reference in New Issue
Block a user