]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
bos #29479 Show edges directions
authorAlexey Kondratyev <alexey.kondratyev@opencascade.com>
Wed, 27 Apr 2022 08:51:19 +0000 (11:51 +0300)
committervsr <vsr@opencascade.com>
Thu, 9 Jun 2022 14:08:59 +0000 (17:08 +0300)
Add algorithm to show direction of edges.

15 files changed:
doc/gui/General/Introduction.rst
src/Model/Model_Data.cpp
src/ModelAPI/ModelAPI_Result.cpp
src/ModelAPI/ModelAPI_Result.h
src/ModelAPI/ModelAPI_Tools.cpp
src/ModelAPI/ModelAPI_Tools.h
src/ModuleBase/ModuleBase_ArrowPrs.cpp [new file with mode: 0644]
src/ModuleBase/ModuleBase_ArrowPrs.h [new file with mode: 0644]
src/ModuleBase/ModuleBase_ResultPrs.cpp
src/XGUI/XGUI_ContextMenuMgr.cpp
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_Workshop.h
src/XGUI/XGUI_msg_fr.ts
src/XGUI/XGUI_pictures.qrc
src/XGUI/pictures/edges_dir.png [new file with mode: 0644]

index b691bdf2afa9b9c0d372d69668d6c04e73acba0b..8da63702fd841157ebb5bb854b4eb6678ad6a264 100644 (file)
@@ -394,6 +394,13 @@ This point of view can be modified using viewer commands: **Panning**, **Zooming
 
    Two view windows
 
+The viewer is able to show direction of edges of objects.
+
+.. figure:: /images/edges_directions.png
+   :align: center
+
+   Showing the edges direction
+
 The description of OCC 3D Viewer architecture and functionality is provided in GUI module user's guide in chapter **OCC 3D Viewer**.
 
 .. _parameter_usage:
index 058b326e6541d944c69dcde72253317f3d0d6642..00e6defd2e6566b00481ceb52d2c24f8ec0abb8e 100644 (file)
@@ -465,7 +465,8 @@ void Model_Data::sendAttributeUpdated(ModelAPI_Attribute* theAttr)
     // trim: need to redisplay or set color in the python script
     if (myObject && (theAttr->attributeType() == "Point2D" || theAttr->id() == "Color" ||
       theAttr->id() == "Transparency" || theAttr->id() == "Deflection" ||
-      theAttr->id() == "Iso_lines" || theAttr->id() == "Show_Iso_lines")) {
+      theAttr->id() == "Iso_lines" || theAttr->id() == "Show_Iso_lines" ||
+      theAttr->id() == "Show_Edges_direction")) {
       static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY);
       ModelAPI_EventCreator::get()->sendUpdated(myObject, anEvent);
     }
index ec27cbf8216d29b55c4e585ef79dc94995b1237c..a225fe95032bbf12e231d7845927c76b50c86603 100644 (file)
@@ -41,6 +41,8 @@ void ModelAPI_Result::initAttributes()
   aData->addAttribute(ISO_LINES_ID(), ModelAPI_AttributeIntArray::typeId())->setIsArgument(false);
   aData->addAttribute(SHOW_ISO_LINES_ID(), ModelAPI_AttributeBoolean::typeId())->
     setIsArgument(false);
+  aData->addAttribute(SHOW_EDGES_DIRECTION_ID(), ModelAPI_AttributeBoolean::typeId())->
+    setIsArgument(false);
 }
 
 bool ModelAPI_Result::setDisabled(std::shared_ptr<ModelAPI_Result> theThis, const bool theFlag)
index df12ecaf6b5b8f5f01dd3e24d1f2a9e5550597a9..778529c221b0ae2d34b4ec84f7b51af32e138765 100644 (file)
@@ -79,6 +79,14 @@ class ModelAPI_Result : public ModelAPI_Object
     return MY_SHOW_ISO_LINES_ID;
   }
 
+  /// Reference to the transparency of the result.
+  /// The double value is used. The value is in [0, 1] range
+  inline static const std::string& SHOW_EDGES_DIRECTION_ID()
+  {
+    static const std::string MY_SHOW_EDGES_DIRECTION_ID("Show_Edges_direction");
+    return MY_SHOW_EDGES_DIRECTION_ID;
+  }
+
   /// Returns true if the result is concealed from the data tree (referenced by other objects)
   MODELAPI_EXPORT virtual bool isConcealed();
 
