]> SALOME platform Git repositories - modules/hexablock.git/commitdiff
Salome HOME
Livraison C-S du 28/11/2013
authorabuhsing <abuhsing>
Thu, 28 Nov 2013 14:54:35 +0000 (14:54 +0000)
committerabuhsing <abuhsing>
Thu, 28 Nov 2013 14:54:35 +0000 (14:54 +0000)
 Modified Files:
  Tag: V7_main
  salome_adm/unix/SALOMEconfig.h.in
  src/HEXABLOCK/HexDocument.hxx src/HEXABLOCK/HexDocument_v6.cxx
  src/HEXABLOCK/HexEdge.cxx src/HEXABLOCK/HexEdge.hxx
  src/HEXABLOCK/HexEdgeShape.cxx src/HEXABLOCK/HexEdgeShape.hxx
  src/HEXABLOCK/HexGlobale.hxx src/HEXABLOCK/HexSubShape.cxx
  src/HEXABLOCK/HexSubShape.hxx src/HEXABLOCK/hexa_base.hxx
  src/HEXABLOCK/work/hexablock.py
  src/HEXABLOCKGUI/CMakeLists.txt
  src/HEXABLOCKGUI/HEXABLOCKGUI.cxx
  src/HEXABLOCKGUI/HEXABLOCKGUI.hxx
  src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentItem.hxx
  src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentModel.cxx
  src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentModel.hxx
  src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.cxx
  src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.hxx
  src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.hxx
  src/HEXABLOCKGUI/HEXABLOCKGUI_Exception.hxx
  src/HEXABLOCKGUI/HEXABLOCKGUI_GraphicViewsHandler.hxx
  src/HEXABLOCKGUI/HEXABLOCKGUI_OCCSelector.h
  src/HEXABLOCKGUI/HEXABLOCKGUI_OccGraphicView.hxx
  src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.hxx
  src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.hxx
  src/HEXABLOCKGUI/HEXABLOCKGUI_Trace.hxx
  src/HEXABLOCKGUI/HEXABLOCKGUI_VtkDocumentGraphicView.hxx
  src/HEXABLOCKGUI/MakeCylinder_QTD.ui
  src/HEXABLOCKGUI/MakePipe_QTD.ui
  src/HEXABLOCKGUI/MyBasicGUI_PointDlg.hxx
  src/HEXABLOCKGUI/MyGEOMBase_Skeleton.hxx
  src/HEXABLOCKGUI/ReplaceHexa_QTD.ui
  src/HEXABLOCKGUI/Resource.hxx
  src/HEXABLOCKGUI/klinkitemselectionmodel.hxx
  src/HEXABLOCKGUI/kmodelindexproxymapper.hxx
  src/HEXABLOCK_SWIG/hexablock_swig.py
  src/HEXABLOCK_SWIG/hexablock_swig_wrap.cc
 Removed Files:
  Tag: V7_main
  src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentDelegate.cxx
  src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentDelegate.hxx
 ----------------------------------------------------------------------

39 files changed:
src/HEXABLOCK/HexDocument.hxx
src/HEXABLOCK/HexDocument_v6.cxx
src/HEXABLOCK/HexEdge.cxx
src/HEXABLOCK/HexEdge.hxx
src/HEXABLOCK/HexEdgeShape.cxx
src/HEXABLOCK/HexEdgeShape.hxx
src/HEXABLOCK/HexSubShape.cxx
src/HEXABLOCK/HexSubShape.hxx
src/HEXABLOCK/hexa_base.hxx
src/HEXABLOCK/work/hexablock.py
src/HEXABLOCKGUI/CMakeLists.txt
src/HEXABLOCKGUI/HEXABLOCKGUI.cxx
src/HEXABLOCKGUI/HEXABLOCKGUI.hxx
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentDelegate.cxx [deleted file]
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentDelegate.hxx [deleted file]
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentItem.hxx
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentModel.cxx
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentModel.hxx
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.cxx
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentPanel.hxx
src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentSelectionModel.hxx
src/HEXABLOCKGUI/HEXABLOCKGUI_Exception.hxx
src/HEXABLOCKGUI/HEXABLOCKGUI_GraphicViewsHandler.hxx
src/HEXABLOCKGUI/HEXABLOCKGUI_OCCSelector.h
src/HEXABLOCKGUI/HEXABLOCKGUI_OccGraphicView.hxx
src/HEXABLOCKGUI/HEXABLOCKGUI_Resource.hxx
src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.hxx
src/HEXABLOCKGUI/HEXABLOCKGUI_Trace.hxx
src/HEXABLOCKGUI/HEXABLOCKGUI_VtkDocumentGraphicView.hxx
src/HEXABLOCKGUI/MakeCylinder_QTD.ui
src/HEXABLOCKGUI/MakePipe_QTD.ui
src/HEXABLOCKGUI/MyBasicGUI_PointDlg.hxx
src/HEXABLOCKGUI/MyGEOMBase_Skeleton.hxx
src/HEXABLOCKGUI/ReplaceHexa_QTD.ui
src/HEXABLOCKGUI/Resource.hxx
src/HEXABLOCKGUI/klinkitemselectionmodel.hxx
src/HEXABLOCKGUI/kmodelindexproxymapper.hxx
src/HEXABLOCK_SWIG/hexablock_swig.py
src/HEXABLOCK_SWIG/hexablock_swig_wrap.cc

index 4d7df443bea287272f6c389e9499861a83132ac3..9a2307d76026a9019f539162043f5dce93d2ea7a 100755 (executable)
@@ -110,6 +110,9 @@ public :
    Elements* replace (Quads pattern, Vertex* p1, Vertex* c1,
                       Vertex* p2, Vertex* c2,  Vertex* p3, Vertex* c3);
 
+   Elements* replaceHexas (Quads pattern, Quads cible,  Vertex* p1, Vertex* c1,
+                           Vertex* p2, Vertex* c2,  Vertex* p3, Vertex* c3);
+
    int     mergeVertices (Vertex* v1, Vertex* v2);
    int     mergeEdges    (Edge* e1, Edge* e2, Vertex* v1, Vertex* v2);
    int     mergeQuads    (Quad* q1, Quad* q2, Vertex* v1, Vertex* v2,
index a8ba2e6aab3eac6e860e663f40e28ca04d6e7d57..29e8be203076f1223abca2ec0d22b43fab46b71d 100644 (file)
@@ -1144,4 +1144,22 @@ Elements* Document::cut (Edge* edge, RealVector& tlen)
    DumpReturn (grid);
    return grid;
 }
+// ========================================================= replaceHexas
+Elements* Document::replaceHexas (Quads pattern, Quads cible, Vertex* p1, 
+                                  Vertex* c1, Vertex* p2,     Vertex* c2, 
+                                  Vertex* p3, Vertex* c3)
+{
+   DumpStart ("replace", pattern << cible << p1 << c1 << p2 << c2 << p3 << c3);
+
+   Elements* t_hexas = new Elements (this);
+
+   //if (BadElement (edge))
+      {
+      t_hexas->setError (HERR);
+      Mess << "This function is not yet implemented";
+      }
+
+   DumpReturn (t_hexas);
+   return t_hexas;
+}
 END_NAMESPACE_HEXA
index 7fc3dc53538b051cffa228a8e1c4163cc3b5ee86..e0e34a300326671dafbc004fa391bfe42c8cfbf9 100755 (executable)
@@ -517,4 +517,13 @@ double Edge::getAssoLen ()
 
    return longueur;
 }
+// ========================================================= getLength
+double Edge::getLength ()
+{
+   Real3 p1, p2;
+   e_vertex [V_AMONT]-> getAssoCoord (p1);
+   e_vertex [V_AVAL ]-> getAssoCoord (p2);
+   double longueur = calc_distance (p1, p2);
+   return longueur;
+}
 END_NAMESPACE_HEXA
index 0e05e80e8103687fa3757bd97266bba456d0b552..e86ea1225fc89e4f57b5c747c99fe0b9746c6dde 100755 (executable)
@@ -35,6 +35,7 @@ public:
     virtual void clearAssociation ();
     void setColor  (double valeur);
     bool    getWay ()              { return e_way ; }
+    double  getLength ();
 
     Edge (Vertex* va, Vertex* vb);
 
index 5aed434e720f561207534bf5b19d4ef571319e3e..b6525290dbb8880b0349eef6ec985ef846de114d 100755 (executable)
 #include <GCPnts_AbscissaPoint.hxx>
 
 #include <GeomAPI_ProjectPointOnCurve.hxx>
+#include <Geom_Circle.hxx>
+
+/****************
+#include <Standard_Stream.hxx>
+#include <GEOMImpl_IMeasureOperations.hxx>
+#include <GEOMImpl_Types.hxx>
+#include <GEOMImpl_MeasureDriver.hxx>
+#include <GEOMImpl_IMeasure.hxx>
+#include <GEOMImpl_IShapesOperations.hxx>
+#include <GEOMUtils.hxx>
+#include <GEOMAlgo_ShapeInfo.hxx>
+#include <GEOMAlgo_ShapeInfoFiller.hxx>
+*********************************/
 
 BEGIN_NAMESPACE_HEXA
 
@@ -50,6 +63,8 @@ EdgeShape::EdgeShape (NewShape* dad, int id)
    lin_end   [dir_x] = lin_end   [dir_y] = lin_end   [dir_z] = 0;
    par_mini   = 0;
    par_maxi   = 0;
+   lin_radius = 0;
+   lin_angle  = 0;
 }
 // ====================================================== getCurve
 BRepAdaptor_Curve* EdgeShape::getCurve ()
@@ -168,7 +183,6 @@ double EdgeShape::getParam (double* coord)
       return -1.0;
 
    GeomAdaptor_Curve  adapt_curve (handle);
