MSW code reverted. Regrettfully the work has to be reconsidered.

Both ERT and the resinsight code is rolled back to before MSW was introduced as refined.
p4#: 21999
This commit is contained in:
Jacob Støren
2013-06-25 15:53:19 +02:00
parent 172c2d8b21
commit 4be58edf78
248 changed files with 3536 additions and 9271 deletions

View File

@@ -547,8 +547,20 @@ void RivPipeGeometryGenerator::updateFilteredPipeCenterCoords()
}
}
// Always append last coord as it is not added by above algorithm
m_filteredPipeCenterCoords.push_back(m_originalPipeCenterCoords->get(m_originalPipeCenterCoords->size() - 1));
// Add last cross section if not duplicate coordinate
cvf::Vec3d coordA = m_originalPipeCenterCoords->get(m_originalPipeCenterCoords->size() - 2);
cvf::Vec3d coordB = m_originalPipeCenterCoords->get(m_originalPipeCenterCoords->size() - 1);
cvf::Vec3d directionAB = coordB - coordA;
if (directionAB.lengthSquared() > squareDistanceTolerance)
{
m_filteredPipeCenterCoords.push_back(m_originalPipeCenterCoords->get(m_originalPipeCenterCoords->size() - 1));
}
else
{
// Remove last segment as the length is below tolerance
m_filteredPipeSegmentToResult.pop_back();
}
CVF_ASSERT(m_filteredPipeCenterCoords.size() - 1 == m_filteredPipeSegmentToResult.size());
}