Skip to content
Snippets Groups Projects
Commit 7d47f9bb authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix generate point cloud (this explains the latest weird results :-)

parent 539fdb6d
No related branches found
No related tags found
No related merge requests found
......@@ -1033,7 +1033,7 @@ bool GFace::fillPointCloud(double maxDist, std::vector<SPoint3> *points,
double maxEdge = std::max(gp0.distance(gp1),
std::max(gp1.distance(gp2), gp2.distance(gp0)));
int N = maxEdge / maxDist;
for(double u = 1.; u < 1.; u += 1. / N){
for(double u = 0.; u < 1.; u += 1. / N){
for(double v = 0.; v < 1 - u; v += 1. / N){
SPoint2 p = p0 * (1. - u - v) + p1 * u + p2 * v;
GPoint gp(point(p));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment