Salome HOME
0021087: EDF 1673 GEOM: Start and End length hypotheses don't always match edges...
authoreap <eap@opencascade.com>
Mon, 29 Nov 2010 10:11:39 +0000 (10:11 +0000)
committereap <eap@opencascade.com>
Mon, 29 Nov 2010 10:11:39 +0000 (10:11 +0000)
   Take into account REVERSED orientation of vectors only, for others
   make orientation FORWARD to show direction of 3D curve

src/OBJECT/GEOM_AISShape.cxx

index 2317414ad4e4339c1489964faf2e866abfa79c9b..451babeb8f3cc211e7ea9ca327bade598a9b46e0 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "GEOM_AISShape.ixx"
 #include "SALOME_InteractiveObject.hxx"
+#include "GEOM_AISVector.hxx"
 
 // Open CASCADE Includes
 #include <AIS_Drawer.hxx>
@@ -210,10 +211,14 @@ void GEOM_AISShape::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresent
 
   if (isShowVectors())
   {
+    const bool isVector = IsKind(STANDARD_TYPE(GEOM_AISVector));
     TopExp_Explorer Exp ( myshape, TopAbs_EDGE );
     for ( ; Exp.More(); Exp.Next() ) {
       TopoDS_Vertex aV1, aV2;
       TopoDS_Edge anEdgeE = TopoDS::Edge(Exp.Current());
+      if ( !isVector )
+        // draw curve direction (issue 0021087)
+        anEdgeE.Orientation( TopAbs_FORWARD );
 
       if ( anEdgeE.IsNull() ) continue;