///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2021- 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 "RicMswItem.h" #include "RicMswSegment.h" #include "cafPdmPointer.h" #include #include class RimWellPath; class RicMswCompletion; class RicMswSegment; class RicMswBranch : public RicMswItem { public: RicMswBranch( const QString& label, const RimWellPath* wellPath, double initialMD = 0.0, double initialTVD = 0.0 ); ~RicMswBranch() override = default; void addSegment( std::unique_ptr segment ); void insertAfterSegment( const RicMswSegment* insertAfter, std::unique_ptr segment ); void sortSegments(); const RimWellPath* wellPath() const; double startMD() const override; double startTVD() const override; double endMD() const override; double endTVD() const override; int branchNumber() const; void setBranchNumber( int branchNumber ); std::vector segments() const; std::vector segments(); RicMswSegment* findClosestSegmentByMidpoint_obsolete( double measuredDepthLocation ); RicMswSegment* findClosestSegmentWithLowerMD( double measuredDepthLocation ); size_t segmentCount() const; std::vector branches() const; std::vector branches(); void addChildBranch( std::unique_ptr branch ); std::vector allSegmentsRecursively(); private: double m_initialMD; double m_initialTVD; int m_branchNumber; std::vector> m_segments; std::vector> m_branches; const RimWellPath* m_wellPath; };