-   kind_of   = (EnumKindOfShape) (adapt_curve.GetType() + 1);
 
 /******************
    enum GeomAbs_CurveType { GeomAbs_Line, GeomAbs_Circle, GeomAbs_Ellipse,
@@ -197,6 +211,9 @@ void EdgeShape::addAssociation (Edge* edge)
    is_associated = true;
 }
 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ // ------- Cf GEOMImpl_IMeasureOperations.cxx
+
 // ====================================================== updateCurve
 void EdgeShape::updateCurve ()
 {
@@ -224,5 +241,40 @@ void EdgeShape::updateCurve ()
                                // Extremites
    getPoint (0, lin_start);
    getPoint (1, lin_end);
+
+   lin_radius = lin_angle = 0;
+   kind_of    = (EnumKindOfShape) adapt_curve.GetType();
+   if (kind_of==KS_Circle)
+      {
+      Handle(Geom_Circle) hgc = Handle(Geom_Circle)::DownCast (handle);
+      lin_radius = hgc->Radius ();
+      lin_angle  = (par_maxi-par_mini)*180/M_PI;
+      PutData (lin_radius);
+      PutData (lin_angle);
+      }
+}
+// ====================================================== getAngle
+double EdgeShape::getAngle ()
+{
+   if (maj_curve)
+      updateCurve ();
+
+   return lin_angle;
+}
+// ====================================================== getRadius
+double EdgeShape::getRadius ()
+{
+   if (maj_curve)
+      updateCurve ();
+
+   return lin_radius;
+}
+// ====================================================== getRadius
+EnumKindOfShape EdgeShape::kindOf ()
+{
+   if (maj_curve)
+      updateCurve ();
+
+   return kind_of;
 }
 END_NAMESPACE_HEXA
index 212a7288fa091745aea5ab4847c9e74192064773..4c5404cf6fae0dd40f18ef40b6f92713365b850c 100644 (file)
@@ -24,10 +24,13 @@ public :
     int     getPoint  (double param,    double point[]);
     double  getParam  (double point[]);
     double  getLength ();
+    double  getRadius ();
+    double  getAngle  ();
     int     onExtremity (double point[]);
     bool    isLinear    ()                   { return kind_of == KS_Line ; }
 
     static bool samePoints (double point1[], double point2[]);
+    virtual EnumKindOfShape kindOf ();
 
     // void   saveXml (XmlWriter* xml);
 private :
@@ -38,6 +41,7 @@ private :
     Real3  lin_start;
     Real3  lin_end;
     double lin_length, par_mini, par_maxi;
+    double lin_radius, lin_angle;
 
     bool  maj_curve;
     Edges tab_assoc;
index 5195eb9404b00d2f590642ef974789dd851189ca..ba29f01c4d1bf4c49159de343e4b62087a1fd4b9 100755 (executable)
@@ -41,6 +41,7 @@ SubShape::SubShape (NewShape* dad, int id, int dim)
    sub_ident  = id;
    sub_dim    = dim;
    maj_brep   = maj_shape = true;
+   kind_of    = KS_None; 
 }
 // ====================================================== getShape
 const TopoDS_Shape& SubShape::getShape ()
index 1feea5460864cf2e5e548152d5ce1eeec0063add..a2d8cc243fee0763a3fa111553121c54f2193203 100644 (file)
@@ -18,7 +18,7 @@ public :
     cpchar      getParentName () const;
     int         getIdent ()             { return sub_ident ; }
     int         getDim   ()             { return sub_dim ; }
-    EnumKindOfShape kindOf   ()             { return kind_of ; }
+    virtual EnumKindOfShape kindOf ()   { return kind_of ; }
 
     const string&       getBrep  ();
     virtual const TopoDS_Shape& getShape ();
index 684ec49357bac89128b9c9867c9ccf6495d10026..10b62bed1bae9f8387a98683f84e55a2374b8caa 100755 (executable)
@@ -173,9 +173,9 @@ enum EnumHVertex {V_ACE, V_ACF, V_ADE, V_ADF, V_BCE, V_BCF, V_BDE, V_BDF,
 
 enum EnumQDirection {Q_INSIDE, Q_DIRECT, Q_INVERSE, Q_UNDEFINED, Q_WAITING };
 
-enum EnumKindOfShape {KS_None, KS_Line, KS_Circle, KS_Ellipse, KS_Hyperbola,
+enum EnumKindOfShape {KS_Line, KS_Circle, KS_Ellipse, KS_Hyperbola,
                       KS_Parabola, KS_BezierCurve, KS_BSplineCurve,
-                      KS_OtherCurve };
+                      KS_OtherCurve, KS_None=-1 };
 
 enum { CylSmall=0, CylBig=1, NxInt=1, NxExt=2 };
 
index ff151b1dae2c13771a527d6c45363b832e643abb..5b483c081d24cf989c0228bf3c255c9aae4b6d26 100644 (file)
@@ -49,3 +49,13 @@ def mesh (doc, name=None, dim=3, container="FactoryServer"):
 def dump (doc, mesh=None, full=False) :
    return  [ 36, 15, 36, 17]
 
+# ======================================================= printMessage
+def printMessage () :
+
+    nl = hexa.sizeofMessage()
+    if nl == 0 : 
+       return
+    for ni in range (nl) :
+        mess = hexa.getMessageLine (ni)
+        print mess
+
index ac53afbc8e48a282a4f88aece49b9b5a602e04a0..af1c2926fb1191375f7be29572df1b1a57320013 100644 (file)
@@ -74,7 +74,6 @@ SET(_moc_HEADERS
   HEXABLOCKGUI.hxx
   HEXABLOCKGUI_VtkDocumentGraphicView.hxx
   HEXABLOCKGUI_DocumentPanel.hxx
-  HEXABLOCKGUI_DocumentDelegate.hxx
   HEXABLOCKGUI_DocumentSelectionModel.hxx
   HEXABLOCKGUI_DocumentModel.hxx
   kmodelindexproxymapper.hxx
@@ -118,8 +117,6 @@ SET(_other_SOURCES
   HEXABLOCKGUI_DocumentSelectionModel.cxx
   HEXABLOCKGUI_DocumentItem.hxx
   HEXABLOCKGUI_DocumentItem.cxx
-  HEXABLOCKGUI_DocumentDelegate.hxx
-  HEXABLOCKGUI_DocumentDelegate.cxx
   HEXABLOCKGUI_DocumentPanel.hxx
   HEXABLOCKGUI_DocumentPanel.cxx
   HEXABLOCKGUI_SalomeTools.hxx
index d5843dbc7e6e8c80f279021db94eacd1059fc962..a57319c434b5b112edabde045a9fdc3b3331b616 100755 (executable)
 
 
 #include <Visual3d_ViewManager.hxx>
+#include <Graphic3d_Structure.hxx>
+#include <Graphic3d_Group.hxx>
 #include <V3d_PerspectiveView.hxx>
 #include <V3d_AmbientLight.hxx>
+#include <Graphic3d_GraphicDevice.hxx>
+#include <Graphic3d_Array1OfVertex.hxx>
 #include <V3d_DirectionalLight.hxx>
 #include <Xw_Window.hxx>
 #include <V3d_TypeOfShadingModel.hxx>
@@ -617,6 +621,7 @@ void HEXABLOCKGUI::onObjectBrowserClick(const QModelIndex& index)
         {
             docGView->setViewWindow(graphicViewsHandler->createVtkWindow());
             docGView->getViewWindow()->installEventFilter(this);
+            showAllMenus();
         }
         else
             docGView->setViewWindow(currentDocGView->getViewWindow());
@@ -649,7 +654,6 @@ void HEXABLOCKGUI::onWindowClosed( SUIT_ViewWindow* svw)
     SVTK_ViewWindow* window = dynamic_cast<SVTK_ViewWindow*>(svw);
     if (window != NULL)
     {
-
         //VTK clean close
         if (currentDocGView != NULL && currentDocGView->getViewWindow() == window)
         { //HexaBlock Vtk Window has been closed
@@ -697,7 +701,6 @@ void HEXABLOCKGUI::onWindowClosed( SUIT_ViewWindow* svw)
 //        if (_treeViewDelegate != NULL) _treeViewDelegate->closeDialog();
 
         currentOccGView->getViewWindow()->removeEventFilter(this);
-
         currentOccGView->setViewWindow(NULL);
     }
 }
@@ -1689,35 +1692,13 @@ void HEXABLOCKGUI::showMeshMenus(bool show)
     setToolShown( _computeMesh, show);
 }
 
-void HEXABLOCKGUI::showActor()
-{
-    VtkDocumentGraphicView* currentVtkGView = getCurrentVtkGraphicView();
-    if (currentVtkGView == NULL || currentVtkGView->getViewWindow() == NULL ||
-                currentVtkGView->isEmpty() || currentVtkGView->getDocumentActor() == NULL)
-        return;
-
-    currentVtkGView->getViewWindow()->setFocus();
-    currentVtkGView->getViewWindow()->Display(currentVtkGView->getDocumentActor()->getIO());
-    currentVtkGView->update();
-    currentVtkGView->getViewWindow()->onFitAll();
-
-    //update the visibility state now
-    SalomeApp_Study* aStudy = HEXABLOCKGUI::activeStudy();
-    SUIT_ViewManager* vman = currentVtkGView->getViewWindow()->getViewManager();
-    if (aStudy == NULL || vman == NULL) return;
-
-    Handle(SALOME_InteractiveObject) anIO = currentVtkGView->getDocumentActor()->getIO();
-    aStudy->setObjectProperty(vman->getId(), anIO->getEntry(),  "Visibility", 1 );
-    displayer()->setVisibilityState(anIO->getEntry(), Qtx::ShownState);
-}
-
-//SOCC_Prs* currentPrs = NULL;
-void HEXABLOCKGUI::showOnlyActor()
+void HEXABLOCKGUI::showVtkActor()
 {
     VtkDocumentGraphicView* currentVtkGView = getCurrentVtkGraphicView();
     if (currentVtkGView == NULL || currentVtkGView->isEmpty() ||
             currentVtkGView->getDocumentActor() == NULL)
         return;
+
     SVTK_ViewWindow* vtkView = currentVtkGView->getViewWindow();
     if (vtkView == NULL)
         return;
@@ -1727,8 +1708,8 @@ void HEXABLOCKGUI::showOnlyActor()
 
     //show only the current actor -----------------
     vtkView->setFocus();
-//    vtkView->DisplayOnly(currentVtkGView->getDocumentActor()->getIO());
-    Document_Actor *lastDocActor, *currentDocActor = currentVtkGView->getDocumentActor();
+    //    vtkView->DisplayOnly(currentVtkGView->getDocumentActor()->getIO());
+    Document_Actor *lastDocActor;
     if (lastVtkDocGView != NULL)
     {
         lastDocActor = lastVtkDocGView->getDocumentActor();
@@ -1749,11 +1730,12 @@ void HEXABLOCKGUI::showOnlyActor()
         displayer()->setVisibilityState(anIO->getEntry(), Qtx::ShownState);
     }
     vtkView->onFitAll();
+}
 
-//    //showOnly in occ viewer -------------
-
+void HEXABLOCKGUI::showOccActor()
+{
     if (currentOccGView == NULL)
-       return;
+        return;
     OCCViewer_ViewWindow* occView = currentOccGView->getViewWindow();
     if (occView == NULL)
         return;
@@ -1761,7 +1743,6 @@ void HEXABLOCKGUI::showOnlyActor()
     if (vf == NULL)
         return;
 
-//    vf->EraseAll();
     if (lastOccPrs != NULL)
         vf->Erase(lastOccPrs);
     currentOccGView->globalSelection();
@@ -1772,13 +1753,12 @@ void HEXABLOCKGUI::showOnlyActor()
     occView->onFitAll();
 }
 
-void HEXABLOCKGUI::hideActor()
+void HEXABLOCKGUI::hideVtkActor()
 {
-    // * vtk --
     VtkDocumentGraphicView* currentVtkGView = getCurrentVtkGraphicView();
     if (currentVtkGView == NULL || currentVtkGView->isEmpty() ||
-          currentVtkGView->getViewWindow() == NULL ||
-          currentVtkGView->getDocumentActor() == NULL) return;
+        currentVtkGView->getViewWindow() == NULL ||
+        currentVtkGView->getDocumentActor() == NULL) return;
 
     currentVtkGView->getViewWindow()->Erase(currentVtkGView->getDocumentActor()->getIO());
     currentVtkGView->getViewWindow()->onResetView();
@@ -1791,17 +1771,19 @@ void HEXABLOCKGUI::hideActor()
     Handle(SALOME_InteractiveObject) anIO = currentVtkGView->getDocumentActor()->getIO();
     aStudy->setObjectProperty(vman->getId(), anIO->getEntry(),  "Visibility", 0 );
     displayer()->setVisibilityState(anIO->getEntry(), Qtx::HiddenState);
+}
 
-    // * occ --
+void HEXABLOCKGUI::hideOccActor()
+{
     OCCViewer_ViewWindow* occView = currentOccGView == NULL ? NULL : currentOccGView->getViewWindow();
-    DocumentModel* docModel = currentVtkGView->getDocumentModel();
+    VtkDocumentGraphicView* currentVtkGView = getCurrentVtkGraphicView();
+    DocumentModel* docModel = (currentVtkGView == NULL ? NULL : currentVtkGView->getDocumentModel());
     if (occView == NULL || docModel == NULL)
         return;
     SALOME_View* vf = dynamic_cast<SALOME_View*>(occView->getViewManager()->getViewModel());
     if (vf == NULL)
         return;
 
-//    vf->EraseAll();
     SOCC_Prs* currentOccPrs = getOccPrs(currentDocGView);
     if (currentOccPrs != NULL)
         vf->Erase(currentOccPrs);
@@ -1809,6 +1791,18 @@ void HEXABLOCKGUI::hideActor()
     occView->onResetView();
 }
 
+void HEXABLOCKGUI::showOnlyActor()
+{
+    showVtkActor();
+    showOccActor();
+}
+
+void HEXABLOCKGUI::hideActor()
+{
+    hideVtkActor();
+    hideOccActor();
+}
+
 
 void HEXABLOCKGUI::showDockWidgets(bool isVisible)
 {
@@ -2922,12 +2916,12 @@ QStringList HEXABLOCKGUI::getQuickDirList()
 
 extern "C"
 {
-    HEXABLOCK_EXPORT CAM_Module* createModule()
+    HexaExport CAM_Module* createModule()
     {
         return new HEXABLOCKGUI();
     }
 
-    HEXABLOCK_EXPORT char* getModuleVersion()
+    HexaExport char* getModuleVersion()
     {
         return (char*)HEXABLOCK_VERSION_STR;
     }
index b0a61705e52a22627c3b7267ab33d1f12e23f2a3..4d44098dadedb9788029b49caa4c744f7a791b9e 100755 (executable)
@@ -20,8 +20,6 @@
 #ifndef _HEXABLOCKGUI_HXX_
 #define _HEXABLOCKGUI_HXX_
 
-#include "HEXABLOCKGUI_Export.hxx"
-
 #include <iostream>
 #include <map>
 #include <set>
@@ -115,7 +113,7 @@ class OCCViewer_ViewWindow;
 class LightApp_VTKSelector;
 
 
-class HEXABLOCK_EXPORT HEXABLOCKGUI : public SalomeApp_Module
+class HexaExport HEXABLOCKGUI : public SalomeApp_Module
 {
   Q_OBJECT
 
@@ -128,6 +126,7 @@ public:
   enum ViewType {
       VTK,
       OCC,
+      VTK_OCC,
       UNKNOWN
   };
 
@@ -201,6 +200,11 @@ public:
   void showLawInfoDialog(HEXA_NS::Law* law);
   void showPropagationInfoDialog(HEXA_NS::Propagation* propagation);
 
+  void showVtkActor();
+  void showOccActor();
+  void hideVtkActor();
+  void hideOccActor();
+
 public slots:
   bool deactivateModule( SUIT_Study* theStudy);
   bool activateModule( SUIT_Study* theStudy);
@@ -220,7 +224,6 @@ protected slots:
   virtual void                        onViewManagerRemoved( SUIT_ViewManager* );
 
   void onSelectionChanged( const QItemSelection & selected, const QItemSelection & deselected );
-  void showActor();
   void hideActor();
   void showOnlyActor();
 
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentDelegate.cxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentDelegate.cxx
deleted file mode 100755 (executable)
index 4d4a27d..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-
-// Copyright (C) 2009-2013  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.
-//
-// 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 <iostream>
-#include <QtGui>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qstyle.h>
-
-
-#include "utilities.h"
-#include "HEXABLOCKGUI.hxx"
-
-
-#include "HEXABLOCKGUI_DocumentDelegate.hxx"
-
-using namespace std;
-using namespace HEXABLOCK::GUI;
-
-
-//QWidget* currentEditor = NULL;
-
-DocumentDelegate::DocumentDelegate(QDockWidget *dw, QObject *parent)
-    : QItemDelegate(parent),
-      _dw(dw),
-      _currentEditor(NULL)
-{
-}
-
-
-QWidget *DocumentDelegate::createEditor( QWidget                    *parent,
-                                         const QStyleOptionViewItem &option,
-                                         const QModelIndex          &index ) const
-{
-  //close current editor if there's one before creating a new one
-  if (_currentEditor != NULL)
-  {
-         delete _currentEditor;
-         _currentEditor = NULL;
-  }
-
-  HexaBaseDialog *editor = NULL;
-
-  if (_dw->widget()) _dw->widget()->close();
-  if ( !_dw->isVisible() ) _dw->setVisible(true);
-
-  switch ( index.data(HEXA_TREE_ROLE).toInt() )
-  {
-    case VERTEX_TREE :   editor = new VertexDialog(_dw, HexaBaseDialog::INFO_MODE);   break;
-    case EDGE_TREE :     editor = new EdgeDialog(_dw, HexaBaseDialog::INFO_MODE);     break;
-    case QUAD_TREE :     editor = new QuadDialog(_dw, HexaBaseDialog::INFO_MODE);     break;
-    case HEXA_TREE :     editor = new HexaDialog(_dw, HexaBaseDialog::INFO_MODE);     break;
-    case VECTOR_TREE :   editor = new VectorDialog(_dw, HexaBaseDialog::INFO_MODE);   break;
-
-//    case ELEMENTS_DIR_TREE : trouver le type exact (cylinder ou pipe) et creer la boite d'info en fonction.
-
-    // * OBSOLETE ******
-//    case CYLINDER_TREE : editor = new CylinderDialog(_dw, HexaBaseDialog::INFO_MODE);   break;
-//    case PIPE_TREE :     editor = new PipeDialog(_dw, HexaBaseDialog::INFO_MODE);       break;
-    // ******************
-
-    case GROUP_TREE       : editor = new GroupDialog(_dw, HexaBaseDialog::INFO_MODE/*UPDATE_MODE*/); break;
-    case LAW_TREE         : editor = new LawDialog(_dw, HexaBaseDialog::INFO_MODE); break;
-    case PROPAGATION_TREE : editor = new PropagationDialog(_dw, HexaBaseDialog::INFO_MODE); break;
-  }
-
-  if ( editor != NULL )
-  {
-    HEXABLOCKGUI::assocInProgress = false;
-
-    //show the editor in the dockwidget
-    editor->resetSizeAndShow(_dw);
-  }
-  else
-         _dw->close();
-
-  _currentEditor = editor;
-
-  return editor;
-}
-
-//Close the current edition dialog
-void DocumentDelegate::closeDialog()
-{
-       if (_currentEditor!=NULL)
-       {
-               _currentEditor->close();
-               emit closeEditor(_currentEditor, NoHint); //Problem
-               delete _currentEditor;
-               _currentEditor = NULL;
-       }
-}
-
-void DocumentDelegate::setEditorData( QWidget *editor,
-                                      const QModelIndex &index) const
-{
-  HexaBaseDialog* hexaEditor = dynamic_cast<HexaBaseDialog*>( editor );
-  if (hexaEditor == NULL) return;
-  DocumentModel* documentModel = hexaEditor->getDocumentModel();
-  if (documentModel == NULL) return;
-
-  switch ( index.data(HEXA_TREE_ROLE).toInt() ){
-    case VERTEX_TREE : {
-      HEXA_NS::Vertex *value = documentModel->getHexaPtr<HEXA_NS::Vertex *>(index);
-      VertexDialog *vertexEditor = static_cast<VertexDialog*>(editor);
-      vertexEditor->setValue(value);
-    }
-    break;
-    case EDGE_TREE : {
-      HEXA_NS::Edge *value = documentModel->getHexaPtr<HEXA_NS::Edge*>(index);
-      EdgeDialog *edgeEditor = static_cast<EdgeDialog*>(editor);
-      edgeEditor->setValue(value);
-    }
-    break;
-    case QUAD_TREE : {
-      HEXA_NS::Quad *value = documentModel->getHexaPtr<HEXA_NS::Quad*>(index);
-      QuadDialog *quadEditor = static_cast<QuadDialog*>(editor);
-      quadEditor->setValue(value);
-    }
-    break;
-    case HEXA_TREE : {
-      HEXA_NS::Hexa *value = documentModel->getHexaPtr<HEXA_NS::Hexa*>(index);
-      HexaDialog *hexaEditor = static_cast<HexaDialog*>(editor);
-      hexaEditor->setValue(value);
-    }
-    break;
-    case VECTOR_TREE : {
-      HEXA_NS::Vector *value = documentModel->getHexaPtr<HEXA_NS::Vector*>(index);
-      VectorDialog *vectorEditor = static_cast<VectorDialog*>(editor);
-      vectorEditor->setValue(value);
-    }
-    break;
-
-    /*
-    case ELEMENTS_DIR_TREE : {
-        HEXA_NS::Elements* value = documentModel->getHexaPtr<HEXA_NS::Elements*>(index);
-        // trouver le type exact (cylinder ou pipe) pour choisir le bon editor
-        // editor->setValue(value)
-    }
-    break;
-    */
-
-    // ************ OBSOLETE ********************
-//    case CYLINDER_TREE : {
-//      HEXA_NS::Cylinder *value = documentModel->getHexaPtr<HEXA_NS::Cylinder*>(index);
-//      CylinderDialog *cylinderEditor = static_cast<CylinderDialog*>(editor);
-//      cylinderEditor->setValue(value);
-//    }
-//    break;
-//    case PIPE_TREE : {
-//      HEXA_NS::Pipe *value = documentModel->getHexaPtr<HEXA_NS::Pipe*>(index);
-//      PipeDialog *pipeEditor= static_cast<PipeDialog*>(editor);
-//      pipeEditor->setValue(value);
-//    }
-//    break;
-    // ************ FIN OBSOLETE *****************
-
-    case GROUP_TREE : {
-      HEXA_NS::Group *value = index.data( HEXA_DATA_ROLE ).value< HEXA_NS::Group* >();
-      GroupDialog *groupEditor = static_cast<GroupDialog*>(editor);
-      groupEditor->setValue(value);
-    }
-    break;
-    case LAW_TREE : {
-      HEXA_NS::Law *value = index.data( HEXA_DATA_ROLE ).value< HEXA_NS::Law* >();
-      LawDialog *lawEditor = static_cast<LawDialog*>(editor);
-      lawEditor->setValue(value);
-    }
-    break;
-    case PROPAGATION_TREE : {
-      HEXA_NS::Propagation *value = index.data( HEXA_DATA_ROLE ).value< HEXA_NS::Propagation* >();
-      PropagationDialog *propagationEditor = static_cast<PropagationDialog*>(editor);
-      propagationEditor->setValue(value);
-    }
-    break;
-  }
-}
-
-
-bool DocumentDelegate::editorEvent ( QEvent                     *event,
-                                     QAbstractItemModel         *model,
-                                     const QStyleOptionViewItem &option,
-                                     const QModelIndex          &index )
-{
-       return QItemDelegate::editorEvent ( event, model, option, index );
-}
-
-bool DocumentDelegate::eventFilter ( QObject * editor, QEvent * event )
-{
-       if ( event->type() == QEvent::FocusOut ){
-               return true; //do nothing for this signal
-       }
-       else if (event->type() == QEvent::HideToParent && editor != NULL)
-       {
-           //close the current editor when the tree is reduced
-           ((QWidget*) editor->parent())->close();
-       }
-
-       return false;
-}
diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentDelegate.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_DocumentDelegate.hxx
deleted file mode 100755 (executable)
index a3cbe06..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (C) 2009-2013  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.
-//
-// 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 __HEXABLOCKGUI_DOCUMENTDELEGATE_HXX_
-#define __HEXABLOCKGUI_DOCUMENTDELEGATE_HXX_
-
-#include "HEXABLOCKGUI_Export.hxx"
-// QEvent * event, QAbstractItemModel 
-
-#include <QEvent>
-#include <QItemDelegate>
-#include <QModelIndex>
-#include <QObject>
-#include <QSize>
-#include <QSpinBox>
-
-#include <QDockWidget>
-
-#include "HEXABLOCKGUI_DocumentModel.hxx"
-#include "HEXABLOCKGUI_DocumentSelectionModel.hxx"
-#include "HEXABLOCKGUI_DocumentItem.hxx"
-#include "HEXABLOCKGUI_DocumentPanel.hxx"
-
-namespace HEXABLOCK
-{
-  namespace GUI
-  {
-      class HEXABLOCK_EXPORT DocumentDelegate : public QItemDelegate
-      {
-          Q_OBJECT
-      
-      public:
-          /// close the editor
-          void closeDialog();
-
-          DocumentDelegate( QDockWidget *dw, QObject *parent = 0);
-
-          /// create the editor
-          QWidget *createEditor( QWidget *parent,
-                                 const QStyleOptionViewItem &option,
-                                 const QModelIndex &index) const;
-
-          /// set editor's data
-          void setEditorData( QWidget *editor, const QModelIndex &index) const;
-
-          /// set the editor's model
-          void setModelData( QWidget            *editor,
-                             QAbstractItemModel *model,
-                             const QModelIndex  &index ) const {};
-
-          virtual void updateEditorGeometry( QWidget *editor,
-                                     const QStyleOptionViewItem &option,
-                                     const QModelIndex &index ) const {};
-
-      protected:
-          mutable QWidget* _currentEditor;
-          virtual bool editorEvent ( QEvent * event,
-                         QAbstractItemModel * model,
-                         const QStyleOptionViewItem & option, const QModelIndex & index );
-          virtual bool         eventFilter ( QObject * editor, QEvent * event );
-
-      private:
-          QDockWidget* _dw; // creator's container
-
-      private slots:
-         // void commitEditor();
-
-      };
-  }
-}
-
-#endif
index 18729593cabed13b95d7e3cfe2d418adf6c6d408..4bab98bf3ce1b6050bd9efdd2521dbb58965d95f 100755 (executable)
@@ -20,7 +20,6 @@
 #ifndef _HEXABLOCKGUI_DOCUMENTITEM_HXX_
 #define _HEXABLOCKGUI_DOCUMENTITEM_HXX_
 
-#include "HEXABLOCKGUI_Export.hxx"
 
 #include <QStandardItem>
 
@@ -152,7 +151,7 @@ namespace HEXABLOCK
 // QVariant::UserType
 
     //===================================================================================
-    class HEXABLOCK_EXPORT ElementItem : public QStandardItem
+    class HexaExport ElementItem : public QStandardItem
     {
       public:
        ElementItem( HEXA_NS::EltBase* docElement, QString entry, HexaType ttype, HexaTreeRole treeRole);
@@ -170,7 +169,7 @@ namespace HEXABLOCK
     };
     //===================================================================================
 
-    class HEXABLOCK_EXPORT GraphicElementItem : public ElementItem
+    class HexaExport GraphicElementItem : public ElementItem
     {
       public:
        GraphicElementItem( HEXA_NS::EltBase* docElement, QString entry, HexaType ttype, HexaTreeRole treeRole):
@@ -183,7 +182,7 @@ namespace HEXABLOCK
         int       IDinActor;
     };
 
-    class HEXABLOCK_EXPORT StandardElementItem : public ElementItem
+    class HexaExport StandardElementItem : public ElementItem
     {
        public:
        StandardElementItem( HEXA_NS::EltBase* docElement, QString entry, HexaType ttype, HexaTreeRole treeRole):
@@ -192,40 +191,40 @@ namespace HEXABLOCK
        }
     };
 
-    class HEXABLOCK_EXPORT VertexItem : public GraphicElementItem
+    class HexaExport VertexItem : public GraphicElementItem
     {
       public:
         VertexItem( HEXA_NS::Vertex* hexaVertex, QString entry = "");
     };
 
-    class HEXABLOCK_EXPORT EdgeItem : public GraphicElementItem
+    class HexaExport EdgeItem : public GraphicElementItem
     {
       public:
         EdgeItem( HEXA_NS::Edge* hexaEdge, QString entry = "");
     };
     //-----------------------------------------
-    class HEXABLOCK_EXPORT QuadItem : public GraphicElementItem
+    class HexaExport QuadItem : public GraphicElementItem
     {
       public:
         QuadItem( HEXA_NS::Quad* hexaQuad, QString entry = "");
     };
     //-----------------------------------------
 
-    class HEXABLOCK_EXPORT HexaItem : public GraphicElementItem
+    class HexaExport HexaItem : public GraphicElementItem
     {
       public:
         HexaItem( HEXA_NS::Hexa* hexaHexa, QString entry = "");
     };
     //-----------------------------------------
 
-    class HEXABLOCK_EXPORT VectorItem : public StandardElementItem
+    class HexaExport VectorItem : public StandardElementItem
     {
       public:
         VectorItem( HEXA_NS::Vector* hexaVector, QString entry = "");
     };
     //-----------------------------------------
 
-//    class HEXABLOCK_EXPORT CylinderItem : public StandardElementItem
+//    class HexaExport CylinderItem : public StandardElementItem
 //    {
 //      public:
 //        CylinderItem( HEXA_NS::Cylinder* hexaCyl, QString entry = "");
@@ -239,7 +238,7 @@ namespace HEXABLOCK
 //    };
     //-----------------------------------------
 
