#8651 Surface Intersection Curve: Fix crash when non-overlapping surface and intersection (#8737)

This commit is contained in:
Kristian Bendiksen 2022-03-25 15:06:11 +01:00 committed by GitHub
parent 86ea679871
commit fda4d1d608
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,14 +204,16 @@ void RivExtrudedCurveIntersectionGeometryGenerator::calculateSurfaceIntersection
cvf::Vec3d intersectionPoint;
bool foundMatch = RigSurfaceResampler::resamplePoint( surface, pointAbove, pointBelow, intersectionPoint );
if ( !foundMatch )
intersectionPoint = cvf::Vec3d( point.x(), point.y(), std::numeric_limits<double>::infinity() );
const size_t lineIndex = 0;
transformedSurfacePolyline.push_back(
transformPointByPolylineSegmentIndex( intersectionPoint, lineIndex, segmentIndex ) );
if ( foundMatch )
{
const size_t lineIndex = 0;
transformedSurfacePolyline.push_back(
transformPointByPolylineSegmentIndex( intersectionPoint, lineIndex, segmentIndex ) );
}
}
m_transformedSurfaceIntersectionPolylines[rimSurface] = transformedSurfacePolyline;
if ( !transformedSurfacePolyline.empty() )
m_transformedSurfaceIntersectionPolylines[rimSurface] = transformedSurfacePolyline;
}
}
}