Salome HOME
PAL10467. Add "Quadrangle Preference" hypothesis for "Quadrangle(Mapping)" algo
authoreap <eap@opencascade.com>
Fri, 23 Dec 2005 10:00:03 +0000 (10:00 +0000)
committereap <eap@opencascade.com>
Fri, 23 Dec 2005 10:00:03 +0000 (10:00 +0000)
15 files changed:
idl/SMESH_BasicHypothesis.idl
resources/StdMeshers.xml
src/SMESH_I/SMESH_2smeshpy.cxx
src/SMESH_I/SMESH_2smeshpy.hxx
src/SMESH_SWIG/smesh.py
src/StdMeshers/Makefile.in
src/StdMeshers/StdMeshers_QuadranglePreference.cxx [new file with mode: 0644]
src/StdMeshers/StdMeshers_QuadranglePreference.hxx [new file with mode: 0644]
src/StdMeshers/StdMeshers_Quadrangle_2D.cxx
src/StdMeshers/StdMeshers_Quadrangle_2D.hxx
src/StdMeshersGUI/StdMeshers_images.po
src/StdMeshers_I/Makefile.in
src/StdMeshers_I/StdMeshers_QuadranglePreference_i.cxx [new file with mode: 0644]
src/StdMeshers_I/StdMeshers_QuadranglePreference_i.hxx [new file with mode: 0644]
src/StdMeshers_I/StdMeshers_i.cxx

index 65124b02c120caae9114a59b4ee5f582105b9b02..2405cd4b2ddd71d14589af920e55c6016f246276 100644 (file)
@@ -258,6 +258,18 @@ module StdMeshers
   {
   };
 
   {
   };
 
+  /*!
+   * StdMeshers_QuadranglePreference: interface of "QuadranglePreference" hypothesis.
+   * This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
+   * Presence of this hypothesis forces construction of quadrangles if the number
+   * of nodes on opposite edges is not the same in the case where the global number
+   * of nodes on edges is even
+   */
+  interface StdMeshers_QuadranglePreference : SMESH::SMESH_Hypothesis
+  {
+  };
+
+
   /*!
    * StdMeshers_Regular_1D: interface of "Wire discretisation" algorithm
    */
   /*!
    * StdMeshers_Regular_1D: interface of "Wire discretisation" algorithm
    */
index 92d94b8f30cb94a2dc10d4cb6d530b413647602e..2c1cd12cccdea1748c34fda3467bb921d77a8acb 100644 (file)
                 icon-id="mesh_hypo_length.png"
                 dim="2"/>
 
                 icon-id="mesh_hypo_length.png"
                 dim="2"/>
 
+    <hypothesis type="QuadranglePreference"
+                label-id="Quadrangle Preference"
+                icon-id="mesh_algo_quad.png"
+                dim="2"/>
+
     <hypothesis type="MaxElementArea"
                 label-id="Max. Element Area"
                 icon-id="mesh_hypo_area.png"
     <hypothesis type="MaxElementArea"
                 label-id="Max. Element Area"
                 icon-id="mesh_hypo_area.png"
index d3ecf4af4e5e6faec926c944143287f086716c42..9526b75289a54631cc62e8407e938d85929646b8 100644 (file)
@@ -701,6 +701,11 @@ Handle(_pyHypothesis) _pyHypothesis::NewHypothesis( const Handle(_pyCommand)& th
     algo->myDim = 2;
     algo->myCreationMethod = "Quadrangle";
   }
     algo->myDim = 2;
     algo->myCreationMethod = "Quadrangle";
   }
