Skip to content
Snippets Groups Projects
Commit 8dc4fcd0 authored by Harry Jeffery's avatar Harry Jeffery
Browse files

Refs #11688 Fix rounding error

parent 572c6f4f
No related branches found
No related tags found
No related merge requests found
......@@ -501,8 +501,8 @@ void Stitch1D::exec() {
const double intersectionMin = intesectionXRegion.get<0>();
const double intersectionMax = intesectionXRegion.get<1>();
const double startOverlap = getStartOverlap(intersectionMin, intersectionMax);
const double endOverlap = getEndOverlap(intersectionMin, intersectionMax);
double startOverlap = getStartOverlap(intersectionMin, intersectionMax);
double endOverlap = getEndOverlap(intersectionMin, intersectionMax);
if (startOverlap > endOverlap) {
std::string message = boost::str(
......@@ -518,6 +518,12 @@ void Stitch1D::exec() {
const double &xMin = params.front();
const double &xMax = params.back();
if (std::abs(xMin - startOverlap) < 1E-6)
startOverlap = xMin;
if (std::abs(xMax - endOverlap) < 1E-6)
endOverlap = xMax;
if (startOverlap < xMin) {
std::string message = boost::str(
boost::format("Stitch1D StartOverlap is outside the available X range "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment