2018-06-18 09:02:28 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2018-10-10 01:22:36 -05:00
|
|
|
// Copyright (C) 2018 - Equinor
|
2018-06-18 09:02:28 -05:00
|
|
|
//
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
|
|
|
|
#include "cvfBase.h"
|
|
|
|
#include "cvfVector3.h"
|
|
|
|
#include "cafAppEnum.h"
|
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmCoreVec3d.h"
|
2018-09-28 07:06:56 -05:00
|
|
|
#include "RiaLineArcWellPathCalculator.h"
|
2018-06-18 09:02:28 -05:00
|
|
|
|
|
|
|
class RimWellPathTarget : public caf::PdmObject
|
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
public:
|
|
|
|
RimWellPathTarget();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RimWellPathTarget() override;
|
2018-06-18 09:02:28 -05:00
|
|
|
|
2018-07-31 01:44:37 -05:00
|
|
|
bool isEnabled() const;
|
|
|
|
|
2018-07-02 07:51:17 -05:00
|
|
|
void setAsPointTargetXYD(const cvf::Vec3d& point);
|
2018-09-11 01:36:14 -05:00
|
|
|
void setAsPointXYZAndTangentTarget(const cvf::Vec3d& point, double azimuth, double inclination);
|
2018-07-04 09:49:04 -05:00
|
|
|
void setDerivedTangent(double azimuth, double inclination);
|
2018-06-18 09:02:28 -05:00
|
|
|
|
2018-09-28 07:06:56 -05:00
|
|
|
RiaLineArcWellPathCalculator::WellTarget wellTargetData();
|
|
|
|
|
2018-06-18 09:02:28 -05:00
|
|
|
enum TargetTypeEnum { POINT_AND_TANGENT, POINT };
|
2018-07-31 01:44:37 -05:00
|
|
|
TargetTypeEnum targetType() const;
|
|
|
|
cvf::Vec3d targetPointXYZ() const;
|
|
|
|
double azimuth() const;
|
|
|
|
double inclination() const;
|
|
|
|
cvf::Vec3d tangent() const;
|
2018-08-14 04:25:08 -05:00
|
|
|
double radius1() const;
|
|
|
|
double radius2() const;
|
2018-09-24 08:31:58 -05:00
|
|
|
void flagRadius1AsIncorrect(bool isIncorrect, double actualRadius);
|
|
|
|
void flagRadius2AsIncorrect(bool isIncorrect, double actualRadius);
|
2018-06-18 09:02:28 -05:00
|
|
|
|
|
|
|
private:
|
2018-10-18 12:45:57 -05:00
|
|
|
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
|
|
|
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
|
|
|
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
2018-07-02 07:51:17 -05:00
|
|
|
|
2018-07-31 01:44:37 -05:00
|
|
|
private:
|
2018-08-16 08:38:34 -05:00
|
|
|
friend class RicWellTarget3dEditor;
|
2018-09-12 06:18:48 -05:00
|
|
|
void enableFullUpdate(bool enable);
|
|
|
|
bool m_isFullUpdateEnabled;
|
2018-06-27 10:22:08 -05:00
|
|
|
caf::PdmField<bool> m_isEnabled;
|
2018-06-18 09:02:28 -05:00
|
|
|
caf::PdmField<caf::AppEnum<TargetTypeEnum> > m_targetType;
|
2018-06-27 10:22:08 -05:00
|
|
|
caf::PdmField<cvf::Vec3d> m_targetPoint;
|
|
|
|
caf::PdmField<double> m_azimuth;
|
|
|
|
caf::PdmField<double> m_inclination;
|
2018-08-14 04:25:08 -05:00
|
|
|
caf::PdmField<double> m_dogleg1;
|
|
|
|
caf::PdmField<double> m_dogleg2;
|
2018-10-02 08:55:28 -05:00
|
|
|
caf::PdmField<bool> m_hasTangentConstraintUiField;
|
2018-08-14 04:25:08 -05:00
|
|
|
|
2018-06-18 09:02:28 -05:00
|
|
|
};
|
|
|
|
|