+  else if ( hypType == "QuadranglePreference" ) {
+    hyp->myDim = 2;
+    hyp->myCreationMethod = "QuadranglePreference";
+    hyp->myType = "MEFISTO_2D";
+  }
   // 3D ----------
   else if ( hypType == "NETGEN_3D") {
     algo->myDim = 3;
   // 3D ----------
   else if ( hypType == "NETGEN_3D") {
     algo->myDim = 3;
index 71500c7b5d6d590720c8a84c0bb4bcb974f993e1..ac92276c32fd4944b261d87a9fc7b819fc9caf61 100644 (file)
@@ -27,6 +27,8 @@
  * 
  * The only API method here is SMESH_2smeshpy::ConvertScript(), the rest ones are
  * for internal usage
  * 
  * The only API method here is SMESH_2smeshpy::ConvertScript(), the rest ones are
  * for internal usage
+ *
+ * See comments to _pyHypothesis class to know how to assure convertion of a new hypothesis
  */
 
 class Resource_DataMapOfAsciiStringAsciiString;
  */
 
 class Resource_DataMapOfAsciiStringAsciiString;
@@ -187,7 +189,20 @@ private:
 };
 
 /*!
 };
 
 /*!
- * \brief Root class for smesh.Mesh_Algorithm
+ * \brief Root class for hypothesis
+ *
+ * HOWTO assure convertion of a new hypothesis
+ * In NewHypothesis():
+ * 1. add a case for the name of the new hypothesis and
+ * 2. initialize _pyHypothesis fields:
+ *    . myDim - hypothesis dimention;
+ *    . myType - type name of the algorithm creating the hypothesis;
+ *    . myCreationMethod - method name of the algorithm creating the hypothesis;
+ *    . append to myArgMethods interface methods setting param values in the
+ *    order they are used when myCreationMethod is called. It is supposed that
+ *    each interface method sets only one parameter, if it is not so, you are
+ *    to derive a specific class from _pyHypothesis that would redefine Process(),
+ *    see _pyComplexParamHypo for example
  */
 class _pyHypothesis: public _pyObject
 {
  */
 class _pyHypothesis: public _pyObject
 {
index 92fefeda222c7358cbdbda9b314b3d295f345850..776ee83c71dbc37e2511509a2cc89e98114d8afb 100644 (file)
@@ -281,6 +281,15 @@ class Mesh_Quadrangle(Mesh_Algorithm):
         """
         self.Create(mesh, geom, "Quadrangle_2D")
 
         """
         self.Create(mesh, geom, "Quadrangle_2D")
 
+    def QuadranglePreference(self):
+        """
+         Define "QuadranglePreference" hypothesis, forcing construction
+         of quadrangles if the number of nodes on opposite edges is not the same
+         in the case where the global number of nodes on edges is even
+        """
+        hyp = self.Hypothesis("QuadranglePreference")
+        return hyp
+
 # Public class: Mesh_Tetrahedron
 # ------------------------------
 
 # Public class: Mesh_Tetrahedron
 # ------------------------------
 
index 9b2f65b613692e868eefb751c702571d37d88afd..d44d4cc689787b6008a18c49ec408ebdbb81870b 100644 (file)
@@ -49,7 +49,8 @@ EXPORT_HEADERS = \
        StdMeshers_Quadrangle_2D.hxx \
        StdMeshers_MEFISTO_2D.hxx \
        StdMeshers_Hexa_3D.hxx \
        StdMeshers_Quadrangle_2D.hxx \
        StdMeshers_MEFISTO_2D.hxx \
        StdMeshers_Hexa_3D.hxx \
-       StdMeshers_AutomaticLength.hxx
+       StdMeshers_AutomaticLength.hxx \
+       StdMeshers_QuadranglePreference.hxx
 
 EXPORT_PYSCRIPTS =
 
 
 EXPORT_PYSCRIPTS =
 
@@ -73,7 +74,8 @@ LIB_SRC = \
        StdMeshers_MEFISTO_2D.cxx \
        StdMeshers_Penta_3D.cxx \
        StdMeshers_Hexa_3D.cxx \
        StdMeshers_MEFISTO_2D.cxx \
        StdMeshers_Penta_3D.cxx \
        StdMeshers_Hexa_3D.cxx \
-       StdMeshers_AutomaticLength.cxx
+       StdMeshers_AutomaticLength.cxx \
+       StdMeshers_QuadranglePreference.cxx
 
 LIB_SERVER_IDL = 
 
 
 LIB_SERVER_IDL = 
 
diff --git a/src/StdMeshers/StdMeshers_QuadranglePreference.cxx b/src/StdMeshers/StdMeshers_QuadranglePreference.cxx
new file mode 100644 (file)
index 0000000..4ba3dd8
--- /dev/null
@@ -0,0 +1,100 @@
+//  SMESH StdMeshers_QuadranglePreference : implementaion of SMESH idl descriptions
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : StdMeshers_QuadranglePreference.cxx
+//  Module : SMESH
+//  $Header$
+
+#include "StdMeshers_QuadranglePreference.hxx"
+#include "utilities.h"
+
+using namespace std;
+
+//=============================================================================
+/*!
+ *  
+ */
+//=============================================================================
+
+StdMeshers_QuadranglePreference::StdMeshers_QuadranglePreference(int         hypId,
+                                                                 int         studyId,
+                                                                 SMESH_Gen * gen)
+     :SMESH_Hypothesis(hypId, studyId, gen)
+{
+  _name = "QuadranglePreference";
+  _param_algo_dim = 2; // is used by StdMeshers_Quadrangle_2D
+}
+
+//=============================================================================
+/*!
+ *  
+ */
+//=============================================================================
+
+StdMeshers_QuadranglePreference::~StdMeshers_QuadranglePreference()
+{
+}
+
+//=============================================================================
+/*!
+ *  
+ */
+//=============================================================================
+
+ostream & StdMeshers_QuadranglePreference::SaveTo(ostream & save)
+{
+  return save;
+}
+
+//=============================================================================
+/*!
+ *  
+ */
+//=============================================================================
+
+istream & StdMeshers_QuadranglePreference::LoadFrom(istream & load)
+{
+  return load;
+}
+
+//=============================================================================
+/*!
+ *  
+ */
+//=============================================================================
+
+ostream & operator <<(ostream & save, StdMeshers_QuadranglePreference & hyp)
+{
+  return hyp.SaveTo( save );
+}
+
+//=============================================================================
+/*!
+ *  
+ */
+//=============================================================================
+
+istream & operator >>(istream & load, StdMeshers_QuadranglePreference & hyp)
+{
+  return hyp.LoadFrom( load );
+}
diff --git a/src/StdMeshers/StdMeshers_QuadranglePreference.hxx b/src/StdMeshers/StdMeshers_QuadranglePreference.hxx
new file mode 100644 (file)
index 0000000..eb2fdca
--- /dev/null
@@ -0,0 +1,52 @@
+//  SMESH StdMeshers : implementaion of SMESH idl descriptions
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : StdMeshers_QuadranglePreference.hxx
+//  Module : SMESH
+//  $Header$
+
+#ifndef _StdMeshers_QuadranglePreference_HXX_
+#define _StdMeshers_QuadranglePreference_HXX_
+
+#include "SMESH_Hypothesis.hxx"
+#include "Utils_SALOME_Exception.hxx"
+
+/*!
+ * \brief Hypothesis for StdMeshers_Quadrangle_2D, forcing construction
+ *        of quadrangles if the number of nodes on opposite edges is not the same.
+ *        GIBI can do it if the global number of nodes is even (DALL operator).
+ *        See PAL10467
+ */
+class StdMeshers_QuadranglePreference:public SMESH_Hypothesis
+{
+ public:
+  StdMeshers_QuadranglePreference(int hypId, int studyId, SMESH_Gen * gen);
+  virtual ~ StdMeshers_QuadranglePreference();
+  
+  virtual std::ostream & SaveTo(std::ostream & save);
+  virtual std::istream & LoadFrom(std::istream & load);
+  friend std::ostream & operator <<(std::ostream & save, StdMeshers_QuadranglePreference & hyp);
+  friend std::istream & operator >>(std::istream & load, StdMeshers_QuadranglePreference & hyp);
+};
+
+#endif
index d8131681d8c5cdf30f78b596c743ba1072ad8016..e40390c6e7596e5b8d8b383853bdb07825eb616e 100644 (file)
@@ -68,6 +68,7 @@ StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D (int hypId, int studyId, SMES
   MESSAGE("StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D");
   _name = "Quadrangle_2D";
   _shapeType = (1 << TopAbs_FACE);
   MESSAGE("StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D");
   _name = "Quadrangle_2D";
   _shapeType = (1 << TopAbs_FACE);
+  _compatibleHypothesis.push_back("QuadranglePreference");
 }
 
 //=============================================================================
 }
 
 //=============================================================================
@@ -88,14 +89,16 @@ StdMeshers_Quadrangle_2D::~StdMeshers_Quadrangle_2D()
 //=============================================================================
 
 bool StdMeshers_Quadrangle_2D::CheckHypothesis
 //=============================================================================
 
 bool StdMeshers_Quadrangle_2D::CheckHypothesis
-                         (SMESH_Mesh& aMesh,
-                          const TopoDS_Shape& aShape,
+                         (SMESH_Mesh&                          aMesh,
+                          const TopoDS_Shape&                  aShape,
                           SMESH_Hypothesis::Hypothesis_Status& aStatus)
 {
   bool isOk = true;
   aStatus = SMESH_Hypothesis::HYP_OK;
 
                           SMESH_Hypothesis::Hypothesis_Status& aStatus)
 {
   bool isOk = true;
   aStatus = SMESH_Hypothesis::HYP_OK;
 
-  // nothing to check
+  // there is only one compatible Hypothesis so far
+  const list <const SMESHDS_Hypothesis * >&hyps = GetUsedHypothesis(aMesh, aShape);
+  myQuadranglePreference = hyps.size() > 0;
 
   return isOk;
 }
 
   return isOk;
 }
index b54edea3f34a53a50928a7278677ccbd59f51409..4d02719b09613ebbc630b44ec26c39c37425fa92 100644 (file)
@@ -99,6 +99,11 @@ protected:
   UVPtStruct* MakeEdgePoints(SMESH_Mesh& aMesh,
                             const TopoDS_Face& F, const TopoDS_Edge& E,
                             double first, double last, int nb_segm);
   UVPtStruct* MakeEdgePoints(SMESH_Mesh& aMesh,
                             const TopoDS_Face& F, const TopoDS_Edge& E,
                             double first, double last, int nb_segm);
+
+  // true if QuadranglePreference hypothesis is assigned that forces
+  // construction of quadrangles if the number of nodes on opposite edges
+  // is not the same in the case where the global number of nodes on edges is even
+  bool myQuadranglePreference;
 };
 
 #endif
 };
 
 #endif
