Commit 87e911c7 authored by Jean-Marie Favreau's avatar Jean-Marie Favreau
Browse files

Small corrections

parent d8fe01e6
......@@ -259,11 +259,13 @@ std::vector<PLPath> PLPath::getIntegralLinesFromSaddlePoint(const Point3D & poin
bool up = true;
if (mMap[pUp[1]] > mMap[pUp[0]]) {
PLPath ls = mMap.computeLevelSetCC(PointOnEdge(mesh.point(pUp[0]), point, .5));
assert(ls.size() > 2);
if (!ls.intersects(point.getId(), pUp[1]))
up = false;
}
else {
PLPath ls = mMap.computeLevelSetCC(PointOnEdge(mesh.point(pUp[1]), point, .5));
assert(ls.size() > 2);
if (!ls.intersects(point.getId(), pUp[0]))
up = false;
}
......@@ -271,11 +273,13 @@ std::vector<PLPath> PLPath::getIntegralLinesFromSaddlePoint(const Point3D & poin
if (!up) {
if (mMap[pDown[1]] > mMap[pDown[0]]) {
PLPath ls = mMap.computeLevelSetCC(PointOnEdge(mesh.point(pDown[1]), point, .5));
assert(ls.size() > 2);
if (!ls.intersects(point.getId(), pDown[0]))
throw Exception("getIntegralLinesFromSaddlePoint(5): cannot find the valid direction.");
}
else {
PLPath ls = mMap.computeLevelSetCC(PointOnEdge(mesh.point(pDown[0]), point, .5));
assert(ls.size() > 2);
if (!ls.intersects(point.getId(), pDown[1]))
throw Exception("getIntegralLinesFromSaddlePoint(5): cannot find the valid direction.");
}
......@@ -879,7 +883,7 @@ std::vector<unsigned int> PLPath::getRegionProperties(const Point3D & point, Mes
}
else {
assert((cTriangle.getFlag() > 0) || (cTriangle.getFlag() == -idCC));
assert((cTriangle.getFlag() > (int)0) || (cTriangle.getFlag() == -idCC));
}
}
}
......@@ -934,12 +938,10 @@ std::pair<double, bool> PLPath::getAreaInSide(TriangleID triangle,
// get list of points in the current path that are in the triangle
std::vector<PointOnEdge> points;
bool found = false;
for(PLPath::const_iterator p = begin(); p != end(); ++p)
if (((*p).isVertex() && t.hasPoint((*p).getClosestVertex())) ||
((!(*p).isVertex()) && t.hasPoint((*p).getFirstVertex()) && t.hasPoint((*p).getSecondVertex()))) {
points.push_back(*p);
found = true;
}
assert(points.size() >= 2);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment