-// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#include "GEOM_EdgeSource.h"
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);
}
}
else
aDirection = -aDirVec;
- Standard_Real anAngle = PI/180.*5.;
+ Standard_Real anAngle = M_PI/180.*5.;
Standard_Real aLength = aDist/10.;
Standard_Real dx,dy,dz;
int NbPoints = 15;
for (int i = 1; i <= NbPoints; i++, ptPrev = ptCur)
{
- cosinus = cos(2. * PI / NbPoints * (i-1));
- sinus = sin(2. * PI / NbPoints * (i-1));
+ cosinus = cos(2. * M_PI / NbPoints * (i-1));
+ sinus = sin(2. * M_PI / NbPoints * (i-1));
gp_XYZ aP = aPc + (aDirI.XYZ() * cosinus + aDirJ.XYZ() * sinus) * aLength * Tg;
coord[0] = aP.X();
void GEOM_EdgeSource::SetVectorMode (bool theMode)
{
- myIsVector = theMode;
+ myIsVectorMode = theMode;
}
bool GEOM_EdgeSource::GetVectorMode ()
{
- return myIsVector;
+ return !myIsVector && myIsVectorMode;
}