index 78c8bec86283dfe24e5f4d97803a68f5a67eb970..afa51dab590559bf9bd9b3b585bf83799d5c7105 100644 (file)
@@ -5,7 +5,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PROJECT VERSION\n"
 "POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n"
 msgstr ""
 "Project-Id-Version: PROJECT VERSION\n"
 "POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n"
-"PO-Revision-Date: 2005-11-01 12:58+0300\n"
+"PO-Revision-Date: 2005-12-23 11:15+0300\n"
 "Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
 "Content-Type: text/plain; charset=iso-8859-1\n"
 
 "Last-Translator: FULLNAME <EMAIL@ADDRESS>\n"
 "Content-Type: text/plain; charset=iso-8859-1\n"
 
@@ -80,6 +80,10 @@ msgstr "mesh_tree_algo_quad.png"
 msgid "ICON_SMESH_TREE_HYPO_MaxElementArea"
 msgstr "mesh_tree_hypo_area.png"
 
 msgid "ICON_SMESH_TREE_HYPO_MaxElementArea"
 msgstr "mesh_tree_hypo_area.png"
 
+#mesh_tree_hypo_area
+msgid "ICON_SMESH_TREE_HYPO_QuadranglePreference"
+msgstr "mesh_tree_algo_quad.png"
+
 #mesh_tree_hypo_length
 msgid "ICON_SMESH_TREE_HYPO_LocalLength"
 msgstr "mesh_tree_hypo_length.png"
 #mesh_tree_hypo_length
 msgid "ICON_SMESH_TREE_HYPO_LocalLength"
 msgstr "mesh_tree_hypo_length.png"
