1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // File : StdMeshers_QuadrangleParams.hxx
20 // Author : Sergey KUUL, OCC
23 #ifndef _SMESH_QUADRANGLEPARAMS_HXX_
24 #define _SMESH_QUADRANGLEPARAMS_HXX_
26 #include "SMESH_StdMeshers.hxx"
27 #include "SMESH_Hypothesis.hxx"
34 enum StdMeshers_QuadType
39 QUAD_QUADRANGLE_PREF_REVERSED,
44 class STDMESHERS_EXPORT StdMeshers_QuadrangleParams: public SMESH_Hypothesis
47 StdMeshers_QuadrangleParams(int hypId, int studyId, SMESH_Gen* gen);
48 virtual ~StdMeshers_QuadrangleParams();
50 void SetTriaVertex (int id);
51 int GetTriaVertex() const { return _triaVertexID; }
53 void SetObjectEntry (const char* entry) { _objEntry = entry; }
54 const char* GetObjectEntry() { return _objEntry.c_str(); }
56 void SetQuadType (StdMeshers_QuadType type);
57 StdMeshers_QuadType GetQuadType() const { return _quadType; }
59 void SetEnforcedNodes( const std::vector< TopoDS_Shape >& shapes,
60 const std::vector< gp_Pnt >& points );
61 void GetEnforcedNodes( std::vector< TopoDS_Shape >& shapes,
62 std::vector< gp_Pnt >& points ) const;
64 virtual std::ostream & SaveTo(std::ostream & save);
65 virtual std::istream & LoadFrom(std::istream & load);
68 * \brief Initialize start and end length by the mesh built on the geometry
69 * \param theMesh - the built mesh
70 * \param theShape - the geometry of interest
71 * \retval bool - true if parameter values have been successfully defined
73 virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh,
74 const TopoDS_Shape& theShape);
77 * \brief Initialize my parameter values by default parameters.
78 * \retval bool - true if parameter values have been successfully defined
80 virtual bool SetParametersByDefaults(const TDefaults& dflts,
81 const SMESH_Mesh* theMesh=0);
85 std::string _objEntry;
86 StdMeshers_QuadType _quadType;
87 std::vector< TopoDS_Shape > _enforcedVertices;
88 std::vector< gp_Pnt > _enforcedPoints;