Sketcher: Grid visualization improvement

========================================

Now the Grid is calculated based on the maximum semiaxis length. Grid is recalculated on every redraw of the Sketcher.
This commit is contained in:
Abdullah Tahiri
2018-10-01 16:27:41 +02:00
committed by wmayer
parent dedd66e7f4
commit 65dd09d5e6

View File

@@ -4155,6 +4155,16 @@ void ViewProviderSketch::draw(bool temp /*=false*/, bool rebuildinformationlayer
float dMagF = -exp(ceil(log(std::abs(dMg))));
MinX = -dMagF;
MaxX = dMagF;
MinY = -dMagF;
MaxY = dMagF;
if (ShowGrid.getValue())
createGrid();
else
GridRoot->removeAllChildren();
edit->RootCrossCoordinate->point.set1Value(0,SbVec3f(-dMagF, 0.0f, zCross));
edit->RootCrossCoordinate->point.set1Value(1,SbVec3f(dMagF, 0.0f, zCross));
edit->RootCrossCoordinate->point.set1Value(2,SbVec3f(0.0f, -dMagF, zCross));