index 3f24a08a42f324097ca6d4f08153fa65c804397e..cb445cb85b7b9b3d61444c1e18157fe5163ace35 100644 (file)
@@ -51,7 +51,8 @@ EXPORT_HEADERS = \
        StdMeshers_Quadrangle_2D_i.hxx \
        StdMeshers_MEFISTO_2D_i.hxx \
        StdMeshers_Hexa_3D_i.hxx \
        StdMeshers_Quadrangle_2D_i.hxx \
        StdMeshers_MEFISTO_2D_i.hxx \
        StdMeshers_Hexa_3D_i.hxx \
-       StdMeshers_AutomaticLength_i.hxx
+       StdMeshers_AutomaticLength_i.hxx \
+       StdMeshers_QuadranglePreference_i.hxx
 
 # Libraries targets
 
 
 # Libraries targets
 
@@ -73,7 +74,8 @@ LIB_SRC = \
         StdMeshers_Quadrangle_2D_i.cxx \
         StdMeshers_MEFISTO_2D_i.cxx \
        StdMeshers_Hexa_3D_i.cxx \
         StdMeshers_Quadrangle_2D_i.cxx \
         StdMeshers_MEFISTO_2D_i.cxx \
        StdMeshers_Hexa_3D_i.cxx \
-       StdMeshers_AutomaticLength_i.cxx
+       StdMeshers_AutomaticLength_i.cxx \
+       StdMeshers_QuadranglePreference_i.cxx
 
 LIB_SERVER_IDL = SMESH_BasicHypothesis.idl
 
 
 LIB_SERVER_IDL = SMESH_BasicHypothesis.idl
 
