myNeedSmooth = false;
myCheckOri = false;
- FaceQuadStruct::Ptr quad = CheckNbEdges( aMesh, F, /*considerMesh=*/true );
+ FaceQuadStruct::Ptr quad = CheckNbEdges( aMesh, F, /*considerMesh=*/true, myHelper );
if (!quad)
return false;
myQuadList.clear();
int nbright = (int) uv_e1.size();
int nbleft = (int) uv_e3.size();
- if (quad->nbNodeOut(0) && nbvertic == 2) // this should not occure
+ if (quad->nbNodeOut(0) && nbvertic == 2) // this should not occur
{
// Down edge is out
//
}
// right or left boundary quadrangles
- if (quad->nbNodeOut( QUAD_RIGHT_SIDE ) && nbhoriz == 2) // this should not occure
+ if (quad->nbNodeOut( QUAD_RIGHT_SIDE ) && nbhoriz == 2) // this should not occur
{
int g = 0; // last processed node in the grid
int stop = nbright - 1;
// find node c in the grid, nearest to the b
c = 0;
int near = g;
- if (i == stop - 1) { // up bondary reached
+ if (i == stop - 1) { // up boundary reached
c = quad->uv_grid[nbhoriz*(jup + 1) - 2].node;
near = jup;
} else {
// find node c in the grid, nearest to the b
int near = g;
- if (i == stop + 1) { // down bondary reached
+ if (i == stop + 1) { // down boundary reached
c = quad->uv_grid[nbhoriz*jlow + 1].node;
near = jlow;
}
FaceQuadStruct::Ptr StdMeshers_Quadrangle_2D::CheckNbEdges(SMESH_Mesh & aMesh,
const TopoDS_Shape & aShape,
- const bool considerMesh)
+ const bool considerMesh,
+ SMESH_MesherHelper* aFaceHelper)
{
if ( !myQuadList.empty() && myQuadList.front()->face.IsSame( aShape ))
return myQuadList.front();
}
// find corner vertices of the quad
+ myHelper = ( aFaceHelper && aFaceHelper->GetSubShape() == aShape ) ? aFaceHelper : NULL;
vector<TopoDS_Vertex> corners;
int nbDegenEdges, nbSides = getCorners( F, aMesh, edges, corners, nbDegenEdges, considerMesh );
if ( nbSides == 0 )
sideEdges.push_back( *edgeIt++ );
if ( !sideEdges.empty() )
quad->side.push_back( StdMeshers_FaceSide::New(F, sideEdges, &aMesh, iSide < QUAD_TOP_SIDE,
- ignoreMediumNodes, myProxyMesh));
+ ignoreMediumNodes, myHelper, myProxyMesh));
else
--iSide;
}
{
quad->side.push_back
( StdMeshers_FaceSide::New( F, sideEdges, &aMesh, iSide < QUAD_TOP_SIDE,
- ignoreMediumNodes, myProxyMesh ));
+ ignoreMediumNodes, myHelper, myProxyMesh ));
++iSide;
}
if ( quad->side.size() == 4 )
//=======================================================================
//function : ShiftQuad
-//purpose : auxilary function for computeQuadPref
+//purpose : auxiliary function for computeQuadPref
//=======================================================================
void StdMeshers_Quadrangle_2D::shiftQuad(FaceQuadStruct::Ptr& quad, const int num )
//=======================================================================
//function : calcUV
-//purpose : auxilary function for computeQuadPref
+//purpose : auxiliary function for computeQuadPref
//=======================================================================
static gp_UV calcUV(double x0, double x1, double y0, double y1,
//=======================================================================
//function : calcUV2
-//purpose : auxilary function for computeQuadPref
+//purpose : auxiliary function for computeQuadPref
//=======================================================================
static gp_UV calcUV2(double x, double y,
}
int nnn = Min(nr,nl);
- // auxilary sequence of XY for creation nodes
+ // auxiliary sequence of XY for creation nodes
// in the bottom part of central domain
// Length of UVL and UVR must be == nbv-nnn
TColgp_SequenceOfXY UVL, UVR, UVT;
MapShapeNbElems& aResMap,
bool IsQuadratic)
{
- // Auxilary key in order to keep old variant
+ // Auxiliary key in order to keep old variant
// of meshing after implementation new variant
// for bug 0016220 from Mantis.
bool OldVersion = false;
gp_XY a3 (uv_et.front().u, uv_et.front().v);
int nnn = Min(nr,nl);
- // auxilary sequence of XY for creation of nodes
+ // auxiliary sequence of XY for creation of nodes
// in the bottom part of central domain
// it's length must be == nbv-nnn-1
TColgp_SequenceOfXY UVL;
}
}
- // define refernce orientation in 2D
+ // define reference orientation in 2D
TNo2SmooNoMap::iterator n2sn = smooNoMap.begin();
for ( ; n2sn != smooNoMap.end(); ++n2sn )
if ( !n2sn->second._triangles.empty() )
{
TError err;
TSideVector wireVec =
- StdMeshers_FaceSide::GetFaceWires( geomFace, *myHelper->GetMesh(), true, err );
+ StdMeshers_FaceSide::GetFaceWires( geomFace, *myHelper->GetMesh(), true, err, myHelper );
StdMeshers_FaceSidePtr wire = wireVec[0];
// find a right angle VERTEX
theNbDegenEdges = 0;
SMESH_MesherHelper helper( theMesh );
- StdMeshers_FaceSide faceSide( theFace, theWire, &theMesh, /*isFwd=*/true, /*skipMedium=*/true);
+ if ( myHelper )
+ helper.CopySubShapeInfo( *myHelper );
+ StdMeshers_FaceSide faceSide( theFace, theWire, &theMesh,
+ /*isFwd=*/true, /*skipMedium=*/true, &helper );
// sort theVertices by angle
multimap<double, TopoDS_Vertex> vertexByAngle;