-    class HEXABLOCK_EXPORT ElementsItem : public StandardElementItem
+    class HexaExport ElementsItem : public StandardElementItem
     {
       public:
         ElementsItem( HEXA_NS::Elements* hexaElements, QString entry = "" );
@@ -252,7 +251,7 @@ namespace HEXABLOCK
 //    };
 
     //------------------------------------------------
-    class HEXABLOCK_EXPORT GeomItem: public StandardElementItem
+    class HexaExport GeomItem: public StandardElementItem
     {
     public:
         GeomItem( HEXA_NS::EltBase* geomShape, QString entry, HexaType ttype, HexaTreeRole treeRole, HEXA_NS::EltBase* assoc = NULL );
@@ -264,35 +263,35 @@ namespace HEXABLOCK
     };
 
     //------------------------------------------------
-    class HEXABLOCK_EXPORT GeomShapeItem: public GeomItem
+    class HexaExport GeomShapeItem: public GeomItem
     {
     public:
         GeomShapeItem( HEXA_NS::NewShape* shape, HEXA_NS::EltBase* assoc = NULL);
     };
 
     //------------------------------------------------
-    class HEXABLOCK_EXPORT GeomPointItem: public GeomItem
+    class HexaExport GeomPointItem: public GeomItem
     {
     public:
         GeomPointItem( HEXA_NS::VertexShape* geomPoint, HEXA_NS::Vertex* associatedVertex = NULL);
     };
 
     //------------------------------------------------
-    class HEXABLOCK_EXPORT GeomEdgeItem: public GeomItem
+    class HexaExport GeomEdgeItem: public GeomItem
     {
     public:
         GeomEdgeItem( HEXA_NS::EdgeShape* geomEdge, HEXA_NS::Edge* associatedEdge = NULL);
     };
 
     //------------------------------------------------
-    class HEXABLOCK_EXPORT GeomFaceItem: public GeomItem
+    class HexaExport GeomFaceItem: public GeomItem
     {
     public:
         GeomFaceItem( HEXA_NS::FaceShape* geomFace, HEXA_NS::Quad* associatedQuad = NULL);
     };
 
     //-----------------------------------------
-    class HEXABLOCK_EXPORT GroupItem : public QStandardItem
+    class HexaExport GroupItem : public QStandardItem
     {
     public:
        GroupItem( HEXA_NS::Group* hexaGroup );
@@ -304,7 +303,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT LawItem : public QStandardItem
+    class HexaExport LawItem : public QStandardItem
     {
     public:
        LawItem( HEXA_NS::Law* hexaLaw );
@@ -316,7 +315,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT PropagationItem : public QStandardItem
+    class HexaExport PropagationItem : public QStandardItem
     {
     public:
        PropagationItem( HEXA_NS::Propagation* hexaPropagation );
index 2c89d3aa2a78362b083022545390a95ad049be77..80fc85eb93d207bdcdb7b95262fff039e714fd1b 100755 (executable)
 
 #include "HEXABLOCKGUI_VtkDocumentGraphicView.hxx"
 
-
+#include <Geom_Circle.hxx>
+#include <gp_Circ.hxx>
+#include <BRep_Tool.hxx>
+#include <TopoDS_Edge.hxx>
 //#define _DEVDEBUG_
 
 
@@ -238,6 +241,44 @@ int DocumentModel::getNbrUnusedElt(HEXA_NS::EnumElt eltType)
     return getNbrElt(eltType) - getNbrUsedElt(eltType);
 }
 
+// compute the length of the given edge
+double DocumentModel::getLength(const QModelIndex& iEdge)
+{
+    // * Get the pointer to the edge
+    HEXA_NS::Edge*        edge     = getHexaPtr<HEXA_NS::Edge*>(iEdge);
+    HEXA_NS::EdgeShape*   geomEdge = getHexaPtr<HEXA_NS::EdgeShape*>(iEdge);
+
+    // * The edge can be from VTK or OCC View
+    if (edge != NULL)
+        return edge->getLength();
+    else if (geomEdge != NULL)
+        return geomEdge->getLength();
+    else
+        return 0.;
+}
+
+// Compute the radius of the given edge
+double DocumentModel::getRadius(const QModelIndex& iEdge)
+{
+    // * Get the pointer to the edge
+    // * In our case only an OCC edge can have a radius
+    HEXA_NS::EdgeShape* edge = getHexaPtr<HEXA_NS::EdgeShape*>(iEdge);
+    if (edge == NULL)
+        return 0.;
+
+    return edge->getRadius();
+}
+
+// Compute the angle of the given edge (internal angle)
+double DocumentModel::getAngle(const QModelIndex& iEdge)
+{
+    // * Get the pointer to the edge
+    HEXA_NS::EdgeShape* edge = getHexaPtr<HEXA_NS::EdgeShape*>(iEdge);
+    if (edge == NULL)
+        return 0.;
+
+    return edge->getAngle();
+}
 
 //Load the current Document
 void DocumentModel::load()
@@ -512,7 +553,7 @@ void DocumentModel::fillData()
 void DocumentModel::fillGeometry()
 {
     PatternGeomSelectionModel* pgsm = HEXABLOCKGUI::currentDocGView->getPatternGeomSelectionModel();
-    if (_hexaDocument == NULL || isEmpty() || pgsm == NULL)
+    if (_hexaDocument == NULL /*|| isEmpty()*/ || pgsm == NULL)
         return;
 
     HEXA_NS::NewShape* shape;
@@ -1462,8 +1503,6 @@ QModelIndex DocumentModel::makeScale( const QModelIndex& ielts, const QModelInde
     return iElts;
 }
 
-
-
 QModelIndex DocumentModel::makeRotation( const QModelIndex& ielts,
         const QModelIndex& iv,
         const QModelIndex& ivec, double angle )
@@ -1666,7 +1705,7 @@ QModelIndex DocumentModel::replace( const QModelIndexList& iquadsPattern,
     }
 
     HEXA_NS::Elements* helts = _hexaDocument->replace( hquads,
-            hp1, hc1, hp2, hc2, hp3, hc3 );
+                                                       hp1, hc1, hp2, hc2, hp3, hc3 );
     if ( BadElement(helts) ) return ielts;
 
     updateData();
@@ -1677,6 +1716,47 @@ QModelIndex DocumentModel::replace( const QModelIndexList& iquadsPattern,
     return ielts;
 }
 
+QModelIndex DocumentModel::replace( const QModelIndexList& iquads_source,
+                                    const QModelIndexList& iquads_dest,
+                                    const QModelIndex& ip1_source, const QModelIndex& ic1_dest,
+                                    const QModelIndex& ip2_source, const QModelIndex& ic2_dest,
+                                    const QModelIndex& ip3_source, const QModelIndex& ic3_dest)
+{
+    QModelIndex ielts;
+
+    HEXA_NS::Vertex* hp1 = getHexaPtr<HEXA_NS::Vertex*>(ip1_source);
+    HEXA_NS::Vertex* hp2 = getHexaPtr<HEXA_NS::Vertex*>(ip2_source);
+    HEXA_NS::Vertex* hp3 = getHexaPtr<HEXA_NS::Vertex*>(ip3_source);
+    HEXA_NS::Vertex* hc1 = getHexaPtr<HEXA_NS::Vertex*>(ic1_dest);
+    HEXA_NS::Vertex* hc2 = getHexaPtr<HEXA_NS::Vertex*>(ic2_dest);
+    HEXA_NS::Vertex* hc3 = getHexaPtr<HEXA_NS::Vertex*>(ic3_dest);
+
+    HEXA_NS::Quads   hquads_source, hquads_dest;
+    HEXA_NS::Quad*   hquad = NULL;
+    foreach( const QModelIndex& iquad, iquads_source ){
+        hquad = getHexaPtr<HEXA_NS::Quad*>(iquad);
+        hquads_source.push_back( hquad );
+    }
+
+    foreach( const QModelIndex& iquad, iquads_dest) {
+        hquad = getHexaPtr<HEXA_NS::Quad*>(iquad);
+        hquads_dest.push_back(hquad);
+    }
+
+    HEXA_NS::Elements* helts = _hexaDocument->replaceHexas( hquads_source,
+                                                            hquads_dest,
+                                                            hp1, hc1, hp2, hc2, hp3, hc3);
+    if ( BadElement(helts) )
+        return ielts;
+
+    updateData();
+    ElementsItem* eltsItem = new ElementsItem(helts);
+    _elementsDirItem->appendRow(eltsItem);
+    ielts = eltsItem->index();
+
+    return ielts;
+}
+
 QModelIndex DocumentModel::getGeomModelIndex(QString& id) const
 {
     QModelIndex result;
@@ -2295,7 +2375,7 @@ QStandardItem* PatternDataModel::itemFromIndex ( const QModelIndex & index ) con
 
 //QVariant PatternBuilderModel::headerData ( int section, Qt::Orientation orientation, int role ) const
 //{
-//    if ( section == 0 and orientation == Qt::Horizontal and role == Qt::DisplayRole ){
+//    if ( section == 0 && orientation == Qt::Horizontal && role == Qt::DisplayRole ){
 //        return QVariant( "Builder" );
 //    } else {
 //        return QSortFilterProxyModel::headerData ( section, orientation, role );
index 26d216d2ca89ef7d8f4c8a8520a61da45270d7c0..044459fed4a0d7dce1d01556a3a87c1f30e2189b 100755 (executable)
@@ -20,7 +20,6 @@
 #ifndef _HEXABLOCKGUI_DOCUMENTMODEL_HXX_
 #define _HEXABLOCKGUI_DOCUMENTMODEL_HXX_
 
-#include "HEXABLOCKGUI_Export.hxx"
 
 #include <QTemporaryFile>
 #include <QStandardItemModel>
@@ -36,7 +35,7 @@ namespace HEXABLOCK
 {
   namespace GUI
   {
-    class HEXABLOCK_EXPORT DocumentModel : public QStandardItemModel
+    class HexaExport DocumentModel : public QStandardItemModel
     {
       Q_OBJECT
     public:
@@ -74,6 +73,10 @@ namespace HEXABLOCK
       void refresh(); //refresh data
       bool isEmpty() const;
 
+      double getLength(const QModelIndex& iEdge);
+      double getRadius(const QModelIndex& iEdge);
+      double getAngle(const QModelIndex& iEdge);
+
       void clearAll();
       void clearData();
 //      void clearBuilder();
@@ -363,9 +366,14 @@ namespace HEXABLOCK
       bool performSymmetryPlane( const QModelIndex& elts, const QModelIndex& v, const QModelIndex& vec );
 
       QModelIndex replace( const QModelIndexList& quadsPattern,
-          const QModelIndex& p1, const QModelIndex& c1,
-          const QModelIndex& p2, const QModelIndex& c2,
-          const QModelIndex& p3, const QModelIndex& c3 ); //NEW HEXA3
+                           const QModelIndex& ip1, const QModelIndex& ic1,
+                           const QModelIndex& ip2, const QModelIndex& ic2,
+                           const QModelIndex& ip3, const QModelIndex& ic3 ); //NEW HEXA3
+
+      QModelIndex replace( const QModelIndexList& iquads_source, const QModelIndexList& iquads_dest,
+                           const QModelIndex& ip1_source, const QModelIndex& ic1_dest,
+                           const QModelIndex& ip2_source, const QModelIndex& ic2_dest,
+                           const QModelIndex& ip3_source, const QModelIndex& ic3_dest );
 
 
       // ************  ASSOCIATION ************
@@ -480,7 +488,6 @@ namespace HEXABLOCK
       QStandardItem     *_lawDirItem;
       QStandardItem     *_propagationDirItem;
 
-
       Qt::ItemFlags     _vertexItemFlags;
       Qt::ItemFlags     _edgeItemFlags;
       Qt::ItemFlags     _quadItemFlags;
@@ -493,7 +500,6 @@ namespace HEXABLOCK
       Qt::ItemFlags     _groupItemFlags;
       Qt::ItemFlags     _lawItemFlags;
       Qt::ItemFlags     _propagationItemFlags;
-
     };
 
 
index 685267655d63f7a882be0b40a3a19bbf09a9b9e8..0c4db335d2d8f058b01b3f75843e9f7fb32eb8b7 100755 (executable)
@@ -115,7 +115,6 @@ public:
             const QModelIndex &index) const{
         QDoubleSpinBox *sb = new QDoubleSpinBox( parent );
         sb->setMinimum(SPINBOX_POSITIVE_DOUBLE_MIN);
-        /////// sb->setMaximum(1000000000000000); //10e15   Abu : Pb en 32 bits
         sb->setMaximum(SPINBOX_DOUBLE_MAX);       //10e9
         sb->setDecimals(NB_DECIMALS);
         return sb;
@@ -148,7 +147,6 @@ HexaBaseDialog::HexaBaseDialog( QWidget * parent, Mode editmode, Qt::WindowFlags
     _strHexaWidgetType[GEOMEDGE_TREE]   = tr( "GEOMEDGE" );
     _strHexaWidgetType[GEOMFACE_TREE]   = tr( "GEOMFACE" );
 
-
     _strHexaWidgetType[GROUP_TREE]      = tr( "GROUP" );
     _strHexaWidgetType[LAW_TREE]        = tr( "LAW" );
     _strHexaWidgetType[PROPAGATION_TREE]= tr( "PROPAGATION" );
@@ -176,6 +174,59 @@ QModelIndexList HexaBaseDialog::getIndexList(QListWidget* itemsList, bool mapToS
     return iItems;
 }
 
+
+// ================================================================ computeAndSetDimension
+void HexaBaseDialog::computeAndSetDimension(const QModelIndex& elt)
+{
+    // * Check if everything is OK for the computing
+    DocumentModel* docModel = getDocumentModel();
+    if (docModel == NULL || _currentObj == NULL)
+        return;
+
+    int selectedType = elt.data(HEXA_TREE_ROLE).toInt();
+    if (selectedType != EDGE_TREE && selectedType != GEOMEDGE_TREE)
+        return;
+
+    QListWidget*    list = dynamic_cast<QListWidget*>(_currentObj);
+    QDoubleSpinBox* spb  = dynamic_cast<QDoubleSpinBox*>(_currentObj);
+
+    if (list == NULL && spb == NULL)
+        return;
+
+    // * Compute the value of the dimension
+    double value = 0.;
+
+    if (_currentObj->property("Radius").isValid())
+        value = docModel->getRadius(elt);
+    else if (_currentObj->property("Angle").isValid())
+        value = docModel->getAngle(elt);
+    else if (_currentObj->property("Length").isValid())
+        value = docModel->getLength(elt);
+
+    if (value == 0.)
+        return;
+
+    // * Set the value to the field (radius, length or height)
+    if (list != NULL)
+    {
+        QListWidgetItem* item = list->currentItem();
+        if (item != NULL)
+        {
+            if (value != 0.)
+            {
+                item->setText(QString::number(value));
+                list->editItem(item);
+            }
+        }
+    }
+    else if (spb != NULL)
+    {
+        spb->setValue(value);
+        spb->setFocus();
+        spb->selectAll();
+    }
+}
+
 // ============================================================= resetSizeAndShow
 void HexaBaseDialog::resetSizeAndShow(QDockWidget* parent)
 {
@@ -278,6 +329,7 @@ void HexaBaseDialog::onCurrentSelectionChanged()
     highlightSelectedAssocs();
 }
 
+// ============================================================= clearCurrentObjectFocus
 void HexaBaseDialog::clearCurrentObjectFocus()
 {
     QWidget* currentWidget = dynamic_cast<QWidget*>(_currentObj);
@@ -426,21 +478,33 @@ void HexaBaseDialog::refreshHighlight()
     highlightSelectedAssocs();
 }
 
+bool HexaBaseDialog::isDimensionType(const QObject* obj)
+{
+    if (obj == NULL)
+        return false;
+
+    return (obj->property("Radius").isValid()) ||
+            (obj->property("Angle").isValid()) ||
+            (obj->property("Length").isValid());
+}
+
 // ============================================================== getObjectViewType
 HEXABLOCKGUI::ViewType HexaBaseDialog::getObjectViewType(QObject* obj)
 {
     if (obj == NULL)
         return HEXABLOCKGUI::UNKNOWN;
 
-    QVariant v = obj->property("GeomWidgetType");
-    if ( v.isValid() )
-        return HEXABLOCKGUI::OCC;
+    QVariant v1 = obj->property("GeomWidgetType");
+    QVariant v2 = obj->property("HexaWidgetType");
 
-    v  = obj->property("HexaWidgetType");
-    if ( v.isValid() )
+    if (v1.isValid() && v2.isValid() && isDimensionType(obj))
+        return HEXABLOCKGUI::VTK_OCC;
+    else if (v1.isValid())
+        return HEXABLOCKGUI::OCC;
+    else if (v2.isValid())
         return HEXABLOCKGUI::VTK;
-
-    return HEXABLOCKGUI::UNKNOWN;
+    else
+        return HEXABLOCKGUI::UNKNOWN;
 }
 
 // ============================================================== _selectAndHighlight
@@ -470,7 +534,6 @@ void HexaBaseDialog::_disallowSelection()
 // ============================================================== _allowVTKSelection
 bool HexaBaseDialog::_allowVTKSelection( QObject* obj )
 {
-
     bool isOk = false;
 
     QVariant v  = obj->property("HexaWidgetType");
@@ -507,13 +570,16 @@ bool HexaBaseDialog::_allowOCCSelection( QObject* obj )
 // ============================================================== _getSelector
 QItemSelectionModel* HexaBaseDialog::_getSelector( QObject* obj )
 {
+    if (obj == NULL)
+        return NULL;
+
     QItemSelectionModel* selector = NULL;
 
     HexaWidgetType wtype;
     QVariant v  = obj->property("HexaWidgetType");
-    if ( !v.isValid() ) {
+    QVariant v2 = obj->property("GeomWidgetType");
+    if ( !v.isValid() || (v2.isValid() && isDimensionType(obj)) )
         return NULL;
-    }
 
     wtype = v.value<HexaWidgetType>();
 
@@ -539,6 +605,7 @@ QItemSelectionModel* HexaBaseDialog::_getSelector( QObject* obj )
     return selector;
 }
 
+// ============================================================== getGeomObj
 DocumentModel::GeomObj* HexaBaseDialog::getGeomObj(const QModelIndex& index)
 {
     HEXA_NS::NewShape* aSh  = getDocumentModel()->getHexaPtr<HEXA_NS::NewShape*>(index);
@@ -688,15 +755,29 @@ bool HexaBaseDialog::_onSelectionChanged( const QItemSelection& sel, QListWidget
  */
 void HexaBaseDialog::onSelectionChanged( const QItemSelection& sel, const QItemSelection& unsel )
 {
+    QModelIndexList l = sel.indexes();
+
+    if ( l.count() == 0 )
+        return;
+    QModelIndex selected = l[0];
+
     // * no edition for Info Dialogs
-    if ( _editMode == INFO_MODE )
+    if ( _editMode == INFO_MODE || _currentObj == NULL || !selected.isValid())
         return;
 
-    QLineEdit*   aLineEdit   = NULL;
-    QListWidget* aListWidget = NULL;
+    if (isDimensionType(_currentObj))
+    {
+        // ** set the dimension of the selected object in the editor **/
+        int selectedType = selected.data(HEXA_TREE_ROLE).toInt();
+        if (selectedType == EDGE_TREE || selectedType == GEOMEDGE_TREE)
+            computeAndSetDimension(selected);
+        return;
+    }
+
+    QLineEdit*   aLineEdit   = dynamic_cast<QLineEdit*>(_currentObj);
+    QListWidget* aListWidget = dynamic_cast<QListWidget*>(_currentObj);
 
     // * fill the lineedit with selection
-    aLineEdit = dynamic_cast<QLineEdit*>(_currentObj);
     if ( aLineEdit)
     {
         _onSelectionChanged( sel, aLineEdit );
@@ -704,8 +785,7 @@ void HexaBaseDialog::onSelectionChanged( const QItemSelection& sel, const QItemS
     }
 
     // * fill the listWidget with selection
-    aListWidget = dynamic_cast<QListWidget*>(_currentObj);
-    if ( aListWidget)
+    if (aListWidget)
         _onSelectionChanged( sel, aListWidget );
 }
 
@@ -736,10 +816,8 @@ void HexaBaseDialog::hideEvent ( QHideEvent * event )
 {
     //Disconnection salome selection signals
     if (HEXABLOCKGUI::selectionMgr() != NULL)
-    {
         disconnect(  HEXABLOCKGUI::selectionMgr() , SIGNAL(currentSelectionChanged()),
                 this, SLOT(onCurrentSelectionChanged()) );
-    }
 
     //Disconnect vtk window activation signals
 //    if (HEXABLOCKGUI::currentDocGView->getViewWindow() != NULL)
@@ -755,7 +833,6 @@ void HexaBaseDialog::hideEvent ( QHideEvent * event )
 
     //Disconnect model selection signals
     disconnectDocumentGraphicView();
-
     getDocumentModel()->allowEdition();
 
     QDialog::hideEvent( event );
@@ -838,13 +915,14 @@ bool HexaBaseDialog::_isLineOrListWidget(QObject *widget)
  */
 void HexaBaseDialog::_highlightWidget(QObject *obj, Qt::GlobalColor clr)
 {
-    if (!_isLineOrListWidget(obj)) return;
+    QDoubleSpinBox* spb = dynamic_cast<QDoubleSpinBox*>(obj);
+    if (!_isLineOrListWidget(obj) && spb == NULL)
+        return;
 
-    QWidget *widget = dynamic_cast<QWidget*>(obj); //sure it's not NULL (_isLineOrListWidget(obj))
+    QWidget *widget = dynamic_cast<QWidget*>(obj);
     QPalette palette1 = widget->palette();
-    palette1.setColor(widget->backgroundRole(), clr);
+    palette1.setColor(QPalette::Active, widget->backgroundRole(), clr);
     widget->setPalette(palette1);
-
 }//_highlightWidget
 
 
@@ -884,13 +962,15 @@ bool HexaBaseDialog::eventFilter(QObject *obj, QEvent *event)
         return false;
 
     // * Focus In ------
-
-    // allow vtk selection
-    if (getObjectViewType(obj) == HEXABLOCKGUI::VTK)
+    HEXABLOCKGUI::ViewType vtype = getObjectViewType(obj);
+    if (vtype == HEXABLOCKGUI::VTK_OCC)
+    {
+        _allowVTKSelection(obj);
+        _allowOCCSelection(obj);
+    }
+    else if (vtype == HEXABLOCKGUI::VTK)
         _allowVTKSelection( obj );
-
-    //allow occ selection
-    if (getObjectViewType(obj) == HEXABLOCKGUI::OCC)
+    else if (vtype == HEXABLOCKGUI::OCC)
         _allowOCCSelection( obj );
 
     //Depending on the focused widget type, get the right selector for it
@@ -930,7 +1010,6 @@ VertexDialog::VertexDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
     _helpFileName = "gui_vertex.html";
     setupUi( this );
     _initWidget(editmode);
-    //   setFocusProxy( name_le );
 
     if ( editmode  == NEW_MODE ){
         setWindowTitle( tr("Vertex Construction") );
@@ -1056,7 +1135,7 @@ bool VertexDialog::apply(QModelIndex& result)
     }
 
     QString newName = name_le->text();
-    if ( !newName.isEmpty() )/*{*/
+    if ( !newName.isEmpty() )
         getDocumentModel()->setName( iVertex, newName );
 
     //the default name in the dialog box
@@ -1067,8 +1146,6 @@ bool VertexDialog::apply(QModelIndex& result)
     // to select/highlight result
     result = patternDataModel->mapFromSource(iVertex);
 
-    // updateDialogBoxName(name_le, result);
-    // const char *defaultName = getDocumentModel()->getHexaPtr(last)->getName();
     return isOk;
 }
 
@@ -1083,9 +1160,6 @@ EdgeDialog::EdgeDialog( QWidget* parent, Mode editmode, Qt::WindowFlags f ):
     setupUi( this );
     _initWidget(editmode);
 
-    // rb0->setFocusProxy( v0_le_rb0 );
-    // rb1->setFocusProxy( vex_le_rb1 );
-
     if  ( editmode == INFO_MODE ){
         setWindowTitle( tr("Edge Information") );
         rb1->hide();
@@ -1137,8 +1211,6 @@ void EdgeDialog::_initInputWidget( Mode editmode )
     if (editmode == INFO_MODE)
         name_le->setReadOnly(true);
 
-    //connect( name_le, SIGNAL(returnPressed()), this, SLOT(updateName()) );
-
 }
 
 // ============================================================== Clear
@@ -1536,7 +1608,6 @@ void HexaDialog::_initInputWidget( Mode editmode )
 
     if (editmode == INFO_MODE)
         name_le->setReadOnly(true);
-
 }
 
 // ============================================================== clear
@@ -1718,9 +1789,9 @@ bool HexaDialog::apply(QModelIndex& result)
     }
 
     nbItems = iElts.count();
-    if ( quads_rb->isChecked() && (nbItems>=2 && nbItems<=6) ){ // build from quads iElts.count() should be between [2,6]
+    if ( quads_rb->isChecked() and (nbItems>=2 and nbItems<=6) ){ // build from quads iElts.count() should be between [2,6]
         iHexa = getDocumentModel()->addHexaQuads( iElts );
-    } else if ( vertices_rb->isChecked() && nbItems== 8 ){ // build from vertices
+    } else if ( vertices_rb->isChecked() and nbItems== 8 ){ // build from vertices
         iHexa = getDocumentModel()->addHexaVertices( iElts[0], iElts[1], iElts[2], iElts[3],
                 iElts[4], iElts[5], iElts[6], iElts[7] );
     }
@@ -2134,7 +2205,6 @@ bool MakeGridDialog::apply(QModelIndex& result)
             iNewElts =  docModel->makeCartesian( icenter, ibase, ivec, iaxis,
                                                  radius, angles, heights);
         }
-
     }
 
     if ( !iNewElts.isValid() )
@@ -2171,19 +2241,60 @@ MakeCylinderDialog::~MakeCylinderDialog()
 
 void MakeCylinderDialog::_initInputWidget( Mode editmode )
 {
-    origin_le->setProperty( "HexaWidgetType", QVariant::fromValue(VERTEX_TREE));
-    axis_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
-    base_le->setProperty( "HexaWidgetType", QVariant::fromValue(VECTOR_TREE));
-
     installEventFilter(this);
-    origin_le->installEventFilter(this);
-    axis_le->installEventFilter(this);
-    base_le->installEventFilter(this);
 
+    rb0->installEventFilter(this);
+    rb1->installEventFilter(this);
+    rb2->installEventFilter(this);
+
+    origin_le->setProperty( "HexaWidgetType", QVariant::fromValue(VERTEX_TREE));
+    origin_le->installEventFilter(this);
     origin_le->setReadOnly(true);
+
+    axis_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
+    axis_le->installEventFilter(this);
     axis_le->setReadOnly(true);
+
+    base_le->setProperty( "HexaWidgetType", QVariant::fromValue(VECTOR_TREE));
+    base_le->installEventFilter(this);
     base_le->setReadOnly(true);
 
+    ext_radius_spb->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    ext_radius_spb->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    ext_radius_spb->setProperty("Radius", QVariant::fromValue(true));
+    ext_radius_spb->installEventFilter(this);
+
+    int_radius_spb->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    int_radius_spb->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    int_radius_spb->setProperty("Radius", QVariant::fromValue(true));
+    int_radius_spb->installEventFilter(this);
+
+    angle_spb->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    angle_spb->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    angle_spb->setProperty("Angle", QVariant::fromValue(true));
+    angle_spb->installEventFilter(this);
+
+    height_spb->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    height_spb->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    height_spb->setProperty("Length", QVariant::fromValue(true));
+    height_spb->installEventFilter(this);
+
+    radius_lw->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    radius_lw->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    radius_lw->setProperty("Radius", QVariant::fromValue(true));
+    radius_lw->installEventFilter(this);
+
+
+    angle_lw->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    angle_lw->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    angle_lw->setProperty("Angle", QVariant::fromValue(true));
+    angle_lw->installEventFilter(this);
+
+    height_lw->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    height_lw->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    height_lw->setProperty("Length", QVariant::fromValue(true));
+    height_lw->installEventFilter(this);
+
     radius_lw->setItemDelegate(new HexaPositiveDoubleSpinBoxDelegate(radius_lw));
     radius_lw->setEditTriggers(QAbstractItemView::DoubleClicked);
 
@@ -2409,10 +2520,49 @@ void MakePipeDialog::_initInputWidget( Mode editmode )
     axis_le->installEventFilter(this);
     base_le->installEventFilter(this);
 
+    rb0->installEventFilter(this);
+    rb1->installEventFilter(this);
+    rb2->installEventFilter(this);
+
     origin_le->setReadOnly(true);
     axis_le->setReadOnly(true);
     base_le->setReadOnly(true);
 
+    ext_radius_spb->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    ext_radius_spb->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    ext_radius_spb->setProperty("Radius", QVariant::fromValue(true));
+    ext_radius_spb->installEventFilter(this);
+
+    int_radius_spb->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    int_radius_spb->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    int_radius_spb->setProperty("Radius", QVariant::fromValue(true));
+    int_radius_spb->installEventFilter(this);
+
+    angle_spb->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    angle_spb->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    angle_spb->setProperty("Angle", QVariant::fromValue(true));
+    angle_spb->installEventFilter(this);
+
+    height_spb->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    height_spb->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    height_spb->setProperty("Length", QVariant::fromValue(true));
+    height_spb->installEventFilter(this);
+
+    radius_lw->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    radius_lw->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    radius_lw->setProperty("Radius", QVariant::fromValue(true));
+    radius_lw->installEventFilter(this);
+
+    angle_lw->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    angle_lw->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    angle_lw->setProperty("Angle", QVariant::fromValue(true));
+    angle_lw->installEventFilter(this);
+
+    height_lw->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    height_lw->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    height_lw->setProperty("Length", QVariant::fromValue(true));
+    height_lw->installEventFilter(this);
+
     radius_lw->setItemDelegate(new HexaPositiveDoubleSpinBoxDelegate(radius_lw));
     radius_lw->setEditTriggers(QAbstractItemView::DoubleClicked);
 
@@ -2630,6 +2780,26 @@ void MakeCylindersDialog::_initInputWidget( Mode editmode )
     direction_le->setProperty( "HexaWidgetType", QVariant::fromValue(VECTOR_TREE) );
     direction2_le->setProperty( "HexaWidgetType", QVariant::fromValue(VECTOR_TREE) );
 
+    radius_spb->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    radius_spb->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    radius_spb->setProperty("Radius", QVariant::fromValue(true));
+    radius_spb->installEventFilter(this);
+
+    height_spb->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    height_spb->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    height_spb->setProperty("Length", QVariant::fromValue(true));
+    height_spb->installEventFilter(this);
+
+    radius2_spb->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    radius2_spb->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    radius2_spb->setProperty("Radius", QVariant::fromValue(true));
+    radius2_spb->installEventFilter(this);
+
+    height2_spb->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    height2_spb->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    height2_spb->setProperty("Length", QVariant::fromValue(true));
+    height2_spb->installEventFilter(this);
+
     installEventFilter(this);
     center_le->installEventFilter(this);
     center2_le->installEventFilter(this);
@@ -2721,7 +2891,36 @@ void MakePipesDialog::_initInputWidget( Mode editmode )
     dir_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
     dir2_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
 
-    installEventFilter(this);
+    ext_radius_spb->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    ext_radius_spb->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    ext_radius_spb->setProperty("Radius", QVariant::fromValue(true));
+    ext_radius_spb->installEventFilter(this);
+
+    int_radius_spb->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    int_radius_spb->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    int_radius_spb->setProperty("Radius", QVariant::fromValue(true));
+    int_radius_spb->installEventFilter(this);
+
+    height_spb->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    height_spb->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    height_spb->setProperty("Length", QVariant::fromValue(true));
+    height_spb->installEventFilter(this);
+
+    ext_radius2_spb->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    ext_radius2_spb->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    ext_radius2_spb->setProperty("Radius", QVariant::fromValue(true));
+    ext_radius2_spb->installEventFilter(this);
+
+    int_radius2_spb->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    int_radius2_spb->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    int_radius2_spb->setProperty("Radius", QVariant::fromValue(true));
+    int_radius2_spb->installEventFilter(this);
+
+    height2_spb->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    height2_spb->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    height2_spb->setProperty("Length", QVariant::fromValue(true));
+    height2_spb->installEventFilter(this);
+
     origin_le->installEventFilter(this);
     origin2_le->installEventFilter(this);
     dir_le->installEventFilter(this);
@@ -2909,10 +3108,25 @@ void PrismQuadDialog::_initInputWidget( Mode editmode )
     quads_lw->setProperty( "HexaWidgetType",  QVariant::fromValue(QUAD_TREE) );
     axis_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
 
+    length_spb->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    length_spb->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    length_spb->setProperty("Length", QVariant::fromValue(true));
+    length_spb->installEventFilter(this);
+
+
+    height_lw->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    height_lw->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    height_lw->setProperty("Length", QVariant::fromValue(true));
+    height_lw->installEventFilter(this);
+
     installEventFilter(this);
     quads_lw->installEventFilter(this);
     axis_le->installEventFilter(this);
 
+    extrudeTop_rb->installEventFilter(this);
+    extrudeUni_rb->installEventFilter(this);
+    extrude_rb->installEventFilter(this);
+
     axis_le->setReadOnly(true);
 
     QShortcut* delQuadShortcut   = new QShortcut( QKeySequence(Qt::Key_X), quads_lw );
@@ -3095,6 +3309,11 @@ void JoinQuadDialog::_initInputWidget( Mode editmode )
     vex2_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
     vex3_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
 
+    height_lw->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    height_lw->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    height_lw->setProperty("Length", QVariant::fromValue(true));
+    height_lw->installEventFilter(this);
+
     installEventFilter(this);
     quad_dest_le->installEventFilter(this);
     quads_lw->installEventFilter(this);
@@ -3103,6 +3322,9 @@ void JoinQuadDialog::_initInputWidget( Mode editmode )
     vex2_le->installEventFilter(this);
     vex3_le->installEventFilter(this);
 
+    joinUni_rb->installEventFilter(this);
+    join_rb->installEventFilter(this);
+
     QShortcut* delQuadShortcut = new QShortcut( QKeySequence(Qt::Key_X), quads_lw );
     delQuadShortcut->setContext( Qt::WidgetShortcut );
     connect( delQuadShortcut,   SIGNAL(activated()), this, SLOT(removeQuad()) );
@@ -3753,8 +3975,16 @@ void CutEdgeDialog::_initInputWidget( Mode editmode )
     e_le->setProperty( "HexaWidgetType",  QVariant::fromValue(EDGE_TREE) );
     e_le->installEventFilter(this);
 
+    cutUni_rb->installEventFilter(this);
+    cut_rb->installEventFilter(this);
+
     e_le->setReadOnly(true);
 
+    height_lw->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    height_lw->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    height_lw->setProperty("Length", QVariant::fromValue(true));
+    height_lw->installEventFilter(this);
+
     height_lw->setItemDelegate(new HexaPositiveDoubleSpinBoxDelegate(height_lw));
     height_lw->setEditTriggers(QAbstractItemView::DoubleClicked);
 
@@ -3882,6 +4112,9 @@ void MakeTransformationDialog::_initInputWidget( Mode editmode )
     QValidator *validator = new QRegExpValidator(rx, this);
 
     installEventFilter(this);
+    rb0->installEventFilter(this);
+    rb1->installEventFilter(this);
+    rb2->installEventFilter(this);
 
     vec_le_rb0->setProperty( "HexaWidgetType", QVariant::fromValue(VECTOR_TREE) );
     elts_le_rb0->setProperty( "HexaWidgetType", QVariant::fromValue(ELEMENTS_TREE) );
@@ -3908,6 +4141,11 @@ void MakeTransformationDialog::_initInputWidget( Mode editmode )
     vec_le_rb2->installEventFilter(this);
     elts_le_rb2->installEventFilter(this);
 
+    angle_spb->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    angle_spb->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    angle_spb->setProperty("Angle", QVariant::fromValue(true));
+    angle_spb->installEventFilter(this);
+
     vec_le_rb0->setReadOnly(true);
     elts_le_rb0->setReadOnly(true);
 
@@ -4012,6 +4250,16 @@ bool MakeTransformationDialog::apply(QModelIndex& result)
     }
 
     result = patternDataModel->mapFromSource(iNewElts);
+    if (result.isValid())
+    {
+        MESSAGE("======> Result is valid!");
+        HEXA_NS::Elements* elts = getDocumentModel()->getHexaPtr<HEXA_NS::Elements*>(result);
+        MESSAGE("======>   " << elts->getName());
+    }
+    else
+    {
+        MESSAGE("======> Result is not valid!");
+    }
 //    result = patternBuilderModel->mapFromSource(iNewElts);
 
     return true;
@@ -4209,6 +4457,11 @@ void PerformTransformationDialog::_initInputWidget( Mode editmode )
     QRegExp rx("");
     QValidator *validator = new QRegExpValidator(rx, this);
 
+    installEventFilter(this);
+    rb0->installEventFilter(this);
+    rb1->installEventFilter(this);
+    rb2->installEventFilter(this);
+
     vec_le_rb0->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
     elts_le_rb0->setProperty( "HexaWidgetType", QVariant::fromValue(ELEMENTS_TREE) );
     vec_le_rb0->setValidator( validator );
@@ -4234,6 +4487,11 @@ void PerformTransformationDialog::_initInputWidget( Mode editmode )
     vec_le_rb2->installEventFilter(this);
     elts_le_rb2->installEventFilter(this);
 
+    angle_spb->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    angle_spb->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    angle_spb->setProperty("Angle", QVariant::fromValue(true));
+    angle_spb->installEventFilter(this);
+
     vec_le_rb0->setReadOnly(true);
     elts_le_rb0->setReadOnly(true);
     vex_le_rb1->setReadOnly(true);
@@ -4854,7 +5112,6 @@ void QuadAssocDialog::_initInputWidget( Mode editmode )
     quad_le->installEventFilter(this);
     quad_le->setValidator( validator );
 
-
     faces_lw->setProperty( "HexaWidgetType", QVariant::fromValue(GEOMFACE_TREE) );
     faces_lw->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_FACE) );
     faces_lw->installEventFilter(this);
@@ -5642,6 +5899,8 @@ HexaBaseDialog(parent, editmode, f)
     _helpFileName = "gui_replace_hexa.html";
     setupUi( this );
     _initWidget(editmode);
+
+    radioButton->click();
 }
 
 // ============================================================== Destructeur
@@ -5660,15 +5919,27 @@ QModelIndexList ReplaceHexaDialog::getAssocsVTK()
     QListWidgetItem* item = NULL;
 
     //ListWidget content
-    const PatternDataModel* patternDataModel = getPatternDataModel();
-    if ( !patternDataModel ) return assocs;
     int nbQuads = quads_lw->count();
     for ( int r = 0; r < nbQuads; ++r ){
         item = quads_lw->item(r);
-        //             iQuad = patternDataModel->mapToSource( item->data(LW_QMODELINDEX_ROLE).value<QModelIndex>() ); //unsafe
+        //iQuad = patternDataModel->mapToSource( item->data(LW_QMODELINDEX_ROLE).value<QModelIndex>() ); //unsafe
         iQuad = getPatternDataSelectionModel()->indexBy(HEXA_DATA_ROLE, item->data(LW_DATA_ROLE));
-        if ( iQuad.isValid() ) assocs << iQuad;
+        if ( iQuad.isValid() )
+            assocs << iQuad;
     }
+
+    if (radioButton_2->isChecked())
+    {
+        nbQuads = quads_lw_2->count();
+        for( int i = 0; i < nbQuads; ++i)
+        {
+            item = quads_lw_2->item(i);
+            iQuad = getPatternDataSelectionModel()->indexBy(HEXA_DATA_ROLE, item->data(LW_DATA_ROLE));
+            if (iQuad.isValid())
+                assocs << iQuad;
+        }
+    }
+
     return assocs;
 }
 
@@ -5698,12 +5969,18 @@ void ReplaceHexaDialog::_initInputWidget( Mode editmode )
     quads_lw->setProperty( "HexaWidgetType",  QVariant::fromValue(QUAD_TREE) );
     quads_lw->installEventFilter(this);
 
+    quads_lw_2->setProperty("HexaWidgetType", QVariant::fromValue(QUAD_TREE));
+    quads_lw_2->installEventFilter(this);
+
     if ( editmode == NEW_MODE ){
         QShortcut* delQuadShortcut = new QShortcut( QKeySequence(Qt::Key_X), quads_lw );
+        QShortcut* delQuadShortcut2 = new QShortcut( QKeySequence(Qt::Key_X), quads_lw_2 );
         delQuadShortcut->setContext( Qt::WidgetShortcut );
-
+        delQuadShortcut2->setContext( Qt::WidgetShortcut );
         connect( delQuadShortcut, SIGNAL(activated()), this, SLOT(deleteQuadItem()) );
         connect( quads_lw, SIGNAL(currentRowChanged(int)), this, SLOT(updateButtonBox(int)) );
+        connect( delQuadShortcut2, SIGNAL(activated()), this, SLOT(deleteQuadItem2()));
+        connect( quads_lw_2, SIGNAL(currentRowChanged(int)), this, SLOT(updateButtonBox(int)) );
     }
 
     c1_le->setReadOnly(true);
@@ -5716,6 +5993,9 @@ void ReplaceHexaDialog::_initInputWidget( Mode editmode )
 
     connect(quads_lw,    SIGNAL(itemSelectionChanged()),
             this, SLOT(selectElementOfModel()), Qt::UniqueConnection);
+
+    connect(quads_lw_2, SIGNAL(itemSelectionChanged()),
+            this, SLOT(selectElementOfModel()), Qt::UniqueConnection);
 }
 
 // ============================================================== clear
@@ -5764,6 +6044,13 @@ void ReplaceHexaDialog::deleteQuadItem()
     updateButtonBox();
 }
 
+// ============================================================== deleteQuadItem2
+void ReplaceHexaDialog::deleteQuadItem2()
+{
+    delete quads_lw_2->currentItem();
+    updateButtonBox();
+}
+
 // ============================================================== apply
 bool ReplaceHexaDialog::apply(QModelIndex& result)
 {
@@ -5778,30 +6065,53 @@ bool ReplaceHexaDialog::apply(QModelIndex& result)
     QModelIndex ielts; //result
 
     QListWidgetItem* item = NULL;
-    QModelIndexList iquads;
+    QModelIndexList iquads_source;
     QModelIndex     iquad;
     int nbQuads = quads_lw->count();
     for ( int r = 0; r < nbQuads; ++r){
         item = quads_lw->item(r);
         iquad = patternDataModel->mapToSource( item->data(LW_QMODELINDEX_ROLE).value<QModelIndex>() );
         if ( iquad.isValid() )
-            iquads << iquad;
+            iquads_source << iquad;
     }
 
-    QModelIndex ic1 = patternDataModel->mapToSource( _index[c1_le] );
-    QModelIndex ic2 = patternDataModel->mapToSource( _index[c2_le] );
-    QModelIndex ic3 = patternDataModel->mapToSource( _index[c3_le] );
+    QModelIndex ip1_source = patternDataModel->mapToSource( _index[p1_le] );
+    QModelIndex ip2_source = patternDataModel->mapToSource( _index[p2_le] );
+    QModelIndex ip3_source = patternDataModel->mapToSource( _index[p3_le] );
+
+    QModelIndex ic1_dest = patternDataModel->mapToSource( _index[c1_le] );
+    QModelIndex ic2_dest = patternDataModel->mapToSource( _index[c2_le] );
+    QModelIndex ic3_dest = patternDataModel->mapToSource( _index[c3_le] );
 
-    QModelIndex ip1 = patternDataModel->mapToSource( _index[p1_le] );
-    QModelIndex ip2 = patternDataModel->mapToSource( _index[p2_le] );
-    QModelIndex ip3 = patternDataModel->mapToSource( _index[p3_le] );
+    bool ipts_ok = ip1_source.isValid() && ip2_source.isValid() && ip3_source.isValid() &&
+                      ic1_dest.isValid() && ic2_dest.isValid() && ic3_dest.isValid();
 
-    if ( ic1.isValid() && ic2.isValid() && ic3.isValid()
-            && ip1.isValid() && ip2.isValid() && ip3.isValid() ){
-        ielts = getDocumentModel()->replace( iquads,
-                ip1, ic1,
-                ip2, ic2,
-                ip3, ic3 );
+    if (ipts_ok)
+    {
+        if (radioButton->isChecked())
+        {
+            ielts = getDocumentModel()->replace( iquads_source,
+                                                 ip1_source, ic1_dest,
+                                                 ip2_source, ic2_dest,
+                                                 ip3_source, ic3_dest );
+        }
+        else if (radioButton_2->isChecked())
+        {
+            QModelIndexList iquads_dest;
+            nbQuads = quads_lw_2->count();
+            for (int i = 0; i < nbQuads; ++i)
+            {
+                item = quads_lw_2->item(i);
+                iquad = patternDataModel->mapToSource( item->data(LW_QMODELINDEX_ROLE).value<QModelIndex>() );
+                if (iquad.isValid())
+                    iquads_dest << iquad;
+            }
+
+            ielts = getDocumentModel()->replace( iquads_source, iquads_dest,
+                                                 ip1_source, ic1_dest,
+                                                 ip2_source, ic2_dest,
+                                                 ip3_source, ic3_dest);
+        }
     }
 
     if ( !ielts.isValid() ){
@@ -5873,7 +6183,20 @@ void QuadRevolutionDialog::_initInputWidget( Mode editmode )
     center_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
     axis_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
 
+    angle_spb->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    angle_spb->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    angle_spb->setProperty("Angle", QVariant::fromValue(true));
+    angle_spb->installEventFilter(this);
+
+    angles_lw->setProperty("HexaWidgetType", QVariant::fromValue(EDGE_TREE));
+    angles_lw->setProperty("GeomWidgetType", QVariant::fromValue(TopAbs_EDGE));
+    angles_lw->setProperty("Angle", QVariant::fromValue(true));
+    angles_lw->installEventFilter(this);
+
     installEventFilter(this);
+    revolutionUni_rb->installEventFilter(this);
+    revolution_rb->installEventFilter(this);
+
     quads_lw->installEventFilter(this);
     center_le->installEventFilter(this);
     axis_le->installEventFilter(this);
@@ -6023,21 +6346,21 @@ MakeHemiSphereDialog::MakeHemiSphereDialog( QWidget* parent, Mode editmode, Qt::
 
     connect( sphereTop_rb, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
     connect( sphereUni_rb, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
-    connect( sphere2_rb, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
-    connect( sphere_rb, SIGNAL(clicked()), this, SLOT(clearVTKSelection()) );
-    connect( sphere_rb, SIGNAL(clicked()), this, SLOT(clearCurrentObjectFocus()) );
+    connect( sphere2_rb,   SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+    connect( sphere_rb,    SIGNAL(clicked()), this, SLOT(clearVTKSelection()) );
+    connect( sphere_rb,    SIGNAL(clicked()), this, SLOT(clearCurrentObjectFocus()) );
 
     connect( sphericalTop_rb, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
     connect( sphericalUni_rb, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
-    connect( spherical2_rb, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
-    connect( spherical_rb, SIGNAL(clicked()), this, SLOT(clearVTKSelection()) );
-    connect( spherical_rb, SIGNAL(clicked()), this, SLOT(clearCurrentObjectFocus()) );
+    connect( spherical2_rb,   SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+    connect( spherical_rb,    SIGNAL(clicked()), this, SLOT(clearVTKSelection()) );
+    connect( spherical_rb,    SIGNAL(clicked()), this, SLOT(clearCurrentObjectFocus()) );
 
     connect( rindTop_rb, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
     connect( rindUni_rb, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
-    connect( rind2_rb, SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
-    connect( rind_rb, SIGNAL(clicked()), this, SLOT(clearVTKSelection()) );
-    connect( rind_rb, SIGNAL(clicked()), this, SLOT(clearCurrentObjectFocus()) );
+    connect( rind2_rb,   SIGNAL(clicked()), this, SLOT(updateHelpFileName()) );
+    connect( rind_rb,    SIGNAL(clicked()), this, SLOT(clearVTKSelection()) );
+    connect( rind_rb,    SIGNAL(clicked()), this, SLOT(clearCurrentObjectFocus()) );
 }
 
 // ============================================================== Destructeur
@@ -6053,12 +6376,66 @@ void MakeHemiSphereDialog::_initInputWidget( Mode editmode )
     base_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VECTOR_TREE) );
     vplan_le->setProperty( "HexaWidgetType",  QVariant::fromValue(VERTEX_TREE) );
 
+    sphere_radext_spb->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE) );
+    sphere_radext_spb->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE) );
+    sphere_radext_spb->setProperty("Radius", QVariant::fromValue(true));
+
+    sphere_radint_spb->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE) );
+    sphere_radint_spb->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE) );
+    sphere_radint_spb->setProperty("Radius", QVariant::fromValue(true));
+
+    hole_rad_spb->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE) );
+    hole_rad_spb->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE) );
+    hole_rad_spb->setProperty("Radius", QVariant::fromValue(true));
+
+    radial_angle_spb->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE) );
+    radial_angle_spb->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE) );
+    radial_angle_spb->setProperty("Angle", QVariant::fromValue(true));
+
+    radius_lw_1->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE) );
+    radius_lw_1->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE) );
+    radius_lw_1->setProperty("Radius", QVariant::fromValue(true));
+
+    radius_lw_2->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE) );
+    radius_lw_2->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE) );
+    radius_lw_2->setProperty("Radius", QVariant::fromValue(true));
+
+    height_lw->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE) );
+    height_lw->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE) );
+    height_lw->setProperty("Length", QVariant::fromValue(true));
+
+    angle_lw->setProperty( "HexaWidgetType", QVariant::fromValue(EDGE_TREE) );
+    angle_lw->setProperty( "GeomWidgetType", QVariant::fromValue(TopAbs_EDGE) );
+    angle_lw->setProperty("Angle", QVariant::fromValue(true));
+
     installEventFilter(this);
     center_le->installEventFilter(this);
     hole_axis_le->installEventFilter(this);
     base_le->installEventFilter(this);
     vplan_le->installEventFilter(this);
 