diff --git a/src/StdMeshers_I/StdMeshers_QuadranglePreference_i.cxx b/src/StdMeshers_I/StdMeshers_QuadranglePreference_i.cxx
new file mode 100644 (file)
index 0000000..a32ded9
--- /dev/null
@@ -0,0 +1,98 @@
+//  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : StdMeshers_QuadranglePreference_i.cxx
+//           Moved here from SMESH_LocalLength_i.cxx
+//  Author : Paul RASCLE, EDF
+//  Module : SMESH
+//  $Header$
+
+using namespace std;
+#include "StdMeshers_QuadranglePreference_i.hxx"
+#include "SMESH_Gen_i.hxx"
+#include "SMESH_Gen.hxx"
+
+#include "Utils_CorbaException.hxx"
+#include "utilities.h"
+
+#include <TCollection_AsciiString.hxx>
+
+//=============================================================================
+/*!
+ *  StdMeshers_QuadranglePreference_i::StdMeshers_QuadranglePreference_i
+ *
+ *  Constructor
+ */
+//=============================================================================
+
+StdMeshers_QuadranglePreference_i::StdMeshers_QuadranglePreference_i
+( PortableServer::POA_ptr thePOA,
+  int                     theStudyId,
+  ::SMESH_Gen*            theGenImpl ): SALOME::GenericObj_i( thePOA ), 
+                                        SMESH_Hypothesis_i( thePOA )
+{
+  myBaseImpl = new ::StdMeshers_QuadranglePreference( theGenImpl->GetANewId(),
+                                                      theStudyId,
+                                                      theGenImpl );
+}
+
+//=============================================================================
+/*!
+ *  StdMeshers_QuadranglePreference_i::~StdMeshers_QuadranglePreference_i
+ *
+ *  Destructor
+ */
+//=============================================================================
+
+StdMeshers_QuadranglePreference_i::~StdMeshers_QuadranglePreference_i()
+{
+}
+
+//=============================================================================
+/*!
+ *  StdMeshers_QuadranglePreference_i::GetImpl
+ *
+ *  Get implementation
+ */
+//=============================================================================
+
+::StdMeshers_QuadranglePreference* StdMeshers_QuadranglePreference_i::GetImpl()
+{
+  return ( ::StdMeshers_QuadranglePreference* )myBaseImpl;
+}
+
+//================================================================================
+/*!
+ * \brief Verify whether hypothesis supports given entity type 
+  * \param type - dimension (see SMESH::Dimension enumeration)
+  * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
+ * 
+ * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
+ */
+//================================================================================  
+
+CORBA::Boolean StdMeshers_QuadranglePreference_i::IsDimSupported( SMESH::Dimension type )
+{
+  return type == SMESH::DIM_2D;
+}
+
diff --git a/src/StdMeshers_I/StdMeshers_QuadranglePreference_i.hxx b/src/StdMeshers_I/StdMeshers_QuadranglePreference_i.hxx
new file mode 100644 (file)
index 0000000..cfa7968
--- /dev/null
@@ -0,0 +1,64 @@
+//  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : StdMeshers_QuadranglePreference_i.hxx
+//           Moved here from SMESH_LocalLength_i.hxx
+//  Author : Paul RASCLE, EDF
+//  Module : SMESH
+//  $Header$
+
+#ifndef _SMESH_QuadranglePreference_I_HXX_
+#define _SMESH_QuadranglePreference_I_HXX_
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
+
+#include "SMESH_Hypothesis_i.hxx"
+#include "StdMeshers_QuadranglePreference.hxx"
+
+class SMESH_Gen;
+
+// ======================================================
+// Local Length hypothesis
+// ======================================================
+class StdMeshers_QuadranglePreference_i:
+  public virtual POA_StdMeshers::StdMeshers_QuadranglePreference,
+  public virtual SMESH_Hypothesis_i
+{
+public:
+  // Constructor
+  StdMeshers_QuadranglePreference_i( PortableServer::POA_ptr thePOA,
+                                     int                     theStudyId,
+                                     ::SMESH_Gen*            theGenImpl );
+  // Destructor
+  virtual ~StdMeshers_QuadranglePreference_i();
+
+  // Get implementation
+  ::StdMeshers_QuadranglePreference* GetImpl();
+  
+  // Verify whether hypothesis supports given entity type 
+  CORBA::Boolean IsDimSupported( SMESH::Dimension type );
+};
+
+#endif
+
index e21d44d3d9398b31a55f32643a5847cb0155bfb5..768d2c4fb0ed174bf6ec2b7496f9cbfb2357788d 100644 (file)
@@ -38,6 +38,7 @@ using namespace std;
 #include "StdMeshers_Deflection1D_i.hxx"
 #include "StdMeshers_Propagation_i.hxx"
 #include "StdMeshers_LengthFromEdges_i.hxx"
 #include "StdMeshers_Deflection1D_i.hxx"
 #include "StdMeshers_Propagation_i.hxx"
 #include "StdMeshers_LengthFromEdges_i.hxx"
