mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-27 05:37:21 -05:00
Add Python GRPC interface support for creating and managing custom segment intervals for multi-segment wells. This provides API parity with the existing GUI functionality. Changes: - Add createInterval() method to RimCustomSegmentIntervalCollection - Add GRPC method addCustomSegmentInterval to RimcWellPathCompletionSettings - Add validation to prevent creating intervals with start_md >= end_md - Add Python test test_custom_segment_intervals.py with validation test - Add usage example to modeled_well_path.py Follows the pattern established by diameter roughness intervals. Fixes #13398.
63 lines
2.3 KiB
C++
63 lines
2.3 KiB
C++
/////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Copyright (C) 2025 Equinor ASA
|
|
//
|
|
// 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 "cafPdmField.h"
|
|
#include "cafPdmObjectHandle.h"
|
|
#include "cafPdmObjectMethod.h"
|
|
|
|
#include <QString>
|
|
|
|
//==================================================================================================
|
|
///
|
|
//==================================================================================================
|
|
class RimcWellPathCompletionSettings_addDiameterRoughnessInterval : public caf::PdmObjectCreationMethod
|
|
{
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
public:
|
|
RimcWellPathCompletionSettings_addDiameterRoughnessInterval( caf::PdmObjectHandle* self );
|
|
|
|
std::expected<caf::PdmObjectHandle*, QString> execute() override;
|
|
QString classKeywordReturnedType() const override;
|
|
|
|
private:
|
|
caf::PdmField<double> m_startMD;
|
|
caf::PdmField<double> m_endMD;
|
|
caf::PdmField<double> m_diameter;
|
|
caf::PdmField<double> m_roughnessFactor;
|
|
};
|
|
|
|
//==================================================================================================
|
|
///
|
|
//==================================================================================================
|
|
class RimcWellPathCompletionSettings_addCustomSegmentInterval : public caf::PdmObjectCreationMethod
|
|
{
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
public:
|
|
RimcWellPathCompletionSettings_addCustomSegmentInterval( caf::PdmObjectHandle* self );
|
|
|
|
std::expected<caf::PdmObjectHandle*, QString> execute() override;
|
|
QString classKeywordReturnedType() const override;
|
|
|
|
private:
|
|
caf::PdmField<double> m_startMD;
|
|
caf::PdmField<double> m_endMD;
|
|
}; |