index 7034040690eb6cfe492ffd152aea248116ce1c68..84c5de685d83c7cbd6a5c7ba02dbd1f12639865b 100644 (file)
@@ -1169,6 +1169,31 @@ bool isShownIsoLines(std::shared_ptr<ModelAPI_Result> theResult)
   return false;
 }
 
+//******************************************************
+void showEdgesDirection(std::shared_ptr<ModelAPI_Result> theResult, bool theShow)
+{
+  if (!theResult.get())
+    return;
+
+  AttributeBooleanPtr aAttr = theResult->data()->boolean(ModelAPI_Result::SHOW_EDGES_DIRECTION_ID());
+  if (aAttr.get() != NULL) {
+    aAttr->setValue(theShow);
+  }
+}
+
+//******************************************************
+bool isShowEdgesDirection(std::shared_ptr<ModelAPI_Result> theResult)
+{
+  if (!theResult.get())
+    return false;
+
+  AttributeBooleanPtr aAttr = theResult->data()->boolean(ModelAPI_Result::SHOW_EDGES_DIRECTION_ID());
+  if (aAttr.get() != NULL) {
+    return aAttr->value();
+  }
+  return false;
+}
+
 //**************************************************************
 void setTransparency(ResultPtr theResult, double theTransparency)
 {
index 0ad6923412cf3eb5551368159c05110b17a95d84..83a1e010ef4a0e9676105322008018e9d0ffc829 100644 (file)
@@ -304,6 +304,14 @@ MODELAPI_EXPORT void showIsoLines(std::shared_ptr<ModelAPI_Result> theResult, bo
 
 MODELAPI_EXPORT bool isShownIsoLines(std::shared_ptr<ModelAPI_Result> theResult);
 
+/*! Set visibility of edges direction
+* \param[in] theResult a result object
+* \param[in] theShow is a visibility flag
+*/
+MODELAPI_EXPORT void showEdgesDirection(std::shared_ptr<ModelAPI_Result> theResult, bool theShow);
+
+MODELAPI_EXPORT bool isShowEdgesDirection(std::shared_ptr<ModelAPI_Result> theResult);
+
 /*! Returns current transparency in the given result
 * \param theResult a result object
 * \return a transparency value or -1 if it was not defined
diff --git a/src/ModuleBase/ModuleBase_ArrowPrs.cpp b/src/ModuleBase/ModuleBase_ArrowPrs.cpp
new file mode 100644 (file)
index 0000000..da02554
--- /dev/null
@@ -0,0 +1,113 @@
+// Copyright (C) 2014-2022  CEA/DEN, EDF R&D
+//
+// 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, or (at your option) any later version.
+//
+// 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
+//
+
+#include "ModuleBase_ArrowPrs.h"
+
+#include <Prs3d_ArrowAspect.hxx>
+
+#include <Events_Loop.h>
+#include <ModelAPI_Events.h>
+
+#include <BRep_Builder.hxx>
+#include <BRep_Tool.hxx>
+#include <GCPnts_AbscissaPoint.hxx>
+#include <GeomAdaptor_Curve.hxx>
+#include <Prs3d_Arrow.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <TopExp.hxx>
+
+
+IMPLEMENT_STANDARD_RTTIEXT(ModuleBase_ArrowPrs, AIS_InteractiveContext)
+
+
+ModuleBase_ArrowPrs::ModuleBase_ArrowPrs(const Handle(V3d_Viewer)& theViewer,
+                                         const GeomEdgePtr& theEdge)
+  : AIS_InteractiveContext(theViewer),
+    myEdge(theEdge)
+{
+}
+
+//********************************************************************
+void ModuleBase_ArrowPrs::DrawArrow(const Handle(Prs3d_Presentation)& thePrs,
+                                    Quantity_Color theColor)
+{
+  Handle(Prs3d_Drawer) aDrawer = myDefaultDrawer;
+  Handle(Prs3d_ArrowAspect) anArrowAspect = aDrawer->ArrowAspect();
+
+  Handle(Graphic3d_AspectLine3d) PtA = anArrowAspect->Aspect();
+  PtA->SetColor(theColor);
+
+  Handle(Graphic3d_Group) TheGroup = thePrs->CurrentGroup();
+  TheGroup->SetPrimitivesAspect(PtA);
+
+  TopoDS_Vertex aV1, aV2;
+  TopoDS_Edge anEdgeE = myEdge->impl<TopoDS_Edge>();
+  anEdgeE.Orientation(TopAbs_FORWARD);
+  if (anEdgeE.IsNull()) return;
+
+  TopExp::Vertices(anEdgeE, aV1, aV2);
+  gp_Pnt aP1 = BRep_Tool::Pnt(aV1);
+  gp_Pnt aP2 = BRep_Tool::Pnt(aV2);
+
+  double fp, lp;
+  gp_Vec aDirVec;
+  Handle(Geom_Curve) C = BRep_Tool::Curve(anEdgeE, fp, lp);
+
+  if (C.IsNull()) return;
+
+  if (anEdgeE.Orientation() == TopAbs_FORWARD)
+    C->D1(lp, aP2, aDirVec);
+  else {
+    C->D1(fp, aP1, aDirVec);
+    aP2 = aP1;
+  }
+
+  GeomAdaptor_Curve aAdC;
+  aAdC.Load(C, fp, lp);
+  Standard_Real aDist = GCPnts_AbscissaPoint::Length(aAdC, fp, lp);
+
+  if (aDist > gp::Resolution()) {
+    gp_Dir aDir;
+    if (anEdgeE.Orientation() == TopAbs_FORWARD)
+      aDir = aDirVec;
+    else
+      aDir = -aDirVec;
+
+    TopoDS_Vertex aVertex;
+    BRep_Builder aB;
+    aB.MakeVertex(aVertex, aP2, Precision::Confusion());
+    Prs3d_Arrow::Draw(TheGroup, aP2, aDir, M_PI / 180. * 5., aDist / 10.);
+  }
+}
+
+//********************************************************************
+bool ModuleBase_ArrowPrs::Comparator::operator()(const std::shared_ptr<GeomAPI_Edge>& theEdge1,
+                                                 const std::shared_ptr<GeomAPI_Edge>& theEdge2) const
+{
+  const TopoDS_Edge& aShape1 = theEdge1->impl<TopoDS_Edge>();
+  const TopoDS_Edge& aShape2 = theEdge2->impl<TopoDS_Edge>();
+  bool isLess = aShape1.TShape() < aShape2.TShape();
+  if (aShape1.TShape() == aShape2.TShape()) {
+    Standard_Integer aHash1 = aShape1.Location().HashCode(IntegerLast());
+    Standard_Integer aHash2 = aShape2.Location().HashCode(IntegerLast());
+    isLess = aHash1 < aHash2;
+  }
+  return isLess;
+}
diff --git a/src/ModuleBase/ModuleBase_ArrowPrs.h b/src/ModuleBase/ModuleBase_ArrowPrs.h
new file mode 100644 (file)
index 0000000..238bca1
--- /dev/null
@@ -0,0 +1,72 @@
+// Copyright (C) 2014-2022  CEA/DEN, EDF R&D
+//
+// 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, or (at your option) any later version.
+//
+// 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
+//
+
+#ifndef ModuleBase_ArrowPrs_H
+#define ModuleBase_ArrowPrs_H
+
+#include <ModuleBase.h>
+#include <GeomAPI_Edge.h>
+#include <AIS_InteractiveContext.hxx>
+
+#include <map>
+
+DEFINE_STANDARD_HANDLE(ModuleBase_ArrowPrs, AIS_InteractiveContext)
+
+/**
+* \ingroup GUI
+* A presentation class for displaying a direction of edge
+*/
+
+class ModuleBase_ArrowPrs : public AIS_InteractiveContext
+{
+public:
+  /// Constructor
+  /// \param theViewer a viewer which theEdge is displaying.
+  /// \param theEdge an edge whose direction to display.
+  Standard_EXPORT ModuleBase_ArrowPrs(const Handle(V3d_Viewer)& theViewer,
+                                      const GeomEdgePtr& theEdge);
+
+  /// Returns an edge shape
+  GeomEdgePtr Edge() const { return myEdge; }
+
+  /// Draw arrow that represent direction of the edge.
+  Standard_EXPORT void DrawArrow(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor);
+
+  /// \brief Compare addresses of edges
+  class Comparator
+  {
+  public:
+    /// Return \c true if the address of the first edge is less than the address of the second
+    MODULEBASE_EXPORT
+      bool operator ()(const std::shared_ptr<GeomAPI_Edge>& theEdge1,
+                       const std::shared_ptr<GeomAPI_Edge>& theEdge2) const;
+  };
+
+  DEFINE_STANDARD_RTTIEXT(ModuleBase_ArrowPrs, AIS_InteractiveContext)
+
+private:
+
+  /// The edge whose direction to display.
+  GeomEdgePtr myEdge;
+};
+
+typedef std::pair<GeomEdgePtr, Handle(ModuleBase_ArrowPrs)> EdgeDirection;
+typedef std::map<GeomEdgePtr, Handle(ModuleBase_ArrowPrs), ModuleBase_ArrowPrs::Comparator> EdgesDirectionMap;
+
+#endif
\ No newline at end of file
index c9cf044731ea893bac90f50417cca39efabb3bbd..ccba3a2071f008092dd64616e85add91ddb700c8 100644 (file)
 #include <TopoDS_Edge.hxx>
 #include <BRepMesh_IncrementalMesh.hxx>
 #include <Standard_Version.hxx>
+#include <Prs3d_Arrow.hxx>
+#include <GeomAdaptor_Curve.hxx>
+#include <TopExp.hxx>
+#include <GCPnts_AbscissaPoint.hxx>
 
 #if OCC_VERSION_HEX > 0x070400
 #include <StdPrs_ToolTriangulatedShape.hxx>
@@ -300,6 +304,49 @@ void ModuleBase_ResultPrs::Compute(
   catch (...) {
     return;
   }
+  if (myResult.get() && ModelAPI_Tools::isShowEdgesDirection(myResult))
+  {
+    TopExp_Explorer Exp(myshape, TopAbs_EDGE);
+    for (; Exp.More(); Exp.Next()) {
+      TopoDS_Edge anEdgeE = TopoDS::Edge(Exp.Current());
+      if (anEdgeE.IsNull())
+        continue;
+
+      // draw curve direction (issue 0021087)
+      anEdgeE.Orientation(TopAbs_FORWARD);
+
+      TopoDS_Vertex aV1, aV2;
+      TopExp::Vertices(anEdgeE, aV1, aV2);
+      gp_Pnt aP1 = BRep_Tool::Pnt(aV1);
+      gp_Pnt aP2 = BRep_Tool::Pnt(aV2);
+
+      double fp, lp;
+      gp_Vec aDirVec;
+      Handle(Geom_Curve) C = BRep_Tool::Curve(anEdgeE, fp, lp);
+
+      if (C.IsNull()) continue;
+
+      if (anEdgeE.Orientation() == TopAbs_FORWARD)
+        C->D1(lp, aP2, aDirVec);
+      else {
+        C->D1(fp, aP1, aDirVec);
+        aP2 = aP1;
+      }
+      GeomAdaptor_Curve aAdC;
+      aAdC.Load(C, fp, lp);
+      Standard_Real aDist = GCPnts_AbscissaPoint::Length(aAdC, fp, lp);
+
+      if (aDist > gp::Resolution()) {
+        gp_Dir aDir;
+        if (anEdgeE.Orientation() == TopAbs_FORWARD)
+          aDir = aDirVec;
+        else
+          aDir = -aDirVec;
+
+        Prs3d_Arrow::Draw(thePresentation->CurrentGroup(), aP2, aDir, M_PI / 180.*5., aDist / 10.);
+      }
+    }
+  }
 
   // visualize hidden sub-shapes transparent
   if (myResult.get()) {
index 64c590e661fc64b39e633776b80aac65d9be18ec..e42131d55865497631ec136d9cc1000517deb9ba 100644 (file)
@@ -157,6 +157,11 @@ void XGUI_ContextMenuMgr::createActions()
                                            aDesktop);
   addAction("WIREFRAME_CMD", anAction);
 
+  anAction = ModuleBase_Tools::createAction(QIcon(":pictures/edges_dir.png"), tr("Show edges direction"),
+                                           aDesktop);
+  anAction->setCheckable(true);
+  addAction("SHOW_EDGES_DIRECTION_CMD", anAction);
+
   anAction = ModuleBase_Tools::createAction(QIcon(":pictures/iso_lines.png"), tr("Define Isos..."),
                                            aDesktop);
   addAction("ISOLINES_CMD", anAction);
@@ -340,6 +345,9 @@ void XGUI_ContextMenuMgr::updateObjectBrowserMenu()
             action("WIREFRAME_CMD")->setEnabled(true);
             action("SHADING_CMD")->setEnabled(true);
           }
+          action("SHOW_EDGES_DIRECTION_CMD")->setEnabled(true);
+          action("SHOW_EDGES_DIRECTION_CMD")->setChecked(ModelAPI_Tools::isShowEdgesDirection(aResult));
+
           action("SHOW_ISOLINES_CMD")->setEnabled(true);
           action("SHOW_ISOLINES_CMD")->setChecked(ModelAPI_Tools::isShownIsoLines(aResult));
           action("ISOLINES_CMD")->setEnabled(true);
@@ -396,6 +404,7 @@ void XGUI_ContextMenuMgr::updateObjectBrowserMenu()
         action("SHOW_ONLY_CMD")->setEnabled(true);
         action("SHADING_CMD")->setEnabled(true);
         action("WIREFRAME_CMD")->setEnabled(true);
+        action("SHOW_EDGES_DIRECTION_CMD")->setEnabled(true);
         action("SHOW_ISOLINES_CMD")->setEnabled(true);
         action("ISOLINES_CMD")->setEnabled(true);
       }
@@ -590,6 +599,10 @@ void XGUI_ContextMenuMgr::updateViewerMenu()
           if (aResult.get()) {
             action("SHOW_ISOLINES_CMD")->setEnabled(true);
             action("SHOW_ISOLINES_CMD")->setChecked(ModelAPI_Tools::isShownIsoLines(aResult));
+
+            action("SHOW_EDGES_DIRECTION_CMD")->setEnabled(true);
+            action("SHOW_EDGES_DIRECTION_CMD")->setChecked(
+              ModelAPI_Tools::isShowEdgesDirection(aResult));
           }
         }
       }
