X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Quadrangle_2D.hxx;h=48ebdb21dd2dde38618107202608a834b69a468b;hb=e12cb3f8c3219fb5d53a7a23569011f1009ffd41;hp=b686fe1e0d2a42636b4e6fd8d3af27f5455fe3f6;hpb=a406fd679300d97b7623d02191f9eaaffff2a019;p=modules%2Fsmesh.git diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx index b686fe1e0..48ebdb21d 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.hxx @@ -58,6 +58,7 @@ struct FaceQuadStruct }; StdMeshers_FaceSidePtr grid; int from, to; // indices of grid points used by the quad + int di; // +1 or -1 depending on IsReversed() std::set forced_nodes; // indices of forced grid points std::vector contacts; // contacts with sides of other quads int nbNodeOut; // nb of missing nodes on an opposite shorter side @@ -71,7 +72,7 @@ struct FaceQuadStruct int ToQuadIndex( int sideNodeIndex ) const; bool IsForced( int nodeIndex ) const; bool IsReversed() const { return nbNodeOut ? false : to < from; } - bool Reverse(); + bool Reverse(bool keepGrid); int NbPoints() const { return Abs( to - from ); } double Param( int nodeIndex ) const; double Length( int from=-1, int to=-1) const; @@ -105,6 +106,7 @@ struct FaceQuadStruct bool More() const { return uvPtr != uvEnd; } void Next() { uvPtr += dPtr; ++counter; } UVPtStruct& UVPt() const { return (UVPtStruct&) *uvPtr; } + UVPtStruct& operator[](int i) { return (UVPtStruct&) uvPtr[ i*dPtr]; } int Count() const { return counter; } }; @@ -117,7 +119,7 @@ struct FaceQuadStruct FaceQuadStruct ( const TopoDS_Face& F = TopoDS_Face(), const std::string& nm="main" ); UVPtStruct& UVPt( int i, int j ) { return uv_grid[ i + j * iSize ]; } - void shift ( size_t nb, bool keepUnitOri ); + void shift ( size_t nb, bool keepUnitOri, bool keepGrid=false ); int & nbNodeOut( int iSide ) { return side[ iSide ].nbNodeOut; } bool findCell ( const gp_XY& uv, int & i, int & j ); bool isNear ( const gp_XY& uv, int & i, int & j, int nbLoops=1 ); @@ -212,6 +214,8 @@ protected: int splitQuad(FaceQuadStruct::Ptr quad, int i, int j); + void shiftQuad(FaceQuadStruct::Ptr& quad, const int num ); + typedef std::map< StdMeshers_FaceSidePtr, std::vector< FaceQuadStruct::Ptr > > TQuadsBySide; void updateSideUV( FaceQuadStruct::Side& side, int iForced,