PrmJ->GetNodeIndex( otherFaceNode ) >= 0 ))
continue; // f is a base quadrangle
- // check projections of face direction (baOFN) to triange normals (nI and nJ)
+ // check projections of face direction (baOFN) to triangle normals (nI and nJ)
gp_Vec baOFN( base2, SMESH_TNodeXYZ( otherFaceNode ));
if ( nI * baOFN > 0 && nJ * baOFN > 0 &&
baI* baOFN > 0 && baJ* baOFN > 0 ) // issue 0023212
//================================================================================
/*!
- * \brief Prepare data for the given face
+ * \brief Retrieve data of the given face
* \param PN - coordinates of face nodes
* \param VN - cross products of vectors (PC-PN(i)) ^ (PC-PN(i+1))
* \param FNodes - face nodes
int nbp = 4;
int j = 0;
- for(i=1; i<4; i++) {
+ for ( i = 1; i < 4; i++ )
+ {
j = i+1;
for(; j<=4; j++) {
if( PN(i).Distance(PN(j)) < 1.e-6 )
}
if(j<=4) break;
}
- //int deg_num = IsDegenarate(PN);
- //if(deg_num>0) {
+
bool hasdeg = false;
- if(i<4) {
- //cout<<"find degeneration"<<endl;
+ if ( i < 4 )
+ {
hasdeg = true;
gp_Pnt Pdeg = PN(i);
gp_Pnt Ptmp(N->X(),N->Y(),N->Z());
if(Pdeg.Distance(Ptmp)<1.e-6) {
DegNode = N;
- //DegNode = const_cast<SMDS_MeshNode*>(N);
break;
}
}
PN.SetValue(nbp+1,PN(1));
FNodes[nbp] = FNodes[0];
+
// find normal direction
gp_Vec V1(PC,PN(nbp));
gp_Vec V2(PC,PN(1));
}
}
- //cout<<" VNorm("<<VNorm.X()<<","<<VNorm.Y()<<","<<VNorm.Z()<<")"<<endl;
return hasdeg ? DEGEN_QUAD : QUAD;
}
if ( !myElemSearcher )
myElemSearcher = SMESH_MeshAlgos::GetElementSearcher( *meshDS );
- SMESH_ElementSearcher* searcher = const_cast<SMESH_ElementSearcher*>(myElemSearcher);
+ SMESH_ElementSearcher* searcher = const_cast<SMESH_ElementSearcher*>( myElemSearcher );
SMESHUtils::Deleter<SMESH_ElementSearcher>
volSearcher( SMESH_MeshAlgos::GetElementSearcher( *meshDS ));
vector< const SMDS_MeshElement* > suspectFaces, foundVolumes;
gp_Pnt PC;
gp_Vec VNorm;
const SMDS_MeshElement* volumes[2];
- int what = Preparation(face, PN, VN, FNodes, PC, VNorm, volumes);
+ int what = Preparation( face, PN, VN, FNodes, PC, VNorm, volumes );
if ( what == NOT_QUAD )
continue;
if ( volumes[0] && volumes[1] )
if ( toFindVolumes && 0 ) // non-conformal mesh is not suitable for any mesher so far
{
- // there are volumes in the mesh, in a non-conformal mesh an neighbor
+ // there are volumes in the mesh, in a non-conformal mesh a neighbor
// volume can be not found yet
for ( int isRev = 0; isRev < 2; ++isRev )
{
gp_Pnt intP;
for ( int isRev = 0; isRev < 2; ++isRev )
{
- if( !volumes[isRev] && HasIntersection(farPnt[isRev], PC, intP, aContour) )
+ if( !volumes[isRev] && HasIntersection( farPnt[isRev], PC, intP, aContour ))
{
double d = PC.Distance( intP );
if ( d < dist2int[isRev] )