@@ -696,6 +709,7 @@ void XGUI_ContextMenuMgr::buildObjBrowserMenu()
   aList.clear();
   aList.append(action("WIREFRAME_CMD"));
   aList.append(action("SHADING_CMD"));
+  aList.append(action("SHOW_EDGES_DIRECTION_CMD"));
   aList.append(mySeparator1); // this separator is not shown as this action is added after show only
   // qt list container contains only one instance of the same action
   aList.append(action("SHOW_CMD"));
@@ -720,6 +734,7 @@ void XGUI_ContextMenuMgr::buildObjBrowserMenu()
   aList.clear();
   aList.append(action("WIREFRAME_CMD"));
   aList.append(action("SHADING_CMD"));
+  aList.append(action("SHOW_EDGES_DIRECTION_CMD"));
   aList.append(mySeparator1); // this separator is not shown as this action is added after show only
   // qt list container contains only one instance of the same action
   aList.append(action("SHOW_CMD"));
@@ -801,6 +816,7 @@ void XGUI_ContextMenuMgr::buildViewerMenu()
   aList.clear();
   aList.append(action("WIREFRAME_CMD"));
   aList.append(action("SHADING_CMD"));
+  aList.append(action("SHOW_EDGES_DIRECTION_CMD"));
   aList.append(mySeparator2);
   aList.append(action("COLOR_CMD"));
   aList.append(action("DEFLECTION_CMD"));
