Sketcher/BackEdit: makes sketch elements render on -Z if sketch viewed from back side

This commit is contained in:
0penBrain
2022-08-30 17:36:03 +02:00
committed by wwmayer
parent a6a8f27125
commit 3f220f1dd8
7 changed files with 67 additions and 47 deletions

View File

@@ -47,6 +47,7 @@
#include "Mod/Sketcher/App/Constraint.h"
#include "EditModeGeometryCoinConverter.h"
#include "ViewProviderSketchCoinAttorney.h"
using namespace SketcherGui;
@@ -226,7 +227,8 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade & geol
int i=0; // setting up the line set
for (std::vector<Base::Vector3d>::const_iterator it = Coords[l].begin(); it != Coords[l].end(); ++it,i++)
verts[i].setValue(it->x,it->y,drawingParameters.zLowLines);
verts[i].setValue(it->x,it->y,
ViewProviderSketchCoinAttorney::getViewOrientationFactor(viewProvider) * drawingParameters.zLowLines);
i=0; // setting up the indexes of the line set
for (std::vector<unsigned int>::const_iterator it = Index[l].begin(); it != Index[l].end(); ++it,i++)
@@ -234,7 +236,8 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade & geol
i=0; // setting up the point set
for (std::vector<Base::Vector3d>::const_iterator it = Points[l].begin(); it != Points[l].end(); ++it,i++)
pverts[i].setValue(it->x,it->y,drawingParameters.zLowPoints);
pverts[i].setValue(it->x,it->y,
ViewProviderSketchCoinAttorney::getViewOrientationFactor(viewProvider) * drawingParameters.zLowPoints);
geometryLayerNodes.CurvesCoordinate[l]->point.finishEditing();
geometryLayerNodes.CurveSet[l]->numVertices.finishEditing();