]> SALOME platform Git repositories - modules/geom.git/commitdiff
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:01 +0000 (10:11 +0000)
committereap <eap@opencascade.com>
Mon, 29 Nov 2010 10:11:01 +0000 (10:11 +0000)
   Remember if this is a vector or not in order to take into account
   REVERSED orientation of vectors only, for others make orientation
   FORWARD to show direction of 3D curve

-  bool myIsVector;
+  bool myIsVector, myIsVectorMode;

src/OCC2VTK/GEOM_EdgeSource.cxx
src/OCC2VTK/GEOM_EdgeSource.h

index e44cc81e0c019ce52bac5d08c9e70962c0695ec5..54f4ece23204cfe600308d1b35aa137b991cc985 100755 (executable)
@@ -65,8 +65,11 @@ Execute()
 
   TEdgeSet::Iterator anIter (myEdgeSet);
   for (; anIter.More(); anIter.Next()) {
-    const TopoDS_Edge& anEdge = anIter.Value();
-    OCC2VTK(anEdge,aPolyData,aPts,myIsVector);
+    TopoDS_Edge anEdge = anIter.Value();
+    if ( !myIsVector )
+      // draw curve direction (issue 0021087)
+      anEdge.Orientation( TopAbs_FORWARD );
+    OCC2VTK(anEdge,aPolyData,aPts,myIsVector||myIsVectorMode);
   }
 }
 
@@ -263,10 +266,10 @@ void GEOM_EdgeSource::OCC2VTK (const TopoDS_Edge& theEdge,
 
 void GEOM_EdgeSource::SetVectorMode (bool theMode)
 {
-  myIsVector = theMode;
+  myIsVectorMode = theMode;
 }
 
 bool GEOM_EdgeSource::GetVectorMode ()
 {
-  return myIsVector;
+  return !myIsVector && myIsVectorMode;
 }
index 9ef08683f65e75183546ab6dc0cb98a35763ee49..6ea230d55bd18d99064b13b11814d3978d8438a8 100755 (executable)
@@ -57,7 +57,7 @@ protected:
   TEdgeSet myEdgeSet;
   // The <myIsVector> flag is common for all edges, because the shape,
   // representing a vector, can have only one edge.
-  bool myIsVector;
+  bool myIsVector, myIsVectorMode;
  
   void Execute();