@@ -845,6 +861,7 @@ void XGUI_ContextMenuMgr::addObjBrowserMenu(QMenu* theMenu) const
   } else if (aSelected > 1) {
       anActions.append(action("WIREFRAME_CMD"));
       anActions.append(action("SHADING_CMD"));
+      anActions.append(action("SHOW_EDGES_DIRECTION_CMD"));
       anActions.append(mySeparator1);
       anActions.append(action("SHOW_CMD"));
       anActions.append(action("HIDE_CMD"));
index 126c07066fdc9a2a6e1fd23be40e2529138f75f5..8859ef6546a163852b28fd902d1389e201563700 100644 (file)
@@ -1822,6 +1822,8 @@ void XGUI_Workshop::onContextMenuCommand(const QString& theId, bool isChecked)
     setDisplayMode(anObjects, XGUI_Displayer::Shading);
   else if (theId == "WIREFRAME_CMD")
     setDisplayMode(anObjects, XGUI_Displayer::Wireframe);
+  else if (theId == "SHOW_EDGES_DIRECTION_CMD")
+    toggleEdgesDirection(anObjects);
   else if (theId == "HIDEALL_CMD") {
     QObjectPtrList aList = myDisplayer->displayedObjects();
     foreach (ObjectPtr aObj, aList) {
@@ -3055,6 +3057,32 @@ void XGUI_Workshop::setDisplayMode(const QObjectPtrList& theList, int theMode)
     myDisplayer->updateViewer();
 }
 
+//**************************************************************
+void XGUI_Workshop::toggleEdgesDirection(const QObjectPtrList& theList)
+{
+  foreach(ObjectPtr anObj, theList) {
+    ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(anObj);
+    if (aResult.get() != NULL)
+    {
+      bool aToShow = !ModelAPI_Tools::isShowEdgesDirection(aResult);
+      ResultBodyPtr aBodyResult = std::dynamic_pointer_cast<ModelAPI_ResultBody>(aResult);
+      if (aBodyResult.get() != NULL) { // change property for all sub-solids
+        std::list<ResultPtr> allRes;
+        ModelAPI_Tools::allSubs(aBodyResult, allRes);
+        std::list<ResultPtr>::iterator aRes;
+        for (aRes = allRes.begin(); aRes != allRes.end(); aRes++) {
+          ModelAPI_Tools::showEdgesDirection(*aRes, aToShow);
+          myDisplayer->redisplay(*aRes, false);
+        }
+      }
+      ModelAPI_Tools::showEdgesDirection(aResult, aToShow);
+      myDisplayer->redisplay(anObj, false);
+    }
+  }
+  if (theList.size() > 0)
+    myDisplayer->updateViewer();
+}
+
 //**************************************************************
 void XGUI_Workshop::closeDocument()
 {
index 19234656d4e9273fa790ebc486f1c92601b95628..81145343e00f38aff875f4adcb2d746c97334a02 100644 (file)
@@ -236,6 +236,9 @@ Q_OBJECT
   /// \param theMode a mode to set (see \ref XGUI_Displayer)
   void setDisplayMode(const QObjectPtrList& theList, int theMode);
 
+  /// Toggle visualisation of edges direction
+  void toggleEdgesDirection(const QObjectPtrList& theList);
+
   /// Set selection mode in viewer. If theMode=-1 then activate default mode
   /// \param theMode the selection mode (according to TopAbs_ShapeEnum)
   void setViewerSelectionMode(int theMode);
index 4f5f1ee3b190ed043ba5217932ce25549b631077..16f7ea842a982ab90ad26c53d91ed53d93461acf 100644 (file)
       <source>Recover</source>
       <translation>Récupérer</translation>
     </message>
+    <message>
+        <source>Show edges direction</source>
+        <translation>Afficher la direction des bords</translation>
+    </message>
 </context>
 <context>
     <name>XGUI_DataTree</name>
index 2b81d5e48f9dfedc886df9855a9fb1bfbe32cfd8..f598306b4f82b193e297ddc6b88dbc2c3ac2bf1d 100644 (file)
@@ -98,5 +98,6 @@
      <file>pictures/CrossCursor.png</file>
      <file>pictures/HandCursor.png</file>
      <file>pictures/iso_lines.png</file>
+     <file>pictures/edges_dir.png</file>
  </qresource>
  </RCC>
diff --git a/src/XGUI/pictures/edges_dir.png b/src/XGUI/pictures/edges_dir.png
new file mode 100644 (file)
index 0000000..bff6162
Binary files /dev/null and b/src/XGUI/pictures/edges_dir.png differ