From: eap Date: Tue, 28 Jun 2011 13:00:19 +0000 (+0000) Subject: Create StdMeshers_QuadrangleParams hyp instead of "Quadrangle X-Git-Tag: V6_4_0a1~169 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d8c160ee270e9ffa09ef77bafbfd502cb9322217;p=modules%2Fsmesh.git Create StdMeshers_QuadrangleParams hyp instead of "Quadrangle preference" and "Triangle preference" obsolete hypotheses --- diff --git a/src/StdMeshers_I/StdMeshers_i.cxx b/src/StdMeshers_I/StdMeshers_i.cxx index 510cc91d1..a8274ffb4 100644 --- a/src/StdMeshers_I/StdMeshers_i.cxx +++ b/src/StdMeshers_I/StdMeshers_i.cxx @@ -40,8 +40,8 @@ #include "StdMeshers_Deflection1D_i.hxx" #include "StdMeshers_Propagation_i.hxx" #include "StdMeshers_LengthFromEdges_i.hxx" -#include "StdMeshers_QuadranglePreference_i.hxx" -#include "StdMeshers_TrianglePreference_i.hxx" +//#include "StdMeshers_QuadranglePreference_i.hxx" +//#include "StdMeshers_TrianglePreference_i.hxx" #include "StdMeshers_QuadraticMesh_i.hxx" #include "StdMeshers_MaxElementArea_i.hxx" #include "StdMeshers_MaxElementVolume_i.hxx" @@ -75,10 +75,33 @@ template class StdHypothesisCreator_i:public HypothesisCreator_i { +public: // as we have 'module StdMeshers' in SMESH_BasicHypothesis.idl virtual std::string GetModuleName() { return "StdMeshers"; } }; +//============================================================================= +/*! + * \brief Creates StdMeshers_QuadrangleParams_i instead of + * StdMeshers_TrianglePreference_i and StdMeshers_QuadranglePreference_i + */ +//============================================================================= + +template +class QuadrangleParamsCreator : public StdHypothesisCreator_i +{ +public: + virtual SMESH_Hypothesis_i* Create (PortableServer::POA_ptr thePOA, + int theStudyId, + ::SMESH_Gen* theGenImpl) + { + StdMeshers_QuadrangleParams_i* h = + new StdMeshers_QuadrangleParams_i( thePOA, theStudyId, theGenImpl); + h->SetQuadType( TYPE ); + return h; + } +}; + //============================================================================= /*! * @@ -122,9 +145,11 @@ STDMESHERS_I_EXPORT else if (strcmp(aHypName, "AutomaticLength") == 0) aCreator = new StdHypothesisCreator_i; else if (strcmp(aHypName, "QuadranglePreference") == 0) - aCreator = new StdHypothesisCreator_i; + //aCreator = new StdHypothesisCreator_i; + aCreator = new QuadrangleParamsCreator< StdMeshers::QUAD_QUADRANGLE_PREF >(); else if (strcmp(aHypName, "TrianglePreference") == 0) - aCreator = new StdHypothesisCreator_i; + //aCreator = new StdHypothesisCreator_i; + aCreator = new QuadrangleParamsCreator< StdMeshers::QUAD_TRIANGLE_PREF >(); else if (strcmp(aHypName, "QuadraticMesh") == 0) aCreator = new StdHypothesisCreator_i; else if (strcmp(aHypName, "ProjectionSource3D") == 0)