]> OCCT Git - occt-copy.git/commitdiff
0030630: Visualization - wrong visualization of shape with mirrored transformation
authorika <ika@opencascade.com>
Thu, 4 Apr 2019 13:07:05 +0000 (16:07 +0300)
committerika <ika@opencascade.com>
Mon, 8 Apr 2019 12:21:11 +0000 (15:21 +0300)
Solids with mirror location are displayed, according to their normals.

src/StdPrs/StdPrs_ShadedShape.cxx

index e098fc47e684ffc5d6616dc08fe28b7c02e31533..2c34858c0fb6df26b5f9ec1a6c097b478136d16b 100644 (file)
@@ -206,7 +206,7 @@ namespace
         aPoint = aNodes (aNodeIter);
         const Standard_Integer anId = 3 * (aNodeIter - aNodes.Lower());
         gp_Dir aNorm (aNormArr[anId + 0], aNormArr[anId + 1], aNormArr[anId + 2]);
-        if (aFace.Orientation() == TopAbs_REVERSED)
+        if ((aFace.Orientation() == TopAbs_REVERSED) ^ isMirrored)
         {
           aNorm.Reverse();
         }
@@ -235,7 +235,7 @@ namespace
       Standard_Integer anIndex[3];
       for (Standard_Integer aTriIter = 1; aTriIter <= aT->NbTriangles(); ++aTriIter)
       {
-        if ((aFace.Orientation() == TopAbs_REVERSED) ^ isMirrored)
+        if ((aFace.Orientation() == TopAbs_REVERSED))
         {
           aTriangles (aTriIter).Get (anIndex[0], anIndex[2], anIndex[1]);
         }