0028232: Visualization, StdPrs_ShadedShape - create WireFrame presentation for sole...
authorkgv <kgv@opencascade.com>
Sun, 18 Dec 2016 07:18:55 +0000 (10:18 +0300)
committerkgv <kgv@opencascade.com>
Thu, 22 Dec 2016 14:24:28 +0000 (17:24 +0300)
src/StdPrs/StdPrs_ShadedShape.cxx

index e76fa32..2895a02 100644 (file)
@@ -60,18 +60,16 @@ namespace
                            const TopoDS_Shape&                theShape,
                            const Handle (Prs3d_Drawer)&       theDrawer)
   {
-    Standard_Boolean aDrawAllVerticesFlag = (theDrawer->VertexDrawMode() == Prs3d_VDM_All);
-
-    if (!aDrawAllVerticesFlag && theShape.ShapeType() != TopAbs_COMPOUND)
+    TopExp_Explorer aShapeIter (theShape, TopAbs_FACE);
+    if (!aShapeIter.More())
     {
+      StdPrs_WFShape::Add (thePrs, theShape, theDrawer);
       return;
     }
 
-    TopExp_Explorer aShapeIter (theShape, TopAbs_FACE);
-    if (!aShapeIter.More())
+    const Standard_Boolean aDrawAllVerticesFlag = (theDrawer->VertexDrawMode() == Prs3d_VDM_All);
+    if (!aDrawAllVerticesFlag && theShape.ShapeType() != TopAbs_COMPOUND)
     {
-      // compound contains no shaded elements at all
-      StdPrs_WFShape::Add (thePrs, theShape, theDrawer);
       return;
     }