Skip to content
Snippets Groups Projects
Commit c8645e79 authored by Jean-Marie Favreau's avatar Jean-Marie Favreau
Browse files

Correct a bug

parent 82b2778a
No related branches found
No related tags found
No related merge requests found
......@@ -140,13 +140,13 @@ bool CylinderProjection::compute2DLocation(VertexID vnew, VertexID vknown) {
// distance between the two projections plus the x coordinate of the known point gives the new x coordinate
const double x = mapping[vknown].get2DX() + line.getCoords(cnew) - line.getCoords(cknown);
// projection of the known point in the base plane of the cylinder, and obtain the corresponding vector
const Coord3D pknown = plane.getOrthogonalProjection(cylinderProjection[vknown]) - center;
const Coord3D pknown = plane.getOrthogonalProjection(cylinderProjection[vknown]);
// projection of the new point in the base plane of the cylinder, and obtain the corresponding vector
const Coord3D pnew = plane.getOrthogonalProjection(cylinderProjection[vnew]) - center;
const Coord3D pnew = plane.getOrthogonalProjection(cylinderProjection[vnew]);
// the y coordinate corresponds to the one of y plus the angle difference in the base plane
const bool d = Coord3D::scalarProduct(axis, Coord3D::vectorialProduct(pnew, pknown)) > 0;
const double y = mapping[vknown].get2DY() + Coord3D::angleVector(pnew, pknown) * (d ? radius : - radius);
const double y = mapping[vknown].get2DY() + Coord3D::angleVector(pnew, pknown) * (d ? radius : (- radius));
mapping.set2DCoords(vnew, x, y);
mesh.point(vnew).setFlag(1);
return true;
......
......@@ -85,7 +85,7 @@ public:
/**
Compute 2D location
*/
void compute2DLocation(const Taglut::IndentManager & indentManager, bool adjustMeanDistance = true);
void compute2DLocation(const Taglut::IndentManager & indentManager, bool adjustMeanDistance = false);
/**
......
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