+    sphere_radext_spb->installEventFilter(this);
+    sphere_radint_spb->installEventFilter(this);
+    hole_rad_spb->installEventFilter(this);
+    radial_angle_spb->installEventFilter(this);
+    radius_lw_1->installEventFilter(this);
+    radius_lw_2->installEventFilter(this);
+    height_lw->installEventFilter(this);
+    angle_lw->installEventFilter(this);
+
+    sphere_rb->installEventFilter(this);
+    sphereTop_rb->installEventFilter(this);
+    sphereUni_rb->installEventFilter(this);
+    sphere2_rb->installEventFilter(this);
+    rind_rb->installEventFilter(this);
+    rindTop_rb->installEventFilter(this);
+    rindUni_rb->installEventFilter(this);
+    rind2_rb->installEventFilter(this);
+    spherical_rb->installEventFilter(this);
+    sphericalTop_rb->installEventFilter(this);
+    sphericalUni_rb->installEventFilter(this);
+    spherical2_rb->installEventFilter(this);
+
     center_le->setReadOnly(true);
     hole_axis_le->setReadOnly(true);
     base_le->setReadOnly(true);
index c123698c7f6830c811b73cdc313ec9182a7c2a0e..83254b6f3eefdb9bd9e51b13982015a395e9a71e 100755 (executable)
@@ -19,8 +19,6 @@
 #ifndef __HEXABLOCKGUI_DOCUMENTPANEL_HXX_
 #define __HEXABLOCKGUI_DOCUMENTPANEL_HXX_
 
