mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2608 Prepare to find a correct seeding of the SolveSpace S-curve solver
Extracted the inital values to a separate section. Use an explicit fallback calculation (based on control points) if the solvespace one fails
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "RimWellPathTarget.h"
|
||||
#include "RimModeledWellPath.h"
|
||||
#include "RiaSCurveCalculator.h"
|
||||
#include "RiaLogging.h"
|
||||
|
||||
namespace caf
|
||||
{
|
||||
@@ -255,8 +256,19 @@ std::vector<cvf::Vec3d> RimWellPathGeometryDef::lineArcEndpoints() const
|
||||
target2->inclination(),
|
||||
50);//30.0/cvf::Math::toRadians(12.0));
|
||||
|
||||
if (!sCurveCalc.isOk()) std::cout << "SCurve Calculation failed" << std::endl;
|
||||
if (!sCurveCalc.isOk())
|
||||
{
|
||||
RiaLogging::warning("SCurve Calculation failed between target " + QString::number(tIdx+1) + " and " + QString::number(tIdx+2));
|
||||
|
||||
sCurveCalc = RiaSCurveCalculator::fromTangentsAndLength(target1->targetPointXYZ(),
|
||||
target1->azimuth(),
|
||||
target1->inclination(),
|
||||
50,
|
||||
target2->targetPointXYZ(),
|
||||
target2->azimuth(),
|
||||
target2->inclination(),
|
||||
50);
|
||||
}
|
||||
endPoints.push_back( sCurveCalc.firstArcEndpoint() + m_referencePoint() );
|
||||
endPoints.push_back( sCurveCalc.secondArcStartpoint() + m_referencePoint() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user