FaceQuadStruct Struct Reference

#include <StdMeshers_Quadrangle_2D.hxx>

Classes

struct  Side
 
struct  SideIterator
 

Public Types

typedef boost::shared_ptr< FaceQuadStructPtr
 

Public Member Functions

 FaceQuadStruct (const TopoDS_Face &F=TopoDS_Face(), const std::string &nm="main")
 Constructor of a quad. More...
 
bool findCell (const gp_XY &uv, int &i, int &j)
 Finds indices of a grid quad enclosing the given enforced UV. More...
 
bool isEqual (const gp_XY &uv, int i, int j)
 Checks if a given UV is equal to a given grid point. More...
 
bool isNear (const gp_XY &uv, int &i, int &j, int nbLoops=1)
 Looks for UV in quads around a given (I,J) and precise (I,J) More...
 
intnbNodeOut (int iSide)
 
void normPa2IJ (double x, double y, int &i, int &j)
 Find indices (i,j) of a point in uv_grid by normalized parameters (x,y) More...
 
void shift (size_t nb, bool keepUnitOri, bool keepGrid=false)
 Rotate sides of a quad CCW by given nb of quartes. More...
 
double & U (int i, int j)
 
void updateUV (const gp_XY &uv, int i, int j, bool isVertical)
 Recompute UV of grid points around a moved point in one direction. More...
 
UVPtStructUVPt (int i, int j)
 
double & V (int i, int j)
 

Public Attributes

TopoDS_Face face
 
int iSize
 
int jSize
 
std::string name
 
std::vector< Sideside
 
Bnd_B2d uv_box
 
std::vector< UVPtStructuv_grid
 

Member Typedef Documentation

◆ Ptr

typedef boost::shared_ptr<FaceQuadStruct> FaceQuadStruct::Ptr

Constructor & Destructor Documentation

◆ FaceQuadStruct()

FaceQuadStruct::FaceQuadStruct ( const TopoDS_Face &  F = TopoDS_Face(),
const std::string &  nm = "main" 
)

Constructor of a quad.

References side.

Member Function Documentation

◆ findCell()

bool FaceQuadStruct::findCell ( const gp_XY &  uv,
int i,
int j 
)

Finds indices of a grid quad enclosing the given enforced UV.

References SMESH_MeshAlgos::GetBarycentricCoords(), iSize, isNear(), jSize, normPa2IJ(), uvPtStruct::UV(), uv_box, and UVPt().

◆ isEqual()

bool FaceQuadStruct::isEqual ( const gp_XY &  uv,
int  i,
int  j 
)

Checks if a given UV is equal to a given grid point.

References iSize, jSize, and UVPt().

◆ isNear()

bool FaceQuadStruct::isNear ( const gp_XY &  uv,
int i,
int j,
int  nbLoops = 1 
)

Looks for UV in quads around a given (I,J) and precise (I,J)

References SMESH_MeshAlgos::GetBarycentricCoords(), iSize, jSize, uvPtStruct::UV(), and UVPt().

Referenced by findCell().

◆ nbNodeOut()

int & FaceQuadStruct::nbNodeOut ( int  iSide)

References side.

◆ normPa2IJ()

void FaceQuadStruct::normPa2IJ ( double  x,
double  y,
int i,
int j 
)

Find indices (i,j) of a point in uv_grid by normalized parameters (x,y)

References iSize, jSize, and UVPt().

Referenced by findCell().

◆ shift()

void FaceQuadStruct::shift ( size_t  nb,
bool  ori,
bool  keepGrid = false 
)

Rotate sides of a quad CCW by given nb of quartes.

Parameters
nb- number of rotation quartes
ori- to keep orientation of sides as in an unit quad or not
keepGrid- if true Side::grid is not changed, Side::from and Side::to are altered instead

References FaceQuadStruct::Side::contacts, DraftVecUtils::find(), iSize, jSize, side, uv_grid, and UVPt().

Referenced by draftguitools.gui_trimex.Trimex::action(), and draftguitools.gui_trimex.Trimex::trimObject().

◆ U()

double & FaceQuadStruct::U ( int  i,
int  j 
)

References uvPtStruct::u, and UVPt().

◆ updateUV()

void FaceQuadStruct::updateUV ( const gp_XY &  uv,
int  i,
int  j,
bool  isVertical 
)

Recompute UV of grid points around a moved point in one direction.

References iSize, jSize, uvPtStruct::u, uvPtStruct::UV(), UVPt(), uvPtStruct::v, uvPtStruct::x, and uvPtStruct::y.

◆ UVPt()

UVPtStruct & FaceQuadStruct::UVPt ( int  i,
int  j 
)

References iSize, and uv_grid.

Referenced by findCell(), isEqual(), isNear(), normPa2IJ(), shift(), U(), updateUV(), and V().

◆ V()

double & FaceQuadStruct::V ( int  i,
int  j 
)

References UVPt(), and uvPtStruct::v.

Member Data Documentation

◆ face

◆ iSize

int FaceQuadStruct::iSize

◆ jSize

int FaceQuadStruct::jSize

◆ name

◆ side

◆ uv_box

Bnd_B2d FaceQuadStruct::uv_box

Referenced by findCell().

◆ uv_grid

std::vector< UVPtStruct> FaceQuadStruct::uv_grid

Referenced by shift(), and UVPt().


The documentation for this struct was generated from the following files: