1 // Copyright (C) 2007-2019 CEA/DEN, EDF R&D
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
20 // Author : Lioka RAZAFINDRAZAKA (CEA)
22 #ifndef SMESH_CONTROLPNT_H
23 #define SMESH_CONTROLPNT_H
25 #include "SMESH_Utils.hxx"
39 * \brief Control point: coordinates and element size at these coordinates
41 struct SMESHUtils_EXPORT ControlPnt : public gp_Pnt
44 : gp_Pnt(), size(0) {}
45 ControlPnt( const gp_Pnt& aPnt, double theSize)
46 : gp_Pnt( aPnt ), size( theSize ) {}
47 ControlPnt(double theX,double theY,double theZ)
48 : gp_Pnt(theX, theY, theZ), size(0) {}
49 ControlPnt(double theX,double theY,double theZ, double theSize)
50 : gp_Pnt(theX, theY, theZ), size( theSize ) {}
52 double Size() const { return size; };
53 void SetSize( double theSize ) { size = theSize; };
58 // Functions to get sample point from shapes
59 SMESHUtils_EXPORT void createControlPoints( const TopoDS_Shape& theShape,
60 const double& theSize,
61 std::vector< ControlPnt >& thePoints );
63 SMESHUtils_EXPORT void createPointsSampleFromEdge( const TopoDS_Edge& theEdge,
64 const double& theSize,
65 std::vector<ControlPnt>& thePoints );
67 SMESHUtils_EXPORT void createPointsSampleFromFace( const TopoDS_Face& theFace,
68 const double& theSize,
69 std::vector<ControlPnt>& thePoints );
71 SMESHUtils_EXPORT void createPointsSampleFromSolid( const TopoDS_Solid& theSolid,
72 const double& theSize,
73 std::vector<ControlPnt>& thePoints );