Files
ResInsight/ApplicationLibCode/ProjectDataModel/Completions/RimCustomSegmentIntervalCollection.h
T
Kristian Bendiksen a71fb9ad19 #13398 Python: Add API for custom well path segments
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.
2026-01-13 10:44:55 +01:00

45 lines
1.7 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 "RimCustomSegmentInterval.h"
#include "RimIntervalCollection.h"
//==================================================================================================
///
/// Collection to manage custom segment intervals for measured depth ranges
///
//==================================================================================================
class RimCustomSegmentIntervalCollection : public RimIntervalCollection<RimCustomSegmentInterval>
{
CAF_PDM_HEADER_INIT;
public:
RimCustomSegmentIntervalCollection();
~RimCustomSegmentIntervalCollection() override;
// Domain-specific interval creation
RimCustomSegmentInterval* createInterval( double startMD, double endMD );
// Validation
std::map<QString, QString> validate( const QString& configName = "" ) const override;
protected:
void defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget ) override;
};