-#include "HEXABLOCKGUI_Export.hxx"
-
 #define MAX_WIDTH 16777215
 #define MAX_HEIGHT 16777215
 #define MIN_WIDTH 5
 
 #include "klinkitemselectionmodel.hxx"
 
+
 Q_DECLARE_METATYPE(QModelIndex);
 
 namespace HEXABLOCK
 {
   namespace GUI
   {
-    class HEXABLOCK_EXPORT HexaBaseDialog : public QDialog
+    class HexaExport HexaBaseDialog : public QDialog
     {
       Q_OBJECT
 
@@ -134,10 +133,6 @@ namespace HEXABLOCK
           return HEXABLOCKGUI::currentDocGView->getPatternGeomModel();
       }
 
-//      PatternBuilderModel* getPatternBuilderModel() const {
-//          return HEXABLOCKGUI::currentDocGView->getPatternBuilderModel();
-//      }
-
       GroupsModel* getGroupsModel() const {
           return HEXABLOCKGUI::currentDocGView->getGroupsModel();
       }
@@ -151,10 +146,6 @@ namespace HEXABLOCK
          return HEXABLOCKGUI::currentDocGView->getPatternDataSelectionModel();
       }
 
-//      PatternBuilderSelectionModel* getPatternBuilderSelectionModel() const {
-//         return HEXABLOCKGUI::currentDocGView->getPatternBuilderSelectionModel();
-//      }
-
       PatternGeomSelectionModel* getPatternGeomSelectionModel() const {
           return HEXABLOCKGUI::currentDocGView->getPatternGeomSelectionModel();
       }
@@ -183,6 +174,7 @@ namespace HEXABLOCK
         return assocs;
       }
       virtual void setCurrentGeomObj(DocumentModel::GeomObj* geomObj) {}
+      virtual void computeAndSetDimension(const QModelIndex& elt);
 
       bool debugEdgeAssoc; //Temporary
       bool autoFocusSwitch;
@@ -229,13 +221,15 @@ namespace HEXABLOCK
 
     void _updateCurrentObject(QObject*);
 
+    bool isDimensionType(const QObject* obj);
+
     Mode _editMode;
 
-    QMap<QObject*, QModelIndex>   _index;
-    QObject*                      _currentObj;
+    QMap<QObject*, QModelIndex>    _index;
+    QObject*                       _currentObj;
     QMap<HexaWidgetType, QString>  _strHexaWidgetType;
-    QPushButton* _applyButton;
-    QString  _helpFileName;
+    QPushButton*                   _applyButton;
+    QString                        _helpFileName;
 
     private:
     bool _isLineOrListWidget(QObject*);
@@ -251,9 +245,7 @@ namespace HEXABLOCK
 
     };
 
