Skip to content

Commit

Permalink
Add missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Feb 29, 2024
1 parent c5d0f4c commit eaa6721
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,17 @@
#include "RimEclipseView.h"
#include "RimGeoMechView.h"
#include "RimModeledWellPath.h"
#include "RimWellPath.h"
#include "RimWellPathGeometryDef.h"
#include "RimWellPathTarget.h"

#include "RiuViewerCommands.h"

#include "RivFemPartGeometryGenerator.h"
#include "RivFemPickSourceInfo.h"
#include "RivSourceInfo.h"
#include "RivWellPathSourceInfo.h"

#include "cafDisplayCoordTransform.h"
#include "cafSelectionManager.h"

#include <QApplication>

#include <vector>

Expand Down
56 changes: 56 additions & 0 deletions ApplicationLibCode/ProjectDataModel/RimPolylinePickerInterface.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2024 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.
//
/////////////////////////////////////////////////////////////////////////////////

#include "RimPolylinePickerInterface.h"

#include "RimPolylineTarget.h"

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RimPolylinePickerInterface::scalingFactorForTarget() const
{
return 1.0;
}

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::pair<RimPolylineTarget*, RimPolylineTarget*>
RimPolylinePickerInterface::findActiveTargetsAroundInsertionPoint( const RimPolylineTarget* targetToInsertBefore )
{
auto targets = activeTargets();

RimPolylineTarget* before = nullptr;
RimPolylineTarget* after = nullptr;

bool foundTarget = false;
for ( const auto& wt : targets )
{
if ( wt == targetToInsertBefore )
{
foundTarget = true;
}

if ( !after && foundTarget ) after = wt;

if ( !foundTarget ) before = wt;
}

return { before, after };
}

0 comments on commit eaa6721

Please sign in to comment.