26 #ifndef SMESH_MesherHelper_HeaderFile
27 #define SMESH_MesherHelper_HeaderFile
35 #include <Geom_Surface.hxx>
36 #include <TopoDS_Face.hxx>
37 #include <TopoDS_Shape.hxx>
38 #include <gp_Pnt2d.hxx>
43 typedef std::map<SMESH_TLink, const SMDS_MeshNode*>::iterator
ItTLinkNode;
85 const TopoDS_Face& theFace,
86 const TopoDS_Edge& theBaseEdge,
103 static int WrapIndex(
const int ind,
const int nbNodes) {
104 if ( ind < 0 )
return nbNodes + ind % nbNodes;
105 if ( ind >= nbNodes )
return ind % nbNodes;
114 TopAbs_ShapeEnum ancestorType=TopAbs_SHAPE);
134 void SetIsQuadratic(
const bool theBuildQuadratic)
135 { myCreateQuadratic = theBuildQuadratic; }
145 void FixQuadraticElements(
bool volumeOnly=
true);
157 void SetSubShape(
const int subShapeID);
172 SMDS_MeshNode* AddNode(
double x,
double y,
double z,
int ID = 0);
179 const bool force3d =
true);
187 const bool force3d =
false);
196 const bool force3d =
false);
205 const bool force3d =
true);
215 const bool force3d =
true);
226 const bool force3d =
true);
239 bool force3d =
true);
243 double GetNodeU(
const TopoDS_Edge& theEdge,
250 gp_XY GetNodeUV(
const TopoDS_Face& F,
253 bool* check=0)
const;
258 bool CheckNodeUV(
const TopoDS_Face& F,
261 const double tol)
const;
265 static gp_XY GetMiddleUV(
const Handle(Geom_Surface)& surface,
275 bool GetNodeUVneedInFaceNode(
const TopoDS_Face& F = TopoDS_Face())
const;
284 bool IsDegenShape(
const int subShape)
const
285 {
return myDegenShapeIds.find( subShape ) != myDegenShapeIds.end(); }
294 bool IsSeamShape(
const int subShape)
const
295 {
return mySeamShapeIds.find( subShape ) != mySeamShapeIds.end(); }
305 {
return IsSeamShape( GetMeshDS()->ShapeToIndex( subShape )); }
310 bool IsRealSeam(
const int subShape)
const
311 {
return mySeamShapeIds.find( -subShape ) != mySeamShapeIds.end(); }
317 {
return IsRealSeam( GetMeshDS()->ShapeToIndex( subShape)); }
323 bool HasSeam()
const {
return !mySeamShapeIds.empty(); }
332 double GetOtherParam(
const double param)
const;
350 { myTLinkNodeMap.insert(aMap.begin(), aMap.end()); }
363 MType IsQuadraticMesh();
373 gp_Pnt2d GetUVOnSeam(
const gp_Pnt2d& uv1,
const gp_Pnt2d& uv2 )
const;