]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'Dev_2.8.0'
authornds <nds@opencascade.com>
Wed, 4 Oct 2017 04:39:24 +0000 (07:39 +0300)
committernds <nds@opencascade.com>
Wed, 4 Oct 2017 04:39:24 +0000 (07:39 +0300)
Conflicts:
src/XGUI/XGUI_DataModel.h
src/XGUI/XGUI_OperationMgr.cpp

13 files changed:
1  2 
CMakeLists.txt
src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.cpp
src/GeomAlgoAPI/GeomAlgoAPI_ShapeTools.h
src/Model/Model_AttributeSelection.cpp
src/ModuleBase/ModuleBase_ModelWidget.cpp
src/ModuleBase/ModuleBase_ModelWidget.h
src/ModuleBase/ModuleBase_WidgetEditor.cpp
src/ModuleBase/ModuleBase_WidgetEditor.h
src/XGUI/XGUI_DataModel.cpp
src/XGUI/XGUI_DataModel.h
src/XGUI/XGUI_MenuMgr.cpp
src/XGUI/XGUI_OperationMgr.cpp
src/XGUI/XGUI_OperationMgr.h

diff --cc CMakeLists.txt
Simple merge
index 443437126dc064a18e4054345574a02ef5c2c9d0,7fcdc7a0e9ecbddcc8eae633ddc8f3498cecf3f7..04ae892e351dcb00e8e2ede067e17185042ca8fe
  #include <Geom2d_Curve.hxx>
  #include <BRepLib_CheckCurveOnSurface.hxx>
  #include <BRep_Tool.hxx>
 +#include <Geom_Line.hxx>
  #include <Geom_Plane.hxx>
 +#include <GeomAPI_ProjectPointOnCurve.hxx>
  #include <GeomLib_IsPlanarSurface.hxx>
  #include <GeomLib_Tool.hxx>
+ #include <GeomAPI_ExtremaCurveSurface.hxx>
  #include <gp_Pln.hxx>
  #include <GProp_GProps.hxx>
  #include <IntAna_IntConicQuad.hxx>
@@@ -871,20 -915,3 +918,20 @@@ std::shared_ptr<GeomAPI_Shape> GeomAlgo
  
    return aResultShape;
  }
- }
 +
 +//==================================================================================================
 +std::shared_ptr<GeomAPI_Dir> GeomAlgoAPI_ShapeTools::buildDirFromAxisAndShape(
 +                                    const std::shared_ptr<GeomAPI_Shape> theBaseShape,
 +                                    const std::shared_ptr<GeomAPI_Ax1> theAxis)
 +{
 +  gp_Pnt aCentreOfMassPoint =
 +    GeomAlgoAPI_ShapeTools::centreOfMass(theBaseShape)->impl<gp_Pnt>();
 +  Handle(Geom_Line) aLine = new Geom_Line(theAxis->impl<gp_Ax1>());
 +  GeomAPI_ProjectPointOnCurve aPrjTool(aCentreOfMassPoint, aLine);
 +  gp_Pnt aPoint = aPrjTool.NearestPoint();
 +
 +  std::shared_ptr<GeomAPI_Dir> aDir(new GeomAPI_Dir(aCentreOfMassPoint.X()-aPoint.X(),
 +                                                    aCentreOfMassPoint.Y()-aPoint.Y(),
 +                                                    aCentreOfMassPoint.Z()-aPoint.Z()));
 +  return aDir;
++}
index 809ccd4ec94ee38ed5e66db241608e92179a3f2a,c8177d56a5bd09032f130746a97d52d136ca6e17..757165744253c45657caa6f25a7e2b52ccdc92ba
@@@ -71,11 -71,10 +71,13 @@@ Q_OBJEC
    /// Returns true if the event is processed.
    virtual bool processEnter();
  
 +  /// Reject the current editor dialog if it is shown and returns true.
 +  virtual bool processEscape();
 +
  private:
    /// Show editor
+   /// \param theSpinMinValue a minimal value of popup menu spin box
+   /// \param theSpinMaxValue a maximum value of popup menu spin box
    /// \param theOutValue a result value
    /// \param theOutText a result text
    /// \return true if the editor value is accepted
Simple merge
index 9052260aa6554d85ea48355e660f655caf69f715,cbcb030daf645f294010ebc9c893ed1b9e48fc30..53e9109801667ffbe392733c4636fb5dbbcd619d
@@@ -176,33 -182,11 +182,36 @@@ private
    /// \param fromRoot - root document flag
    QStringList listOfShowNotEmptyFolders(bool fromRoot = true) const;
  
+   VisibilityState getVisibilityState(const QModelIndex& theIndex) const;
 +  void addShownFolder(DocumentPtr theDoc, QString theFolder)
 +  {
 +    if (!myShownFolders.contains(theDoc)) {
 +      myShownFolders[theDoc] = QStringList();
 +    }
 +    myShownFolders[theDoc].append(theFolder);
 +  }
 +
 +  void removeShownFolder(DocumentPtr theDoc, QString theFolder)
 +  {
 +    if (myShownFolders.contains(theDoc)) {
 +      myShownFolders[theDoc].removeAll(theFolder);
 +      if (myShownFolders[theDoc].isEmpty())
 +        myShownFolders.remove(theDoc);
 +    }
 +  }
 +
 +  bool hasShownFolder(DocumentPtr theDoc, QString theFolder) const
 +  {
 +    if (myShownFolders.contains(theDoc))
 +      return myShownFolders[theDoc].contains(theFolder);
 +    return false;
 +  }
 +
    Config_DataModelReader* myXMLReader;
  
+   XGUI_Workshop* myWorkshop;
 +  QMap<DocumentPtr, QStringList> myShownFolders;
    //bool myIsEventsProcessingBlocked;
  };
  
Simple merge
Simple merge
Simple merge