1 // Copyright (C) 2007-2021 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
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=0)
46 : gp_Pnt( aPnt ), size( theSize ) {}
47 ControlPnt(double theX,double theY,double theZ, double theSize=0)
48 : gp_Pnt(theX, theY, theZ), size( theSize ) {}
50 double Size() const { return size; };
51 void SetSize( double theSize ) { size = theSize; };
56 // Functions to get sample point from shapes
57 SMESHUtils_EXPORT void createControlPoints( const TopoDS_Shape& theShape,
58 const double& theSize,
59 std::vector< ControlPnt >& thePoints );
61 SMESHUtils_EXPORT void createPointsSampleFromEdge( const TopoDS_Edge& theEdge,
62 const double& theSize,
63 std::vector<ControlPnt>& thePoints );
65 SMESHUtils_EXPORT void createPointsSampleFromFace( const TopoDS_Face& theFace,
66 const double& theSize,
67 std::vector<ControlPnt>& thePoints );
69 SMESHUtils_EXPORT void createPointsSampleFromSolid( const TopoDS_Solid& theSolid,
70 const double& theSize,
71 std::vector<ControlPnt>& thePoints );