From: eap Date: Mon, 29 Nov 2010 10:11:01 +0000 (+0000) Subject: 0021087: EDF 1673 GEOM: Start and End length hypotheses don't always match edges... X-Git-Tag: RELIQUAT_5x_15112010~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ae11f3c87db5cf0b43de79199e432b3f5095c400;p=modules%2Fgeom.git 0021087: EDF 1673 GEOM: Start and End length hypotheses don't always match edges orientation 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; --- diff --git a/src/OCC2VTK/GEOM_EdgeSource.cxx b/src/OCC2VTK/GEOM_EdgeSource.cxx index e44cc81e0..54f4ece23 100755 --- a/src/OCC2VTK/GEOM_EdgeSource.cxx +++ b/src/OCC2VTK/GEOM_EdgeSource.cxx @@ -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; } diff --git a/src/OCC2VTK/GEOM_EdgeSource.h b/src/OCC2VTK/GEOM_EdgeSource.h index 9ef08683f..6ea230d55 100755 --- a/src/OCC2VTK/GEOM_EdgeSource.h +++ b/src/OCC2VTK/GEOM_EdgeSource.h @@ -57,7 +57,7 @@ protected: TEdgeSet myEdgeSet; // The flag is common for all edges, because the shape, // representing a vector, can have only one edge. - bool myIsVector; + bool myIsVector, myIsVectorMode; void Execute();