-
-
-    class HEXABLOCK_EXPORT VertexDialog : public HexaBaseDialog,
+    class HexaExport VertexDialog : public HexaBaseDialog,
     public Ui::VertexDialog
     {
       Q_OBJECT
@@ -281,7 +273,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT EdgeDialog : public HexaBaseDialog,
+    class HexaExport EdgeDialog : public HexaBaseDialog,
     public Ui::EdgeDialog
     {
       Q_OBJECT
@@ -307,7 +299,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT QuadDialog : public HexaBaseDialog,
+    class HexaExport QuadDialog : public HexaBaseDialog,
     public Ui::QuadDialog
     {
       Q_OBJECT
@@ -334,7 +326,7 @@ namespace HEXABLOCK
 
 
 
-    class HEXABLOCK_EXPORT HexaDialog : public HexaBaseDialog,
+    class HexaExport HexaDialog : public HexaBaseDialog,
     public Ui::HexaDialog
     {
       Q_OBJECT
@@ -369,7 +361,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT VectorDialog : public HexaBaseDialog,
+    class HexaExport VectorDialog : public HexaBaseDialog,
     public Ui::VectorDialog
     {
       Q_OBJECT
@@ -394,7 +386,7 @@ namespace HEXABLOCK
     QModelIndex     _ivalue;
     };
 
-    class HEXABLOCK_EXPORT MakeGridDialog : public HexaBaseDialog,
+    class HexaExport MakeGridDialog : public HexaBaseDialog,
     public Ui::MakeGridDialog
     {
       Q_OBJECT
@@ -423,7 +415,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT MakeCylinderDialog : public HexaBaseDialog,
+    class HexaExport MakeCylinderDialog : public HexaBaseDialog,
     public Ui::MakeCylinderDialog
     {
       Q_OBJECT
@@ -451,7 +443,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT MakePipeDialog : public HexaBaseDialog,
+    class HexaExport MakePipeDialog : public HexaBaseDialog,
     public Ui::MakePipeDialog
     {
       Q_OBJECT
@@ -479,7 +471,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT MakeCylindersDialog : public HexaBaseDialog,
+    class HexaExport MakeCylindersDialog : public HexaBaseDialog,
     public Ui::MakeCylindersDialog
     {
       Q_OBJECT
@@ -498,7 +490,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT MakePipesDialog : public HexaBaseDialog,
+    class HexaExport MakePipesDialog : public HexaBaseDialog,
     public Ui::MakePipesDialog
     {
       Q_OBJECT
@@ -518,7 +510,7 @@ namespace HEXABLOCK
 
 
 
-    class HEXABLOCK_EXPORT RemoveHexaDialog : public HexaBaseDialog,
+    class HexaExport RemoveHexaDialog : public HexaBaseDialog,
     public Ui::RemoveHexaDialog
     {
       Q_OBJECT
@@ -537,7 +529,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT PrismQuadDialog : public HexaBaseDialog,
+    class HexaExport PrismQuadDialog : public HexaBaseDialog,
     public Ui::PrismQuadDialog
     {
       Q_OBJECT
@@ -560,13 +552,13 @@ namespace HEXABLOCK
     void updateHelpFileName();
 
     private slots:
-    //void addQuad();
+    void addQuad();
     void removeQuad();
-    //void clearQuads();
+    void clearQuads();
 
     };
 
-    class HEXABLOCK_EXPORT JoinQuadDialog : public HexaBaseDialog,
+    class HexaExport JoinQuadDialog : public HexaBaseDialog,
     public Ui::JoinQuadDialog
     {
       Q_OBJECT
@@ -590,14 +582,14 @@ namespace HEXABLOCK
     void updateHelpFileName();
 
     private slots:
-    //void addQuad();
+    void addQuad();
     void removeQuad();
-    //void clearQuads();
+    void clearQuads();
 
     };
 
 
-    class HEXABLOCK_EXPORT MergeDialog : public HexaBaseDialog,
+    class HexaExport MergeDialog : public HexaBaseDialog,
     public Ui::MergeDialog
     {
       Q_OBJECT
@@ -621,7 +613,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT DisconnectDialog : public HexaBaseDialog,
+    class HexaExport DisconnectDialog : public HexaBaseDialog,
     public Ui::DisconnectDialog
     {
       Q_OBJECT
@@ -647,7 +639,7 @@ namespace HEXABLOCK
 
 
 
-    class HEXABLOCK_EXPORT CutEdgeDialog : public HexaBaseDialog,
+    class HexaExport CutEdgeDialog : public HexaBaseDialog,
     public Ui::CutEdgeDialog
     {
       Q_OBJECT
@@ -671,7 +663,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT MakeTransformationDialog : public HexaBaseDialog,
+    class HexaExport MakeTransformationDialog : public HexaBaseDialog,
     public Ui::TransformationDialog
     {
       Q_OBJECT
@@ -693,7 +685,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT MakeSymmetryDialog : public HexaBaseDialog,
+    class HexaExport MakeSymmetryDialog : public HexaBaseDialog,
     public Ui::SymmetryDialog
     {
       Q_OBJECT
@@ -717,7 +709,7 @@ namespace HEXABLOCK
 
 
 
-    class HEXABLOCK_EXPORT PerformTransformationDialog : public HexaBaseDialog,
+    class HexaExport PerformTransformationDialog : public HexaBaseDialog,
     public Ui::TransformationDialog
     {
       Q_OBJECT
@@ -739,7 +731,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT PerformSymmetryDialog : public HexaBaseDialog,
+    class HexaExport PerformSymmetryDialog : public HexaBaseDialog,
     public Ui::SymmetryDialog
     {
       Q_OBJECT
@@ -760,7 +752,7 @@ namespace HEXABLOCK
     void updateHelpFileName();
     };
 
-class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
+class HexaExport EdgeAssocDialog : public HexaBaseDialog,
     public Ui::EdgeAssocDialog
     {
       Q_OBJECT
@@ -798,7 +790,7 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
     };
 
 
-    class HEXABLOCK_EXPORT QuadAssocDialog : public HexaBaseDialog,
+    class HexaExport QuadAssocDialog : public HexaBaseDialog,
     public Ui::QuadAssocDialog
     {
       Q_OBJECT
@@ -829,7 +821,7 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
 
 
 
-    class HEXABLOCK_EXPORT GroupDialog : public HexaBaseDialog,
+    class HexaExport GroupDialog : public HexaBaseDialog,
     public Ui::GroupDialog
     {
       Q_OBJECT
@@ -861,7 +853,7 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
 
 
 
-    class HEXABLOCK_EXPORT LawDialog : public HexaBaseDialog,
+    class HexaExport LawDialog : public HexaBaseDialog,
     public Ui::LawDialog
     {
       Q_OBJECT
@@ -889,7 +881,7 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
 
 
 
-    class HEXABLOCK_EXPORT PropagationDialog : public HexaBaseDialog,
+    class HexaExport PropagationDialog : public HexaBaseDialog,
     public Ui::PropagationDialog
     {
       Q_OBJECT
@@ -909,7 +901,7 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
     void _initInputWidget( Mode editmode );
 
     protected slots:
-    //void updateHelpFileName();
+    void updateHelpFileName();
     void deletePropagationItem();
     virtual void selectElementOfModel();
 
@@ -922,7 +914,7 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
     // Define the compute mesh dialog box
     // ----------------------------------
 
-    class HEXABLOCK_EXPORT ComputeMeshDialog : public HexaBaseDialog,
+    class HexaExport ComputeMeshDialog : public HexaBaseDialog,
     public Ui::ComputeMeshDialog
     {
       Q_OBJECT
@@ -943,7 +935,7 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
 
 
 
-    class HEXABLOCK_EXPORT ReplaceHexaDialog : public HexaBaseDialog,
+    class HexaExport ReplaceHexaDialog : public HexaBaseDialog,
     public Ui::ReplaceHexaDialog
     {
       Q_OBJECT
@@ -963,6 +955,7 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
 
     protected slots:
     void deleteQuadItem();
+    void deleteQuadItem2();
     void updateButtonBox();
 
     private:
@@ -973,7 +966,7 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
 
 
 
-    class HEXABLOCK_EXPORT QuadRevolutionDialog : public HexaBaseDialog,
+    class HexaExport QuadRevolutionDialog : public HexaBaseDialog,
     public Ui::QuadRevolutionDialog
     {
       Q_OBJECT
@@ -1002,7 +995,7 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
 
 
 
-    class HEXABLOCK_EXPORT MakeHemiSphereDialog : public HexaBaseDialog,
+    class HexaExport MakeHemiSphereDialog : public HexaBaseDialog,
     public Ui::MakeHemiSphereDialog
     {
       Q_OBJECT
@@ -1033,7 +1026,7 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
     HEXA_NS::Elements *_value;
     };
 
-    class HEXABLOCK_EXPORT ModelInfoDialog : public HexaBaseDialog,
+    class HexaExport ModelInfoDialog : public HexaBaseDialog,
     public Ui::ModelInfoDialog
     {
         Q_OBJECT
@@ -1052,7 +1045,7 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
         virtual void _initInputWidget( Mode editmode ){}
     };
 
-    class HEXABLOCK_EXPORT AddShapeDialog : public HexaBaseDialog,
+    class HexaExport AddShapeDialog : public HexaBaseDialog,
     public Ui::AddShapeDialog
     {
         Q_OBJECT
index 923f1de88ef75f8ba33df25035a7dbe4e666d497..7f55a543c52e0815f7b60b7391f9eb4880e155bb 100755 (executable)
 #ifndef _HEXABLOCKGUI_DOCUMENTSELECTIONMODEL_HXX_
 #define _HEXABLOCKGUI_DOCUMENTSELECTIONMODEL_HXX_
 
-#include "HEXABLOCKGUI_Export.hxx"
+#include "hexa_base.hxx"
 
 #include <QItemSelectionModel>
-#include <LightApp_SelectionMgr.h>
+//#include <LightApp_SelectionMgr.h>
 
-#include <SVTK_ViewWindow.h>
+//#include <SVTK_ViewWindow.h>
 #include <SVTK_Selector.h>
 
-#include "klinkitemselectionmodel.hxx"
+//#include "klinkitemselectionmodel.hxx"
 
 #include "HEXABLOCKGUI_DocumentModel.hxx"
 
@@ -40,7 +40,7 @@ namespace HEXABLOCK
   namespace GUI
   {
 
-    class HEXABLOCK_EXPORT SelectionModel: public QItemSelectionModel
+    class HexaExport SelectionModel: public QItemSelectionModel
     {
         Q_OBJECT
 
@@ -89,7 +89,7 @@ namespace HEXABLOCK
 //        }
 //    };
 
-    class HEXABLOCK_EXPORT PatternDataSelectionModel : public SelectionModel
+    class HexaExport PatternDataSelectionModel : public SelectionModel
     {
       Q_OBJECT
 
@@ -113,7 +113,7 @@ namespace HEXABLOCK
 
     };
 
-    class HEXABLOCK_EXPORT PatternGeomSelectionModel : public SelectionModel
+    class HexaExport PatternGeomSelectionModel : public SelectionModel
     {
         Q_OBJECT
 
@@ -134,7 +134,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT GroupsSelectionModel : public SelectionModel
+    class HexaExport GroupsSelectionModel : public SelectionModel
     {
       Q_OBJECT
 
@@ -149,7 +149,7 @@ namespace HEXABLOCK
     };
 
 
-    class HEXABLOCK_EXPORT MeshSelectionModel : public SelectionModel
+    class HexaExport MeshSelectionModel : public SelectionModel
     {
       Q_OBJECT
 
index 6ba6a00083dc20cc64b6d27d33896bdf0403a289..3cda2abfd6cb68697d0ea64f1ce882058c81108d 100755 (executable)
@@ -20,7 +20,7 @@
 #ifndef __HEXABLOCKGUI_EXCEPTION_HXX__
 #define __HEXABLOCKGUI_EXCEPTION_HXX__
 
-#include "HEXABLOCKGUI_Export.hxx"
+#include "hexa_base.hxx"
 
 #include <string>
 #include <exception>
@@ -29,7 +29,7 @@ namespace HEXABLOCK
 {
   namespace GUI
   {
-    class HEXABLOCK_EXPORT Exception : public std::exception
+    class HexaExport Exception : public std::exception
     {
     protected:
       std::string _what;
index c4164c4b7d2d5b906af322fd3718045ac6a31463..717694e9e1bcf2d3507efd2c11e83a4923cc21e7 100644 (file)
@@ -28,7 +28,7 @@
 #include <QMap>
 
 //HEXABLOCK Includes
-#include "HEXABLOCKGUI_Export.hxx"
+#include "hexa_base.hxx"
 #include "HEXABLOCKGUI_VtkDocumentGraphicView.hxx"
 
 namespace HEXABLOCK
@@ -36,7 +36,7 @@ namespace HEXABLOCK
   namespace GUI
   {
 
-      class HEXABLOCK_EXPORT GraphicViewsHandler
+      class HexaExport GraphicViewsHandler
       {
 
       public:
index cab143cefea51749ce105ab3f07b896524a1efd0..cf93b4ae08256bcc41f0921f1a7e2bbe71a348c5 100755 (executable)
 #ifndef HEXABLOCKGUI_OCCSELECTOR_H
 #define HEXABLOCKGUI_OCCSELECTOR_H
 
-#include "HEXABLOCKGUI_Export.hxx"
 
 #include <LightApp_OCCSelector.h>
+#include "hexa_base.hxx"
 
-class HEXABLOCK_EXPORT HEXABLOCKGUI_OCCSelector : public LightApp_OCCSelector
+class HexaExport HEXABLOCKGUI_OCCSelector : public LightApp_OCCSelector
 {
 public:
     HEXABLOCKGUI_OCCSelector( OCCViewer_Viewer*, SUIT_SelectionMgr* );
index d1077517154d92fe5818f6a621b476abbf6f4911..ff1dfc273afb641fde00d2f98d0d49395a3770eb 100644 (file)
@@ -22,8 +22,6 @@
 #ifndef _HEXABLOCKGUI_OCCGRAPHICVIEW_HXX_
 #define _HEXABLOCKGUI_OCCGRAPHICVIEW_HXX_
 
-#include "HEXABLOCKGUI_Export.hxx"
-
 #include <OCCViewer_ViewWindow.h>
 #include "HEXABLOCKGUI_SalomeTools.hxx"
 
@@ -34,6 +32,7 @@
 #include <QModelIndex>
 #include <QModelIndexList>
 
+#include "hexa_base.hxx"
 namespace HEXABLOCK
 {
 
@@ -44,7 +43,7 @@ namespace HEXABLOCK
          *                          OccGraphicView
          ********************************************************************************/
 
-        class HEXABLOCK_EXPORT OccGraphicView
+        class HexaExport OccGraphicView
         {
 
          public:
index 87d1621ba6adb4bd0fb0ca39edcd79c3cf343054..50e7a16a358043d9386dfbf1bb976db195cdcfcd 100755 (executable)
@@ -20,7 +20,7 @@
 #ifndef _HEXABLOCKGUI_RESOURCE_HXX_
 #define _HEXABLOCKGUI_RESOURCE_HXX_
 
-#include "HEXABLOCKGUI_Export.hxx"
+#include "hexa_base.hxx"
 
 #include <QtGui>
 
@@ -29,7 +29,7 @@ class SUIT_ResourceMgr;
 
 
 
-class HEXABLOCK_EXPORT HEXABLOCKGUI_Resource 
+class HexaExport HEXABLOCKGUI_Resource 
 {
   public:
     HEXABLOCKGUI_Resource(SUIT_ResourceMgr* r);
index c5097fd756ed438aa4607704cdc645b1ade405df..3965885500283f10af14943f775342d01787be0d 100644 (file)
@@ -20,7 +20,7 @@
 #ifndef _HEXABLOCKGUI_SALOMETOOLS_HXX_
 #define _HEXABLOCKGUI_SALOMETOOLS_HXX_
 
-#include "HEXABLOCKGUI_Export.hxx"
+#include "hexa_base.hxx"
 
 #include <SalomeApp_Application.h>
 #include <SALOME_Actor.h>
@@ -41,48 +41,48 @@ namespace HEXABLOCK
   namespace GUI
   {
 
-HEXABLOCK_EXPORT  SALOME_Actor* findActorByEntry( SVTK_ViewWindow *theVtkViewWindow, const char* theEntry );
+HexaExport  SALOME_Actor* findActorByEntry( SVTK_ViewWindow *theVtkViewWindow, const char* theEntry );
   _PTR(Study)   GetActiveStudyDocument();
 
-HEXABLOCK_EXPORT int GetNameOfSelectedElements( SVTK_ViewWindow *theWindow,/* SVTK_Selector* theSelector,*/
+HexaExport int GetNameOfSelectedElements( SVTK_ViewWindow *theWindow,/* SVTK_Selector* theSelector,*/
                                  const Handle(SALOME_InteractiveObject)& theIO,
                                  QString& theName );
 
-HEXABLOCK_EXPORT std::string shape2string( const TopoDS_Shape& aShape );
+HexaExport std::string shape2string( const TopoDS_Shape& aShape );
 
-HEXABLOCK_EXPORT void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj,
+HexaExport void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj,
                                const Handle(AIS_InteractiveContext)& theIC,
                                SelectMgr_IndexedMapOfOwner& theMap );
 
-HEXABLOCK_EXPORT void indicesToOwners( const TColStd_IndexedMapOfInteger& aIndexMap,
+HexaExport void indicesToOwners( const TColStd_IndexedMapOfInteger& aIndexMap,
                                const TopoDS_Shape& aMainShape,
                                const SelectMgr_IndexedMapOfOwner& anAllMap,
                                SelectMgr_IndexedMapOfOwner& aToHiliteMap );
 
-HEXABLOCK_EXPORT TopoDS_Shape getSubShape(const TopoDS_Shape& theShape, const int theIndex);
-HEXABLOCK_EXPORT int getSubId(const TopoDS_Shape& theShape, const TopoDS_Shape& theSubShape);
+HexaExport TopoDS_Shape getSubShape(const TopoDS_Shape& theShape, const int theIndex);
+HexaExport int getSubId(const TopoDS_Shape& theShape, const TopoDS_Shape& theSubShape);
 
-HEXABLOCK_EXPORT Standard_Boolean getExtremaSolution(const gp_Pnt& theInitPnt,
+HexaExport Standard_Boolean getExtremaSolution(const gp_Pnt& theInitPnt,
                                                                          const TopoDS_Shape& theRefShape,
                                                                          gp_Pnt& thePnt);
 
-HEXABLOCK_EXPORT TopoDS_Vertex makePoint(const double x, const double y, const double z);
+HexaExport TopoDS_Vertex makePoint(const double x, const double y, const double z);
 
-HEXABLOCK_EXPORT TopoDS_Vertex makePointWithReference(const TopoDS_Shape& point, const double dx,
+HexaExport TopoDS_Vertex makePointWithReference(const TopoDS_Shape& point, const double dx,
                                                            const double dy,
                                                            const double dz);
 
-HEXABLOCK_EXPORT TopoDS_Vertex makePointOnCurve(const TopoDS_Shape& edge, const double param);
+HexaExport TopoDS_Vertex makePointOnCurve(const TopoDS_Shape& edge, const double param);
 
-HEXABLOCK_EXPORT TopoDS_Vertex makePointOnCurveByLength(const TopoDS_Shape& edge, const TopoDS_Shape& point, const double length);
+HexaExport TopoDS_Vertex makePointOnCurveByLength(const TopoDS_Shape& edge, const TopoDS_Shape& point, const double length);
 
-HEXABLOCK_EXPORT TopoDS_Vertex makePointOnCurveByCoord(const TopoDS_Shape& edge, const double x, const double y, const double z);
+HexaExport TopoDS_Vertex makePointOnCurveByCoord(const TopoDS_Shape& edge, const double x, const double y, const double z);
 
   TopoDS_Vertex makePointOnLinesIntersection(const TopoDS_Shape& line1, const TopoDS_Shape& line2);
 
-HEXABLOCK_EXPORT TopoDS_Vertex makePointOnSurface(const TopoDS_Shape& face, const double param_u, const double param_v);
+HexaExport TopoDS_Vertex makePointOnSurface(const TopoDS_Shape& face, const double param_u, const double param_v);
 
-HEXABLOCK_EXPORT TopoDS_Vertex makePointOnSurfaceByCoord(const TopoDS_Shape& face, const double x, const double y, const double z);
+HexaExport TopoDS_Vertex makePointOnSurfaceByCoord(const TopoDS_Shape& face, const double x, const double y, const double z);
 
   }
 }
index 92708129b6e87ccfda040a301fff027403aab31d..cccd3e303d487cb85455f7e5b7b787af20d3e129 100755 (executable)
@@ -23,7 +23,7 @@
 #include <iostream>
 #include <sstream>
 
-#include "HEXABLOCKGUI_Export.hxx"
+#include "hexa_base.hxx"
 #include "HEXABLOCKGUI_Exception.hxx"
 
 #ifdef _DEVDEBUG_
@@ -34,7 +34,7 @@
 
 namespace HEXABLOCK {
   namespace GUI {
-    extern HEXABLOCK_EXPORT int traceLevel;
+    extern HexaExport int traceLevel;
   }
 }
 
index e5d0899996eed459a9813a1460923b8d4bc6eaf8..d1b74ea1de5b726527889e4999d4d1941282e1a0 100755 (executable)
@@ -20,8 +20,6 @@
 #ifndef _HEXABLOCKGUI_VTKDOCUMENTGRAPHICVIEW_HXX_
 #define _HEXABLOCKGUI_VTKDOCUMENTGRAPHICVIEW_HXX_
 
-#include "HEXABLOCKGUI_Export.hxx"\r
-\r
 // SALOME GUI includes
 #include <LightApp_Displayer.h>
 #include <SUIT_ViewWindow.h>
@@ -55,7 +53,7 @@ namespace HEXABLOCK
 
     namespace GUI
     {
-        class HEXABLOCK_EXPORT Document_Actor : public SALOME_Actor
+        class HexaExport Document_Actor : public SALOME_Actor
         {
           public:
             Document_Actor(HEXA_NS::Document* doc, const QString& entry);
@@ -73,7 +71,7 @@ namespace HEXABLOCK
 
         };
                    // Abu
-        class HEXABLOCK_EXPORT Associate_Actor : public SALOME_Actor
+        class HexaExport Associate_Actor : public SALOME_Actor
         {
           public:
             Associate_Actor(HEXA_NS::Document* doc, const QString& entry);
@@ -93,7 +91,7 @@ namespace HEXABLOCK
         /********************************************************************************
          *                          VtkDocumentGraphicView
          ********************************************************************************/
-        class HEXABLOCK_EXPORT VtkDocumentGraphicView : public QAbstractItemView
+        class HexaExport VtkDocumentGraphicView : public QAbstractItemView
         {
             Q_OBJECT
 
index 00fb8e13c9308b8e0dea612db5b46766743e5998..9df00a2f1e701270bdadcd5e3b485fa635496c04 100644 (file)
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>354</width>
-        <height>638</height>
+        <width>348</width>
+        <height>619</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout_3">
              <double>10.000000000000000</double>
             </property>
             <property name="value">
-             <double>90.000000000000000</double>
+             <double>360.000000000000000</double>
             </property>
            </widget>
           </item>
index c3ecb3fb506a749998ca273dc59fe1ed1fd3ab2e..4f4c43fdbdfa0f2c7ba8d0622ad2743dad907236 100644 (file)
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>337</width>
-        <height>638</height>
+        <width>331</width>
+        <height>619</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout_2">
              <double>10.000000000000000</double>
             </property>
             <property name="value">
-             <double>90.000000000000000</double>
+             <double>360.000000000000000</double>
             </property>
            </widget>
           </item>
index 6278d9c83ac4e4151abacf3155a1f2e458c2d9c1..730c224fe01ba16c4541aeb0c58b8be8f3a7866d 100755 (executable)
@@ -21,7 +21,8 @@
 #ifndef MYBASICGUI_POINTDLG_H
 #define MYBASICGUI_POINTDLG_H
 
-#include "HEXABLOCKGUI_Export.hxx"\r
+
+
 
 #include "MyGEOMBase_Skeleton.hxx"
 #include <QMap>
@@ -62,7 +63,8 @@ namespace HEXABLOCK
 // class    : MyBasicGUI_PointDlg
 // purpose  :
 //=================================================================================
-typedef class HEXABLOCK_EXPORT MyBasicGUI_PointDlg : public MyGEOMBase_Skeleton
+#include "hexa_base.hxx"
+typedef class HexaExport MyBasicGUI_PointDlg : public MyGEOMBase_Skeleton
 {
   Q_OBJECT
 
@@ -111,8 +113,8 @@ private slots:
   void                               ClickParamCoord( int );
   void                               onBtnPopup( QAction* );
   void                               updateSize();
// void                               onRefPointChanged(const QString& pointName);
// void                               onStartPointSelected(const QString& pointName);
+  void                               onRefPointChanged(const QString& pointName);
+  void                               onStartPointSelected(const QString& pointName);
   void                               onParamValueChanged(double newValue);
   void                               onXCoordChanged(double newValue);
   void                               onYCoordChanged(double newValue);
index c38723cb5df0cf83e384a75fefd4574e613521f0..da14e2a693b552afbdea1e0ca8cd47203ba467a0 100755 (executable)
@@ -20,8 +20,8 @@
 #ifndef MYGEOMBASE_SKELETON_H
 #define MYGEOMBASE_SKELETON_H
 
-#include "HEXABLOCKGUI_Export.hxx"\r
-\r
+
+
 #include "HEXABLOCKGUI_OccGraphicView.hxx"
 #include "HEXABLOCKGUI.hxx"
 #include "HEXABLOCKGUI_DocumentPanel.hxx"
@@ -43,12 +43,14 @@ class QPushButton;
 #  define DBL_DIGITS_DISPLAY 13
 #endif // COORD_MIN
 
+#include "hexa_base.hxx"
+
 namespace HEXABLOCK
 {
 namespace GUI
 {
 
-class HEXABLOCK_EXPORT MyGEOMBase_Skeleton : public HexaBaseDialog
+class HexaExport MyGEOMBase_Skeleton : public HexaBaseDialog
 {
        Q_OBJECT
 
index e387f00a839c12afa8e98be5783f175188b9db30..451e65785ac823a93d4a86a5782bfeab823242a4 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>287</width>
-    <height>500</height>
+    <width>285</width>
+    <height>669</height>
    </rect>
   </property>
   <property name="minimumSize">
    <string>Replace Hexahedron</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string/>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <item>
+       <widget class="QRadioButton" name="radioButton">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Hexa</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="radioButton_2">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>Hexas</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
    <item>
     <widget class="QScrollArea" name="scrollArea">
      <property name="sizePolicy">
@@ -36,8 +77,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>267</width>
-        <height>480</height>
+        <width>265</width>
+        <height>585</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout_4">
           </sizepolicy>
          </property>
          <property name="title">
-          <string>Quad destination</string>
+          <string>Quad(s) destination</string>
          </property>
-         <layout class="QFormLayout" name="formLayout_3">
-          <item row="0" column="0">
-           <widget class="QLabel" name="label">
-            <property name="text">
-             <string>Point a</string>
-            </property>
-           </widget>
-          </item>
-          <item row="0" column="1">
-           <widget class="QLineEdit" name="c1_le">
+         <layout class="QVBoxLayout" name="verticalLayout_5">
+          <item>
+           <widget class="QListWidget" name="quads_lw_2">
             <property name="sizePolicy">
-             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
-            <property name="toolTip">
-             <string>Select vertex</string>
-            </property>
-            <property name="text">
-             <string/>
-            </property>
-            <property name="readOnly">
-             <bool>false</bool>
-            </property>
-           </widget>
-          </item>
-          <item row="1" column="0">
-           <widget class="QLabel" name="label_2">
-            <property name="text">
-             <string>Point b</string>
-            </property>
-           </widget>
-          </item>
-          <item row="1" column="1">
-           <widget class="QLineEdit" name="c2_le">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
+            <property name="maximumSize">
+             <size>
+              <width>16777215</width>
+              <height>16777215</height>
+             </size>
             </property>
             <property name="toolTip">
-             <string>Select vertex</string>
-            </property>
-            <property name="text">
-             <string/>
-            </property>
-            <property name="readOnly">
-             <bool>false</bool>
-            </property>
-           </widget>
-          </item>
-          <item row="2" column="0">
-           <widget class="QLabel" name="label_3">
-            <property name="text">
-             <string>Point c</string>
+             <string>Select hexa</string>
             </property>
            </widget>
           </item>
-          <item row="2" column="1">
-           <widget class="QLineEdit" name="c3_le">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-            <property name="toolTip">
-             <string>Select vertex</string>
-            </property>
-            <property name="text">
-             <string/>
-            </property>
-            <property name="readOnly">
-             <bool>false</bool>
-            </property>
+          <item>
+           <widget class="QWidget" name="widget_3" native="true">
+            <layout class="QFormLayout" name="formLayout">
+             <property name="fieldGrowthPolicy">
+              <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+             </property>
+             <item row="1" column="0">
+              <widget class="QLabel" name="label">
+               <property name="text">
+                <string>Point a</string>
+               </property>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QLineEdit" name="c1_le">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string>Select vertex</string>
+               </property>
+               <property name="text">
+                <string/>
+               </property>
+               <property name="readOnly">
+                <bool>false</bool>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="0">
+              <widget class="QLabel" name="label_2">
+               <property name="text">
+                <string>Point b</string>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="1">
+              <widget class="QLineEdit" name="c2_le">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string>Select vertex</string>
+               </property>
+               <property name="text">
+                <string/>
+               </property>
+               <property name="readOnly">
+                <bool>false</bool>
+               </property>
+              </widget>
+             </item>
+             <item row="3" column="0">
+              <widget class="QLabel" name="label_3">
+               <property name="text">
+                <string>Point c</string>
+               </property>
+              </widget>
+             </item>
+             <item row="3" column="1">
+              <widget class="QLineEdit" name="c3_le">
+               <property name="sizePolicy">
+                <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+                 <horstretch>0</horstretch>
+                 <verstretch>0</verstretch>
+                </sizepolicy>
+               </property>
+               <property name="toolTip">
+                <string>Select vertex</string>
+               </property>
+               <property name="text">
+                <string/>
+               </property>
+               <property name="readOnly">
+                <bool>false</bool>
+               </property>
+              </widget>
+             </item>
+            </layout>
            </widget>
           </item>
          </layout>
   <tabstop>p1_le</tabstop>
   <tabstop>p2_le</tabstop>
   <tabstop>p3_le</tabstop>
-  <tabstop>c1_le</tabstop>
-  <tabstop>c2_le</tabstop>
-  <tabstop>c3_le</tabstop>
  </tabstops>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>radioButton</sender>
+   <signal>clicked()</signal>
+   <receiver>quads_lw_2</receiver>
+   <slot>hide()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>109</x>
+     <y>44</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>146</x>
+     <y>453</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>radioButton_2</sender>
+   <signal>clicked()</signal>
+   <receiver>quads_lw_2</receiver>
+   <slot>show()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>232</x>
+     <y>44</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>146</x>
+     <y>453</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>
index f745ea358ff61f65cbd2bf9a1242087531f01337..1b3351050c12251aecce001c3d953b2232fdb56e 100755 (executable)
@@ -20,7 +20,7 @@
 #ifndef _RESOURCE_HXX_
 #define _RESOURCE_HXX_
 
-#include "HEXABLOCKGUI_Export.hxx"
+#include "hexa_base.hxx"
 
 #include <QColor>
 #include <QFont>
 
 namespace HEXABLOCK {
   namespace GUI {
-    class HEXABLOCK_EXPORT Resource {
+    class HexaExport Resource {
       public:
         Resource();
 
index 6172392509c678860a019fad5a2fb7cfb81175e6..f861f742830d73034fd12a955c37b28895694939 100644 (file)
@@ -22,8 +22,6 @@
 #ifndef KLINKITEMSELECTIONMODEL_H
 #define KLINKITEMSELECTIONMODEL_H
 
-#include "HEXABLOCKGUI_Export.hxx"\r
-
 #include <QtCore/QObject>
 #include <QtGui/QItemSelectionModel>
 #include <QtGui/QAbstractProxyModel>
@@ -38,7 +36,7 @@
 
 class KLinkItemSelectionModelPrivate;
 
-class HEXABLOCK_EXPORT KLinkItemSelectionModel : public QItemSelectionModel
+class HexaExport KLinkItemSelectionModel : public QItemSelectionModel
 {
     Q_OBJECT
 public:
index eae0c54444be048f60c50922f6c533274835e2a9..6af03c9fc1a5dd6ae30767fa4024f1a91df624b9 100644 (file)
 #ifndef KMODELINDEXPROXYMAPPER_H
 #define KMODELINDEXPROXYMAPPER_H
 
-#include "HEXABLOCKGUI_Export.hxx"\r
-
 #include <QObject>
 
+#include "hexa_base.hxx"
+
 // #include "kdeui_export.h"
 
 class QAbstractItemModel;
@@ -33,7 +33,7 @@ class QModelIndex;
 class QItemSelection;
 class KModelIndexProxyMapperPrivate;
 
-class HEXABLOCK_EXPORT KModelIndexProxyMapper : public QObject
+class HexaExport KModelIndexProxyMapper : public QObject
 {
   Q_OBJECT
 public:
index 9be3a709242afed31226b1eabdbb64a3da9e3614..856b6d0acecf2d20e8d4c853a601933e4cbf7f1c 100644 (file)
@@ -526,7 +526,6 @@ Q_DIRECT = _hexablock_swig.Q_DIRECT
 Q_INVERSE = _hexablock_swig.Q_INVERSE
 Q_UNDEFINED = _hexablock_swig.Q_UNDEFINED
 Q_WAITING = _hexablock_swig.Q_WAITING
-KS_None = _hexablock_swig.KS_None
 KS_Line = _hexablock_swig.KS_Line
 KS_Circle = _hexablock_swig.KS_Circle
 KS_Ellipse = _hexablock_swig.KS_Ellipse
@@ -535,6 +534,7 @@ KS_Parabola = _hexablock_swig.KS_Parabola
 KS_BezierCurve = _hexablock_swig.KS_BezierCurve
 KS_BSplineCurve = _hexablock_swig.KS_BSplineCurve
 KS_OtherCurve = _hexablock_swig.KS_OtherCurve
+KS_None = _hexablock_swig.KS_None
 CylSmall = _hexablock_swig.CylSmall
 CylBig = _hexablock_swig.CylBig
 NxInt = _hexablock_swig.NxInt
@@ -561,6 +561,7 @@ set_special_option = _hexablock_swig.set_special_option
 sizeof_file = _hexablock_swig.sizeof_file
 read_file = _hexablock_swig.read_file
 get_time = _hexablock_swig.get_time
+make_basename = _hexablock_swig.make_basename
 class EltBase(_object):
     __swig_setmethods__ = {}
     __setattr__ = lambda self, name, value: _swig_setattr(self, EltBase, name, value)
@@ -669,6 +670,7 @@ class Edge(EltBase):
     def clearAssociation(*args): return _hexablock_swig.Edge_clearAssociation(*args)
     def setColor(*args): return _hexablock_swig.Edge_setColor(*args)
     def getWay(*args): return _hexablock_swig.Edge_getWay(*args)
+    def getLength(*args): return _hexablock_swig.Edge_getLength(*args)
     def __init__(self, *args): 
         this = _hexablock_swig.new_Edge(*args)
         try: self.this.append(this)
index 5b9833e7fee5ec95d5e12475c948c5c5e3c827ee..556a6aaca58c2dd659cb5dd0115795b3e975a7da 100644 (file)
@@ -17703,6 +17703,43 @@ fail:
 }
 
 
+SWIGINTERN PyObject *_wrap_make_basename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  cpchar arg1 = (cpchar) 0 ;
+  string *arg2 = 0 ;
+  int result;
+  int res1 ;
+  char *buf1 = 0 ;
+  int alloc1 = 0 ;
+  void *argp2 = 0 ;
+  int res2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:make_basename",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make_basename" "', argument " "1"" of type '" "cpchar""'");
+  }
+  arg1 = reinterpret_cast< cpchar >(buf1);
+  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_string,  0 );
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "make_basename" "', argument " "2"" of type '" "string &""'"); 
+  }
+  if (!argp2) {
+    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "make_basename" "', argument " "2"" of type '" "string &""'"); 
+  }
+  arg2 = reinterpret_cast< string * >(argp2);
+  result = (int)Hex::make_basename((char const *)arg1,*arg2);
+  resultobj = SWIG_From_int(static_cast< int >(result));
+  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+  return resultobj;
+fail:
+  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
+  return NULL;
+}
+
+
 SWIGINTERN int Epsil_set(PyObject *) {
   SWIG_Error(SWIG_AttributeError,"Variable Epsil is read-only.");
   return 1;
@@ -19852,6 +19889,28 @@ fail:
 }
 
 
+SWIGINTERN PyObject *_wrap_Edge_getLength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  Hex::Edge *arg1 = (Hex::Edge *) 0 ;
+  double result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject * obj0 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"O:Edge_getLength",&obj0)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__Edge, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Edge_getLength" "', argument " "1"" of type '" "Hex::Edge *""'"); 
+  }
+  arg1 = reinterpret_cast< Hex::Edge * >(argp1);
+  result = (double)(arg1)->getLength();
+  resultobj = SWIG_From_double(static_cast< double >(result));
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
 SWIGINTERN PyObject *_wrap_new_Edge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   Hex::Vertex *arg1 = (Hex::Vertex *) 0 ;
@@ -31444,6 +31503,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"sizeof_file", _wrap_sizeof_file, METH_VARARGS, NULL},
         { (char *)"read_file", _wrap_read_file, METH_VARARGS, NULL},
         { (char *)"get_time", _wrap_get_time, METH_VARARGS, NULL},
+        { (char *)"make_basename", _wrap_make_basename, METH_VARARGS, NULL},
         { (char *)"EltBase_countHexa", _wrap_EltBase_countHexa, METH_VARARGS, NULL},
         { (char *)"EltBase_countQuad", _wrap_EltBase_countQuad, METH_VARARGS, NULL},
         { (char *)"EltBase_countEdge", _wrap_EltBase_countEdge, METH_VARARGS, NULL},
@@ -31508,6 +31568,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"Edge_clearAssociation", _wrap_Edge_clearAssociation, METH_VARARGS, NULL},
         { (char *)"Edge_setColor", _wrap_Edge_setColor, METH_VARARGS, NULL},
         { (char *)"Edge_getWay", _wrap_Edge_getWay, METH_VARARGS, NULL},
+        { (char *)"Edge_getLength", _wrap_Edge_getLength, METH_VARARGS, NULL},
         { (char *)"new_Edge", _wrap_new_Edge, METH_VARARGS, NULL},
         { (char *)"delete_Edge", _wrap_delete_Edge, METH_VARARGS, NULL},
         { (char *)"Edge_swigregister", Edge_swigregister, METH_VARARGS, NULL},
@@ -32686,7 +32747,6 @@ SWIGEXPORT void SWIG_init(void) {
   SWIG_Python_SetConstant(d, "Q_INVERSE",SWIG_From_int(static_cast< int >(Hex::Q_INVERSE)));
   SWIG_Python_SetConstant(d, "Q_UNDEFINED",SWIG_From_int(static_cast< int >(Hex::Q_UNDEFINED)));
   SWIG_Python_SetConstant(d, "Q_WAITING",SWIG_From_int(static_cast< int >(Hex::Q_WAITING)));
-  SWIG_Python_SetConstant(d, "KS_None",SWIG_From_int(static_cast< int >(Hex::KS_None)));
   SWIG_Python_SetConstant(d, "KS_Line",SWIG_From_int(static_cast< int >(Hex::KS_Line)));
   SWIG_Python_SetConstant(d, "KS_Circle",SWIG_From_int(static_cast< int >(Hex::KS_Circle)));
   SWIG_Python_SetConstant(d, "KS_Ellipse",SWIG_From_int(static_cast< int >(Hex::KS_Ellipse)));
@@ -32695,6 +32755,7 @@ SWIGEXPORT void SWIG_init(void) {
   SWIG_Python_SetConstant(d, "KS_BezierCurve",SWIG_From_int(static_cast< int >(Hex::KS_BezierCurve)));
   SWIG_Python_SetConstant(d, "KS_BSplineCurve",SWIG_From_int(static_cast< int >(Hex::KS_BSplineCurve)));
   SWIG_Python_SetConstant(d, "KS_OtherCurve",SWIG_From_int(static_cast< int >(Hex::KS_OtherCurve)));
+  SWIG_Python_SetConstant(d, "KS_None",SWIG_From_int(static_cast< int >(Hex::KS_None)));
   SWIG_Python_SetConstant(d, "CylSmall",SWIG_From_int(static_cast< int >(Hex::CylSmall)));
   SWIG_Python_SetConstant(d, "CylBig",SWIG_From_int(static_cast< int >(Hex::CylBig)));
   SWIG_Python_SetConstant(d, "NxInt",SWIG_From_int(static_cast< int >(Hex::NxInt)));