///////////////////////////////////////////////////////////////////////////////// // // 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 // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "Tools/enum_bitmask.hpp" #include #include #include #include class RigActiveCellInfo; class RimEclipseCase; class RimWellPath; class RigMswTableData; class RimSegmentCollection; class RigWellPath; struct WellPathCellIntersectionInfo; //-------------------------------------------------------------------------------------------------- /// This class is responsible for exporting well path MSW table data /// This class is based on RicWellPathExportMswCompletionsImpl //-------------------------------------------------------------------------------------------------- class RicWellPathExportMswTableData { public: enum class CompletionType { NONE = 0x00, PERFORATIONS = 0x01, FISHBONES = 0x02, FRACTURES = 0x04, ALL = PERFORATIONS | FISHBONES | FRACTURES }; // The intention is to extract MSW data from a single well. Any handling of multiple wells is supposed to be managed in a different class static std::expected extractSingleWellMswData( RimEclipseCase* eclipseCase, RimWellPath* wellPath, bool exportCompletionsAfterMainBoreSegments = true, CompletionType completionType = CompletionType::ALL, const std::optional& exportDate = std::nullopt ); static std::expected extractSingleWellMsw( RimEclipseCase* eclipseCase, RimWellPath* wellPath, bool exportCompletionsAfterMainBoreSegments = true, CompletionType completionType = CompletionType::ALL, const std::optional& exportDate = std::nullopt ); static CompletionType convertFromExportSettings( const class RicExportCompletionDataSettingsUi& settings ); static std::vector generateCellSegments( const RimEclipseCase* eclipseCase, const RimWellPath* wellPath ); static std::vector filterIntersections( const std::vector& intersections, double initialMD, const RigWellPath* wellPathGeometry, const RimEclipseCase* eclipseCase ); static std::vector wellPathsWithTieIn( const RimWellPath* wellPath ); static double computeIntitialMeasuredDepth( const RimEclipseCase* eclipseCase, const RimWellPath* wellPath, const RimSegmentCollection* segmentCollection, const std::vector& allIntersections ); }; ENABLE_BITMASK_OPERATORS( RicWellPathExportMswTableData::CompletionType )