+#include "StdMeshers_QuadranglePreference_i.hxx"
 #include "StdMeshers_MaxElementArea_i.hxx"
 #include "StdMeshers_MaxElementVolume_i.hxx"
 #include "StdMeshers_NotConformAllowed_i.hxx"
 #include "StdMeshers_MaxElementArea_i.hxx"
 #include "StdMeshers_MaxElementVolume_i.hxx"
 #include "StdMeshers_NotConformAllowed_i.hxx"
@@ -84,6 +85,8 @@ extern "C"
       aCreator = new HypothesisCreator_i<StdMeshers_Arithmetic1D_i>;
     else if (strcmp(aHypName, "AutomaticLength") == 0)
       aCreator = new HypothesisCreator_i<StdMeshers_AutomaticLength_i>;
       aCreator = new HypothesisCreator_i<StdMeshers_Arithmetic1D_i>;
     else if (strcmp(aHypName, "AutomaticLength") == 0)
       aCreator = new HypothesisCreator_i<StdMeshers_AutomaticLength_i>;
+    else if (strcmp(aHypName, "QuadranglePreference") == 0)
+      aCreator = new HypothesisCreator_i<StdMeshers_QuadranglePreference_i>;
 
     // Algorithms
     else if (strcmp(aHypName, "Regular_1D") == 0)
 
     // Algorithms
     else if (strcmp(aHypName, "Regular_1D") == 0)