Changes based on review

This commit is contained in:
Magne Sjaastad
2023-09-12 19:59:16 +02:00
parent f18eb29552
commit f4c61c9edb
6 changed files with 33 additions and 41 deletions

View File

@@ -86,17 +86,17 @@ bool Riv3dWellLogDrawSurfaceGenerator::createDrawSurface( const caf::DisplayCoor
size_t indexToFirstVisibleSegment = 0u;
if ( wellPathCollection->wellPathClip )
{
double clipZDistance = wellPathCollection->wellPathClipZDistance;
cvf::Vec3d clipLocation = wellPathClipBoundingBox.max() + clipZDistance * cvf::Vec3d( 0, 0, 1 );
clipLocation = displayCoordTransform->transformToDisplayCoord( clipLocation );
double horizontalLengthAlongWellToClipPoint = 0.0;
double measuredDepthAtFirstClipPoint = 0.0;
double clipZDistance = wellPathCollection->wellPathClipZDistance;
cvf::Vec3d clipLocation = wellPathClipBoundingBox.max() + clipZDistance * cvf::Vec3d::Z_AXIS;
auto clipLocationDisplay = displayCoordTransform->transformToDisplayCoord( clipLocation );
double horizontalLengthAlongWellToClipPoint = 0.0;
double measuredDepthAtFirstClipPoint = 0.0;
wellPathDisplayCoords = RigWellPath::clipPolylineStartAboveZ( wellPathDisplayCoords,
clipLocation.z(),
&horizontalLengthAlongWellToClipPoint,
&measuredDepthAtFirstClipPoint,
&indexToFirstVisibleSegment );
clipLocationDisplay.z(),
horizontalLengthAlongWellToClipPoint,
measuredDepthAtFirstClipPoint,
indexToFirstVisibleSegment );
}
// Create curve normal vectors using the unclipped well path points and normals.

View File

@@ -628,9 +628,9 @@ void RivWellPathPartMgr::buildWellPathParts( const caf::DisplayCoordTransform* d
double maxZClipHeight = wellPathClipBoundingBox.max().z() + wellPathCollection->wellPathClipZDistance;
clippedWellPathCenterLine = RigWellPath::clipPolylineStartAboveZ( wellpathCenterLine,
maxZClipHeight,
&horizontalLengthAlongWellToClipPoint,
&measuredDepthAtFirstClipPoint,
&idxToFirstVisibleSegment );
horizontalLengthAlongWellToClipPoint,
measuredDepthAtFirstClipPoint,
idxToFirstVisibleSegment );
}
else
{
@@ -703,7 +703,8 @@ void RivWellPathPartMgr::buildWellPathParts( const caf::DisplayCoordTransform* d
const double distanceBetweenLabels = m_rimWellPath->measuredDepthLabelInterval().value();
// Create a round number as start for measured depth label
const double startMeasuredDepth = ( int( measuredDepthAtFirstClipPoint / distanceBetweenLabels ) + 1 ) * distanceBetweenLabels;
const double startMeasuredDepth =
( static_cast<int>( measuredDepthAtFirstClipPoint / distanceBetweenLabels ) + 1 ) * distanceBetweenLabels;
std::vector<std::string> labelTexts;
std::vector<cvf::Vec3d> labelDisplayCoords;

View File

@@ -223,11 +223,8 @@ void RivSeismicSectionPartMgr::appendSurfaceIntersectionLines( cvf::ModelBasicLi
{
const auto& texturePart = texSection->part( i );
std::vector<cvf::Vec3d> polyLineForSection;
// Each part of the seismic section is a rectangle, use two corners of the rectangle to create a polyline
polyLineForSection.push_back( texturePart.rect[0] );
polyLineForSection.push_back( texturePart.rect[1] );
std::vector<cvf::Vec3d> polyLineForSection = { texturePart.rect[0], texturePart.rect[1] };
bool closePolyLine = false;
auto polyLineDisplayCoords = projectPolyLineOntoSurface( polyLineForSection, surface, displayCoordTransform );